made interface a little more oo-like.
[swftools.git] / pdf2swf / SWFOutputDev.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 __pdf_h__
23 #define __pdf_h__
24
25 void pdfswf_setparameter(char*name, char*value);
26 void pdfswf_addfont(char*filename);
27 void pdfswf_preparepage(int page);
28
29 typedef struct _pdf_doc
30 {
31     char*info;
32     char*title;
33     int num_pages;
34     void*internal;
35 } pdf_doc_t;
36
37 pdf_doc_t*  pdf_init(char*filename, char*userPassword);
38 void pdf_destroy(pdf_doc_t*doc);
39
40 typedef struct _swf_output
41 {
42     int num_pages;
43     void*internal;
44 } swf_output_t;
45
46 swf_output_t* swf_output_init();
47 void swf_output_setparameter(swf_output_t*, char*name, char*value);
48 void swf_output_save(swf_output_t*, char*filename);
49
50 typedef struct _pdf_page
51 {
52     pdf_doc_t*parent;
53     int nr;
54     void*internal;
55 } pdf_page_t;
56
57 pdf_page_t* pdf_getpage(pdf_doc_t*doc, int page);
58 void pdf_page_render(pdf_page_t*page, swf_output_t*output);
59 void pdf_page_destroy(pdf_page_t*page);
60 void swf_output_destroy(swf_output_t*page);
61
62 typedef struct _pdf_page_info
63 {
64     int xMin, yMin, xMax, yMax;
65     int number_of_images;
66     int number_of_links;
67     int number_of_fonts;
68 } pdf_page_info_t;
69
70 pdf_page_info_t* pdf_getpageinfo(pdf_page_info_t*info);
71
72 #endif //__pdf_h__