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.
This commit is contained in:
committed by
Havoc Pennington
parent
ef4356b567
commit
d8d019a1e9
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user