mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
refactoring
This commit is contained in:
parent
56159d60a0
commit
2e58d4b07e
@ -682,7 +682,7 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
||||
|
||||
lv_style_value_t v;
|
||||
if(lv_style_get_prop(obj_style->style, LV_STYLE_TRANSITION, &v) == false) continue;
|
||||
const lv_style_transiton_t * tr = v._ptr;
|
||||
const lv_style_transiton_t * tr = v.ptr;
|
||||
|
||||
/*Add the props t the set is not added yet or added but with smaller weight*/
|
||||
uint32_t j;
|
||||
|
@ -274,7 +274,7 @@ static lv_style_value_t apply_color_filter(const lv_obj_t * obj, uint32_t part,
|
||||
lv_color_filter_cb_t f = lv_obj_get_style_color_filter_cb(obj, part);
|
||||
if(f) {
|
||||
lv_opa_t f_opa = lv_obj_get_style_color_filter_opa(obj, part);
|
||||
if(f_opa != 0) v._color = f(v._color, f_opa);
|
||||
if(f_opa != 0) v.color = f(v.color, f_opa);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
@ -283,7 +283,7 @@ static bool get_prop_core(const lv_obj_t * obj, uint8_t part, lv_style_prop_t pr
|
||||
cache_t cache_res = read_cache(obj, part, prop);
|
||||
switch(cache_res) {
|
||||
case CACHE_ZERO:
|
||||
v->_ptr = 0;
|
||||
v->ptr = 0;
|
||||
return true;
|
||||
case CACHE_TRUE:
|
||||
v->num = 1;
|
||||
@ -300,7 +300,7 @@ static bool get_prop_core(const lv_obj_t * obj, uint8_t part, lv_style_prop_t pr
|
||||
cache_res -= CACHE_INDEX;
|
||||
if(cache_res) {
|
||||
if(prop == LV_STYLE_BG_COLOR_FILTERED || prop == LV_STYLE_TEXT_COLOR_FILTERED) {
|
||||
v->_color = lv_style_get_indexed_color(cache_res);
|
||||
v->color = lv_style_get_indexed_color(cache_res);
|
||||
} else {
|
||||
v->num = lv_style_get_indexed_num(cache_res);
|
||||
}
|
||||
@ -539,7 +539,7 @@ void _lv_obj_create_style_transition(lv_obj_t * obj, lv_style_prop_t prop, uint8
|
||||
lv_style_value_t v2 = lv_obj_get_style_prop(obj, part, prop);
|
||||
obj->style_list.skip_trans = 0;
|
||||
|
||||
if(v1._ptr == v2._ptr && v1.num == v2.num && v1._color.full == v2._color.full) return;
|
||||
if(v1.ptr == v2.ptr && v1.num == v2.num && v1.color.full == v2.color.full) return;
|
||||
obj->state = prev_state;
|
||||
v1 = lv_obj_get_style_prop(obj, part, prop);
|
||||
obj->state = new_state;
|
||||
@ -806,9 +806,9 @@ static void update_cache(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop)
|
||||
}
|
||||
if(prop == LV_STYLE_PROP_ALL || prop == LV_STYLE_COLOR_FILTER_CB || prop == LV_STYLE_COLOR_FILTER_OPA) {
|
||||
lv_style_value_t vf[2];
|
||||
if(get_prop_core(obj, part, LV_STYLE_COLOR_FILTER_CB, &vf[0]) == false) vf[0]._func = 0;
|
||||
if(get_prop_core(obj, part, LV_STYLE_COLOR_FILTER_CB, &vf[0]) == false) vf[0].func = 0;
|
||||
if(get_prop_core(obj, part, LV_STYLE_COLOR_FILTER_OPA, &vf[1]) == false) vf[1].num = 0;
|
||||
if(vf[0]._func == NULL || vf[1].num == 0) list->cache_filter_zero = 1;
|
||||
if(vf[0].func == NULL || vf[1].num == 0) list->cache_filter_zero = 1;
|
||||
else list->cache_filter_zero = 0;
|
||||
}
|
||||
|
||||
@ -1081,14 +1081,14 @@ static void trans_anim_cb(lv_style_trans_t * tr, lv_anim_value_t v)
|
||||
break;
|
||||
case LV_STYLE_TRANSITION:
|
||||
case LV_STYLE_TEXT_FONT:
|
||||
if(v < 255) value_final._ptr = tr->start_value._ptr;
|
||||
else value_final._ptr = tr->end_value._ptr;
|
||||
if(v < 255) value_final.ptr = tr->start_value.ptr;
|
||||
else value_final.ptr = tr->end_value.ptr;
|
||||
break;
|
||||
case LV_STYLE_COLOR_FILTER_CB:
|
||||
if(tr->start_value._func == NULL) value_final._ptr = tr->end_value._func;
|
||||
else if(tr->end_value._func == NULL) value_final._ptr = tr->start_value._func;
|
||||
else if(v < 128) value_final._ptr = tr->start_value._ptr;
|
||||
else value_final._ptr = tr->end_value._ptr;
|
||||
if(tr->start_value.func == NULL) value_final.ptr = tr->end_value.func;
|
||||
else if(tr->end_value.func == NULL) value_final.ptr = tr->start_value.func;
|
||||
else if(v < 128) value_final.ptr = tr->start_value.ptr;
|
||||
else value_final.ptr = tr->end_value.ptr;
|
||||
break;
|
||||
case LV_STYLE_BG_COLOR:
|
||||
case LV_STYLE_BORDER_COLOR:
|
||||
@ -1096,9 +1096,9 @@ static void trans_anim_cb(lv_style_trans_t * tr, lv_anim_value_t v)
|
||||
case LV_STYLE_SHADOW_COLOR:
|
||||
case LV_STYLE_OUTLINE_COLOR:
|
||||
case LV_STYLE_IMG_RECOLOR:
|
||||
if(v <= 0) value_final._color = tr->start_value._color;
|
||||
else if(v >= 255) value_final._color = tr->end_value._color;
|
||||
else value_final._color = lv_color_mix(tr->end_value._color, tr->start_value._color, v);
|
||||
if(v <= 0) value_final.color = tr->start_value.color;
|
||||
else if(v >= 255) value_final.color = tr->end_value.color;
|
||||
else value_final.color = lv_color_mix(tr->end_value.color, tr->start_value.color, v);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1111,7 +1111,7 @@ static void trans_anim_cb(lv_style_trans_t * tr, lv_anim_value_t v)
|
||||
lv_style_value_t old_value;
|
||||
bool refr = true;
|
||||
if(lv_style_get_prop(list->styles[i].style, tr->prop, &old_value)) {
|
||||
if(value_final._ptr == old_value._ptr && value_final._func == old_value._ptr && value_final._color.full == old_value._color.full && value_final.num == old_value.num) {
|
||||
if(value_final.ptr == old_value.ptr && value_final.func == old_value.ptr && value_final.color.full == old_value.color.full && value_final.num == old_value.num) {
|
||||
refr = false;
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA); return v.num; }
|
||||
|
||||
static inline lv_color_filter_cb_t lv_obj_get_style_color_filter_cb(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_CB); return (lv_color_filter_cb_t)v._func; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_CB); return (lv_color_filter_cb_t)v.func; }
|
||||
|
||||
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 v.num; }
|
||||
@ -257,19 +257,19 @@ static inline lv_coord_t lv_obj_get_style_margin_right(const struct _lv_obj_t *
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MARGIN_RIGHT); return 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); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_bg_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_BG_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_bg_opa(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_OPA); return v.num; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_bg_grad_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_GRAD_COLOR); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_bg_grad_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_BG_GRAD_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_DIR); return v.num; }
|
||||
@ -284,10 +284,10 @@ static inline lv_coord_t lv_obj_get_style_bg_grad_stop(const struct _lv_obj_t *
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_STOP); return v.num; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_border_color(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_border_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_BORDER_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_border_opa(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_OPA); return v.num; }
|
||||
@ -305,16 +305,16 @@ static inline lv_blend_mode_t lv_obj_get_style_border_blend_mode(const struct _l
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_BLEND_MODE); return 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; }
|
||||
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; }
|
||||
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 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 v._ptr; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT); return 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 v.num; }
|
||||
@ -335,10 +335,10 @@ static inline lv_blend_mode_t lv_obj_get_style_img_blend_mode(const struct _lv_o
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_BLEND_MODE); return 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; }
|
||||
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; }
|
||||
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 v.num; }
|
||||
@ -347,10 +347,10 @@ static inline lv_coord_t lv_obj_get_style_outline_width(const struct _lv_obj_t *
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_WIDTH); return v.num; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_outline_color(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_outline_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_OUTLINE_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_outline_opa(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_OPA); return v.num; }
|
||||
@ -377,10 +377,10 @@ static inline lv_blend_mode_t lv_obj_get_style_shadow_blend_mode(const struct _l
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_BLEND_MODE); return v.num; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_shadow_color(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_shadow_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_SHADOW_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OPA); return v.num; }
|
||||
@ -401,16 +401,16 @@ static inline lv_coord_t lv_obj_get_style_line_rounded(const struct _lv_obj_t *
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_ROUNDED); return v.num; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_line_color(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR); return v.color; }
|
||||
|
||||
static inline lv_color_t lv_obj_get_style_line_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_LINE_COLOR_FILTERED); return v._color; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR_FILTERED); return v.color; }
|
||||
|
||||
static inline lv_opa_t lv_obj_get_style_line_opa(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_OPA); return v.num; }
|
||||
|
||||
static inline const char * lv_obj_get_style_content_src(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_SRC); return v._ptr; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_SRC); return v.ptr; }
|
||||
|
||||
static inline lv_align_t lv_obj_get_style_content_align(const struct _lv_obj_t * obj, uint32_t part) {
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_ALIGN); return v.num; }
|
||||
@ -422,7 +422,7 @@ static inline lv_coord_t lv_obj_get_style_content_ofs_y(const struct _lv_obj_t *
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OFS_Y); return v.num; }
|
||||
|
||||
static inline const lv_style_transiton_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 v._ptr; }
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION); return v.ptr; }
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -141,7 +141,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
|
||||
value.num = LV_IMG_ZOOM_NONE;
|
||||
break;
|
||||
case LV_STYLE_BG_COLOR:
|
||||
value._color = LV_COLOR_WHITE;
|
||||
value.color = LV_COLOR_WHITE;
|
||||
break;
|
||||
case LV_STYLE_OPA:
|
||||
case LV_STYLE_BORDER_OPA:
|
||||
@ -159,10 +159,10 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
|
||||
value.num = LV_BORDER_SIDE_FULL;
|
||||
break;
|
||||
case LV_STYLE_TEXT_FONT:
|
||||
value._ptr = LV_THEME_DEFAULT_FONT_NORMAL;
|
||||
value.ptr = LV_THEME_DEFAULT_FONT_NORMAL;
|
||||
break;
|
||||
default:
|
||||
value._ptr = NULL;
|
||||
value.ptr = NULL;
|
||||
value.num = 0;
|
||||
break;
|
||||
}
|
||||
@ -183,7 +183,7 @@ uint32_t lv_style_find_index_color(lv_style_value_t v)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 1; i < buf_color_p; i++) {
|
||||
if(v._color.full == buf_color[i].full) return i;
|
||||
if(v.color.full == buf_color[i].full) return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -192,7 +192,7 @@ uint32_t lv_style_find_index_ptr(lv_style_value_t v)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 1; i < buf_ptr; i++) {
|
||||
if(v.num == buf_ptr[i]) return i;
|
||||
if(v.ptr == buf_ptr[i]) return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -286,10 +286,10 @@ static int32_t alloc_index_ptr(lv_style_value_t v)
|
||||
static uint32_t p = 1;
|
||||
uint32_t i;
|
||||
for(i = 1; i < p; i++) {
|
||||
if(v._ptr == buf_ptr[i]) return i;
|
||||
if(v.ptr == buf_ptr[i]) return i;
|
||||
}
|
||||
if(p < 16) {
|
||||
buf_ptr[p] = v._ptr;
|
||||
buf_ptr[p] = v.ptr;
|
||||
p++;
|
||||
return p - 1;
|
||||
}
|
||||
@ -300,10 +300,10 @@ static int32_t alloc_index_color(lv_style_value_t v)
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 1; i < buf_color_p; i++) {
|
||||
if(v._color.full == buf_color[i].full) return i;
|
||||
if(v.color.full == buf_color[i].full) return i;
|
||||
}
|
||||
if(buf_color_p) {
|
||||
buf_color[buf_color_p].full = v._color.full;
|
||||
buf_color[buf_color_p].full = v.color.full;
|
||||
buf_color_p++;
|
||||
return buf_color_p - 1;
|
||||
}
|
||||
@ -371,7 +371,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->transition = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->transition = value._ptr;
|
||||
style->ext->transition = value.ptr;
|
||||
style->ext->has.transition = 1;
|
||||
style->transition = 0;
|
||||
}
|
||||
@ -393,7 +393,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->color_filter_cb = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->color_filter_cb = (lv_color_filter_cb_t)value._func;
|
||||
style->ext->color_filter_cb = (lv_color_filter_cb_t)value.func;
|
||||
style->ext->has.color_filter_cb = 1;
|
||||
style->color_filter_cb = 0;
|
||||
}
|
||||
@ -505,7 +505,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->bg_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->bg_color = value._color;
|
||||
style->ext->bg_color = value.color;
|
||||
style->ext->has.bg_color = 1;
|
||||
style->bg_color = 0;
|
||||
}
|
||||
@ -527,7 +527,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->bg_grad_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->bg_grad_color = value._color;
|
||||
style->ext->bg_grad_color = value.color;
|
||||
style->ext->has.bg_grad_color = 1;
|
||||
style->bg_grad_color = 0;
|
||||
}
|
||||
@ -558,7 +558,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->border_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->border_color = value._color;
|
||||
style->ext->border_color = value.color;
|
||||
style->ext->has.border_color = 1;
|
||||
style->border_color = 0;
|
||||
}
|
||||
@ -606,7 +606,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->text_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->text_color = value._color;
|
||||
style->ext->text_color = value.color;
|
||||
style->ext->has.text_color = 1;
|
||||
style->text_color = 0;
|
||||
}
|
||||
@ -662,7 +662,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
break;
|
||||
case LV_STYLE_IMG_RECOLOR:
|
||||
_alloc_ext(style);
|
||||
style->ext->img_recolor = value._color;
|
||||
style->ext->img_recolor = value.color;
|
||||
style->ext->has.img_recolor = 1;
|
||||
break;
|
||||
case LV_STYLE_IMG_RECOLOR_OPA:
|
||||
@ -688,7 +688,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->outline_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->outline_color = value._color;
|
||||
style->ext->outline_color = value.color;
|
||||
style->ext->has.outline_color = 1;
|
||||
style->outline_color = 0;
|
||||
}
|
||||
@ -776,7 +776,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->shadow_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->shadow_color = value._color;
|
||||
style->ext->shadow_color = value.color;
|
||||
style->ext->has.shadow_color = 1;
|
||||
style->shadow_color = 0;
|
||||
}
|
||||
@ -830,7 +830,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
style->line_color = id;
|
||||
} else {
|
||||
_alloc_ext(style);
|
||||
style->ext->line_color = value._color;
|
||||
style->ext->line_color = value.color;
|
||||
style->ext->has.line_color = 1;
|
||||
style->line_color = 0;
|
||||
}
|
||||
@ -849,7 +849,7 @@ static void set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t
|
||||
|
||||
case LV_STYLE_CONTENT_SRC:
|
||||
_alloc_ext(style);
|
||||
style->ext->content_src = value._ptr;
|
||||
style->ext->content_src = value.ptr;
|
||||
style->ext->has.content_src = 1;
|
||||
break;
|
||||
case LV_STYLE_CONTENT_ALIGN:
|
||||
@ -902,16 +902,16 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
if(style->ext && style->ext->has.opa) { value->num = style->ext->opa; return true; }
|
||||
break;
|
||||
case LV_STYLE_COLOR_FILTER_CB:
|
||||
if(style->color_filter_cb) { value->_func = buf_ptr[style->color_filter_cb]; return true; }
|
||||
if(style->ext && style->ext->has.color_filter_cb) { value->_func = (void(*)(void)) style->ext->color_filter_cb; return true; }
|
||||
if(style->color_filter_cb) { value->func = buf_ptr[style->color_filter_cb]; return true; }
|
||||
if(style->ext && style->ext->has.color_filter_cb) { value->func = (void(*)(void)) style->ext->color_filter_cb; return true; }
|
||||
break;
|
||||
case LV_STYLE_COLOR_FILTER_OPA:
|
||||
if(style->color_filter_opa) { value->num = buf_num[style->color_filter_opa]; return true; }
|
||||
if(style->ext && style->ext->has.color_filter_opa) { value->num = style->ext->color_filter_opa; return true; }
|
||||
break;
|
||||
case LV_STYLE_TRANSITION:
|
||||
if(style->transition) { value->_ptr = buf_ptr[style->transition]; return true; }
|
||||
if(style->ext && style->ext->has.transition) { value->_ptr = style->ext->transition; return true; }
|
||||
if(style->transition) { value->ptr = buf_ptr[style->transition]; return true; }
|
||||
if(style->ext && style->ext->has.transition) { value->ptr = style->ext->transition; return true; }
|
||||
break;
|
||||
|
||||
case LV_STYLE_PAD_TOP:
|
||||
@ -949,8 +949,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
|
||||
case LV_STYLE_BG_COLOR:
|
||||
case LV_STYLE_BG_COLOR_FILTERED:
|
||||
if(style->bg_color) { value->_color = buf_color[style->bg_color]; return true; }
|
||||
if(style->ext && style->ext->has.bg_color) { value->_color = style->ext->bg_color; return true; }
|
||||
if(style->bg_color) { value->color = buf_color[style->bg_color]; return true; }
|
||||
if(style->ext && style->ext->has.bg_color) { value->color = style->ext->bg_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_BG_OPA:
|
||||
if(style->bg_opa) { value->num = buf_num[style->bg_opa]; return true; }
|
||||
@ -958,8 +958,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
case LV_STYLE_BG_GRAD_COLOR:
|
||||
case LV_STYLE_BG_GRAD_COLOR_FILTERED:
|
||||
if(style->bg_grad_color) { value->_color = buf_color[style->bg_grad_color]; return true; }
|
||||
if(style->ext && style->ext->has.bg_grad_color) { value->_color = style->ext->bg_grad_color; return true; }
|
||||
if(style->bg_grad_color) { value->color = buf_color[style->bg_grad_color]; return true; }
|
||||
if(style->ext && style->ext->has.bg_grad_color) { value->color = style->ext->bg_grad_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_BG_GRAD_DIR:
|
||||
if(style->has_bg_grad_dir) { value->num = style->bg_grad_dir; return true; }
|
||||
@ -976,8 +976,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
|
||||
case LV_STYLE_BORDER_COLOR:
|
||||
case LV_STYLE_BORDER_COLOR_FILTERED:
|
||||
if(style->border_color) { value->_color = buf_color[style->border_color]; return true; }
|
||||
if(style->ext && style->ext->has.border_color) { value->_color = style->ext->border_color; return true; }
|
||||
if(style->border_color) { value->color = buf_color[style->border_color]; return true; }
|
||||
if(style->ext && style->ext->has.border_color) { value->color = style->ext->border_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_BORDER_OPA:
|
||||
if(style->border_opa) { value->num = buf_num[style->border_opa]; return true; }
|
||||
@ -999,16 +999,16 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
|
||||
case LV_STYLE_TEXT_COLOR:
|
||||
case LV_STYLE_TEXT_COLOR_FILTERED:
|
||||
if(style->text_color) { value->_color = buf_color[style->text_color]; return true; }
|
||||
if(style->ext && style->ext->has.text_color) { value->_color = style->ext->text_color; return true; }
|
||||
if(style->text_color) { value->color = buf_color[style->text_color]; return true; }
|
||||
if(style->ext && style->ext->has.text_color) { value->color = style->ext->text_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_TEXT_OPA:
|
||||
if(style->text_opa) { value->num = buf_num[style->text_opa]; return true; }
|
||||
if(style->ext && style->ext->has.text_opa) { value->num = style->ext->text_opa; return true; }
|
||||
break;
|
||||
case LV_STYLE_TEXT_FONT:
|
||||
if(style->text_font) { value->_ptr = buf_ptr[style->text_font]; return true; }
|
||||
if(style->ext && style->ext->has.text_font) { value->_ptr = style->ext->text_font; return true; }
|
||||
if(style->text_font) { value->ptr = buf_ptr[style->text_font]; return true; }
|
||||
if(style->ext && style->ext->has.text_font) { value->ptr = style->ext->text_font; return true; }
|
||||
break;
|
||||
case LV_STYLE_TEXT_LETTER_SPACE:
|
||||
if(style->ext && style->ext->has.text_letter_space) { value->num = style->ext->text_letter_space; return true; }
|
||||
@ -1032,7 +1032,7 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
case LV_STYLE_IMG_RECOLOR:
|
||||
case LV_STYLE_IMG_RECOLOR_FILTERED:
|
||||
if(style->ext && style->ext->has.img_recolor) { value->_color = style->ext->img_recolor; return true; }
|
||||
if(style->ext && style->ext->has.img_recolor) { value->color = style->ext->img_recolor; return true; }
|
||||
break;
|
||||
case LV_STYLE_IMG_RECOLOR_OPA:
|
||||
if(style->ext && style->ext->has.img_recolor_opa) { value->num = style->ext->img_recolor_opa; return true; }
|
||||
@ -1045,8 +1045,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
case LV_STYLE_OUTLINE_COLOR:
|
||||
case LV_STYLE_OUTLINE_COLOR_FILTERED:
|
||||
if(style->outline_color) { value->_color = buf_color[style->outline_color]; return true; }
|
||||
if(style->ext && style->ext->has.outline_color) { value->_color = style->ext->outline_color; return true; }
|
||||
if(style->outline_color) { value->color = buf_color[style->outline_color]; return true; }
|
||||
if(style->ext && style->ext->has.outline_color) { value->color = style->ext->outline_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_OUTLINE_OPA:
|
||||
if(style->outline_opa) { value->num = buf_num[style->outline_opa]; return true; }
|
||||
@ -1081,8 +1081,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
case LV_STYLE_SHADOW_COLOR:
|
||||
case LV_STYLE_SHADOW_COLOR_FILTERED:
|
||||
if(style->shadow_color) { value->_color = buf_color[style->shadow_color]; return true; }
|
||||
if(style->ext && style->ext->has.shadow_color) { value->_color = style->ext->shadow_color; return true; }
|
||||
if(style->shadow_color) { value->color = buf_color[style->shadow_color]; return true; }
|
||||
if(style->ext && style->ext->has.shadow_color) { value->color = style->ext->shadow_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_SHADOW_OPA:
|
||||
if(style->shadow_opa) { value->num = buf_num[style->shadow_opa]; return true; }
|
||||
@ -1107,8 +1107,8 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
case LV_STYLE_LINE_COLOR:
|
||||
case LV_STYLE_LINE_COLOR_FILTERED:
|
||||
if(style->line_color) { value->_color = buf_color[style->line_color]; return true; }
|
||||
if(style->ext && style->ext->has.line_color) { value->_color = style->ext->line_color; return true; }
|
||||
if(style->line_color) { value->color = buf_color[style->line_color]; return true; }
|
||||
if(style->ext && style->ext->has.line_color) { value->color = style->ext->line_color; return true; }
|
||||
break;
|
||||
case LV_STYLE_LINE_OPA:
|
||||
if(style->line_opa) { value->num = buf_num[style->line_opa]; return true; }
|
||||
@ -1116,7 +1116,7 @@ static bool get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_va
|
||||
break;
|
||||
|
||||
case LV_STYLE_CONTENT_SRC:
|
||||
if(style->ext && style->ext->has.content_src) { value->_ptr = style->ext->content_src; return true; }
|
||||
if(style->ext && style->ext->has.content_src) { value->ptr = style->ext->content_src; return true; }
|
||||
break;
|
||||
case LV_STYLE_CONTENT_ALIGN:
|
||||
if(style->ext && style->ext->has.content_align) { value->num = style->ext->content_align; return true; }
|
||||
|
@ -76,9 +76,9 @@ typedef uint8_t lv_text_decor_t;
|
||||
|
||||
typedef union {
|
||||
int32_t num;
|
||||
const void * _ptr;
|
||||
void (* _func)(void);
|
||||
lv_color_t _color;
|
||||
const void * ptr;
|
||||
void (* func)(void);
|
||||
lv_color_t color;
|
||||
}lv_style_value_t;
|
||||
|
||||
typedef enum {
|
||||
@ -452,7 +452,7 @@ static inline void lv_style_set_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_OPA, v); }
|
||||
|
||||
static inline void lv_style_set_color_filter_cb(lv_style_t * style, lv_color_filter_cb_t value) {
|
||||
lv_style_value_t v = {._func = (void(*)(void))value}; lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_CB, v); }
|
||||
lv_style_value_t v = {.func = (void(*)(void))value}; lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_CB, v); }
|
||||
|
||||
static inline void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v); }
|
||||
@ -482,19 +482,19 @@ static inline void lv_style_set_margin_right(lv_style_t * style, lv_coord_t valu
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_MARGIN_RIGHT, v); }
|
||||
|
||||
static inline void lv_style_set_bg_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BG_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BG_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_bg_color_filtered(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BG_COLOR_FILTERED, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BG_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_bg_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_BG_OPA, v); }
|
||||
|
||||
static inline void lv_style_set_bg_grad_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_bg_grad_color_filtered(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_COLOR_FILTERED, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_DIR, v); }
|
||||
@ -509,10 +509,10 @@ static inline void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t valu
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_STOP, v); }
|
||||
|
||||
static inline void lv_style_set_border_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BORDER_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BORDER_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_border_color_filtered(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_BORDER_COLOR_FILTERED, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BORDER_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_BORDER_OPA, v); }
|
||||
@ -530,16 +530,16 @@ static inline void lv_style_set_border_blend_mode(lv_style_t * style, lv_blend_m
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_BORDER_BLEND_MODE, v); }
|
||||
|
||||
static inline 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); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_TEXT_COLOR, v); }
|
||||
|
||||
static inline 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); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_TEXT_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_TEXT_OPA, v); }
|
||||
|
||||
static inline 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); }
|
||||
lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v); }
|
||||
|
||||
static inline void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_TEXT_LETTER_SPACE, v); }
|
||||
@ -560,10 +560,10 @@ static inline void lv_style_set_img_blend_mode(lv_style_t * style, lv_blend_mode
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_IMG_BLEND_MODE, v); }
|
||||
|
||||
static inline 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); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v); }
|
||||
|
||||
static inline 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); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v); }
|
||||
@ -572,7 +572,7 @@ static inline void lv_style_set_outline_width(lv_style_t * style, lv_coord_t val
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_WIDTH, v); }
|
||||
|
||||
static inline void lv_style_set_outline_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_outline_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_OPA, v); }
|
||||
@ -599,10 +599,10 @@ static inline void lv_style_set_shadow_blend_mode(lv_style_t * style, lv_blend_m
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_BLEND_MODE, v); }
|
||||
|
||||
static inline void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_shadow_color_filtered(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_COLOR_FILTERED, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_SHADOW_OPA, v); }
|
||||
@ -623,16 +623,16 @@ static inline void lv_style_set_line_rounded(lv_style_t * style, lv_coord_t valu
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_LINE_ROUNDED, v); }
|
||||
|
||||
static inline void lv_style_set_line_color(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_LINE_COLOR, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_LINE_COLOR, v); }
|
||||
|
||||
static inline void lv_style_set_line_color_filtered(lv_style_t * style, lv_color_t value) {
|
||||
lv_style_value_t v = {._color = value}; lv_style_set_prop(style, LV_STYLE_LINE_COLOR_FILTERED, v); }
|
||||
lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_LINE_COLOR_FILTERED, v); }
|
||||
|
||||
static inline void lv_style_set_line_opa(lv_style_t * style, lv_opa_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_LINE_OPA, v); }
|
||||
|
||||
static inline void lv_style_set_content_src(lv_style_t * style, const char * value) {
|
||||
lv_style_value_t v = {._ptr = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_SRC, v); }
|
||||
lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_SRC, v); }
|
||||
|
||||
static inline void lv_style_set_content_align(lv_style_t * style, lv_align_t value) {
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_ALIGN, v); }
|
||||
@ -644,7 +644,7 @@ static inline void lv_style_set_content_ofs_y(lv_style_t * style, lv_coord_t val
|
||||
lv_style_value_t v = {.num = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_OFS_Y, v); }
|
||||
|
||||
static inline void lv_style_set_transition(lv_style_t * style, const lv_style_transiton_t * value) {
|
||||
lv_style_value_t v = {._ptr = value}; lv_style_set_prop(style, LV_STYLE_TRANSITION, v); }
|
||||
lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_TRANSITION, v); }
|
||||
|
||||
|
||||
static inline void lv_style_set_pad_ver(lv_style_t * style, lv_coord_t value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user