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"
29 #include "ev-form-field.h"
30 #include "ev-selection.h"
31 #include "ev-transition-animation.h"
33 #define DRAG_HISTORY 10
35 /* Information for middle clicking and moving around the doc */
41 guint drag_timeout_id;
42 guint release_timeout_id;
43 GdkPoint buffer[DRAG_HISTORY];
49 gboolean autoscrolling;
55 /* Information for handling selection */
59 gboolean in_selection;
61 EvSelectionStyle style;
64 /* Information for handling images DND */
72 SCROLL_TO_KEEP_POSITION,
73 SCROLL_TO_PAGE_POSITION,
75 SCROLL_TO_FIND_LOCATION,
79 EV_VIEW_CURSOR_NORMAL,
83 EV_VIEW_CURSOR_HIDDEN,
85 EV_VIEW_CURSOR_AUTOSCROLL,
89 EV_PRESENTATION_NORMAL,
90 EV_PRESENTATION_BLACK,
91 EV_PRESENTATION_WHITE,
93 } EvPresentationState;
103 gboolean jump_to_find_result;
104 gboolean highlight_find_results;
106 EvPageCache *page_cache;
107 EvPixbufCache *pixbuf_cache;
109 EvJobRender *current_job;
112 GtkAdjustment *hadjustment;
113 GtkAdjustment *vadjustment;
118 PendingScroll pending_scroll;
119 gboolean pending_resize;
120 EvPoint pending_point;
122 /* Current geometry */
139 gboolean presentation;
140 EvSizingMode sizing_mode;
141 cairo_surface_t *loading_text;
144 EvPresentationState presentation_state;
145 EvSizingMode sizing_mode_saved;
147 guint trans_timeout_id;
149 /* Common for button press handling */
152 /* Information for middle clicking and dragging around. */
156 AutoScrollInfo scroll_info;
160 guint selection_update_id;
161 guint selection_scroll_id;
163 EvViewSelectionMode selection_mode;
164 SelectionInfo selection_info;
166 /* Copy link address selection */
167 EvLinkAction *link_selected;
170 ImageDNDInfo image_dnd_info;
173 GtkWidget *goto_window;
174 GtkWidget *goto_entry;
176 EvTransitionAnimation *animation;
179 struct _EvViewClass {
180 GtkLayoutClass parent_class;
182 void (*binding_activated) (EvView *view,
183 GtkScrollType scroll,
184 gboolean horizontal);
185 void (*zoom_invalid) (EvView *view);
186 void (*handle_link) (EvView *view,
188 void (*external_link) (EvView *view,
189 EvLinkAction *action);
190 void (*popup_menu) (EvView *view,
194 #endif /* __EV_VIEW_PRIVATE_H__ */