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
4 * Copyright (C) 2004 Red Hat, Inc
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #if !defined (EVINCE_COMPILATION)
22 #error "This is a private header."
25 #ifndef __EV_VIEW_PRIVATE_H__
26 #define __EV_VIEW_PRIVATE_H__
29 #include "ev-document-model.h"
30 #include "ev-pixbuf-cache.h"
31 #include "ev-page-cache.h"
34 #include "ev-form-field.h"
35 #include "ev-selection.h"
36 #include "ev-view-cursor.h"
38 #define DRAG_HISTORY 10
40 /* Information for middle clicking and moving around the doc */
46 guint drag_timeout_id;
47 guint release_timeout_id;
48 GdkPoint buffer[DRAG_HISTORY];
54 gboolean autoscrolling;
60 /* Information for handling selection */
64 gboolean in_selection;
66 EvSelectionStyle style;
69 /* Information for handling images DND */
76 /* Annotation popup windows */
81 /* Current position */
85 /* EvView root position */
98 SCROLL_TO_KEEP_POSITION,
99 SCROLL_TO_PAGE_POSITION,
101 SCROLL_TO_FIND_LOCATION,
104 typedef struct _EvHeightToPageCache {
106 gdouble *height_to_page;
107 gdouble *dual_height_to_page;
108 } EvHeightToPageCache;
113 EvDocument *document;
118 gboolean jump_to_find_result;
119 gboolean highlight_find_results;
121 EvDocumentModel *model;
122 EvPixbufCache *pixbuf_cache;
123 EvPageCache *page_cache;
124 EvHeightToPageCache *height_to_page_cache;
126 EvJobRender *current_job;
128 GtkRequisition requisition;
129 gboolean internal_size_request;
132 GtkAdjustment *hadjustment;
133 GtkAdjustment *vadjustment;
138 PendingScroll pending_scroll;
139 gboolean pending_resize;
140 EvPoint pending_point;
142 /* Current geometry */
156 EvSizingMode sizing_mode;
157 GtkWidget *loading_window;
158 guint loading_timeout;
160 /* Common for button press handling */
163 /* Information for middle clicking and dragging around. */
167 AutoScrollInfo scroll_info;
171 guint selection_update_id;
172 guint selection_scroll_id;
174 EvViewSelectionMode selection_mode;
175 SelectionInfo selection_info;
177 /* Copy link address selection */
178 EvLinkAction *link_selected;
181 ImageDNDInfo image_dnd_info;
184 GList *window_children;
185 EvViewWindowChild *window_child_focus;
188 struct _EvViewClass {
189 GtkLayoutClass parent_class;
191 void (*binding_activated) (EvView *view,
192 GtkScrollType scroll,
193 gboolean horizontal);
194 void (*handle_link) (EvView *view,
196 void (*external_link) (EvView *view,
197 EvLinkAction *action);
198 void (*popup_menu) (EvView *view,
200 void (*selection_changed) (EvView *view);
203 void _get_page_size_for_scale_and_rotation (EvDocument *document,
210 #endif /* __EV_VIEW_PRIVATE_H__ */