]> www.fi.muni.cz Git - evince.git/blob - shell/ev-view-private.h
Initial accessibility support.
[evince.git] / shell / ev-view-private.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /* this file is part of evince, a gnome document viewer
3  *
4  *  Copyright (C) 2004 Red Hat, Inc
5  *
6  * Evince is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * Evince is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __EV_VIEW_PRIVATE_H__
22 #define __EV_VIEW_PRIVATE_H__
23
24 #include "ev-view.h"
25 #include "ev-pixbuf-cache.h"
26 #include "ev-page-cache.h"
27
28 /* Information for middle clicking and moving around the doc */
29 typedef struct {
30         gboolean in_drag;
31         GdkPoint start;
32         gdouble hadj;
33         gdouble vadj;
34 } DragInfo;
35
36 /* Information for handling selection */
37 typedef struct {
38         gboolean in_selection;
39         gboolean in_drag;
40         GdkPoint start;
41         GList *selections;
42 } SelectionInfo;
43
44 typedef enum {
45         SCROLL_TO_KEEP_POSITION,
46         SCROLL_TO_CURRENT_PAGE,
47         SCROLL_TO_CENTER
48 } PendingScroll;
49
50 typedef enum {
51         EV_VIEW_CURSOR_NORMAL,
52         EV_VIEW_CURSOR_IBEAM,
53         EV_VIEW_CURSOR_LINK,
54         EV_VIEW_CURSOR_WAIT,
55         EV_VIEW_CURSOR_HIDDEN,
56         EV_VIEW_CURSOR_DRAG
57 } EvViewCursor;
58
59 struct _EvView {
60         GtkWidget parent_instance;
61
62         EvDocument *document;
63
64         char *status;
65         char *find_status;
66
67         /* Scrolling */
68         GtkAdjustment *hadjustment;
69         GtkAdjustment *vadjustment;
70
71         gint scroll_x;
72         gint scroll_y;
73
74         /* Information for middle clicking and dragging around. */
75         DragInfo drag_info;
76
77         /* Selection */
78         gint motion_x;
79         gint motion_y;
80         guint selection_update_id;
81
82         EvViewSelectionMode selection_mode;
83         SelectionInfo selection_info;
84
85         int pressed_button;
86         EvViewCursor cursor;
87         GtkWidget *link_tooltip;
88         EvLink *hovered_link;
89
90         EvPageCache *page_cache;
91         EvPixbufCache *pixbuf_cache;
92
93         gint start_page;
94         gint end_page;
95         gint current_page;
96
97         EvJobRender *current_job;
98
99         int find_page;
100         int find_result;
101         int spacing;
102
103         int rotation;
104         double scale;
105
106         gboolean continuous;
107         gboolean dual_page;
108         gboolean fullscreen;
109         gboolean presentation;
110         EvSizingMode sizing_mode;
111
112         PendingScroll pending_scroll;
113         gboolean pending_resize;
114 };
115
116 struct _EvViewClass {
117         GtkWidgetClass parent_class;
118
119         void    (*set_scroll_adjustments) (EvView         *view,
120                                            GtkAdjustment  *hadjustment,
121                                            GtkAdjustment  *vadjustment);
122         void    (*binding_activated)      (EvView         *view,
123                                            GtkScrollType   scroll,
124                                            gboolean        horizontal);
125         void    (*zoom_invalid)           (EvView         *view);
126         void    (*external_link)          (EvView         *view,
127                                            EvLink         *link);
128 };
129
130 #endif  /* __EV_VIEW_PRIVATE_H__ */
131