]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-file-exporter.h
Reorganize source tree.
[evince.git] / libdocument / ev-file-exporter.h
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 #ifndef EV_FILE_EXPORTER_H
24 #define EV_FILE_EXPORTER_H
25
26 #include <glib-object.h>
27
28 #include "ev-render-context.h"
29
30 G_BEGIN_DECLS
31
32 typedef enum {
33         EV_FILE_FORMAT_PS,
34         EV_FILE_FORMAT_PDF,
35         EV_FILE_FORMAT_UNKNOWN
36 } EvFileExporterFormat;
37
38 #define EV_TYPE_FILE_EXPORTER            (ev_file_exporter_get_type ())
39 #define EV_FILE_EXPORTER(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_FILE_EXPORTER, EvFileExporter))
40 #define EV_FILE_EXPORTER_IFACE(k)        (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_FILE_EXPORTER, EvFileExporterIface))
41 #define EV_IS_FILE_EXPORTER(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_FILE_EXPORTER))
42 #define EV_IS_FILE_EXPORTER_IFACE(k)     (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_FILE_EXPORTER))
43 #define EV_FILE_EXPORTER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_FILE_EXPORTER, EvFileExporterIface))
44
45 typedef struct _EvFileExporter EvFileExporter;
46 typedef struct _EvFileExporterIface EvFileExporterIface;
47
48 struct _EvFileExporterIface {
49         GTypeInterface base_iface;
50
51         /* Methods  */
52         gboolean   (* format_supported) (EvFileExporter      *exporter,
53                                          EvFileExporterFormat format);
54         void       (* begin)            (EvFileExporter      *exporter,
55                                          EvFileExporterFormat format,
56                                          const gchar         *filename,
57                                          gint                 first_page,
58                                          gint                 last_page,
59                                          gdouble              paper_width,
60                                          gdouble              paper_height,
61                                          gboolean             duplex);
62         void       (* do_page)          (EvFileExporter      *exporter,
63                                          EvRenderContext     *rc);
64         void       (* end)              (EvFileExporter      *exporter);
65 };
66
67 GType    ev_file_exporter_get_type         (void) G_GNUC_CONST;
68 gboolean ev_file_exporter_format_supported (EvFileExporter      *exporter,
69                                             EvFileExporterFormat format);
70 void     ev_file_exporter_begin            (EvFileExporter      *exporter,
71                                             EvFileExporterFormat format, 
72                                             const gchar         *filename,
73                                             gint                 first_page,
74                                             gint                 last_page,
75                                             gdouble              paper_width,
76                                             gdouble              paper_height,
77                                             gboolean             duplex);
78 void     ev_file_exporter_do_page          (EvFileExporter      *exporter,
79                                             EvRenderContext     *rc);
80 void     ev_file_exporter_end              (EvFileExporter      *exporter);
81
82 G_END_DECLS
83
84 #endif