From 68f019cf43ce41d25b58fbde1ffeacb23c677198 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 13 Apr 2025 23:23:51 +0200 Subject: [PATCH] HASPmota default theme is now Tasmota-style (#23288) --- CHANGELOG.md | 1 + .../LVGL_assets/src/lv_theme_haspmota.c | 1510 +++++----- .../LVGL_assets/src/lv_theme_haspmota.h | 3 +- .../generate/LVGL_API_Reference.md | 2 +- .../generate/be_lvgl_module.c | 2 +- .../lv_binding_berry/mapping/lv_funcs.h | 2 +- .../src/embedded/lvgl_extra.be | 20 + .../src/solidify/solidified_lvgl_extra.h | 502 ++-- .../lv_binding_berry/tools/convert.py | 1 + .../lv_haspmota/src/embedded/lv_haspmota.be | 33 +- .../src/solidify/solidified_lv_haspmota.h | 2596 +++++++++-------- 11 files changed, 2559 insertions(+), 2113 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8c50847..bb5aa54d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Breaking Changed - HASPmota added `y2_min` and `y2_max` to control the second series of `chart` +- HASPmota default theme is now Tasmota-style ### Changed - Output of commands `GPIO` and `GPIOs` swapped diff --git a/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.c b/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.c index f963f09c0..fefbf6fe8 100644 --- a/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.c +++ b/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.c @@ -1,24 +1,34 @@ /** - * @file lv_theme_defau.c - * - */ +* @file lv_theme_defau.c +* +*/ #include /********************* - * INCLUDES - *********************/ +* INCLUDES +*********************/ #include "../lvgl.h" /*To see all the widgets*/ #include "themes/lv_theme_private.h" #include "lv_theme_haspmota.h" -// #include "misc/lv_gc.h" TODO +#include "core/lv_global.h" /********************* - * DEFINES - *********************/ +* DEFINES +*********************/ + +// for lightweight logging +extern void berry_log_C(const char * berry_buf, ...); + + +struct _haspmota_theme_t; +typedef struct _haspmota_theme_t haspmota_theme_t; + +#define theme_def (*(haspmota_theme_t **)(&LV_GLOBAL_DEFAULT()->theme_default)) + #define MODE_DARK 1 -#define RADIUS_DEFAULT (disp_size == DISP_LARGE ? lv_display_dpx(theme.disp, 12) : lv_display_dpx(theme.disp, 8)) +#define RADIUS_DEFAULT LV_DPX_CALC(theme->disp_dpi, theme->disp_size == DISP_LARGE ? 12 : 8) /*SCREEN*/ #define LIGHT_COLOR_SCR lv_palette_lighten(LV_PALETTE_GREY, 4) @@ -26,77 +36,17 @@ #define LIGHT_COLOR_TEXT lv_palette_darken(LV_PALETTE_GREY, 4) #define LIGHT_COLOR_GREY lv_palette_lighten(LV_PALETTE_GREY, 2) #define DARK_COLOR_SCR lv_color_hex(0x15171A) -#define DARK_COLOR_CARD lv_color_hex(0x545b6a) -#define DARK_COLOR_TEXT lv_color_hex(0xefefef) +#define DARK_COLOR_CARD lv_color_hex(0x282b30) +#define DARK_COLOR_TEXT lv_palette_lighten(LV_PALETTE_GREY, 5) #define DARK_COLOR_GREY lv_color_hex(0x2f3237) #define TRANSITION_TIME LV_THEME_DEFAULT_TRANSITION_TIME -#define BORDER_WIDTH lv_display_dpx(theme.disp, 2) -#define OUTLINE_WIDTH lv_display_dpx(theme.disp, 3) +#define BORDER_WIDTH LV_DPX_CALC(theme->disp_dpi, 3) // Tasmota from 2 to 3 +#define OUTLINE_WIDTH LV_DPX_CALC(theme->disp_dpi, 3) -#define PAD_DEF (disp_size == DISP_LARGE ? lv_display_dpx(theme.disp, 24) : disp_size == DISP_MEDIUM ? lv_display_dpx(theme.disp, 20) : lv_display_dpx(theme.disp, 16)) -#define PAD_SMALL (disp_size == DISP_LARGE ? lv_display_dpx(theme.disp, 14) : disp_size == DISP_MEDIUM ? lv_display_dpx(theme.disp, 12) : lv_display_dpx(theme.disp, 10)) -#define PAD_TINY (disp_size == DISP_LARGE ? lv_display_dpx(theme.disp, 8) : disp_size == DISP_MEDIUM ? lv_display_dpx(theme.disp, 6) : lv_display_dpx(theme.disp, 2)) - -// OpenHASP specific -/*BUTTON*/ -#define COLOR_BTN (lv_color_lighten(HUE_COLOR, LV_OPA_30)) -#define COLOR_BTN_GRAD (lv_color_darken(HUE_COLOR, LV_OPA_30)) -#define COLOR_BTN_PR (lv_color_darken(COLOR_BTN_CHK, LV_OPA_20)) -#define COLOR_BTN_PR_GRAD lv_color_darken(COLOR_BTN_GRAD, LV_OPA_20) -#define COLOR_BTN_CHK lv_color_darken(COLOR_BTN_GRAD, LV_OPA_20) -#define COLOR_BTN_CHK_GRAD lv_color_darken(COLOR_BTN_GRAD, LV_OPA_10) -#define COLOR_BTN_CHK_PR (lv_color_darken(COLOR_BTN_CHK, LV_OPA_20)) -#define COLOR_BTN_CHK_PR_GRAD (lv_color_darken(COLOR_BTN_CHK_GRAD, LV_OPA_30)) -#define COLOR_BTN_DIS (IS_LIGHT ? lv_color_hex3(0xccc) : lv_color_hex3(0x888)) - -#define COLOR_BTN_BORDER (IS_LIGHT ? (lv_color_darken(HUE_COLOR, LV_OPA_50)) : (lv_color_lighten(HUE_COLOR, LV_OPA_40))) -#define COLOR_BTN_BORDER_PR (IS_LIGHT ? lv_color_hex3(0xccc) : lv_color_hex(0x5f656e)) -#define COLOR_BTN_BORDER_CHK (IS_LIGHT ? lv_color_hex(0x3b3e42) : lv_color_hex(0x5f656e)) -#define COLOR_BTN_BORDER_CHK_PR (IS_LIGHT ? lv_color_hex(0x3b3e42) : lv_color_hex(0x5f656e)) -#define COLOR_BTN_BORDER_INA (IS_LIGHT ? lv_color_hex3(0x888) : lv_color_hex(0x404040)) - -/*BACKGROUND*/ -#define COLOR_BG COLOR_BTN -#define COLOR_BG_PR COLOR_BTN_PR -#define COLOR_BG_CHK COLOR_BTN_CHK -#define COLOR_BG_PR_CHK COLOR_BTN_CHK_PR -#define COLOR_BG_DIS COLOR_BG - -#define COLOR_BG_BORDER (IS_LIGHT ? lv_color_hex(0xd6dde3) : lv_color_hex(0x808a97)) /*dfe7ed*/ -#define COLOR_BG_BORDER_PR (IS_LIGHT ? lv_color_hex3(0xccc) : lv_color_hex(0x5f656e)) -#define COLOR_BG_BORDER_CHK (IS_LIGHT ? lv_color_hex(0x3b3e42) : lv_color_hex(0x5f656e)) -#define COLOR_BG_BORDER_CHK_PR (IS_LIGHT ? lv_color_hex(0x3b3e42) : lv_color_hex(0x5f656e)) -#define COLOR_BG_BORDER_DIS (IS_LIGHT ? lv_color_hex(0xd6dde3) : lv_color_hex(0x5f656e)) - -#define COLOR_BG_TEXT lv_color_hex(0xeeeeee) -#define COLOR_BG_TEXT_PR LV_COLOR_WHITE -#define COLOR_BG_TEXT_CHK LV_COLOR_WHITE -#define COLOR_BG_TEXT_CHK_PR LV_COLOR_WHITE -#define COLOR_BG_TEXT_DIS (IS_LIGHT ? lv_color_hex3(0xaaa) : lv_color_hex3(0x999)) - -/*SECONDARY BACKGROUND*/ -#define COLOR_BG_SEC lv_color_lighten(theme.color_primary, LV_OPA_30) -#define COLOR_BG_GRAD COLOR_BTN_GRAD -#define COLOR_BG_SEC_BORDER (IS_LIGHT ? lv_color_hex(0xdfe7ed) : lv_color_hex(0x404040)) -#define COLOR_BG_SEC_TEXT (IS_LIGHT ? lv_color_hex(0x31404f) : lv_color_hex(0xa5a8ad)) -#define COLOR_BG_SEC_TEXT_DIS (IS_LIGHT ? lv_color_hex(0xaaaaaa) : lv_color_hex(0xa5a8ad)) - -// #define TRANSITION_TIME 0 /*((theme.flags & LV_THEME_HASP_FLAG_NO_TRANSITION) ? 0 : 150)*/ -// #define BORDER_WIDTH HASP_DPX(2) -// #define BORDER_COLOR ((theme.flags & IS_LIGHT) ? lv_color_make(0x40, 0x40, 0x40) : lv_color_make(0xb0, 0xb0, 0xb0)) -// #define OUTLINE_WIDTH ((theme.flags & LV_THEME_HASP_FLAG_NO_FOCUS) ? 0 : HASP_DPX(3)) -// #define OUTLINE_COLOR ((theme.flags & LV_THEME_HASP_FLAG_NO_FOCUS) ? BORDER_COLOR : theme.color_secondary) - -// #define IS_LIGHT (theme.flags & LV_THEME_HASP_FLAG_LIGHT) -// #define NO_FOCUS (theme.flags & LV_THEME_HASP_FLAG_NO_FOCUS) - -// #define PAD_DEF (lv_disp_get_size_category(NULL) <= 720 ? HASP_DPX(15) : (HASP_DPX(30))) // TODO - -/*SCROLLBAR*/ -#define SCROLLBAR_COLOR \ - (IS_LIGHT ? lv_color_mix(theme.color_primary, lv_color_hex3(0x999), LV_OPA_10) \ - : lv_color_mix(theme.color_primary, lv_color_hex3(0x999), LV_OPA_10)) +#define PAD_DEF LV_DPX_CALC(theme->disp_dpi, theme->disp_size == DISP_LARGE ? 24 : theme->disp_size == DISP_MEDIUM ? 20 : 16) +#define PAD_SMALL LV_DPX_CALC(theme->disp_dpi, theme->disp_size == DISP_LARGE ? 14 : theme->disp_size == DISP_MEDIUM ? 12 : 10) +#define PAD_TINY LV_DPX_CALC(theme->disp_dpi, theme->disp_size == DISP_LARGE ? 8 : theme->disp_size == DISP_MEDIUM ? 6 : 2) /********************** * TYPEDEFS @@ -107,6 +57,8 @@ typedef struct { lv_style_t scrollbar_scrolled; lv_style_t card; lv_style_t btn; + lv_style_t btn_border; // force button like border + lv_style_t btn_border_color; // addition, use a light grey border /*Utility*/ lv_style_t bg_color_primary; @@ -129,25 +81,25 @@ typedef struct { lv_style_t circle; lv_style_t no_radius; lv_style_t clip_corner; + lv_style_t rotary_scroll; #if LV_THEME_DEFAULT_GROW lv_style_t grow; #endif lv_style_t transition_delayed; lv_style_t transition_normal; lv_style_t anim; + lv_style_t anim_fast; /*Parts*/ lv_style_t knob; - lv_style_t indic; #if LV_USE_ARC lv_style_t arc_indic; lv_style_t arc_indic_primary; - lv_style_t arc_knob; // knob for arc with zero #endif #if LV_USE_CHART - lv_style_t chart_series, chart_indic, chart_ticks, chart_bg; + lv_style_t chart_series, chart_indic, chart_bg; #endif #if LV_USE_DROPDOWN @@ -170,32 +122,29 @@ typedef struct { lv_style_t table_cell; #endif -#if LV_USE_METER - lv_style_t meter_marker, meter_indic; -#endif - #if LV_USE_TEXTAREA lv_style_t ta_cursor, ta_placeholder; #endif #if LV_USE_CALENDAR - lv_style_t calendar_bg, calendar_day; + lv_style_t calendar_btnm_bg, calendar_btnm_day, calendar_header; #endif -#if LV_USE_COLORWHEEL - lv_style_t colorwheel_main; +#if LV_USE_MENU + lv_style_t menu_bg, menu_cont, menu_sidebar_cont, menu_main_cont, menu_page, menu_header_cont, menu_header_btn, + menu_section, menu_pressed, menu_separator; #endif #if LV_USE_MSGBOX - lv_style_t msgbox_bg, msgbox_btn_bg, msgbox_backdrop_bg; + lv_style_t msgbox_backdrop_bg; #endif #if LV_USE_KEYBOARD - lv_style_t keyboard_btn_bg; + lv_style_t keyboard_button_bg; #endif #if LV_USE_LIST - lv_style_t list_bg, list_btn, list_item_grow, list_label; + lv_style_t list_bg, list_btn, list_item_grow; #endif #if LV_USE_TABVIEW @@ -204,18 +153,37 @@ typedef struct { #if LV_USE_LED lv_style_t led; #endif -} my_theme_styles_t; -typedef struct { - lv_theme_t base; - uint8_t light :1; -}my_theme_t; +#if LV_USE_SCALE + lv_style_t scale; +#endif +} haspmota_theme_styles_t; typedef enum { DISP_SMALL = 3, DISP_MEDIUM = 2, DISP_LARGE = 1, -}disp_size_t; +} disp_size_t; + +struct _haspmota_theme_t { + lv_theme_t base; + disp_size_t disp_size; + int32_t disp_dpi; + lv_color_t color_scr; + lv_color_t color_text; + lv_color_t color_card; + lv_color_t color_grey; + bool inited; + haspmota_theme_styles_t styles; + + lv_color_filter_dsc_t dark_filter; + lv_color_filter_dsc_t grey_filter; + +#if LV_THEME_DEFAULT_TRANSITION_TIME + lv_style_transition_dsc_t trans_delayed; + lv_style_transition_dsc_t trans_normal; +#endif +}; /********************** * STATIC PROTOTYPES @@ -226,15 +194,7 @@ static void style_init_reset(lv_style_t * style); /********************** * STATIC VARIABLES **********************/ -static my_theme_styles_t * styles; -static lv_theme_t theme; -static disp_size_t disp_size; -static bool inited; -static lv_color_t color_scr; -static lv_color_t color_text; -static lv_color_t color_card; -static lv_color_t color_grey; - +static haspmota_theme_t * haspmota_theme = NULL; /********************** * MACROS @@ -244,7 +204,6 @@ static lv_color_t color_grey; * STATIC FUNCTIONS **********************/ - static lv_color_t dark_color_filter_cb(const lv_color_filter_dsc_t * f, lv_color_t c, lv_opa_t opa) { LV_UNUSED(f); @@ -254,377 +213,432 @@ static lv_color_t dark_color_filter_cb(const lv_color_filter_dsc_t * f, lv_color static lv_color_t grey_filter_cb(const lv_color_filter_dsc_t * f, lv_color_t color, lv_opa_t opa) { LV_UNUSED(f); - if(theme.flags & MODE_DARK) return lv_color_mix(lv_palette_darken(LV_PALETTE_GREY, 2), color, opa); + if(haspmota_theme->base.flags & MODE_DARK) return lv_color_mix(lv_palette_darken(LV_PALETTE_GREY, 2), color, opa); else return lv_color_mix(lv_palette_lighten(LV_PALETTE_GREY, 2), color, opa); } -static void style_init(void) +static void style_init(haspmota_theme_t * theme) { +#if TRANSITION_TIME static const lv_style_prop_t trans_props[] = { - LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, - LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_TRANSFORM_HEIGHT, - LV_STYLE_TRANSLATE_Y, LV_STYLE_TRANSLATE_X, - /*LV_STYLE_TRANSFORM_ZOOM_X, LV_STYLE_TRANSFORM_ZOOM_Y,*/ LV_STYLE_TRANSFORM_ANGLE, - LV_STYLE_COLOR_FILTER_OPA, LV_STYLE_COLOR_FILTER_DSC, - 0 + LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, + LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_TRANSFORM_HEIGHT, + LV_STYLE_TRANSLATE_Y, LV_STYLE_TRANSLATE_X, + LV_STYLE_TRANSFORM_ROTATION, + LV_STYLE_TRANSFORM_SCALE_X, LV_STYLE_TRANSFORM_SCALE_Y, + LV_STYLE_COLOR_FILTER_OPA, LV_STYLE_COLOR_FILTER_DSC, + 0 }; - - color_scr = theme.flags & MODE_DARK ? DARK_COLOR_SCR : LIGHT_COLOR_SCR; - color_text = theme.flags & MODE_DARK ? DARK_COLOR_TEXT : LIGHT_COLOR_TEXT; - color_card = theme.flags & MODE_DARK ? DARK_COLOR_CARD : LIGHT_COLOR_CARD; - color_grey = theme.flags & MODE_DARK ? DARK_COLOR_GREY : LIGHT_COLOR_GREY; - - static lv_style_transition_dsc_t trans_delayed; - lv_style_transition_dsc_init(&trans_delayed, trans_props, lv_anim_path_linear, TRANSITION_TIME, 70, NULL); - - static lv_style_transition_dsc_t trans_normal; - lv_style_transition_dsc_init(&trans_normal, trans_props, lv_anim_path_linear, TRANSITION_TIME, 0, NULL); - - style_init_reset(&styles->transition_delayed); - lv_style_set_transition(&styles->transition_delayed, &trans_delayed); /*Go back to default state with delay*/ - - style_init_reset(&styles->transition_normal); - lv_style_set_transition(&styles->transition_normal, &trans_normal); /*Go back to default state with delay*/ - - style_init_reset(&styles->scrollbar); - lv_style_set_bg_color(&styles->scrollbar, (theme.flags & MODE_DARK) ? lv_palette_darken(LV_PALETTE_GREY, 2) : lv_palette_main(LV_PALETTE_GREY)); - lv_style_set_radius(&styles->scrollbar, LV_RADIUS_CIRCLE); - lv_style_set_pad_right(&styles->scrollbar, lv_display_dpx(theme.disp, 7)); - lv_style_set_pad_top(&styles->scrollbar, lv_display_dpx(theme.disp, 7)); - lv_style_set_size(&styles->scrollbar, lv_display_dpx(theme.disp, 5), lv_display_dpx(theme.disp, 5)); - lv_style_set_bg_opa(&styles->scrollbar, LV_OPA_40); - lv_style_set_transition(&styles->scrollbar, &trans_normal); - - style_init_reset(&styles->scrollbar_scrolled); - lv_style_set_bg_opa(&styles->scrollbar_scrolled, LV_OPA_COVER); - - style_init_reset(&styles->scr); - lv_style_set_bg_opa(&styles->scr, LV_OPA_COVER); - lv_style_set_bg_color(&styles->scr, color_scr); - lv_style_set_text_color(&styles->scr, color_text); - lv_style_set_pad_row(&styles->scr, PAD_SMALL); - lv_style_set_pad_column(&styles->scr, PAD_SMALL); - lv_style_set_text_font(&styles->scr, theme.font_small); - lv_style_set_text_color(&styles->scr, color_text); - - style_init_reset(&styles->card); - lv_style_set_radius(&styles->card, RADIUS_DEFAULT); - lv_style_set_bg_opa(&styles->card, LV_OPA_TRANSP); // OpenHASP - lv_style_set_bg_color(&styles->card, color_card); - lv_style_set_border_color(&styles->card, color_grey); - lv_style_set_border_width(&styles->card, BORDER_WIDTH); - lv_style_set_border_post(&styles->card, true); - lv_style_set_text_color(&styles->card, color_text); - lv_style_set_pad_all(&styles->card, PAD_DEF); - lv_style_set_pad_row(&styles->card, PAD_SMALL); - lv_style_set_pad_column(&styles->card, PAD_SMALL); - lv_style_set_line_color(&styles->card, lv_palette_main(LV_PALETTE_GREY)); - lv_style_set_line_width(&styles->card, lv_display_dpx(theme.disp, 1)); - - style_init_reset(&styles->outline_primary); - lv_style_set_outline_color(&styles->outline_primary, theme.color_primary); - lv_style_set_outline_width(&styles->outline_primary, OUTLINE_WIDTH); - lv_style_set_outline_pad(&styles->outline_primary, OUTLINE_WIDTH); - lv_style_set_outline_opa(&styles->outline_primary, LV_OPA_50); - - style_init_reset(&styles->outline_secondary); - lv_style_set_outline_color(&styles->outline_secondary, theme.color_secondary); - lv_style_set_outline_width(&styles->outline_secondary, OUTLINE_WIDTH); - lv_style_set_outline_opa(&styles->outline_secondary, LV_OPA_50); - - style_init_reset(&styles->btn); - lv_style_set_radius(&styles->btn, (disp_size == DISP_LARGE ? lv_display_dpx(theme.disp, 16) : disp_size == DISP_MEDIUM ? lv_display_dpx(theme.disp, 12) : lv_display_dpx(theme.disp, 8))); - lv_style_set_bg_opa(&styles->btn, LV_OPA_COVER); - lv_style_set_bg_color(&styles->btn, color_grey); - // if(!(theme.flags & MODE_DARK)) { // OpenHASP - // lv_style_set_shadow_color(&styles->btn, lv_palette_lighten(LV_PALETTE_GREY, 3)); - // lv_style_set_shadow_width(&styles->btn, 1); - // lv_style_set_shadow_ofs_y(&styles->btn, lv_display_dpx(theme.disp, 4)); - // } - lv_style_set_text_color(&styles->btn, color_text); - lv_style_set_pad_hor(&styles->btn, PAD_DEF); - lv_style_set_pad_ver(&styles->btn, PAD_SMALL); - lv_style_set_pad_column(&styles->btn, lv_display_dpx(theme.disp, 5)); - lv_style_set_pad_row(&styles->btn, lv_display_dpx(theme.disp, 5)); - lv_style_set_text_font(&styles->btn, theme.font_normal); - - static lv_color_filter_dsc_t dark_filter; - lv_color_filter_dsc_init(&dark_filter, dark_color_filter_cb); - - static lv_color_filter_dsc_t grey_filter; - lv_color_filter_dsc_init(&grey_filter, grey_filter_cb); - - style_init_reset(&styles->pressed); - lv_style_set_color_filter_dsc(&styles->pressed, &dark_filter); - lv_style_set_color_filter_opa(&styles->pressed, 35); - - style_init_reset(&styles->disabled); - lv_style_set_color_filter_dsc(&styles->disabled, &grey_filter); - lv_style_set_color_filter_opa(&styles->disabled, LV_OPA_50); - - style_init_reset(&styles->clip_corner); - lv_style_set_clip_corner(&styles->clip_corner, true); - - style_init_reset(&styles->pad_normal); - lv_style_set_pad_all(&styles->pad_normal, PAD_DEF); - lv_style_set_pad_row(&styles->pad_normal, PAD_DEF); - lv_style_set_pad_column(&styles->pad_normal, PAD_DEF); - - style_init_reset(&styles->pad_small); - lv_style_set_pad_all(&styles->pad_small, PAD_SMALL); - lv_style_set_pad_gap(&styles->pad_small, PAD_SMALL); - - style_init_reset(&styles->pad_gap); - lv_style_set_pad_row(&styles->pad_gap, lv_display_dpx(theme.disp, 10)); - lv_style_set_pad_column(&styles->pad_gap, lv_display_dpx(theme.disp, 10)); - - style_init_reset(&styles->line_space_large); - lv_style_set_text_line_space(&styles->line_space_large, lv_display_dpx(theme.disp, 20)); - - style_init_reset(&styles->text_align_center); - lv_style_set_text_align(&styles->text_align_center, LV_TEXT_ALIGN_CENTER); - - style_init_reset(&styles->pad_zero); - lv_style_set_pad_all(&styles->pad_zero, 0); - lv_style_set_pad_row(&styles->pad_zero, 0); - lv_style_set_pad_column(&styles->pad_zero, 0); - - style_init_reset(&styles->pad_tiny); - lv_style_set_pad_all(&styles->pad_tiny, PAD_TINY); - lv_style_set_pad_row(&styles->pad_tiny, PAD_TINY); - lv_style_set_pad_column(&styles->pad_tiny, PAD_TINY); - - style_init_reset(&styles->bg_color_primary); - lv_style_set_bg_color(&styles->bg_color_primary, theme.color_primary); - lv_style_set_text_color(&styles->bg_color_primary, lv_color_white()); - lv_style_set_bg_opa(&styles->bg_color_primary, LV_OPA_COVER); - - style_init_reset(&styles->bg_color_primary_muted); - lv_style_set_bg_color(&styles->bg_color_primary_muted, theme.color_primary); - lv_style_set_text_color(&styles->bg_color_primary_muted, theme.color_primary); - lv_style_set_bg_opa(&styles->bg_color_primary_muted, LV_OPA_20); - - style_init_reset(&styles->bg_color_secondary); - lv_style_set_bg_color(&styles->bg_color_secondary, theme.color_secondary); - lv_style_set_text_color(&styles->bg_color_secondary, lv_color_white()); - lv_style_set_bg_opa(&styles->bg_color_secondary, LV_OPA_COVER); - - style_init_reset(&styles->bg_color_secondary_muted); - lv_style_set_bg_color(&styles->bg_color_secondary_muted, theme.color_secondary); - lv_style_set_text_color(&styles->bg_color_secondary_muted, theme.color_secondary); - lv_style_set_bg_opa(&styles->bg_color_secondary_muted, LV_OPA_20); - - style_init_reset(&styles->bg_color_grey); - lv_style_set_bg_color(&styles->bg_color_grey, color_grey); - lv_style_set_bg_opa(&styles->bg_color_grey, LV_OPA_COVER); - lv_style_set_text_color(&styles->bg_color_grey, color_text); - - style_init_reset(&styles->bg_color_white); - lv_style_set_bg_color(&styles->bg_color_white, color_card); - lv_style_set_bg_opa(&styles->bg_color_white, LV_OPA_COVER); - lv_style_set_text_color(&styles->bg_color_white, color_text); - - style_init_reset(&styles->circle); - lv_style_set_radius(&styles->circle, LV_RADIUS_CIRCLE); - - style_init_reset(&styles->no_radius); - lv_style_set_radius(&styles->no_radius, 0); - -#if LV_THEME_DEFAULT_GROW - style_init_reset(&styles->grow); - lv_style_set_transform_width(&styles->grow, lv_display_dpx(theme.disp, 3)); - lv_style_set_transform_height(&styles->grow, lv_display_dpx(theme.disp, 3)); #endif - style_init_reset(&styles->knob); - lv_style_set_bg_color(&styles->knob, theme.color_primary); - lv_style_set_bg_opa(&styles->knob, LV_OPA_COVER); - lv_style_set_pad_all(&styles->knob, lv_display_dpx(theme.disp, 6)); - lv_style_set_radius(&styles->knob, LV_RADIUS_CIRCLE); + // berry_log_C("HSP> theme->color_scr #%02X%02X%02X", theme->color_scr.red, theme->color_scr.green, theme->color_scr.blue); - style_init_reset(&styles->anim); - lv_style_set_anim_time(&styles->anim, 200); + style_init_reset(&theme->styles.transition_delayed); + style_init_reset(&theme->styles.transition_normal); +#if TRANSITION_TIME + lv_style_transition_dsc_init(&theme->trans_delayed, trans_props, lv_anim_path_linear, TRANSITION_TIME, 70, NULL); + lv_style_transition_dsc_init(&theme->trans_normal, trans_props, lv_anim_path_linear, TRANSITION_TIME, 0, NULL); + + lv_style_set_transition(&theme->styles.transition_delayed, + &theme->trans_delayed); /*Go back to default state with delay*/ + + lv_style_set_transition(&theme->styles.transition_normal, &theme->trans_normal); /*Go back to default state with delay*/ +#endif + + style_init_reset(&theme->styles.scrollbar); + lv_color_t sb_color = (theme->base.flags & MODE_DARK) ? lv_palette_darken(LV_PALETTE_GREY, + 2) : lv_palette_main(LV_PALETTE_GREY); + lv_style_set_bg_color(&theme->styles.scrollbar, sb_color); + + lv_style_set_radius(&theme->styles.scrollbar, LV_RADIUS_CIRCLE); + lv_style_set_pad_all(&theme->styles.scrollbar, LV_DPX_CALC(theme->disp_dpi, 7)); + lv_style_set_width(&theme->styles.scrollbar, LV_DPX_CALC(theme->disp_dpi, 5)); + lv_style_set_bg_opa(&theme->styles.scrollbar, LV_OPA_40); +#if TRANSITION_TIME + lv_style_set_transition(&theme->styles.scrollbar, &theme->trans_normal); +#endif + + style_init_reset(&theme->styles.scrollbar_scrolled); + lv_style_set_bg_opa(&theme->styles.scrollbar_scrolled, LV_OPA_COVER); + + style_init_reset(&theme->styles.scr); + lv_style_set_bg_opa(&theme->styles.scr, LV_OPA_COVER); + lv_style_set_bg_color(&theme->styles.scr, theme->color_scr); + lv_style_set_text_color(&theme->styles.scr, theme->color_text); + lv_style_set_text_font(&theme->styles.scr, theme->base.font_normal); + lv_style_set_pad_row(&theme->styles.scr, PAD_SMALL); + lv_style_set_pad_column(&theme->styles.scr, PAD_SMALL); + lv_style_set_rotary_sensitivity(&theme->styles.scr, theme->disp_dpi / 4 * 256); + + style_init_reset(&theme->styles.card); + lv_style_set_radius(&theme->styles.card, RADIUS_DEFAULT); + lv_style_set_bg_opa(&theme->styles.card, LV_OPA_COVER); + lv_style_set_bg_color(&theme->styles.card, theme->color_card); + lv_style_set_border_color(&theme->styles.card, theme->color_grey); + lv_style_set_border_width(&theme->styles.card, BORDER_WIDTH); + lv_style_set_border_post(&theme->styles.card, true); + lv_style_set_text_color(&theme->styles.card, theme->color_text); + lv_style_set_pad_all(&theme->styles.card, PAD_DEF); + lv_style_set_pad_row(&theme->styles.card, PAD_SMALL); + lv_style_set_pad_column(&theme->styles.card, PAD_SMALL); + lv_style_set_line_color(&theme->styles.card, lv_palette_main(LV_PALETTE_GREY)); + lv_style_set_line_width(&theme->styles.card, LV_DPX_CALC(theme->disp_dpi, 1)); + + style_init_reset(&theme->styles.outline_primary); + lv_style_set_outline_color(&theme->styles.outline_primary, theme->base.color_primary); + lv_style_set_outline_width(&theme->styles.outline_primary, OUTLINE_WIDTH); + lv_style_set_outline_pad(&theme->styles.outline_primary, OUTLINE_WIDTH); + lv_style_set_outline_opa(&theme->styles.outline_primary, LV_OPA_50); + + style_init_reset(&theme->styles.outline_secondary); + lv_style_set_outline_color(&theme->styles.outline_secondary, theme->base.color_secondary); + lv_style_set_outline_width(&theme->styles.outline_secondary, OUTLINE_WIDTH); + lv_style_set_outline_opa(&theme->styles.outline_secondary, LV_OPA_50); + + style_init_reset(&theme->styles.btn); + lv_style_set_text_font(&theme->styles.btn, theme->base.font_normal); + lv_style_set_radius(&theme->styles.btn, + LV_DPX_CALC(theme->disp_dpi, theme->disp_size == DISP_LARGE ? 16 : theme->disp_size == DISP_MEDIUM ? 12 : 10)); // Tasmota min 10 + lv_style_set_bg_opa(&theme->styles.btn, LV_OPA_COVER); + lv_style_set_bg_color(&theme->styles.btn, theme->color_grey); + lv_style_set_text_color(&theme->styles.btn, theme->color_text); + lv_style_set_pad_hor(&theme->styles.btn, PAD_DEF); + lv_style_set_pad_ver(&theme->styles.btn, PAD_SMALL); + lv_style_set_pad_column(&theme->styles.btn, LV_DPX_CALC(theme->disp_dpi, 5)); + lv_style_set_pad_row(&theme->styles.btn, LV_DPX_CALC(theme->disp_dpi, 5)); + + style_init_reset(&theme->styles.btn_border_color); + lv_style_set_border_color(&theme->styles.btn_border_color, lv_color_mix(theme->color_text, theme->color_grey, LV_OPA_80)); + + style_init_reset(&theme->styles.btn_border); + lv_style_set_border_width(&theme->styles.btn_border, BORDER_WIDTH); + lv_style_set_border_side(&theme->styles.btn_border, LV_BORDER_SIDE_FULL); + lv_style_set_border_opa(&theme->styles.btn_border, LV_OPA_COVER); + + lv_color_filter_dsc_init(&theme->dark_filter, dark_color_filter_cb); + lv_color_filter_dsc_init(&theme->grey_filter, grey_filter_cb); + + style_init_reset(&theme->styles.pressed); + lv_style_set_color_filter_dsc(&theme->styles.pressed, &theme->dark_filter); + lv_style_set_color_filter_opa(&theme->styles.pressed, LV_OPA_60); // Tasmota from 35 ot LV_OPA_60 (153) + + style_init_reset(&theme->styles.disabled); + lv_style_set_color_filter_dsc(&theme->styles.disabled, &theme->grey_filter); + lv_style_set_color_filter_opa(&theme->styles.disabled, LV_OPA_50); + + style_init_reset(&theme->styles.clip_corner); + lv_style_set_clip_corner(&theme->styles.clip_corner, true); + lv_style_set_border_post(&theme->styles.clip_corner, true); + + style_init_reset(&theme->styles.pad_normal); + lv_style_set_pad_all(&theme->styles.pad_normal, PAD_DEF); + lv_style_set_pad_row(&theme->styles.pad_normal, PAD_DEF); + lv_style_set_pad_column(&theme->styles.pad_normal, PAD_DEF); + + style_init_reset(&theme->styles.pad_small); + lv_style_set_pad_all(&theme->styles.pad_small, PAD_SMALL); + lv_style_set_pad_gap(&theme->styles.pad_small, PAD_SMALL); + + style_init_reset(&theme->styles.pad_gap); + lv_style_set_pad_row(&theme->styles.pad_gap, LV_DPX_CALC(theme->disp_dpi, 10)); + lv_style_set_pad_column(&theme->styles.pad_gap, LV_DPX_CALC(theme->disp_dpi, 10)); + + style_init_reset(&theme->styles.line_space_large); + lv_style_set_text_line_space(&theme->styles.line_space_large, LV_DPX_CALC(theme->disp_dpi, 20)); + + style_init_reset(&theme->styles.text_align_center); + lv_style_set_text_align(&theme->styles.text_align_center, LV_TEXT_ALIGN_CENTER); + + style_init_reset(&theme->styles.pad_zero); + lv_style_set_pad_all(&theme->styles.pad_zero, 0); + lv_style_set_pad_row(&theme->styles.pad_zero, 0); + lv_style_set_pad_column(&theme->styles.pad_zero, 0); + + style_init_reset(&theme->styles.pad_tiny); + lv_style_set_pad_all(&theme->styles.pad_tiny, PAD_TINY); + lv_style_set_pad_row(&theme->styles.pad_tiny, PAD_TINY); + lv_style_set_pad_column(&theme->styles.pad_tiny, PAD_TINY); + + style_init_reset(&theme->styles.bg_color_primary); + lv_style_set_bg_color(&theme->styles.bg_color_primary, theme->base.color_primary); + lv_style_set_text_color(&theme->styles.bg_color_primary, lv_color_white()); + lv_style_set_bg_opa(&theme->styles.bg_color_primary, LV_OPA_COVER); + + style_init_reset(&theme->styles.bg_color_primary_muted); + lv_style_set_bg_color(&theme->styles.bg_color_primary_muted, theme->base.color_primary); + lv_style_set_text_color(&theme->styles.bg_color_primary_muted, theme->base.color_primary); + lv_style_set_bg_opa(&theme->styles.bg_color_primary_muted, LV_OPA_20); + + style_init_reset(&theme->styles.bg_color_secondary); + lv_style_set_bg_color(&theme->styles.bg_color_secondary, theme->base.color_secondary); + lv_style_set_text_color(&theme->styles.bg_color_secondary, lv_color_white()); + lv_style_set_bg_opa(&theme->styles.bg_color_secondary, LV_OPA_COVER); + + style_init_reset(&theme->styles.bg_color_secondary_muted); + lv_style_set_bg_color(&theme->styles.bg_color_secondary_muted, theme->base.color_secondary); + lv_style_set_text_color(&theme->styles.bg_color_secondary_muted, theme->base.color_secondary); + lv_style_set_bg_opa(&theme->styles.bg_color_secondary_muted, LV_OPA_20); + + style_init_reset(&theme->styles.bg_color_grey); + lv_style_set_bg_color(&theme->styles.bg_color_grey, theme->color_grey); + lv_style_set_bg_opa(&theme->styles.bg_color_grey, LV_OPA_COVER); + lv_style_set_text_color(&theme->styles.bg_color_grey, theme->color_text); + + style_init_reset(&theme->styles.bg_color_white); + lv_style_set_bg_color(&theme->styles.bg_color_white, theme->color_card); + lv_style_set_bg_opa(&theme->styles.bg_color_white, LV_OPA_COVER); + lv_style_set_text_color(&theme->styles.bg_color_white, theme->color_text); + + style_init_reset(&theme->styles.circle); + lv_style_set_radius(&theme->styles.circle, LV_RADIUS_CIRCLE); + + style_init_reset(&theme->styles.no_radius); + lv_style_set_radius(&theme->styles.no_radius, 0); + + style_init_reset(&theme->styles.rotary_scroll); + lv_style_set_rotary_sensitivity(&theme->styles.rotary_scroll, theme->disp_dpi / 4 * 256); + +#if LV_THEME_DEFAULT_GROW + style_init_reset(&theme->styles.grow); + lv_style_set_transform_width(&theme->styles.grow, LV_DPX_CALC(theme->disp_dpi, 3)); + lv_style_set_transform_height(&theme->styles.grow, LV_DPX_CALC(theme->disp_dpi, 3)); +#endif + + style_init_reset(&theme->styles.knob); + lv_style_set_bg_color(&theme->styles.knob, theme->base.color_primary); + lv_style_set_bg_opa(&theme->styles.knob, LV_OPA_COVER); + lv_style_set_pad_all(&theme->styles.knob, LV_DPX_CALC(theme->disp_dpi, 6)); + lv_style_set_radius(&theme->styles.knob, LV_RADIUS_CIRCLE); + + style_init_reset(&theme->styles.anim); + lv_style_set_anim_duration(&theme->styles.anim, 200); + + style_init_reset(&theme->styles.anim_fast); + lv_style_set_anim_duration(&theme->styles.anim_fast, 120); #if LV_USE_ARC - style_init_reset(&styles->arc_indic); - lv_style_set_arc_color(&styles->arc_indic, color_grey); - lv_style_set_arc_width(&styles->arc_indic, lv_display_dpx(theme.disp, 18)); // OpenHASP - lv_style_set_arc_rounded(&styles->arc_indic, true); + style_init_reset(&theme->styles.arc_indic); + lv_style_set_arc_color(&theme->styles.arc_indic, theme->color_grey); + lv_style_set_arc_width(&theme->styles.arc_indic, LV_DPX_CALC(theme->disp_dpi, 15)); + lv_style_set_arc_rounded(&theme->styles.arc_indic, true); - style_init_reset(&styles->arc_indic_primary); - lv_style_set_arc_color(&styles->arc_indic_primary, theme.color_primary); - - // OpenHASP - style_init_reset(&styles->arc_knob); - lv_style_set_bg_color(&styles->arc_knob, theme.color_primary); - lv_style_set_bg_opa(&styles->arc_knob, LV_OPA_COVER); - lv_style_set_pad_all(&styles->arc_knob, lv_display_dpx(theme.disp, 4)); - lv_style_set_radius(&styles->arc_knob, LV_RADIUS_CIRCLE); + style_init_reset(&theme->styles.arc_indic_primary); + lv_style_set_arc_color(&theme->styles.arc_indic_primary, theme->base.color_primary); #endif #if LV_USE_DROPDOWN - style_init_reset(&styles->dropdown_list); - lv_style_set_max_height(&styles->dropdown_list, LV_DPI_DEF * 2); + style_init_reset(&theme->styles.dropdown_list); + lv_style_set_max_height(&theme->styles.dropdown_list, LV_DPI_DEF * 2); #endif -#if LV_USE_CHECKBOX - style_init_reset(&styles->cb_marker); - lv_style_set_pad_all(&styles->cb_marker, lv_display_dpx(theme.disp, 3)); - lv_style_set_border_width(&styles->cb_marker, BORDER_WIDTH); - lv_style_set_border_color(&styles->cb_marker, theme.color_primary); - lv_style_set_bg_color(&styles->cb_marker, color_card); - lv_style_set_bg_opa(&styles->cb_marker, LV_OPA_COVER); - lv_style_set_radius(&styles->cb_marker, RADIUS_DEFAULT / 2); - style_init_reset(&styles->cb_marker_checked); - lv_style_set_bg_image_src(&styles->cb_marker_checked, LV_SYMBOL_OK); - lv_style_set_text_color(&styles->cb_marker_checked, lv_color_white()); - lv_style_set_text_font(&styles->cb_marker_checked, theme.font_small); +#if LV_USE_CHECKBOX + style_init_reset(&theme->styles.cb_marker); + lv_style_set_pad_all(&theme->styles.cb_marker, LV_DPX_CALC(theme->disp_dpi, 3)); + lv_style_set_border_width(&theme->styles.cb_marker, BORDER_WIDTH); + lv_style_set_border_color(&theme->styles.cb_marker, theme->base.color_primary); + lv_style_set_bg_color(&theme->styles.cb_marker, theme->color_card); + lv_style_set_bg_opa(&theme->styles.cb_marker, LV_OPA_COVER); + lv_style_set_radius(&theme->styles.cb_marker, RADIUS_DEFAULT / 2); + lv_style_set_text_font(&theme->styles.cb_marker, theme->base.font_small); + lv_style_set_text_color(&theme->styles.cb_marker, lv_color_white()); + + style_init_reset(&theme->styles.cb_marker_checked); + lv_style_set_bg_image_src(&theme->styles.cb_marker_checked, LV_SYMBOL_OK); #endif #if LV_USE_SWITCH - style_init_reset(&styles->switch_knob); - lv_style_set_pad_all(&styles->switch_knob, - lv_display_dpx(theme.disp, 4)); - lv_style_set_bg_color(&styles->switch_knob, lv_color_white()); + style_init_reset(&theme->styles.switch_knob); + lv_style_set_pad_all(&theme->styles.switch_knob, - LV_DPX_CALC(theme->disp_dpi, 4)); + lv_style_set_bg_color(&theme->styles.switch_knob, lv_color_white()); #endif #if LV_USE_LINE - style_init_reset(&styles->line); - lv_style_set_line_width(&styles->line, 1); - lv_style_set_line_color(&styles->line, color_text); + style_init_reset(&theme->styles.line); + lv_style_set_line_width(&theme->styles.line, 1); + lv_style_set_line_color(&theme->styles.line, theme->color_text); #endif #if LV_USE_CHART - style_init_reset(&styles->chart_bg); - lv_style_set_border_post(&styles->chart_bg, false); - lv_style_set_pad_column(&styles->chart_bg, lv_display_dpx(theme.disp, 10)); - lv_style_set_line_color(&styles->chart_bg, color_grey); + style_init_reset(&theme->styles.chart_bg); + lv_style_set_border_post(&theme->styles.chart_bg, false); + lv_style_set_pad_column(&theme->styles.chart_bg, LV_DPX_CALC(theme->disp_dpi, 10)); + lv_style_set_line_color(&theme->styles.chart_bg, theme->color_grey); - style_init_reset(&styles->chart_series); - lv_style_set_line_width(&styles->chart_series, lv_display_dpx(theme.disp, 3)); - lv_style_set_radius(&styles->chart_series, lv_display_dpx(theme.disp, 3)); - lv_style_set_size(&styles->chart_series, lv_display_dpx(theme.disp, 8), lv_display_dpx(theme.disp, 8)); - lv_style_set_pad_column(&styles->chart_series, lv_display_dpx(theme.disp, 2)); + style_init_reset(&theme->styles.chart_series); + lv_style_set_line_width(&theme->styles.chart_series, LV_DPX_CALC(theme->disp_dpi, 3)); + lv_style_set_radius(&theme->styles.chart_series, LV_DPX_CALC(theme->disp_dpi, 3)); - style_init_reset(&styles->chart_indic); - lv_style_set_radius(&styles->chart_indic,LV_RADIUS_CIRCLE); - lv_style_set_size(&styles->chart_indic, lv_display_dpx(theme.disp, 8), lv_display_dpx(theme.disp, 8)); - lv_style_set_bg_color(&styles->chart_indic, theme.color_primary); - lv_style_set_bg_opa(&styles->chart_indic, LV_OPA_COVER); + int32_t chart_size = LV_DPX_CALC(theme->disp_dpi, 8); + lv_style_set_size(&theme->styles.chart_series, chart_size, chart_size); + lv_style_set_pad_column(&theme->styles.chart_series, LV_DPX_CALC(theme->disp_dpi, 2)); - style_init_reset(&styles->chart_ticks); - lv_style_set_line_width(&styles->chart_ticks, lv_display_dpx(theme.disp, 1)); - lv_style_set_line_color(&styles->chart_ticks, color_text); - lv_style_set_pad_all(&styles->chart_ticks, lv_display_dpx(theme.disp, 2)); - lv_style_set_text_color(&styles->chart_ticks, lv_palette_main(LV_PALETTE_GREY)); + style_init_reset(&theme->styles.chart_indic); + lv_style_set_radius(&theme->styles.chart_indic, LV_RADIUS_CIRCLE); + lv_style_set_size(&theme->styles.chart_indic, chart_size, chart_size); + lv_style_set_bg_color(&theme->styles.chart_indic, theme->base.color_primary); + lv_style_set_bg_opa(&theme->styles.chart_indic, LV_OPA_COVER); #endif -#if LV_USE_METER - style_init_reset(&styles->meter_marker); - lv_style_set_line_width(&styles->meter_marker, lv_display_dpx(theme.disp, 5)); - lv_style_set_line_color(&styles->meter_marker, color_text); - lv_style_set_size(&styles->meter_marker, lv_display_dpx(theme.disp, 20)); - lv_style_set_pad_left(&styles->meter_marker, lv_display_dpx(theme.disp, 15)); +#if LV_USE_MENU + style_init_reset(&theme->styles.menu_bg); + lv_style_set_pad_all(&theme->styles.menu_bg, 0); + lv_style_set_pad_gap(&theme->styles.menu_bg, 0); + lv_style_set_radius(&theme->styles.menu_bg, 0); + lv_style_set_clip_corner(&theme->styles.menu_bg, true); + lv_style_set_border_side(&theme->styles.menu_bg, LV_BORDER_SIDE_NONE); - style_init_reset(&styles->meter_indic); - lv_style_set_radius(&styles->meter_indic, LV_RADIUS_CIRCLE); - lv_style_set_bg_color(&styles->meter_indic, color_text); - lv_style_set_bg_opa(&styles->meter_indic, LV_OPA_COVER); - lv_style_set_size(&styles->meter_indic, lv_display_dpx(theme.disp, 15)); + style_init_reset(&theme->styles.menu_section); + lv_style_set_radius(&theme->styles.menu_section, RADIUS_DEFAULT); + lv_style_set_clip_corner(&theme->styles.menu_section, true); + lv_style_set_bg_opa(&theme->styles.menu_section, LV_OPA_COVER); + lv_style_set_bg_color(&theme->styles.menu_section, theme->color_card); + lv_style_set_text_color(&theme->styles.menu_section, theme->color_text); + + style_init_reset(&theme->styles.menu_cont); + lv_style_set_pad_hor(&theme->styles.menu_cont, PAD_SMALL); + lv_style_set_pad_ver(&theme->styles.menu_cont, PAD_SMALL); + lv_style_set_pad_gap(&theme->styles.menu_cont, PAD_SMALL); + lv_style_set_border_width(&theme->styles.menu_cont, LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_opa(&theme->styles.menu_cont, LV_OPA_10); + lv_style_set_border_color(&theme->styles.menu_cont, theme->color_text); + lv_style_set_border_side(&theme->styles.menu_cont, LV_BORDER_SIDE_NONE); + + style_init_reset(&theme->styles.menu_sidebar_cont); + lv_style_set_pad_all(&theme->styles.menu_sidebar_cont, 0); + lv_style_set_pad_gap(&theme->styles.menu_sidebar_cont, 0); + lv_style_set_border_width(&theme->styles.menu_sidebar_cont, LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_opa(&theme->styles.menu_sidebar_cont, LV_OPA_10); + lv_style_set_border_color(&theme->styles.menu_sidebar_cont, theme->color_text); + lv_style_set_border_side(&theme->styles.menu_sidebar_cont, LV_BORDER_SIDE_RIGHT); + + style_init_reset(&theme->styles.menu_main_cont); + lv_style_set_pad_all(&theme->styles.menu_main_cont, 0); + lv_style_set_pad_gap(&theme->styles.menu_main_cont, 0); + + style_init_reset(&theme->styles.menu_header_cont); + lv_style_set_pad_hor(&theme->styles.menu_header_cont, PAD_SMALL); + lv_style_set_pad_ver(&theme->styles.menu_header_cont, PAD_TINY); + lv_style_set_pad_gap(&theme->styles.menu_header_cont, PAD_SMALL); + + style_init_reset(&theme->styles.menu_header_btn); + lv_style_set_pad_hor(&theme->styles.menu_header_btn, PAD_TINY); + lv_style_set_pad_ver(&theme->styles.menu_header_btn, PAD_TINY); + lv_style_set_shadow_opa(&theme->styles.menu_header_btn, LV_OPA_TRANSP); + lv_style_set_bg_opa(&theme->styles.menu_header_btn, LV_OPA_TRANSP); + lv_style_set_text_color(&theme->styles.menu_header_btn, theme->color_text); + + style_init_reset(&theme->styles.menu_page); + lv_style_set_pad_hor(&theme->styles.menu_page, 0); + lv_style_set_pad_gap(&theme->styles.menu_page, 0); + + style_init_reset(&theme->styles.menu_pressed); + lv_style_set_bg_opa(&theme->styles.menu_pressed, LV_OPA_20); + lv_style_set_bg_color(&theme->styles.menu_pressed, lv_palette_main(LV_PALETTE_GREY)); + + style_init_reset(&theme->styles.menu_separator); + lv_style_set_bg_opa(&theme->styles.menu_separator, LV_OPA_TRANSP); + lv_style_set_pad_ver(&theme->styles.menu_separator, PAD_TINY); #endif #if LV_USE_TABLE - style_init_reset(&styles->table_cell); - lv_style_set_border_width(&styles->table_cell, lv_display_dpx(theme.disp, 1)); - lv_style_set_border_color(&styles->table_cell, color_grey); - lv_style_set_border_side(&styles->table_cell, LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM ); + style_init_reset(&theme->styles.table_cell); + lv_style_set_border_width(&theme->styles.table_cell, LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_color(&theme->styles.table_cell, theme->color_grey); + lv_style_set_border_side(&theme->styles.table_cell, LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM); #endif #if LV_USE_TEXTAREA - style_init_reset(&styles->ta_cursor); - lv_style_set_border_color(&styles->ta_cursor, color_text); - lv_style_set_border_width(&styles->ta_cursor, lv_display_dpx(theme.disp, 2)); - lv_style_set_pad_left(&styles->ta_cursor, lv_display_dpx(theme.disp, 1)); - lv_style_set_border_side(&styles->ta_cursor, LV_BORDER_SIDE_LEFT); - lv_style_set_anim_time(&styles->ta_cursor, 400); + style_init_reset(&theme->styles.ta_cursor); + lv_style_set_border_color(&theme->styles.ta_cursor, theme->color_text); + lv_style_set_border_width(&theme->styles.ta_cursor, LV_DPX_CALC(theme->disp_dpi, 2)); + lv_style_set_pad_left(&theme->styles.ta_cursor, - LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_side(&theme->styles.ta_cursor, LV_BORDER_SIDE_LEFT); + lv_style_set_anim_duration(&theme->styles.ta_cursor, 400); - style_init_reset(&styles->ta_placeholder); - lv_style_set_text_color(&styles->ta_placeholder, (theme.flags & MODE_DARK) ? lv_palette_darken(LV_PALETTE_GREY, 2) : lv_palette_lighten(LV_PALETTE_GREY, 1)); + style_init_reset(&theme->styles.ta_placeholder); + lv_style_set_text_color(&theme->styles.ta_placeholder, + (theme->base.flags & MODE_DARK) ? lv_palette_darken(LV_PALETTE_GREY, + 2) : lv_palette_lighten(LV_PALETTE_GREY, 1)); #endif #if LV_USE_CALENDAR - style_init_reset(&styles->calendar_bg); - lv_style_set_pad_all(&styles->calendar_bg, PAD_SMALL); - lv_style_set_pad_gap(&styles->calendar_bg, PAD_SMALL / 2); - lv_style_set_radius(&styles->calendar_bg, 0); + style_init_reset(&theme->styles.calendar_btnm_bg); + lv_style_set_pad_all(&theme->styles.calendar_btnm_bg, PAD_SMALL); + lv_style_set_pad_gap(&theme->styles.calendar_btnm_bg, PAD_SMALL / 2); - style_init_reset(&styles->calendar_day); - lv_style_set_border_width(&styles->calendar_day, lv_display_dpx(theme.disp, 1)); - lv_style_set_border_color(&styles->calendar_day, color_grey); - lv_style_set_bg_color(&styles->calendar_day, color_card); - lv_style_set_bg_opa(&styles->calendar_day, LV_OPA_20); -#endif + style_init_reset(&theme->styles.calendar_btnm_day); + lv_style_set_border_width(&theme->styles.calendar_btnm_day, LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_color(&theme->styles.calendar_btnm_day, theme->color_grey); + lv_style_set_bg_color(&theme->styles.calendar_btnm_day, theme->color_card); + lv_style_set_bg_opa(&theme->styles.calendar_btnm_day, LV_OPA_20); -#if LV_USE_COLORWHEEL - style_init_reset(&styles->colorwheel_main); - lv_style_set_arc_width(&styles->colorwheel_main, lv_display_dpx(theme.disp, 10)); + style_init_reset(&theme->styles.calendar_header); + lv_style_set_pad_hor(&theme->styles.calendar_header, PAD_SMALL); + lv_style_set_pad_top(&theme->styles.calendar_header, PAD_SMALL); + lv_style_set_pad_bottom(&theme->styles.calendar_header, PAD_TINY); + lv_style_set_pad_gap(&theme->styles.calendar_header, PAD_SMALL); #endif #if LV_USE_MSGBOX - /*To add space for for the button shadow*/ - style_init_reset(&styles->msgbox_btn_bg); - lv_style_set_pad_all(&styles->msgbox_btn_bg, lv_display_dpx(theme.disp, 4)); - - style_init_reset(&styles->msgbox_bg); - lv_style_set_max_width(&styles->msgbox_bg, lv_pct(100)); - - style_init_reset(&styles->msgbox_backdrop_bg); - lv_style_set_bg_color(&styles->msgbox_backdrop_bg, lv_palette_main(LV_PALETTE_GREY)); - lv_style_set_bg_opa(&styles->msgbox_backdrop_bg, LV_OPA_50); + style_init_reset(&theme->styles.msgbox_backdrop_bg); + lv_style_set_bg_color(&theme->styles.msgbox_backdrop_bg, lv_palette_main(LV_PALETTE_GREY)); + lv_style_set_bg_opa(&theme->styles.msgbox_backdrop_bg, LV_OPA_50); #endif #if LV_USE_KEYBOARD - style_init_reset(&styles->keyboard_btn_bg); - lv_style_set_shadow_width(&styles->keyboard_btn_bg, 0); - lv_style_set_radius(&styles->keyboard_btn_bg, disp_size == DISP_SMALL ? RADIUS_DEFAULT / 2 : RADIUS_DEFAULT); + style_init_reset(&theme->styles.keyboard_button_bg); + lv_style_set_shadow_width(&theme->styles.keyboard_button_bg, 0); + lv_style_set_radius(&theme->styles.keyboard_button_bg, + theme->disp_size == DISP_SMALL ? RADIUS_DEFAULT / 2 : RADIUS_DEFAULT); #endif #if LV_USE_TABVIEW - style_init_reset(&styles->tab_btn); - lv_style_set_border_color(&styles->tab_btn, theme.color_primary); - lv_style_set_border_width(&styles->tab_btn, BORDER_WIDTH * 2); - lv_style_set_border_side(&styles->tab_btn, LV_BORDER_SIDE_BOTTOM); + style_init_reset(&theme->styles.tab_btn); + lv_style_set_border_color(&theme->styles.tab_btn, theme->base.color_primary); + lv_style_set_border_width(&theme->styles.tab_btn, BORDER_WIDTH * 2); + lv_style_set_border_side(&theme->styles.tab_btn, LV_BORDER_SIDE_BOTTOM); + lv_style_set_pad_top(&theme->styles.tab_btn, BORDER_WIDTH * 2); - style_init_reset(&styles->tab_bg_focus); - lv_style_set_outline_pad(&styles->tab_bg_focus, -BORDER_WIDTH); + style_init_reset(&theme->styles.tab_bg_focus); + lv_style_set_outline_pad(&theme->styles.tab_bg_focus, -BORDER_WIDTH); #endif #if LV_USE_LIST - style_init_reset(&styles->list_bg); - lv_style_set_pad_hor(&styles->list_bg, PAD_DEF); - lv_style_set_pad_ver(&styles->list_bg, 0); - lv_style_set_pad_gap(&styles->list_bg, 0); - lv_style_set_clip_corner(&styles->list_bg, true); + style_init_reset(&theme->styles.list_bg); + lv_style_set_pad_hor(&theme->styles.list_bg, PAD_DEF); + lv_style_set_pad_ver(&theme->styles.list_bg, 0); + lv_style_set_pad_gap(&theme->styles.list_bg, 0); + lv_style_set_clip_corner(&theme->styles.list_bg, true); - style_init_reset(&styles->list_btn); - lv_style_set_border_width(&styles->list_btn, lv_display_dpx(theme.disp, 1)); - lv_style_set_border_color(&styles->list_btn, color_grey); - lv_style_set_border_side(&styles->list_btn, LV_BORDER_SIDE_BOTTOM); - lv_style_set_pad_all(&styles->list_btn, PAD_SMALL); - lv_style_set_pad_column(&styles->list_btn, PAD_SMALL); + style_init_reset(&theme->styles.list_btn); + lv_style_set_border_width(&theme->styles.list_btn, LV_DPX_CALC(theme->disp_dpi, 1)); + lv_style_set_border_color(&theme->styles.list_btn, theme->color_grey); + lv_style_set_border_side(&theme->styles.list_btn, LV_BORDER_SIDE_BOTTOM); + lv_style_set_pad_all(&theme->styles.list_btn, PAD_SMALL); + lv_style_set_pad_column(&theme->styles.list_btn, PAD_SMALL); - style_init_reset(&styles->list_item_grow); - lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF); + style_init_reset(&theme->styles.list_item_grow); + lv_style_set_transform_width(&theme->styles.list_item_grow, PAD_DEF); #endif - #if LV_USE_LED - style_init_reset(&styles->led); - lv_style_set_bg_opa(&styles->led, LV_OPA_COVER); - lv_style_set_bg_color(&styles->led, lv_color_white()); - lv_style_set_bg_grad_color(&styles->led, lv_palette_main(LV_PALETTE_GREY)); - lv_style_set_radius(&styles->led, LV_RADIUS_CIRCLE); - lv_style_set_shadow_width(&styles->led, lv_display_dpx(theme.disp, 15)); - lv_style_set_shadow_color(&styles->led, lv_color_white()); - lv_style_set_shadow_spread(&styles->led, lv_display_dpx(theme.disp, 5)); + style_init_reset(&theme->styles.led); + lv_style_set_bg_opa(&theme->styles.led, LV_OPA_COVER); + lv_style_set_bg_color(&theme->styles.led, lv_color_white()); + lv_style_set_bg_grad_color(&theme->styles.led, lv_palette_main(LV_PALETTE_GREY)); + lv_style_set_radius(&theme->styles.led, LV_RADIUS_CIRCLE); + lv_style_set_shadow_width(&theme->styles.led, LV_DPX_CALC(theme->disp_dpi, 15)); + lv_style_set_shadow_color(&theme->styles.led, lv_color_white()); + lv_style_set_shadow_spread(&theme->styles.led, LV_DPX_CALC(theme->disp_dpi, 5)); +#endif + +#if LV_USE_SCALE + style_init_reset(&theme->styles.scale); + lv_style_set_line_color(&theme->styles.scale, theme->color_text); + lv_style_set_line_width(&theme->styles.scale, LV_DPX(2)); + lv_style_set_arc_color(&theme->styles.scale, theme->color_text); + lv_style_set_arc_width(&theme->styles.scale, LV_DPX(2)); + lv_style_set_length(&theme->styles.scale, LV_DPX(6)); + lv_style_set_bg_color(&theme->styles.scale, theme->color_card); // put a default grey background #endif } @@ -632,455 +646,595 @@ static void style_init(void) * GLOBAL FUNCTIONS **********************/ -lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t * font) +lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t * colors, + const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_large) { - + // berry_log_C("HSP> called lv_theme_haspmota_init primary #%06X secondary #%06X scr #%06X text #%06X card #%06X grey #%06X", + // colors[0], colors[1], colors[2], colors[3], colors[4], colors[5]); /*This trick is required only to avoid the garbage collection of - *styles' data if LVGL is used in a binding (e.g. Micropython) - *In a general case styles could be in simple `static lv_style_t my_style...` variables*/ - if(!inited) { - // LV_GC_ROOT(_lv_theme_default_styles) = lv_mem_alloc(sizeof(my_theme_styles_t)); - styles = (my_theme_styles_t *) malloc(sizeof(my_theme_styles_t)); // TODO LVGL + *styles' data if LVGL is used in a binding (e.g. MicroPython) + *In a general case styles could be in a simple `static lv_style_t my_style...` variables*/ + + if(!haspmota_theme) { + haspmota_theme = lv_malloc_zeroed(sizeof(haspmota_theme_t)); } - if(LV_HOR_RES <= 320) disp_size = DISP_SMALL; - else if(LV_HOR_RES < 720) disp_size = DISP_MEDIUM; - else disp_size = DISP_LARGE; + haspmota_theme_t * theme = haspmota_theme; - theme.disp = disp; - theme.color_primary = color_primary; - theme.color_secondary = color_secondary; - theme.font_small = font; - theme.font_normal = font; - theme.font_large = font; - theme.apply_cb = theme_apply; - theme.flags = dark ? MODE_DARK : 0; + lv_display_t * new_disp = disp == NULL ? lv_display_get_default() : disp; + int32_t new_dpi = lv_display_get_dpi(new_disp); + int32_t hor_res = lv_display_get_horizontal_resolution(new_disp); + disp_size_t new_size; - style_init(); + if(hor_res <= 320) new_size = DISP_SMALL; + else if(hor_res < 720) new_size = DISP_MEDIUM; + else new_size = DISP_LARGE; - inited = true; + /* check theme information whether will change or not*/ + if(theme->inited && theme->disp_dpi == new_dpi && + theme->disp_size == new_size && + lv_color_eq(theme->base.color_primary, colors[0]) && + lv_color_eq(theme->base.color_secondary, colors[1]) && + theme->base.font_small == font_small && + theme->base.font_normal == font_normal && + theme->base.font_large == font_large) { + return (lv_theme_t *) theme; - if(disp == NULL || lv_disp_get_theme(disp) == &theme) lv_obj_report_style_change(NULL); + } - return (lv_theme_t *)&theme; + theme->disp_size = new_size; + theme->disp_dpi = new_dpi; + theme->base.disp = new_disp; + theme->base.color_primary = colors[0]; + theme->base.color_secondary = colors[1]; + theme->base.font_small = font_small; + theme->base.font_normal = font_normal; + theme->base.font_large = font_large; + theme->base.apply_cb = theme_apply; + + theme->color_scr = colors[2]; + theme->color_text = colors[3]; + theme->color_card = colors[4]; + theme->color_grey = colors[5]; + + // berry_log_C("HSP> called lv_theme_haspmota_init primary #%06X secondary #%06X scr #%06X text #%06X card #%06X grey #%06X", + // lv_color_to_int(theme->base.color_primary), lv_color_to_int(theme->base.color_secondary), lv_color_to_int(theme->color_scr), lv_color_to_int(theme->color_text), lv_color_to_int(theme->color_card), lv_color_to_int(theme->color_grey)); + + style_init(theme); + + if(disp == NULL || lv_display_get_theme(disp) == (lv_theme_t *)theme) lv_obj_report_style_change(NULL); + + theme->inited = true; + + return (lv_theme_t *) theme; } +void lv_theme_haspmota_deinit(void) +{ + haspmota_theme_t * theme = haspmota_theme; + if(theme) { + if(theme->inited) { + lv_style_t * theme_styles = (lv_style_t *)(&(theme->styles)); + uint32_t i; + for(i = 0; i < sizeof(haspmota_theme_styles_t) / sizeof(lv_style_t); i++) { + lv_style_reset(theme_styles + i); + } + + } + lv_free(haspmota_theme); + haspmota_theme = NULL; + } +} + +lv_theme_t * lv_theme_haspmota_get(void) +{ + return (lv_theme_t *)haspmota_theme; +} bool lv_theme_haspmota_is_inited(void) { - return inited; + return (haspmota_theme != NULL && haspmota_theme->inited); } - - static void theme_apply(lv_theme_t * th, lv_obj_t * obj) { LV_UNUSED(th); - if(lv_obj_get_parent(obj) == NULL) { - lv_obj_add_style(obj, &styles->scr, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + haspmota_theme_t * theme = haspmota_theme; + lv_obj_t * parent = lv_obj_get_parent(obj); + + if(parent == NULL) { + lv_obj_add_style(obj, &theme->styles.scr, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); return; } if(lv_obj_check_type(obj, &lv_obj_class)) { #if LV_USE_TABVIEW - lv_obj_t * parent = lv_obj_get_parent(obj); /*Tabview content area*/ - if(lv_obj_check_type(parent, &lv_tabview_class)) { + if(lv_obj_check_type(parent, &lv_tabview_class) && lv_obj_get_child(parent, 1) == obj) { + return; + } + /*Tabview button container*/ + else if(lv_obj_check_type(parent, &lv_tabview_class) && lv_obj_get_child(parent, 0) == obj) { + lv_obj_add_style(obj, &theme->styles.bg_color_white, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.tab_bg_focus, LV_STATE_FOCUS_KEY); return; } /*Tabview pages*/ else if(lv_obj_check_type(lv_obj_get_parent(parent), &lv_tabview_class)) { - lv_obj_add_style(obj, &styles->pad_normal, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.pad_normal, 0); + lv_obj_add_style(obj, &theme->styles.rotary_scroll, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); return; } #endif #if LV_USE_WIN /*Header*/ - if(lv_obj_get_index(obj) == 0 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) { - lv_obj_add_style(obj, &styles->bg_color_grey, 0); - lv_obj_add_style(obj, &styles->pad_tiny, 0); + if(lv_obj_check_type(parent, &lv_win_class) && lv_obj_get_child(parent, 0) == obj) { + lv_obj_add_style(obj, &theme->styles.bg_color_grey, 0); + lv_obj_add_style(obj, &theme->styles.pad_tiny, 0); return; } /*Content*/ - else if(lv_obj_get_index(obj) == 1 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) { - lv_obj_add_style(obj, &styles->scr, 0); - lv_obj_add_style(obj, &styles->pad_normal, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + else if(lv_obj_check_type(parent, &lv_win_class) && lv_obj_get_child(parent, 1) == obj) { + lv_obj_add_style(obj, &theme->styles.scr, 0); + lv_obj_add_style(obj, &theme->styles.pad_normal, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); return; } #endif - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + +#if LV_USE_CALENDAR + if(lv_obj_check_type(parent, &lv_calendar_class)) { + /*No style*/ + return; + } +#endif + + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); } #if LV_USE_BUTTON else if(lv_obj_check_type(obj, &lv_button_class)) { - lv_obj_add_style(obj, &styles->btn, 0); - lv_obj_add_style(obj, &styles->bg_color_primary, 0); - lv_obj_add_style(obj, &styles->transition_delayed, 0); - lv_obj_add_style(obj, &styles->pressed, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->transition_normal, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); -#if LV_THEME_DEFAULT_GROW - lv_obj_add_style(obj, &styles->grow, LV_STATE_PRESSED); + +#if LV_USE_TABVIEW + lv_obj_t * tv = lv_obj_get_parent(parent); /*parent is the tabview header*/ + if(tv && lv_obj_get_child(tv, 0) == parent) { /*The button is on the tab view header*/ + if(lv_obj_check_type(tv, &lv_tabview_class)) { + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.tab_btn, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.tab_bg_focus, LV_STATE_FOCUS_KEY); + return; + } + } + +#endif + lv_obj_add_style(obj, &theme->styles.btn, 0); + lv_obj_add_style(obj, &theme->styles.btn_border, 0); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, 0); + lv_obj_add_style(obj, &theme->styles.transition_delayed, 0); + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); +#if LV_THEME_DEFAULT_GROW + lv_obj_add_style(obj, &theme->styles.grow, LV_STATE_PRESSED); +#endif + lv_obj_add_style(obj, &theme->styles.bg_color_secondary, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); + +#if LV_USE_MENU + if(lv_obj_check_type(parent, &lv_menu_sidebar_header_cont_class) || + lv_obj_check_type(parent, &lv_menu_main_header_cont_class)) { + lv_obj_add_style(obj, &theme->styles.menu_header_btn, 0); + lv_obj_add_style(obj, &theme->styles.menu_pressed, LV_STATE_PRESSED); + } #endif - lv_obj_add_style(obj, &styles->bg_color_secondary, LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->disabled, LV_STATE_DISABLED); } #endif #if LV_USE_LINE else if(lv_obj_check_type(obj, &lv_line_class)) { - lv_obj_add_style(obj, &styles->line, 0); + lv_obj_add_style(obj, &theme->styles.line, 0); } #endif #if LV_USE_BUTTONMATRIX else if(lv_obj_check_type(obj, &lv_buttonmatrix_class)) { -#if LV_USE_TABVIEW - if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_tabview_class)) { - lv_obj_add_style(obj, &styles->bg_color_white, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->tab_bg_focus, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->bg_color_primary_muted, LV_PART_ITEMS | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->tab_btn, LV_PART_ITEMS | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->outline_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_PART_ITEMS | LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->tab_bg_focus, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + +#if LV_USE_CALENDAR + if(lv_obj_check_type(parent, &lv_calendar_class)) { + lv_obj_add_style(obj, &theme->styles.calendar_btnm_bg, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.calendar_btnm_day, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_PART_ITEMS | LV_STATE_EDITED); return; } #endif - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->btn, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_ITEMS | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->outline_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_PART_ITEMS | LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.btn, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.btn_border, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_ITEMS | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_PART_ITEMS | LV_STATE_EDITED); } #endif #if LV_USE_BAR else if(lv_obj_check_type(obj, &lv_bar_class)) { - lv_obj_add_style(obj, &styles->bg_color_primary_muted, 0); - lv_obj_add_style(obj, &styles->circle, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->circle, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, 0); + lv_obj_add_style(obj, &theme->styles.circle, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.circle, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.btn_border_color, LV_PART_INDICATOR); } #endif #if LV_USE_SLIDER else if(lv_obj_check_type(obj, &lv_slider_class)) { - lv_obj_add_style(obj, &styles->bg_color_primary_muted, 0); - lv_obj_add_style(obj, &styles->circle, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->circle, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->knob, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, 0); + lv_obj_add_style(obj, &theme->styles.circle, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.circle, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.btn_border_color, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.knob, LV_PART_KNOB); #if LV_THEME_DEFAULT_GROW - lv_obj_add_style(obj, &styles->grow, LV_PART_KNOB | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.grow, LV_PART_KNOB | LV_STATE_PRESSED); #endif - lv_obj_add_style(obj, &styles->transition_delayed, LV_PART_KNOB); - lv_obj_add_style(obj, &styles->transition_normal, LV_PART_KNOB | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.transition_delayed, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_PART_KNOB | LV_STATE_PRESSED); } #endif #if LV_USE_TABLE else if(lv_obj_check_type(obj, &lv_table_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_zero, 0); - lv_obj_add_style(obj, &styles->no_radius, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); - lv_obj_add_style(obj, &styles->bg_color_white, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->table_cell, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->pad_normal, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->bg_color_secondary, LV_PART_ITEMS | LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_zero, 0); + lv_obj_add_style(obj, &theme->styles.no_radius, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.bg_color_white, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.table_cell, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.pad_normal, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.bg_color_secondary, LV_PART_ITEMS | LV_STATE_EDITED); } #endif #if LV_USE_CHECKBOX else if(lv_obj_check_type(obj, &lv_checkbox_class)) { - lv_obj_add_style(obj, &styles->pad_gap, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->cb_marker, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->cb_marker_checked, LV_PART_INDICATOR | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->pressed, LV_PART_INDICATOR | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.pad_gap, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.cb_marker, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.cb_marker_checked, LV_PART_INDICATOR | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_INDICATOR | LV_STATE_PRESSED); #if LV_THEME_DEFAULT_GROW - lv_obj_add_style(obj, &styles->grow, LV_PART_INDICATOR | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.grow, LV_PART_INDICATOR | LV_STATE_PRESSED); #endif - lv_obj_add_style(obj, &styles->transition_normal, LV_PART_INDICATOR | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->transition_delayed, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_PART_INDICATOR | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.transition_delayed, LV_PART_INDICATOR); } #endif #if LV_USE_SWITCH else if(lv_obj_check_type(obj, &lv_switch_class)) { - lv_obj_add_style(obj, &styles->bg_color_grey, 0); - lv_obj_add_style(obj, &styles->circle, 0); - lv_obj_add_style(obj, &styles->disabled, LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->circle, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->knob, LV_PART_KNOB); - lv_obj_add_style(obj, &styles->bg_color_white, LV_PART_KNOB); - lv_obj_add_style(obj, &styles->switch_knob, LV_PART_KNOB); - lv_obj_add_style(obj, &styles->disabled, LV_PART_KNOB | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.bg_color_grey, 0); + lv_obj_add_style(obj, &theme->styles.circle, 0); + lv_obj_add_style(obj, &theme->styles.anim_fast, 0); + lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.circle, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.btn_border_color, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.knob, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.bg_color_white, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.switch_knob, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_KNOB | LV_STATE_DISABLED); + + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_PART_INDICATOR | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_PART_INDICATOR); } #endif #if LV_USE_CHART else if(lv_obj_check_type(obj, &lv_chart_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_small, 0); - lv_obj_add_style(obj, &styles->chart_bg, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); - lv_obj_add_style(obj, &styles->chart_series, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->chart_indic, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->chart_ticks, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->chart_series, LV_PART_CURSOR); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_small, 0); + lv_obj_add_style(obj, &theme->styles.chart_bg, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.chart_series, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.chart_indic, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.chart_series, LV_PART_CURSOR); } #endif #if LV_USE_ROLLER else if(lv_obj_check_type(obj, &lv_roller_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->anim, 0); - lv_obj_add_style(obj, &styles->line_space_large, 0); - lv_obj_add_style(obj, &styles->text_align_center, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_SELECTED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.anim, 0); + lv_obj_add_style(obj, &theme->styles.line_space_large, 0); + lv_obj_add_style(obj, &theme->styles.text_align_center, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_SELECTED); } #endif #if LV_USE_DROPDOWN else if(lv_obj_check_type(obj, &lv_dropdown_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_small, 0); - lv_obj_add_style(obj, &styles->transition_delayed, 0); - lv_obj_add_style(obj, &styles->transition_normal, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->pressed, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->transition_normal, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_small, 0); + lv_obj_add_style(obj, &theme->styles.transition_delayed, 0); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); } else if(lv_obj_check_type(obj, &lv_dropdownlist_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->clip_corner, 0); - lv_obj_add_style(obj, &styles->line_space_large, 0); - lv_obj_add_style(obj, &styles->dropdown_list, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); - lv_obj_add_style(obj, &styles->bg_color_white, LV_PART_SELECTED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_SELECTED | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->pressed, LV_PART_SELECTED | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.clip_corner, 0); + lv_obj_add_style(obj, &theme->styles.line_space_large, 0); + lv_obj_add_style(obj, &theme->styles.dropdown_list, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.bg_color_white, LV_PART_SELECTED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_SELECTED | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_SELECTED | LV_STATE_PRESSED); } #endif #if LV_USE_ARC else if(lv_obj_check_type(obj, &lv_arc_class)) { - lv_obj_add_style(obj, &styles->arc_indic, 0); - lv_obj_add_style(obj, &styles->arc_indic, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->arc_indic_primary, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->arc_knob, LV_PART_KNOB); // OpenHASP + lv_obj_add_style(obj, &theme->styles.arc_indic, 0); + lv_obj_add_style(obj, &theme->styles.arc_indic, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.arc_indic_primary, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.knob, LV_PART_KNOB); + lv_obj_add_style(obj, &theme->styles.btn_border_color, LV_PART_KNOB); } #endif - #if LV_USE_SPINNER else if(lv_obj_check_type(obj, &lv_spinner_class)) { - lv_obj_add_style(obj, &styles->arc_indic, 0); - lv_obj_add_style(obj, &styles->arc_indic, LV_PART_INDICATOR); - lv_obj_add_style(obj, &styles->arc_indic_primary, LV_PART_INDICATOR); - } -#endif - -#if LV_USE_METER - else if(lv_obj_check_type(obj, &lv_meter_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->circle, 0); - lv_obj_add_style(obj, &styles->meter_indic, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.arc_indic, 0); + lv_obj_add_style(obj, &theme->styles.arc_indic, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.arc_indic_primary, LV_PART_INDICATOR); } #endif #if LV_USE_TEXTAREA else if(lv_obj_check_type(obj, &lv_textarea_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_small, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); - lv_obj_add_style(obj, &styles->ta_cursor, LV_PART_CURSOR | LV_STATE_FOCUSED); - lv_obj_add_style(obj, &styles->ta_placeholder, LV_PART_TEXTAREA_PLACEHOLDER); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_small, 0); + lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.ta_cursor, LV_PART_CURSOR | LV_STATE_FOCUSED); + lv_obj_add_style(obj, &theme->styles.ta_placeholder, LV_PART_TEXTAREA_PLACEHOLDER); } #endif #if LV_USE_CALENDAR else if(lv_obj_check_type(obj, &lv_calendar_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->calendar_bg, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->calendar_day, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->outline_primary, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_PART_ITEMS | LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_zero, 0); } -#endif #if LV_USE_CALENDAR_HEADER_ARROW else if(lv_obj_check_type(obj, &lv_calendar_header_arrow_class)) { - lv_obj_add_style(obj, &styles->card, 0); + lv_obj_add_style(obj, &theme->styles.calendar_header, 0); } #endif #if LV_USE_CALENDAR_HEADER_DROPDOWN else if(lv_obj_check_type(obj, &lv_calendar_header_dropdown_class)) { - lv_obj_add_style(obj, &styles->card, 0); + lv_obj_add_style(obj, &theme->styles.calendar_header, 0); } #endif +#endif #if LV_USE_KEYBOARD else if(lv_obj_check_type(obj, &lv_keyboard_class)) { - lv_obj_add_style(obj, &styles->scr, 0); - lv_obj_add_style(obj, disp_size == DISP_LARGE ? &styles->pad_small : &styles->pad_tiny, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->btn, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); - lv_obj_add_style(obj, &styles->bg_color_white, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->keyboard_btn_bg, LV_PART_ITEMS); - lv_obj_add_style(obj, &styles->pressed, LV_PART_ITEMS | LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->bg_color_grey, LV_PART_ITEMS | LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->bg_color_primary_muted, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->bg_color_secondary_muted, LV_PART_ITEMS | LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.scr, 0); + lv_obj_add_style(obj, theme->disp_size == DISP_LARGE ? &theme->styles.pad_small : &theme->styles.pad_tiny, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.btn, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.btn_border, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.btn_border_color, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.bg_color_white, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.keyboard_button_bg, LV_PART_ITEMS); + lv_obj_add_style(obj, &theme->styles.pressed, LV_PART_ITEMS | LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_grey, LV_PART_ITEMS | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.bg_color_secondary_muted, LV_PART_ITEMS | LV_STATE_EDITED); } #endif #if LV_USE_LIST else if(lv_obj_check_type(obj, &lv_list_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->list_bg, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.list_bg, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); return; } else if(lv_obj_check_type(obj, &lv_list_text_class)) { - lv_obj_add_style(obj, &styles->bg_color_grey, 0); - lv_obj_add_style(obj, &styles->list_item_grow, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_grey, 0); + lv_obj_add_style(obj, &theme->styles.list_item_grow, 0); } else if(lv_obj_check_type(obj, &lv_list_button_class)) { - lv_obj_add_style(obj, &styles->bg_color_white, 0); - lv_obj_add_style(obj, &styles->list_btn, 0); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->list_item_grow, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->list_item_grow, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_white, 0); + lv_obj_add_style(obj, &theme->styles.list_btn, 0); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.list_item_grow, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.list_item_grow, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); } #endif +#if LV_USE_MENU + else if(lv_obj_check_type(obj, &lv_menu_class)) { + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.menu_bg, 0); + } + else if(lv_obj_check_type(obj, &lv_menu_sidebar_cont_class)) { + lv_obj_add_style(obj, &theme->styles.menu_sidebar_cont, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + } + else if(lv_obj_check_type(obj, &lv_menu_main_cont_class)) { + lv_obj_add_style(obj, &theme->styles.menu_main_cont, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + } + else if(lv_obj_check_type(obj, &lv_menu_cont_class)) { + lv_obj_add_style(obj, &theme->styles.menu_cont, 0); + lv_obj_add_style(obj, &theme->styles.menu_pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_STATE_PRESSED | LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary_muted, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_STATE_FOCUS_KEY); + } + else if(lv_obj_check_type(obj, &lv_menu_sidebar_header_cont_class) || + lv_obj_check_type(obj, &lv_menu_main_header_cont_class)) { + lv_obj_add_style(obj, &theme->styles.menu_header_cont, 0); + } + else if(lv_obj_check_type(obj, &lv_menu_page_class)) { + lv_obj_add_style(obj, &theme->styles.menu_page, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + } + else if(lv_obj_check_type(obj, &lv_menu_section_class)) { + lv_obj_add_style(obj, &theme->styles.menu_section, 0); + } + else if(lv_obj_check_type(obj, &lv_menu_separator_class)) { + lv_obj_add_style(obj, &theme->styles.menu_separator, 0); + } +#endif #if LV_USE_MSGBOX else if(lv_obj_check_type(obj, &lv_msgbox_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_zero, 0); - lv_obj_add_style(obj, &styles->clip_corner, 0); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_zero, 0); + lv_obj_add_style(obj, &theme->styles.clip_corner, 0); return; } else if(lv_obj_check_type(obj, &lv_msgbox_backdrop_class)) { - lv_obj_add_style(obj, &styles->msgbox_backdrop_bg, 0); + lv_obj_add_style(obj, &theme->styles.msgbox_backdrop_bg, 0); return; } else if(lv_obj_check_type(obj, &lv_msgbox_header_class)) { - lv_obj_add_style(obj, &styles->pad_tiny, 0); - lv_obj_add_style(obj, &styles->bg_color_grey, 0); + lv_obj_add_style(obj, &theme->styles.pad_tiny, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_grey, 0); return; } else if(lv_obj_check_type(obj, &lv_msgbox_footer_class)) { - lv_obj_add_style(obj, &styles->pad_tiny, 0); + lv_obj_add_style(obj, &theme->styles.pad_tiny, 0); return; } else if(lv_obj_check_type(obj, &lv_msgbox_content_class)) { - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); - lv_obj_add_style(obj, &styles->pad_tiny, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.pad_tiny, 0); return; } else if(lv_obj_check_type(obj, &lv_msgbox_header_button_class) || lv_obj_check_type(obj, &lv_msgbox_footer_button_class)) { - lv_obj_add_style(obj, &styles->btn, 0); - lv_obj_add_style(obj, &styles->bg_color_primary, 0); - lv_obj_add_style(obj, &styles->transition_delayed, 0); - lv_obj_add_style(obj, &styles->pressed, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->transition_normal, LV_STATE_PRESSED); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->bg_color_secondary, LV_STATE_CHECKED); - lv_obj_add_style(obj, &styles->disabled, LV_STATE_DISABLED); + lv_obj_add_style(obj, &theme->styles.btn, 0); + lv_obj_add_style(obj, &theme->styles.btn_border, 0); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, 0); + lv_obj_add_style(obj, &theme->styles.transition_delayed, 0); + lv_obj_add_style(obj, &theme->styles.pressed, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.transition_normal, LV_STATE_PRESSED); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.bg_color_secondary, LV_STATE_CHECKED); + lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); return; } + #endif + #if LV_USE_SPINBOX else if(lv_obj_check_type(obj, &lv_spinbox_class)) { - lv_obj_add_style(obj, &styles->card, 0); - lv_obj_add_style(obj, &styles->pad_small, 0); - lv_obj_add_style(obj, &styles->outline_primary, LV_STATE_FOCUS_KEY); - lv_obj_add_style(obj, &styles->outline_secondary, LV_STATE_EDITED); - lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_CURSOR); + lv_obj_add_style(obj, &theme->styles.card, 0); + lv_obj_add_style(obj, &theme->styles.pad_small, 0); + lv_obj_add_style(obj, &theme->styles.outline_primary, LV_STATE_FOCUS_KEY); + lv_obj_add_style(obj, &theme->styles.outline_secondary, LV_STATE_EDITED); + lv_obj_add_style(obj, &theme->styles.bg_color_primary, LV_PART_CURSOR); } #endif #if LV_USE_TILEVIEW else if(lv_obj_check_type(obj, &lv_tileview_class)) { - lv_obj_add_style(obj, &styles->scr, 0); - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.scr, 0); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); } else if(lv_obj_check_type(obj, &lv_tileview_tile_class)) { - lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); - lv_obj_add_style(obj, &styles->scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); + lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); + lv_obj_add_style(obj, &theme->styles.scrollbar_scrolled, LV_PART_SCROLLBAR | LV_STATE_SCROLLED); } #endif #if LV_USE_TABVIEW - if(lv_obj_check_type(obj, &lv_tabview_class)) { - lv_obj_add_style(obj, &styles->scr, 0); - lv_obj_add_style(obj, &styles->pad_zero, 0); - return; + else if(lv_obj_check_type(obj, &lv_tabview_class)) { + lv_obj_add_style(obj, &theme->styles.scr, 0); + lv_obj_add_style(obj, &theme->styles.pad_zero, 0); + lv_obj_add_style(obj, &theme->styles.btn_border, 0); + lv_obj_add_style(obj, &theme->styles.btn_border_color, 0); // add grey border } #endif -#if LV_USE_COLORWHEEL - else if(lv_obj_check_type(obj, &lv_colorwheel_class)) { - lv_obj_add_style(obj, &styles->colorwheel_main, 0); - lv_obj_add_style(obj, &styles->pad_normal, 0); - lv_obj_add_style(obj, &styles->bg_color_white, LV_PART_KNOB); - lv_obj_add_style(obj, &styles->pad_normal, LV_PART_KNOB); +#if LV_USE_WIN + else if(lv_obj_check_type(obj, &lv_win_class)) { + lv_obj_add_style(obj, &theme->styles.clip_corner, 0); } #endif #if LV_USE_LED else if(lv_obj_check_type(obj, &lv_led_class)) { - lv_obj_add_style(obj, &styles->led, 0); - } + lv_obj_add_style(obj, &theme->styles.led, 0); + } +#endif + +#if LV_USE_SCALE + else if(lv_obj_check_type(obj, &lv_scale_class)) { + lv_obj_add_style(obj, &theme->styles.scale, LV_PART_MAIN); + lv_obj_add_style(obj, &theme->styles.scale, LV_PART_INDICATOR); + lv_obj_add_style(obj, &theme->styles.scale, LV_PART_ITEMS); + } #endif } @@ -1090,6 +1244,10 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj) static void style_init_reset(lv_style_t * style) { - if(inited) lv_style_reset(style); - else lv_style_init(style); + if(haspmota_theme) { + lv_style_reset(style); + } + else { + lv_style_init(style); + } } diff --git a/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.h b/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.h index ef40ba742..b161cc5f5 100644 --- a/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.h +++ b/lib/libesp32_lvgl/LVGL_assets/src/lv_theme_haspmota.h @@ -40,8 +40,7 @@ typedef enum { * @param font pointer to a font to use. * @return a pointer to reference this theme later */ -lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t * font); - +lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t * colors, const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_large); bool lv_theme_haspmota_is_inited(void); /********************** diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md b/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md index e89139c74..1a274905c 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md +++ b/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md @@ -152,7 +152,7 @@ theme_get_font_large|lv.obj|lv.font|[lv_theme_get_font_large](https://docs.lvgl. theme_get_font_normal|lv.obj|lv.font|[lv_theme_get_font_normal](https://docs.lvgl.io/9.0/search.html?q=lv_theme_get_font_normal) theme_get_font_small|lv.obj|lv.font|[lv_theme_get_font_small](https://docs.lvgl.io/9.0/search.html?q=lv_theme_get_font_small) theme_get_from_obj|lv.obj|lv.theme|[lv_theme_get_from_obj](https://docs.lvgl.io/9.0/search.html?q=lv_theme_get_from_obj) -theme_haspmota_init|lv.display, lv.color, lv.color, bool, lv.font|lv.theme|[lv_theme_haspmota_init](https://docs.lvgl.io/9.0/search.html?q=lv_theme_haspmota_init) +theme_haspmota_init|lv.display, lv.color_arr, lv.font, lv.font, lv.font|lv.theme|[lv_theme_haspmota_init](https://docs.lvgl.io/9.0/search.html?q=lv_theme_haspmota_init) theme_haspmota_is_inited||bool|[lv_theme_haspmota_is_inited](https://docs.lvgl.io/9.0/search.html?q=lv_theme_haspmota_is_inited) theme_set_parent|lv.theme, lv.theme||[lv_theme_set_parent](https://docs.lvgl.io/9.0/search.html?q=lv_theme_set_parent) timer_create|\, int, \|lv.timer|[lv_timer_create](https://docs.lvgl.io/9.0/search.html?q=lv_timer_create) diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lvgl_module.c b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lvgl_module.c index 21e572462..de171d45e 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lvgl_module.c +++ b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lvgl_module.c @@ -174,7 +174,7 @@ const be_ntv_func_def_t lv_func[] = { { "theme_get_font_normal", { (const void*) &lv_theme_get_font_normal, "lv.font", "(lv.obj)" } }, { "theme_get_font_small", { (const void*) &lv_theme_get_font_small, "lv.font", "(lv.obj)" } }, { "theme_get_from_obj", { (const void*) &lv_theme_get_from_obj, "lv.theme", "(lv.obj)" } }, - { "theme_haspmota_init", { (const void*) &lv_theme_haspmota_init, "lv.theme", "(lv.display)(lv.color)(lv.color)b(lv.font)" } }, + { "theme_haspmota_init", { (const void*) &lv_theme_haspmota_init, "lv.theme", "(lv.display)(lv.color_arr)(lv.font)(lv.font)(lv.font)" } }, { "theme_haspmota_is_inited", { (const void*) &lv_theme_haspmota_is_inited, "b", "" } }, { "theme_set_parent", { (const void*) &lv_theme_set_parent, "", "(lv.theme)(lv.theme)" } }, { "timer_create", { (const void*) &lv_timer_create, "lv.timer", "^lv_timer_cb^i." } }, diff --git a/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h b/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h index 41c6cb08f..425c50633 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h +++ b/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h @@ -1491,7 +1491,7 @@ lv_obj_t * lv_tileview_get_tile_active(lv_obj_t * obj) // ../../lvgl/src/widgets/win/lv_win.h // ../../LVGL_assets/src/lv_theme_haspmota.h -lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t * font) +lv_theme_t * lv_theme_haspmota_init(lv_display_t * disp, lv_color_t * colors, const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_large) bool lv_theme_haspmota_is_inited(void) // ../src/lv_berry.h diff --git a/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be b/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be index a93170c02..6f8215d5e 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be +++ b/lib/libesp32_lvgl/lv_binding_berry/src/embedded/lvgl_extra.be @@ -120,6 +120,24 @@ class lv_style_prop_arr : bytes end end +class lv_color_arr : bytes + def init(l) + if type(l) != 'instance' || !isinstance(l, list) raise "value_error", "argument must be a list" end + super(self).init(size(l) * 3) + for e: l + self.add(int(e), 3) + end + end + + def item(n) + return lv.color(self.get(n * 3, 3)) + end + + def setitem(n, v) + self.set(n * 3, int(v), 3) + end +end + class lv_str_arr : bytes var l # keep a copy of the list because we want the pointer to strings to remain valid def init(l) @@ -138,6 +156,7 @@ lv_extra.lv_int_arr = lv_int_arr lv_extra.lv_point_arr = lv_point_arr lv_extra.lv_style_prop_arr = lv_style_prop_arr lv_extra.lv_str_arr = lv_str_arr +lv_extra.lv_color_arr = lv_color_arr lv_extra.init = def (m) import global @@ -151,6 +170,7 @@ lv_extra.init = def (m) lv.point_arr = m.lv_point_arr lv.style_prop_arr = m.lv_style_prop_arr lv.str_arr = m.lv_str_arr + lv.color_arr = m.lv_color_arr return m end diff --git a/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h b/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h index ce9f19075..6727efec6 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h +++ b/lib/libesp32_lvgl/lv_binding_berry/src/solidify/solidified_lvgl_extra.h @@ -4,84 +4,6 @@ \********************************************************************/ #include "be_constobj.h" -extern const bclass be_class_lv_str_arr; - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_lv_str_arr_init, /* name */ - be_nested_proto( - 11, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(l), - /* K1 */ be_nested_str_weak(init), - /* K2 */ be_nested_str_weak(introspect), - /* K3 */ be_nested_str_weak(add), - /* K4 */ be_nested_str_weak(toptr), - /* K5 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[31]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x60080003, // 0001 GETGBL R2 G3 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C080200, // 0003 CALL R2 1 - 0x8C080501, // 0004 GETMET R2 R2 K1 - 0x6010000C, // 0005 GETGBL R4 G12 - 0x5C140200, // 0006 MOVE R5 R1 - 0x7C100200, // 0007 CALL R4 1 - 0x54160003, // 0008 LDINT R5 4 - 0x08100805, // 0009 MUL R4 R4 R5 - 0x7C080400, // 000A CALL R2 2 - 0xA40A0400, // 000B IMPORT R2 K2 - 0x600C0010, // 000C GETGBL R3 G16 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C0C0200, // 000E CALL R3 1 - 0xA802000A, // 000F EXBLK 0 #001B - 0x5C100600, // 0010 MOVE R4 R3 - 0x7C100000, // 0011 CALL R4 0 - 0x8C140103, // 0012 GETMET R5 R0 K3 - 0x601C0009, // 0013 GETGBL R7 G9 - 0x8C200504, // 0014 GETMET R8 R2 K4 - 0x5C280800, // 0015 MOVE R10 R4 - 0x7C200400, // 0016 CALL R8 2 - 0x7C1C0200, // 0017 CALL R7 1 - 0x54220003, // 0018 LDINT R8 4 - 0x7C140600, // 0019 CALL R5 3 - 0x7001FFF4, // 001A JMP #0010 - 0x580C0005, // 001B LDCONST R3 K5 - 0xAC0C0200, // 001C CATCH R3 1 0 - 0xB0080000, // 001D RAISE 2 R0 R0 - 0x80000000, // 001E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: lv_str_arr -********************************************************************/ -extern const bclass be_class_bytes; -be_local_class(lv_str_arr, - 1, - &be_class_bytes, - be_nested_map(2, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(class_lv_str_arr_init_closure) }, - { be_const_key_weak(l, 0), be_const_var(0) }, - })), - be_str_weak(lv_str_arr) -); - extern const bclass be_class_lv_int_arr; /******************************************************************** @@ -355,88 +277,41 @@ be_local_class(lv_point_arr, })), be_str_weak(lv_point_arr) ); - -/******************************************************************** -** Solidified function: _anonymous_ -********************************************************************/ -be_local_closure(_anonymous_, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(global), - /* K1 */ be_nested_str_weak(lv), - /* K2 */ be_nested_str_weak(lv_coord_arr), - /* K3 */ be_nested_str_weak(lv_int_arr), - /* K4 */ be_nested_str_weak(lv_point_arr), - /* K5 */ be_nested_str_weak(coord_arr), - /* K6 */ be_nested_str_weak(int_arr), - /* K7 */ be_nested_str_weak(point_arr), - /* K8 */ be_nested_str_weak(style_prop_arr), - /* K9 */ be_nested_str_weak(lv_style_prop_arr), - /* K10 */ be_nested_str_weak(str_arr), - /* K11 */ be_nested_str_weak(lv_str_arr), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[19]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x88080301, // 0001 GETMBR R2 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x900A0403, // 0003 SETMBR R2 K2 R3 - 0x880C0103, // 0004 GETMBR R3 R0 K3 - 0x900A0603, // 0005 SETMBR R2 K3 R3 - 0x880C0104, // 0006 GETMBR R3 R0 K4 - 0x900A0803, // 0007 SETMBR R2 K4 R3 - 0x880C0102, // 0008 GETMBR R3 R0 K2 - 0x900A0A03, // 0009 SETMBR R2 K5 R3 - 0x880C0103, // 000A GETMBR R3 R0 K3 - 0x900A0C03, // 000B SETMBR R2 K6 R3 - 0x880C0104, // 000C GETMBR R3 R0 K4 - 0x900A0E03, // 000D SETMBR R2 K7 R3 - 0x880C0109, // 000E GETMBR R3 R0 K9 - 0x900A1003, // 000F SETMBR R2 K8 R3 - 0x880C010B, // 0010 GETMBR R3 R0 K11 - 0x900A1403, // 0011 SETMBR R2 K10 R3 - 0x80040000, // 0012 RET 1 R0 - }) - ) -); -/*******************************************************************/ +// compact class 'lv_color_arr' ktab size: 11, total: 13 (saved 16 bytes) +static const bvalue be_ktab_class_lv_color_arr[11] = { + /* K0 */ be_nested_str_weak(instance), + /* K1 */ be_nested_str_weak(value_error), + /* K2 */ be_nested_str_weak(argument_X20must_X20be_X20a_X20list), + /* K3 */ be_nested_str_weak(init), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(add), + /* K6 */ be_nested_str_weak(stop_iteration), + /* K7 */ be_nested_str_weak(lv), + /* K8 */ be_nested_str_weak(color), + /* K9 */ be_nested_str_weak(get), + /* K10 */ be_nested_str_weak(set), +}; -extern const bclass be_class_lv_style_prop_arr; +extern const bclass be_class_lv_color_arr; /******************************************************************** ** Solidified function: init ********************************************************************/ -be_local_closure(class_lv_style_prop_arr_init, /* name */ +be_local_closure(class_lv_color_arr_init, /* name */ be_nested_proto( 8, /* nstack */ 2, /* argc */ - 2, /* varg */ + 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(instance), - /* K1 */ be_nested_str_weak(value_error), - /* K2 */ be_nested_str_weak(argument_X20must_X20be_X20a_X20list), - /* K3 */ be_nested_str_weak(init), - /* K4 */ be_nested_str_weak(add), - /* K5 */ be_nested_str_weak(stop_iteration), - }), + &be_ktab_class_lv_color_arr, /* shared constants */ be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ + ( &(const binstruction[37]) { /* code */ 0x60080004, // 0000 GETGBL R2 G4 0x5C0C0200, // 0001 MOVE R3 R1 0x7C080200, // 0002 CALL R2 1 @@ -455,23 +330,25 @@ be_local_closure(class_lv_style_prop_arr_init, /* name */ 0x6010000C, // 000F GETGBL R4 G12 0x5C140200, // 0010 MOVE R5 R1 0x7C100200, // 0011 CALL R4 1 - 0x7C080400, // 0012 CALL R2 2 - 0x60080010, // 0013 GETGBL R2 G16 - 0x5C0C0200, // 0014 MOVE R3 R1 - 0x7C080200, // 0015 CALL R2 1 - 0xA8020007, // 0016 EXBLK 0 #001F - 0x5C0C0400, // 0017 MOVE R3 R2 - 0x7C0C0000, // 0018 CALL R3 0 - 0x8C100104, // 0019 GETMET R4 R0 K4 - 0x60180009, // 001A GETGBL R6 G9 - 0x5C1C0600, // 001B MOVE R7 R3 - 0x7C180200, // 001C CALL R6 1 - 0x7C100400, // 001D CALL R4 2 - 0x7001FFF7, // 001E JMP #0017 - 0x58080005, // 001F LDCONST R2 K5 - 0xAC080200, // 0020 CATCH R2 1 0 - 0xB0080000, // 0021 RAISE 2 R0 R0 - 0x80000000, // 0022 RET 0 + 0x08100904, // 0012 MUL R4 R4 K4 + 0x7C080400, // 0013 CALL R2 2 + 0x60080010, // 0014 GETGBL R2 G16 + 0x5C0C0200, // 0015 MOVE R3 R1 + 0x7C080200, // 0016 CALL R2 1 + 0xA8020008, // 0017 EXBLK 0 #0021 + 0x5C0C0400, // 0018 MOVE R3 R2 + 0x7C0C0000, // 0019 CALL R3 0 + 0x8C100105, // 001A GETMET R4 R0 K5 + 0x60180009, // 001B GETGBL R6 G9 + 0x5C1C0600, // 001C MOVE R7 R3 + 0x7C180200, // 001D CALL R6 1 + 0x581C0004, // 001E LDCONST R7 K4 + 0x7C100600, // 001F CALL R4 3 + 0x7001FFF6, // 0020 JMP #0018 + 0x58080006, // 0021 LDCONST R2 K6 + 0xAC080200, // 0022 CATCH R2 1 0 + 0xB0080000, // 0023 RAISE 2 R0 R0 + 0x80000000, // 0024 RET 0 }) ) ); @@ -479,19 +356,142 @@ be_local_closure(class_lv_style_prop_arr_init, /* name */ /******************************************************************** -** Solidified class: lv_style_prop_arr +** Solidified function: item +********************************************************************/ +be_local_closure(class_lv_color_arr_item, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_lv_color_arr, /* shared constants */ + be_str_weak(item), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0xB80A0E00, // 0000 GETNGBL R2 K7 + 0x8C080508, // 0001 GETMET R2 R2 K8 + 0x8C100109, // 0002 GETMET R4 R0 K9 + 0x08180304, // 0003 MUL R6 R1 K4 + 0x581C0004, // 0004 LDCONST R7 K4 + 0x7C100600, // 0005 CALL R4 3 + 0x7C080400, // 0006 CALL R2 2 + 0x80040400, // 0007 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: setitem +********************************************************************/ +be_local_closure(class_lv_color_arr_setitem, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_lv_color_arr, /* shared constants */ + be_str_weak(setitem), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x8C0C010A, // 0000 GETMET R3 R0 K10 + 0x08140304, // 0001 MUL R5 R1 K4 + 0x60180009, // 0002 GETGBL R6 G9 + 0x5C1C0400, // 0003 MOVE R7 R2 + 0x7C180200, // 0004 CALL R6 1 + 0x581C0004, // 0005 LDCONST R7 K4 + 0x7C0C0800, // 0006 CALL R3 4 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lv_color_arr ********************************************************************/ extern const bclass be_class_bytes; -be_local_class(lv_style_prop_arr, +be_local_class(lv_color_arr, 0, &be_class_bytes, - be_nested_map(1, + be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(class_lv_style_prop_arr_init_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_lv_color_arr_init_closure) }, + { be_const_key_weak(item, -1), be_const_closure(class_lv_color_arr_item_closure) }, + { be_const_key_weak(setitem, -1), be_const_closure(class_lv_color_arr_setitem_closure) }, })), - be_str_weak(lv_style_prop_arr) + be_str_weak(lv_color_arr) ); +/******************************************************************** +** Solidified function: _anonymous_ +********************************************************************/ +be_local_closure(_anonymous_, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(global), + /* K1 */ be_nested_str_weak(lv), + /* K2 */ be_nested_str_weak(lv_coord_arr), + /* K3 */ be_nested_str_weak(lv_int_arr), + /* K4 */ be_nested_str_weak(lv_point_arr), + /* K5 */ be_nested_str_weak(coord_arr), + /* K6 */ be_nested_str_weak(int_arr), + /* K7 */ be_nested_str_weak(point_arr), + /* K8 */ be_nested_str_weak(style_prop_arr), + /* K9 */ be_nested_str_weak(lv_style_prop_arr), + /* K10 */ be_nested_str_weak(str_arr), + /* K11 */ be_nested_str_weak(lv_str_arr), + /* K12 */ be_nested_str_weak(color_arr), + /* K13 */ be_nested_str_weak(lv_color_arr), + }), + be_str_weak(_anonymous_), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x88080301, // 0001 GETMBR R2 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x900A0403, // 0003 SETMBR R2 K2 R3 + 0x880C0103, // 0004 GETMBR R3 R0 K3 + 0x900A0603, // 0005 SETMBR R2 K3 R3 + 0x880C0104, // 0006 GETMBR R3 R0 K4 + 0x900A0803, // 0007 SETMBR R2 K4 R3 + 0x880C0102, // 0008 GETMBR R3 R0 K2 + 0x900A0A03, // 0009 SETMBR R2 K5 R3 + 0x880C0103, // 000A GETMBR R3 R0 K3 + 0x900A0C03, // 000B SETMBR R2 K6 R3 + 0x880C0104, // 000C GETMBR R3 R0 K4 + 0x900A0E03, // 000D SETMBR R2 K7 R3 + 0x880C0109, // 000E GETMBR R3 R0 K9 + 0x900A1003, // 000F SETMBR R2 K8 R3 + 0x880C010B, // 0010 GETMBR R3 R0 K11 + 0x900A1403, // 0011 SETMBR R2 K10 R3 + 0x880C010D, // 0012 GETMBR R3 R0 K13 + 0x900A1803, // 0013 SETMBR R2 K12 R3 + 0x80040000, // 0014 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + extern const bclass be_class_lv_coord_arr; /******************************************************************** @@ -663,19 +663,179 @@ be_local_class(lv_coord_arr, be_str_weak(lv_coord_arr) ); +extern const bclass be_class_lv_style_prop_arr; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_lv_style_prop_arr_init, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(instance), + /* K1 */ be_nested_str_weak(value_error), + /* K2 */ be_nested_str_weak(argument_X20must_X20be_X20a_X20list), + /* K3 */ be_nested_str_weak(init), + /* K4 */ be_nested_str_weak(add), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x60080004, // 0000 GETGBL R2 G4 + 0x5C0C0200, // 0001 MOVE R3 R1 + 0x7C080200, // 0002 CALL R2 1 + 0x20080500, // 0003 NE R2 R2 K0 + 0x740A0004, // 0004 JMPT R2 #000A + 0x6008000F, // 0005 GETGBL R2 G15 + 0x5C0C0200, // 0006 MOVE R3 R1 + 0x60100012, // 0007 GETGBL R4 G18 + 0x7C080400, // 0008 CALL R2 2 + 0x740A0000, // 0009 JMPT R2 #000B + 0xB0060302, // 000A RAISE 1 K1 K2 + 0x60080003, // 000B GETGBL R2 G3 + 0x5C0C0000, // 000C MOVE R3 R0 + 0x7C080200, // 000D CALL R2 1 + 0x8C080503, // 000E GETMET R2 R2 K3 + 0x6010000C, // 000F GETGBL R4 G12 + 0x5C140200, // 0010 MOVE R5 R1 + 0x7C100200, // 0011 CALL R4 1 + 0x7C080400, // 0012 CALL R2 2 + 0x60080010, // 0013 GETGBL R2 G16 + 0x5C0C0200, // 0014 MOVE R3 R1 + 0x7C080200, // 0015 CALL R2 1 + 0xA8020007, // 0016 EXBLK 0 #001F + 0x5C0C0400, // 0017 MOVE R3 R2 + 0x7C0C0000, // 0018 CALL R3 0 + 0x8C100104, // 0019 GETMET R4 R0 K4 + 0x60180009, // 001A GETGBL R6 G9 + 0x5C1C0600, // 001B MOVE R7 R3 + 0x7C180200, // 001C CALL R6 1 + 0x7C100400, // 001D CALL R4 2 + 0x7001FFF7, // 001E JMP #0017 + 0x58080005, // 001F LDCONST R2 K5 + 0xAC080200, // 0020 CATCH R2 1 0 + 0xB0080000, // 0021 RAISE 2 R0 R0 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lv_style_prop_arr +********************************************************************/ +extern const bclass be_class_bytes; +be_local_class(lv_style_prop_arr, + 0, + &be_class_bytes, + be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(class_lv_style_prop_arr_init_closure) }, + })), + be_str_weak(lv_style_prop_arr) +); + +extern const bclass be_class_lv_str_arr; + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_lv_str_arr_init, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(l), + /* K1 */ be_nested_str_weak(init), + /* K2 */ be_nested_str_weak(introspect), + /* K3 */ be_nested_str_weak(add), + /* K4 */ be_nested_str_weak(toptr), + /* K5 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[31]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x60080003, // 0001 GETGBL R2 G3 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C080200, // 0003 CALL R2 1 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 0x6010000C, // 0005 GETGBL R4 G12 + 0x5C140200, // 0006 MOVE R5 R1 + 0x7C100200, // 0007 CALL R4 1 + 0x54160003, // 0008 LDINT R5 4 + 0x08100805, // 0009 MUL R4 R4 R5 + 0x7C080400, // 000A CALL R2 2 + 0xA40A0400, // 000B IMPORT R2 K2 + 0x600C0010, // 000C GETGBL R3 G16 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C0C0200, // 000E CALL R3 1 + 0xA802000A, // 000F EXBLK 0 #001B + 0x5C100600, // 0010 MOVE R4 R3 + 0x7C100000, // 0011 CALL R4 0 + 0x8C140103, // 0012 GETMET R5 R0 K3 + 0x601C0009, // 0013 GETGBL R7 G9 + 0x8C200504, // 0014 GETMET R8 R2 K4 + 0x5C280800, // 0015 MOVE R10 R4 + 0x7C200400, // 0016 CALL R8 2 + 0x7C1C0200, // 0017 CALL R7 1 + 0x54220003, // 0018 LDINT R8 4 + 0x7C140600, // 0019 CALL R5 3 + 0x7001FFF4, // 001A JMP #0010 + 0x580C0005, // 001B LDCONST R3 K5 + 0xAC0C0200, // 001C CATCH R3 1 0 + 0xB0080000, // 001D RAISE 2 R0 R0 + 0x80000000, // 001E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: lv_str_arr +********************************************************************/ +extern const bclass be_class_bytes; +be_local_class(lv_str_arr, + 1, + &be_class_bytes, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(init, -1), be_const_closure(class_lv_str_arr_init_closure) }, + { be_const_key_weak(l, 0), be_const_var(0) }, + })), + be_str_weak(lv_str_arr) +); + /******************************************************************** ** Solidified module: lv_extra ********************************************************************/ be_local_module(lv_extra, "lv_extra", - be_nested_map(6, + be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(lv_coord_arr, 4), be_const_class(be_class_lv_coord_arr) }, - { be_const_key_weak(lv_int_arr, -1), be_const_class(be_class_lv_int_arr) }, + { be_const_key_weak(lv_style_prop_arr, 4), be_const_class(be_class_lv_style_prop_arr) }, + { be_const_key_weak(lv_str_arr, -1), be_const_class(be_class_lv_str_arr) }, + { be_const_key_weak(lv_coord_arr, -1), be_const_class(be_class_lv_coord_arr) }, + { be_const_key_weak(lv_int_arr, 0), be_const_class(be_class_lv_int_arr) }, { be_const_key_weak(lv_point_arr, -1), be_const_class(be_class_lv_point_arr) }, { be_const_key_weak(init, -1), be_const_closure(_anonymous__closure) }, - { be_const_key_weak(lv_style_prop_arr, -1), be_const_class(be_class_lv_style_prop_arr) }, - { be_const_key_weak(lv_str_arr, 0), be_const_class(be_class_lv_str_arr) }, + { be_const_key_weak(lv_color_arr, 2), be_const_class(be_class_lv_color_arr) }, })) ); BE_EXPORT_VARIABLE be_define_const_native_module(lv_extra); diff --git a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py index 9558c1df0..9e89498d5 100644 --- a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py +++ b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py @@ -383,6 +383,7 @@ class type_mapper_class: "int32_t *": "lv_int_arr", "int32_t []": "lv_int_arr", "uint32_t *": "lv_int_arr", + "lv_color_t *": "lv_color_arr", # "float *": "lv_float_arr", # layouts "lv_flex_align_t": "i", diff --git a/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be index 46ca68665..b67e38824 100644 --- a/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be +++ b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be @@ -2618,8 +2618,6 @@ class lvh_page self._lv_scr = lv.layer_top() # top layer, visible over all screens else self._lv_scr = lv.obj(0) # allocate a new screen - var bg_color = lv.scr_act().get_style_bg_color(0 #- lv.PART_MAIN | lv.STATE_DEFAULT -#) # bg_color of default screen - self._lv_scr.set_style_bg_color(bg_color, 0 #- lv.PART_MAIN | lv.STATE_DEFAULT -#) # set white background end # page object is also stored in the object map at id `0` as instance of `lvg_scr` @@ -2804,7 +2802,7 @@ class HASPmota var started # (bool) is HASPmota already started? var hres, vres # (int) resolution var scr # (lv_obj) default LVGL screen - var r16 # (lv_font) robotocondensed fonts size 16 + var r12, r16, r24 # (lv_font) robotocondensed fonts size 12, 16 and 24 # haspmota objects var lvh_pages # (list of lvg_page) list of pages var lvh_page_cur_idx # (int) current page index number @@ -2890,13 +2888,11 @@ class HASPmota def start(arg1, arg2) if (self.started) return end - var dark = false var templ_name if type(arg1) == 'string' templ_name = arg1 elif type(arg2) == 'string' templ_name = arg2 - dark = bool(arg1) else templ_name = self.PAGES_JSONL # use default PAGES.JSONL end @@ -2912,16 +2908,39 @@ class HASPmota self.vres = lv.get_ver_res() # ex: 240 self.scr = lv.scr_act() # LVGL default screean object + try + self.r12 = lv.font_embedded("robotocondensed", 12) # TODO what if does not exist + except .. + self.r12 = lv.font_embedded("montserrat", 10) # TODO what if does not exist + end try self.r16 = lv.font_embedded("robotocondensed", 16) # TODO what if does not exist except .. self.r16 = lv.font_embedded("montserrat", 14) # TODO what if does not exist end + try + self.r24 = lv.font_embedded("robotocondensed", 24) # TODO what if does not exist + except .. + self.r24 = lv.font_embedded("montserrat", 20) # TODO what if does not exist + end # set the theme for HASPmota - var th2 = lv.theme_haspmota_init(0, lv.color(0xFF00FF), lv.color(0x303030), dark, self.r16) + var primary_color = self.lvh_root.parse_color(tasmota.webcolor(10 #-COL_BUTTON-#)) + var secondary_color = self.lvh_root.parse_color(tasmota.webcolor(11 #-COL_BUTTON_HOVER-#)) + var color_scr = self.lvh_root.parse_color(tasmota.webcolor(1 #-COL_BACKGROUND-#)) + var color_text = self.lvh_root.parse_color(tasmota.webcolor(9 #-COL_BUTTON_TEXT-#)) + var color_card = self.lvh_root.parse_color(tasmota.webcolor(2 #-COL_FORM-#)) + var color_grey = self.lvh_root.parse_color(tasmota.webcolor(2 #-COL_FORM-#)) + var color_reset = self.lvh_root.parse_color(tasmota.webcolor(12 #-COL_BUTTON_RESET-#)) + var color_reset_hover = self.lvh_root.parse_color(tasmota.webcolor(13 #-COL_BUTTON_RESET_HOVER-#)) + var color_save = self.lvh_root.parse_color(tasmota.webcolor(14 #-COL_BUTTON_SAVE-#)) + var color_save_hover = self.lvh_root.parse_color(tasmota.webcolor(15 #-COL_BUTTON_SAVE_HOVER-#)) + var colors = lv.color_arr([primary_color, secondary_color, color_scr, color_text, color_card, color_grey, + color_reset, color_reset_hover, color_save, color_save_hover]) + + var th2 = lv.theme_haspmota_init(0, colors, + self.r12, self.r16, self.r24) self.scr.get_disp().set_theme(th2) - self.scr.set_style_bg_color(dark ? lv.color(0x000000) : lv.color(0xFFFFFF),0) # set background to white # apply theme to layer_top, but keep it transparent lv.theme_apply(lv.layer_top()) lv.layer_top().set_style_bg_opa(0,0) diff --git a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h index fac2ea623..e6dab9c53 100644 --- a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h +++ b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h @@ -11362,8 +11362,8 @@ be_local_class(lvh_scr, })), be_str_weak(lvh_scr) ); -// compact class 'lvh_page' ktab size: 47, total: 73 (saved 208 bytes) -static const bvalue be_ktab_class_lvh_page[47] = { +// compact class 'lvh_page' ktab size: 45, total: 70 (saved 200 bytes) +static const bvalue be_ktab_class_lvh_page[45] = { /* K0 */ be_nested_str_weak(_clear), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(introspect), @@ -11393,24 +11393,22 @@ static const bvalue be_ktab_class_lvh_page[47] = { /* K26 */ be_nested_str_weak(lv), /* K27 */ be_nested_str_weak(layer_top), /* K28 */ be_nested_str_weak(obj), - /* K29 */ be_nested_str_weak(scr_act), - /* K30 */ be_nested_str_weak(get_style_bg_color), - /* K31 */ be_nested_str_weak(set_style_bg_color), - /* K32 */ be_nested_str_weak(lvh_scr), - /* K33 */ be_nested_str_weak(p_X25s), - /* K34 */ be_nested_str_weak(p_X25sb0), - /* K35 */ be_nested_str_weak(_p), - /* K36 */ be_nested_str_weak(page_dir_to), - /* K37 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D), - /* K38 */ be_nested_str_weak(lvh_page_cur_idx), - /* K39 */ be_nested_str_weak(tasmota), - /* K40 */ be_nested_str_weak(defer), - /* K41 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D), - /* K42 */ be_nested_str_weak(screen_load), - /* K43 */ be_nested_str_weak(show_anim), - /* K44 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE), - /* K45 */ be_nested_str_weak(screen_load_anim), - /* K46 */ be_nested_str_weak(_remove_page), + /* K29 */ be_nested_str_weak(lvh_scr), + /* K30 */ be_nested_str_weak(p_X25s), + /* K31 */ be_nested_str_weak(p_X25sb0), + /* K32 */ be_nested_str_weak(_p), + /* K33 */ be_nested_str_weak(scr_act), + /* K34 */ be_nested_str_weak(page_dir_to), + /* K35 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D), + /* K36 */ be_nested_str_weak(lvh_page_cur_idx), + /* K37 */ be_nested_str_weak(tasmota), + /* K38 */ be_nested_str_weak(defer), + /* K39 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D), + /* K40 */ be_nested_str_weak(screen_load), + /* K41 */ be_nested_str_weak(show_anim), + /* K42 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE), + /* K43 */ be_nested_str_weak(screen_load_anim), + /* K44 */ be_nested_str_weak(_remove_page), }; @@ -11768,7 +11766,7 @@ be_local_closure(class_lvh_page_init, /* name */ &be_ktab_class_lvh_page, /* shared constants */ be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[58]) { /* code */ + ( &(const binstruction[47]) { /* code */ 0xA40E2E00, // 0000 IMPORT R3 K23 0x90023002, // 0001 SETMBR R0 K24 R2 0x60100009, // 0002 GETGBL R4 G9 @@ -11789,44 +11787,33 @@ be_local_closure(class_lvh_page_init, /* name */ 0x8C10091B, // 0011 GETMET R4 R4 K27 0x7C100200, // 0012 CALL R4 1 0x90022204, // 0013 SETMBR R0 K17 R4 - 0x7002000F, // 0014 JMP #0025 + 0x70020004, // 0014 JMP #001A 0xB8123400, // 0015 GETNGBL R4 K26 0x8C10091C, // 0016 GETMET R4 R4 K28 0x5818000D, // 0017 LDCONST R6 K13 0x7C100400, // 0018 CALL R4 2 0x90022204, // 0019 SETMBR R0 K17 R4 - 0xB8123400, // 001A GETNGBL R4 K26 - 0x8C10091D, // 001B GETMET R4 R4 K29 - 0x7C100200, // 001C CALL R4 1 - 0x8C10091E, // 001D GETMET R4 R4 K30 - 0x5818000D, // 001E LDCONST R6 K13 - 0x7C100400, // 001F CALL R4 2 - 0x88140111, // 0020 GETMBR R5 R0 K17 - 0x8C140B1F, // 0021 GETMET R5 R5 K31 - 0x5C1C0800, // 0022 MOVE R7 R4 - 0x5820000D, // 0023 LDCONST R8 K13 - 0x7C140600, // 0024 CALL R5 3 - 0x88100118, // 0025 GETMBR R4 R0 K24 - 0x88100920, // 0026 GETMBR R4 R4 K32 - 0x5C140800, // 0027 MOVE R5 R4 - 0x4C180000, // 0028 LDNIL R6 - 0x5C1C0000, // 0029 MOVE R7 R0 - 0x4C200000, // 002A LDNIL R8 - 0x88240111, // 002B GETMBR R9 R0 K17 - 0x7C140800, // 002C CALL R5 4 - 0x88180109, // 002D GETMBR R6 R0 K9 - 0x981A1A05, // 002E SETIDX R6 K13 R5 - 0x60180018, // 002F GETGBL R6 G24 - 0x581C0021, // 0030 LDCONST R7 K33 - 0x88200119, // 0031 GETMBR R8 R0 K25 - 0x7C180400, // 0032 CALL R6 2 - 0x900C0C00, // 0033 SETMBR R3 R6 R0 - 0x60180018, // 0034 GETGBL R6 G24 - 0x581C0022, // 0035 LDCONST R7 K34 - 0x88200119, // 0036 GETMBR R8 R0 K25 - 0x7C180400, // 0037 CALL R6 2 - 0x900C0C05, // 0038 SETMBR R3 R6 R5 - 0x80000000, // 0039 RET 0 + 0x88100118, // 001A GETMBR R4 R0 K24 + 0x8810091D, // 001B GETMBR R4 R4 K29 + 0x5C140800, // 001C MOVE R5 R4 + 0x4C180000, // 001D LDNIL R6 + 0x5C1C0000, // 001E MOVE R7 R0 + 0x4C200000, // 001F LDNIL R8 + 0x88240111, // 0020 GETMBR R9 R0 K17 + 0x7C140800, // 0021 CALL R5 4 + 0x88180109, // 0022 GETMBR R6 R0 K9 + 0x981A1A05, // 0023 SETIDX R6 K13 R5 + 0x60180018, // 0024 GETGBL R6 G24 + 0x581C001E, // 0025 LDCONST R7 K30 + 0x88200119, // 0026 GETMBR R8 R0 K25 + 0x7C180400, // 0027 CALL R6 2 + 0x900C0C00, // 0028 SETMBR R3 R6 R0 + 0x60180018, // 0029 GETGBL R6 G24 + 0x581C001F, // 002A LDCONST R7 K31 + 0x88200119, // 002B GETMBR R8 R0 K25 + 0x7C180400, // 002C CALL R6 2 + 0x900C0C05, // 002D SETMBR R3 R6 R5 + 0x80000000, // 002E RET 0 }) ) ); @@ -11908,11 +11895,11 @@ be_local_closure(class_lvh_page_show, /* name */ 0x4C0C0000, // 0004 LDNIL R3 0x80040600, // 0005 RET 1 R3 0x880C0111, // 0006 GETMBR R3 R0 K17 - 0x880C0723, // 0007 GETMBR R3 R3 K35 + 0x880C0720, // 0007 GETMBR R3 R3 K32 0xB8123400, // 0008 GETNGBL R4 K26 - 0x8C10091D, // 0009 GETMET R4 R4 K29 + 0x8C100921, // 0009 GETMET R4 R4 K33 0x7C100200, // 000A CALL R4 1 - 0x88100923, // 000B GETMBR R4 R4 K35 + 0x88100920, // 000B GETMBR R4 R4 K32 0x1C0C0604, // 000C EQ R3 R3 R4 0x780E0000, // 000D JMPF R3 #000F 0x80000600, // 000E RET 0 @@ -11924,46 +11911,46 @@ be_local_closure(class_lvh_page_show, /* name */ 0x1C0C0203, // 0014 EQ R3 R1 R3 0x780E0005, // 0015 JMPF R3 #001C 0x880C0118, // 0016 GETMBR R3 R0 K24 - 0x8C0C0724, // 0017 GETMET R3 R3 K36 + 0x8C0C0722, // 0017 GETMET R3 R3 K34 0x8C140116, // 0018 GETMET R5 R0 K22 0x7C140200, // 0019 CALL R5 1 0x7C0C0400, // 001A CALL R3 2 0x5C040600, // 001B MOVE R1 R3 0x600C0018, // 001C GETGBL R3 G24 - 0x58100025, // 001D LDCONST R4 K37 + 0x58100023, // 001D LDCONST R4 K35 0x88140118, // 001E GETMBR R5 R0 K24 - 0x88140B26, // 001F GETMBR R5 R5 K38 + 0x88140B24, // 001F GETMBR R5 R5 K36 0x7C0C0400, // 0020 CALL R3 2 - 0xB8124E00, // 0021 GETNGBL R4 K39 - 0x8C100928, // 0022 GETMET R4 R4 K40 + 0xB8124A00, // 0021 GETNGBL R4 K37 + 0x8C100926, // 0022 GETMET R4 R4 K38 0x84180000, // 0023 CLOSURE R6 P0 0x7C100400, // 0024 CALL R4 2 0x60100018, // 0025 GETGBL R4 G24 - 0x58140029, // 0026 LDCONST R5 K41 + 0x58140027, // 0026 LDCONST R5 K39 0x88180119, // 0027 GETMBR R6 R0 K25 0x7C100400, // 0028 CALL R4 2 - 0xB8164E00, // 0029 GETNGBL R5 K39 - 0x8C140B28, // 002A GETMET R5 R5 K40 + 0xB8164A00, // 0029 GETNGBL R5 K37 + 0x8C140B26, // 002A GETMET R5 R5 K38 0x841C0001, // 002B CLOSURE R7 P1 0x7C140400, // 002C CALL R5 2 0x88140118, // 002D GETMBR R5 R0 K24 0x88180119, // 002E GETMBR R6 R0 K25 - 0x90164C06, // 002F SETMBR R5 K38 R6 + 0x90164806, // 002F SETMBR R5 K36 R6 0x1C14030D, // 0030 EQ R5 R1 K13 0x78160004, // 0031 JMPF R5 #0037 0xB8163400, // 0032 GETNGBL R5 K26 - 0x8C140B2A, // 0033 GETMET R5 R5 K42 + 0x8C140B28, // 0033 GETMET R5 R5 K40 0x881C0111, // 0034 GETMBR R7 R0 K17 0x7C140400, // 0035 CALL R5 2 0x7002000D, // 0036 JMP #0045 - 0x8814012B, // 0037 GETMBR R5 R0 K43 + 0x88140129, // 0037 GETMBR R5 R0 K41 0x8C140B12, // 0038 GETMET R5 R5 K18 0x5C1C0200, // 0039 MOVE R7 R1 0xB8223400, // 003A GETNGBL R8 K26 - 0x8820112C, // 003B GETMBR R8 R8 K44 + 0x8820112A, // 003B GETMBR R8 R8 K42 0x7C140600, // 003C CALL R5 3 0xB81A3400, // 003D GETNGBL R6 K26 - 0x8C180D2D, // 003E GETMET R6 R6 K45 + 0x8C180D2B, // 003E GETMET R6 R6 K43 0x88200111, // 003F GETMBR R8 R0 K17 0x5C240A00, // 0040 MOVE R9 R5 0x5C280400, // 0041 MOVE R10 R2 @@ -11996,7 +11983,7 @@ be_local_closure(class_lvh_page__delete, /* name */ &be_const_str_solidified, ( &(const binstruction[ 7]) { /* code */ 0x88040118, // 0000 GETMBR R1 R0 K24 - 0x8C04032E, // 0001 GETMET R1 R1 K46 + 0x8C04032C, // 0001 GETMET R1 R1 K44 0x880C0119, // 0002 GETMBR R3 R0 K25 0x7C040400, // 0003 CALL R1 2 0x8C040100, // 0004 GETMET R1 R0 K0 @@ -12073,137 +12060,332 @@ be_local_class(lvh_page, be_str_weak(lvh_page) ); extern const bclass be_class_HASPmota; -// compact class 'HASPmota' ktab size: 124, total: 198 (saved 592 bytes) -static const bvalue be_ktab_class_HASPmota[124] = { - /* K0 */ be_nested_str_weak(global), - /* K1 */ be_nested_str_weak(introspect), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(id), - /* K4 */ be_nested_str_weak(obj), - /* K5 */ be_nested_str_weak(get_page_cur_parsing), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(HSP_X3A_X20invalid_X20_X27id_X27_X3A_X20_X25s_X20for_X20_X27obj_X27_X3A_X20_X25s), - /* K8 */ be_nested_str_weak(get_obj), - /* K9 */ be_nested_str_weak(parentid), - /* K10 */ be_nested_str_weak(_lv_obj), - /* K11 */ be_nested_str_weak(get_scr), - /* K12 */ be_nested_str_weak(get), - /* K13 */ be_nested_str_weak(lvh_), - /* K14 */ be_nested_str_weak(class), - /* K15 */ be_nested_str_weak(lvh_obj), - /* K16 */ be_nested_str_weak(module), - /* K17 */ be_nested_str_weak(HSP_X3A_X20Cannot_X20find_X20object_X20of_X20type_X20_X25s), - /* K18 */ be_nested_str_weak(add_obj), - /* K19 */ be_nested_str_weak(HSP_X3A_X20cannot_X20specify_X20_X27obj_X27_X3A_X27_X25s_X27_X20for_X20_X27id_X27_X3A0), - /* K20 */ be_nested_str_weak(keys), - /* K21 */ be_nested_str_weak(stop_iteration), - /* K22 */ be_nested_str_weak(post_config), - /* K23 */ be_nested_str_weak(berry_run), - /* K24 */ be_nested_str_weak(nil), - /* K25 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20compile_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K26 */ be_nested_str_weak(function), - /* K27 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20run_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K28 */ be_nested_str_weak(re), - /* K29 */ be_nested_str_weak(get_page_cur), - /* K30 */ be_nested_str_weak(pages_list_sorted), - /* K31 */ be_nested_str_weak(lvh_page_cur_idx), - /* K32 */ be_const_int(1), - /* K33 */ be_nested_str_weak(prev), - /* K34 */ be_nested_str_weak(next), - /* K35 */ be_nested_str_weak(back), - /* K36 */ be_nested_str_weak(delete), - /* K37 */ be_nested_str_weak(match), - /* K38 */ be_nested_str_weak(re_page_target), - /* K39 */ be_nested_str_weak(lvh_pages), - /* K40 */ be_nested_str_weak(show), - /* K41 */ be_nested_str_weak(page_show), - /* K42 */ be_nested_str_weak(lvh_page_cur_idx_parsing), - /* K43 */ be_nested_str_weak(contains), - /* K44 */ be_nested_str_weak(remove), - /* K45 */ be_nested_str_weak(p_X25s), - /* K46 */ be_nested_str_weak(json), - /* K47 */ be_nested_str_weak(load), - /* K48 */ be_nested_str_weak(instance), - /* K49 */ be_nested_str_weak(parse_page), - /* K50 */ be_nested_str_weak(parse_obj), - /* K51 */ be_nested_str_weak(value_error), - /* K52 */ be_nested_str_weak(unable_X20to_X20parse_X20JSON_X20line), - /* K53 */ be_nested_str_weak(string), - /* K54 */ be_nested_str_weak(tell), - /* K55 */ be_nested_str_weak(size), - /* K56 */ be_nested_str_weak(readline), - /* K57 */ be_nested_str_weak(_X23), - /* K58 */ be_nested_str_weak(tasmota), - /* K59 */ be_nested_str_weak(loglevel), - /* K60 */ be_nested_str_weak(log), - /* K61 */ be_nested_str_weak(HSP_X3A_X20parsing_X20line_X20_X27_X25s_X27), - /* K62 */ be_nested_str_weak(no_X20page_X20_X27id_X27_X20defined), - /* K63 */ be_nested_str_weak(tr), - /* K64 */ be_nested_str_weak(_X20_X09), - /* K65 */ be_nested_str_weak(), - /* K66 */ be_nested_str_weak(HSP_X3A_X20invalid_X20JSON_X20line_X20_X27_X25s_X27), - /* K67 */ be_const_int(2), - /* K68 */ be_nested_str_weak(close), - /* K69 */ be_nested_str_weak(no_X20page_X20object_X20defined), - /* K70 */ be_nested_str_weak(lv), - /* K71 */ be_nested_str_weak(EVENT_CLICKED), - /* K72 */ be_nested_str_weak(_action), - /* K73 */ be_nested_str_weak(fix_lv_version), - /* K74 */ be_nested_str_weak(compilebytes), - /* K75 */ be_nested_str_weak(p_X5Cd_X2B), - /* K76 */ be_nested_str_weak(has), - /* K77 */ be_nested_str_weak(page), - /* K78 */ be_nested_str_weak(int), - /* K79 */ be_nested_str_weak(lvh_page), - /* K80 */ be_nested_str_weak(started), - /* K81 */ be_nested_str_weak(PAGES_JSONL), - /* K82 */ be_nested_str_weak(path), - /* K83 */ be_nested_str_weak(exists), - /* K84 */ be_nested_str_weak(file_X20_X27), - /* K85 */ be_nested_str_weak(_X27_X20not_X20found), - /* K86 */ be_nested_str_weak(io_erorr), - /* K87 */ be_nested_str_weak(start), - /* K88 */ be_nested_str_weak(hres), - /* K89 */ be_nested_str_weak(get_hor_res), - /* K90 */ be_nested_str_weak(vres), - /* K91 */ be_nested_str_weak(get_ver_res), - /* K92 */ be_nested_str_weak(scr), - /* K93 */ be_nested_str_weak(scr_act), - /* K94 */ be_nested_str_weak(r16), - /* K95 */ be_nested_str_weak(font_embedded), - /* K96 */ be_nested_str_weak(robotocondensed), - /* K97 */ be_nested_str_weak(montserrat), - /* K98 */ be_nested_str_weak(theme_haspmota_init), - /* K99 */ be_nested_str_weak(color), - /* K100 */ be_const_int(16711935), - /* K101 */ be_const_int(3158064), - /* K102 */ be_nested_str_weak(get_disp), - /* K103 */ be_nested_str_weak(set_theme), - /* K104 */ be_nested_str_weak(set_style_bg_color), - /* K105 */ be_const_int(16777215), - /* K106 */ be_nested_str_weak(theme_apply), - /* K107 */ be_nested_str_weak(layer_top), - /* K108 */ be_nested_str_weak(set_style_bg_opa), - /* K109 */ be_nested_str_weak(_load), - /* K110 */ be_const_class(be_class_HASPmota), - /* K111 */ be_nested_str_weak(toptr), - /* K112 */ be_nested_str_weak(event), - /* K113 */ be_nested_str_weak(_p), - /* K114 */ be_nested_str_weak(lv_event), - /* K115 */ be_nested_str_weak(get_user_data), - /* K116 */ be_nested_str_weak(fromptr), - /* K117 */ be_nested_str_weak(event_cb), - /* K118 */ be_nested_str_weak(cb), - /* K119 */ be_nested_str_weak(gen_cb), - /* K120 */ be_nested_str_weak(add_event_cb), - /* K121 */ be_nested_str_weak(version), +// compact class 'HASPmota' ktab size: 125, total: 202 (saved 616 bytes) +static const bvalue be_ktab_class_HASPmota[125] = { + /* K0 */ be_nested_str_weak(introspect), + /* K1 */ be_nested_str_weak(toptr), + /* K2 */ be_nested_str_weak(event), + /* K3 */ be_nested_str_weak(_p), + /* K4 */ be_nested_str_weak(lv), + /* K5 */ be_nested_str_weak(lv_event), + /* K6 */ be_nested_str_weak(get_user_data), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(fromptr), + /* K9 */ be_nested_str_weak(instance), + /* K10 */ be_nested_str_weak(event_cb), + /* K11 */ be_nested_str_weak(pages_list_sorted), + /* K12 */ be_const_int(1), + /* K13 */ be_const_int(2), + /* K14 */ be_nested_str_weak(find), + /* K15 */ be_nested_str_weak(has), + /* K16 */ be_nested_str_weak(page), + /* K17 */ be_nested_str_weak(int), + /* K18 */ be_nested_str_weak(lvh_page_cur_idx_parsing), + /* K19 */ be_nested_str_weak(lvh_page_cur_idx), + /* K20 */ be_nested_str_weak(lvh_pages), + /* K21 */ be_nested_str_weak(contains), + /* K22 */ be_nested_str_weak(lvh_page), + /* K23 */ be_nested_str_weak(id), + /* K24 */ be_nested_str_weak(get_page_cur_parsing), + /* K25 */ be_nested_str_weak(prev), + /* K26 */ be_nested_str_weak(next), + /* K27 */ be_nested_str_weak(back), + /* K28 */ be_nested_str_weak(global), + /* K29 */ be_nested_str_weak(obj), + /* K30 */ be_nested_str_weak(HSP_X3A_X20invalid_X20_X27id_X27_X3A_X20_X25s_X20for_X20_X27obj_X27_X3A_X20_X25s), + /* K31 */ be_nested_str_weak(get_obj), + /* K32 */ be_nested_str_weak(parentid), + /* K33 */ be_nested_str_weak(_lv_obj), + /* K34 */ be_nested_str_weak(get_scr), + /* K35 */ be_nested_str_weak(get), + /* K36 */ be_nested_str_weak(lvh_), + /* K37 */ be_nested_str_weak(class), + /* K38 */ be_nested_str_weak(lvh_obj), + /* K39 */ be_nested_str_weak(module), + /* K40 */ be_nested_str_weak(HSP_X3A_X20Cannot_X20find_X20object_X20of_X20type_X20_X25s), + /* K41 */ be_nested_str_weak(add_obj), + /* K42 */ be_nested_str_weak(HSP_X3A_X20cannot_X20specify_X20_X27obj_X27_X3A_X27_X25s_X27_X20for_X20_X27id_X27_X3A0), + /* K43 */ be_nested_str_weak(keys), + /* K44 */ be_nested_str_weak(stop_iteration), + /* K45 */ be_nested_str_weak(post_config), + /* K46 */ be_nested_str_weak(berry_run), + /* K47 */ be_nested_str_weak(nil), + /* K48 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20compile_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K49 */ be_nested_str_weak(function), + /* K50 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20run_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K51 */ be_nested_str_weak(get_page_cur), + /* K52 */ be_nested_str_weak(page_show), + /* K53 */ be_nested_str_weak(delete), + /* K54 */ be_nested_str_weak(remove), + /* K55 */ be_nested_str_weak(p_X25s), + /* K56 */ be_const_class(be_class_HASPmota), + /* K57 */ be_nested_str_weak(started), + /* K58 */ be_nested_str_weak(string), + /* K59 */ be_nested_str_weak(PAGES_JSONL), + /* K60 */ be_nested_str_weak(path), + /* K61 */ be_nested_str_weak(exists), + /* K62 */ be_nested_str_weak(file_X20_X27), + /* K63 */ be_nested_str_weak(_X27_X20not_X20found), + /* K64 */ be_nested_str_weak(io_erorr), + /* K65 */ be_nested_str_weak(start), + /* K66 */ be_nested_str_weak(hres), + /* K67 */ be_nested_str_weak(get_hor_res), + /* K68 */ be_nested_str_weak(vres), + /* K69 */ be_nested_str_weak(get_ver_res), + /* K70 */ be_nested_str_weak(scr), + /* K71 */ be_nested_str_weak(scr_act), + /* K72 */ be_nested_str_weak(r12), + /* K73 */ be_nested_str_weak(font_embedded), + /* K74 */ be_nested_str_weak(robotocondensed), + /* K75 */ be_nested_str_weak(montserrat), + /* K76 */ be_nested_str_weak(r16), + /* K77 */ be_nested_str_weak(r24), + /* K78 */ be_nested_str_weak(lvh_root), + /* K79 */ be_nested_str_weak(parse_color), + /* K80 */ be_nested_str_weak(tasmota), + /* K81 */ be_nested_str_weak(webcolor), + /* K82 */ be_nested_str_weak(color_arr), + /* K83 */ be_nested_str_weak(theme_haspmota_init), + /* K84 */ be_nested_str_weak(get_disp), + /* K85 */ be_nested_str_weak(set_theme), + /* K86 */ be_nested_str_weak(theme_apply), + /* K87 */ be_nested_str_weak(layer_top), + /* K88 */ be_nested_str_weak(set_style_bg_opa), + /* K89 */ be_nested_str_weak(_load), + /* K90 */ be_nested_str_weak(version), + /* K91 */ be_nested_str_weak(EVENT_CLICKED), + /* K92 */ be_nested_str_weak(_action), + /* K93 */ be_nested_str_weak(cb), + /* K94 */ be_nested_str_weak(gen_cb), + /* K95 */ be_nested_str_weak(add_event_cb), + /* K96 */ be_nested_str_weak(json), + /* K97 */ be_nested_str_weak(load), + /* K98 */ be_nested_str_weak(parse_page), + /* K99 */ be_nested_str_weak(parse_obj), + /* K100 */ be_nested_str_weak(value_error), + /* K101 */ be_nested_str_weak(unable_X20to_X20parse_X20JSON_X20line), + /* K102 */ be_nested_str_weak(tell), + /* K103 */ be_nested_str_weak(size), + /* K104 */ be_nested_str_weak(readline), + /* K105 */ be_nested_str_weak(_X23), + /* K106 */ be_nested_str_weak(loglevel), + /* K107 */ be_nested_str_weak(log), + /* K108 */ be_nested_str_weak(HSP_X3A_X20parsing_X20line_X20_X27_X25s_X27), + /* K109 */ be_nested_str_weak(no_X20page_X20_X27id_X27_X20defined), + /* K110 */ be_nested_str_weak(tr), + /* K111 */ be_nested_str_weak(_X20_X09), + /* K112 */ be_nested_str_weak(), + /* K113 */ be_nested_str_weak(HSP_X3A_X20invalid_X20JSON_X20line_X20_X27_X25s_X27), + /* K114 */ be_nested_str_weak(close), + /* K115 */ be_nested_str_weak(no_X20page_X20object_X20defined), + /* K116 */ be_nested_str_weak(show), + /* K117 */ be_nested_str_weak(fix_lv_version), + /* K118 */ be_nested_str_weak(re), + /* K119 */ be_nested_str_weak(re_page_target), + /* K120 */ be_nested_str_weak(compilebytes), + /* K121 */ be_nested_str_weak(p_X5Cd_X2B), /* K122 */ be_nested_str_weak(push), /* K123 */ be_nested_str_weak(sort), + /* K124 */ be_nested_str_weak(match), }; extern const bclass be_class_HASPmota; +/******************************************************************** +** Solidified function: event_dispatch +********************************************************************/ +be_local_closure(class_HASPmota_event_dispatch, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(event_dispatch), + &be_const_str_solidified, + ( &(const binstruction[34]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0x8C0C0501, // 0001 GETMET R3 R2 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x88100102, // 0004 GETMBR R4 R0 K2 + 0x78120002, // 0005 JMPF R4 #0009 + 0x88100102, // 0006 GETMBR R4 R0 K2 + 0x90120603, // 0007 SETMBR R4 K3 R3 + 0x70020004, // 0008 JMP #000E + 0xB8120800, // 0009 GETNGBL R4 K4 + 0x8C100905, // 000A GETMET R4 R4 K5 + 0x5C180600, // 000B MOVE R6 R3 + 0x7C100400, // 000C CALL R4 2 + 0x90020404, // 000D SETMBR R0 K2 R4 + 0x88100102, // 000E GETMBR R4 R0 K2 + 0x8C100906, // 000F GETMET R4 R4 K6 + 0x7C100200, // 0010 CALL R4 1 + 0x60140009, // 0011 GETGBL R5 G9 + 0x5C180800, // 0012 MOVE R6 R4 + 0x7C140200, // 0013 CALL R5 1 + 0x20140B07, // 0014 NE R5 R5 K7 + 0x7816000A, // 0015 JMPF R5 #0021 + 0x8C140508, // 0016 GETMET R5 R2 K8 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x7C140400, // 0018 CALL R5 2 + 0x60180004, // 0019 GETGBL R6 G4 + 0x5C1C0A00, // 001A MOVE R7 R5 + 0x7C180200, // 001B CALL R6 1 + 0x1C180D09, // 001C EQ R6 R6 K9 + 0x781A0002, // 001D JMPF R6 #0021 + 0x8C180B0A, // 001E GETMET R6 R5 K10 + 0x88200102, // 001F GETMBR R8 R0 K2 + 0x7C180400, // 0020 CALL R6 2 + 0x80000000, // 0021 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: page_dir_to +********************************************************************/ +be_local_closure(class_HASPmota_page_dir_to, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(page_dir_to), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x8C08010B, // 0000 GETMET R2 R0 K11 + 0x58100007, // 0001 LDCONST R4 K7 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0403, // 0004 EQ R3 R2 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80060E00, // 0006 RET 1 K7 + 0x600C000C, // 0007 GETGBL R3 G12 + 0x5C100400, // 0008 MOVE R4 R2 + 0x7C0C0200, // 0009 CALL R3 1 + 0x1810070C, // 000A LE R4 R3 K12 + 0x78120000, // 000B JMPF R4 #000D + 0x80060E00, // 000C RET 1 K7 + 0x1C10070D, // 000D EQ R4 R3 K13 + 0x78120000, // 000E JMPF R4 #0010 + 0x80061800, // 000F RET 1 K12 + 0x8C10050E, // 0010 GETMET R4 R2 K14 + 0x5C180200, // 0011 MOVE R6 R1 + 0x7C100400, // 0012 CALL R4 2 + 0x4C140000, // 0013 LDNIL R5 + 0x1C140805, // 0014 EQ R5 R4 R5 + 0x78160000, // 0015 JMPF R5 #0017 + 0x80060E00, // 0016 RET 1 K7 + 0x0014070C, // 0017 ADD R5 R3 K12 + 0x0C140B0D, // 0018 DIV R5 R5 K13 + 0x18140805, // 0019 LE R5 R4 R5 + 0x78160001, // 001A JMPF R5 #001D + 0x80061800, // 001B RET 1 K12 + 0x70020001, // 001C JMP #001F + 0x5415FFFE, // 001D LDINT R5 -1 + 0x80040A00, // 001E RET 1 R5 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_page +********************************************************************/ +be_local_closure(class_HASPmota_parse_page, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(parse_page), + &be_const_str_solidified, + ( &(const binstruction[59]) { /* code */ + 0x8C08030F, // 0000 GETMET R2 R1 K15 + 0x58100010, // 0001 LDCONST R4 K16 + 0x7C080400, // 0002 CALL R2 2 + 0x780A0035, // 0003 JMPF R2 #003A + 0x60080004, // 0004 GETGBL R2 G4 + 0x940C0310, // 0005 GETIDX R3 R1 K16 + 0x7C080200, // 0006 CALL R2 1 + 0x1C080511, // 0007 EQ R2 R2 K17 + 0x780A0030, // 0008 JMPF R2 #003A + 0x60080009, // 0009 GETGBL R2 G9 + 0x940C0310, // 000A GETIDX R3 R1 K16 + 0x7C080200, // 000B CALL R2 1 + 0x90022402, // 000C SETMBR R0 K18 R2 + 0x880C0113, // 000D GETMBR R3 R0 K19 + 0x4C100000, // 000E LDNIL R4 + 0x1C0C0604, // 000F EQ R3 R3 R4 + 0x780E0000, // 0010 JMPF R3 #0012 + 0x90022602, // 0011 SETMBR R0 K19 R2 + 0x880C0114, // 0012 GETMBR R3 R0 K20 + 0x8C0C0715, // 0013 GETMET R3 R3 K21 + 0x5C140400, // 0014 MOVE R5 R2 + 0x7C0C0400, // 0015 CALL R3 2 + 0x740E0006, // 0016 JMPT R3 #001E + 0x880C0116, // 0017 GETMBR R3 R0 K22 + 0x88100114, // 0018 GETMBR R4 R0 K20 + 0x5C140600, // 0019 MOVE R5 R3 + 0x5C180400, // 001A MOVE R6 R2 + 0x5C1C0000, // 001B MOVE R7 R0 + 0x7C140400, // 001C CALL R5 2 + 0x98100405, // 001D SETIDX R4 R2 R5 + 0x8C0C030E, // 001E GETMET R3 R1 K14 + 0x58140017, // 001F LDCONST R5 K23 + 0x7C0C0400, // 0020 CALL R3 2 + 0x1C0C0707, // 0021 EQ R3 R3 K7 + 0x780E0016, // 0022 JMPF R3 #003A + 0x8C0C0118, // 0023 GETMET R3 R0 K24 + 0x7C0C0200, // 0024 CALL R3 1 + 0x60100009, // 0025 GETGBL R4 G9 + 0x8C14030E, // 0026 GETMET R5 R1 K14 + 0x581C0019, // 0027 LDCONST R7 K25 + 0x4C200000, // 0028 LDNIL R8 + 0x7C140600, // 0029 CALL R5 3 + 0x7C100200, // 002A CALL R4 1 + 0x900E3204, // 002B SETMBR R3 K25 R4 + 0x60100009, // 002C GETGBL R4 G9 + 0x8C14030E, // 002D GETMET R5 R1 K14 + 0x581C001A, // 002E LDCONST R7 K26 + 0x4C200000, // 002F LDNIL R8 + 0x7C140600, // 0030 CALL R5 3 + 0x7C100200, // 0031 CALL R4 1 + 0x900E3404, // 0032 SETMBR R3 K26 R4 + 0x60100009, // 0033 GETGBL R4 G9 + 0x8C14030E, // 0034 GETMET R5 R1 K14 + 0x581C001B, // 0035 LDCONST R7 K27 + 0x4C200000, // 0036 LDNIL R8 + 0x7C140600, // 0037 CALL R5 3 + 0x7C100200, // 0038 CALL R4 1 + 0x900E3604, // 0039 SETMBR R3 K27 R4 + 0x80000000, // 003A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: parse_obj ********************************************************************/ @@ -12221,15 +12403,15 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ be_str_weak(parse_obj), &be_const_str_solidified, ( &(const binstruction[239]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xA4120200, // 0001 IMPORT R4 K1 + 0xA40E3800, // 0000 IMPORT R3 K28 + 0xA4120000, // 0001 IMPORT R4 K0 0x60140009, // 0002 GETGBL R5 G9 - 0x8C180302, // 0003 GETMET R6 R1 K2 - 0x58200003, // 0004 LDCONST R8 K3 + 0x8C18030E, // 0003 GETMET R6 R1 K14 + 0x58200017, // 0004 LDCONST R8 K23 0x7C180400, // 0005 CALL R6 2 0x7C140200, // 0006 CALL R5 1 - 0x8C180302, // 0007 GETMET R6 R1 K2 - 0x58200004, // 0008 LDCONST R8 K4 + 0x8C18030E, // 0007 GETMET R6 R1 K14 + 0x5820001D, // 0008 LDCONST R8 K29 0x7C180400, // 0009 CALL R6 2 0x4C1C0000, // 000A LDNIL R7 0x201C0C07, // 000B NE R7 R6 R7 @@ -12240,30 +12422,30 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x70020000, // 0010 JMP #0012 0x4C1C0000, // 0011 LDNIL R7 0x5C180E00, // 0012 MOVE R6 R7 - 0x8C1C0105, // 0013 GETMET R7 R0 K5 + 0x8C1C0118, // 0013 GETMET R7 R0 K24 0x7C1C0200, // 0014 CALL R7 1 0x4C200000, // 0015 LDNIL R8 0x20200A08, // 0016 NE R8 R5 R8 0x78220011, // 0017 JMPF R8 #002A - 0x14200B06, // 0018 LT R8 R5 K6 + 0x14200B07, // 0018 LT R8 R5 K7 0x74220002, // 0019 JMPT R8 #001D 0x542200FD, // 001A LDINT R8 254 0x24200A08, // 001B GT R8 R5 R8 0x7822000C, // 001C JMPF R8 #002A - 0x20200B06, // 001D NE R8 R5 K6 + 0x20200B07, // 001D NE R8 R5 K7 0x74220002, // 001E JMPT R8 #0022 0x4C200000, // 001F LDNIL R8 0x1C200C08, // 0020 EQ R8 R6 R8 0x78220007, // 0021 JMPF R8 #002A 0x60200001, // 0022 GETGBL R8 G1 0x60240018, // 0023 GETGBL R9 G24 - 0x58280007, // 0024 LDCONST R10 K7 + 0x5828001E, // 0024 LDCONST R10 K30 0x5C2C0A00, // 0025 MOVE R11 R5 0x5C300C00, // 0026 MOVE R12 R6 0x7C240600, // 0027 CALL R9 3 0x7C200200, // 0028 CALL R8 1 0x80001000, // 0029 RET 0 - 0x8C200F08, // 002A GETMET R8 R7 K8 + 0x8C200F1F, // 002A GETMET R8 R7 K31 0x5C280A00, // 002B MOVE R10 R5 0x7C200400, // 002C CALL R8 2 0x4C240000, // 002D LDNIL R9 @@ -12276,8 +12458,8 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x1C241009, // 0034 EQ R9 R8 R9 0x78260059, // 0035 JMPF R9 #0090 0x60240009, // 0036 GETGBL R9 G9 - 0x8C280302, // 0037 GETMET R10 R1 K2 - 0x58300009, // 0038 LDCONST R12 K9 + 0x8C28030E, // 0037 GETMET R10 R1 K14 + 0x58300020, // 0038 LDCONST R12 K32 0x7C280400, // 0039 CALL R10 2 0x7C240200, // 003A CALL R9 1 0x4C280000, // 003B LDNIL R10 @@ -12285,29 +12467,29 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x4C300000, // 003D LDNIL R12 0x2030120C, // 003E NE R12 R9 R12 0x78320007, // 003F JMPF R12 #0048 - 0x8C300F08, // 0040 GETMET R12 R7 K8 + 0x8C300F1F, // 0040 GETMET R12 R7 K31 0x5C381200, // 0041 MOVE R14 R9 0x7C300400, // 0042 CALL R12 2 0x5C281800, // 0043 MOVE R10 R12 0x4C300000, // 0044 LDNIL R12 0x2030140C, // 0045 NE R12 R10 R12 0x78320000, // 0046 JMPF R12 #0048 - 0x882C150A, // 0047 GETMBR R11 R10 K10 + 0x882C1521, // 0047 GETMBR R11 R10 K33 0x4C300000, // 0048 LDNIL R12 0x1C30160C, // 0049 EQ R12 R11 R12 0x78320002, // 004A JMPF R12 #004E - 0x8C300F0B, // 004B GETMET R12 R7 K11 + 0x8C300F22, // 004B GETMET R12 R7 K34 0x7C300200, // 004C CALL R12 1 0x5C2C1800, // 004D MOVE R11 R12 - 0x8C30090C, // 004E GETMET R12 R4 K12 + 0x8C300923, // 004E GETMET R12 R4 K35 0x5C380000, // 004F MOVE R14 R0 - 0x003E1A06, // 0050 ADD R15 K13 R6 + 0x003E4806, // 0050 ADD R15 K36 R6 0x7C300600, // 0051 CALL R12 3 0x4C340000, // 0052 LDNIL R13 0x4C380000, // 0053 LDNIL R14 0x1C38180E, // 0054 EQ R14 R12 R14 0x783A0010, // 0055 JMPF R14 #0067 - 0x8C38090C, // 0056 GETMET R14 R4 K12 + 0x8C380923, // 0056 GETMET R14 R4 K35 0x5C400600, // 0057 MOVE R16 R3 0x5C440C00, // 0058 MOVE R17 R6 0x7C380600, // 0059 CALL R14 3 @@ -12317,17 +12499,17 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x603C0004, // 005D GETGBL R15 G4 0x5C401C00, // 005E MOVE R16 R14 0x7C3C0200, // 005F CALL R15 1 - 0x1C3C1F0E, // 0060 EQ R15 R15 K14 + 0x1C3C1F25, // 0060 EQ R15 R15 K37 0x783E0004, // 0061 JMPF R15 #0067 0x5C3C1C00, // 0062 MOVE R15 R14 0x5C401600, // 0063 MOVE R16 R11 0x7C3C0200, // 0064 CALL R15 1 0x5C341E00, // 0065 MOVE R13 R15 - 0x8830010F, // 0066 GETMBR R12 R0 K15 + 0x88300126, // 0066 GETMBR R12 R0 K38 0x4C380000, // 0067 LDNIL R14 0x1C38180E, // 0068 EQ R14 R12 R14 0x783A000F, // 0069 JMPF R14 #007A - 0x8C380910, // 006A GETMET R14 R4 K16 + 0x8C380927, // 006A GETMET R14 R4 K39 0x5C400C00, // 006B MOVE R16 R6 0x7C380400, // 006C CALL R14 2 0x4C3C0000, // 006D LDNIL R15 @@ -12336,19 +12518,19 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x603C0004, // 0070 GETGBL R15 G4 0x5C401C00, // 0071 MOVE R16 R14 0x7C3C0200, // 0072 CALL R15 1 - 0x1C3C1F0E, // 0073 EQ R15 R15 K14 + 0x1C3C1F25, // 0073 EQ R15 R15 K37 0x783E0004, // 0074 JMPF R15 #007A 0x5C3C1C00, // 0075 MOVE R15 R14 0x5C401600, // 0076 MOVE R16 R11 0x7C3C0200, // 0077 CALL R15 1 0x5C341E00, // 0078 MOVE R13 R15 - 0x8830010F, // 0079 GETMBR R12 R0 K15 + 0x88300126, // 0079 GETMBR R12 R0 K38 0x4C380000, // 007A LDNIL R14 0x1C38180E, // 007B EQ R14 R12 R14 0x783A0006, // 007C JMPF R14 #0084 0x60380001, // 007D GETGBL R14 G1 0x603C0018, // 007E GETGBL R15 G24 - 0x58400011, // 007F LDCONST R16 K17 + 0x58400028, // 007F LDCONST R16 K40 0x5C440C00, // 0080 MOVE R17 R6 0x7C3C0400, // 0081 CALL R15 2 0x7C380200, // 0082 CALL R14 1 @@ -12361,33 +12543,33 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x5C4C1400, // 0089 MOVE R19 R10 0x7C380A00, // 008A CALL R14 5 0x5C201C00, // 008B MOVE R8 R14 - 0x8C380F12, // 008C GETMET R14 R7 K18 + 0x8C380F29, // 008C GETMET R14 R7 K41 0x5C400A00, // 008D MOVE R16 R5 0x5C441000, // 008E MOVE R17 R8 0x7C380600, // 008F CALL R14 3 - 0x1C240B06, // 0090 EQ R9 R5 K6 + 0x1C240B07, // 0090 EQ R9 R5 K7 0x7826000F, // 0091 JMPF R9 #00A2 0x4C240000, // 0092 LDNIL R9 0x20240C09, // 0093 NE R9 R6 R9 0x78260006, // 0094 JMPF R9 #009C 0x60240001, // 0095 GETGBL R9 G1 0x60280018, // 0096 GETGBL R10 G24 - 0x582C0013, // 0097 LDCONST R11 K19 + 0x582C002A, // 0097 LDCONST R11 K42 0x5C300C00, // 0098 MOVE R12 R6 0x7C280400, // 0099 CALL R10 2 0x7C240200, // 009A CALL R9 1 0x80001200, // 009B RET 0 - 0x8C240105, // 009C GETMET R9 R0 K5 + 0x8C240118, // 009C GETMET R9 R0 K24 0x7C240200, // 009D CALL R9 1 - 0x8C241308, // 009E GETMET R9 R9 K8 - 0x582C0006, // 009F LDCONST R11 K6 + 0x8C24131F, // 009E GETMET R9 R9 K31 + 0x582C0007, // 009F LDCONST R11 K7 0x7C240400, // 00A0 CALL R9 2 0x5C201200, // 00A1 MOVE R8 R9 0x4C240000, // 00A2 LDNIL R9 0x20241009, // 00A3 NE R9 R8 R9 0x7826000C, // 00A4 JMPF R9 #00B2 0x60240010, // 00A5 GETGBL R9 G16 - 0x8C280314, // 00A6 GETMET R10 R1 K20 + 0x8C28032B, // 00A6 GETMET R10 R1 K43 0x7C280200, // 00A7 CALL R10 1 0x7C240200, // 00A8 CALL R9 1 0xA8020004, // 00A9 EXBLK 0 #00AF @@ -12396,21 +12578,21 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x942C020A, // 00AC GETIDX R11 R1 R10 0x9020140B, // 00AD SETMBR R8 R10 R11 0x7001FFFA, // 00AE JMP #00AA - 0x58240015, // 00AF LDCONST R9 K21 + 0x5824002C, // 00AF LDCONST R9 K44 0xAC240200, // 00B0 CATCH R9 1 0 0xB0080000, // 00B1 RAISE 2 R0 R0 0x4C240000, // 00B2 LDNIL R9 0x20241009, // 00B3 NE R9 R8 R9 0x78260001, // 00B4 JMPF R9 #00B7 - 0x8C241116, // 00B5 GETMET R9 R8 K22 + 0x8C24112D, // 00B5 GETMET R9 R8 K45 0x7C240200, // 00B6 CALL R9 1 0x4C240000, // 00B7 LDNIL R9 0x60280008, // 00B8 GETGBL R10 G8 - 0x8C2C0302, // 00B9 GETMET R11 R1 K2 - 0x58340017, // 00BA LDCONST R13 K23 + 0x8C2C030E, // 00B9 GETMET R11 R1 K14 + 0x5834002E, // 00BA LDCONST R13 K46 0x7C2C0400, // 00BB CALL R11 2 0x7C280200, // 00BC CALL R10 1 - 0x202C1518, // 00BD NE R11 R10 K24 + 0x202C152F, // 00BD NE R11 R10 K47 0x782E0012, // 00BE JMPF R11 #00D2 0xA8020005, // 00BF EXBLK 0 #00C6 0x602C000D, // 00C0 GETGBL R11 G13 @@ -12423,7 +12605,7 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x70020008, // 00C7 JMP #00D1 0x60340001, // 00C8 GETGBL R13 G1 0x60380018, // 00C9 GETGBL R14 G24 - 0x583C0019, // 00CA LDCONST R15 K25 + 0x583C0030, // 00CA LDCONST R15 K48 0x5C401400, // 00CB MOVE R16 R10 0x5C441600, // 00CC MOVE R17 R11 0x5C481800, // 00CD MOVE R18 R12 @@ -12440,7 +12622,7 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x60300004, // 00D8 GETGBL R12 G4 0x5C341600, // 00D9 MOVE R13 R11 0x7C300200, // 00DA CALL R12 1 - 0x1C30191A, // 00DB EQ R12 R12 K26 + 0x1C301931, // 00DB EQ R12 R12 K49 0x78320002, // 00DC JMPF R12 #00E0 0x5C301600, // 00DD MOVE R12 R11 0x5C341000, // 00DE MOVE R13 R8 @@ -12451,7 +12633,7 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ 0x70020008, // 00E3 JMP #00ED 0x60340001, // 00E4 GETGBL R13 G1 0x60380018, // 00E5 GETGBL R14 G24 - 0x583C001B, // 00E6 LDCONST R15 K27 + 0x583C0032, // 00E6 LDCONST R15 K50 0x5C401400, // 00E7 MOVE R16 R10 0x5C441600, // 00E8 MOVE R17 R11 0x5C481800, // 00E9 MOVE R18 R12 @@ -12466,6 +12648,841 @@ be_local_closure(class_HASPmota_parse_obj, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: get_pages +********************************************************************/ +be_local_closure(class_HASPmota_get_pages, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(get_pages), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x8C04010B, // 0000 GETMET R1 R0 K11 + 0x4C0C0000, // 0001 LDNIL R3 + 0x7C040400, // 0002 CALL R1 2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _remove_page +********************************************************************/ +be_local_closure(class_HASPmota__remove_page, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(_remove_page), + &be_const_str_solidified, + ( &(const binstruction[37]) { /* code */ + 0x8C080133, // 0000 GETMET R2 R0 K51 + 0x7C080200, // 0001 CALL R2 1 + 0x8C080517, // 0002 GETMET R2 R2 K23 + 0x7C080200, // 0003 CALL R2 1 + 0x1C0C0202, // 0004 EQ R3 R1 R2 + 0x780E0008, // 0005 JMPF R3 #000F + 0x8C0C0134, // 0006 GETMET R3 R0 K52 + 0x58140035, // 0007 LDCONST R5 K53 + 0x58180007, // 0008 LDCONST R6 K7 + 0x581C0007, // 0009 LDCONST R7 K7 + 0x7C0C0800, // 000A CALL R3 4 + 0x4C100000, // 000B LDNIL R4 + 0x1C100604, // 000C EQ R4 R3 R4 + 0x78120000, // 000D JMPF R4 #000F + 0x80000800, // 000E RET 0 + 0x880C0112, // 000F GETMBR R3 R0 K18 + 0x1C0C0601, // 0010 EQ R3 R3 R1 + 0x780E0001, // 0011 JMPF R3 #0014 + 0x880C0113, // 0012 GETMBR R3 R0 K19 + 0x90022403, // 0013 SETMBR R0 K18 R3 + 0x880C0114, // 0014 GETMBR R3 R0 K20 + 0x8C0C0715, // 0015 GETMET R3 R3 K21 + 0x5C140200, // 0016 MOVE R5 R1 + 0x7C0C0400, // 0017 CALL R3 2 + 0x780E0003, // 0018 JMPF R3 #001D + 0x880C0114, // 0019 GETMBR R3 R0 K20 + 0x8C0C0736, // 001A GETMET R3 R3 K54 + 0x5C140200, // 001B MOVE R5 R1 + 0x7C0C0400, // 001C CALL R3 2 + 0x600C0018, // 001D GETGBL R3 G24 + 0x58100037, // 001E LDCONST R4 K55 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0xB8123800, // 0021 GETNGBL R4 K28 + 0x4C140000, // 0022 LDNIL R5 + 0x90100605, // 0023 SETMBR R4 R3 R5 + 0x80000000, // 0024 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sort +********************************************************************/ +be_local_closure(class_HASPmota_sort, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 12, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(sort), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x58040038, // 0000 LDCONST R1 K56 + 0x58080007, // 0001 LDCONST R2 K7 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x140C0403, // 0005 LT R3 R2 R3 + 0x780E000F, // 0006 JMPF R3 #0017 + 0x940C0002, // 0007 GETIDX R3 R0 R2 + 0x5C100400, // 0008 MOVE R4 R2 + 0x24140907, // 0009 GT R5 R4 K7 + 0x78160008, // 000A JMPF R5 #0014 + 0x0414090C, // 000B SUB R5 R4 K12 + 0x94140005, // 000C GETIDX R5 R0 R5 + 0x24140A03, // 000D GT R5 R5 R3 + 0x78160004, // 000E JMPF R5 #0014 + 0x0414090C, // 000F SUB R5 R4 K12 + 0x94140005, // 0010 GETIDX R5 R0 R5 + 0x98000805, // 0011 SETIDX R0 R4 R5 + 0x0410090C, // 0012 SUB R4 R4 K12 + 0x7001FFF4, // 0013 JMP #0009 + 0x98000803, // 0014 SETIDX R0 R4 R3 + 0x0008050C, // 0015 ADD R2 R2 K12 + 0x7001FFEA, // 0016 JMP #0002 + 0x80040000, // 0017 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_page_cur +********************************************************************/ +be_local_closure(class_HASPmota_get_page_cur, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(get_page_cur), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040114, // 0000 GETMBR R1 R0 K20 + 0x88080113, // 0001 GETMBR R2 R0 K19 + 0x94040202, // 0002 GETIDX R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start +********************************************************************/ +be_local_closure(class_HASPmota_start, /* name */ + be_nested_proto( + 23, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(start), + &be_const_str_solidified, + ( &(const binstruction[220]) { /* code */ + 0x880C0139, // 0000 GETMBR R3 R0 K57 + 0x780E0000, // 0001 JMPF R3 #0003 + 0x80000600, // 0002 RET 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x60100004, // 0004 GETGBL R4 G4 + 0x5C140200, // 0005 MOVE R5 R1 + 0x7C100200, // 0006 CALL R4 1 + 0x1C10093A, // 0007 EQ R4 R4 K58 + 0x78120001, // 0008 JMPF R4 #000B + 0x5C0C0200, // 0009 MOVE R3 R1 + 0x70020007, // 000A JMP #0013 + 0x60100004, // 000B GETGBL R4 G4 + 0x5C140400, // 000C MOVE R5 R2 + 0x7C100200, // 000D CALL R4 1 + 0x1C10093A, // 000E EQ R4 R4 K58 + 0x78120001, // 000F JMPF R4 #0012 + 0x5C0C0400, // 0010 MOVE R3 R2 + 0x70020000, // 0011 JMP #0013 + 0x880C013B, // 0012 GETMBR R3 R0 K59 + 0xA4127800, // 0013 IMPORT R4 K60 + 0x8C14093D, // 0014 GETMET R5 R4 K61 + 0x5C1C0600, // 0015 MOVE R7 R3 + 0x7C140400, // 0016 CALL R5 2 + 0x74160002, // 0017 JMPT R5 #001B + 0x00167C03, // 0018 ADD R5 K62 R3 + 0x00140B3F, // 0019 ADD R5 R5 K63 + 0xB0068005, // 001A RAISE 1 K64 R5 + 0xB8160800, // 001B GETNGBL R5 K4 + 0x8C140B41, // 001C GETMET R5 R5 K65 + 0x7C140200, // 001D CALL R5 1 + 0xB8160800, // 001E GETNGBL R5 K4 + 0x8C140B43, // 001F GETMET R5 R5 K67 + 0x7C140200, // 0020 CALL R5 1 + 0x90028405, // 0021 SETMBR R0 K66 R5 + 0xB8160800, // 0022 GETNGBL R5 K4 + 0x8C140B45, // 0023 GETMET R5 R5 K69 + 0x7C140200, // 0024 CALL R5 1 + 0x90028805, // 0025 SETMBR R0 K68 R5 + 0xB8160800, // 0026 GETNGBL R5 K4 + 0x8C140B47, // 0027 GETMET R5 R5 K71 + 0x7C140200, // 0028 CALL R5 1 + 0x90028C05, // 0029 SETMBR R0 K70 R5 + 0xA8020007, // 002A EXBLK 0 #0033 + 0xB8160800, // 002B GETNGBL R5 K4 + 0x8C140B49, // 002C GETMET R5 R5 K73 + 0x581C004A, // 002D LDCONST R7 K74 + 0x5422000B, // 002E LDINT R8 12 + 0x7C140600, // 002F CALL R5 3 + 0x90029005, // 0030 SETMBR R0 K72 R5 + 0xA8040001, // 0031 EXBLK 1 1 + 0x70020009, // 0032 JMP #003D + 0xAC140000, // 0033 CATCH R5 0 0 + 0x70020006, // 0034 JMP #003C + 0xB8160800, // 0035 GETNGBL R5 K4 + 0x8C140B49, // 0036 GETMET R5 R5 K73 + 0x581C004B, // 0037 LDCONST R7 K75 + 0x54220009, // 0038 LDINT R8 10 + 0x7C140600, // 0039 CALL R5 3 + 0x90029005, // 003A SETMBR R0 K72 R5 + 0x70020000, // 003B JMP #003D + 0xB0080000, // 003C RAISE 2 R0 R0 + 0xA8020007, // 003D EXBLK 0 #0046 + 0xB8160800, // 003E GETNGBL R5 K4 + 0x8C140B49, // 003F GETMET R5 R5 K73 + 0x581C004A, // 0040 LDCONST R7 K74 + 0x5422000F, // 0041 LDINT R8 16 + 0x7C140600, // 0042 CALL R5 3 + 0x90029805, // 0043 SETMBR R0 K76 R5 + 0xA8040001, // 0044 EXBLK 1 1 + 0x70020009, // 0045 JMP #0050 + 0xAC140000, // 0046 CATCH R5 0 0 + 0x70020006, // 0047 JMP #004F + 0xB8160800, // 0048 GETNGBL R5 K4 + 0x8C140B49, // 0049 GETMET R5 R5 K73 + 0x581C004B, // 004A LDCONST R7 K75 + 0x5422000D, // 004B LDINT R8 14 + 0x7C140600, // 004C CALL R5 3 + 0x90029805, // 004D SETMBR R0 K76 R5 + 0x70020000, // 004E JMP #0050 + 0xB0080000, // 004F RAISE 2 R0 R0 + 0xA8020007, // 0050 EXBLK 0 #0059 + 0xB8160800, // 0051 GETNGBL R5 K4 + 0x8C140B49, // 0052 GETMET R5 R5 K73 + 0x581C004A, // 0053 LDCONST R7 K74 + 0x54220017, // 0054 LDINT R8 24 + 0x7C140600, // 0055 CALL R5 3 + 0x90029A05, // 0056 SETMBR R0 K77 R5 + 0xA8040001, // 0057 EXBLK 1 1 + 0x70020009, // 0058 JMP #0063 + 0xAC140000, // 0059 CATCH R5 0 0 + 0x70020006, // 005A JMP #0062 + 0xB8160800, // 005B GETNGBL R5 K4 + 0x8C140B49, // 005C GETMET R5 R5 K73 + 0x581C004B, // 005D LDCONST R7 K75 + 0x54220013, // 005E LDINT R8 20 + 0x7C140600, // 005F CALL R5 3 + 0x90029A05, // 0060 SETMBR R0 K77 R5 + 0x70020000, // 0061 JMP #0063 + 0xB0080000, // 0062 RAISE 2 R0 R0 + 0x8814014E, // 0063 GETMBR R5 R0 K78 + 0x8C140B4F, // 0064 GETMET R5 R5 K79 + 0xB81EA000, // 0065 GETNGBL R7 K80 + 0x8C1C0F51, // 0066 GETMET R7 R7 K81 + 0x54260009, // 0067 LDINT R9 10 + 0x7C1C0400, // 0068 CALL R7 2 + 0x7C140400, // 0069 CALL R5 2 + 0x8818014E, // 006A GETMBR R6 R0 K78 + 0x8C180D4F, // 006B GETMET R6 R6 K79 + 0xB822A000, // 006C GETNGBL R8 K80 + 0x8C201151, // 006D GETMET R8 R8 K81 + 0x542A000A, // 006E LDINT R10 11 + 0x7C200400, // 006F CALL R8 2 + 0x7C180400, // 0070 CALL R6 2 + 0x881C014E, // 0071 GETMBR R7 R0 K78 + 0x8C1C0F4F, // 0072 GETMET R7 R7 K79 + 0xB826A000, // 0073 GETNGBL R9 K80 + 0x8C241351, // 0074 GETMET R9 R9 K81 + 0x582C000C, // 0075 LDCONST R11 K12 + 0x7C240400, // 0076 CALL R9 2 + 0x7C1C0400, // 0077 CALL R7 2 + 0x8820014E, // 0078 GETMBR R8 R0 K78 + 0x8C20114F, // 0079 GETMET R8 R8 K79 + 0xB82AA000, // 007A GETNGBL R10 K80 + 0x8C281551, // 007B GETMET R10 R10 K81 + 0x54320008, // 007C LDINT R12 9 + 0x7C280400, // 007D CALL R10 2 + 0x7C200400, // 007E CALL R8 2 + 0x8824014E, // 007F GETMBR R9 R0 K78 + 0x8C24134F, // 0080 GETMET R9 R9 K79 + 0xB82EA000, // 0081 GETNGBL R11 K80 + 0x8C2C1751, // 0082 GETMET R11 R11 K81 + 0x5834000D, // 0083 LDCONST R13 K13 + 0x7C2C0400, // 0084 CALL R11 2 + 0x7C240400, // 0085 CALL R9 2 + 0x8828014E, // 0086 GETMBR R10 R0 K78 + 0x8C28154F, // 0087 GETMET R10 R10 K79 + 0xB832A000, // 0088 GETNGBL R12 K80 + 0x8C301951, // 0089 GETMET R12 R12 K81 + 0x5838000D, // 008A LDCONST R14 K13 + 0x7C300400, // 008B CALL R12 2 + 0x7C280400, // 008C CALL R10 2 + 0x882C014E, // 008D GETMBR R11 R0 K78 + 0x8C2C174F, // 008E GETMET R11 R11 K79 + 0xB836A000, // 008F GETNGBL R13 K80 + 0x8C341B51, // 0090 GETMET R13 R13 K81 + 0x543E000B, // 0091 LDINT R15 12 + 0x7C340400, // 0092 CALL R13 2 + 0x7C2C0400, // 0093 CALL R11 2 + 0x8830014E, // 0094 GETMBR R12 R0 K78 + 0x8C30194F, // 0095 GETMET R12 R12 K79 + 0xB83AA000, // 0096 GETNGBL R14 K80 + 0x8C381D51, // 0097 GETMET R14 R14 K81 + 0x5442000C, // 0098 LDINT R16 13 + 0x7C380400, // 0099 CALL R14 2 + 0x7C300400, // 009A CALL R12 2 + 0x8834014E, // 009B GETMBR R13 R0 K78 + 0x8C341B4F, // 009C GETMET R13 R13 K79 + 0xB83EA000, // 009D GETNGBL R15 K80 + 0x8C3C1F51, // 009E GETMET R15 R15 K81 + 0x5446000D, // 009F LDINT R17 14 + 0x7C3C0400, // 00A0 CALL R15 2 + 0x7C340400, // 00A1 CALL R13 2 + 0x8838014E, // 00A2 GETMBR R14 R0 K78 + 0x8C381D4F, // 00A3 GETMET R14 R14 K79 + 0xB842A000, // 00A4 GETNGBL R16 K80 + 0x8C402151, // 00A5 GETMET R16 R16 K81 + 0x544A000E, // 00A6 LDINT R18 15 + 0x7C400400, // 00A7 CALL R16 2 + 0x7C380400, // 00A8 CALL R14 2 + 0xB83E0800, // 00A9 GETNGBL R15 K4 + 0x8C3C1F52, // 00AA GETMET R15 R15 K82 + 0x60440012, // 00AB GETGBL R17 G18 + 0x7C440000, // 00AC CALL R17 0 + 0x40482205, // 00AD CONNECT R18 R17 R5 + 0x40482206, // 00AE CONNECT R18 R17 R6 + 0x40482207, // 00AF CONNECT R18 R17 R7 + 0x40482208, // 00B0 CONNECT R18 R17 R8 + 0x40482209, // 00B1 CONNECT R18 R17 R9 + 0x4048220A, // 00B2 CONNECT R18 R17 R10 + 0x4048220B, // 00B3 CONNECT R18 R17 R11 + 0x4048220C, // 00B4 CONNECT R18 R17 R12 + 0x4048220D, // 00B5 CONNECT R18 R17 R13 + 0x4048220E, // 00B6 CONNECT R18 R17 R14 + 0x7C3C0400, // 00B7 CALL R15 2 + 0xB8420800, // 00B8 GETNGBL R16 K4 + 0x8C402153, // 00B9 GETMET R16 R16 K83 + 0x58480007, // 00BA LDCONST R18 K7 + 0x5C4C1E00, // 00BB MOVE R19 R15 + 0x88500148, // 00BC GETMBR R20 R0 K72 + 0x8854014C, // 00BD GETMBR R21 R0 K76 + 0x8858014D, // 00BE GETMBR R22 R0 K77 + 0x7C400C00, // 00BF CALL R16 6 + 0x88440146, // 00C0 GETMBR R17 R0 K70 + 0x8C442354, // 00C1 GETMET R17 R17 K84 + 0x7C440200, // 00C2 CALL R17 1 + 0x8C442355, // 00C3 GETMET R17 R17 K85 + 0x5C4C2000, // 00C4 MOVE R19 R16 + 0x7C440400, // 00C5 CALL R17 2 + 0xB8460800, // 00C6 GETNGBL R17 K4 + 0x8C442356, // 00C7 GETMET R17 R17 K86 + 0xB84E0800, // 00C8 GETNGBL R19 K4 + 0x8C4C2757, // 00C9 GETMET R19 R19 K87 + 0x7C4C0200, // 00CA CALL R19 1 + 0x7C440400, // 00CB CALL R17 2 + 0xB8460800, // 00CC GETNGBL R17 K4 + 0x8C442357, // 00CD GETMET R17 R17 K87 + 0x7C440200, // 00CE CALL R17 1 + 0x8C442358, // 00CF GETMET R17 R17 K88 + 0x584C0007, // 00D0 LDCONST R19 K7 + 0x58500007, // 00D1 LDCONST R20 K7 + 0x7C440600, // 00D2 CALL R17 3 + 0x60440013, // 00D3 GETGBL R17 G19 + 0x7C440000, // 00D4 CALL R17 0 + 0x90022811, // 00D5 SETMBR R0 K20 R17 + 0x8C440159, // 00D6 GETMET R17 R0 K89 + 0x5C4C0600, // 00D7 MOVE R19 R3 + 0x7C440400, // 00D8 CALL R17 2 + 0x50440200, // 00D9 LDBOOL R17 1 0 + 0x90027211, // 00DA SETMBR R0 K57 R17 + 0x80000000, // 00DB RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: fix_lv_version +********************************************************************/ +be_local_closure(class_HASPmota_fix_lv_version, /* name */ + be_nested_proto( + 6, /* nstack */ + 0, /* argc */ + 12, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(fix_lv_version), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x58000038, // 0000 LDCONST R0 K56 + 0xA4060000, // 0001 IMPORT R1 K0 + 0x8C080323, // 0002 GETMET R2 R1 K35 + 0xB8120800, // 0003 GETNGBL R4 K4 + 0x5814005A, // 0004 LDCONST R5 K90 + 0x7C080600, // 0005 CALL R2 3 + 0x600C0004, // 0006 GETGBL R3 G4 + 0x5C100400, // 0007 MOVE R4 R2 + 0x7C0C0200, // 0008 CALL R3 1 + 0x200C0711, // 0009 NE R3 R3 K17 + 0x780E0002, // 000A JMPF R3 #000E + 0xB80E0800, // 000B GETNGBL R3 K4 + 0x54120007, // 000C LDINT R4 8 + 0x900EB404, // 000D SETMBR R3 K90 R4 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: do_action +********************************************************************/ +be_local_closure(class_HASPmota_do_action, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(do_action), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0xB80E0800, // 0000 GETNGBL R3 K4 + 0x880C075B, // 0001 GETMBR R3 R3 K91 + 0x200C0403, // 0002 NE R3 R2 R3 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x80000600, // 0004 RET 0 + 0x8C0C0134, // 0005 GETMET R3 R0 K52 + 0x8814035C, // 0006 GETMBR R5 R1 K92 + 0x7C0C0400, // 0007 CALL R3 2 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: register_event +********************************************************************/ +be_local_closure(class_HASPmota_register_event, /* name */ + be_nested_proto( + 13, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(event_dispatch), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x68040000, // 0000 GETUPV R1 U0 + 0x8C040300, // 0001 GETMET R1 R1 K0 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ), + }), + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(register_event), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xA40EBA00, // 0000 IMPORT R3 K93 + 0xA4120000, // 0001 IMPORT R4 K0 + 0x8814010A, // 0002 GETMBR R5 R0 K10 + 0x4C180000, // 0003 LDNIL R6 + 0x1C140A06, // 0004 EQ R5 R5 R6 + 0x78160003, // 0005 JMPF R5 #000A + 0x8C14075E, // 0006 GETMET R5 R3 K94 + 0x841C0000, // 0007 CLOSURE R7 P0 + 0x7C140400, // 0008 CALL R5 2 + 0x90021405, // 0009 SETMBR R0 K10 R5 + 0x88140321, // 000A GETMBR R5 R1 K33 + 0x8C180B5F, // 000B GETMET R6 R5 K95 + 0x8820010A, // 000C GETMBR R8 R0 K10 + 0x5C240400, // 000D MOVE R9 R2 + 0x8C280901, // 000E GETMET R10 R4 K1 + 0x5C300200, // 000F MOVE R12 R1 + 0x7C280400, // 0010 CALL R10 2 + 0x7C180800, // 0011 CALL R6 4 + 0xA0000000, // 0012 CLOSE R0 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse +********************************************************************/ +be_local_closure(class_HASPmota_parse, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(parse), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA40AC000, // 0000 IMPORT R2 K96 + 0x8C0C0561, // 0001 GETMET R3 R2 K97 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x60100004, // 0004 GETGBL R4 G4 + 0x5C140600, // 0005 MOVE R5 R3 + 0x7C100200, // 0006 CALL R4 1 + 0x1C100909, // 0007 EQ R4 R4 K9 + 0x78120009, // 0008 JMPF R4 #0013 + 0x8C100162, // 0009 GETMET R4 R0 K98 + 0x5C180600, // 000A MOVE R6 R3 + 0x7C100400, // 000B CALL R4 2 + 0x8C100163, // 000C GETMET R4 R0 K99 + 0x5C180600, // 000D MOVE R6 R3 + 0x881C0114, // 000E GETMBR R7 R0 K20 + 0x88200113, // 000F GETMBR R8 R0 K19 + 0x941C0E08, // 0010 GETIDX R7 R7 R8 + 0x7C100600, // 0011 CALL R4 3 + 0x70020000, // 0012 JMP #0014 + 0xB006C965, // 0013 RAISE 1 K100 K101 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _load +********************************************************************/ +be_local_closure(class_HASPmota__load, /* name */ + be_nested_proto( + 13, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(_load), + &be_const_str_solidified, + ( &(const binstruction[98]) { /* code */ + 0xA40A7400, // 0000 IMPORT R2 K58 + 0xA40EC000, // 0001 IMPORT R3 K96 + 0x60100011, // 0002 GETGBL R4 G17 + 0x5C140200, // 0003 MOVE R5 R1 + 0x7C100200, // 0004 CALL R4 1 + 0x8C140966, // 0005 GETMET R5 R4 K102 + 0x7C140200, // 0006 CALL R5 1 + 0x8C180967, // 0007 GETMET R6 R4 K103 + 0x7C180200, // 0008 CALL R6 1 + 0x14140A06, // 0009 LT R5 R5 R6 + 0x78160041, // 000A JMPF R5 #004D + 0x8C140968, // 000B GETMET R5 R4 K104 + 0x7C140200, // 000C CALL R5 1 + 0x6018000C, // 000D GETGBL R6 G12 + 0x5C1C0A00, // 000E MOVE R7 R5 + 0x7C180200, // 000F CALL R6 1 + 0x18180D0C, // 0010 LE R6 R6 K12 + 0x741A0002, // 0011 JMPT R6 #0015 + 0x94180B07, // 0012 GETIDX R6 R5 K7 + 0x1C180D69, // 0013 EQ R6 R6 K105 + 0x781A0000, // 0014 JMPF R6 #0016 + 0x7001FFEE, // 0015 JMP #0005 + 0x8C180761, // 0016 GETMET R6 R3 K97 + 0x5C200A00, // 0017 MOVE R8 R5 + 0x7C180400, // 0018 CALL R6 2 + 0x601C0004, // 0019 GETGBL R7 G4 + 0x5C200C00, // 001A MOVE R8 R6 + 0x7C1C0200, // 001B CALL R7 1 + 0x1C1C0F09, // 001C EQ R7 R7 K9 + 0x781E001B, // 001D JMPF R7 #003A + 0xB81EA000, // 001E GETNGBL R7 K80 + 0x8C1C0F6A, // 001F GETMET R7 R7 K106 + 0x54260003, // 0020 LDINT R9 4 + 0x7C1C0400, // 0021 CALL R7 2 + 0x781E0007, // 0022 JMPF R7 #002B + 0xB81EA000, // 0023 GETNGBL R7 K80 + 0x8C1C0F6B, // 0024 GETMET R7 R7 K107 + 0x60240018, // 0025 GETGBL R9 G24 + 0x5828006C, // 0026 LDCONST R10 K108 + 0x5C2C0A00, // 0027 MOVE R11 R5 + 0x7C240400, // 0028 CALL R9 2 + 0x542A0003, // 0029 LDINT R10 4 + 0x7C1C0600, // 002A CALL R7 3 + 0x8C1C0162, // 002B GETMET R7 R0 K98 + 0x5C240C00, // 002C MOVE R9 R6 + 0x7C1C0400, // 002D CALL R7 2 + 0x881C0114, // 002E GETMBR R7 R0 K20 + 0x4C200000, // 002F LDNIL R8 + 0x1C1C0E08, // 0030 EQ R7 R7 R8 + 0x781E0000, // 0031 JMPF R7 #0033 + 0xB006C96D, // 0032 RAISE 1 K100 K109 + 0x8C1C0163, // 0033 GETMET R7 R0 K99 + 0x5C240C00, // 0034 MOVE R9 R6 + 0x88280114, // 0035 GETMBR R10 R0 K20 + 0x882C0112, // 0036 GETMBR R11 R0 K18 + 0x9428140B, // 0037 GETIDX R10 R10 R11 + 0x7C1C0600, // 0038 CALL R7 3 + 0x70020010, // 0039 JMP #004B + 0x601C000C, // 003A GETGBL R7 G12 + 0x8C20056E, // 003B GETMET R8 R2 K110 + 0x5C280A00, // 003C MOVE R10 R5 + 0x582C006F, // 003D LDCONST R11 K111 + 0x58300070, // 003E LDCONST R12 K112 + 0x7C200800, // 003F CALL R8 4 + 0x7C1C0200, // 0040 CALL R7 1 + 0x241C0F07, // 0041 GT R7 R7 K7 + 0x781E0007, // 0042 JMPF R7 #004B + 0xB81EA000, // 0043 GETNGBL R7 K80 + 0x8C1C0F6B, // 0044 GETMET R7 R7 K107 + 0x60240018, // 0045 GETGBL R9 G24 + 0x58280071, // 0046 LDCONST R10 K113 + 0x5C2C0A00, // 0047 MOVE R11 R5 + 0x7C240400, // 0048 CALL R9 2 + 0x5828000D, // 0049 LDCONST R10 K13 + 0x7C1C0600, // 004A CALL R7 3 + 0x4C180000, // 004B LDNIL R6 + 0x7001FFB7, // 004C JMP #0005 + 0x8C140972, // 004D GETMET R5 R4 K114 + 0x7C140200, // 004E CALL R5 1 + 0x8C14010B, // 004F GETMET R5 R0 K11 + 0x4C1C0000, // 0050 LDNIL R7 + 0x7C140400, // 0051 CALL R5 2 + 0x6018000C, // 0052 GETGBL R6 G12 + 0x5C1C0A00, // 0053 MOVE R7 R5 + 0x7C180200, // 0054 CALL R6 1 + 0x1C180D07, // 0055 EQ R6 R6 K7 + 0x781A0000, // 0056 JMPF R6 #0058 + 0xB006C973, // 0057 RAISE 1 K100 K115 + 0x94180B07, // 0058 GETIDX R6 R5 K7 + 0x90022606, // 0059 SETMBR R0 K19 R6 + 0x88180114, // 005A GETMBR R6 R0 K20 + 0x881C0113, // 005B GETMBR R7 R0 K19 + 0x94180C07, // 005C GETIDX R6 R6 R7 + 0x8C180D74, // 005D GETMET R6 R6 K116 + 0x58200007, // 005E LDCONST R8 K7 + 0x58240007, // 005F LDCONST R9 K7 + 0x7C180600, // 0060 CALL R6 3 + 0x80000000, // 0061 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(class_HASPmota_init, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x8C040175, // 0000 GETMET R1 R0 K117 + 0x7C040200, // 0001 CALL R1 1 + 0xA406EC00, // 0002 IMPORT R1 K118 + 0x8C080378, // 0003 GETMET R2 R1 K120 + 0x58100079, // 0004 LDCONST R4 K121 + 0x7C080400, // 0005 CALL R2 2 + 0x9002EE02, // 0006 SETMBR R0 K119 R2 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: pages_list_sorted +********************************************************************/ +be_local_closure(class_HASPmota_pages_list_sorted, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(pages_list_sorted), + &be_const_str_solidified, + ( &(const binstruction[47]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x1C0C0307, // 0002 EQ R3 R1 K7 + 0x780E0000, // 0003 JMPF R3 #0005 + 0x88040113, // 0004 GETMBR R1 R0 K19 + 0x600C0010, // 0005 GETGBL R3 G16 + 0x88100114, // 0006 GETMBR R4 R0 K20 + 0x8C10092B, // 0007 GETMET R4 R4 K43 + 0x7C100200, // 0008 CALL R4 1 + 0x7C0C0200, // 0009 CALL R3 1 + 0xA8020007, // 000A EXBLK 0 #0013 + 0x5C100600, // 000B MOVE R4 R3 + 0x7C100000, // 000C CALL R4 0 + 0x20140907, // 000D NE R5 R4 K7 + 0x78160002, // 000E JMPF R5 #0012 + 0x8C14057A, // 000F GETMET R5 R2 K122 + 0x5C1C0800, // 0010 MOVE R7 R4 + 0x7C140400, // 0011 CALL R5 2 + 0x7001FFF7, // 0012 JMP #000B + 0x580C002C, // 0013 LDCONST R3 K44 + 0xAC0C0200, // 0014 CATCH R3 1 0 + 0xB0080000, // 0015 RAISE 2 R0 R0 + 0x8C0C017B, // 0016 GETMET R3 R0 K123 + 0x5C140400, // 0017 MOVE R5 R2 + 0x7C0C0400, // 0018 CALL R3 2 + 0x5C080600, // 0019 MOVE R2 R3 + 0x4C0C0000, // 001A LDNIL R3 + 0x1C0C0203, // 001B EQ R3 R1 R3 + 0x780E0000, // 001C JMPF R3 #001E + 0x80040400, // 001D RET 1 R2 + 0x600C000C, // 001E GETGBL R3 G12 + 0x5C100400, // 001F MOVE R4 R2 + 0x7C0C0200, // 0020 CALL R3 1 + 0x00080402, // 0021 ADD R2 R2 R2 + 0x8C10050E, // 0022 GETMET R4 R2 K14 + 0x5C180200, // 0023 MOVE R6 R1 + 0x7C100400, // 0024 CALL R4 2 + 0x4C140000, // 0025 LDNIL R5 + 0x1C140805, // 0026 EQ R5 R4 R5 + 0x78160001, // 0027 JMPF R5 #002A + 0x4C140000, // 0028 LDNIL R5 + 0x80040A00, // 0029 RET 1 R5 + 0x00140803, // 002A ADD R5 R4 R3 + 0x04140B0C, // 002B SUB R5 R5 K12 + 0x40140805, // 002C CONNECT R5 R4 R5 + 0x94080405, // 002D GETIDX R2 R2 R5 + 0x80040400, // 002E RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_page_cur_parsing +********************************************************************/ +be_local_closure(class_HASPmota_get_page_cur_parsing, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_HASPmota, /* shared constants */ + be_str_weak(get_page_cur_parsing), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040114, // 0000 GETMBR R1 R0 K20 + 0x88080112, // 0001 GETMBR R2 R0 K18 + 0x94040202, // 0002 GETIDX R1 R1 R2 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: page_show ********************************************************************/ @@ -12514,26 +13531,26 @@ be_local_closure(class_HASPmota_page_show, /* name */ be_str_weak(page_show), &be_const_str_solidified, ( &(const binstruction[109]) { /* code */ - 0xA4123800, // 0000 IMPORT R4 K28 + 0xA412EC00, // 0000 IMPORT R4 K118 0x84140000, // 0001 CLOSURE R5 P0 0x4C180000, // 0002 LDNIL R6 - 0x8C1C011D, // 0003 GETMET R7 R0 K29 + 0x8C1C0133, // 0003 GETMET R7 R0 K51 0x7C1C0200, // 0004 CALL R7 1 - 0x8C20011E, // 0005 GETMET R8 R0 K30 - 0x8828011F, // 0006 GETMBR R10 R0 K31 + 0x8C20010B, // 0005 GETMET R8 R0 K11 + 0x88280113, // 0006 GETMBR R10 R0 K19 0x7C200400, // 0007 CALL R8 2 0x6024000C, // 0008 GETGBL R9 G12 0x5C281000, // 0009 MOVE R10 R8 0x7C240200, // 000A CALL R9 1 - 0x18241320, // 000B LE R9 R9 K32 + 0x1824130C, // 000B LE R9 R9 K12 0x78260001, // 000C JMPF R9 #000F 0x4C240000, // 000D LDNIL R9 0x80041200, // 000E RET 1 R9 - 0x1C240321, // 000F EQ R9 R1 K33 + 0x1C240319, // 000F EQ R9 R1 K25 0x78260009, // 0010 JMPF R9 #001B 0x5C240A00, // 0011 MOVE R9 R5 0x60280009, // 0012 GETGBL R10 G9 - 0x882C0F21, // 0013 GETMBR R11 R7 K33 + 0x882C0F19, // 0013 GETMBR R11 R7 K25 0x7C280200, // 0014 CALL R10 1 0x542DFFFE, // 0015 LDINT R11 -1 0x942C100B, // 0016 GETIDX R11 R8 R11 @@ -12541,66 +13558,66 @@ be_local_closure(class_HASPmota_page_show, /* name */ 0x7C240600, // 0018 CALL R9 3 0x5C181200, // 0019 MOVE R6 R9 0x70020041, // 001A JMP #005D - 0x1C240322, // 001B EQ R9 R1 K34 + 0x1C24031A, // 001B EQ R9 R1 K26 0x78260008, // 001C JMPF R9 #0026 0x5C240A00, // 001D MOVE R9 R5 0x60280009, // 001E GETGBL R10 G9 - 0x882C0F22, // 001F GETMBR R11 R7 K34 + 0x882C0F1A, // 001F GETMBR R11 R7 K26 0x7C280200, // 0020 CALL R10 1 - 0x942C1120, // 0021 GETIDX R11 R8 K32 + 0x942C110C, // 0021 GETIDX R11 R8 K12 0x5C301000, // 0022 MOVE R12 R8 0x7C240600, // 0023 CALL R9 3 0x5C181200, // 0024 MOVE R6 R9 0x70020036, // 0025 JMP #005D - 0x1C240323, // 0026 EQ R9 R1 K35 + 0x1C24031B, // 0026 EQ R9 R1 K27 0x7826000B, // 0027 JMPF R9 #0034 0x5C240A00, // 0028 MOVE R9 R5 0x60280009, // 0029 GETGBL R10 G9 - 0x882C0F23, // 002A GETMBR R11 R7 K35 + 0x882C0F1B, // 002A GETMBR R11 R7 K27 0x7C280200, // 002B CALL R10 1 - 0x8C2C011E, // 002C GETMET R11 R0 K30 + 0x8C2C010B, // 002C GETMET R11 R0 K11 0x4C340000, // 002D LDNIL R13 0x7C2C0400, // 002E CALL R11 2 - 0x942C1706, // 002F GETIDX R11 R11 K6 + 0x942C1707, // 002F GETIDX R11 R11 K7 0x5C301000, // 0030 MOVE R12 R8 0x7C240600, // 0031 CALL R9 3 0x5C181200, // 0032 MOVE R6 R9 0x70020028, // 0033 JMP #005D - 0x1C240324, // 0034 EQ R9 R1 K36 + 0x1C240335, // 0034 EQ R9 R1 K53 0x78260017, // 0035 JMPF R9 #004E 0x5C240A00, // 0036 MOVE R9 R5 0x60280009, // 0037 GETGBL R10 G9 - 0x882C0F23, // 0038 GETMBR R11 R7 K35 + 0x882C0F1B, // 0038 GETMBR R11 R7 K27 0x7C280200, // 0039 CALL R10 1 - 0x8C2C011E, // 003A GETMET R11 R0 K30 + 0x8C2C010B, // 003A GETMET R11 R0 K11 0x4C340000, // 003B LDNIL R13 0x7C2C0400, // 003C CALL R11 2 - 0x942C1706, // 003D GETIDX R11 R11 K6 + 0x942C1707, // 003D GETIDX R11 R11 K7 0x5C301000, // 003E MOVE R12 R8 0x7C240600, // 003F CALL R9 3 0x5C181200, // 0040 MOVE R6 R9 - 0x8C240F03, // 0041 GETMET R9 R7 K3 + 0x8C240F17, // 0041 GETMET R9 R7 K23 0x7C240200, // 0042 CALL R9 1 0x1C240C09, // 0043 EQ R9 R6 R9 0x78260007, // 0044 JMPF R9 #004D 0x5C240A00, // 0045 MOVE R9 R5 0x60280009, // 0046 GETGBL R10 G9 - 0x882C0F22, // 0047 GETMBR R11 R7 K34 + 0x882C0F1A, // 0047 GETMBR R11 R7 K26 0x7C280200, // 0048 CALL R10 1 - 0x942C1120, // 0049 GETIDX R11 R8 K32 + 0x942C110C, // 0049 GETIDX R11 R8 K12 0x5C301000, // 004A MOVE R12 R8 0x7C240600, // 004B CALL R9 3 0x5C181200, // 004C MOVE R6 R9 0x7002000E, // 004D JMP #005D - 0x8C240925, // 004E GETMET R9 R4 K37 - 0x882C0126, // 004F GETMBR R11 R0 K38 + 0x8C24097C, // 004E GETMET R9 R4 K124 + 0x882C0177, // 004F GETMBR R11 R0 K119 0x5C300200, // 0050 MOVE R12 R1 0x7C240600, // 0051 CALL R9 3 0x78260009, // 0052 JMPF R9 #005D 0x5C240A00, // 0053 MOVE R9 R5 0x60280009, // 0054 GETGBL R10 G9 0x542DFFFE, // 0055 LDINT R11 -1 - 0x402E400B, // 0056 CONNECT R11 K32 R11 + 0x402E180B, // 0056 CONNECT R11 K12 R11 0x942C020B, // 0057 GETIDX R11 R1 R11 0x7C280200, // 0058 CALL R10 1 0x4C2C0000, // 0059 LDNIL R11 @@ -12610,14 +13627,14 @@ be_local_closure(class_HASPmota_page_show, /* name */ 0x4C240000, // 005D LDNIL R9 0x20240C09, // 005E NE R9 R6 R9 0x7826000B, // 005F JMPF R9 #006C - 0x24240D06, // 0060 GT R9 R6 K6 + 0x24240D07, // 0060 GT R9 R6 K7 0x78260009, // 0061 JMPF R9 #006C - 0x88240127, // 0062 GETMBR R9 R0 K39 + 0x88240114, // 0062 GETMBR R9 R0 K20 0x94241206, // 0063 GETIDX R9 R9 R6 0x4C280000, // 0064 LDNIL R10 0x2028120A, // 0065 NE R10 R9 R10 0x782A0003, // 0066 JMPF R10 #006B - 0x8C281328, // 0067 GETMET R10 R9 K40 + 0x8C281374, // 0067 GETMET R10 R9 K116 0x5C300400, // 0068 MOVE R12 R2 0x5C340600, // 0069 MOVE R13 R3 0x7C280600, // 006A CALL R10 3 @@ -12629,1007 +13646,78 @@ be_local_closure(class_HASPmota_page_show, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: _remove_page -********************************************************************/ -be_local_closure(class_HASPmota__remove_page, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(_remove_page), - &be_const_str_solidified, - ( &(const binstruction[37]) { /* code */ - 0x8C08011D, // 0000 GETMET R2 R0 K29 - 0x7C080200, // 0001 CALL R2 1 - 0x8C080503, // 0002 GETMET R2 R2 K3 - 0x7C080200, // 0003 CALL R2 1 - 0x1C0C0202, // 0004 EQ R3 R1 R2 - 0x780E0008, // 0005 JMPF R3 #000F - 0x8C0C0129, // 0006 GETMET R3 R0 K41 - 0x58140024, // 0007 LDCONST R5 K36 - 0x58180006, // 0008 LDCONST R6 K6 - 0x581C0006, // 0009 LDCONST R7 K6 - 0x7C0C0800, // 000A CALL R3 4 - 0x4C100000, // 000B LDNIL R4 - 0x1C100604, // 000C EQ R4 R3 R4 - 0x78120000, // 000D JMPF R4 #000F - 0x80000800, // 000E RET 0 - 0x880C012A, // 000F GETMBR R3 R0 K42 - 0x1C0C0601, // 0010 EQ R3 R3 R1 - 0x780E0001, // 0011 JMPF R3 #0014 - 0x880C011F, // 0012 GETMBR R3 R0 K31 - 0x90025403, // 0013 SETMBR R0 K42 R3 - 0x880C0127, // 0014 GETMBR R3 R0 K39 - 0x8C0C072B, // 0015 GETMET R3 R3 K43 - 0x5C140200, // 0016 MOVE R5 R1 - 0x7C0C0400, // 0017 CALL R3 2 - 0x780E0003, // 0018 JMPF R3 #001D - 0x880C0127, // 0019 GETMBR R3 R0 K39 - 0x8C0C072C, // 001A GETMET R3 R3 K44 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x600C0018, // 001D GETGBL R3 G24 - 0x5810002D, // 001E LDCONST R4 K45 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0xB8120000, // 0021 GETNGBL R4 K0 - 0x4C140000, // 0022 LDNIL R5 - 0x90100605, // 0023 SETMBR R4 R3 R5 - 0x80000000, // 0024 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_page_cur_parsing -********************************************************************/ -be_local_closure(class_HASPmota_get_page_cur_parsing, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(get_page_cur_parsing), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040127, // 0000 GETMBR R1 R0 K39 - 0x8808012A, // 0001 GETMBR R2 R0 K42 - 0x94040202, // 0002 GETIDX R1 R1 R2 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse -********************************************************************/ -be_local_closure(class_HASPmota_parse, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(parse), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0xA40A5C00, // 0000 IMPORT R2 K46 - 0x8C0C052F, // 0001 GETMET R3 R2 K47 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x60100004, // 0004 GETGBL R4 G4 - 0x5C140600, // 0005 MOVE R5 R3 - 0x7C100200, // 0006 CALL R4 1 - 0x1C100930, // 0007 EQ R4 R4 K48 - 0x78120009, // 0008 JMPF R4 #0013 - 0x8C100131, // 0009 GETMET R4 R0 K49 - 0x5C180600, // 000A MOVE R6 R3 - 0x7C100400, // 000B CALL R4 2 - 0x8C100132, // 000C GETMET R4 R0 K50 - 0x5C180600, // 000D MOVE R6 R3 - 0x881C0127, // 000E GETMBR R7 R0 K39 - 0x8820011F, // 000F GETMBR R8 R0 K31 - 0x941C0E08, // 0010 GETIDX R7 R7 R8 - 0x7C100600, // 0011 CALL R4 3 - 0x70020000, // 0012 JMP #0014 - 0xB0066734, // 0013 RAISE 1 K51 K52 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _load -********************************************************************/ -be_local_closure(class_HASPmota__load, /* name */ - be_nested_proto( - 13, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(_load), - &be_const_str_solidified, - ( &(const binstruction[98]) { /* code */ - 0xA40A6A00, // 0000 IMPORT R2 K53 - 0xA40E5C00, // 0001 IMPORT R3 K46 - 0x60100011, // 0002 GETGBL R4 G17 - 0x5C140200, // 0003 MOVE R5 R1 - 0x7C100200, // 0004 CALL R4 1 - 0x8C140936, // 0005 GETMET R5 R4 K54 - 0x7C140200, // 0006 CALL R5 1 - 0x8C180937, // 0007 GETMET R6 R4 K55 - 0x7C180200, // 0008 CALL R6 1 - 0x14140A06, // 0009 LT R5 R5 R6 - 0x78160041, // 000A JMPF R5 #004D - 0x8C140938, // 000B GETMET R5 R4 K56 - 0x7C140200, // 000C CALL R5 1 - 0x6018000C, // 000D GETGBL R6 G12 - 0x5C1C0A00, // 000E MOVE R7 R5 - 0x7C180200, // 000F CALL R6 1 - 0x18180D20, // 0010 LE R6 R6 K32 - 0x741A0002, // 0011 JMPT R6 #0015 - 0x94180B06, // 0012 GETIDX R6 R5 K6 - 0x1C180D39, // 0013 EQ R6 R6 K57 - 0x781A0000, // 0014 JMPF R6 #0016 - 0x7001FFEE, // 0015 JMP #0005 - 0x8C18072F, // 0016 GETMET R6 R3 K47 - 0x5C200A00, // 0017 MOVE R8 R5 - 0x7C180400, // 0018 CALL R6 2 - 0x601C0004, // 0019 GETGBL R7 G4 - 0x5C200C00, // 001A MOVE R8 R6 - 0x7C1C0200, // 001B CALL R7 1 - 0x1C1C0F30, // 001C EQ R7 R7 K48 - 0x781E001B, // 001D JMPF R7 #003A - 0xB81E7400, // 001E GETNGBL R7 K58 - 0x8C1C0F3B, // 001F GETMET R7 R7 K59 - 0x54260003, // 0020 LDINT R9 4 - 0x7C1C0400, // 0021 CALL R7 2 - 0x781E0007, // 0022 JMPF R7 #002B - 0xB81E7400, // 0023 GETNGBL R7 K58 - 0x8C1C0F3C, // 0024 GETMET R7 R7 K60 - 0x60240018, // 0025 GETGBL R9 G24 - 0x5828003D, // 0026 LDCONST R10 K61 - 0x5C2C0A00, // 0027 MOVE R11 R5 - 0x7C240400, // 0028 CALL R9 2 - 0x542A0003, // 0029 LDINT R10 4 - 0x7C1C0600, // 002A CALL R7 3 - 0x8C1C0131, // 002B GETMET R7 R0 K49 - 0x5C240C00, // 002C MOVE R9 R6 - 0x7C1C0400, // 002D CALL R7 2 - 0x881C0127, // 002E GETMBR R7 R0 K39 - 0x4C200000, // 002F LDNIL R8 - 0x1C1C0E08, // 0030 EQ R7 R7 R8 - 0x781E0000, // 0031 JMPF R7 #0033 - 0xB006673E, // 0032 RAISE 1 K51 K62 - 0x8C1C0132, // 0033 GETMET R7 R0 K50 - 0x5C240C00, // 0034 MOVE R9 R6 - 0x88280127, // 0035 GETMBR R10 R0 K39 - 0x882C012A, // 0036 GETMBR R11 R0 K42 - 0x9428140B, // 0037 GETIDX R10 R10 R11 - 0x7C1C0600, // 0038 CALL R7 3 - 0x70020010, // 0039 JMP #004B - 0x601C000C, // 003A GETGBL R7 G12 - 0x8C20053F, // 003B GETMET R8 R2 K63 - 0x5C280A00, // 003C MOVE R10 R5 - 0x582C0040, // 003D LDCONST R11 K64 - 0x58300041, // 003E LDCONST R12 K65 - 0x7C200800, // 003F CALL R8 4 - 0x7C1C0200, // 0040 CALL R7 1 - 0x241C0F06, // 0041 GT R7 R7 K6 - 0x781E0007, // 0042 JMPF R7 #004B - 0xB81E7400, // 0043 GETNGBL R7 K58 - 0x8C1C0F3C, // 0044 GETMET R7 R7 K60 - 0x60240018, // 0045 GETGBL R9 G24 - 0x58280042, // 0046 LDCONST R10 K66 - 0x5C2C0A00, // 0047 MOVE R11 R5 - 0x7C240400, // 0048 CALL R9 2 - 0x58280043, // 0049 LDCONST R10 K67 - 0x7C1C0600, // 004A CALL R7 3 - 0x4C180000, // 004B LDNIL R6 - 0x7001FFB7, // 004C JMP #0005 - 0x8C140944, // 004D GETMET R5 R4 K68 - 0x7C140200, // 004E CALL R5 1 - 0x8C14011E, // 004F GETMET R5 R0 K30 - 0x4C1C0000, // 0050 LDNIL R7 - 0x7C140400, // 0051 CALL R5 2 - 0x6018000C, // 0052 GETGBL R6 G12 - 0x5C1C0A00, // 0053 MOVE R7 R5 - 0x7C180200, // 0054 CALL R6 1 - 0x1C180D06, // 0055 EQ R6 R6 K6 - 0x781A0000, // 0056 JMPF R6 #0058 - 0xB0066745, // 0057 RAISE 1 K51 K69 - 0x94180B06, // 0058 GETIDX R6 R5 K6 - 0x90023E06, // 0059 SETMBR R0 K31 R6 - 0x88180127, // 005A GETMBR R6 R0 K39 - 0x881C011F, // 005B GETMBR R7 R0 K31 - 0x94180C07, // 005C GETIDX R6 R6 R7 - 0x8C180D28, // 005D GETMET R6 R6 K40 - 0x58200006, // 005E LDCONST R8 K6 - 0x58240006, // 005F LDCONST R9 K6 - 0x7C180600, // 0060 CALL R6 3 - 0x80000000, // 0061 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: do_action -********************************************************************/ -be_local_closure(class_HASPmota_do_action, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(do_action), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0xB80E8C00, // 0000 GETNGBL R3 K70 - 0x880C0747, // 0001 GETMBR R3 R3 K71 - 0x200C0403, // 0002 NE R3 R2 R3 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x80000600, // 0004 RET 0 - 0x8C0C0129, // 0005 GETMET R3 R0 K41 - 0x88140348, // 0006 GETMBR R5 R1 K72 - 0x7C0C0400, // 0007 CALL R3 2 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_page_cur -********************************************************************/ -be_local_closure(class_HASPmota_get_page_cur, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(get_page_cur), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040127, // 0000 GETMBR R1 R0 K39 - 0x8808011F, // 0001 GETMBR R2 R0 K31 - 0x94040202, // 0002 GETIDX R1 R1 R2 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_HASPmota_init, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x8C040149, // 0000 GETMET R1 R0 K73 - 0x7C040200, // 0001 CALL R1 1 - 0xA4063800, // 0002 IMPORT R1 K28 - 0x8C08034A, // 0003 GETMET R2 R1 K74 - 0x5810004B, // 0004 LDCONST R4 K75 - 0x7C080400, // 0005 CALL R2 2 - 0x90024C02, // 0006 SETMBR R0 K38 R2 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_page -********************************************************************/ -be_local_closure(class_HASPmota_parse_page, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(parse_page), - &be_const_str_solidified, - ( &(const binstruction[59]) { /* code */ - 0x8C08034C, // 0000 GETMET R2 R1 K76 - 0x5810004D, // 0001 LDCONST R4 K77 - 0x7C080400, // 0002 CALL R2 2 - 0x780A0035, // 0003 JMPF R2 #003A - 0x60080004, // 0004 GETGBL R2 G4 - 0x940C034D, // 0005 GETIDX R3 R1 K77 - 0x7C080200, // 0006 CALL R2 1 - 0x1C08054E, // 0007 EQ R2 R2 K78 - 0x780A0030, // 0008 JMPF R2 #003A - 0x60080009, // 0009 GETGBL R2 G9 - 0x940C034D, // 000A GETIDX R3 R1 K77 - 0x7C080200, // 000B CALL R2 1 - 0x90025402, // 000C SETMBR R0 K42 R2 - 0x880C011F, // 000D GETMBR R3 R0 K31 - 0x4C100000, // 000E LDNIL R4 - 0x1C0C0604, // 000F EQ R3 R3 R4 - 0x780E0000, // 0010 JMPF R3 #0012 - 0x90023E02, // 0011 SETMBR R0 K31 R2 - 0x880C0127, // 0012 GETMBR R3 R0 K39 - 0x8C0C072B, // 0013 GETMET R3 R3 K43 - 0x5C140400, // 0014 MOVE R5 R2 - 0x7C0C0400, // 0015 CALL R3 2 - 0x740E0006, // 0016 JMPT R3 #001E - 0x880C014F, // 0017 GETMBR R3 R0 K79 - 0x88100127, // 0018 GETMBR R4 R0 K39 - 0x5C140600, // 0019 MOVE R5 R3 - 0x5C180400, // 001A MOVE R6 R2 - 0x5C1C0000, // 001B MOVE R7 R0 - 0x7C140400, // 001C CALL R5 2 - 0x98100405, // 001D SETIDX R4 R2 R5 - 0x8C0C0302, // 001E GETMET R3 R1 K2 - 0x58140003, // 001F LDCONST R5 K3 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C0706, // 0021 EQ R3 R3 K6 - 0x780E0016, // 0022 JMPF R3 #003A - 0x8C0C0105, // 0023 GETMET R3 R0 K5 - 0x7C0C0200, // 0024 CALL R3 1 - 0x60100009, // 0025 GETGBL R4 G9 - 0x8C140302, // 0026 GETMET R5 R1 K2 - 0x581C0021, // 0027 LDCONST R7 K33 - 0x4C200000, // 0028 LDNIL R8 - 0x7C140600, // 0029 CALL R5 3 - 0x7C100200, // 002A CALL R4 1 - 0x900E4204, // 002B SETMBR R3 K33 R4 - 0x60100009, // 002C GETGBL R4 G9 - 0x8C140302, // 002D GETMET R5 R1 K2 - 0x581C0022, // 002E LDCONST R7 K34 - 0x4C200000, // 002F LDNIL R8 - 0x7C140600, // 0030 CALL R5 3 - 0x7C100200, // 0031 CALL R4 1 - 0x900E4404, // 0032 SETMBR R3 K34 R4 - 0x60100009, // 0033 GETGBL R4 G9 - 0x8C140302, // 0034 GETMET R5 R1 K2 - 0x581C0023, // 0035 LDCONST R7 K35 - 0x4C200000, // 0036 LDNIL R8 - 0x7C140600, // 0037 CALL R5 3 - 0x7C100200, // 0038 CALL R4 1 - 0x900E4604, // 0039 SETMBR R3 K35 R4 - 0x80000000, // 003A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: start -********************************************************************/ -be_local_closure(class_HASPmota_start, /* name */ - be_nested_proto( - 13, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(start), - &be_const_str_solidified, - ( &(const binstruction[122]) { /* code */ - 0x880C0150, // 0000 GETMBR R3 R0 K80 - 0x780E0000, // 0001 JMPF R3 #0003 - 0x80000600, // 0002 RET 0 - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x4C100000, // 0004 LDNIL R4 - 0x60140004, // 0005 GETGBL R5 G4 - 0x5C180200, // 0006 MOVE R6 R1 - 0x7C140200, // 0007 CALL R5 1 - 0x1C140B35, // 0008 EQ R5 R5 K53 - 0x78160001, // 0009 JMPF R5 #000C - 0x5C100200, // 000A MOVE R4 R1 - 0x7002000B, // 000B JMP #0018 - 0x60140004, // 000C GETGBL R5 G4 - 0x5C180400, // 000D MOVE R6 R2 - 0x7C140200, // 000E CALL R5 1 - 0x1C140B35, // 000F EQ R5 R5 K53 - 0x78160005, // 0010 JMPF R5 #0017 - 0x5C100400, // 0011 MOVE R4 R2 - 0x60140017, // 0012 GETGBL R5 G23 - 0x5C180200, // 0013 MOVE R6 R1 - 0x7C140200, // 0014 CALL R5 1 - 0x5C0C0A00, // 0015 MOVE R3 R5 - 0x70020000, // 0016 JMP #0018 - 0x88100151, // 0017 GETMBR R4 R0 K81 - 0xA416A400, // 0018 IMPORT R5 K82 - 0x8C180B53, // 0019 GETMET R6 R5 K83 - 0x5C200800, // 001A MOVE R8 R4 - 0x7C180400, // 001B CALL R6 2 - 0x741A0002, // 001C JMPT R6 #0020 - 0x001AA804, // 001D ADD R6 K84 R4 - 0x00180D55, // 001E ADD R6 R6 K85 - 0xB006AC06, // 001F RAISE 1 K86 R6 - 0xB81A8C00, // 0020 GETNGBL R6 K70 - 0x8C180D57, // 0021 GETMET R6 R6 K87 - 0x7C180200, // 0022 CALL R6 1 - 0xB81A8C00, // 0023 GETNGBL R6 K70 - 0x8C180D59, // 0024 GETMET R6 R6 K89 - 0x7C180200, // 0025 CALL R6 1 - 0x9002B006, // 0026 SETMBR R0 K88 R6 - 0xB81A8C00, // 0027 GETNGBL R6 K70 - 0x8C180D5B, // 0028 GETMET R6 R6 K91 - 0x7C180200, // 0029 CALL R6 1 - 0x9002B406, // 002A SETMBR R0 K90 R6 - 0xB81A8C00, // 002B GETNGBL R6 K70 - 0x8C180D5D, // 002C GETMET R6 R6 K93 - 0x7C180200, // 002D CALL R6 1 - 0x9002B806, // 002E SETMBR R0 K92 R6 - 0xA8020007, // 002F EXBLK 0 #0038 - 0xB81A8C00, // 0030 GETNGBL R6 K70 - 0x8C180D5F, // 0031 GETMET R6 R6 K95 - 0x58200060, // 0032 LDCONST R8 K96 - 0x5426000F, // 0033 LDINT R9 16 - 0x7C180600, // 0034 CALL R6 3 - 0x9002BC06, // 0035 SETMBR R0 K94 R6 - 0xA8040001, // 0036 EXBLK 1 1 - 0x70020009, // 0037 JMP #0042 - 0xAC180000, // 0038 CATCH R6 0 0 - 0x70020006, // 0039 JMP #0041 - 0xB81A8C00, // 003A GETNGBL R6 K70 - 0x8C180D5F, // 003B GETMET R6 R6 K95 - 0x58200061, // 003C LDCONST R8 K97 - 0x5426000D, // 003D LDINT R9 14 - 0x7C180600, // 003E CALL R6 3 - 0x9002BC06, // 003F SETMBR R0 K94 R6 - 0x70020000, // 0040 JMP #0042 - 0xB0080000, // 0041 RAISE 2 R0 R0 - 0xB81A8C00, // 0042 GETNGBL R6 K70 - 0x8C180D62, // 0043 GETMET R6 R6 K98 - 0x58200006, // 0044 LDCONST R8 K6 - 0xB8268C00, // 0045 GETNGBL R9 K70 - 0x8C241363, // 0046 GETMET R9 R9 K99 - 0x582C0064, // 0047 LDCONST R11 K100 - 0x7C240400, // 0048 CALL R9 2 - 0xB82A8C00, // 0049 GETNGBL R10 K70 - 0x8C281563, // 004A GETMET R10 R10 K99 - 0x58300065, // 004B LDCONST R12 K101 - 0x7C280400, // 004C CALL R10 2 - 0x5C2C0600, // 004D MOVE R11 R3 - 0x8830015E, // 004E GETMBR R12 R0 K94 - 0x7C180C00, // 004F CALL R6 6 - 0x881C015C, // 0050 GETMBR R7 R0 K92 - 0x8C1C0F66, // 0051 GETMET R7 R7 K102 - 0x7C1C0200, // 0052 CALL R7 1 - 0x8C1C0F67, // 0053 GETMET R7 R7 K103 - 0x5C240C00, // 0054 MOVE R9 R6 - 0x7C1C0400, // 0055 CALL R7 2 - 0x881C015C, // 0056 GETMBR R7 R0 K92 - 0x8C1C0F68, // 0057 GETMET R7 R7 K104 - 0x780E0004, // 0058 JMPF R3 #005E - 0xB8268C00, // 0059 GETNGBL R9 K70 - 0x8C241363, // 005A GETMET R9 R9 K99 - 0x582C0006, // 005B LDCONST R11 K6 - 0x7C240400, // 005C CALL R9 2 - 0x70020003, // 005D JMP #0062 - 0xB8268C00, // 005E GETNGBL R9 K70 - 0x8C241363, // 005F GETMET R9 R9 K99 - 0x582C0069, // 0060 LDCONST R11 K105 - 0x7C240400, // 0061 CALL R9 2 - 0x58280006, // 0062 LDCONST R10 K6 - 0x7C1C0600, // 0063 CALL R7 3 - 0xB81E8C00, // 0064 GETNGBL R7 K70 - 0x8C1C0F6A, // 0065 GETMET R7 R7 K106 - 0xB8268C00, // 0066 GETNGBL R9 K70 - 0x8C24136B, // 0067 GETMET R9 R9 K107 - 0x7C240200, // 0068 CALL R9 1 - 0x7C1C0400, // 0069 CALL R7 2 - 0xB81E8C00, // 006A GETNGBL R7 K70 - 0x8C1C0F6B, // 006B GETMET R7 R7 K107 - 0x7C1C0200, // 006C CALL R7 1 - 0x8C1C0F6C, // 006D GETMET R7 R7 K108 - 0x58240006, // 006E LDCONST R9 K6 - 0x58280006, // 006F LDCONST R10 K6 - 0x7C1C0600, // 0070 CALL R7 3 - 0x601C0013, // 0071 GETGBL R7 G19 - 0x7C1C0000, // 0072 CALL R7 0 - 0x90024E07, // 0073 SETMBR R0 K39 R7 - 0x8C1C016D, // 0074 GETMET R7 R0 K109 - 0x5C240800, // 0075 MOVE R9 R4 - 0x7C1C0400, // 0076 CALL R7 2 - 0x501C0200, // 0077 LDBOOL R7 1 0 - 0x9002A007, // 0078 SETMBR R0 K80 R7 - 0x80000000, // 0079 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_pages -********************************************************************/ -be_local_closure(class_HASPmota_get_pages, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(get_pages), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x8C04011E, // 0000 GETMET R1 R0 K30 - 0x4C0C0000, // 0001 LDNIL R3 - 0x7C040400, // 0002 CALL R1 2 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sort -********************************************************************/ -be_local_closure(class_HASPmota_sort, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 12, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(sort), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x5804006E, // 0000 LDCONST R1 K110 - 0x58080006, // 0001 LDCONST R2 K6 - 0x600C000C, // 0002 GETGBL R3 G12 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C0C0200, // 0004 CALL R3 1 - 0x140C0403, // 0005 LT R3 R2 R3 - 0x780E000F, // 0006 JMPF R3 #0017 - 0x940C0002, // 0007 GETIDX R3 R0 R2 - 0x5C100400, // 0008 MOVE R4 R2 - 0x24140906, // 0009 GT R5 R4 K6 - 0x78160008, // 000A JMPF R5 #0014 - 0x04140920, // 000B SUB R5 R4 K32 - 0x94140005, // 000C GETIDX R5 R0 R5 - 0x24140A03, // 000D GT R5 R5 R3 - 0x78160004, // 000E JMPF R5 #0014 - 0x04140920, // 000F SUB R5 R4 K32 - 0x94140005, // 0010 GETIDX R5 R0 R5 - 0x98000805, // 0011 SETIDX R0 R4 R5 - 0x04100920, // 0012 SUB R4 R4 K32 - 0x7001FFF4, // 0013 JMP #0009 - 0x98000803, // 0014 SETIDX R0 R4 R3 - 0x00080520, // 0015 ADD R2 R2 K32 - 0x7001FFEA, // 0016 JMP #0002 - 0x80040000, // 0017 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_dispatch -********************************************************************/ -be_local_closure(class_HASPmota_event_dispatch, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(event_dispatch), - &be_const_str_solidified, - ( &(const binstruction[34]) { /* code */ - 0xA40A0200, // 0000 IMPORT R2 K1 - 0x8C0C056F, // 0001 GETMET R3 R2 K111 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x88100170, // 0004 GETMBR R4 R0 K112 - 0x78120002, // 0005 JMPF R4 #0009 - 0x88100170, // 0006 GETMBR R4 R0 K112 - 0x9012E203, // 0007 SETMBR R4 K113 R3 - 0x70020004, // 0008 JMP #000E - 0xB8128C00, // 0009 GETNGBL R4 K70 - 0x8C100972, // 000A GETMET R4 R4 K114 - 0x5C180600, // 000B MOVE R6 R3 - 0x7C100400, // 000C CALL R4 2 - 0x9002E004, // 000D SETMBR R0 K112 R4 - 0x88100170, // 000E GETMBR R4 R0 K112 - 0x8C100973, // 000F GETMET R4 R4 K115 - 0x7C100200, // 0010 CALL R4 1 - 0x60140009, // 0011 GETGBL R5 G9 - 0x5C180800, // 0012 MOVE R6 R4 - 0x7C140200, // 0013 CALL R5 1 - 0x20140B06, // 0014 NE R5 R5 K6 - 0x7816000A, // 0015 JMPF R5 #0021 - 0x8C140574, // 0016 GETMET R5 R2 K116 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x7C140400, // 0018 CALL R5 2 - 0x60180004, // 0019 GETGBL R6 G4 - 0x5C1C0A00, // 001A MOVE R7 R5 - 0x7C180200, // 001B CALL R6 1 - 0x1C180D30, // 001C EQ R6 R6 K48 - 0x781A0002, // 001D JMPF R6 #0021 - 0x8C180B75, // 001E GETMET R6 R5 K117 - 0x88200170, // 001F GETMBR R8 R0 K112 - 0x7C180400, // 0020 CALL R6 2 - 0x80000000, // 0021 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_event -********************************************************************/ -be_local_closure(class_HASPmota_register_event, /* name */ - be_nested_proto( - 13, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(event_dispatch), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x68040000, // 0000 GETUPV R1 U0 - 0x8C040300, // 0001 GETMET R1 R1 K0 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 - }) - ), - }), - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(register_event), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xA40EEC00, // 0000 IMPORT R3 K118 - 0xA4120200, // 0001 IMPORT R4 K1 - 0x88140175, // 0002 GETMBR R5 R0 K117 - 0x4C180000, // 0003 LDNIL R6 - 0x1C140A06, // 0004 EQ R5 R5 R6 - 0x78160003, // 0005 JMPF R5 #000A - 0x8C140777, // 0006 GETMET R5 R3 K119 - 0x841C0000, // 0007 CLOSURE R7 P0 - 0x7C140400, // 0008 CALL R5 2 - 0x9002EA05, // 0009 SETMBR R0 K117 R5 - 0x8814030A, // 000A GETMBR R5 R1 K10 - 0x8C180B78, // 000B GETMET R6 R5 K120 - 0x88200175, // 000C GETMBR R8 R0 K117 - 0x5C240400, // 000D MOVE R9 R2 - 0x8C28096F, // 000E GETMET R10 R4 K111 - 0x5C300200, // 000F MOVE R12 R1 - 0x7C280400, // 0010 CALL R10 2 - 0x7C180800, // 0011 CALL R6 4 - 0xA0000000, // 0012 CLOSE R0 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: fix_lv_version -********************************************************************/ -be_local_closure(class_HASPmota_fix_lv_version, /* name */ - be_nested_proto( - 6, /* nstack */ - 0, /* argc */ - 12, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(fix_lv_version), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x5800006E, // 0000 LDCONST R0 K110 - 0xA4060200, // 0001 IMPORT R1 K1 - 0x8C08030C, // 0002 GETMET R2 R1 K12 - 0xB8128C00, // 0003 GETNGBL R4 K70 - 0x58140079, // 0004 LDCONST R5 K121 - 0x7C080600, // 0005 CALL R2 3 - 0x600C0004, // 0006 GETGBL R3 G4 - 0x5C100400, // 0007 MOVE R4 R2 - 0x7C0C0200, // 0008 CALL R3 1 - 0x200C074E, // 0009 NE R3 R3 K78 - 0x780E0002, // 000A JMPF R3 #000E - 0xB80E8C00, // 000B GETNGBL R3 K70 - 0x54120007, // 000C LDINT R4 8 - 0x900EF204, // 000D SETMBR R3 K121 R4 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: page_dir_to -********************************************************************/ -be_local_closure(class_HASPmota_page_dir_to, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(page_dir_to), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0x8C08011E, // 0000 GETMET R2 R0 K30 - 0x58100006, // 0001 LDCONST R4 K6 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0403, // 0004 EQ R3 R2 R3 - 0x780E0000, // 0005 JMPF R3 #0007 - 0x80060C00, // 0006 RET 1 K6 - 0x600C000C, // 0007 GETGBL R3 G12 - 0x5C100400, // 0008 MOVE R4 R2 - 0x7C0C0200, // 0009 CALL R3 1 - 0x18100720, // 000A LE R4 R3 K32 - 0x78120000, // 000B JMPF R4 #000D - 0x80060C00, // 000C RET 1 K6 - 0x1C100743, // 000D EQ R4 R3 K67 - 0x78120000, // 000E JMPF R4 #0010 - 0x80064000, // 000F RET 1 K32 - 0x8C100502, // 0010 GETMET R4 R2 K2 - 0x5C180200, // 0011 MOVE R6 R1 - 0x7C100400, // 0012 CALL R4 2 - 0x4C140000, // 0013 LDNIL R5 - 0x1C140805, // 0014 EQ R5 R4 R5 - 0x78160000, // 0015 JMPF R5 #0017 - 0x80060C00, // 0016 RET 1 K6 - 0x00140720, // 0017 ADD R5 R3 K32 - 0x0C140B43, // 0018 DIV R5 R5 K67 - 0x18140805, // 0019 LE R5 R4 R5 - 0x78160001, // 001A JMPF R5 #001D - 0x80064000, // 001B RET 1 K32 - 0x70020001, // 001C JMP #001F - 0x5415FFFE, // 001D LDINT R5 -1 - 0x80040A00, // 001E RET 1 R5 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: pages_list_sorted -********************************************************************/ -be_local_closure(class_HASPmota_pages_list_sorted, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_HASPmota, /* shared constants */ - be_str_weak(pages_list_sorted), - &be_const_str_solidified, - ( &(const binstruction[47]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x1C0C0306, // 0002 EQ R3 R1 K6 - 0x780E0000, // 0003 JMPF R3 #0005 - 0x8804011F, // 0004 GETMBR R1 R0 K31 - 0x600C0010, // 0005 GETGBL R3 G16 - 0x88100127, // 0006 GETMBR R4 R0 K39 - 0x8C100914, // 0007 GETMET R4 R4 K20 - 0x7C100200, // 0008 CALL R4 1 - 0x7C0C0200, // 0009 CALL R3 1 - 0xA8020007, // 000A EXBLK 0 #0013 - 0x5C100600, // 000B MOVE R4 R3 - 0x7C100000, // 000C CALL R4 0 - 0x20140906, // 000D NE R5 R4 K6 - 0x78160002, // 000E JMPF R5 #0012 - 0x8C14057A, // 000F GETMET R5 R2 K122 - 0x5C1C0800, // 0010 MOVE R7 R4 - 0x7C140400, // 0011 CALL R5 2 - 0x7001FFF7, // 0012 JMP #000B - 0x580C0015, // 0013 LDCONST R3 K21 - 0xAC0C0200, // 0014 CATCH R3 1 0 - 0xB0080000, // 0015 RAISE 2 R0 R0 - 0x8C0C017B, // 0016 GETMET R3 R0 K123 - 0x5C140400, // 0017 MOVE R5 R2 - 0x7C0C0400, // 0018 CALL R3 2 - 0x5C080600, // 0019 MOVE R2 R3 - 0x4C0C0000, // 001A LDNIL R3 - 0x1C0C0203, // 001B EQ R3 R1 R3 - 0x780E0000, // 001C JMPF R3 #001E - 0x80040400, // 001D RET 1 R2 - 0x600C000C, // 001E GETGBL R3 G12 - 0x5C100400, // 001F MOVE R4 R2 - 0x7C0C0200, // 0020 CALL R3 1 - 0x00080402, // 0021 ADD R2 R2 R2 - 0x8C100502, // 0022 GETMET R4 R2 K2 - 0x5C180200, // 0023 MOVE R6 R1 - 0x7C100400, // 0024 CALL R4 2 - 0x4C140000, // 0025 LDNIL R5 - 0x1C140805, // 0026 EQ R5 R4 R5 - 0x78160001, // 0027 JMPF R5 #002A - 0x4C140000, // 0028 LDNIL R5 - 0x80040A00, // 0029 RET 1 R5 - 0x00140803, // 002A ADD R5 R4 R3 - 0x04140B20, // 002B SUB R5 R5 K32 - 0x40140805, // 002C CONNECT R5 R4 R5 - 0x94080405, // 002D GETIDX R2 R2 R5 - 0x80040400, // 002E RET 1 R2 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: HASPmota ********************************************************************/ be_local_class(HASPmota, - 11, + 13, NULL, - be_nested_map(62, + be_nested_map(64, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(parse_obj, 22), be_const_closure(class_HASPmota_parse_obj_closure) }, - { be_const_key_weak(lvh_line, -1), be_const_class(be_class_lvh_line) }, - { be_const_key_weak(lvh_dropdown_list, 23), be_const_class(be_class_lvh_dropdown_list) }, - { be_const_key_weak(lvh_cpicker, 43), be_const_class(be_class_lvh_cpicker) }, - { be_const_key_weak(lvh_dropdown, -1), be_const_class(be_class_lvh_dropdown) }, - { be_const_key_weak(lvh_spinner, -1), be_const_class(be_class_lvh_spinner) }, - { be_const_key_weak(lvh_scale_section, -1), be_const_class(be_class_lvh_scale_section) }, - { be_const_key_weak(page_dir_to, -1), be_const_closure(class_HASPmota_page_dir_to_closure) }, - { be_const_key_weak(lvh_scr, -1), be_const_class(be_class_lvh_scr) }, - { be_const_key_weak(lvh_flex, -1), be_const_class(be_class_lvh_flex) }, - { be_const_key_weak(lvh_img, -1), be_const_class(be_class_lvh_img) }, - { be_const_key_weak(lvh_obj, -1), be_const_class(be_class_lvh_obj) }, - { be_const_key_weak(lvh_chart, 13), be_const_class(be_class_lvh_chart) }, - { be_const_key_weak(started, 51), be_const_var(0) }, - { be_const_key_weak(_remove_page, -1), be_const_closure(class_HASPmota__remove_page_closure) }, - { be_const_key_weak(event_cb, -1), be_const_var(10) }, - { be_const_key_weak(page_show, 56), be_const_closure(class_HASPmota_page_show_closure) }, - { be_const_key_weak(_load, -1), be_const_closure(class_HASPmota__load_closure) }, - { be_const_key_weak(fix_lv_version, -1), be_const_static_closure(class_HASPmota_fix_lv_version_closure) }, - { be_const_key_weak(register_event, -1), be_const_closure(class_HASPmota_register_event_closure) }, - { be_const_key_weak(lvh_fixed, -1), be_const_class(be_class_lvh_fixed) }, - { be_const_key_weak(lvh_scale_line, -1), be_const_class(be_class_lvh_scale_line) }, - { be_const_key_weak(get_page_cur, -1), be_const_closure(class_HASPmota_get_page_cur_closure) }, - { be_const_key_weak(lvh_pages, -1), be_const_var(5) }, - { be_const_key_weak(lvh_roller, 17), be_const_class(be_class_lvh_roller) }, - { be_const_key_weak(event_dispatch, -1), be_const_closure(class_HASPmota_event_dispatch_closure) }, - { be_const_key_weak(scr, -1), be_const_var(3) }, - { be_const_key_weak(lvh_span, 44), be_const_class(be_class_lvh_span) }, - { be_const_key_weak(r16, -1), be_const_var(4) }, - { be_const_key_weak(init, -1), be_const_closure(class_HASPmota_init_closure) }, - { be_const_key_weak(parse_page, -1), be_const_closure(class_HASPmota_parse_page_closure) }, - { be_const_key_weak(event, -1), be_const_var(9) }, - { be_const_key_weak(lvh_label, -1), be_const_class(be_class_lvh_label) }, - { be_const_key_weak(get_page_cur_parsing, 47), be_const_closure(class_HASPmota_get_page_cur_parsing_closure) }, - { be_const_key_weak(PAGES_JSONL, 48), be_nested_str_weak(pages_X2Ejsonl) }, - { be_const_key_weak(start, -1), be_const_closure(class_HASPmota_start_closure) }, - { be_const_key_weak(get_pages, -1), be_const_closure(class_HASPmota_get_pages_closure) }, - { be_const_key_weak(sort, -1), be_const_static_closure(class_HASPmota_sort_closure) }, - { be_const_key_weak(lvh_page_cur_idx, -1), be_const_var(6) }, - { be_const_key_weak(lvh_page_cur_idx_parsing, 10), be_const_var(7) }, - { be_const_key_weak(lvh_root, 27), be_const_class(be_class_lvh_root) }, - { be_const_key_weak(vres, -1), be_const_var(2) }, - { be_const_key_weak(lvh_led, 4), be_const_class(be_class_lvh_led) }, - { be_const_key_weak(lvh_tab, -1), be_const_class(be_class_lvh_tab) }, - { be_const_key_weak(re_page_target, -1), be_const_var(8) }, - { be_const_key_weak(lvh_btnmatrix, 42), be_const_class(be_class_lvh_btnmatrix) }, - { be_const_key_weak(lvh_scale, 32), be_const_class(be_class_lvh_scale) }, - { be_const_key_weak(hres, 39), be_const_var(1) }, - { be_const_key_weak(lvh_arc, -1), be_const_class(be_class_lvh_arc) }, - { be_const_key_weak(lvh_checkbox, 26), be_const_class(be_class_lvh_checkbox) }, - { be_const_key_weak(lvh_switch, 25), be_const_class(be_class_lvh_switch) }, + { be_const_key_weak(lvh_dropdown_list, 27), be_const_class(be_class_lvh_dropdown_list) }, { be_const_key_weak(lvh_msgbox, -1), be_const_class(be_class_lvh_msgbox) }, - { be_const_key_weak(lvh_btn, -1), be_const_class(be_class_lvh_btn) }, - { be_const_key_weak(do_action, 19), be_const_closure(class_HASPmota_do_action_closure) }, - { be_const_key_weak(lvh_tabview, 18), be_const_class(be_class_lvh_tabview) }, + { be_const_key_weak(event_dispatch, -1), be_const_closure(class_HASPmota_event_dispatch_closure) }, + { be_const_key_weak(r24, -1), be_const_var(6) }, + { be_const_key_weak(lvh_scale, -1), be_const_class(be_class_lvh_scale) }, + { be_const_key_weak(lvh_cpicker, -1), be_const_class(be_class_lvh_cpicker) }, + { be_const_key_weak(parse_page, -1), be_const_closure(class_HASPmota_parse_page_closure) }, + { be_const_key_weak(lvh_label, -1), be_const_class(be_class_lvh_label) }, + { be_const_key_weak(lvh_switch, -1), be_const_class(be_class_lvh_switch) }, + { be_const_key_weak(_remove_page, 1), be_const_closure(class_HASPmota__remove_page_closure) }, + { be_const_key_weak(page_dir_to, 6), be_const_closure(class_HASPmota_page_dir_to_closure) }, { be_const_key_weak(lvh_slider, -1), be_const_class(be_class_lvh_slider) }, - { be_const_key_weak(parse, 1), be_const_closure(class_HASPmota_parse_closure) }, - { be_const_key_weak(lvh_spangroup, -1), be_const_class(be_class_lvh_spangroup) }, - { be_const_key_weak(lvh_qrcode, 7), be_const_class(be_class_lvh_qrcode) }, - { be_const_key_weak(lvh_bar, 5), be_const_class(be_class_lvh_bar) }, - { be_const_key_weak(pages_list_sorted, -1), be_const_closure(class_HASPmota_pages_list_sorted_closure) }, + { be_const_key_weak(lvh_line, 7), be_const_class(be_class_lvh_line) }, + { be_const_key_weak(r12, 61), be_const_var(4) }, + { be_const_key_weak(parse_obj, 8), be_const_closure(class_HASPmota_parse_obj_closure) }, + { be_const_key_weak(sort, -1), be_const_static_closure(class_HASPmota_sort_closure) }, + { be_const_key_weak(get_pages, -1), be_const_closure(class_HASPmota_get_pages_closure) }, + { be_const_key_weak(lvh_spangroup, 15), be_const_class(be_class_lvh_spangroup) }, + { be_const_key_weak(lvh_root, 32), be_const_class(be_class_lvh_root) }, + { be_const_key_weak(scr, -1), be_const_var(3) }, + { be_const_key_weak(lvh_qrcode, 21), be_const_class(be_class_lvh_qrcode) }, + { be_const_key_weak(fix_lv_version, 9), be_const_static_closure(class_HASPmota_fix_lv_version_closure) }, + { be_const_key_weak(get_page_cur, -1), be_const_closure(class_HASPmota_get_page_cur_closure) }, + { be_const_key_weak(lvh_bar, -1), be_const_class(be_class_lvh_bar) }, + { be_const_key_weak(lvh_span, -1), be_const_class(be_class_lvh_span) }, + { be_const_key_weak(lvh_tab, -1), be_const_class(be_class_lvh_tab) }, + { be_const_key_weak(lvh_chart, -1), be_const_class(be_class_lvh_chart) }, + { be_const_key_weak(lvh_fixed, 60), be_const_class(be_class_lvh_fixed) }, + { be_const_key_weak(init, 36), be_const_closure(class_HASPmota_init_closure) }, + { be_const_key_weak(lvh_roller, 43), be_const_class(be_class_lvh_roller) }, + { be_const_key_weak(started, 24), be_const_var(0) }, + { be_const_key_weak(start, 48), be_const_closure(class_HASPmota_start_closure) }, + { be_const_key_weak(lvh_btn, -1), be_const_class(be_class_lvh_btn) }, + { be_const_key_weak(event_cb, -1), be_const_var(12) }, + { be_const_key_weak(lvh_scr, 29), be_const_class(be_class_lvh_scr) }, + { be_const_key_weak(do_action, -1), be_const_closure(class_HASPmota_do_action_closure) }, + { be_const_key_weak(lvh_checkbox, 54), be_const_class(be_class_lvh_checkbox) }, + { be_const_key_weak(register_event, -1), be_const_closure(class_HASPmota_register_event_closure) }, + { be_const_key_weak(re_page_target, -1), be_const_var(10) }, + { be_const_key_weak(hres, 37), be_const_var(1) }, + { be_const_key_weak(lvh_tabview, -1), be_const_class(be_class_lvh_tabview) }, + { be_const_key_weak(_load, -1), be_const_closure(class_HASPmota__load_closure) }, { be_const_key_weak(lvh_page, -1), be_const_class(be_class_lvh_page) }, + { be_const_key_weak(lvh_arc, -1), be_const_class(be_class_lvh_arc) }, + { be_const_key_weak(parse, -1), be_const_closure(class_HASPmota_parse_closure) }, + { be_const_key_weak(vres, 42), be_const_var(2) }, + { be_const_key_weak(r16, 41), be_const_var(5) }, + { be_const_key_weak(lvh_spinner, -1), be_const_class(be_class_lvh_spinner) }, + { be_const_key_weak(event, 50), be_const_var(11) }, + { be_const_key_weak(lvh_flex, -1), be_const_class(be_class_lvh_flex) }, + { be_const_key_weak(lvh_led, 23), be_const_class(be_class_lvh_led) }, + { be_const_key_weak(lvh_obj, 28), be_const_class(be_class_lvh_obj) }, + { be_const_key_weak(lvh_page_cur_idx, -1), be_const_var(8) }, + { be_const_key_weak(lvh_img, 25), be_const_class(be_class_lvh_img) }, + { be_const_key_weak(lvh_page_cur_idx_parsing, -1), be_const_var(9) }, + { be_const_key_weak(lvh_dropdown, -1), be_const_class(be_class_lvh_dropdown) }, + { be_const_key_weak(pages_list_sorted, -1), be_const_closure(class_HASPmota_pages_list_sorted_closure) }, + { be_const_key_weak(get_page_cur_parsing, -1), be_const_closure(class_HASPmota_get_page_cur_parsing_closure) }, + { be_const_key_weak(lvh_pages, 13), be_const_var(7) }, + { be_const_key_weak(lvh_scale_line, -1), be_const_class(be_class_lvh_scale_line) }, + { be_const_key_weak(lvh_scale_section, -1), be_const_class(be_class_lvh_scale_section) }, + { be_const_key_weak(PAGES_JSONL, -1), be_nested_str_weak(pages_X2Ejsonl) }, + { be_const_key_weak(page_show, -1), be_const_closure(class_HASPmota_page_show_closure) }, + { be_const_key_weak(lvh_btnmatrix, -1), be_const_class(be_class_lvh_btnmatrix) }, })), be_str_weak(HASPmota) );