summaryrefslogtreecommitdiff
path: root/gtk/gtktreemodel.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-01-27 00:50:38 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-01-27 00:50:38 +0000
commitd8d019a1e9deb525607a1077f7cb198fe88399cb (patch)
treeda8f4770dd78a543409c5e4b8dbe03ddd74b2ac1 /gtk/gtktreemodel.h
parentef4356b567e59d98e837ec41993e50d20dd65a46 (diff)
downloadgtk+-d8d019a1e9deb525607a1077f7cb198fe88399cb.tar.gz
add GtkTreeRowReference which holds a handle to a specific row (particular
2001-01-26 Havoc Pennington <hp@redhat.com> * gtk/gtktreemodel.c, gtk/gtktreemodel.h: add GtkTreeRowReference which holds a handle to a specific row (particular set of values in the model, i.e. pointer-identity row). * gtk/gtktreeview.c, gtk/gtktreeprivate.h, gtk/gtktreeselection.c: use GtkTreeRowReference for anchor, cursor, and drag_dest_row. Still need to use it for the src/dest row saved on the drag context.
Diffstat (limited to 'gtk/gtktreemodel.h')
-rw-r--r--gtk/gtktreemodel.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h
index b15b92b673..202d874bcf 100644
--- a/gtk/gtktreemodel.h
+++ b/gtk/gtktreemodel.h
@@ -32,10 +32,11 @@ extern "C" {
#define GTK_TREE_MODEL_GET_IFACE(obj) ((GtkTreeModelIface *)g_type_interface_peek (((GTypeInstance *)GTK_TREE_MODEL (obj))->g_class, GTK_TYPE_TREE_MODEL))
-typedef struct _GtkTreeIter GtkTreeIter;
-typedef struct _GtkTreePath GtkTreePath;
-typedef struct _GtkTreeModel GtkTreeModel; /* Dummy typedef */
-typedef struct _GtkTreeModelIface GtkTreeModelIface;
+typedef struct _GtkTreeIter GtkTreeIter;
+typedef struct _GtkTreePath GtkTreePath;
+typedef struct _GtkTreeRowReference GtkTreeRowReference;
+typedef struct _GtkTreeModel GtkTreeModel; /* Dummy typedef */
+typedef struct _GtkTreeModelIface GtkTreeModelIface;
typedef enum
@@ -133,6 +134,16 @@ gboolean gtk_tree_path_prev (GtkTreePath *path);
gboolean gtk_tree_path_up (GtkTreePath *path);
void gtk_tree_path_down (GtkTreePath *path);
+/* Row reference (an object that tracks model changes so it refers to the
+ * same row always; a path refers to a position, not a fixed row)
+ */
+
+GtkTreeRowReference *gtk_tree_row_reference_new (GtkTreeModel *model,
+ GtkTreePath *path);
+/* returns NULL if the row was deleted or the model was destroyed. */
+GtkTreePath *gtk_tree_row_reference_get_path (GtkTreeRowReference *reference);
+void gtk_tree_row_reference_free (GtkTreeRowReference *reference);
+
/* GtkTreeIter operations */
GtkTreeIter *gtk_tree_iter_copy (GtkTreeIter *iter);