summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.h
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2011-02-11 13:43:56 +0100
committerMatthias Clasen <mclasen@redhat.com>2012-03-01 16:25:21 -0500
commitf6393199beb812b81065890d6fec718ee16632f8 (patch)
tree14f71b0bc9b2323ec4eb744f32108bbdb860f5be /gtk/gtkscrolledwindow.h
parent8689921b90556008da9ba34326346fd6856c9d47 (diff)
downloadgtk+-f6393199beb812b81065890d6fec718ee16632f8.tar.gz
scrolledwindow: Kinetic scrolling support
Kinetic scrolling is only done on touch devices, since it is sort of meaningless on pointer devices, besides it implies a different input event handling on child widgets that is unnecessary there. If the scrolling doesn't start after a long press, the scrolling is cancelled and events are handled by child widgets normally. When clicked again close to the previous button press location (assuming it had ~0 movement), the scrolled window will allow the child to handle the events immediately. This is so the user doesn't have to wait to the press-and-hold timeout in order to operate on the scrolledwindow child. The innermost scrolled window always gets to capture the events, all scrolled windows above it just let the event go through. Ideally reaching a limit on the innermost scrolled window would propagate the dragging up the hierarchy in order to keep following the touch coords, although that'd involve rather evil hacks just to cater for broken UIs.
Diffstat (limited to 'gtk/gtkscrolledwindow.h')
-rw-r--r--gtk/gtkscrolledwindow.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h
index 2028a00eac..780f1981fc 100644
--- a/gtk/gtkscrolledwindow.h
+++ b/gtk/gtkscrolledwindow.h
@@ -115,6 +115,17 @@ void gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *sc
gint gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window);
void gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window,
gint height);
+GDK_AVAILABLE_IN_3_4
+void gtk_scrolled_window_set_kinetic_scrolling (GtkScrolledWindow *scrolled_window,
+ gboolean kinetic_scrolling);
+GDK_AVAILABLE_IN_3_4
+gboolean gtk_scrolled_window_get_kinetic_scrolling (GtkScrolledWindow *scrolled_window);
+
+GDK_AVAILABLE_IN_3_4
+void gtk_scrolled_window_set_capture_button_press (GtkScrolledWindow *scrolled_window,
+ gboolean capture_button_press);
+GDK_AVAILABLE_IN_3_4
+gboolean gtk_scrolled_window_get_capture_button_press (GtkScrolledWindow *scrolled_window);
gint _gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window);