Files
OpenMQTTGateway/lib/sqlUI/ui_theme_manager.h
NorthernMan54 ae98db35fb Booted
2024-12-03 22:34:23 -05:00

69 lines
2.5 KiB
C

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.4.2
#ifndef _UI_THEME_MANAGER_H
#define _UI_THEME_MANAGER_H
#ifdef __cplusplus
extern "C" {
#endif
#define UI_THEME_ACTIVE 1
enum { UI_VARIABLE_STYLES_MODE_INIT = 1, UI_VARIABLE_STYLES_MODE_FOLLOW = 0 };
#ifdef LV_SQUARELINE_THEME__OBJECT_VALIDITY_CACHE //for slow hardware, adding this and setting to 5..10 in lv_conf.h might make it faster (less lv_obj_is_valid calls)
enum { UI_OBJECT_VALIDITY_CHECK_EXPIRATION = LV_SQUARELINE_THEME__OBJECT_VALIDITY_CACHE };
#else
enum { UI_OBJECT_VALIDITY_CHECK_EXPIRATION = 0 };
#endif
typedef int64_t ui_style_variable_t;
typedef ui_style_variable_t ui_theme_variable_t; //A 'theme' variable array is an array of 'style' variables for corresponding themes.
typedef struct {
lv_obj_t * object_p;
lv_style_selector_t selector;
lv_style_prop_t property;
uint16_t validcheck_counter; //used for garbage collection (finding empty slots) not to call lv_obj_is_valid() every time
void * next_p;
} _ui_local_style_property_setting_t;
typedef struct {
bool is_themeable; //scalar or vector?
ui_style_variable_t * style_variable_p;
ui_style_variable_t * previous_pointer;
ui_style_variable_t previous_value;
uint32_t style_property_setting_count;
_ui_local_style_property_setting_t * style_property_settings;
} _ui_local_style_t;
extern _ui_local_style_t * _ui_local_styles;
extern uint32_t _ui_local_style_count;
void ui_object_set_local_style_property
(lv_obj_t* object_p, lv_style_selector_t selector, lv_style_prop_t property, ui_style_variable_t value );
void ui_object_set_themeable_style_property
(lv_obj_t* object_p, lv_style_selector_t selector, lv_style_prop_t property, const ui_theme_variable_t* theme_variable_p);
void _ui_theme_set_variable_styles (uint8_t mode);
lv_style_value_t _ui_style_value_convert (lv_style_prop_t property, ui_style_variable_t value);
ui_style_variable_t ui_get_theme_value (const ui_theme_variable_t *var);
_ui_local_style_t * _ui_local_style_create (const ui_style_variable_t * style_variable_p, bool is_themeable);
_ui_local_style_property_setting_t * _ui_local_style_property_setting_create
(_ui_local_style_t * local_style, lv_obj_t * object_p, lv_style_selector_t selector, lv_style_prop_t property);
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif