1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
3 * Copyright (C) 2000-2003 Marco Pesenti Gritti
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include <glib-object.h>
34 GdkRectangle highlight_area;
37 #define EV_TYPE_DOCUMENT (ev_document_get_type ())
38 #define EV_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_DOCUMENT, EvDocument))
39 #define EV_DOCUMENT_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT, EvDocumentIface))
40 #define EV_IS_DOCUMENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_DOCUMENT))
41 #define EV_IS_DOCUMENT_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT))
42 #define EV_DOCUMENT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_DOCUMENT, EvDocumentIface))
44 typedef struct _EvDocument EvDocument;
45 typedef struct _EvDocumentIface EvDocumentIface;
47 struct _EvDocumentIface
49 GTypeInterface base_iface;
52 gboolean (* load) (EvDocument *document,
55 int (* get_n_pages) (EvDocument *document);
56 void (* set_page) (EvDocument *document,
58 void (* set_target) (EvDocument *document,
60 void (* set_scale) (EvDocument *document,
62 void (* set_page_offset) (EvDocument *document,
65 void (* get_page_size) (EvDocument *document,
68 void (* render) (EvDocument *document,
74 void (* begin_find) (EvDocument *document,
75 const char *search_string,
76 gboolean case_sensitive);
77 void (* end_find) (EvDocument *document);
81 /* "found" emitted at least 1 time (possibly with n_results == 0)
82 * for any call to begin_find.
84 void (* found) (EvDocument *document,
85 const EvFindResult *results,
87 double percent_complete);
90 GType ev_document_get_type (void);
92 gboolean ev_document_load (EvDocument *document,
95 int ev_document_get_n_pages (EvDocument *document);
96 void ev_document_set_page (EvDocument *document,
98 void ev_document_set_target (EvDocument *document,
100 void ev_document_set_scale (EvDocument *document,
102 void ev_document_set_page_offset (EvDocument *document,
105 void ev_document_get_page_size (EvDocument *document,
108 void ev_document_render (EvDocument *document,
113 void ev_document_begin_find (EvDocument *document,
114 const char *search_string,
115 gboolean case_sensitive);
116 void ev_document_end_find (EvDocument *document);