Commit 591b37d7 authored by Michael Natterer's avatar Michael Natterer

Add accessors for sealed member "flippable"

One step closer to makes GtkRange properly subclassable, but still
quite some accessors missing.
parent d30c31d6
......@@ -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
......
......@@ -843,6 +843,52 @@ gtk_range_get_inverted (GtkRange *range)
return range->inverted;
}
/**
* 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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment