summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-12-12 22:17:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-12-12 22:17:49 -0500
commitb891d205ddec1d89ce7915a453e5411b7def8ceb (patch)
tree688bceda849baab11ee267f1fee84e18411e71b8 /gtk
parent2f6f8a7e6faa0957a29832b761bd40193dcf993f (diff)
downloadgtk+-b891d205ddec1d89ce7915a453e5411b7def8ceb.tar.gz
range: Add private api to autoscroll
This will be used to scroll the scale in scale buttons.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkrange.c15
-rw-r--r--gtk/gtkrangeprivate.h4
2 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 30892e3d4f..04ea0b8fe9 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3047,3 +3047,18 @@ gtk_range_get_slider_widget (GtkRange *range)
{
return range->priv->slider_widget;
}
+
+void
+gtk_range_start_autoscroll (GtkRange *range,
+ GtkScrollType scroll_type)
+{
+ remove_autoscroll (range);
+ range->priv->autoscroll_mode = scroll_type;
+ add_autoscroll (range);
+}
+
+void
+gtk_range_stop_autoscroll (GtkRange *range)
+{
+ remove_autoscroll (range);
+}
diff --git a/gtk/gtkrangeprivate.h b/gtk/gtkrangeprivate.h
index 907fb7d215..f76116ea10 100644
--- a/gtk/gtkrangeprivate.h
+++ b/gtk/gtkrangeprivate.h
@@ -43,6 +43,10 @@ gint _gtk_range_get_stop_positions (GtkRange *range
GtkWidget *gtk_range_get_slider_widget (GtkRange *range);
+void gtk_range_start_autoscroll (GtkRange *range,
+ GtkScrollType scroll_type);
+void gtk_range_stop_autoscroll (GtkRange *range);
+
G_END_DECLS