1 #ifndef __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__
2 #define __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__
4 /*
5 * Windows stuff
6 *
7 * Author:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * Ted Gould <ted@gould.cx>
10 *
11 * Lauris: This code is in public domain
12 * Ted: This code is released under the GNU GPL
13 */
15 #include <config.h>
17 #ifndef WIN32
18 #error "This file is only usable for Windows"
19 #endif
21 #ifdef DATADIR
22 #undef DATADIR
23 #endif
24 #include <windows.h>
26 #include "extension/extension.h"
27 #include "extension/implementation/implementation.h"
29 namespace Inkscape {
30 namespace Extension {
31 namespace Internal {
33 /* Initialization */
35 class PrintWin32 : public Inkscape::Extension::Implementation::Implementation {
36 /* Document dimensions */
37 float _PageWidth;
38 float _PageHeight;
40 HDC _hDC;
42 unsigned int _landscape;
44 void main_init (int argc, char **argv, const char *name);
45 void finish (void);
47 /* File dialogs */
48 char *get_open_filename (unsigned char *dir, unsigned char *filter, unsigned char *title);
49 char *get_write_filename (unsigned char *dir, unsigned char *filter, unsigned char *title);
50 char *get_save_filename (unsigned char *dir, unsigned int *spns);
52 VOID CALLBACK timer (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
55 public:
56 PrintWin32 (void);
57 virtual ~PrintWin32 (void);
59 /* Tell modules about me */
60 static void init (void);
62 /* Platform detection */
63 static gboolean is_os_wide();
65 /* Print functions */
66 virtual unsigned int setup (Inkscape::Extension::Print * module);
67 //virtual unsigned int set_preview (Inkscape::Extension::Print * module);
69 virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
70 virtual unsigned int finish (Inkscape::Extension::Print * module);
72 /* Rendering methods */
73 /*
74 virtual unsigned int bind (Inkscape::Extension::Print * module, const NRMatrix *transform, float opacity);
75 virtual unsigned int release (Inkscape::Extension::Print * module);
76 virtual unsigned int comment (Inkscape::Extension::Print * module, const char * comment);
77 virtual unsigned int fill (Inkscape::Extension::Print * module, const NRBPath *bpath, const NRMatrix *ctm, const SPStyle *style,
78 const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
79 virtual unsigned int stroke (Inkscape::Extension::Print * module, const NRBPath *bpath, const NRMatrix *transform, const SPStyle *style,
80 const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
81 virtual unsigned int image (Inkscape::Extension::Print * module, unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
82 const NRMatrix *transform, const SPStyle *style);
83 */
85 };
87 } /* namespace Internal */
88 } /* namespace Extension */
89 } /* namespace Inkscape */
91 #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__ */