removed duplicate md5
[swftools.git] / lib / gfxsource.h
blob845eca790e9e6e84d15e53d71e4beb294c0dbceb
1 /* pdfswf.h
2 Header file for pdfswf.cc.
4 Part of the swftools package.
6 Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
8 This program is free software; you can redistribute it and/or modify
9 it 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.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
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 */
22 #ifndef __gfxsource_h__
23 #define __gfxsource_h__
25 #include "gfxdevice.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 struct _gfxdocument;
32 struct _gfxpage;
34 typedef struct _gfxsource
36 void (*setparameter)(struct _gfxsource*src, const char*name, const char*value);
37 struct _gfxdocument* (*open)(struct _gfxsource*src, const char*filename);
38 void (*destroy)(struct _gfxsource*src);
39 void*internal;
40 } gfxsource_t;
42 typedef struct _gfxdocument
44 gfxsource_t*driver;
45 int num_pages;
46 void* (*get)(struct _gfxdocument*gfx, const char*name);
47 void (*destroy)(struct _gfxdocument*gfx);
48 void (*setparameter)(struct _gfxdocument*gfx, const char*name, const char*value);
49 char* (*getinfo)(struct _gfxdocument*gfx, const char*key);
50 struct _gfxpage* (*getpage)(struct _gfxdocument*gfx, int page);
51 void (*prepare)(struct _gfxdocument*gfx, gfxdevice_t*device);
52 void*internal;
53 } gfxdocument_t;
55 typedef struct _gfxpage
57 gfxdocument_t*parent;
58 gfxcoord_t width;
59 gfxcoord_t height;
60 int nr;
61 void (*render)(struct _gfxpage*gfx, gfxdevice_t*output);
62 void (*rendersection)(struct _gfxpage*gfx, gfxdevice_t*output, gfxcoord_t x, gfxcoord_t y, gfxcoord_t x1, gfxcoord_t y1, gfxcoord_t x2, gfxcoord_t y2);
63 void (*destroy)(struct _gfxpage*page);
64 void*internal;
65 } gfxpage_t;
67 #ifdef __cplusplus
69 #endif
71 #endif //__gfxsource_h__