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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is auto-generated by rute_gen. DO NOT EDIT
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "../rute_base.h"
#include "../rute_manual.h"
#include <QBitmap>
#include "bitmap_ffi.h"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void bitmap_swap(struct RUBase* self_c, struct RUBase* other) {
QBitmap* qt_value = (QBitmap*)self_c;
qt_value->swap(*((QBitmap*)other));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void bitmap_clear(struct RUBase* self_c) {
QBitmap* qt_value = (QBitmap*)self_c;
qt_value->clear();
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUBitmap bitmap_from_image(struct RUBase* self_c, struct RUBase* image, int flags) {
QBitmap* qt_value = (QBitmap*)self_c;
auto ret_value = qt_value->fromImage(*((QImage*)image), (Qt::ImageConversionFlags)s_image_conversion_flags_lookup[flags]);
QBitmap* new_val = new QBitmap();
*new_val = ret_value;
struct RUBitmap ctl;
ctl.qt_data = (struct RUBase*)new_val;
ctl.host_data = (struct RUBase*)s_host_data_lookup[(void*)new_val];
ctl.all_funcs = &s_bitmap_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUBitmap create_bitmap(struct RUBase* priv_data) {
auto ctl = generic_create_func<struct RUBitmap, QBitmap>(priv_data);
ctl.all_funcs = &s_bitmap_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void destroy_bitmap(struct RUBase* priv_data) {
destroy_generic<QBitmap>(priv_data);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static struct RUBitmap get_bitmap(struct RUBase* priv_data) {
(void)priv_data;
RUBitmap ctl;
ctl.qt_data = nullptr;
ctl.host_data = nullptr;
ctl.all_funcs = &s_bitmap_all_funcs;
return ctl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUBitmapFuncs s_bitmap_funcs = {
destroy_bitmap,
bitmap_swap,
bitmap_clear,
bitmap_from_image,
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct RUBitmapAllFuncs s_bitmap_all_funcs = {
&s_paint_device_funcs,
&s_pixmap_funcs,
&s_bitmap_funcs,
};