1 /** @file
2 * @brief Windows-specific stuff
3 */
4 /* Author:
5 * Lauris Kaplinski <lauris@kaplinski.com>
6 * Ted Gould <ted@gould.cx>
7 *
8 * Lauris: This code is in public domain
9 * Ted: This code is released under the GNU GPL
10 */
12 #ifndef __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__
13 #define __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__
14 #ifdef WIN32
16 #ifdef HAVE_CONFIG_H
17 #include <config.h>
18 #endif
20 #ifdef DATADIR
21 #undef DATADIR
22 #endif
23 #include <windows.h>
25 #include "extension/extension.h"
26 #include "extension/implementation/implementation.h"
28 namespace Inkscape {
29 namespace Extension {
30 namespace Internal {
32 /* Initialization */
34 class PrintWin32 : public Inkscape::Extension::Implementation::Implementation {
35 /* Document dimensions */
36 float _PageWidth;
37 float _PageHeight;
39 HDC _hDC;
41 unsigned int _landscape;
43 void main_init (int argc, char **argv, const char *name);
44 void finish (void);
46 /* File dialogs */
47 char *get_open_filename (unsigned char *dir, unsigned char *filter, unsigned char *title);
48 char *get_write_filename (unsigned char *dir, unsigned char *filter, unsigned char *title);
49 char *get_save_filename (unsigned char *dir, unsigned int *spns);
51 VOID CALLBACK timer (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
54 public:
55 PrintWin32 (void);
56 virtual ~PrintWin32 (void);
58 /* Tell modules about me */
59 static void init (void);
61 /* Platform detection */
62 static gboolean is_os_wide();
64 /* Print functions */
65 virtual unsigned int setup (Inkscape::Extension::Print * module);
66 //virtual unsigned int set_preview (Inkscape::Extension::Print * module);
68 virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
69 virtual unsigned int finish (Inkscape::Extension::Print * module);
71 /* Rendering methods */
72 /*
73 virtual unsigned int bind (Inkscape::Extension::Print * module, const Geom::Matrix *transform, float opacity);
74 virtual unsigned int release (Inkscape::Extension::Print * module);
75 virtual unsigned int comment (Inkscape::Extension::Print * module, const char * comment);
76 virtual unsigned int image (Inkscape::Extension::Print * module, unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
77 const Geom::Matrix *transform, const SPStyle *style);
78 */
79 };
81 } /* namespace Internal */
82 } /* namespace Extension */
83 } /* namespace Inkscape */
85 #endif // ifdef WIN32
86 #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_WIN32_H__ */
87 /*
88 Local Variables:
89 mode:c++
90 c-file-style:"stroustrup"
91 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
92 indent-tabs-mode:nil
93 fill-column:99
94 End:
95 */
96 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :