summaryrefslogtreecommitdiff
path: root/gtk/gtklayoutmanager.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-03-28 16:58:00 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2019-03-28 16:58:00 +0000
commit3f0f7c73e091c2179b2175eb56aef62f16dd9b10 (patch)
tree483b00eff6aa1b6c4bef65edda1edf209190e31c /gtk/gtklayoutmanager.h
parent3d6a456c85a36de029bd0fbbeb9eba5f387d2c0c (diff)
downloadgtk+-3f0f7c73e091c2179b2175eb56aef62f16dd9b10.tar.gz
Connect LayoutManager to LayoutChild
If we want to inspect the type of layout properties exposed by a GtkLayoutManager, we need a way to connect the layout manager type to the GtkLayoutChild type it creates. In order to do so, we can set the GtkLayoutChild type on a field of the GtkLayoutManagerClass structure. Storing the GtkLayoutChild type on the class structure of the layout manager also allows us to implement a default create_layout_child() virtual function.
Diffstat (limited to 'gtk/gtklayoutmanager.h')
-rw-r--r--gtk/gtklayoutmanager.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtklayoutmanager.h b/gtk/gtklayoutmanager.h
index 53f4931c69..06659ee70e 100644
--- a/gtk/gtklayoutmanager.h
+++ b/gtk/gtklayoutmanager.h
@@ -39,6 +39,7 @@ G_DECLARE_DERIVABLE_TYPE (GtkLayoutManager, gtk_layout_manager, GTK, LAYOUT_MANA
* sizes of the widget using the layout manager for a given orientation
* @allocate: a virtual function, used to allocate the size of the widget
* using the layout manager
+ * @layout_child_type: the type of #GtkLayoutChild used by this layout manager
* @create_layout_child: a virtual function, used to create a #GtkLayoutChild
* meta object for the layout properties
*
@@ -70,6 +71,8 @@ struct _GtkLayoutManagerClass
int height,
int baseline);
+ GType layout_child_type;
+
GtkLayoutChild * (* create_layout_child) (GtkLayoutManager *manager,
GtkWidget *widget,
GtkWidget *for_child);