ui/gtk/model.h

changeset 40
caa0df8ed095
parent 35
3e8b5c9b4033
child 140
c03c338a7dcf
equal deleted inserted replaced
39:4e66271541e8 40:caa0df8ed095
29 #ifndef MODEL_H 29 #ifndef MODEL_H
30 #define MODEL_H 30 #define MODEL_H
31 31
32 #include "../ui/toolkit.h" 32 #include "../ui/toolkit.h"
33 #include "../common/context.h" 33 #include "../common/context.h"
34 #include "../ui/tree.h"
34 35
35 #ifdef __cplusplus 36 #ifdef __cplusplus
36 extern "C" { 37 extern "C" {
37 #endif 38 #endif
38 39
40 41
41 /* 42 /*
42 * UiList to GtkTreeModel wrapper 43 * UiList to GtkTreeModel wrapper
43 */ 44 */
44 struct UiListModel { 45 struct UiListModel {
45 GObject object; 46 GObject object;
46 UiListPtr *list; 47 UiModelInfo *info;
47 GType *columntypes; 48 UiListPtr *list;
48 void* (*getvalue)(void*, int); 49 GType *columntypes;
49 int numcolumns; 50 int numcolumns;
50 int stamp; 51 int stamp;
51 }; 52 };
52 53
53 /* 54 /*
54 * initialize the class and register the type 55 * initialize the class and register the type
55 */ 56 */
56 void ui_list_init(); 57 void ui_list_init();
57 58
58 /* 59 /*
59 * Creates a UiListModel for a given UiList 60 * Creates a UiListModel for a given UiList
60 */ 61 */
61 UiListModel* ui_list_model_new(UiListPtr *list, ui_model_getvalue_f getvalue); 62 UiListModel* ui_list_model_new(UiListPtr *list, UiModelInfo *info);
62 63
63 64
64 // interface functions 65 // interface functions
65 66
66 GtkTreeModelFlags ui_list_model_get_flags(GtkTreeModel *tree_model); 67 GtkTreeModelFlags ui_list_model_get_flags(GtkTreeModel *tree_model);

mercurial