]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-file-exporter.c
Include config.h. Bug #504721.
[evince.git] / libdocument / ev-file-exporter.c
1 /* this file is part of evince, a gnome document viewer
2  *
3  *  Copyright (C) 2004 Martin Kretzschmar
4  *
5  *  Author:
6  *    Martin Kretzschmar <martink@gnome.org>
7  *
8  * Evince is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Evince is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21  */
22
23 #include <config.h>
24 #include "ev-file-exporter.h"
25
26 GType
27 ev_file_exporter_get_type (void)
28 {
29         static GType type = 0;
30
31         if (G_UNLIKELY (type == 0)) {
32                 const GTypeInfo our_info =
33                 {
34                         sizeof (EvFileExporterIface),
35                         NULL,
36                         NULL,
37                 };
38
39                 type = g_type_register_static (G_TYPE_INTERFACE,
40                                                "EvFileExporter",
41                                                &our_info, (GTypeFlags)0);
42         }
43
44         return type;
45 }
46
47 void
48 ev_file_exporter_begin (EvFileExporter        *exporter,
49                         EvFileExporterContext *fc)
50 {
51         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
52
53         iface->begin (exporter, fc);
54 }
55
56 void
57 ev_file_exporter_begin_page (EvFileExporter *exporter)
58 {
59         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
60
61         if (iface->begin_page)
62                 iface->begin_page (exporter);
63 }
64
65 void
66 ev_file_exporter_do_page (EvFileExporter  *exporter,
67                           EvRenderContext *rc)
68 {
69         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
70
71         iface->do_page (exporter, rc);
72 }
73
74 void
75 ev_file_exporter_end_page (EvFileExporter *exporter)
76 {
77         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
78         
79         if (iface->end_page)
80                 iface->end_page (exporter);
81 }
82
83 void
84 ev_file_exporter_end (EvFileExporter *exporter)
85 {
86         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
87
88         iface->end (exporter);
89 }
90
91 EvFileExporterCapabilities
92 ev_file_exporter_get_capabilities (EvFileExporter *exporter)
93 {
94         EvFileExporterIface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
95
96         return iface->get_capabilities (exporter);
97 }