docs(style) minor style fix (#2818)
* fix(misc): avoid ;; after LV_ASSERT_STYLE/LV_ASSERT_OBJ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): remove the unused docs_prop_cnt variable and remove the trailing space Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): ensure the generated code follow the coding style Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): ensure props has the same order of lv_style_prop_t and correct the style flags Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -377,13 +377,14 @@ static inline lv_coord_t lv_obj_dpx(const lv_obj_t * obj, lv_coord_t n)
|
||||
**********************/
|
||||
|
||||
#if LV_USE_ASSERT_OBJ
|
||||
# define LV_ASSERT_OBJ(obj_p, obj_class) \
|
||||
LV_ASSERT_MSG(obj_p != NULL, "The object is NULL"); \
|
||||
LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
|
||||
LV_ASSERT_MSG(lv_obj_is_valid(obj_p) == true, "The object is invalid, deleted or corrupted?");
|
||||
|
||||
# define LV_ASSERT_OBJ(obj_p, obj_class) \
|
||||
do { \
|
||||
LV_ASSERT_MSG(obj_p != NULL, "The object is NULL"); \
|
||||
LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
|
||||
LV_ASSERT_MSG(lv_obj_is_valid(obj_p) == true, "The object is invalid, deleted or corrupted?"); \
|
||||
} while(0)
|
||||
# else
|
||||
# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
|
||||
# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
|
||||
#endif
|
||||
|
||||
#if LV_USE_LOG && LV_LOG_TRACE_OBJ_CREATE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "lv_obj.h"
|
||||
|
||||
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -167,94 +168,6 @@ void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_st
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_COLUMN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -415,102 +328,6 @@ void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_s
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_POST, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -607,6 +424,38 @@ void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_styl
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -711,3 +560,154 @@ void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMG_SRC, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
|
||||
}
|
||||
|
||||
@@ -124,72 +124,6 @@ static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t * ob
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER);
|
||||
return (bool)v.num;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
|
||||
return (const lv_color_filter_dsc_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint32_t lv_obj_get_style_anim_time(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
|
||||
return (uint32_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_SPEED);
|
||||
return (uint32_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION);
|
||||
return (const lv_style_transition_dsc_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE);
|
||||
return (lv_blend_mode_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT);
|
||||
return (uint16_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR);
|
||||
return (lv_base_dir_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_bg_color(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR);
|
||||
@@ -310,78 +244,6 @@ static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t * obj, ui
|
||||
return (bool)v.num;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_text_color(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_text_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR_FILTERED);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_text_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_font_t * lv_obj_get_style_text_font(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT);
|
||||
return (const lv_font_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_text_letter_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LETTER_SPACE);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_text_line_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LINE_SPACE);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_text_decor_t lv_obj_get_style_text_decor(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_DECOR);
|
||||
return (lv_text_decor_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_text_align_t lv_obj_get_style_text_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_ALIGN);
|
||||
return (lv_text_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_FILTERED);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_outline_width(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_WIDTH);
|
||||
@@ -454,6 +316,30 @@ static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t * obj,
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_FILTERED);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_line_width(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_WIDTH);
|
||||
@@ -532,6 +418,120 @@ static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t *
|
||||
return (const void *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_text_color(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_text_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR_FILTERED);
|
||||
return v.color;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_text_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_font_t * lv_obj_get_style_text_font(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT);
|
||||
return (const lv_font_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_text_letter_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LETTER_SPACE);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_text_line_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LINE_SPACE);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_text_decor_t lv_obj_get_style_text_decor(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_DECOR);
|
||||
return (lv_text_decor_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_text_align_t lv_obj_get_style_text_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_ALIGN);
|
||||
return (lv_text_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER);
|
||||
return (bool)v.num;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
|
||||
return (const lv_color_filter_dsc_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA);
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint32_t lv_obj_get_style_anim_time(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
|
||||
return (uint32_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_SPEED);
|
||||
return (uint32_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION);
|
||||
return (const lv_style_transition_dsc_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE);
|
||||
return (lv_blend_mode_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT);
|
||||
return (uint16_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR);
|
||||
return (lv_base_dir_t)v.num;
|
||||
}
|
||||
|
||||
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
@@ -553,17 +553,6 @@ void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, lv_coord_t value, lv_styl
|
||||
void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
@@ -584,18 +573,6 @@ void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_styl
|
||||
void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_border_side(struct _lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
@@ -608,6 +585,10 @@ void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, lv_coord_t value, lv
|
||||
void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
@@ -621,3 +602,22 @@ void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, lv_color_t value, lv_sty
|
||||
void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
||||
|
||||
@@ -65,7 +65,6 @@ void lv_style_reset(lv_style_t * style)
|
||||
#if LV_USE_ASSERT_STYLE
|
||||
style->sentinel = LV_STYLE_SENTINEL_VALUE;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
lv_style_prop_t lv_style_register_prop(void)
|
||||
|
||||
@@ -14,6 +14,7 @@ extern "C" {
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "../font/lv_font.h"
|
||||
#include "lv_color.h"
|
||||
#include "lv_area.h"
|
||||
@@ -411,7 +412,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop);
|
||||
/**
|
||||
* Checks if a style is empty (has no properties)
|
||||
* @param style pointer to a style
|
||||
* @return
|
||||
* @return true if the style is empty
|
||||
*/
|
||||
bool lv_style_is_empty(const lv_style_t * style);
|
||||
|
||||
@@ -425,6 +426,12 @@ uint8_t _lv_style_get_prop_group(lv_style_prop_t prop);
|
||||
|
||||
#include "lv_style_gen.h"
|
||||
|
||||
static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_set_width(style, value);
|
||||
lv_style_set_height(style, value);
|
||||
}
|
||||
|
||||
static inline void lv_style_set_pad_all(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_set_pad_left(style, value);
|
||||
@@ -451,12 +458,6 @@ static inline void lv_style_set_pad_gap(lv_style_t * style, lv_coord_t value)
|
||||
lv_style_set_pad_column(style, value);
|
||||
}
|
||||
|
||||
static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_set_width(style, value);
|
||||
lv_style_set_height(style, value);
|
||||
}
|
||||
|
||||
|
||||
/*************************
|
||||
* GLOBAL VARIABLES
|
||||
@@ -467,10 +468,13 @@ static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
||||
**********************/
|
||||
|
||||
#if LV_USE_ASSERT_STYLE
|
||||
# define LV_ASSERT_STYLE(style_p) LV_ASSERT_MSG(style_p != NULL, "The style is NULL"); \
|
||||
LV_ASSERT_MSG(style_p->sentinel == LV_STYLE_SENTINEL_VALUE, "Style is not initialized or corrupted");
|
||||
# define LV_ASSERT_STYLE(style_p) \
|
||||
do { \
|
||||
LV_ASSERT_MSG(style_p != NULL, "The style is NULL"); \
|
||||
LV_ASSERT_MSG(style_p->sentinel == LV_STYLE_SENTINEL_VALUE, "Style is not initialized or corrupted"); \
|
||||
} while(0)
|
||||
#else
|
||||
# define LV_ASSERT_STYLE(p)
|
||||
# define LV_ASSERT_STYLE(p) do{}while(0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "lv_style.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
void lv_style_set_width(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -168,94 +168,6 @@ void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value)
|
||||
lv_style_set_prop(style, LV_STYLE_PAD_COLUMN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_radius(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_RADIUS, v);
|
||||
}
|
||||
|
||||
void lv_style_set_clip_corner(lv_style_t * style, bool value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_CLIP_CORNER, v);
|
||||
}
|
||||
|
||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_DSC, v);
|
||||
}
|
||||
|
||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_ANIM_TIME, v);
|
||||
}
|
||||
|
||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_ANIM_SPEED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TRANSITION, v);
|
||||
}
|
||||
|
||||
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_BLEND_MODE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_layout(lv_style_t * style, uint16_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_LAYOUT, v);
|
||||
}
|
||||
|
||||
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_BASE_DIR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_bg_color(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -416,102 +328,6 @@ void lv_style_set_border_post(lv_style_t * style, bool value)
|
||||
lv_style_set_prop(style, LV_STYLE_BORDER_POST, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_color(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR_FILTERED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_LETTER_SPACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_LINE_SPACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_DECOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_ALIGN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_FILTERED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -608,6 +424,38 @@ void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value)
|
||||
lv_style_set_prop(style, LV_STYLE_SHADOW_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_FILTERED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_line_width(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
@@ -712,3 +560,154 @@ void lv_style_set_arc_img_src(lv_style_t * style, const void * value)
|
||||
lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_color(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.color = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR_FILTERED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_LETTER_SPACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_LINE_SPACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_DECOR, v);
|
||||
}
|
||||
|
||||
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TEXT_ALIGN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_radius(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_RADIUS, v);
|
||||
}
|
||||
|
||||
void lv_style_set_clip_corner(lv_style_t * style, bool value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_CLIP_CORNER, v);
|
||||
}
|
||||
|
||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_DSC, v);
|
||||
}
|
||||
|
||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v);
|
||||
}
|
||||
|
||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_ANIM_TIME, v);
|
||||
}
|
||||
|
||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_ANIM_SPEED, v);
|
||||
}
|
||||
|
||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_TRANSITION, v);
|
||||
}
|
||||
|
||||
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_BLEND_MODE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_layout(lv_style_t * style, uint16_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_LAYOUT, v);
|
||||
}
|
||||
|
||||
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_BASE_DIR, v);
|
||||
}
|
||||
|
||||
@@ -19,17 +19,6 @@ void lv_style_set_pad_left(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_pad_right(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_pad_row(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_radius(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_clip_corner(lv_style_t * style, bool value);
|
||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value);
|
||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value);
|
||||
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value);
|
||||
void lv_style_set_layout(lv_style_t * style, uint16_t value);
|
||||
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
|
||||
void lv_style_set_bg_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_bg_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_bg_opa(lv_style_t * style, lv_opa_t value);
|
||||
@@ -50,18 +39,6 @@ void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_border_width(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value);
|
||||
void lv_style_set_border_post(lv_style_t * style, bool value);
|
||||
void lv_style_set_text_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value);
|
||||
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value);
|
||||
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value);
|
||||
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_outline_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_outline_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
@@ -74,6 +51,10 @@ void lv_style_set_shadow_spread(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_shadow_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_line_width(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_line_dash_width(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_line_dash_gap(lv_style_t * style, lv_coord_t value);
|
||||
@@ -87,715 +68,467 @@ void lv_style_set_arc_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_arc_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_arc_img_src(lv_style_t * style, const void * value);
|
||||
void lv_style_set_text_color(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value);
|
||||
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value);
|
||||
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value);
|
||||
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value);
|
||||
void lv_style_set_radius(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_clip_corner(lv_style_t * style, bool value);
|
||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value);
|
||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value);
|
||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value);
|
||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value);
|
||||
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value);
|
||||
void lv_style_set_layout(lv_style_t * style, uint16_t value);
|
||||
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value);
|
||||
|
||||
#define LV_STYLE_CONST_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MIN_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MIN_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_MIN_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MAX_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MAX_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_MAX_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_HEIGHT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MIN_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MIN_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_MIN_HEIGHT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MAX_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MAX_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_MAX_HEIGHT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_X, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_Y, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ALIGN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ALIGN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_ALIGN, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSFORM_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSFORM_HEIGHT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSLATE_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSLATE_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSLATE_X, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSLATE_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSLATE_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSLATE_Y, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_ZOOM(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_ZOOM, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSFORM_ZOOM, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_ANGLE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_ANGLE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_TRANSFORM_ANGLE, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_TOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_TOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_TOP, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_BOTTOM(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_BOTTOM, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_BOTTOM, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_LEFT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_LEFT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_LEFT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_RIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_RIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_RIGHT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_ROW(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_ROW, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_ROW, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_COLUMN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_COLUMN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_RADIUS(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_RADIUS, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_CLIP_CORNER(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_CLIP_CORNER, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_DSC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_DSC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_TIME(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_TIME, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_SPEED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_SPEED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSITION(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSITION, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BLEND_MODE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BLEND_MODE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LAYOUT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LAYOUT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BASE_DIR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BASE_DIR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_PAD_COLUMN, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_DIR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_DIR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_GRAD_DIR, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_MAIN_STOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_MAIN_STOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_MAIN_STOP, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_STOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_STOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_GRAD_STOP, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_SRC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_SRC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_SRC, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_TILED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_TILED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BG_IMG_TILED, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_SIDE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_SIDE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_SIDE, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_POST(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_POST, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_FONT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_FONT, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LETTER_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LETTER_SPACE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LINE_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LINE_SPACE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_DECOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_DECOR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_ALIGN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_ALIGN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_BORDER_POST, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_OUTLINE_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_OUTLINE_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_PAD(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_PAD, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_OUTLINE_PAD, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OFS_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OFS_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_OFS_X, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OFS_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OFS_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_OFS_Y, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_SPREAD(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_SPREAD, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_SPREAD, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_SHADOW_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_DASH_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_DASH_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_DASH_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_DASH_GAP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_DASH_GAP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_DASH_GAP, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_ROUNDED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_ROUNDED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_ROUNDED, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_LINE_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_WIDTH, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_ROUNDED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_ROUNDED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_ROUNDED, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_IMG_SRC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_IMG_SRC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.prop = LV_STYLE_ARC_IMG_SRC, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR_FILTERED, .value = { .color = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_FONT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_FONT, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LETTER_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LETTER_SPACE, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LINE_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LINE_SPACE, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_DECOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_DECOR, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_ALIGN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_ALIGN, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_RADIUS(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_RADIUS, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_CLIP_CORNER(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_CLIP_CORNER, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_DSC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_DSC, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_OPA, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_TIME(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_TIME, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_SPEED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_SPEED, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSITION(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSITION, .value = { .ptr = val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BLEND_MODE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BLEND_MODE, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LAYOUT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LAYOUT, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BASE_DIR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BASE_DIR, .value = { .num = (int32_t)val } \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user