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 #ifndef __EV_VIEW_PRIVATE_H__
22 #define __EV_VIEW_PRIVATE_H__
25 #include "ev-pixbuf-cache.h"
26 #include "ev-page-cache.h"
28 #include "ev-form-field.h"
29 #include "ev-selection.h"
30 #include "ev-transition-animation.h"
32 #define DRAG_HISTORY 10
34 /* Information for middle clicking and moving around the doc */
40 guint drag_timeout_id;
41 guint release_timeout_id;
42 GdkPoint buffer[DRAG_HISTORY];
48 gboolean autoscrolling;
54 /* Information for handling selection */
58 gboolean in_selection;
60 EvSelectionStyle style;
63 /* Information for handling images DND */
71 SCROLL_TO_KEEP_POSITION,
72 SCROLL_TO_PAGE_POSITION,
74 SCROLL_TO_FIND_LOCATION,
78 EV_VIEW_CURSOR_NORMAL,
82 EV_VIEW_CURSOR_HIDDEN,
84 EV_VIEW_CURSOR_AUTOSCROLL,
88 EV_PRESENTATION_NORMAL,
89 EV_PRESENTATION_BLACK,
90 EV_PRESENTATION_WHITE,
92 } EvPresentationState;
101 gboolean jump_to_find_result;
102 gboolean highlight_find_results;
104 EvPageCache *page_cache;
105 EvPixbufCache *pixbuf_cache;
107 EvJobRender *current_job;
110 GtkAdjustment *hadjustment;
111 GtkAdjustment *vadjustment;
116 PendingScroll pending_scroll;
117 gboolean pending_resize;
118 EvPoint pending_point;
120 /* Current geometry */
137 gboolean presentation;
138 EvSizingMode sizing_mode;
139 cairo_surface_t *loading_text;
142 EvPresentationState presentation_state;
143 EvSizingMode sizing_mode_saved;
145 guint trans_timeout_id;
147 /* Common for button press handling */
150 /* Information for middle clicking and dragging around. */
154 AutoScrollInfo scroll_info;
158 guint selection_update_id;
159 guint selection_scroll_id;
161 EvViewSelectionMode selection_mode;
162 SelectionInfo selection_info;
164 /* Copy link address selection */
165 EvLinkAction *link_selected;
168 ImageDNDInfo image_dnd_info;
170 #if !GTK_CHECK_VERSION (2, 11, 7)
172 GtkWidget *link_tooltip;
173 EvLink *hovered_link;
177 GtkWidget *goto_window;
178 GtkWidget *goto_entry;
180 EvTransitionAnimation *animation;
183 struct _EvViewClass {
184 GtkLayoutClass parent_class;
186 void (*binding_activated) (EvView *view,
188 gboolean horizontal);
189 void (*zoom_invalid) (EvView *view);
190 void (*handle_link) (EvView *view,
192 void (*external_link) (EvView *view,
193 EvLinkAction *action);
194 void (*popup_menu) (EvView *view,
198 #endif /* __EV_VIEW_PRIVATE_H__ */