diff options
author | Benjamin Otte <otte@redhat.com> | 2019-06-09 22:50:46 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-30 19:26:45 -0400 |
commit | 10b967ae1f65ec269cde4b5c83b0dd777bf46301 (patch) | |
tree | a8243ebfd941f1ad1c2b897e0f149bc63b8855b8 /gtk/gtklistitemfactoryprivate.h | |
parent | 0174bf434573ee7b7e49505f72f26cdb4bd15f3d (diff) | |
download | gtk+-10b967ae1f65ec269cde4b5c83b0dd777bf46301.tar.gz |
listitemfactory: Sanitize APIs
Make sure the APIs follow a predictable path:
setup
bind
rebind/update (0-N times)
unbind
teardown
This is the first step towards providing multiple different factories.
Diffstat (limited to 'gtk/gtklistitemfactoryprivate.h')
-rw-r--r-- | gtk/gtklistitemfactoryprivate.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtklistitemfactoryprivate.h b/gtk/gtklistitemfactoryprivate.h index dc538f09fa..34582257bc 100644 --- a/gtk/gtklistitemfactoryprivate.h +++ b/gtk/gtklistitemfactoryprivate.h @@ -36,6 +36,21 @@ G_BEGIN_DECLS typedef struct _GtkListItemFactory GtkListItemFactory; typedef struct _GtkListItemFactoryClass GtkListItemFactoryClass; +struct _GtkListItemFactory +{ + GObject parent_instance; + + GtkListItemSetupFunc setup_func; + GtkListItemBindFunc bind_func; + gpointer user_data; + GDestroyNotify user_destroy; +}; + +struct _GtkListItemFactoryClass +{ + GObjectClass parent_class; +}; + GType gtk_list_item_factory_get_type (void) G_GNUC_CONST; GtkListItemFactory * gtk_list_item_factory_new (GtkListItemSetupFunc setup_func, @@ -45,12 +60,19 @@ GtkListItemFactory * gtk_list_item_factory_new (GtkListItemSetu void gtk_list_item_factory_setup (GtkListItemFactory *self, GtkListItem *list_item); +void gtk_list_item_factory_teardown (GtkListItemFactory *self, + GtkListItem *list_item); void gtk_list_item_factory_bind (GtkListItemFactory *self, GtkListItem *list_item, guint position, gpointer item, gboolean selected); +void gtk_list_item_factory_rebind (GtkListItemFactory *self, + GtkListItem *list_item, + guint position, + gpointer item, + gboolean selected); void gtk_list_item_factory_update (GtkListItemFactory *self, GtkListItem *list_item, guint position, |