summaryrefslogtreecommitdiff
path: root/gtk/gtktreednd.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-11-06 19:10:03 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-11-06 19:10:03 +0000
commit57479a86be71dfac361633838c8129267a278233 (patch)
treebea7db92dfed63a68122f5ad4a390b21bb68d3ad /gtk/gtktreednd.h
parent9bb17278c47fe892962494ab6e942c7a103c598f (diff)
downloadgdk-pixbuf-57479a86be71dfac361633838c8129267a278233.tar.gz
Add row_draggable() vfunc, and wrapper function.
Mon Nov 5 22:34:29 2001 Owen Taylor <otaylor@redhat.com> * 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()
Diffstat (limited to 'gtk/gtktreednd.h')
-rw-r--r--gtk/gtktreednd.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/gtk/gtktreednd.h b/gtk/gtktreednd.h
index fe1373ebf..74a796755 100644
--- a/gtk/gtktreednd.h
+++ b/gtk/gtktreednd.h
@@ -41,6 +41,9 @@ struct _GtkTreeDragSourceIface
/* VTable - not signals */
+ gboolean (* row_draggable) (GtkTreeDragSource *drag_source,
+ GtkTreePath *path);
+
gboolean (* drag_data_get) (GtkTreeDragSource *drag_source,
GtkTreePath *path,
GtkSelectionData *selection_data);
@@ -51,6 +54,10 @@ struct _GtkTreeDragSourceIface
GType gtk_tree_drag_source_get_type (void) G_GNUC_CONST;
+/* Returns whether the given row can be dragged */
+gboolean gtk_tree_drag_source_row_draggable (GtkTreeDragSource *drag_source,
+ GtkTreePath *path);
+
/* Deletes the given row, or returns FALSE if it can't */
gboolean gtk_tree_drag_source_drag_data_delete (GtkTreeDragSource *drag_source,
GtkTreePath *path);
@@ -81,9 +88,8 @@ struct _GtkTreeDragDestIface
GtkSelectionData *selection_data);
gboolean (* row_drop_possible) (GtkTreeDragDest *drag_dest,
- GtkTreeModel *src_model,
- GtkTreePath *src_path,
- GtkTreePath *dest_path);
+ GtkTreePath *dest_path,
+ GtkSelectionData *selection_data);
};
GType gtk_tree_drag_dest_get_type (void) G_GNUC_CONST;
@@ -98,9 +104,8 @@ gboolean gtk_tree_drag_dest_drag_data_received (GtkTreeDragDest *drag_dest,
/* Returns TRUE if we can drop before path; path may not exist. */
gboolean gtk_tree_drag_dest_row_drop_possible (GtkTreeDragDest *drag_dest,
- GtkTreeModel *src_model,
- GtkTreePath *src_path,
- GtkTreePath *dest_path);
+ GtkTreePath *dest_path,
+ GtkSelectionData *selection_data);
/* The selection data would normally have target type GTK_TREE_MODEL_ROW in this