1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
// Programmed by Jedidiah Barber
// Released into the public domain
#include <FL/Fl_Printer.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Window.H>
#include "c_fl_printer.h"
// Flattened C API
PRINTER new_fl_printer(void) {
Fl_Printer *p = new Fl_Printer();
return p;
}
void free_fl_printer(PRINTER p) {
delete reinterpret_cast<Fl_Printer*>(p);
}
const char * fl_printer_get_dialog_title() {
return Fl_Printer::dialog_title;
}
void fl_printer_set_dialog_title(const char * v) {
Fl_Printer::dialog_title = v;
}
const char * fl_printer_get_dialog_printer() {
return Fl_Printer::dialog_printer;
}
void fl_printer_set_dialog_printer(const char * v) {
Fl_Printer::dialog_printer = v;
}
const char * fl_printer_get_dialog_range() {
return Fl_Printer::dialog_range;
}
void fl_printer_set_dialog_range(const char * v) {
Fl_Printer::dialog_range = v;
}
const char * fl_printer_get_dialog_copies() {
return Fl_Printer::dialog_copies;
}
void fl_printer_set_dialog_copies(const char * v) {
Fl_Printer::dialog_copies = v;
}
const char * fl_printer_get_dialog_all() {
return Fl_Printer::dialog_all;
}
void fl_printer_set_dialog_all(const char * v) {
Fl_Printer::dialog_all = v;
}
const char * fl_printer_get_dialog_pages() {
return Fl_Printer::dialog_pages;
}
void fl_printer_set_dialog_pages(const char * v) {
Fl_Printer::dialog_pages = v;
}
const char * fl_printer_get_dialog_from() {
return Fl_Printer::dialog_from;
}
void fl_printer_set_dialog_from(const char * v) {
Fl_Printer::dialog_from = v;
}
const char * fl_printer_get_dialog_to() {
return Fl_Printer::dialog_to;
}
void fl_printer_set_dialog_to(const char * v) {
Fl_Printer::dialog_to = v;
}
const char * fl_printer_get_dialog_properties() {
return Fl_Printer::dialog_properties;
}
void fl_printer_set_dialog_properties(const char * v) {
Fl_Printer::dialog_properties = v;
}
const char * fl_printer_get_dialog_copyno() {
return Fl_Printer::dialog_copyNo;
}
void fl_printer_set_dialog_copyno(const char * v) {
Fl_Printer::dialog_copyNo = v;
}
const char * fl_printer_get_dialog_print_button() {
return Fl_Printer::dialog_print_button;
}
void fl_printer_set_dialog_print_button(const char * v) {
Fl_Printer::dialog_print_button = v;
}
const char * fl_printer_get_dialog_cancel_button() {
return Fl_Printer::dialog_cancel_button;
}
void fl_printer_set_dialog_cancel_button(const char * v) {
Fl_Printer::dialog_cancel_button = v;
}
const char * fl_printer_get_dialog_print_to_file() {
return Fl_Printer::dialog_print_to_file;
}
void fl_printer_set_dialog_print_to_file(const char * v) {
Fl_Printer::dialog_print_to_file = v;
}
const char * fl_printer_get_property_title() {
return Fl_Printer::property_title;
}
void fl_printer_set_property_title(const char * v) {
Fl_Printer::property_title = v;
}
const char * fl_printer_get_property_pagesize() {
return Fl_Printer::property_pagesize;
}
void fl_printer_set_property_pagesize(const char * v) {
Fl_Printer::property_pagesize = v;
}
const char * fl_printer_get_property_mode() {
return Fl_Printer::property_mode;
}
void fl_printer_set_property_mode(const char * v) {
Fl_Printer::property_mode = v;
}
const char * fl_printer_get_property_use() {
return Fl_Printer::property_use;
}
void fl_printer_set_property_use(const char * v) {
Fl_Printer::property_use = v;
}
const char * fl_printer_get_property_save() {
return Fl_Printer::property_save;
}
void fl_printer_set_property_save(const char * v) {
Fl_Printer::property_save = v;
}
const char * fl_printer_get_property_cancel() {
return Fl_Printer::property_cancel;
}
void fl_printer_set_property_cancel(const char * v) {
Fl_Printer::property_cancel = v;
}
int fl_printer_start_job(PRINTER p, int c) {
return reinterpret_cast<Fl_Printer*>(p)->start_job(c, 0, 0);
}
int fl_printer_start_job2(PRINTER p, int c, int * f, int * t) {
return reinterpret_cast<Fl_Printer*>(p)->start_job(c, f, t);
}
void fl_printer_end_job(PRINTER p) {
reinterpret_cast<Fl_Printer*>(p)->end_job();
}
int fl_printer_start_page(PRINTER p) {
return reinterpret_cast<Fl_Printer*>(p)->start_page();
}
int fl_printer_end_page(PRINTER p) {
return reinterpret_cast<Fl_Printer*>(p)->end_page();
}
void fl_printer_margins(PRINTER p, int * l, int * t, int * r, int * b) {
reinterpret_cast<Fl_Printer*>(p)->margins(l,t,r,b);
}
int fl_printer_printable_rect(PRINTER p, int * w, int * h) {
return reinterpret_cast<Fl_Printer*>(p)->printable_rect(w,h);
}
void fl_printer_get_origin(PRINTER p, int * x, int * y) {
reinterpret_cast<Fl_Printer*>(p)->origin(x,y);
}
void fl_printer_set_origin(PRINTER p, int x, int y) {
reinterpret_cast<Fl_Printer*>(p)->origin(x,y);
}
void fl_printer_rotate(PRINTER p, float r) {
reinterpret_cast<Fl_Printer*>(p)->rotate(r);
}
void fl_printer_scale(PRINTER p, float x, float y) {
reinterpret_cast<Fl_Printer*>(p)->scale(x,y);
}
void fl_printer_translate(PRINTER p, int x, int y) {
reinterpret_cast<Fl_Printer*>(p)->translate(x,y);
}
void fl_printer_untranslate(PRINTER p) {
reinterpret_cast<Fl_Printer*>(p)->untranslate();
}
void fl_printer_print_widget(PRINTER p, void * i, int dx, int dy) {
reinterpret_cast<Fl_Printer*>(p)->print_widget(reinterpret_cast<Fl_Widget*>(i),dx,dy);
}
void fl_printer_print_window_part(PRINTER p, void * i, int x, int y,
int w, int h, int dx, int dy)
{
reinterpret_cast<Fl_Printer*>(p)->print_window_part(reinterpret_cast<Fl_Window*>(i),x,y,w,h,dx,dy);
}
void fl_printer_set_current(PRINTER p) {
reinterpret_cast<Fl_Printer*>(p)->set_current();
}
|