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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "../rute_base.h"
#include "../rute_manual.h"
#include <QPen>
#include "pen_ffi.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_swap(struct RUBase* self_c, struct RUBase* other) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->swap(*((QPen*)other));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int pen_style(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->style();
return s_pen_style_lookup[(int)ret_value];
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_style(struct RUBase* self_c, int arg0) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setStyle((Qt::PenStyle)s_pen_style_lookup[arg0]);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float pen_dash_offset(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->dashOffset();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_dash_offset(struct RUBase* self_c, float doffset) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setDashOffset(doffset);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float pen_miter_limit(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->miterLimit();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_miter_limit(struct RUBase* self_c, float limit) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setMiterLimit(limit);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float pen_width_f(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->widthF();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_width_f(struct RUBase* self_c, float width) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setWidthF(width);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int pen_width(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->width();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_width(struct RUBase* self_c, int width) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setWidth(width);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUColor pen_color(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->color();
WRColor* new_val = new WRColor();
*new_val = ret_value;
struct RUColor ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_color_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_color(struct RUBase* self_c, struct RUBase* color) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setColor(*((QColor*)color));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUBrush pen_brush(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->brush();
WRBrush* new_val = new WRBrush();
*new_val = ret_value;
struct RUBrush ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_brush_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_brush(struct RUBase* self_c, struct RUBase* brush) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setBrush(*((QBrush*)brush));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool pen_is_solid(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->isSolid();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int pen_cap_style(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->capStyle();
return s_pen_cap_style_lookup[(int)ret_value];
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_cap_style(struct RUBase* self_c, int pcs) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setCapStyle((Qt::PenCapStyle)s_pen_cap_style_lookup[pcs]);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int pen_join_style(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->joinStyle();
return s_pen_join_style_lookup[(int)ret_value];
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_join_style(struct RUBase* self_c, int pcs) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setJoinStyle((Qt::PenJoinStyle)s_pen_join_style_lookup[pcs]);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool pen_is_cosmetic(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->isCosmetic();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void pen_set_cosmetic(struct RUBase* self_c, bool cosmetic) {
WRPen* qt_value = (WRPen*)self_c;
qt_value->setCosmetic(cosmetic);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool pen_is_detached(struct RUBase* self_c) {
WRPen* qt_value = (WRPen*)self_c;
auto ret_value = qt_value->isDetached();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPen create_pen(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUPen, WRPen>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_pen_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void destroy_pen(struct RUBase* priv_data) {
destroy_generic<WRPen>(priv_data);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPenFuncs s_pen_funcs = {
destroy_pen,
pen_swap,
pen_style,
pen_set_style,
pen_dash_offset,
pen_set_dash_offset,
pen_miter_limit,
pen_set_miter_limit,
pen_width_f,
pen_set_width_f,
pen_width,
pen_set_width,
pen_color,
pen_set_color,
pen_brush,
pen_set_brush,
pen_is_solid,
pen_cap_style,
pen_set_cap_style,
pen_join_style,
pen_set_join_style,
pen_is_cosmetic,
pen_set_cosmetic,
pen_is_detached,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPenAllFuncs s_pen_all_funcs = {
&s_pen_funcs,
};