ui/gtk/model.h

changeset 147
2e384acc89a6
parent 146
dd0ae1c62a72
child 152
62921b370c60
equal deleted inserted replaced
146:dd0ae1c62a72 147:2e384acc89a6
41 41
42 /* 42 /*
43 * UiList to GtkTreeModel wrapper 43 * UiList to GtkTreeModel wrapper
44 */ 44 */
45 struct UiListModel { 45 struct UiListModel {
46 GObject object; 46 GObject object;
47 UiModel *info; 47 UiObject *obj;
48 UiVar *var; 48 UiModel *model;
49 GType *columntypes; 49 UiVar *var;
50 int numcolumns; 50 GType *columntypes;
51 int stamp; 51 int numcolumns;
52 int stamp;
52 }; 53 };
53 54
54 /* 55 /*
55 * initialize the class and register the type 56 * initialize the class and register the type
56 */ 57 */
57 void ui_list_init(); 58 void ui_list_init();
58 59
59 /* 60 /*
60 * Creates a UiListModel for a given UiList 61 * Creates a UiListModel for a given UiList
61 */ 62 */
62 UiListModel* ui_list_model_new(UiVar *var, UiModel *info); 63 UiListModel* ui_list_model_new(UiObject *obj, UiVar *var, UiModel *info);
63 64
64 65
65 // interface functions 66 // interface functions
66 67
67 GtkTreeModelFlags ui_list_model_get_flags(GtkTreeModel *tree_model); 68 GtkTreeModelFlags ui_list_model_get_flags(GtkTreeModel *tree_model);
111 gboolean ui_list_model_iter_parent( 112 gboolean ui_list_model_iter_parent(
112 GtkTreeModel *tree_model, 113 GtkTreeModel *tree_model,
113 GtkTreeIter *iter, 114 GtkTreeIter *iter,
114 GtkTreeIter *child); 115 GtkTreeIter *child);
115 116
117 /* dnd */
118
119 gboolean ui_list_model_drag_data_received(
120 GtkTreeDragDest *drag_dest,
121 GtkTreePath *dest,
122 GtkSelectionData *selection_data);
123
124 gboolean ui_list_model_row_drop_possible(
125 GtkTreeDragDest *drag_dest,
126 GtkTreePath *dest_path,
127 GtkSelectionData *selection_data);
128
129 gboolean ui_list_model_row_draggable(
130 GtkTreeDragSource *drag_source,
131 GtkTreePath *path);
132
133 gboolean ui_list_model_drag_data_get(
134 GtkTreeDragSource *drag_source,
135 GtkTreePath *path,
136 GtkSelectionData *selection_data);
137
138 gboolean ui_list_model_drag_data_delete(
139 GtkTreeDragSource *drag_source,
140 GtkTreePath *path);
141
116 #ifdef __cplusplus 142 #ifdef __cplusplus
117 } 143 }
118 #endif 144 #endif
119 145
120 #endif /* MODEL_H */ 146 #endif /* MODEL_H */

mercurial