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 /* Information for middle clicking and moving around the doc */
37 /* Information for handling selection */
41 gboolean in_selection;
45 /* Information for handling images DND */
53 SCROLL_TO_KEEP_POSITION,
54 SCROLL_TO_PAGE_POSITION,
56 SCROLL_TO_FIND_LOCATION,
60 EV_VIEW_CURSOR_NORMAL,
64 EV_VIEW_CURSOR_HIDDEN,
69 EV_PRESENTATION_NORMAL,
70 EV_PRESENTATION_BLACK,
71 EV_PRESENTATION_WHITE,
73 } EvPresentationState;
76 GtkWidget parent_instance;
83 gboolean jump_to_find_result;
85 EvPageCache *page_cache;
86 EvPixbufCache *pixbuf_cache;
88 EvJobRender *current_job;
91 GtkAdjustment *hadjustment;
92 GtkAdjustment *vadjustment;
97 PendingScroll pending_scroll;
98 gboolean pending_resize;
99 EvPoint pending_point;
101 /* Current geometry */
118 gboolean presentation;
119 EvSizingMode sizing_mode;
120 cairo_surface_t *loading_text;
123 EvPresentationState presentation_state;
124 EvSizingMode sizing_mode_saved;
126 guint trans_timeout_id;
128 /* Common for button press handling */
131 /* Information for middle clicking and dragging around. */
136 guint selection_update_id;
137 guint selection_scroll_id;
139 EvViewSelectionMode selection_mode;
140 SelectionInfo selection_info;
143 ImageDNDInfo image_dnd_info;
146 GtkWidget *link_tooltip;
147 EvLink *hovered_link;
150 GtkWidget *goto_window;
151 GtkWidget *goto_entry;
154 struct _EvViewClass {
155 GtkWidgetClass parent_class;
157 void (*set_scroll_adjustments) (EvView *view,
158 GtkAdjustment *hadjustment,
159 GtkAdjustment *vadjustment);
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__ */