From c47e9883490751af0021ea009f93302a292e9cd1 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 12 Mar 2022 17:45:16 +0100 Subject: [PATCH] Lvgl cleaned berry mapping (#15111) * lv module * More classes * String literals * Missed one --- lib/libesp32/berry/generate/be_const_strtab.h | 1 + .../berry/generate/be_const_strtab_def.h | 5 +- lib/libesp32/berry/generate/be_fixed_lv.h | 18 ++ .../lv_berry/generate/be_lvgl_module.c | 21 +- .../lv_berry/generate/be_lvgl_widgets_lib.c | 232 +++++++++--------- lib/libesp32_lvgl/lv_berry/tools/convert.py | 121 +++++---- 6 files changed, 202 insertions(+), 196 deletions(-) create mode 100644 lib/libesp32/berry/generate/be_fixed_lv.h diff --git a/lib/libesp32/berry/generate/be_const_strtab.h b/lib/libesp32/berry/generate/be_const_strtab.h index 7a7120a83..106e58065 100644 --- a/lib/libesp32/berry/generate/be_const_strtab.h +++ b/lib/libesp32/berry/generate/be_const_strtab.h @@ -832,6 +832,7 @@ extern const bcstring be_const_str_time_str; extern const bcstring be_const_str_timer_cb; extern const bcstring be_const_str_to_gamma; extern const bcstring be_const_str_tob64; +extern const bcstring be_const_str_toint; extern const bcstring be_const_str_tolower; extern const bcstring be_const_str_tomap; extern const bcstring be_const_str_top; diff --git a/lib/libesp32/berry/generate/be_const_strtab_def.h b/lib/libesp32/berry/generate/be_const_strtab_def.h index 574ce83cc..da8b37677 100644 --- a/lib/libesp32/berry/generate/be_const_strtab_def.h +++ b/lib/libesp32/berry/generate/be_const_strtab_def.h @@ -351,7 +351,7 @@ be_define_const_str(deg, "deg", 3327754271u, 0, 3, &be_const_str_lv_event); be_define_const_str(deinit, "deinit", 2345559592u, 0, 6, NULL); be_define_const_str(del, "del", 3478752842u, 0, 3, &be_const_str_out_X20of_X20range); be_define_const_str(delay, "delay", 1322381784u, 0, 5, &be_const_str_splash); -be_define_const_str(delete_all_configs, "delete_all_configs", 2382067578u, 0, 18, NULL); +be_define_const_str(delete_all_configs, "delete_all_configs", 2382067578u, 0, 18, &be_const_str_toint); be_define_const_str(depower, "depower", 3563819571u, 0, 7, &be_const_str_files); be_define_const_str(deregister_obj, "deregister_obj", 3909966993u, 0, 14, &be_const_str_set_mode_rgb); be_define_const_str(destructor_cb, "destructor_cb", 1930283190u, 0, 13, NULL); @@ -824,6 +824,7 @@ be_define_const_str(time_str, "time_str", 2613827612u, 0, 8, NULL); be_define_const_str(timer_cb, "timer_cb", 79918026u, 0, 8, NULL); be_define_const_str(to_gamma, "to_gamma", 1597139862u, 0, 8, NULL); be_define_const_str(tob64, "tob64", 373777640u, 0, 5, &be_const_str_widget_struct_default); +be_define_const_str(toint, "toint", 3613182909u, 0, 5, NULL); be_define_const_str(tolower, "tolower", 1042520049u, 0, 7, NULL); be_define_const_str(tomap, "tomap", 612167626u, 0, 5, NULL); be_define_const_str(top, "top", 2802900028u, 0, 3, NULL); @@ -1368,6 +1369,6 @@ static const bstring* const m_string_table[] = { static const struct bconststrtab m_const_string_table = { .size = 447, - .count = 917, + .count = 918, .table = m_string_table }; diff --git a/lib/libesp32/berry/generate/be_fixed_lv.h b/lib/libesp32/berry/generate/be_fixed_lv.h new file mode 100644 index 000000000..93f1dc7e4 --- /dev/null +++ b/lib/libesp32/berry/generate/be_fixed_lv.h @@ -0,0 +1,18 @@ +#include "be_constobj.h" + +static be_define_const_map_slots(m_liblv_map) { + { be_const_key(init, -1), be_const_closure(lv_lv_module_init_closure) }, + { be_const_key(member, 0), be_const_func(lv0_member) }, +}; + +static be_define_const_map( + m_liblv_map, + 2 +); + +static be_define_const_module( + m_liblv, + "lv" +); + +BE_EXPORT_VARIABLE be_define_const_native_module(lv); diff --git a/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_module.c b/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_module.c index 81e71dc78..57f0d05b8 100644 --- a/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_module.c +++ b/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_module.c @@ -851,19 +851,12 @@ be_local_closure(lv_lv_module_init, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified module: lv -********************************************************************/ -be_local_module(lv, - "lv", - be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key(init, -1), be_const_closure(lv_lv_module_init_closure) }, - { be_const_key(member, 0), be_const_func(lv0_member) }, - })) -); -BE_EXPORT_VARIABLE be_define_const_native_module(lv); -/********************************************************************/ +/* @const_object_info_begin +module lv (scope: global, file: lv) { + init, closure(lv_lv_module_init_closure) + member, func(lv0_member) +} +@const_object_info_end */ +#include "be_fixed_lv.h" /********************************************************************/ diff --git a/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_widgets_lib.c b/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_widgets_lib.c index 72ef14a09..216f9390c 100644 --- a/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_widgets_lib.c +++ b/lib/libesp32_lvgl/lv_berry/generate/be_lvgl_widgets_lib.c @@ -1016,12 +1016,12 @@ be_local_class(lv_style, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv_be_style_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv_be_style_init) }, })), - (be_nested_const_str("lv_style", -143355747, 8)) + (be_str_literal("lv_style")) ); /*******************************************************************/ @@ -1033,13 +1033,13 @@ be_local_class(lv_obj, NULL, be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("tostring", -1995258651, 8, 3), be_const_func(lv_x_tostring) }, - { be_nested_key("member", 719708611, 6, -1), be_const_func(lv_x_member) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("init", 380752755, 4, 4), be_const_func(be_ntv_lv_obj_init) }, - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_obj_class) }, + { be_const_key(_class, 3), be_const_comptr(&lv_obj_class) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(tostring, 4), be_const_func(lv_x_tostring) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_obj_init) }, })), - (be_nested_const_str("lv_obj", -37134147, 6)) + (be_str_literal("lv_obj")) ); /*******************************************************************/ @@ -1051,12 +1051,12 @@ be_local_class(lv_group, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_group_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(be_ntv_lv_group_init) }, })), - (be_nested_const_str("lv_group", -442928277, 8)) + (be_str_literal("lv_group")) ); /*******************************************************************/ @@ -1068,12 +1068,12 @@ be_local_class(lv_indev, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), - (be_nested_const_str("lv_indev", 225602374, 8)) + (be_str_literal("lv_indev")) ); /*******************************************************************/ @@ -1085,12 +1085,12 @@ be_local_class(lv_disp, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), - (be_nested_const_str("lv_disp", 609712084, 8)) + (be_str_literal("lv_disp")) ); /*******************************************************************/ @@ -1102,10 +1102,10 @@ be_local_class(lv_timer, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), be_str_literal("lv_timer") ); @@ -1119,10 +1119,10 @@ be_local_class(lv_anim, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv_be_anim_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv_be_anim_init) }, })), be_str_literal("lv_anim") ); @@ -1136,11 +1136,11 @@ be_local_class(lv_font, NULL, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lvbe_font_create) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lvbe_font_create) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, })), - (be_nested_const_str("lv_font", 1550958453, 7)) + (be_str_literal("lv_font")) ); /*******************************************************************/ @@ -1152,11 +1152,11 @@ be_local_class(lv_theme, NULL, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lvbe_theme_create) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lvbe_theme_create) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, })), - (be_nested_const_str("lv_theme", 1550958453, 7)) + (be_str_literal("lv_theme")) ); /*******************************************************************/ @@ -1168,12 +1168,12 @@ be_local_class(lv_color, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("toint", -681784387, 5, -1), be_const_func(lco_toint) }, - { be_nested_key("tostring", -1995258651, 8, 0), be_const_func(lco_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(lco_init) }, + { be_const_key(toint, -1), be_const_func(lco_toint) }, + { be_const_key(tostring, 0), be_const_func(lco_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lco_init) }, })), - (be_nested_const_str("lv_color", 1419148319, 8)) + (be_str_literal("lv_color")) ); /*******************************************************************/ @@ -1210,10 +1210,10 @@ be_local_class(lv_img, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_img_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_img_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_img_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_img_init) }, })), - (be_nested_const_str("lv_img", 1612829968, 6)) + (be_str_literal("lv_img")) ); /*******************************************************************/ @@ -1256,10 +1256,10 @@ be_local_class(lv_chart, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_chart_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_chart_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_chart_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_chart_init) }, })), - (be_nested_const_str("lv_chart", 1612829968, 6)) + (be_str_literal("lv_chart")) ); /*******************************************************************/ @@ -1278,10 +1278,10 @@ be_local_class(lv_colorwheel, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_colorwheel_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_colorwheel_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_colorwheel_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_colorwheel_init) }, })), - (be_nested_const_str("lv_colorwheel", 1612829968, 6)) + (be_str_literal("lv_colorwheel")) ); /*******************************************************************/ @@ -1300,10 +1300,10 @@ be_local_class(lv_imgbtn, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_imgbtn_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_imgbtn_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_imgbtn_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_imgbtn_init) }, })), - (be_nested_const_str("lv_imgbtn", 1612829968, 6)) + (be_str_literal("lv_imgbtn")) ); /*******************************************************************/ @@ -1322,10 +1322,10 @@ be_local_class(lv_led, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_led_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_led_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_led_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_led_init) }, })), - (be_nested_const_str("lv_led", 1612829968, 6)) + (be_str_literal("lv_led")) ); /*******************************************************************/ @@ -1344,10 +1344,10 @@ be_local_class(lv_meter, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_meter_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_meter_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_meter_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_meter_init) }, })), - (be_nested_const_str("lv_meter", 1612829968, 6)) + (be_str_literal("lv_meter")) ); /*******************************************************************/ @@ -1366,10 +1366,10 @@ be_local_class(lv_msgbox, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_msgbox_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_msgbox_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_msgbox_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_msgbox_init) }, })), - (be_nested_const_str("lv_msgbox", 1612829968, 6)) + (be_str_literal("lv_msgbox")) ); /*******************************************************************/ @@ -1388,10 +1388,10 @@ be_local_class(lv_spinbox, &be_class_lv_textarea, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_spinbox_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_spinbox_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_spinbox_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_spinbox_init) }, })), - (be_nested_const_str("lv_spinbox", 1612829968, 6)) + (be_str_literal("lv_spinbox")) ); /*******************************************************************/ @@ -1410,10 +1410,10 @@ be_local_class(lv_spinner, &be_class_lv_arc, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_spinner_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_spinner_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_spinner_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_spinner_init) }, })), - (be_nested_const_str("lv_spinner", 1612829968, 6)) + (be_str_literal("lv_spinner")) ); /*******************************************************************/ @@ -1444,10 +1444,10 @@ be_local_class(lv_arc, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_arc_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_arc_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_arc_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_arc_init) }, })), - (be_nested_const_str("lv_arc", 1612829968, 6)) + (be_str_literal("lv_arc")) ); /*******************************************************************/ @@ -1466,10 +1466,10 @@ be_local_class(lv_bar, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_bar_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_bar_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_bar_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_bar_init) }, })), - (be_nested_const_str("lv_bar", 1612829968, 6)) + (be_str_literal("lv_bar")) ); /*******************************************************************/ @@ -1488,10 +1488,10 @@ be_local_class(lv_btn, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_btn_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_btn_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_btn_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_btn_init) }, })), - (be_nested_const_str("lv_btn", 1612829968, 6)) + (be_str_literal("lv_btn")) ); /*******************************************************************/ @@ -1510,10 +1510,10 @@ be_local_class(lv_btnmatrix, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_btnmatrix_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_btnmatrix_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_btnmatrix_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_btnmatrix_init) }, })), - (be_nested_const_str("lv_btnmatrix", 1612829968, 6)) + (be_str_literal("lv_btnmatrix")) ); /*******************************************************************/ @@ -1532,10 +1532,10 @@ be_local_class(lv_canvas, &be_class_lv_img, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_canvas_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_canvas_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_canvas_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_canvas_init) }, })), - (be_nested_const_str("lv_canvas", 1612829968, 6)) + (be_str_literal("lv_canvas")) ); /*******************************************************************/ @@ -1554,10 +1554,10 @@ be_local_class(lv_checkbox, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_checkbox_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_checkbox_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_checkbox_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_checkbox_init) }, })), - (be_nested_const_str("lv_checkbox", 1612829968, 6)) + (be_str_literal("lv_checkbox")) ); /*******************************************************************/ @@ -1576,10 +1576,10 @@ be_local_class(lv_dropdown, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_dropdown_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_dropdown_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_dropdown_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_dropdown_init) }, })), - (be_nested_const_str("lv_dropdown", 1612829968, 6)) + (be_str_literal("lv_dropdown")) ); /*******************************************************************/ @@ -1598,10 +1598,10 @@ be_local_class(lv_label, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_label_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_label_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_label_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_label_init) }, })), - (be_nested_const_str("lv_label", 1612829968, 6)) + (be_str_literal("lv_label")) ); /*******************************************************************/ @@ -1620,10 +1620,10 @@ be_local_class(lv_line, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_line_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_line_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_line_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_line_init) }, })), - (be_nested_const_str("lv_line", 1612829968, 6)) + (be_str_literal("lv_line")) ); /*******************************************************************/ @@ -1642,10 +1642,10 @@ be_local_class(lv_roller, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_roller_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_roller_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_roller_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_roller_init) }, })), - (be_nested_const_str("lv_roller", 1612829968, 6)) + (be_str_literal("lv_roller")) ); /*******************************************************************/ @@ -1664,10 +1664,10 @@ be_local_class(lv_slider, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_slider_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_slider_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_slider_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_slider_init) }, })), - (be_nested_const_str("lv_slider", 1612829968, 6)) + (be_str_literal("lv_slider")) ); /*******************************************************************/ @@ -1686,10 +1686,10 @@ be_local_class(lv_switch, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_switch_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_switch_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_switch_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_switch_init) }, })), - (be_nested_const_str("lv_switch", 1612829968, 6)) + (be_str_literal("lv_switch")) ); /*******************************************************************/ @@ -1708,10 +1708,10 @@ be_local_class(lv_table, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_table_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_table_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_table_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_table_init) }, })), - (be_nested_const_str("lv_table", 1612829968, 6)) + (be_str_literal("lv_table")) ); /*******************************************************************/ @@ -1730,10 +1730,10 @@ be_local_class(lv_textarea, &be_class_lv_obj, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_textarea_class) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_textarea_init) }, + { be_const_key(_class, -1), be_const_comptr(&lv_textarea_class) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_textarea_init) }, })), - (be_nested_const_str("lv_textarea", 1612829968, 6)) + (be_str_literal("lv_textarea")) ); /*******************************************************************/ diff --git a/lib/libesp32_lvgl/lv_berry/tools/convert.py b/lib/libesp32_lvgl/lv_berry/tools/convert.py index 9a6e7f3b7..63ad26edb 100644 --- a/lib/libesp32_lvgl/lv_berry/tools/convert.py +++ b/lib/libesp32_lvgl/lv_berry/tools/convert.py @@ -533,12 +533,12 @@ be_local_class(lv_style, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv_be_style_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv_be_style_init) }, })), - (be_nested_const_str("lv_style", -143355747, 8)) + (be_str_literal("lv_style")) ); /*******************************************************************/ @@ -550,13 +550,13 @@ be_local_class(lv_obj, NULL, be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("tostring", -1995258651, 8, 3), be_const_func(lv_x_tostring) }, - { be_nested_key("member", 719708611, 6, -1), be_const_func(lv_x_member) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("init", 380752755, 4, 4), be_const_func(be_ntv_lv_obj_init) }, - { be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_obj_class) }, + { be_const_key(_class, 3), be_const_comptr(&lv_obj_class) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(tostring, 4), be_const_func(lv_x_tostring) }, + { be_const_key(init, -1), be_const_func(be_ntv_lv_obj_init) }, })), - (be_nested_const_str("lv_obj", -37134147, 6)) + (be_str_literal("lv_obj")) ); /*******************************************************************/ @@ -568,12 +568,12 @@ be_local_class(lv_group, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_group_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(be_ntv_lv_group_init) }, })), - (be_nested_const_str("lv_group", -442928277, 8)) + (be_str_literal("lv_group")) ); /*******************************************************************/ @@ -585,12 +585,12 @@ be_local_class(lv_indev, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), - (be_nested_const_str("lv_indev", 225602374, 8)) + (be_str_literal("lv_indev")) ); /*******************************************************************/ @@ -602,12 +602,12 @@ be_local_class(lv_disp, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), - (be_nested_const_str("lv_disp", 609712084, 8)) + (be_str_literal("lv_disp")) ); /*******************************************************************/ @@ -619,10 +619,10 @@ be_local_class(lv_timer, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv0_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv0_init) }, })), be_str_literal("lv_timer") ); @@ -636,10 +636,10 @@ be_local_class(lv_anim, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lv_be_anim_init) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("member", 719708611, 6, 0), be_const_func(lv_x_member) }, + { be_const_key(member, -1), be_const_func(lv_x_member) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, 0), be_const_func(lv_be_anim_init) }, })), be_str_literal("lv_anim") ); @@ -653,11 +653,11 @@ be_local_class(lv_font, NULL, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lvbe_font_create) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lvbe_font_create) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, })), - (be_nested_const_str("lv_font", 1550958453, 7)) + (be_str_literal("lv_font")) ); /*******************************************************************/ @@ -669,11 +669,11 @@ be_local_class(lv_theme, NULL, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("init", 380752755, 4, -1), be_const_func(lvbe_theme_create) }, - { be_nested_key("tostring", -1995258651, 8, -1), be_const_func(lv_x_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lvbe_theme_create) }, + { be_const_key(tostring, -1), be_const_func(lv_x_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, })), - (be_nested_const_str("lv_theme", 1550958453, 7)) + (be_str_literal("lv_theme")) ); /*******************************************************************/ @@ -685,12 +685,12 @@ be_local_class(lv_color, NULL, be_nested_map(4, ( (struct bmapnode*) &(const bmapnode[]) { - { be_nested_key("toint", -681784387, 5, -1), be_const_func(lco_toint) }, - { be_nested_key("tostring", -1995258651, 8, 0), be_const_func(lco_tostring) }, - { be_nested_key("_p", 1594591802, 2, -1), be_const_var(0) }, - { be_nested_key("init", 380752755, 4, -1), be_const_func(lco_init) }, + { be_const_key(toint, -1), be_const_func(lco_toint) }, + { be_const_key(tostring, 0), be_const_func(lco_tostring) }, + { be_const_key(_p, -1), be_const_var(0) }, + { be_const_key(init, -1), be_const_func(lco_init) }, })), - (be_nested_const_str("lv_color", 1419148319, 8)) + (be_str_literal("lv_color")) ); /*******************************************************************/ """) @@ -709,10 +709,10 @@ be_local_class(lv_{subtype}, &be_class_lv_{super_class}, be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) {{ - {{ be_nested_key("_class", -1562820946, 6, -1), be_const_comptr(&lv_{subtype}_class) }}, - {{ be_nested_key("init", 380752755, 4, -1), be_const_func(be_ntv_lv_{subtype}_init) }}, + {{ be_const_key(_class, -1), be_const_comptr(&lv_{subtype}_class) }}, + {{ be_const_key(init, -1), be_const_func(be_ntv_lv_{subtype}_init) }}, }})), - (be_nested_const_str("lv_{subtype}", 1612829968, 6)) + (be_str_literal("lv_{subtype}")) ); /*******************************************************************/ """) @@ -873,20 +873,13 @@ be_local_closure(lv_lv_module_init, /* name */ ); /*******************************************************************/ - -/******************************************************************** -** Solidified module: lv -********************************************************************/ -be_local_module(lv, - "lv", - be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key(init, -1), be_const_closure(lv_lv_module_init_closure) }, - { be_const_key(member, 0), be_const_func(lv0_member) }, - })) -); -BE_EXPORT_VARIABLE be_define_const_native_module(lv); -/********************************************************************/ +/* @const_object_info_begin +module lv (scope: global, file: lv) { + init, closure(lv_lv_module_init_closure) + member, func(lv0_member) +} +@const_object_info_end */ +#include "be_fixed_lv.h" """) print("/********************************************************************/")