diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2022-09-30 18:31:55 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2022-09-30 18:36:02 +0100 |
commit | 31fea11255adf54b1ed450c86ad07be70c504aab (patch) | |
tree | fb778d01542e173f706dadc66d874cedaa8539c5 /gtk/gtkscalebutton.c | |
parent | 5dd7e248061051acd692f78519c1094c090c7c50 (diff) | |
download | gtk+-31fea11255adf54b1ed450c86ad07be70c504aab.tar.gz |
a11y: Drop GtkAccessibleRange.get_minimum_increment()ebassi/a11y/accessible-range
MinimumIncrement is an AT-SPI-ism that has no counterpart in the ARIA
specification, so it should not live inside public API. Additionally,
it's not really a useful method because it collapses two values on the
adjustment API.
The only method in the GtkAccessibleRange interface should be the
set_current_value(), which allows ATs to control the current position in
a ranged widget.
The AT-SPI implementation can now use all the accessible properties,
including the VALUE_TEXT one, mapped to the Text property on the
AtSpi.Value interface.
Diffstat (limited to 'gtk/gtkscalebutton.c')
-rw-r--r-- | gtk/gtkscalebutton.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c index a81f0968f9..2918089bfd 100644 --- a/gtk/gtkscalebutton.c +++ b/gtk/gtkscalebutton.c @@ -159,7 +159,8 @@ static gboolean gtk_scale_button_scroll_controller_scroll (GtkEventControllerScr double dx, double dy, GtkScaleButton *button); -static void gtk_scale_button_accessible_range_init(GtkAccessibleRangeInterface *iface); + +static void gtk_scale_button_accessible_range_init (GtkAccessibleRangeInterface *iface); G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_WIDGET, @@ -170,26 +171,19 @@ G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_WIDGET, static guint signals[LAST_SIGNAL] = { 0, }; -static double -gtk_scale_button_accessible_range_get_minimum_increment(GtkAccessibleRange *accessible_range) -{ - GtkScaleButton *button = GTK_SCALE_BUTTON (accessible_range); - return gtk_adjustment_get_minimum_increment (gtk_scale_button_get_adjustment (button)); -} - static gboolean -gtk_scale_button_accessible_range_set_current_value (GtkAccessibleRange *accessible_range, double value) +accessible_range_set_current_value (GtkAccessibleRange *accessible_range, + double value) { - GtkScaleButton *button = GTK_SCALE_BUTTON (accessible_range); - gtk_scale_button_set_value (button, value); + gtk_scale_button_set_value (GTK_SCALE_BUTTON (accessible_range), value); + return TRUE; } static void -gtk_scale_button_accessible_range_init(GtkAccessibleRangeInterface *iface) +gtk_scale_button_accessible_range_init (GtkAccessibleRangeInterface *iface) { - iface->get_minimum_increment = gtk_scale_button_accessible_range_get_minimum_increment; - iface->set_current_value = gtk_scale_button_accessible_range_set_current_value; + iface->set_current_value = accessible_range_set_current_value; } static void |