added missing const keywords
[swftools.git] / lib / gfxsource.h
1 /* pdfswf.h
2    Header file for pdfswf.cc.
3
4    Part of the swftools package.
5
6    Copyright (c) 2001 Matthias Kramm <kramm@quiss.org> 
7  
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.
12
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.
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 #ifndef __gfxsource_h__
23 #define __gfxsource_h__
24
25 #include "gfxdevice.h"
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 struct _gfxdocument;
32 struct _gfxpage;
33
34 typedef struct _gfxsource
35 {
36     void                 (*set_parameter)(const char*name, const char*value);
37     struct _gfxdocument* (*open)(const char*filename);
38     void*internal;
39 } gfxsource_t;
40
41 typedef struct _gfxdocument
42 {
43     gfxsource_t*driver;
44     int num_pages;
45     void* (*get)(struct _gfxdocument*gfx, const char*name);
46     void  (*destroy)(struct _gfxdocument*gfx);
47     void  (*set_parameter)(struct _gfxdocument*gfx, const char*name, const char*value);
48     char* (*getinfo)(struct _gfxdocument*gfx, const char*key);
49     struct _gfxpage* (*getpage)(struct _gfxdocument*gfx, int page);
50     void*internal;
51 } gfxdocument_t;
52
53 typedef struct _gfxpage
54 {
55     gfxdocument_t*parent;
56     gfxcoord_t width;
57     gfxcoord_t height;
58     int nr;
59     void (*render)(struct _gfxpage*gfx, gfxdevice_t*output);
60     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);
61     void (*destroy)(struct _gfxpage*page);
62     void*internal;
63 } gfxpage_t;
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif //__gfxsource_h__