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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "../rute_base.h"
#include "../rute_manual.h"
#include <QLine>
#include "line_ffi.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool line_is_null(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->isNull();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint line_p1(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->p1();
WRPoint* new_val = new WRPoint();
*new_val = ret_value;
struct RUPoint ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint line_p2(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->p2();
WRPoint* new_val = new WRPoint();
*new_val = ret_value;
struct RUPoint ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_x1(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->x1();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_y1(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->y1();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_x2(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->x2();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_y2(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->y2();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_dx(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->dx();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int line_dy(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->dy();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint line_center(struct RUBase* self_c) {
WRLine* qt_value = (WRLine*)self_c;
auto ret_value = qt_value->center();
WRPoint* new_val = new WRPoint();
*new_val = ret_value;
struct RUPoint ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void line_set_p1(struct RUBase* self_c, struct RUBase* p1) {
WRLine* qt_value = (WRLine*)self_c;
qt_value->setP1(*((WRPoint*)p1));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void line_set_p2(struct RUBase* self_c, struct RUBase* p2) {
WRLine* qt_value = (WRLine*)self_c;
qt_value->setP2(*((WRPoint*)p2));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void line_set_points(struct RUBase* self_c, struct RUBase* p1, struct RUBase* p2) {
WRLine* qt_value = (WRLine*)self_c;
qt_value->setPoints(*((WRPoint*)p1), *((WRPoint*)p2));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void line_set_line(struct RUBase* self_c, int x1, int y1, int x2, int y2) {
WRLine* qt_value = (WRLine*)self_c;
qt_value->setLine(x1, y1, x2, y2);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RULine create_line(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RULine, WRLine>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_line_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void destroy_line(struct RUBase* priv_data) {
destroy_generic<WRLine>(priv_data);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RULineFuncs s_line_funcs = {
destroy_line,
line_is_null,
line_p1,
line_p2,
line_x1,
line_y1,
line_x2,
line_y2,
line_dx,
line_dy,
line_center,
line_set_p1,
line_set_p2,
line_set_points,
line_set_line,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RULineAllFuncs s_line_all_funcs = {
&s_line_funcs,
};