Initial Import
[profile/ivi/clutter.git] / clutter / clutter-list-model.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Authored By Matthew Allum  <mallum@openedhand.com>
7  *             Neil Jagdish Patel <njp@o-hand.com>
8  *             Emmanuele Bassi <ebassi@openedhand.com>
9  *
10  * Copyright (C) 2006 OpenedHand
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * NB: Inspiration for column storage taken from GtkListStore
26  */
27
28 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <clutter/clutter.h> can be included directly."
30 #endif
31
32 #ifndef __CLUTTER_LIST_MODEL_H__
33 #define __CLUTTER_LIST_MODEL_H__
34
35 #include <clutter/clutter-model.h>
36
37 G_BEGIN_DECLS
38
39 #define CLUTTER_TYPE_LIST_MODEL                 (clutter_list_model_get_type ())
40 #define CLUTTER_LIST_MODEL(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_LIST_MODEL, ClutterListModel))
41 #define CLUTTER_IS_LIST_MODEL(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_LIST_MODEL))
42 #define CLUTTER_LIST_MODEL_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_LIST_MODEL, ClutterListModeClass))
43 #define CLUTTER_IS_LIST_MODEL_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_LIST_MODEL))
44 #define CLUTTER_LIST_MODEL_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_LIST_MODEL, ClutterListModeClass))
45
46 typedef struct _ClutterListModel                ClutterListModel;
47 typedef struct _ClutterListModelPrivate         ClutterListModelPrivate;
48 typedef struct _ClutterListModelClass           ClutterListModelClass;
49
50 /**
51  * ClutterListModel:
52  *
53  * The #ClutterListModel struct contains only private data.
54  *
55  * Since: 0.6
56  */
57 struct _ClutterListModel
58 {
59   /*< private >*/
60   ClutterModel parent_instance;
61
62   ClutterListModelPrivate *priv;
63 };
64
65 /**
66  * ClutterListModelClass:
67  *
68  * The #ClutterListModelClass struct contains only private data.
69  *
70  * Since: 0.6
71  */
72 struct _ClutterListModelClass
73 {
74   /*< private >*/
75   ClutterModelClass parent_class;
76 };
77
78 GType         clutter_list_model_get_type (void) G_GNUC_CONST;
79
80 ClutterModel *clutter_list_model_new      (guint                n_columns,
81                                               ...);
82 ClutterModel *clutter_list_model_newv     (guint                n_columns,
83                                            GType               *types,
84                                            const gchar * const  names[]);
85
86 G_END_DECLS
87
88 #endif /* __CLUTTER_LIST_MODEL_H__ */