diff options
author | Michael Natterer <mitch@imendio.com> | 2008-11-11 17:47:13 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2008-11-11 17:47:13 +0000 |
commit | 0498dca831099c1fac3c0d0a38b0bb08c4bd96de (patch) | |
tree | 684058a5c5624ce509bff9b297d9bd1e6f17206b /gtk/gtkscale.h | |
parent | 4d8f9d2ef380f9158e0611df6f791042d0ebae76 (diff) | |
download | gtk+-0498dca831099c1fac3c0d0a38b0bb08c4bd96de.tar.gz |
Bug 553765 – Add orientation API to GtkRange
2008-11-11 Michael Natterer <mitch@imendio.com>
Bug 553765 – Add orientation API to GtkRange
* gtk/gtkrange.[ch]: implement the GtkOrientable interface. Add
evil code that makes sure that the stepper_detail and slider_detail
set in GtkRangeClass continue to work with the hacked subclasses
below.
* gtk/gtkscale.[ch]: swallow all code from GtkHScale and GtkVScale
and add gtk_scale_new() and gtk_scale_new_with_range() which take
a GtkOrientation argument. Set slider_detail to "Xscale" so above
evil code works.
* gtk/gtkscrollbar.[ch]: add gtk_scrollbar_new() which takes a
GtkOrientation argument. Set stepper_detail to "Xscrollbar" so
above evil code works.
* gtk/gtkhscale.c
* gtk/gtkvscale.c
* gtk/gtkhscrollbar.c
* gtk/gtkvscrollbar.c: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: changed accordingly.
svn path=/trunk/; revision=21779
Diffstat (limited to 'gtk/gtkscale.h')
-rw-r--r-- | gtk/gtkscale.h | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h index 3a86ee1ac6..b8587d2821 100644 --- a/gtk/gtkscale.h +++ b/gtk/gtkscale.h @@ -69,36 +69,43 @@ struct _GtkScaleClass void (* get_layout_offsets) (GtkScale *scale, gint *x, gint *y); + /* Padding for future expansion */ void (*_gtk_reserved2) (void); void (*_gtk_reserved3) (void); void (*_gtk_reserved4) (void); }; -GType gtk_scale_get_type (void) G_GNUC_CONST; - -void gtk_scale_set_digits (GtkScale *scale, - gint digits); -gint gtk_scale_get_digits (GtkScale *scale); -void gtk_scale_set_draw_value (GtkScale *scale, - gboolean draw_value); -gboolean gtk_scale_get_draw_value (GtkScale *scale); -void gtk_scale_set_value_pos (GtkScale *scale, - GtkPositionType pos); -GtkPositionType gtk_scale_get_value_pos (GtkScale *scale); - -PangoLayout *gtk_scale_get_layout (GtkScale *scale); -void gtk_scale_get_layout_offsets (GtkScale *scale, - gint *x, - gint *y); -void _gtk_scale_clear_layout (GtkScale *scale); - -void _gtk_scale_get_value_size (GtkScale *scale, - gint *width, - gint *height); -gchar *_gtk_scale_format_value (GtkScale *scale, - gdouble value); - +GType gtk_scale_get_type (void) G_GNUC_CONST; +GtkWidget * gtk_scale_new (GtkOrientation orientation, + GtkAdjustment *adjustment); +GtkWidget * gtk_scale_new_with_range (GtkOrientation orientation, + gdouble min, + gdouble max, + gdouble step); + +void gtk_scale_set_digits (GtkScale *scale, + gint digits); +gint gtk_scale_get_digits (GtkScale *scale); +void gtk_scale_set_draw_value (GtkScale *scale, + gboolean draw_value); +gboolean gtk_scale_get_draw_value (GtkScale *scale); +void gtk_scale_set_value_pos (GtkScale *scale, + GtkPositionType pos); +GtkPositionType gtk_scale_get_value_pos (GtkScale *scale); + +PangoLayout * gtk_scale_get_layout (GtkScale *scale); +void gtk_scale_get_layout_offsets (GtkScale *scale, + gint *x, + gint *y); + +/* internal API */ +void _gtk_scale_clear_layout (GtkScale *scale); +void _gtk_scale_get_value_size (GtkScale *scale, + gint *width, + gint *height); +gchar * _gtk_scale_format_value (GtkScale *scale, + gdouble value); G_END_DECLS |