diff options
author | Michael Natterer <mitch@gimp.org> | 2009-08-27 21:12:32 +0200 |
---|---|---|
committer | Michael Natterer <mitch@gimp.org> | 2009-08-27 21:14:21 +0200 |
commit | 591b37d7ced7eb857afd75e570318fb0a51e07e1 (patch) | |
tree | e3b91704d845cf98c5dd9d26cb9321a67b492bc6 /gtk/gtkrange.c | |
parent | d30c31d6e1f9391dbe320db0e5ebc110801d03a2 (diff) | |
download | gtk+-591b37d7ced7eb857afd75e570318fb0a51e07e1.tar.gz |
Add accessors for sealed member "flippable"
One step closer to makes GtkRange properly subclassable, but still
quite some accessors missing.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index ce4e5e4282..17c0d6f43a 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -844,6 +844,52 @@ gtk_range_get_inverted (GtkRange *range) } /** + * gtk_range_set_flippable: + * @range: a #GtkRange + * @flippable: %TRUE to make the range flippable + * + * If a range is flippable, it will switch its direction if it is + * horizontal and its direction is %GTK_TEXT_DIR_RTL. + * + * See gtk_widget_get_direction(). + * + * Since: 2.18 + **/ +void +gtk_range_set_flippable (GtkRange *range, + gboolean flippable) +{ + g_return_if_fail (GTK_IS_RANGE (range)); + + flippable = flippable ? TRUE : FALSE; + + if (flippable != range->flippable) + { + range->flippable = flippable; + + gtk_widget_queue_draw (GTK_WIDGET (range)); + } +} + +/** + * gtk_range_get_flippable: + * @range: a #GtkRange + * + * Gets the value set by gtk_range_set_flippable(). + * + * Return value: %TRUE if the range is flippable + * + * Since: 2.18 + **/ +gboolean +gtk_range_get_flippable (GtkRange *range) +{ + g_return_val_if_fail (GTK_IS_RANGE (range), FALSE); + + return range->flippable; +} + +/** * gtk_range_set_lower_stepper_sensitivity: * @range: a #GtkRange * @sensitivity: the lower stepper's sensitivity policy. |