diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-08-16 18:05:33 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-08-16 18:20:50 -0400 |
commit | a7771867854c2d7ca54cd3266b9c665b4508c642 (patch) | |
tree | 1d938b6643425d390bf79070a641bc78d39a0276 /gtk/gtkflowbox.h | |
parent | 408358c9d99715e3f764575e3b026d1c111b6141 (diff) | |
download | gtk+-a7771867854c2d7ca54cd3266b9c665b4508c642.tar.gz |
Add gtk_flow_box_bind_model
Diffstat (limited to 'gtk/gtkflowbox.h')
-rw-r--r-- | gtk/gtkflowbox.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtkflowbox.h b/gtk/gtkflowbox.h index f0f1790488..2384ff5bea 100644 --- a/gtk/gtkflowbox.h +++ b/gtk/gtkflowbox.h @@ -99,6 +99,20 @@ struct _GtkFlowBoxChildClass void (*_gtk_reserved2) (void); }; +/** + * GtkFlowBoxCreateWidgetFunc: + * @item: the item from the model for which to create a widget for + * + * Called for flow boxes that are bound to a #GListModel with + * gtk_flow_box_bind_model() for each item that gets added to the model. + * + * Returns: a #GtkWidget that represents @item + * + * Since: 3.18 + */ +typedef GtkWidget * (*GtkFlowBoxCreateWidgetFunc) (gpointer item, + gpointer user_data); + GDK_AVAILABLE_IN_3_12 GType gtk_flow_box_child_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_3_12 @@ -116,6 +130,14 @@ GType gtk_flow_box_get_type (void) G_GNUC_CONST GDK_AVAILABLE_IN_3_12 GtkWidget *gtk_flow_box_new (void); + +GDK_AVAILABLE_IN_3_18 +void gtk_flow_box_bind_model (GtkFlowBox *box, + GListModel *model, + GtkFlowBoxCreateWidgetFunc create_widget_func, + gpointer user_data, + GDestroyNotify user_data_free_func); + GDK_AVAILABLE_IN_3_12 void gtk_flow_box_set_homogeneous (GtkFlowBox *box, gboolean homogeneous); |