summaryrefslogtreecommitdiff
path: root/libview/ev-view-private.h
diff options
context:
space:
mode:
authorClement Lefebvre <[email protected]>2017-03-14 14:35:04 +0000
committerraveit65 <[email protected]>2017-08-18 21:18:30 +0200
commitc508d14764871f4d052cc28b283dc9f0f1416898 (patch)
tree24a7e7a3ba377379568b186c00f5c1487e92d576 /libview/ev-view-private.h
parent3bd070a5580f2d6d678c266af88b7dc0b816f4db (diff)
downloadatril-c508d14764871f4d052cc28b283dc9f0f1416898.tar.bz2
atril-c508d14764871f4d052cc28b283dc9f0f1416898.tar.xz
ev-view: Add pan gesture to switch page
This only applies on non-continuous mode, and the page fits with no horizontal scrolling. The gesture is actually connected to the parent GtkScrolledWindow (tracked through hierarchy events), so it is able to interact with kinetic scrolling gestures there, and cancel those if the pan gesture is recognized. Upstream commits by garnacho on 6 May and 15 Aug 2014: https://github.com/GNOME/evince/commit/afc50e7e07c135e22137a33cbf9913713692bf49 https://github.com/GNOME/evince/commit/2280b09ec71ee88eeeb7fd8d02adb2985d17a765
Diffstat (limited to 'libview/ev-view-private.h')
-rw-r--r--libview/ev-view-private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index 6e41d2ad..1d1220f3 100644
--- a/libview/ev-view-private.h
+++ b/libview/ev-view-private.h
@@ -73,6 +73,12 @@ typedef struct {
EvImage *image;
} ImageDNDInfo;
+typedef enum {
+ EV_PAN_ACTION_NONE,
+ EV_PAN_ACTION_NEXT,
+ EV_PAN_ACTION_PREV
+} EvPanAction;
+
/* Annotation popup windows */
typedef struct {
GtkWidget *window;
@@ -204,8 +210,10 @@ struct _EvView {
AtkObject *accessible;
/* Gestures */
+ GtkGesture *pan_gesture;
GtkGesture *zoom_gesture;
gdouble prev_zoom_gesture_scale;
+ EvPanAction pan_action;
};
struct _EvViewClass {