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"
30 /* Information for middle clicking and moving around the doc */
38 /* Information for handling selection */
42 gboolean in_selection;
46 /* Information for handling images DND */
54 SCROLL_TO_KEEP_POSITION,
55 SCROLL_TO_PAGE_POSITION,
57 SCROLL_TO_FIND_LOCATION,
61 EV_VIEW_CURSOR_NORMAL,
65 EV_VIEW_CURSOR_HIDDEN,
70 EV_PRESENTATION_NORMAL,
71 EV_PRESENTATION_BLACK,
72 EV_PRESENTATION_WHITE,
74 } EvPresentationState;
83 gboolean jump_to_find_result;
84 gboolean highlight_find_results;
86 EvPageCache *page_cache;
87 EvPixbufCache *pixbuf_cache;
89 EvJobRender *current_job;
92 GtkAdjustment *hadjustment;
93 GtkAdjustment *vadjustment;
98 PendingScroll pending_scroll;
99 gboolean pending_resize;
100 EvPoint pending_point;
102 /* Current geometry */
119 gboolean presentation;
120 EvSizingMode sizing_mode;
121 cairo_surface_t *loading_text;
124 EvPresentationState presentation_state;
125 EvSizingMode sizing_mode_saved;
127 guint trans_timeout_id;
129 /* Common for button press handling */
132 /* Information for middle clicking and dragging around. */
137 guint selection_update_id;
138 guint selection_scroll_id;
140 EvViewSelectionMode selection_mode;
141 SelectionInfo selection_info;
144 ImageDNDInfo image_dnd_info;
146 #if !GTK_CHECK_VERSION (2, 11, 7)
148 GtkWidget *link_tooltip;
149 EvLink *hovered_link;
153 GtkWidget *goto_window;
154 GtkWidget *goto_entry;
157 struct _EvViewClass {
158 GtkLayoutClass parent_class;
160 void (*binding_activated) (EvView *view,
162 gboolean horizontal);
163 void (*zoom_invalid) (EvView *view);
164 void (*handle_link) (EvView *view,
166 void (*external_link) (EvView *view,
167 EvLinkAction *action);
168 void (*popup_menu) (EvView *view,
172 #endif /* __EV_VIEW_PRIVATE_H__ */