diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-12-19 16:01:17 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-03-26 00:11:27 +0000 |
commit | 5cbf6f5fbdf8146a62fa611b2279f587e34ee1f0 (patch) | |
tree | 12eb9ce0997e62210b71a423fc001b2d1d54c1da /gtk/gtklayoutchild.h | |
parent | 15fda18791ae6df027620a2a8a42899f632337a8 (diff) | |
download | gtk+-5cbf6f5fbdf8146a62fa611b2279f587e34ee1f0.tar.gz |
Add GtkLayoutChild
Layout managers needs a way to store properties that control the layout
policy of a widget; typically, we used to store these in GtkContainer's
child properties, but since GtkLayoutManager is decoupled from the
actual container widget, we need a separate storage. Additionally, child
properties have their own downsides, like requiring a separate, global
GParamSpecPool storage, and additional lookup API.
GtkLayoutChild is a simple GObject class, which means you can introspect
and document it as you would any other type.
Diffstat (limited to 'gtk/gtklayoutchild.h')
-rw-r--r-- | gtk/gtklayoutchild.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk/gtklayoutchild.h b/gtk/gtklayoutchild.h new file mode 100644 index 0000000000..3be8fdaf6a --- /dev/null +++ b/gtk/gtklayoutchild.h @@ -0,0 +1,27 @@ +#pragma once + +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only <gtk/gtk.h> can be included directly." +#endif + +#include <gtk/gtktypes.h> + +G_BEGIN_DECLS + +#define GTK_TYPE_LAYOUT_CHILD (gtk_layout_child_get_type()) + +GDK_AVAILABLE_IN_ALL +G_DECLARE_DERIVABLE_TYPE (GtkLayoutChild, gtk_layout_child, GTK, LAYOUT_CHILD, GObject) + +struct _GtkLayoutChildClass +{ + /*< private >*/ + GObjectClass parent_class; +}; + +GDK_AVAILABLE_IN_ALL +GtkLayoutManager * gtk_layout_child_get_layout_manager (GtkLayoutChild *layout_child); +GDK_AVAILABLE_IN_ALL +GtkWidget * gtk_layout_child_get_child_widget (GtkLayoutChild *layout_child); + +G_END_DECLS |