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
|
#include "luavgl.h"
#include "private.h"
#if LV_USE_BAR
#include "bar.c"
#endif
#if LV_USE_BTN
#include "btn.c"
#endif
#if LV_USE_CALENDAR
#include "calendar.c"
#endif
#if LV_USE_CHECKBOX
#include "checkbox.c"
#endif
#if LV_USE_DROPDOWN
#include "dropdown.c"
#endif
#if LV_USE_IMAGE
#include "img.c"
#endif
#if LV_USE_KEYBOARD
#include "keyboard.c"
#endif
#if LV_USE_LABEL
#include "label.c"
#endif
#if LV_USE_LED
#include "led.c"
#endif
#if LV_USE_LIST
#include "list.c"
#endif
#if LV_USE_ROLLER
#include "roller.c"
#endif
#if LV_USE_SLIDER
#include "slider.c"
#endif
#if LV_USE_SWITCH
#include "switch.c"
#endif
#if LV_USE_TEXTAREA
#include "textarea.c"
#endif
static int luavgl_obj_create(lua_State *L);
static const luaL_Reg widget_create_methods[] = {
{"Object", luavgl_obj_create },
#if LV_USE_BAR
{"Bar", luavgl_bar_create},
#endif
#if LV_USE_BTN
{"Button", luavgl_btn_create},
#endif
#if LV_USE_CALENDAR
{"Calendar", luavgl_calendar_create},
#endif
#if LV_USE_CHECKBOX
{"Checkbox", luavgl_checkbox_create},
#endif
#if LV_USE_DROPDOWN
{"Dropdown", luavgl_dropdown_create},
#endif
#if LV_USE_IMAGE
{"Image", luavgl_img_create },
#endif
#if LV_USE_KEYBOARD
{"Keyboard", luavgl_keyboard_create},
#endif
#if LV_USE_LABEL
{"Label", luavgl_label_create },
#endif
#if LV_USE_LED
{"Led", luavgl_led_create },
#endif
#if LV_USE_LIST
{"List", luavgl_list_create },
#endif
#if LV_USE_ROLLER
{"Roller", luavgl_roller_create },
#endif
#if LV_USE_SLIDER
{"Slider", luavgl_slider_create},
#endif
#if LV_USE_SWITCH
{"Switch", luavgl_switch_create},
#endif
#if LV_USE_TEXTAREA
{"Textarea", luavgl_textarea_create},
#endif
{NULL, NULL }
};
static void luavgl_widgets_init(lua_State *L)
{
#if LV_USE_IMAGE
luavgl_img_init(L);
#endif
#if LV_USE_LABEL
luavgl_label_init(L);
#endif
#if LV_USE_LED
luavgl_led_init(L);
#endif
#if LV_USE_LIST
luavgl_list_init(L);
#endif
#if LV_USE_TEXTAREA
luavgl_textarea_init(L);
#endif
#if LV_USE_KEYBOARD
luavgl_keyboard_init(L);
#endif
#if LV_USE_CHECKBOX
luavgl_checkbox_init(L);
#endif
#if LV_USE_CALENDAR
luavgl_calendar_init(L);
#endif
#if LV_USE_ROLLER
luavgl_roller_init(L);
#endif
#if LV_USE_DROPDOWN
luavgl_dropdown_init(L);
#endif
#if LV_USE_BTN
luavgl_btn_init(L);
#endif
#if LV_USE_BAR
luavgl_bar_init(L);
#endif
#if LV_USE_SLIDER
luavgl_slider_init(L);
#endif
#if LV_USE_SWITCH
luavgl_switch_init(L);
#endif
}
|