[gtk+] Add accessors for sealed member "flippable"
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Add accessors for sealed member "flippable"
- Date: Thu, 27 Aug 2009 19:15:09 +0000 (UTC)
commit 591b37d7ced7eb857afd75e570318fb0a51e07e1
Author: Michael Natterer <mitch gimp org>
Date: Thu Aug 27 21:12:32 2009 +0200
Add accessors for sealed member "flippable"
One step closer to makes GtkRange properly subclassable, but still
quite some accessors missing.
gtk/gtk.symbols | 2 ++
gtk/gtkrange.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
gtk/gtkrange.h | 4 ++++
3 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index a276bf8..89e3240 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -3294,6 +3294,7 @@ gtk_radio_tool_button_set_group
#if IN_FILE(__GTK_RANGE_C__)
gtk_range_get_adjustment
gtk_range_get_fill_level
+gtk_range_get_flippable
gtk_range_get_inverted
gtk_range_get_lower_stepper_sensitivity
gtk_range_get_restrict_to_fill_level
@@ -3304,6 +3305,7 @@ gtk_range_get_upper_stepper_sensitivity
gtk_range_get_value
gtk_range_set_adjustment
gtk_range_set_fill_level
+gtk_range_set_flippable
gtk_range_set_increments
gtk_range_set_inverted
gtk_range_set_lower_stepper_sensitivity
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index ce4e5e4..17c0d6f 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.
diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h
index f7f3b96..268a522 100644
--- a/gtk/gtkrange.h
+++ b/gtk/gtkrange.h
@@ -147,6 +147,10 @@ void gtk_range_set_inverted (GtkRange *range
gboolean setting);
gboolean gtk_range_get_inverted (GtkRange *range);
+void gtk_range_set_flippable (GtkRange *range,
+ gboolean flippable);
+gboolean gtk_range_get_flippable (GtkRange *range);
+
void gtk_range_set_lower_stepper_sensitivity (GtkRange *range,
GtkSensitivityType sensitivity);
GtkSensitivityType gtk_range_get_lower_stepper_sensitivity (GtkRange *range);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]