diff options
author | Michael Natterer <mitch@imendio.com> | 2008-10-07 07:44:06 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2008-10-07 07:44:06 +0000 |
commit | 97a9867c9f3f8a20bfef37fc6c9f3af114b4d4c1 (patch) | |
tree | 2922ac39397e82c422c567e405956f3a949ab600 /gtk/gtkbox.h | |
parent | 8a227df95fd80491e659b5054c4d7faf53d432ac (diff) | |
download | gtk+-97a9867c9f3f8a20bfef37fc6c9f3af114b4d4c1.tar.gz |
Bug 553573 – Add orientation API to GtkBox
2008-10-07 Michael Natterer <mitch@imendio.com>
Bug 553573 – Add orientation API to GtkBox
* gtk/gtkbox.[hh]: implement the GtkOrientable interface and
swallow all code from GtkHBox and GtkVBox. Add gtk_box_new()
which takes a GtkOrientation argument. Also move the newly
added "spacing_set" boolean from struct GtkBox to the new
private struct.
* gtk/gtkhbox.[ch]
* gtk/gtkvbox.[ch]: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: add gtk_box_new().
svn path=/trunk/; revision=21596
Diffstat (limited to 'gtk/gtkbox.h')
-rw-r--r-- | gtk/gtkbox.h | 90 |
1 files changed, 49 insertions, 41 deletions
diff --git a/gtk/gtkbox.h b/gtk/gtkbox.h index 71b51e6194..e9182a1160 100644 --- a/gtk/gtkbox.h +++ b/gtk/gtkbox.h @@ -59,7 +59,6 @@ struct _GtkBox GList *GSEAL (children); gint16 GSEAL (spacing); guint GSEAL (homogeneous) : 1; - guint GSEAL (spacing_set) : 1; }; struct _GtkBoxClass @@ -78,50 +77,59 @@ struct _GtkBoxChild }; -GType gtk_box_get_type (void) G_GNUC_CONST; -void gtk_box_pack_start (GtkBox *box, - GtkWidget *child, - gboolean expand, - gboolean fill, - guint padding); -void gtk_box_pack_end (GtkBox *box, - GtkWidget *child, - gboolean expand, - gboolean fill, - guint padding); +GType gtk_box_get_type (void) G_GNUC_CONST; +GtkWidget * gtk_box_new (GtkOrientation orientation, + gboolean homogeneous, + gint spacing); + +void gtk_box_pack_start (GtkBox *box, + GtkWidget *child, + gboolean expand, + gboolean fill, + guint padding); +void gtk_box_pack_end (GtkBox *box, + GtkWidget *child, + gboolean expand, + gboolean fill, + guint padding); + #ifndef GTK_DISABLE_DEPRECATED -void gtk_box_pack_start_defaults (GtkBox *box, - GtkWidget *widget); -void gtk_box_pack_end_defaults (GtkBox *box, - GtkWidget *widget); +void gtk_box_pack_start_defaults (GtkBox *box, + GtkWidget *widget); +void gtk_box_pack_end_defaults (GtkBox *box, + GtkWidget *widget); #endif -void gtk_box_set_homogeneous (GtkBox *box, - gboolean homogeneous); -gboolean gtk_box_get_homogeneous (GtkBox *box); -void gtk_box_set_spacing (GtkBox *box, - gint spacing); -gint gtk_box_get_spacing (GtkBox *box); -void gtk_box_reorder_child (GtkBox *box, - GtkWidget *child, - gint position); -void gtk_box_query_child_packing (GtkBox *box, - GtkWidget *child, - gboolean *expand, - gboolean *fill, - guint *padding, - GtkPackType *pack_type); -void gtk_box_set_child_packing (GtkBox *box, - GtkWidget *child, - gboolean expand, - gboolean fill, - guint padding, - GtkPackType pack_type); -gboolean _gtk_box_get_spacing_set (GtkBox* box); -void _gtk_box_set_spacing_set (GtkBox *box, - gboolean spacing_set); +void gtk_box_set_homogeneous (GtkBox *box, + gboolean homogeneous); +gboolean gtk_box_get_homogeneous (GtkBox *box); +void gtk_box_set_spacing (GtkBox *box, + gint spacing); +gint gtk_box_get_spacing (GtkBox *box); + +void gtk_box_reorder_child (GtkBox *box, + GtkWidget *child, + gint position); + +void gtk_box_query_child_packing (GtkBox *box, + GtkWidget *child, + gboolean *expand, + gboolean *fill, + guint *padding, + GtkPackType *pack_type); +void gtk_box_set_child_packing (GtkBox *box, + GtkWidget *child, + gboolean expand, + gboolean fill, + guint padding, + GtkPackType pack_type); + +/* internal API */ +void _gtk_box_set_default_expand (GtkBox *box); +gboolean _gtk_box_get_spacing_set (GtkBox *box); +void _gtk_box_set_spacing_set (GtkBox *box, + gboolean spacing_set); G_END_DECLS - #endif /* __GTK_BOX_H__ */ |