ev-file-exporter.c 2.25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* this file is part of evince, a gnome document viewer
 *
 *  Copyright (C) 2004 Martin Kretzschmar
 *
 *  Author:
 *    Martin Kretzschmar <martink@gnome.org>
 *
 * Evince is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Evince is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 22
 */

23
#include <config.h>
24
#include "ev-file-exporter.h"
25
#include "ev-document.h"
26

27
G_DEFINE_INTERFACE (EvFileExporter, ev_file_exporter, 0)
28

29
static void
30
ev_file_exporter_default_init (EvFileExporterInterface *klass)
31
{
32 33 34
}

void
35 36
ev_file_exporter_begin (EvFileExporter        *exporter,
                        EvFileExporterContext *fc)
37
{
38
        EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
39

40
        iface->begin (exporter, fc);
41 42
}

43 44 45
void
ev_file_exporter_begin_page (EvFileExporter *exporter)
{
46
	EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
47 48 49 50 51

	if (iface->begin_page)
		iface->begin_page (exporter);
}

52
void
53 54
ev_file_exporter_do_page (EvFileExporter  *exporter,
			  EvRenderContext *rc)
55
{
56
        EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
57 58 59 60

        iface->do_page (exporter, rc);
}

61 62 63
void
ev_file_exporter_end_page (EvFileExporter *exporter)
{
64
	EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
65 66 67 68 69
	
	if (iface->end_page)
		iface->end_page (exporter);
}

70 71 72
void
ev_file_exporter_end (EvFileExporter *exporter)
{
73
        EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
74 75 76

        iface->end (exporter);
}
77 78 79 80

EvFileExporterCapabilities
ev_file_exporter_get_capabilities (EvFileExporter *exporter)
{
81
	EvFileExporterInterface *iface = EV_FILE_EXPORTER_GET_IFACE (exporter);
82

83
	return iface->get_capabilities (exporter);
84
}