diff -r dd0ae1c62a72 -r 2e384acc89a6 ui/gtk/model.h --- a/ui/gtk/model.h Thu Nov 16 12:04:10 2017 +0100 +++ b/ui/gtk/model.h Sun Nov 19 09:00:16 2017 +0100 @@ -43,12 +43,13 @@ * UiList to GtkTreeModel wrapper */ struct UiListModel { - GObject object; - UiModel *info; - UiVar *var; - GType *columntypes; - int numcolumns; - int stamp; + GObject object; + UiObject *obj; + UiModel *model; + UiVar *var; + GType *columntypes; + int numcolumns; + int stamp; }; /* @@ -59,7 +60,7 @@ /* * Creates a UiListModel for a given UiList */ -UiListModel* ui_list_model_new(UiVar *var, UiModel *info); +UiListModel* ui_list_model_new(UiObject *obj, UiVar *var, UiModel *info); // interface functions @@ -113,6 +114,31 @@ GtkTreeIter *iter, GtkTreeIter *child); +/* dnd */ + +gboolean ui_list_model_drag_data_received( + GtkTreeDragDest *drag_dest, + GtkTreePath *dest, + GtkSelectionData *selection_data); + +gboolean ui_list_model_row_drop_possible( + GtkTreeDragDest *drag_dest, + GtkTreePath *dest_path, + GtkSelectionData *selection_data); + +gboolean ui_list_model_row_draggable( + GtkTreeDragSource *drag_source, + GtkTreePath *path); + +gboolean ui_list_model_drag_data_get( + GtkTreeDragSource *drag_source, + GtkTreePath *path, + GtkSelectionData *selection_data); + +gboolean ui_list_model_drag_data_delete( + GtkTreeDragSource *drag_source, + GtkTreePath *path); + #ifdef __cplusplus } #endif