summaryrefslogtreecommitdiff
path: root/gtk/gtklistitemmanagerprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-02-27 08:45:28 +0100
committerMatthias Clasen <mclasen@redhat.com>2020-05-30 19:26:45 -0400
commit1acfae8df285e516eb8245fb999b2481714bc448 (patch)
treec680f2d5ee9f55000239fb7bf82049cea9db4f4a /gtk/gtklistitemmanagerprivate.h
parentce489f21fb959ba65a1019c32d42de4594d12425 (diff)
downloadgtk+-1acfae8df285e516eb8245fb999b2481714bc448.tar.gz
listitemmanager: Add trackers
... and replace the anchor tracking with a tracker. Trackers track an item through the list across changes and ensure that this item (and potentially siblings before/after it) are always backed by a GtkListItem and that if the item gets removed a replacement gets chosen. This is now used for tracking the anchor but can also be used to add trackers for the cursor later.
Diffstat (limited to 'gtk/gtklistitemmanagerprivate.h')
-rw-r--r--gtk/gtklistitemmanagerprivate.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtklistitemmanagerprivate.h b/gtk/gtklistitemmanagerprivate.h
index 9a506c7573..c83fc7d92f 100644
--- a/gtk/gtklistitemmanagerprivate.h
+++ b/gtk/gtklistitemmanagerprivate.h
@@ -40,6 +40,7 @@ typedef struct _GtkListItemManager GtkListItemManager;
typedef struct _GtkListItemManagerClass GtkListItemManagerClass;
typedef struct _GtkListItemManagerItem GtkListItemManagerItem; /* sorry */
typedef struct _GtkListItemManagerItemAugment GtkListItemManagerItemAugment;
+typedef struct _GtkListItemTracker GtkListItemTracker;
struct _GtkListItemManagerItem
{
@@ -86,13 +87,16 @@ GtkSelectionModel * gtk_list_item_manager_get_model (GtkListItemMana
guint gtk_list_item_manager_get_size (GtkListItemManager *self);
-void gtk_list_item_manager_set_anchor (GtkListItemManager *self,
+GtkListItemTracker * gtk_list_item_tracker_new (GtkListItemManager *self);
+void gtk_list_item_tracker_free (GtkListItemManager *self,
+ GtkListItemTracker *tracker);
+void gtk_list_item_tracker_set_position (GtkListItemManager *self,
+ GtkListItemTracker *tracker,
guint position,
- double align,
- GHashTable *change,
- guint update_start);
-guint gtk_list_item_manager_get_anchor (GtkListItemManager *self,
- double *align);
+ guint n_before,
+ guint n_after);
+guint gtk_list_item_tracker_get_position (GtkListItemManager *self,
+ GtkListItemTracker *tracker);
G_END_DECLS