HASPmota make `spinner` editable

This commit is contained in:
Stephan Hadinger 2022-08-26 08:37:28 +02:00
parent ea8a31d072
commit 979288570e
45 changed files with 1275 additions and 672 deletions

View File

@ -992,6 +992,10 @@ extern const bcstring be_const_str_TRUE;
extern const bcstring be_const_str_Tapp;
extern const bcstring be_const_str_X;
extern const bcstring be_const_str__action;
extern const bcstring be_const_str__anim_end;
extern const bcstring be_const_str__anim_start;
extern const bcstring be_const_str__arc_anim_end_angle;
extern const bcstring be_const_str__arc_anim_start_angle;
extern const bcstring be_const_str__attr_id;
extern const bcstring be_const_str__attr_ignore;
extern const bcstring be_const_str__attr_map;
@ -1040,6 +1044,8 @@ extern const bcstring be_const_str_adv_block;
extern const bcstring be_const_str_adv_cb;
extern const bcstring be_const_str_adv_watch;
extern const bcstring be_const_str_angle;
extern const bcstring be_const_str_anim_get;
extern const bcstring be_const_str_anim_ntv;
extern const bcstring be_const_str_arc_dsc;
extern const bcstring be_const_str_area;
extern const bcstring be_const_str_atleast1;
@ -1098,6 +1104,7 @@ extern const bcstring be_const_str_driver_name;
extern const bcstring be_const_str_encrypt;
extern const bcstring be_const_str_end_angle;
extern const bcstring be_const_str_end_angle1;
extern const bcstring be_const_str_end_value;
extern const bcstring be_const_str_event_dispatch;
extern const bcstring be_const_str_event_send;
extern const bcstring be_const_str_expand;
@ -1445,6 +1452,7 @@ extern const bcstring be_const_str_src;
extern const bcstring be_const_str_src_ep;
extern const bcstring be_const_str_start_angle;
extern const bcstring be_const_str_start_angle1;
extern const bcstring be_const_str_start_value;
extern const bcstring be_const_str_started;
extern const bcstring be_const_str_style_;
extern const bcstring be_const_str_style_bg_color;
@ -1471,6 +1479,7 @@ extern const bcstring be_const_str_text;
extern const bcstring be_const_str_text_rule_matched;
extern const bcstring be_const_str_theme_apply;
extern const bcstring be_const_str_theme_haspmota_init;
extern const bcstring be_const_str_time;
extern const bcstring be_const_str_tojson;
extern const bcstring be_const_str_touch_update;
extern const bcstring be_const_str_unable_X20to_X20parse_X20JSON_X20line;

View File

@ -993,6 +993,10 @@ be_define_const_str(TRUE, "TRUE", 0u, 0, 4, NULL);
be_define_const_str(Tapp, "Tapp", 0u, 0, 4, NULL);
be_define_const_str(X, "X", 0u, 0, 1, NULL);
be_define_const_str(_action, "_action", 0u, 0, 7, NULL);
be_define_const_str(_anim_end, "_anim_end", 0u, 0, 9, NULL);
be_define_const_str(_anim_start, "_anim_start", 0u, 0, 11, NULL);
be_define_const_str(_arc_anim_end_angle, "_arc_anim_end_angle", 0u, 0, 19, NULL);
be_define_const_str(_arc_anim_start_angle, "_arc_anim_start_angle", 0u, 0, 21, NULL);
be_define_const_str(_attr_id, "_attr_id", 0u, 0, 8, NULL);
be_define_const_str(_attr_ignore, "_attr_ignore", 0u, 0, 12, NULL);
be_define_const_str(_attr_map, "_attr_map", 0u, 0, 9, NULL);
@ -1041,6 +1045,8 @@ be_define_const_str(adv_block, "adv_block", 0u, 0, 9, NULL);
be_define_const_str(adv_cb, "adv_cb", 0u, 0, 6, NULL);
be_define_const_str(adv_watch, "adv_watch", 0u, 0, 9, NULL);
be_define_const_str(angle, "angle", 0u, 0, 5, NULL);
be_define_const_str(anim_get, "anim_get", 0u, 0, 8, NULL);
be_define_const_str(anim_ntv, "anim_ntv", 0u, 0, 8, NULL);
be_define_const_str(arc_dsc, "arc_dsc", 0u, 0, 7, NULL);
be_define_const_str(area, "area", 0u, 0, 4, NULL);
be_define_const_str(atleast1, "atleast1", 0u, 0, 8, NULL);
@ -1099,6 +1105,7 @@ be_define_const_str(driver_name, "driver_name", 0u, 0, 11, NULL);
be_define_const_str(encrypt, "encrypt", 0u, 0, 7, NULL);
be_define_const_str(end_angle, "end_angle", 0u, 0, 9, NULL);
be_define_const_str(end_angle1, "end_angle1", 0u, 0, 10, NULL);
be_define_const_str(end_value, "end_value", 0u, 0, 9, NULL);
be_define_const_str(event_dispatch, "event_dispatch", 0u, 0, 14, NULL);
be_define_const_str(event_send, "event_send", 0u, 0, 10, NULL);
be_define_const_str(expand, "expand", 0u, 0, 6, NULL);
@ -1446,6 +1453,7 @@ be_define_const_str(src, "src", 0u, 0, 3, NULL);
be_define_const_str(src_ep, "src_ep", 0u, 0, 6, NULL);
be_define_const_str(start_angle, "start_angle", 0u, 0, 11, NULL);
be_define_const_str(start_angle1, "start_angle1", 0u, 0, 12, NULL);
be_define_const_str(start_value, "start_value", 0u, 0, 11, NULL);
be_define_const_str(started, "started", 0u, 0, 7, NULL);
be_define_const_str(style_, "style_", 0u, 0, 6, NULL);
be_define_const_str(style_bg_color, "style_bg_color", 0u, 0, 14, NULL);
@ -1472,6 +1480,7 @@ be_define_const_str(text, "text", 0u, 0, 4, NULL);
be_define_const_str(text_rule_matched, "text_rule_matched", 0u, 0, 17, NULL);
be_define_const_str(theme_apply, "theme_apply", 0u, 0, 11, NULL);
be_define_const_str(theme_haspmota_init, "theme_haspmota_init", 0u, 0, 19, NULL);
be_define_const_str(time, "time", 0u, 0, 4, NULL);
be_define_const_str(tojson, "tojson", 0u, 0, 6, NULL);
be_define_const_str(touch_update, "touch_update", 0u, 0, 12, NULL);
be_define_const_str(unable_X20to_X20parse_X20JSON_X20line, "unable to parse JSON line", 0u, 0, 25, NULL);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_anim_map) {
{ be_const_key_weak(init, -1), be_const_func(lv_be_anim_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_anim_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_anim,
1,
NULL,
lv_anim
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_arc_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_arc_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_arc_init) },
};
static be_define_const_map(
be_class_lv_arc_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_arc,
0,
(bclass *)&be_class_lv_obj,
lv_arc
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_bar_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_bar_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_bar_init) },
};
static be_define_const_map(
be_class_lv_bar_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_bar,
0,
(bclass *)&be_class_lv_obj,
lv_bar
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_btn_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_btn_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_btn_init) },
};
static be_define_const_map(
be_class_lv_btn_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_btn,
0,
(bclass *)&be_class_lv_obj,
lv_btn
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_btnmatrix_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_btnmatrix_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_btnmatrix_init) },
};
static be_define_const_map(
be_class_lv_btnmatrix_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_btnmatrix,
0,
(bclass *)&be_class_lv_obj,
lv_btnmatrix
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_canvas_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_canvas_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_canvas_init) },
};
static be_define_const_map(
be_class_lv_canvas_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_canvas,
0,
(bclass *)&be_class_lv_img,
lv_canvas
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_chart_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_chart_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_chart_init) },
};
static be_define_const_map(
be_class_lv_chart_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_chart,
0,
(bclass *)&be_class_lv_obj,
lv_chart
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_checkbox_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_checkbox_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_checkbox_init) },
};
static be_define_const_map(
be_class_lv_checkbox_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_checkbox,
0,
(bclass *)&be_class_lv_obj,
lv_checkbox
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_color_map) {
{ be_const_key_weak(toint, -1), be_const_func(lco_toint) },
{ be_const_key_weak(tostring, 0), be_const_func(lco_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(init, -1), be_const_func(lco_init) },
};
static be_define_const_map(
be_class_lv_color_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_color,
1,
NULL,
lv_color
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_colorwheel_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_colorwheel_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_colorwheel_init) },
};
static be_define_const_map(
be_class_lv_colorwheel_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_colorwheel,
0,
(bclass *)&be_class_lv_obj,
lv_colorwheel
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_disp_map) {
{ be_const_key_weak(init, -1), be_const_func(lv0_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_disp_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_disp,
1,
NULL,
lv_disp
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_dropdown_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_dropdown_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_dropdown_init) },
};
static be_define_const_map(
be_class_lv_dropdown_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_dropdown,
0,
(bclass *)&be_class_lv_obj,
lv_dropdown
);

View File

@ -0,0 +1,19 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_font_map) {
{ be_const_key_weak(init, -1), be_const_func(lvbe_font_create) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
};
static be_define_const_map(
be_class_lv_font_map,
3
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_font,
1,
NULL,
lv_font
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_group_map) {
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_group_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_group_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_group,
1,
NULL,
lv_group
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_img_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_img_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_img_init) },
};
static be_define_const_map(
be_class_lv_img_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_img,
0,
(bclass *)&be_class_lv_obj,
lv_img
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_imgbtn_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_imgbtn_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_imgbtn_init) },
};
static be_define_const_map(
be_class_lv_imgbtn_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_imgbtn,
0,
(bclass *)&be_class_lv_obj,
lv_imgbtn
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_indev_map) {
{ be_const_key_weak(init, -1), be_const_func(lv0_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_indev_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_indev,
1,
NULL,
lv_indev
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_label_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_label_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_label_init) },
};
static be_define_const_map(
be_class_lv_label_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_label,
0,
(bclass *)&be_class_lv_obj,
lv_label
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_led_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_led_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_led_init) },
};
static be_define_const_map(
be_class_lv_led_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_led,
0,
(bclass *)&be_class_lv_obj,
lv_led
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_line_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_line_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_line_init) },
};
static be_define_const_map(
be_class_lv_line_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_line,
0,
(bclass *)&be_class_lv_obj,
lv_line
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_meter_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_meter_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_meter_init) },
};
static be_define_const_map(
be_class_lv_meter_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_meter,
0,
(bclass *)&be_class_lv_obj,
lv_meter
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_msgbox_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_msgbox_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_msgbox_init) },
};
static be_define_const_map(
be_class_lv_msgbox_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_msgbox,
0,
(bclass *)&be_class_lv_obj,
lv_msgbox
);

View File

@ -0,0 +1,21 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_obj_map) {
{ be_const_key_weak(tostring, 3), be_const_func(lv_x_tostring) },
{ be_const_key_weak(member, -1), be_const_func(lv_x_member) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(init, 4), be_const_func(be_ntv_lv_obj_init) },
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_obj_class) },
};
static be_define_const_map(
be_class_lv_obj_map,
5
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_obj,
1,
NULL,
lv_obj
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_qrcode_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_qrcode_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_qrcode_init) },
};
static be_define_const_map(
be_class_lv_qrcode_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_qrcode,
0,
(bclass *)&be_class_lv_obj,
lv_qrcode
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_roller_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_roller_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_roller_init) },
};
static be_define_const_map(
be_class_lv_roller_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_roller,
0,
(bclass *)&be_class_lv_obj,
lv_roller
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_slider_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_slider_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_slider_init) },
};
static be_define_const_map(
be_class_lv_slider_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_slider,
0,
(bclass *)&be_class_lv_obj,
lv_slider
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_spinbox_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_spinbox_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_spinbox_init) },
};
static be_define_const_map(
be_class_lv_spinbox_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_spinbox,
0,
(bclass *)&be_class_lv_textarea,
lv_spinbox
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_spinner_map) {
{ be_const_key_weak(_arc_anim_end_angle, -1), be_const_comptr(&arc_anim_end_angle) },
{ be_const_key_weak(_arc_anim_start_angle, -1), be_const_comptr(&arc_anim_start_angle) },
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_spinner_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_spinner_init) },
};
static be_define_const_map(
be_class_lv_spinner_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_spinner,
0,
(bclass *)&be_class_lv_arc,
lv_spinner
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_style_map) {
{ be_const_key_weak(init, -1), be_const_func(lv_be_style_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_style_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_style,
1,
NULL,
lv_style
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_switch_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_switch_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_switch_init) },
};
static be_define_const_map(
be_class_lv_switch_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_switch,
0,
(bclass *)&be_class_lv_obj,
lv_switch
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_table_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_table_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_table_init) },
};
static be_define_const_map(
be_class_lv_table_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_table,
0,
(bclass *)&be_class_lv_obj,
lv_table
);

View File

@ -0,0 +1,18 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_textarea_map) {
{ be_const_key_weak(_class, -1), be_const_comptr(&lv_textarea_class) },
{ be_const_key_weak(init, -1), be_const_func(be_ntv_lv_textarea_init) },
};
static be_define_const_map(
be_class_lv_textarea_map,
2
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_textarea,
0,
(bclass *)&be_class_lv_obj,
lv_textarea
);

View File

@ -0,0 +1,19 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_theme_map) {
{ be_const_key_weak(init, -1), be_const_func(lvbe_theme_create) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
};
static be_define_const_map(
be_class_lv_theme_map,
3
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_theme,
1,
NULL,
lv_theme
);

View File

@ -0,0 +1,20 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_timer_map) {
{ be_const_key_weak(init, -1), be_const_func(lv0_init) },
{ be_const_key_weak(tostring, -1), be_const_func(lv_x_tostring) },
{ be_const_key_weak(_p, -1), be_const_var(0) },
{ be_const_key_weak(member, 0), be_const_func(lv_x_member) },
};
static be_define_const_map(
be_class_lv_timer_map,
4
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_lv_timer,
1,
NULL,
lv_timer
);

View File

@ -132,7 +132,11 @@ static void m_solidify_map(bvm *vm, bbool str_literal, bmap * map, const char *c
}
m_solidify_bvalue(vm, str_literal, &node->value, class_name, str(node->key.v.s), fout);
} else if (node->key.type == BE_INT) {
#if BE_INTGER_TYPE == 2
logfmt(" { be_const_key_int(%lli, %i), ", node->key.v.i, key_next);
#else
logfmt(" { be_const_key_int(%li, %i), ", node->key.v.i, key_next);
#endif
m_solidify_bvalue(vm, str_literal, &node->value, class_name, NULL, fout);
} else {
char error[64];

View File

@ -4118,23 +4118,37 @@ void be_load_lvh_label_class(bvm *vm) {
}
/********************************************************************
** Solidified function: get_speed
** Solidified function: set_angle
********************************************************************/
be_local_closure(lvh_spinner_get_speed, /* name */
be_local_closure(lvh_spinner_set_angle, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(get_speed),
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_anim_end),
/* K1 */ be_nested_str_weak(start_value),
/* K2 */ be_nested_str_weak(end_value),
}),
be_str_weak(set_angle),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
( &(const binstruction[11]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x5C040400, // 0003 MOVE R1 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x900A0201, // 0005 SETMBR R2 K1 R1
0x88080100, // 0006 GETMBR R2 R0 K0
0x540E0167, // 0007 LDINT R3 360
0x000C0203, // 0008 ADD R3 R1 R3
0x900A0403, // 0009 SETMBR R2 K2 R3
0x80000000, // 000A RET 0
})
)
);
@ -4154,7 +4168,7 @@ be_local_closure(lvh_spinner_init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(_page),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(angle),
@ -4163,10 +4177,17 @@ be_local_closure(lvh_spinner_init, /* name */
/* K5 */ be_nested_str_weak(lv),
/* K6 */ be_nested_str_weak(spinner),
/* K7 */ be_nested_str_weak(post_init),
/* K8 */ be_nested_str_weak(anim_get),
/* K9 */ be_nested_str_weak(_arc_anim_start_angle),
/* K10 */ be_nested_str_weak(_arc_anim_end_angle),
/* K11 */ be_nested_str_weak(_anim_start),
/* K12 */ be_nested_str_weak(anim_ntv),
/* K13 */ be_nested_str_weak(_p),
/* K14 */ be_nested_str_weak(_anim_end),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[19]) { /* code */
( &(const binstruction[41]) { /* code */
0x90020002, // 0000 SETMBR R0 K0 R2
0x8C100701, // 0001 GETMET R4 R3 K1
0x58180002, // 0002 LDCONST R6 K2
@ -4185,55 +4206,29 @@ be_local_closure(lvh_spinner_init, /* name */
0x90020806, // 000F SETMBR R0 K4 R6
0x8C180107, // 0010 GETMET R6 R0 K7
0x7C180200, // 0011 CALL R6 1
0x80000000, // 0012 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_speed
********************************************************************/
be_local_closure(lvh_spinner_set_speed, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(set_speed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_angle
********************************************************************/
be_local_closure(lvh_spinner_set_angle, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(set_angle),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
0xB81A0A00, // 0012 GETNGBL R6 K5
0x8C180D08, // 0013 GETMET R6 R6 K8
0x88200104, // 0014 GETMBR R8 R0 K4
0x88240104, // 0015 GETMBR R9 R0 K4
0x88241309, // 0016 GETMBR R9 R9 K9
0x7C180600, // 0017 CALL R6 3
0xB81E0A00, // 0018 GETNGBL R7 K5
0x8C1C0F08, // 0019 GETMET R7 R7 K8
0x88240104, // 001A GETMBR R9 R0 K4
0x88280104, // 001B GETMBR R10 R0 K4
0x8828150A, // 001C GETMBR R10 R10 K10
0x7C1C0600, // 001D CALL R7 3
0xB8220A00, // 001E GETNGBL R8 K5
0x8C20110C, // 001F GETMET R8 R8 K12
0x88280D0D, // 0020 GETMBR R10 R6 K13
0x7C200400, // 0021 CALL R8 2
0x90021608, // 0022 SETMBR R0 K11 R8
0xB8220A00, // 0023 GETNGBL R8 K5
0x8C20110C, // 0024 GETMET R8 R8 K12
0x88280F0D, // 0025 GETMBR R10 R7 K13
0x7C200400, // 0026 CALL R8 2
0x90021C08, // 0027 SETMBR R0 K14 R8
0x80000000, // 0028 RET 0
})
)
);
@ -4245,19 +4240,93 @@ be_local_closure(lvh_spinner_set_angle, /* name */
********************************************************************/
be_local_closure(lvh_spinner_get_angle, /* name */
be_nested_proto(
1, /* nstack */
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_anim_end),
/* K1 */ be_nested_str_weak(start_value),
/* K2 */ be_nested_str_weak(_anim_start),
}),
be_str_weak(get_angle),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
( &(const binstruction[ 6]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x88080102, // 0002 GETMBR R2 R0 K2
0x88080501, // 0003 GETMBR R2 R2 K1
0x04040202, // 0004 SUB R1 R1 R2
0x80040200, // 0005 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_speed
********************************************************************/
be_local_closure(lvh_spinner_get_speed, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_anim_start),
/* K1 */ be_nested_str_weak(time),
}),
be_str_weak(get_speed),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x80040200, // 0002 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_speed
********************************************************************/
be_local_closure(lvh_spinner_set_speed, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_anim_start),
/* K1 */ be_nested_str_weak(time),
/* K2 */ be_nested_str_weak(_anim_end),
}),
be_str_weak(set_speed),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
0x5C040400, // 0003 MOVE R1 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x900A0201, // 0005 SETMBR R2 K1 R1
0x88080102, // 0006 GETMBR R2 R0 K2
0x900A0201, // 0007 SETMBR R2 K1 R1
0x80000000, // 0008 RET 0
})
)
);
@ -4269,16 +4338,18 @@ be_local_closure(lvh_spinner_get_angle, /* name */
********************************************************************/
extern const bclass be_class_lvh_arc;
be_local_class(lvh_spinner,
0,
2,
&be_class_lvh_arc,
be_nested_map(6,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(get_angle, 5), be_const_closure(lvh_spinner_get_angle_closure) },
{ be_const_key_weak(_lv_class, 0), be_const_class(be_class_lv_spinner) },
{ be_const_key_weak(set_angle, 4), be_const_closure(lvh_spinner_set_angle_closure) },
{ be_const_key_weak(set_speed, 1), be_const_closure(lvh_spinner_set_speed_closure) },
{ be_const_key_weak(_lv_class, -1), be_const_class(be_class_lv_spinner) },
{ be_const_key_weak(get_speed, 6), be_const_closure(lvh_spinner_get_speed_closure) },
{ be_const_key_weak(init, 2), be_const_closure(lvh_spinner_init_closure) },
{ be_const_key_weak(set_speed, -1), be_const_closure(lvh_spinner_set_speed_closure) },
{ be_const_key_weak(get_speed, -1), be_const_closure(lvh_spinner_get_speed_closure) },
{ be_const_key_weak(_anim_start, -1), be_const_var(0) },
{ be_const_key_weak(_anim_end, -1), be_const_var(1) },
{ be_const_key_weak(get_angle, -1), be_const_closure(lvh_spinner_get_angle_closure) },
{ be_const_key_weak(set_angle, 0), be_const_closure(lvh_spinner_set_angle_closure) },
})),
be_str_weak(lvh_spinner)
);

View File

@ -1021,553 +1021,400 @@ extern const bclass be_class_lv_timer;
/********************************************************************
** Solidified class: lv_style
********************************************************************/
be_local_class(lv_style,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_style))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_style.h"
/* @const_object_info_begin
class be_class_lv_style (scope: global, name: lv_style, strings: weak) {
_p, var
init, func(lv_be_style_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_obj
********************************************************************/
be_local_class(lv_obj,
1,
NULL,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_obj))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_obj.h"
/* @const_object_info_begin
class be_class_lv_obj (scope: global, name: lv_obj, strings: weak) {
_p, var
_class, comptr(&lv_obj_class)
init, func(be_ntv_lv_obj_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_group
********************************************************************/
be_local_class(lv_group,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_group))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_group.h"
/* @const_object_info_begin
class be_class_lv_group (scope: global, name: lv_group, strings: weak) {
_p, var
init, func(be_ntv_lv_group_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_indev
********************************************************************/
be_local_class(lv_indev,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_indev))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_indev.h"
/* @const_object_info_begin
class be_class_lv_indev (scope: global, name: lv_indev, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_disp
********************************************************************/
be_local_class(lv_disp,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_disp))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_disp.h"
/* @const_object_info_begin
class be_class_lv_disp (scope: global, name: lv_disp, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_timer
********************************************************************/
be_local_class(lv_timer,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_timer)
);
/*******************************************************************/
#include "be_fixed_be_class_lv_timer.h"
/* @const_object_info_begin
class be_class_lv_timer (scope: global, name: lv_timer, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_anim
********************************************************************/
be_local_class(lv_anim,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_anim)
);
/*******************************************************************/
#include "be_fixed_be_class_lv_anim.h"
/* @const_object_info_begin
class be_class_lv_anim (scope: global, name: lv_anim, strings: weak) {
_p, var
init, func(lv_be_anim_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_font
********************************************************************/
be_local_class(lv_font,
1,
NULL,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_font))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_font.h"
/* @const_object_info_begin
class be_class_lv_font (scope: global, name: lv_font, strings: weak) {
_p, var
init, func(lvbe_font_create)
tostring, func(lv_x_tostring)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_theme
********************************************************************/
be_local_class(lv_theme,
1,
NULL,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_theme))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_theme.h"
/* @const_object_info_begin
class be_class_lv_theme (scope: global, name: lv_theme, strings: weak) {
_p, var
init, func(lvbe_theme_create)
tostring, func(lv_x_tostring)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_color
********************************************************************/
be_local_class(lv_color,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_color))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_color.h"
/* @const_object_info_begin
class be_class_lv_color (scope: global, name: lv_color, strings: weak) {
_p, var
init, func(lco_init)
tostring, func(lco_tostring)
toint, func(lco_toint)
}
@const_object_info_end */
/* define extern function for arc_anim_start_angle and arc_anim_end_angle*/
extern void arc_anim_start_angle(void * obj, int32_t v);
extern void arc_anim_end_angle(void * obj, int32_t v);
/********************************************************************
** Solidified class: lv_img
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_img,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_img))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_img.h"
/* @const_object_info_begin
class be_class_lv_img (scope: global, name: lv_img, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_img_class)
init, func(be_ntv_lv_img_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_qrcode
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_qrcode,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key(_class, -1), be_const_comptr(&lv_qrcode_class) },
{ be_const_key(init, -1), be_const_func(be_ntv_lv_qrcode_init) },
})),
(be_str_weak(lv_qrcode))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_qrcode.h"
/* @const_object_info_begin
class be_class_lv_qrcode (scope: global, name: lv_qrcode, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_qrcode_class)
init, func(be_ntv_lv_qrcode_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_chart
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_chart,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_chart))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_chart.h"
/* @const_object_info_begin
class be_class_lv_chart (scope: global, name: lv_chart, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_chart_class)
init, func(be_ntv_lv_chart_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_colorwheel
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_colorwheel,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_colorwheel))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_colorwheel.h"
/* @const_object_info_begin
class be_class_lv_colorwheel (scope: global, name: lv_colorwheel, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_colorwheel_class)
init, func(be_ntv_lv_colorwheel_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_imgbtn
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_imgbtn,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_imgbtn))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_imgbtn.h"
/* @const_object_info_begin
class be_class_lv_imgbtn (scope: global, name: lv_imgbtn, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_imgbtn_class)
init, func(be_ntv_lv_imgbtn_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_led
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_led,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_led))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_led.h"
/* @const_object_info_begin
class be_class_lv_led (scope: global, name: lv_led, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_led_class)
init, func(be_ntv_lv_led_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_meter
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_meter,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_meter))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_meter.h"
/* @const_object_info_begin
class be_class_lv_meter (scope: global, name: lv_meter, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_meter_class)
init, func(be_ntv_lv_meter_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_msgbox
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_msgbox,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_msgbox))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_msgbox.h"
/* @const_object_info_begin
class be_class_lv_msgbox (scope: global, name: lv_msgbox, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_msgbox_class)
init, func(be_ntv_lv_msgbox_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_spinbox
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_spinbox,
0,
&be_class_lv_textarea,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_spinbox))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_spinbox.h"
/* @const_object_info_begin
class be_class_lv_spinbox (scope: global, name: lv_spinbox, super: be_class_lv_textarea, strings: weak) {
_class, comptr(&lv_spinbox_class)
init, func(be_ntv_lv_spinbox_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_spinner
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_spinner,
0,
&be_class_lv_arc,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_spinner))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_spinner.h"
/* @const_object_info_begin
class be_class_lv_spinner (scope: global, name: lv_spinner, super: be_class_lv_arc, strings: weak) {
_class, comptr(&lv_spinner_class)
init, func(be_ntv_lv_spinner_init)
_arc_anim_start_angle, comptr(&arc_anim_start_angle)
_arc_anim_end_angle, comptr(&arc_anim_end_angle)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_arc
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_arc,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_arc))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_arc.h"
/* @const_object_info_begin
class be_class_lv_arc (scope: global, name: lv_arc, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_arc_class)
init, func(be_ntv_lv_arc_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_bar
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_bar,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_bar))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_bar.h"
/* @const_object_info_begin
class be_class_lv_bar (scope: global, name: lv_bar, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_bar_class)
init, func(be_ntv_lv_bar_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_btn
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_btn,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_btn))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_btn.h"
/* @const_object_info_begin
class be_class_lv_btn (scope: global, name: lv_btn, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_btn_class)
init, func(be_ntv_lv_btn_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_btnmatrix
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_btnmatrix,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_btnmatrix))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_btnmatrix.h"
/* @const_object_info_begin
class be_class_lv_btnmatrix (scope: global, name: lv_btnmatrix, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_btnmatrix_class)
init, func(be_ntv_lv_btnmatrix_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_canvas
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_canvas,
0,
&be_class_lv_img,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_canvas))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_canvas.h"
/* @const_object_info_begin
class be_class_lv_canvas (scope: global, name: lv_canvas, super: be_class_lv_img, strings: weak) {
_class, comptr(&lv_canvas_class)
init, func(be_ntv_lv_canvas_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_checkbox
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_checkbox,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_checkbox))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_checkbox.h"
/* @const_object_info_begin
class be_class_lv_checkbox (scope: global, name: lv_checkbox, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_checkbox_class)
init, func(be_ntv_lv_checkbox_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_dropdown
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_dropdown,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_dropdown))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_dropdown.h"
/* @const_object_info_begin
class be_class_lv_dropdown (scope: global, name: lv_dropdown, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_dropdown_class)
init, func(be_ntv_lv_dropdown_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_label
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_label,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_label))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_label.h"
/* @const_object_info_begin
class be_class_lv_label (scope: global, name: lv_label, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_label_class)
init, func(be_ntv_lv_label_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_line
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_line,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_line))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_line.h"
/* @const_object_info_begin
class be_class_lv_line (scope: global, name: lv_line, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_line_class)
init, func(be_ntv_lv_line_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_roller
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_roller,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_roller))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_roller.h"
/* @const_object_info_begin
class be_class_lv_roller (scope: global, name: lv_roller, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_roller_class)
init, func(be_ntv_lv_roller_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_slider
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_slider,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_slider))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_slider.h"
/* @const_object_info_begin
class be_class_lv_slider (scope: global, name: lv_slider, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_slider_class)
init, func(be_ntv_lv_slider_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_switch
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_switch,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_switch))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_switch.h"
/* @const_object_info_begin
class be_class_lv_switch (scope: global, name: lv_switch, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_switch_class)
init, func(be_ntv_lv_switch_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_table
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_table,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_table))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_table.h"
/* @const_object_info_begin
class be_class_lv_table (scope: global, name: lv_table, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_table_class)
init, func(be_ntv_lv_table_init)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_textarea
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_textarea,
0,
&be_class_lv_obj,
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_textarea))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_textarea.h"
/* @const_object_info_begin
class be_class_lv_textarea (scope: global, name: lv_textarea, super: be_class_lv_obj, strings: weak) {
_class, comptr(&lv_textarea_class)
init, func(be_ntv_lv_textarea_init)
}
@const_object_info_end */

View File

@ -599,7 +599,7 @@ const be_ctypes_structure_t be_lv_color_filter_dsc = {
{ "user_data", 4, 0, 0, ctypes_ptr32, 0 },
}};
const be_ctypes_structure_t be_lv_timer = {
const be_ctypes_structure_t be_lv_timer_ntv = {
24, /* size in bytes */
6, /* number of elements */
be_ctypes_instance_mappings,
@ -612,6 +612,34 @@ const be_ctypes_structure_t be_lv_timer = {
{ "user_data", 12, 0, 0, ctypes_ptr32, 0 },
}};
const be_ctypes_structure_t be_lv_anim_ntv = {
72, /* size in bytes */
21, /* number of elements */
be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[21]) {
{ "act_time", 48, 0, 0, ctypes_i32, 0 },
{ "current_value", 36, 0, 0, ctypes_i32, 0 },
{ "deleted_cb", 16, 0, 0, ctypes_ptr32, 0 },
{ "early_apply", 68, 0, 1, ctypes_bf, 0 },
{ "end_value", 40, 0, 0, ctypes_i32, 0 },
{ "exec_cb", 4, 0, 0, ctypes_ptr32, 0 },
{ "get_value_cb", 20, 0, 0, ctypes_ptr32, 0 },
{ "path_cb", 28, 0, 0, ctypes_ptr32, 0 },
{ "playback_delay", 52, 0, 0, ctypes_u32, 0 },
{ "playback_now", 68, 1, 1, ctypes_bf, 0 },
{ "playback_time", 56, 0, 0, ctypes_u32, 0 },
{ "ready_cb", 12, 0, 0, ctypes_ptr32, 0 },
{ "repeat_cnt", 64, 0, 0, ctypes_u32, 0 },
{ "repeat_delay", 60, 0, 0, ctypes_u32, 0 },
{ "run_round", 68, 2, 1, ctypes_bf, 0 },
{ "start_cb", 8, 0, 0, ctypes_ptr32, 0 },
{ "start_cb_called", 68, 3, 1, ctypes_bf, 0 },
{ "start_value", 32, 0, 0, ctypes_i32, 0 },
{ "time", 44, 0, 0, ctypes_i32, 0 },
{ "user_data", 24, 0, 0, ctypes_ptr32, 0 },
{ "var", 0, 0, 0, ctypes_ptr32, 0 },
}};
const be_ctypes_structure_t be_lv_draw_ctx = {
88, /* size in bytes */
26, /* number of elements */
@ -662,6 +690,7 @@ static const char * be_ctypes_instance_mappings[] = {
NULL
};
static be_define_ctypes_class(lv_anim_ntv, &be_lv_anim_ntv, &be_class_ctypes_bytes, "lv_anim_ntv");
static be_define_ctypes_class(lv_area, &be_lv_area, &be_class_ctypes_bytes, "lv_area");
static be_define_ctypes_class(lv_chart_cursor, &be_lv_chart_cursor, &be_class_ctypes_bytes, "lv_chart_cursor");
static be_define_ctypes_class(lv_chart_series, &be_lv_chart_series, &be_class_ctypes_bytes, "lv_chart_series");
@ -701,10 +730,11 @@ static be_define_ctypes_class(lv_obj_draw_part_dsc, &be_lv_obj_draw_part_dsc, &b
static be_define_ctypes_class(lv_point, &be_lv_point, &be_class_ctypes_bytes, "lv_point");
static be_define_ctypes_class(lv_sqrt_res, &be_lv_sqrt_res, &be_class_ctypes_bytes, "lv_sqrt_res");
static be_define_ctypes_class(lv_style_transition_dsc, &be_lv_style_transition_dsc, &be_class_ctypes_bytes, "lv_style_transition_dsc");
static be_define_ctypes_class(lv_timer, &be_lv_timer, &be_class_ctypes_bytes, "lv_timer");
static be_define_ctypes_class(lv_timer_ntv, &be_lv_timer_ntv, &be_class_ctypes_bytes, "lv_timer_ntv");
static be_define_ctypes_class(lv_ts_calibration, &be_lv_ts_calibration, &be_class_ctypes_bytes, "lv_ts_calibration");
void be_load_ctypes_lvgl_definitions_lib(bvm *vm) {
ctypes_register_class(vm, &be_class_lv_anim_ntv);
ctypes_register_class(vm, &be_class_lv_area);
ctypes_register_class(vm, &be_class_lv_chart_cursor);
ctypes_register_class(vm, &be_class_lv_chart_series);
@ -744,11 +774,12 @@ void be_load_ctypes_lvgl_definitions_lib(bvm *vm) {
ctypes_register_class(vm, &be_class_lv_point);
ctypes_register_class(vm, &be_class_lv_sqrt_res);
ctypes_register_class(vm, &be_class_lv_style_transition_dsc);
ctypes_register_class(vm, &be_class_lv_timer);
ctypes_register_class(vm, &be_class_lv_timer_ntv);
ctypes_register_class(vm, &be_class_lv_ts_calibration);
}
be_ctypes_class_by_name_t be_ctypes_lvgl_classes[] = {
{ "lv_anim_ntv", &be_class_lv_anim_ntv },
{ "lv_area", &be_class_lv_area },
{ "lv_chart_cursor", &be_class_lv_chart_cursor },
{ "lv_chart_series", &be_class_lv_chart_series },
@ -788,7 +819,7 @@ be_ctypes_class_by_name_t be_ctypes_lvgl_classes[] = {
{ "lv_point", &be_class_lv_point },
{ "lv_sqrt_res", &be_class_lv_sqrt_res },
{ "lv_style_transition_dsc", &be_class_lv_style_transition_dsc },
{ "lv_timer", &be_class_lv_timer },
{ "lv_timer_ntv", &be_class_lv_timer_ntv },
{ "lv_ts_calibration", &be_class_lv_ts_calibration },
};
const size_t be_ctypes_lvgl_classes_size = sizeof(be_ctypes_lvgl_classes)/sizeof(be_ctypes_lvgl_classes[0]);

View File

@ -552,8 +552,8 @@ lv_color_filter_dsc = [ # valid LVGL8.3
lv_color_filter_dsc = ct.structure(lv_color_filter_dsc, "lv_color_filter_dsc")
#######################################################################
# lv_timer
lv_timer = [ # valid LVGL8.3
# lv_timer native, superseded by lv_timer
lv_timer_ntv = [ # valid LVGL8.3
[uint32_t, "period"],
[uint32_t, "last_run"],
[ptr, "timer_cb"],
@ -561,37 +561,38 @@ lv_timer = [ # valid LVGL8.3
[int32_t, "repeat_count"],
[uint8_t_1, "paused"],
]
lv_timer = ct.structure(lv_timer, "lv_timer")
lv_timer_ntv = ct.structure(lv_timer_ntv, "lv_timer_ntv")
# #######################################################################
# # lv_anim
# lv_anim = [ # valid LVGL8.2
# [ptr, "var"],
# [ptr, "exec_cb"],
# [ptr, "start_cb"],
# [ptr, "ready_cb"],
# [ptr, "get_value_cb"],
# lv_anim native structure, is superseded by lv_anim
lv_anim_ntv = [ # valid LVGL8.3
[ptr, "var"],
[ptr, "exec_cb"],
[ptr, "start_cb"],
[ptr, "ready_cb"],
[ptr, "deleted_cb"],
[ptr, "get_value_cb"],
# [ptr, "user_data"],
[ptr, "user_data"],
# [ptr, "path_cb"],
# [int32_t, "start_value"],
# [int32_t, "current_value"],
# [int32_t, "end_value"],
# [int32_t, "time"],
# [int32_t, "act_time"],
# [uint32_t, "playback_delay"],
# [uint32_t, "playback_time"],
# [uint32_t, "repeat_delay"],
# [uint32_t, "repeat_cnt"],
[ptr, "path_cb"],
[int32_t, "start_value"],
[int32_t, "current_value"],
[int32_t, "end_value"],
[int32_t, "time"],
[int32_t, "act_time"],
[uint32_t, "playback_delay"],
[uint32_t, "playback_time"],
[uint32_t, "repeat_delay"],
[uint32_t, "repeat_cnt"],
# [uint8_t_1, "early_apply"],
# [uint8_t_1, "playback_now"],
# [uint8_t_1, "run_round"],
# [uint8_t_1, "start_cb_called"],
[uint8_t_1, "early_apply"],
[uint8_t_1, "playback_now"],
[uint8_t_1, "run_round"],
[uint8_t_1, "start_cb_called"],
# ]
# lv_anim = ct.structure(lv_anim, "lv_anim")
]
lv_anim_ntv = ct.structure(lv_anim_ntv, "lv_anim_ntv")
#######################################################################
# lv_draw_ctx

View File

@ -215,6 +215,14 @@ lv_widget_inheritance = {
"roller_label": "label",
}
# contains any custom attribute we need to add to a widget
lv_widget_custom_ptr = {
"spinner": {
"_arc_anim_start_angle": "comptr(&arc_anim_start_angle)",
"_arc_anim_end_angle": "comptr(&arc_anim_end_angle)",
}
}
def try_int(s):
try:
v = int(s)
@ -539,171 +547,136 @@ print("""
/********************************************************************
** Solidified class: lv_style
********************************************************************/
be_local_class(lv_style,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_style))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_style.h"
/* @const_object_info_begin
class be_class_lv_style (scope: global, name: lv_style, strings: weak) {
_p, var
init, func(lv_be_style_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_obj
********************************************************************/
be_local_class(lv_obj,
1,
NULL,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_obj))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_obj.h"
/* @const_object_info_begin
class be_class_lv_obj (scope: global, name: lv_obj, strings: weak) {
_p, var
_class, comptr(&lv_obj_class)
init, func(be_ntv_lv_obj_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_group
********************************************************************/
be_local_class(lv_group,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_group))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_group.h"
/* @const_object_info_begin
class be_class_lv_group (scope: global, name: lv_group, strings: weak) {
_p, var
init, func(be_ntv_lv_group_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_indev
********************************************************************/
be_local_class(lv_indev,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_indev))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_indev.h"
/* @const_object_info_begin
class be_class_lv_indev (scope: global, name: lv_indev, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_disp
********************************************************************/
be_local_class(lv_disp,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_disp))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_disp.h"
/* @const_object_info_begin
class be_class_lv_disp (scope: global, name: lv_disp, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_timer
********************************************************************/
be_local_class(lv_timer,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_timer)
);
/*******************************************************************/
#include "be_fixed_be_class_lv_timer.h"
/* @const_object_info_begin
class be_class_lv_timer (scope: global, name: lv_timer, strings: weak) {
_p, var
init, func(lv0_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_anim
********************************************************************/
be_local_class(lv_anim,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_weak(lv_anim)
);
/*******************************************************************/
#include "be_fixed_be_class_lv_anim.h"
/* @const_object_info_begin
class be_class_lv_anim (scope: global, name: lv_anim, strings: weak) {
_p, var
init, func(lv_be_anim_init)
tostring, func(lv_x_tostring)
member, func(lv_x_member)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_font
********************************************************************/
be_local_class(lv_font,
1,
NULL,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_font))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_font.h"
/* @const_object_info_begin
class be_class_lv_font (scope: global, name: lv_font, strings: weak) {
_p, var
init, func(lvbe_font_create)
tostring, func(lv_x_tostring)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_theme
********************************************************************/
be_local_class(lv_theme,
1,
NULL,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_theme))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_theme.h"
/* @const_object_info_begin
class be_class_lv_theme (scope: global, name: lv_theme, strings: weak) {
_p, var
init, func(lvbe_theme_create)
tostring, func(lv_x_tostring)
}
@const_object_info_end */
/********************************************************************
** Solidified class: lv_color
********************************************************************/
be_local_class(lv_color,
1,
NULL,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_str_weak(lv_color))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_color.h"
/* @const_object_info_begin
class be_class_lv_color (scope: global, name: lv_color, strings: weak) {
_p, var
init, func(lco_init)
tostring, func(lco_tostring)
toint, func(lco_toint)
}
@const_object_info_end */
/* define extern function for arc_anim_start_angle and arc_anim_end_angle*/
extern void arc_anim_start_angle(void * obj, int32_t v);
extern void arc_anim_end_angle(void * obj, int32_t v);
""")
@ -714,18 +687,18 @@ for subtype, flv in lv.items():
print(f"""/********************************************************************
** Solidified class: lv_{subtype}
********************************************************************/
extern const bclass be_class_lv_obj;
be_local_class(lv_{subtype},
0,
&be_class_lv_{super_class},
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {{
{{ 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_str_weak(lv_{subtype}))
);
/*******************************************************************/
#include "be_fixed_be_class_lv_{subtype}.h"
/* @const_object_info_begin
class be_class_lv_{subtype} (scope: global, name: lv_{subtype}, super: be_class_lv_{super_class}, strings: weak) {{
_class, comptr(&lv_{subtype}_class)
init, func(be_ntv_lv_{subtype}_init)""")
if subtype in lv_widget_custom_ptr:
for k, v in lv_widget_custom_ptr[subtype].items():
print(f" {k}, {v}")
print(f"""}}
@const_object_info_end */
""")
sys.stdout.close()

View File

@ -18,3 +18,7 @@ because parameters depend on Tasmota defines and presence of PSRAM.
// # endif
// #endif
```
## lv_spinner
Both function `arc_anim_start_angle()` and `arc_anim_end_angle()` are made non-static. This allows to search for `lv_anim` object based on their `exec_cb` callbacks and change properties on-the-fly.

View File

@ -21,8 +21,8 @@
* STATIC PROTOTYPES
**********************/
static void lv_spinner_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj);
static void arc_anim_start_angle(void * obj, int32_t v);
static void arc_anim_end_angle(void * obj, int32_t v);
void arc_anim_start_angle(void * obj, int32_t v);
void arc_anim_end_angle(void * obj, int32_t v);
/**********************
* STATIC VARIABLES
@ -90,13 +90,13 @@ static void lv_spinner_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
}
static void arc_anim_start_angle(void * obj, int32_t v)
void arc_anim_start_angle(void * obj, int32_t v)
{
lv_arc_set_start_angle(obj, (uint16_t) v);
}
static void arc_anim_end_angle(void * obj, int32_t v)
void arc_anim_end_angle(void * obj, int32_t v)
{
lv_arc_set_end_angle(obj, (uint16_t) v);
}

View File

@ -22,10 +22,13 @@ var classes = [
"bar", "slider", "arc", "textarea", "dropdown",
"qrcode"
]
var f = open("haspmota.c", "w")
for c:classes
solidify.dump(haspmota.HASPmota.("lvh_"+c), true)
solidify.dump(haspmota.HASPmota.("lvh_"+c), true, f)
end
solidify.dump(haspmota, true)
solidify.dump(haspmota, true, f)
f.close()
print("Ok")
-#
var haspmota = module("haspmota")
@ -952,6 +955,7 @@ end
#====================================================================
class lvh_spinner : lvh_arc
static _lv_class = lv.spinner
var _anim_start, _anim_end # the two raw (lv_anim_ntv) objects used for the animation
# init
# - create the LVGL encapsulated object
@ -963,13 +967,30 @@ class lvh_spinner : lvh_arc
var speed = jline.find("speed", 1000)
self._lv_obj = lv.spinner(parent, speed, angle)
self.post_init()
# do some black magic to get the two lv_anim objects used to animate the spinner
var anim_start = lv.anim_get(self._lv_obj, self._lv_obj._arc_anim_start_angle)
var anim_end = lv.anim_get(self._lv_obj, self._lv_obj._arc_anim_end_angle)
# convert to a ctype C structure via pointer
self._anim_start = lv.anim_ntv(anim_start._p)
self._anim_end = lv.anim_ntv(anim_end._p)
end
# ignore attributes, spinner can't be changed once created
def set_angle(t) end
def get_angle() end
def set_speed(t) end
def get_speed() end
def set_angle(t)
t = int(t)
self._anim_end.start_value = t
self._anim_end.end_value = t + 360
end
def get_angle()
return self._anim_end.start_value - self._anim_start.start_value
end
def set_speed(t)
t = int(t)
self._anim_start.time = t
self._anim_end.time = t
end
def get_speed()
return self._anim_start.time
end
end
#====================================================================