From 57479a86be71dfac361633838c8129267a278233 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 6 Nov 2001 19:10:03 +0000 Subject: Add row_draggable() vfunc, and wrapper function. Mon Nov 5 22:34:29 2001 Owen Taylor * gtk/gtktreednd.[ch] (struct _GtkTreeDragSourceIface): Add row_draggable() vfunc, and wrapper function. * gtk/gtktreednd.[ch] (struct _GtkTreeDragDestIface): Make row_drop_possible take a GtkSelectionData, rather than model/row pair. * gtk/gtktreestore.c gtk/gtkliststore.c: Update for new DND interfaces. * gtk/gtktreeview.[ch]: Remove the row_draggable_func location_dropable_func from gtk_tree_view_set_rows_drag_source/dest. and rename them to enable_model_drag_source/dest. * gtk/treeviewcolumn.c: Add DND of columns between rows. Still can't drop _to_ the left tree, but other places work. * gtk/gtktreeview.c (unset_reorderable): Unset the reorderable property if unset/enable_model_drag_source/dest are called manually. * gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): Correct for change in depth count handling. * gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon): Pass in a expose area to gtk_tree_view_column_cell_render() --- gtk/gtktreeview.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'gtk/gtktreeview.h') diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index 8fbd7efd7..d6c56bd94 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -108,18 +108,9 @@ typedef gboolean (* GtkTreeViewColumnDropFunc) (GtkTreeView *tree_vi GtkTreeViewColumn *prev_column, GtkTreeViewColumn *next_column, gpointer data); -typedef gboolean (* GtkTreeViewDraggableFunc) (GtkTreeView *tree_view, - GdkDragContext *context, - GtkTreePath *path, - gpointer user_data); typedef void (* GtkTreeViewMappingFunc) (GtkTreeView *tree_view, GtkTreePath *path, gpointer user_data); -typedef gboolean (* GtkTreeViewDroppableFunc) (GtkTreeView *tree_view, - GdkDragContext *context, - GtkTreePath *path, - GtkTreeViewDropPosition *pos, - gpointer user_data); typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model, gint column, const gchar *key, @@ -255,19 +246,15 @@ void gtk_tree_view_tree_to_widget_coords (GtkTreeView gint *wy); /* Drag-and-Drop support */ -void gtk_tree_view_set_rows_drag_source (GtkTreeView *tree_view, +void gtk_tree_view_enable_model_drag_source (GtkTreeView *tree_view, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, - GdkDragAction actions, - GtkTreeViewDraggableFunc row_draggable_func, - gpointer user_data); -void gtk_tree_view_set_rows_drag_dest (GtkTreeView *tree_view, + GdkDragAction actions); +void gtk_tree_view_enable_model_drag_dest (GtkTreeView *tree_view, const GtkTargetEntry *targets, gint n_targets, - GdkDragAction actions, - GtkTreeViewDroppableFunc location_droppable_func, - gpointer user_data); + GdkDragAction actions); void gtk_tree_view_unset_rows_drag_source (GtkTreeView *tree_view); void gtk_tree_view_unset_rows_drag_dest (GtkTreeView *tree_view); -- cgit v1.2.1