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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, 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-pixbuf-cache.h"
30 #include "ev-page-cache.h"
33 #include "ev-form-field.h"
34 #include "ev-selection.h"
35 #include "ev-transition-animation.h"
37 #define DRAG_HISTORY 10
39 /* Information for middle clicking and moving around the doc */
45 guint drag_timeout_id;
46 guint release_timeout_id;
47 GdkPoint buffer[DRAG_HISTORY];
53 gboolean autoscrolling;
59 /* Information for handling selection */
63 gboolean in_selection;
65 EvSelectionStyle style;
68 /* Information for handling images DND */
75 /* Annotation popup windows */
80 /* Current position */
84 /* EvView root position */
97 SCROLL_TO_KEEP_POSITION,
98 SCROLL_TO_PAGE_POSITION,
100 SCROLL_TO_FIND_LOCATION,
104 EV_VIEW_CURSOR_NORMAL,
105 EV_VIEW_CURSOR_IBEAM,
108 EV_VIEW_CURSOR_HIDDEN,
110 EV_VIEW_CURSOR_AUTOSCROLL,
114 EV_PRESENTATION_NORMAL,
115 EV_PRESENTATION_BLACK,
116 EV_PRESENTATION_WHITE,
118 } EvPresentationState;
120 typedef struct _EvHeightToPageCache {
122 gdouble *height_to_page;
123 gdouble *dual_height_to_page;
124 } EvHeightToPageCache;
129 EvDocument *document;
134 gboolean jump_to_find_result;
135 gboolean highlight_find_results;
137 EvPageCache *page_cache;
138 EvPixbufCache *pixbuf_cache;
139 EvHeightToPageCache *height_to_page_cache;
141 EvJobRender *current_job;
144 GtkAdjustment *hadjustment;
145 GtkAdjustment *vadjustment;
150 PendingScroll pending_scroll;
151 gboolean pending_resize;
152 EvPoint pending_point;
154 /* Current geometry */
171 gboolean presentation;
172 EvSizingMode sizing_mode;
173 cairo_surface_t *loading_text;
176 EvPresentationState presentation_state;
177 EvSizingMode sizing_mode_saved;
179 guint trans_timeout_id;
181 /* Common for button press handling */
184 /* Information for middle clicking and dragging around. */
188 AutoScrollInfo scroll_info;
192 guint selection_update_id;
193 guint selection_scroll_id;
195 EvViewSelectionMode selection_mode;
196 SelectionInfo selection_info;
198 /* Copy link address selection */
199 EvLinkAction *link_selected;
202 ImageDNDInfo image_dnd_info;
205 GtkWidget *goto_window;
206 GtkWidget *goto_entry;
208 EvTransitionAnimation *animation;
211 GList *window_children;
212 EvViewWindowChild *window_child_focus;
215 struct _EvViewClass {
216 GtkLayoutClass parent_class;
218 void (*binding_activated) (EvView *view,
219 GtkScrollType scroll,
220 gboolean horizontal);
221 void (*handle_link) (EvView *view,
223 void (*external_link) (EvView *view,
224 EvLinkAction *action);
225 void (*popup_menu) (EvView *view,
229 void _get_page_size_for_scale_and_rotation (EvDocument *document,
236 #endif /* __EV_VIEW_PRIVATE_H__ */