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"
31 #define DRAG_HISTORY 10
33 /* Information for middle clicking and moving around the doc */
39 guint drag_timeout_id;
40 guint release_timeout_id;
41 GdkPoint buffer[DRAG_HISTORY];
47 gboolean autoscrolling;
53 /* Information for handling selection */
57 gboolean in_selection;
59 EvSelectionStyle style;
62 /* Information for handling images DND */
70 SCROLL_TO_KEEP_POSITION,
71 SCROLL_TO_PAGE_POSITION,
73 SCROLL_TO_FIND_LOCATION,
77 EV_VIEW_CURSOR_NORMAL,
81 EV_VIEW_CURSOR_HIDDEN,
83 EV_VIEW_CURSOR_AUTOSCROLL,
87 EV_PRESENTATION_NORMAL,
88 EV_PRESENTATION_BLACK,
89 EV_PRESENTATION_WHITE,
91 } EvPresentationState;
100 gboolean jump_to_find_result;
101 gboolean highlight_find_results;
103 EvPageCache *page_cache;
104 EvPixbufCache *pixbuf_cache;
106 EvJobRender *current_job;
109 GtkAdjustment *hadjustment;
110 GtkAdjustment *vadjustment;
115 PendingScroll pending_scroll;
116 gboolean pending_resize;
117 EvPoint pending_point;
119 /* Current geometry */
136 gboolean presentation;
137 EvSizingMode sizing_mode;
138 cairo_surface_t *loading_text;
141 EvPresentationState presentation_state;
142 EvSizingMode sizing_mode_saved;
144 guint trans_timeout_id;
146 /* Common for button press handling */
149 /* Information for middle clicking and dragging around. */
153 AutoScrollInfo scroll_info;
157 guint selection_update_id;
158 guint selection_scroll_id;
160 EvViewSelectionMode selection_mode;
161 SelectionInfo selection_info;
164 ImageDNDInfo image_dnd_info;
166 #if !GTK_CHECK_VERSION (2, 11, 7)
168 GtkWidget *link_tooltip;
169 EvLink *hovered_link;
173 GtkWidget *goto_window;
174 GtkWidget *goto_entry;
177 struct _EvViewClass {
178 GtkLayoutClass parent_class;
180 void (*binding_activated) (EvView *view,
182 gboolean horizontal);
183 void (*zoom_invalid) (EvView *view);
184 void (*handle_link) (EvView *view,
186 void (*external_link) (EvView *view,
187 EvLinkAction *action);
188 void (*popup_menu) (EvView *view,
192 #endif /* __EV_VIEW_PRIVATE_H__ */