summaryrefslogtreecommitdiff
path: root/gtk/gtklistitemfactoryprivate.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2022-06-28 16:34:24 +0200
committerBenjamin Otte <otte@redhat.com>2022-06-28 16:37:38 +0200
commit57f2b5d2e68935ab3e27198351ce3e136c754451 (patch)
tree4316f52036e4eb8c205c706ec0f343aa0a4c7afa /gtk/gtklistitemfactoryprivate.h
parentc00b234440abf36e18e0430f66305a3e9434e99d (diff)
downloadgtk+-57f2b5d2e68935ab3e27198351ce3e136c754451.tar.gz
listitemfactory: Make this callback-based
This way, we no longer prescribe the use of either GtkListItem or GtkListItemWidget. This means we can use it in other places, such as for custom section header objects or with my Canvas ideas.
Diffstat (limited to 'gtk/gtklistitemfactoryprivate.h')
-rw-r--r--gtk/gtklistitemfactoryprivate.h41
1 files changed, 26 insertions, 15 deletions
diff --git a/gtk/gtklistitemfactoryprivate.h b/gtk/gtklistitemfactoryprivate.h
index 3ee5e5f088..a860987231 100644
--- a/gtk/gtklistitemfactoryprivate.h
+++ b/gtk/gtklistitemfactoryprivate.h
@@ -37,33 +37,44 @@ struct _GtkListItemFactoryClass
/* setup @list_item so it can be bound */
void (* setup) (GtkListItemFactory *self,
- GtkListItemWidget *widget,
- GtkListItem *list_item);
+ GObject *item,
+ gboolean bind,
+ GFunc func,
+ gpointer data);
/* undo the effects of GtkListItemFactoryClass::setup() */
void (* teardown) (GtkListItemFactory *self,
- GtkListItemWidget *widget,
- GtkListItem *list_item);
+ GObject *item,
+ gboolean unbind,
+ GFunc func,
+ gpointer data);
/* Update properties on @list_item to the given @item, which is in @position and @selected state.
* One or more of those properties might be unchanged. */
void (* update) (GtkListItemFactory *self,
- GtkListItemWidget *widget,
- GtkListItem *list_item,
- guint position,
- gpointer item,
- gboolean selected);
+ GObject *item,
+ gboolean unbind,
+ gboolean bind,
+ GFunc func,
+ gpointer data);
};
void gtk_list_item_factory_setup (GtkListItemFactory *self,
- GtkListItemWidget *widget);
+ GObject *item,
+ gboolean bind,
+ GFunc func,
+ gpointer data);
void gtk_list_item_factory_teardown (GtkListItemFactory *self,
- GtkListItemWidget *widget);
+ GObject *item,
+ gboolean unbind,
+ GFunc func,
+ gpointer data);
void gtk_list_item_factory_update (GtkListItemFactory *self,
- GtkListItemWidget *widget,
- guint position,
- gpointer item,
- gboolean selected);
+ GObject *item,
+ gboolean unbind,
+ gboolean bind,
+ GFunc func,
+ gpointer data);
G_END_DECLS