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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "../rute_base.h"
#include "../rute_manual.h"
#include <QPoint>
#include "point_ffi.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static bool point_is_null(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->isNull();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_x(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->x();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_y(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->y();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void point_set_x(struct RUBase* self_c, int x) {
WRPoint* qt_value = (WRPoint*)self_c;
qt_value->setX(x);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void point_set_y(struct RUBase* self_c, int y) {
WRPoint* qt_value = (WRPoint*)self_c;
qt_value->setY(y);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_manhattan_length(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->manhattanLength();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_rx(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->rx();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_ry(struct RUBase* self_c) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->ry();
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static int point_dot_product(struct RUBase* self_c, struct RUBase* p1, struct RUBase* p2) {
WRPoint* qt_value = (WRPoint*)self_c;
auto ret_value = qt_value->dotProduct(*((QPoint*)p1), *((QPoint*)p2));
return ret_value;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint create_point(
struct RUBase* priv_data,
RUDeleteCallback delete_callback,
void* private_user_data)
{
auto ctl = generic_create_func_with_delete<struct RUPoint, WRPoint>(priv_data, delete_callback, private_user_data);
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void destroy_point(struct RUBase* priv_data) {
destroy_generic<WRPoint>(priv_data);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUPoint get_point(struct RUBase* priv_data) {
(void)priv_data;
RUPoint ctl;
ctl.qt_data = nullptr;
ctl.host_data = nullptr;
ctl.all_funcs = &s_point_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPointFuncs s_point_funcs = {
destroy_point,
point_is_null,
point_x,
point_y,
point_set_x,
point_set_y,
point_manhattan_length,
point_rx,
point_ry,
point_dot_product,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUPointAllFuncs s_point_all_funcs = {
&s_point_funcs,
};