From 89da90a6cd5f17a1f065fa734fe5fdfebb712c16 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 4 Jul 2008 09:02:20 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20539944=20=E2=80=93=20Add=20GtkScaleButton?= =?UTF-8?q?=20API=20so=20struct=20fields=20can=20be=20marked=20as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-07-04 Michael Natterer Bug 539944 – Add GtkScaleButton API so struct fields can be marked as private * gtk/gtk.symbols * gtk/gtkscalebutton.[ch]: add gtk_scale_button_get_plus_button() and _get_minus_button(). Patch by Christian Dywan. svn path=/trunk/; revision=20757 --- ChangeLog | 9 +++++++++ gtk/gtk.symbols | 2 ++ gtk/gtkscalebutton.c | 34 +++++++++++++++++++++++++++++++++- gtk/gtkscalebutton.h | 38 ++++++++++++++++++++------------------ 4 files changed, 64 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3de7e104ba..1a6c32f673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-07-04 Michael Natterer + + Bug 539944 – Add GtkScaleButton API so struct fields can be marked + as private + + * gtk/gtk.symbols + * gtk/gtkscalebutton.[ch]: add gtk_scale_button_get_plus_button() + and _get_minus_button(). Patch by Christian Dywan. + 2008-07-04 Matthias Clasen * gtk/gtkscalebutton.c: diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index 60ee9720de..1162e7e91a 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -3311,6 +3311,8 @@ gtk_scale_button_get_adjustment gtk_scale_button_set_adjustment gtk_scale_button_get_orientation gtk_scale_button_set_orientation +gtk_scale_button_get_plus_button +gtk_scale_button_get_minus_button gtk_scale_button_get_popup #endif #endif diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index 1b930ccda3..5a8432ebb3 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -758,6 +758,38 @@ gtk_scale_button_set_orientation (GtkScaleButton *button, } } +/** + * gtk_scale_button_get_plus_button: + * @button: a #GtkScaleButton + * + * Retrieves the plus button of the #GtkScaleButton. + * + * Since: 2.14 + */ +GtkWidget * +gtk_scale_button_get_plus_button (GtkScaleButton *button) +{ + g_return_val_if_fail (GTK_IS_SCALE_BUTTON (button), NULL); + + return button->plus_button; +} + +/** + * gtk_scale_button_get_minus_button: + * @button: a #GtkScaleButton + * + * Retrieves the minus button of the #GtkScaleButton. + * + * Since: 2.14 + */ +GtkWidget * +gtk_scale_button_get_minus_button (GtkScaleButton *button) +{ + g_return_val_if_fail (GTK_IS_SCALE_BUTTON (button), NULL); + + return button->minus_button; +} + /** * gtk_scale_button_get_popup: * @button: a #GtkScaleButton @@ -766,7 +798,7 @@ gtk_scale_button_set_orientation (GtkScaleButton *button, * * Since: 2.14 */ -GtkWidget* +GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button) { g_return_val_if_fail (GTK_IS_SCALE_BUTTON (button), NULL); diff --git a/gtk/gtkscalebutton.h b/gtk/gtkscalebutton.h index 6ba51b229a..ec6baf0402 100644 --- a/gtk/gtkscalebutton.h +++ b/gtk/gtkscalebutton.h @@ -81,24 +81,26 @@ struct _GtkScaleButtonClass void (*_gtk_reserved4) (void); }; -GType gtk_scale_button_get_type (void) G_GNUC_CONST; -GtkWidget * gtk_scale_button_new (GtkIconSize size, - gdouble min, - gdouble max, - gdouble step, - const gchar **icons); -void gtk_scale_button_set_icons (GtkScaleButton *button, - const gchar **icons); -gdouble gtk_scale_button_get_value (GtkScaleButton *button); -void gtk_scale_button_set_value (GtkScaleButton *button, - gdouble value); -GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button); -void gtk_scale_button_set_adjustment (GtkScaleButton *button, - GtkAdjustment *adjustment); -GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button); -void gtk_scale_button_set_orientation (GtkScaleButton *button, - GtkOrientation orientation); -GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button); +GType gtk_scale_button_get_type (void) G_GNUC_CONST; +GtkWidget * gtk_scale_button_new (GtkIconSize size, + gdouble min, + gdouble max, + gdouble step, + const gchar **icons); +void gtk_scale_button_set_icons (GtkScaleButton *button, + const gchar **icons); +gdouble gtk_scale_button_get_value (GtkScaleButton *button); +void gtk_scale_button_set_value (GtkScaleButton *button, + gdouble value); +GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button); +void gtk_scale_button_set_adjustment (GtkScaleButton *button, + GtkAdjustment *adjustment); +GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button); +void gtk_scale_button_set_orientation (GtkScaleButton *button, + GtkOrientation orientation); +GtkWidget * gtk_scale_button_get_plus_button (GtkScaleButton *button); +GtkWidget * gtk_scale_button_get_minus_button (GtkScaleButton *button); +GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button); G_END_DECLS