X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-view-private.h;h=a2a2812541554d65c1f687ac2c47ee13213230f4;hb=09ab2eb203c380d4a952adaa44d5bd4a6f83fe07;hp=cab09417fe6ad1f53bd292f650ea505fb3931fe2;hpb=72fc0a73ea845307d6a109678952a0d07f6a1af4;p=evince.git diff --git a/shell/ev-view-private.h b/shell/ev-view-private.h index cab09417..a2a28125 100644 --- a/shell/ev-view-private.h +++ b/shell/ev-view-private.h @@ -25,6 +25,10 @@ #include "ev-pixbuf-cache.h" #include "ev-page-cache.h" #include "ev-image.h" +#include "ev-form-field.h" +#include "ev-selection.h" + +#define DRAG_HISTORY 10 /* Information for middle clicking and moving around the doc */ typedef struct { @@ -32,14 +36,27 @@ typedef struct { GdkPoint start; gdouble hadj; gdouble vadj; + guint drag_timeout_id; + guint release_timeout_id; + GdkPoint buffer[DRAG_HISTORY]; + GdkPoint momentum; } 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; GdkPoint start; gboolean in_selection; GList *selections; + EvSelectionStyle style; } SelectionInfo; /* Information for handling images DND */ @@ -62,7 +79,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 { @@ -73,14 +91,14 @@ typedef enum { } EvPresentationState; struct _EvView { - GtkWidget parent_instance; + GtkLayout layout; EvDocument *document; - char *status; char *find_status; int find_result; gboolean jump_to_find_result; + gboolean highlight_find_results; EvPageCache *page_cache; EvPixbufCache *pixbuf_cache; @@ -130,6 +148,9 @@ struct _EvView { /* Information for middle clicking and dragging around. */ DragInfo drag_info; + + /* Autoscrolling */ + AutoScrollInfo scroll_info; /* Selection */ GdkPoint motion; @@ -142,9 +163,11 @@ struct _EvView { /* Image DND */ ImageDNDInfo image_dnd_info; +#if !GTK_CHECK_VERSION (2, 11, 7) /* Links */ GtkWidget *link_tooltip; EvLink *hovered_link; +#endif /* Goto Popup */ GtkWidget *goto_window; @@ -152,11 +175,8 @@ struct _EvView { }; struct _EvViewClass { - GtkWidgetClass parent_class; + GtkLayoutClass parent_class; - void (*set_scroll_adjustments) (EvView *view, - GtkAdjustment *hadjustment, - GtkAdjustment *vadjustment); void (*binding_activated) (EvView *view, EvScrollType scroll, gboolean horizontal);