2 * Copyright (C) 2004 Marco Pesenti Gritti
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #include "ev-document.h"
24 static void ev_document_base_init (gpointer g_class);
27 ev_document_get_type (void)
29 static GType type = 0;
31 if (G_UNLIKELY (type == 0))
33 static const GTypeInfo our_info =
35 sizeof (EvDocumentIface),
36 ev_document_base_init,
40 type = g_type_register_static (G_TYPE_INTERFACE,
42 &our_info, (GTypeFlags)0);
49 ev_document_base_init (gpointer g_class)
54 ev_document_load (EvDocument *document,
58 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
59 iface->load (document, uri);
63 ev_document_get_n_pages (EvDocument *document)
65 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
66 return iface->get_n_pages (document);
70 ev_document_set_page (EvDocument *document,
73 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
74 iface->set_page (document, page);
78 ev_document_set_target (EvDocument *document,
81 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
82 iface->set_target (document, target);
86 ev_document_set_page_rect (EvDocument *document,
92 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
93 iface->set_page_rect (document, x, y, width, height);
97 ev_document_render (EvDocument *document,
103 EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document);
104 iface->render (document, clip_x, clip_y, clip_width, clip_height);