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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "../rute_base.h"
#include "../rute_manual.h"
#include <QPointF>
#include "point_f_ffi.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_manhattan_length(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->manhattanLength();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool point_f_is_null(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->isNull();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_x(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->x();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_y(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->y();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void point_f_set_x(struct RUBase* self_c, float x) {
WRPointF* qt_value = (WRPointF*)self_c;
qt_value->setX(x);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void point_f_set_y(struct RUBase* self_c, float y) {
WRPointF* qt_value = (WRPointF*)self_c;
qt_value->setY(y);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_rx(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->rx();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_ry(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->ry();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static float point_f_dot_product(struct RUBase* self_c, struct RUBase* p1, struct RUBase* p2) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->dotProduct(*((WRPointF*)p1), *((WRPointF*)p2));
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint point_f_to_point(struct RUBase* self_c) {
WRPointF* qt_value = (WRPointF*)self_c;
auto ret_value = qt_value->toPoint();
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 RUPointF create_point_f(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUPointF, WRPointF>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_point_f_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void destroy_point_f(struct RUBase* priv_data) {
destroy_generic<WRPointF>(priv_data);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPointF get_point_f(struct RUBase* priv_data) {
(void)priv_data;
RUPointF ctl;
ctl.qt_data = nullptr;
ctl.host_data = nullptr;
ctl.all_funcs = &s_point_f_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPointFFuncs s_point_f_funcs = {
destroy_point_f,
point_f_manhattan_length,
point_f_is_null,
point_f_x,
point_f_y,
point_f_set_x,
point_f_set_y,
point_f_rx,
point_f_ry,
point_f_dot_product,
point_f_to_point,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPointFAllFuncs s_point_f_all_funcs = {
&s_point_f_funcs,
};