mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
LVGL compilation of lv_menu (#22188)
This commit is contained in:
parent
3707d4b239
commit
330cfe8b4d
@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Autoconf prevent 'init.bat' from stopping on empty lines (#22158)
|
- Autoconf prevent 'init.bat' from stopping on empty lines (#22158)
|
||||||
- Compilation exception when metrics not found (#22170)
|
- Compilation exception when metrics not found (#22170)
|
||||||
- ESP8266 Exception 3 on tasmota-minimal caused by unaligned PROGMEM (#22169)
|
- ESP8266 Exception 3 on tasmota-minimal caused by unaligned PROGMEM (#22169)
|
||||||
|
- LVGL compilation of lv_menu
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -1521,6 +1521,26 @@ set_day_names|comptr||[lv_calendar_set_day_names](https://docs.lvgl.io/9.0/searc
|
|||||||
set_showed_date|int, int||[lv_calendar_set_showed_date](https://docs.lvgl.io/9.0/search.html?q=lv_calendar_set_showed_date)
|
set_showed_date|int, int||[lv_calendar_set_showed_date](https://docs.lvgl.io/9.0/search.html?q=lv_calendar_set_showed_date)
|
||||||
set_today_date|int, int, int||[lv_calendar_set_today_date](https://docs.lvgl.io/9.0/search.html?q=lv_calendar_set_today_date)
|
set_today_date|int, int, int||[lv_calendar_set_today_date](https://docs.lvgl.io/9.0/search.html?q=lv_calendar_set_today_date)
|
||||||
|
|
||||||
|
### widget `lv.menu_page`
|
||||||
|
|
||||||
|
Method|Arguments|Return type|LVGL equivalent
|
||||||
|
:---|:---|:---|:---
|
||||||
|
|
||||||
|
### widget `lv.menu_cont`
|
||||||
|
|
||||||
|
Method|Arguments|Return type|LVGL equivalent
|
||||||
|
:---|:---|:---|:---
|
||||||
|
|
||||||
|
### widget `lv.menu_section`
|
||||||
|
|
||||||
|
Method|Arguments|Return type|LVGL equivalent
|
||||||
|
:---|:---|:---|:---
|
||||||
|
|
||||||
|
### widget `lv.menu_separator`
|
||||||
|
|
||||||
|
Method|Arguments|Return type|LVGL equivalent
|
||||||
|
:---|:---|:---|:---
|
||||||
|
|
||||||
### widget `lv.menu`
|
### widget `lv.menu`
|
||||||
|
|
||||||
Method|Arguments|Return type|LVGL equivalent
|
Method|Arguments|Return type|LVGL equivalent
|
||||||
|
@ -1148,6 +1148,30 @@ const be_ntv_func_def_t lv_menu_func[] = {
|
|||||||
};
|
};
|
||||||
#endif // BE_LV_WIDGET_MENU
|
#endif // BE_LV_WIDGET_MENU
|
||||||
|
|
||||||
|
/* `lv_menu_page` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_PAGE
|
||||||
|
const be_ntv_func_def_t lv_menu_page_func[] = {
|
||||||
|
};
|
||||||
|
#endif // BE_LV_WIDGET_MENU_PAGE
|
||||||
|
|
||||||
|
/* `lv_menu_cont` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_CONT
|
||||||
|
const be_ntv_func_def_t lv_menu_cont_func[] = {
|
||||||
|
};
|
||||||
|
#endif // BE_LV_WIDGET_MENU_CONT
|
||||||
|
|
||||||
|
/* `lv_menu_section` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SECTION
|
||||||
|
const be_ntv_func_def_t lv_menu_section_func[] = {
|
||||||
|
};
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SECTION
|
||||||
|
|
||||||
|
/* `lv_menu_separator` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
|
const be_ntv_func_def_t lv_menu_separator_func[] = {
|
||||||
|
};
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
|
|
||||||
/* `lv_msgbox` methods */
|
/* `lv_msgbox` methods */
|
||||||
#ifdef BE_LV_WIDGET_MSGBOX
|
#ifdef BE_LV_WIDGET_MSGBOX
|
||||||
const be_ntv_func_def_t lv_msgbox_func[] = {
|
const be_ntv_func_def_t lv_msgbox_func[] = {
|
||||||
@ -1423,6 +1447,10 @@ extern const bclass be_class_lv_led;
|
|||||||
extern const bclass be_class_lv_line;
|
extern const bclass be_class_lv_line;
|
||||||
extern const bclass be_class_lv_list;
|
extern const bclass be_class_lv_list;
|
||||||
extern const bclass be_class_lv_menu;
|
extern const bclass be_class_lv_menu;
|
||||||
|
extern const bclass be_class_lv_menu_cont;
|
||||||
|
extern const bclass be_class_lv_menu_page;
|
||||||
|
extern const bclass be_class_lv_menu_section;
|
||||||
|
extern const bclass be_class_lv_menu_separator;
|
||||||
extern const bclass be_class_lv_msgbox;
|
extern const bclass be_class_lv_msgbox;
|
||||||
extern const bclass be_class_lv_obj;
|
extern const bclass be_class_lv_obj;
|
||||||
extern const bclass be_class_lv_qrcode;
|
extern const bclass be_class_lv_qrcode;
|
||||||
@ -1507,6 +1535,18 @@ const be_ntv_class_def_t lv_classes[] = {
|
|||||||
#ifdef BE_LV_WIDGET_MENU
|
#ifdef BE_LV_WIDGET_MENU
|
||||||
{ "lv_menu", &be_class_lv_menu, lv_menu_func, sizeof(lv_menu_func) / sizeof(lv_menu_func[0]) },
|
{ "lv_menu", &be_class_lv_menu, lv_menu_func, sizeof(lv_menu_func) / sizeof(lv_menu_func[0]) },
|
||||||
#endif // BE_LV_WIDGET_MENU
|
#endif // BE_LV_WIDGET_MENU
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_CONT
|
||||||
|
{ "lv_menu_cont", &be_class_lv_menu_cont, lv_menu_cont_func, sizeof(lv_menu_cont_func) / sizeof(lv_menu_cont_func[0]) },
|
||||||
|
#endif // BE_LV_WIDGET_MENU_CONT
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_PAGE
|
||||||
|
{ "lv_menu_page", &be_class_lv_menu_page, lv_menu_page_func, sizeof(lv_menu_page_func) / sizeof(lv_menu_page_func[0]) },
|
||||||
|
#endif // BE_LV_WIDGET_MENU_PAGE
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SECTION
|
||||||
|
{ "lv_menu_section", &be_class_lv_menu_section, lv_menu_section_func, sizeof(lv_menu_section_func) / sizeof(lv_menu_section_func[0]) },
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SECTION
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
|
{ "lv_menu_separator", &be_class_lv_menu_separator, lv_menu_separator_func, sizeof(lv_menu_separator_func) / sizeof(lv_menu_separator_func[0]) },
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
#ifdef BE_LV_WIDGET_MSGBOX
|
#ifdef BE_LV_WIDGET_MSGBOX
|
||||||
{ "lv_msgbox", &be_class_lv_msgbox, lv_msgbox_func, sizeof(lv_msgbox_func) / sizeof(lv_msgbox_func[0]) },
|
{ "lv_msgbox", &be_class_lv_msgbox, lv_msgbox_func, sizeof(lv_msgbox_func) / sizeof(lv_msgbox_func[0]) },
|
||||||
#endif // BE_LV_WIDGET_MSGBOX
|
#endif // BE_LV_WIDGET_MSGBOX
|
||||||
@ -1655,21 +1695,25 @@ const size_t lv_classes_size = sizeof(lv_classes) / sizeof(lv_classes[0]);
|
|||||||
int be_ntv_lv_list_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_list_create, "+_p", "(lv.obj)"); }
|
int be_ntv_lv_list_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_list_create, "+_p", "(lv.obj)"); }
|
||||||
#endif // BE_LV_WIDGET_LIST
|
#endif // BE_LV_WIDGET_LIST
|
||||||
/* `lv_menu` methods */
|
/* `lv_menu` methods */
|
||||||
#ifdef BE_LV_WIDGET_MENU
|
|
||||||
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_cont_create, "+_p", "(lv.obj)"); }
|
|
||||||
#endif // BE_LV_WIDGET_MENU
|
|
||||||
#ifdef BE_LV_WIDGET_MENU
|
#ifdef BE_LV_WIDGET_MENU
|
||||||
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_create, "+_p", "(lv.obj)"); }
|
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_create, "+_p", "(lv.obj)"); }
|
||||||
#endif // BE_LV_WIDGET_MENU
|
#endif // BE_LV_WIDGET_MENU
|
||||||
#ifdef BE_LV_WIDGET_MENU
|
/* `lv_menu_page` methods */
|
||||||
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_page_create, "+_p", "(lv.obj)c"); }
|
#ifdef BE_LV_WIDGET_MENU_PAGE
|
||||||
#endif // BE_LV_WIDGET_MENU
|
int be_ntv_lv_menu_page_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_page_create, "+_p", "(lv.obj)c"); }
|
||||||
#ifdef BE_LV_WIDGET_MENU
|
#endif // BE_LV_WIDGET_MENU_PAGE
|
||||||
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_section_create, "+_p", "(lv.obj)"); }
|
/* `lv_menu_cont` methods */
|
||||||
#endif // BE_LV_WIDGET_MENU
|
#ifdef BE_LV_WIDGET_MENU_CONT
|
||||||
#ifdef BE_LV_WIDGET_MENU
|
int be_ntv_lv_menu_cont_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_cont_create, "+_p", "(lv.obj)"); }
|
||||||
int be_ntv_lv_menu_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_separator_create, "+_p", "(lv.obj)"); }
|
#endif // BE_LV_WIDGET_MENU_CONT
|
||||||
#endif // BE_LV_WIDGET_MENU
|
/* `lv_menu_section` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SECTION
|
||||||
|
int be_ntv_lv_menu_section_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_section_create, "+_p", "(lv.obj)"); }
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SECTION
|
||||||
|
/* `lv_menu_separator` methods */
|
||||||
|
#ifdef BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
|
int be_ntv_lv_menu_separator_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_menu_separator_create, "+_p", "(lv.obj)"); }
|
||||||
|
#endif // BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
/* `lv_msgbox` methods */
|
/* `lv_msgbox` methods */
|
||||||
#ifdef BE_LV_WIDGET_MSGBOX
|
#ifdef BE_LV_WIDGET_MSGBOX
|
||||||
int be_ntv_lv_msgbox_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_msgbox_create, "+_p", "(lv.obj)"); }
|
int be_ntv_lv_msgbox_init(bvm *vm) { return be_call_c_func(vm, (void*) &lv_msgbox_create, "+_p", "(lv.obj)"); }
|
||||||
|
@ -60,6 +60,10 @@ extern int be_ntv_lv_led_init(bvm *vm);
|
|||||||
extern int be_ntv_lv_line_init(bvm *vm);
|
extern int be_ntv_lv_line_init(bvm *vm);
|
||||||
extern int be_ntv_lv_list_init(bvm *vm);
|
extern int be_ntv_lv_list_init(bvm *vm);
|
||||||
extern int be_ntv_lv_menu_init(bvm *vm);
|
extern int be_ntv_lv_menu_init(bvm *vm);
|
||||||
|
extern int be_ntv_lv_menu_page_init(bvm *vm);
|
||||||
|
extern int be_ntv_lv_menu_cont_init(bvm *vm);
|
||||||
|
extern int be_ntv_lv_menu_section_init(bvm *vm);
|
||||||
|
extern int be_ntv_lv_menu_separator_init(bvm *vm);
|
||||||
extern int be_ntv_lv_msgbox_init(bvm *vm);
|
extern int be_ntv_lv_msgbox_init(bvm *vm);
|
||||||
extern int be_ntv_lv_roller_init(bvm *vm);
|
extern int be_ntv_lv_roller_init(bvm *vm);
|
||||||
extern int be_ntv_lv_scale_init(bvm *vm);
|
extern int be_ntv_lv_scale_init(bvm *vm);
|
||||||
@ -100,6 +104,10 @@ extern const bclass be_class_lv_led;
|
|||||||
extern const bclass be_class_lv_line;
|
extern const bclass be_class_lv_line;
|
||||||
extern const bclass be_class_lv_list;
|
extern const bclass be_class_lv_list;
|
||||||
extern const bclass be_class_lv_menu;
|
extern const bclass be_class_lv_menu;
|
||||||
|
extern const bclass be_class_lv_menu_cont;
|
||||||
|
extern const bclass be_class_lv_menu_page;
|
||||||
|
extern const bclass be_class_lv_menu_section;
|
||||||
|
extern const bclass be_class_lv_menu_separator;
|
||||||
extern const bclass be_class_lv_msgbox;
|
extern const bclass be_class_lv_msgbox;
|
||||||
extern const bclass be_class_lv_obj;
|
extern const bclass be_class_lv_obj;
|
||||||
extern const bclass be_class_lv_qrcode;
|
extern const bclass be_class_lv_qrcode;
|
||||||
@ -478,6 +486,50 @@ class be_class_lv_menu (scope: global, name: lv_menu, super: be_class_lv_obj, st
|
|||||||
}
|
}
|
||||||
@const_object_info_end */
|
@const_object_info_end */
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: lv_menu_page
|
||||||
|
********************************************************************/
|
||||||
|
#include "be_fixed_be_class_lv_menu_page.h"
|
||||||
|
/* @const_object_info_begin
|
||||||
|
class be_class_lv_menu_page (scope: global, name: lv_menu_page, super: be_class_lv_obj, strings: weak) {
|
||||||
|
init, func(be_ntv_lv_menu_page_init)
|
||||||
|
_class, comptr(&lv_menu_page_class)
|
||||||
|
}
|
||||||
|
@const_object_info_end */
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: lv_menu_cont
|
||||||
|
********************************************************************/
|
||||||
|
#include "be_fixed_be_class_lv_menu_cont.h"
|
||||||
|
/* @const_object_info_begin
|
||||||
|
class be_class_lv_menu_cont (scope: global, name: lv_menu_cont, super: be_class_lv_obj, strings: weak) {
|
||||||
|
init, func(be_ntv_lv_menu_cont_init)
|
||||||
|
_class, comptr(&lv_menu_cont_class)
|
||||||
|
}
|
||||||
|
@const_object_info_end */
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: lv_menu_section
|
||||||
|
********************************************************************/
|
||||||
|
#include "be_fixed_be_class_lv_menu_section.h"
|
||||||
|
/* @const_object_info_begin
|
||||||
|
class be_class_lv_menu_section (scope: global, name: lv_menu_section, super: be_class_lv_obj, strings: weak) {
|
||||||
|
init, func(be_ntv_lv_menu_section_init)
|
||||||
|
_class, comptr(&lv_menu_section_class)
|
||||||
|
}
|
||||||
|
@const_object_info_end */
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
** Solidified class: lv_menu_separator
|
||||||
|
********************************************************************/
|
||||||
|
#include "be_fixed_be_class_lv_menu_separator.h"
|
||||||
|
/* @const_object_info_begin
|
||||||
|
class be_class_lv_menu_separator (scope: global, name: lv_menu_separator, super: be_class_lv_obj, strings: weak) {
|
||||||
|
init, func(be_ntv_lv_menu_separator_init)
|
||||||
|
_class, comptr(&lv_menu_separator_class)
|
||||||
|
}
|
||||||
|
@const_object_info_end */
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: lv_msgbox
|
** Solidified class: lv_msgbox
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
@ -41,7 +41,9 @@ lv_widgets = ['obj',
|
|||||||
lv_widgets_no_class = ['span', 'scale_section'] # widgets that don't have a lv_obj class
|
lv_widgets_no_class = ['span', 'scale_section'] # widgets that don't have a lv_obj class
|
||||||
# extra widgets
|
# extra widgets
|
||||||
lv_widgets = lv_widgets + [ 'chart', 'imagebutton', 'led', 'msgbox', 'spinbox', 'spinner', 'keyboard', 'tabview', 'tileview' , 'list',
|
lv_widgets = lv_widgets + [ 'chart', 'imagebutton', 'led', 'msgbox', 'spinbox', 'spinner', 'keyboard', 'tabview', 'tileview' , 'list',
|
||||||
'animimg', 'calendar', 'menu']
|
'animimg', 'calendar',
|
||||||
|
'menu_page', 'menu_cont', 'menu_section', 'menu_separator', 'menu_sidebar_cont',
|
||||||
|
'menu_main_cont', 'menu_sidebar_header', 'menu_main_header_cont', 'menu']
|
||||||
|
|
||||||
# add qrcode
|
# add qrcode
|
||||||
lv_widgets = lv_widgets + [ 'qrcode' ]
|
lv_widgets = lv_widgets + [ 'qrcode' ]
|
||||||
|
@ -1247,6 +1247,12 @@
|
|||||||
#define BE_LV_WIDGET_LED
|
#define BE_LV_WIDGET_LED
|
||||||
#define BE_LV_WIDGET_LIST
|
#define BE_LV_WIDGET_LIST
|
||||||
// #define BE_LV_WIDGET_MENU
|
// #define BE_LV_WIDGET_MENU
|
||||||
|
#ifdef BE_LV_WIDGET_MENU // if menu is enabled, also enable sub-element classes
|
||||||
|
#define BE_LV_WIDGET_MENU_CONT
|
||||||
|
#define BE_LV_WIDGET_MENU_PAGE
|
||||||
|
#define BE_LV_WIDGET_MENU_SECTION
|
||||||
|
#define BE_LV_WIDGET_MENU_SEPARATOR
|
||||||
|
#endif // BE_LV_WIDGET_MENU
|
||||||
#define BE_LV_WIDGET_METER
|
#define BE_LV_WIDGET_METER
|
||||||
#define BE_LV_WIDGET_MSGBOX
|
#define BE_LV_WIDGET_MSGBOX
|
||||||
#define BE_LV_WIDGET_QRCODE
|
#define BE_LV_WIDGET_QRCODE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user