From 14633f07b92d515ca0c4447506fa938b3568f013 Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Sun, 23 Dec 2007 17:14:04 +0000 Subject: Autoscroll feature with the context menu. Fixes bug #323670. Thanks to 2007-12-23 Nickolay V. Shmyrev * data/evince-toolbar.xml: * data/evince-ui.xml: * shell/ev-view-private.h: * shell/ev-view.c: (ev_view_handle_cursor_over_xy), (ev_view_button_press_event), (ev_view_motion_notify_event), (ev_view_button_release_event), (ev_view_init), (ev_view_autoscroll_cb), (ev_view_autoscroll), (ev_view_set_cursor): * shell/ev-view.h: * shell/ev-window.c: (ev_window_setup_action_sensitivity), (ev_window_cmd_view_autoscroll): Autoscroll feature with the context menu. Fixes bug #323670. Thanks to David Turner . svn path=/trunk/; revision=2781 --- (limited to 'shell/ev-view-private.h') diff --git a/shell/ev-view-private.h b/shell/ev-view-private.h index e839a31..22bd7a0 100644 --- a/shell/ev-view-private.h +++ b/shell/ev-view-private.h @@ -36,6 +36,14 @@ typedef struct { gdouble vadj; } DragInfo; +/* Autoscrolling */ +typedef struct { + gboolean autoscrolling; + guint last_y; + guint start_y; + guint timeout_id; +} AutoScrollInfo; + /* Information for handling selection */ typedef struct { gboolean in_drag; @@ -65,7 +73,8 @@ typedef enum { EV_VIEW_CURSOR_LINK, EV_VIEW_CURSOR_WAIT, EV_VIEW_CURSOR_HIDDEN, - EV_VIEW_CURSOR_DRAG + EV_VIEW_CURSOR_DRAG, + EV_VIEW_CURSOR_AUTOSCROLL, } EvViewCursor; typedef enum { @@ -133,6 +142,9 @@ struct _EvView { /* Information for middle clicking and dragging around. */ DragInfo drag_info; + + /* Autoscrolling */ + AutoScrollInfo scroll_info; /* Selection */ GdkPoint motion; -- cgit v0.9.1