diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py index 856f57eb9..57c326f1a 100755 --- a/scripts/style_api_gen.py +++ b/scripts/style_api_gen.py @@ -92,45 +92,56 @@ props = [ {'name': 'CONTENT_DECOR', 'style_type': 'num', 'var_type': 'lv_text_decor_t' }, ] -def obj_style_get(i): - print("static inline " + props[i]['var_type'] + " lv_obj_get_style_" + props[i]['name'].lower() +"(const struct _lv_obj_t * obj, uint32_t part) {") - is_struct = props[i]['style_type'] == 'color' - cast = "(" + props[i]['var_type'] + ")" if not is_struct else "" - print(" lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_" + props[i]['name'] + "); return " + cast + " v." + props[i]['style_type'] + "; }") - print("") - +def obj_style_get(p): + is_struct = p['style_type'] == 'color' + cast = "(" + p['var_type'] + ")" if not is_struct else "" + print("static inline " + p['var_type'] + " lv_obj_get_style_" + p['name'].lower() +"(const struct _lv_obj_t * obj, uint32_t part)") + print("{") + print(" lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_" + p['name'] + ");") + print(" return " + cast + "v." + p['style_type'] + ";") + print("}") + print("") + def get_func_cast(style): func_cast = "" - if style['style_type'] == 'func': - func_cast = "(void (*)(void))" - elif style['style_type'] == 'num': + if style == 'func': + func_cast = "(void (*)(void))" + elif style == 'num': func_cast = "(int32_t)" return func_cast -def style_set(i): - print("static inline void lv_style_set_" + props[i]['name'].lower() +"(lv_style_t * style, "+ props[i]['var_type'] +" value) {") - func_cast = get_func_cast(props[i]) - print(" lv_style_value_t v = {." + props[i]['style_type'] +" = " + func_cast + "value}; lv_style_set_prop(style, LV_STYLE_" + props[i]['name'] +", v); }") +def style_set(p): + func_cast = get_func_cast(p['style_type']) + print("static inline void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value)") + print("{") + print(" lv_style_value_t v = {") + print(" ." + p['style_type'] +" = " + func_cast + "value") + print(" };") + print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);") + print("}") print("") -def local_style_set(i): - print("static inline void lv_obj_set_style_" + props[i]['name'].lower() + "(struct _lv_obj_t * obj, uint32_t part, uint32_t state, " + props[i]['var_type'] +" value) {") - func_cast = get_func_cast(props[i]) - print(" lv_style_value_t v = {." + props[i]['style_type'] +" = " + func_cast + "value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_" + props[i]['name'] +", v); }") +def local_style_set(p): + func_cast = get_func_cast(p['style_type']) + print("static inline void lv_obj_set_style_" + p['name'].lower() + "(struct _lv_obj_t * obj, uint32_t part, uint32_t state, " + p['var_type'] +" value)") + print("{") + print(" lv_style_value_t v = {") + print(" ." + p['style_type'] +" = " + func_cast + "value") + print(" };") + print(" lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_" + p['name'] +", v);") + print("}") print("") - base_dir = os.path.abspath(os.path.dirname(__file__)) sys.stdout = open(base_dir + '/../src/lv_core/lv_obj_style_gen.h', 'w') -for i in range(len(props)): - obj_style_get(i) +for p in props: + obj_style_get(p) -for i in range(len(props)): - local_style_set(i) +for p in props: + local_style_set(p) sys.stdout = open(base_dir + '/../src/lv_misc/lv_style_gen.h', 'w') -for i in range(len(props)): - style_set(i) - +for p in props: + style_set(p) diff --git a/src/lv_core/lv_obj_style_gen.h b/src/lv_core/lv_obj_style_gen.h index 5521df82e..d05b68826 100644 --- a/src/lv_core/lv_obj_style_gen.h +++ b/src/lv_core/lv_obj_style_gen.h @@ -1,522 +1,1218 @@ -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_coord_t lv_obj_get_style_transform_width(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_WIDTH); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_transform_height(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_HEIGHT); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_transform_zoom(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ZOOM); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_transform_angle(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ANGLE); return (lv_coord_t) 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 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; } - -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 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_coord_t lv_obj_get_style_size(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SIZE); return (lv_coord_t) v.num; } - -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 lv_coord_t lv_obj_get_style_pad_top(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_TOP); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_pad_bottom(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_BOTTOM); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_pad_left(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_LEFT); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_pad_right(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_RIGHT); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_pad_row(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_ROW); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_COLUMN); return (lv_coord_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); 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; } - -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 (lv_opa_t) 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; } - -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; } - -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 (lv_grad_dir_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_bg_main_stop(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_STOP); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_bg_grad_stop(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_STOP); return (lv_coord_t) v.num; } - -static inline const void * lv_obj_get_style_bg_img_src(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_SRC); return (const void *) v.ptr; } - -static inline lv_opa_t lv_obj_get_style_bg_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_BG_IMG_OPA); return (lv_opa_t) v.num; } - -static inline lv_color_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR); return v.color; } - -static inline lv_color_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR_FILTERED); return v.color; } - -static inline lv_opa_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR_OPA); return (lv_opa_t) v.num; } - -static inline bool lv_obj_get_style_bg_img_tiled(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_TILED); return (bool) 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; } - -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; } - -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 (lv_opa_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_border_width(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_WIDTH); return (lv_coord_t) v.num; } - -static inline lv_border_side_t lv_obj_get_style_border_side(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_SIDE); return (lv_border_side_t) v.num; } - -static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_POST); 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); return (lv_coord_t) 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; } - -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; } - -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 (lv_opa_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_outline_pad(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_PAD); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_shadow_width(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_WIDTH); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_shadow_ofs_x(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_X); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_shadow_ofs_y(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_Y); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_shadow_spread(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_SPREAD); return (lv_coord_t) 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; } - -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; } - -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 (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); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_line_dash_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_DASH_WIDTH); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_line_dash_gap(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_GAP); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_line_rounded(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_ROUNDED); return (lv_coord_t) 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; } - -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; } - -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 (lv_opa_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_arc_width(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_WIDTH); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_arc_rounded(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_ROUNDED); return (lv_coord_t) v.num; } - -static inline lv_color_t lv_obj_get_style_arc_color(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR); return v.color; } - -static inline lv_color_t lv_obj_get_style_arc_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_ARC_COLOR_FILTERED); return v.color; } - -static inline lv_opa_t lv_obj_get_style_arc_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_OPA); return (lv_opa_t) v.num; } - -static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMG_SRC); return (const void *) v.ptr; } - -static inline const char * lv_obj_get_style_content_text(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_TEXT); return (const char *) 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 (lv_align_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_content_ofs_x(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OFS_X); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_content_ofs_y(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OFS_Y); return (lv_coord_t) v.num; } - -static inline lv_opa_t lv_obj_get_style_content_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OPA); return (lv_opa_t) v.num; } - -static inline const lv_font_t * lv_obj_get_style_content_font(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_FONT); return (const lv_font_t *) v.ptr; } - -static inline lv_color_t lv_obj_get_style_content_color(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_COLOR); return v.color; } - -static inline lv_color_t lv_obj_get_style_content_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_CONTENT_COLOR_FILTERED); return v.color; } - -static inline lv_coord_t lv_obj_get_style_content_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_CONTENT_LETTER_SPACE); return (lv_coord_t) v.num; } - -static inline lv_coord_t lv_obj_get_style_content_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_CONTENT_LINE_SPACE); return (lv_coord_t) v.num; } - -static inline lv_text_decor_t lv_obj_get_style_content_decor(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_DECOR); return (lv_text_decor_t) v.num; } - -static inline void lv_obj_set_style_radius(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_RADIUS, v); } - -static inline void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CLIP_CORNER, v); } - -static inline void lv_obj_set_style_transform_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_WIDTH, v); } - -static inline void lv_obj_set_style_transform_height(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_HEIGHT, v); } - -static inline void lv_obj_set_style_transform_zoom(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_ZOOM, v); } - -static inline void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_ANGLE, v); } - -static inline void lv_obj_set_style_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OPA, v); } - -static inline void lv_obj_set_style_color_filter_cb(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_filter_cb_t value) { - lv_style_value_t v = {.func = (void (*)(void))value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_COLOR_FILTER_CB, v); } - -static inline void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_COLOR_FILTER_OPA, v); } - -static inline void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t part, uint32_t state, uint32_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ANIM_TIME, v); } - -static inline void lv_obj_set_style_transition(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_style_transition_dsc_t * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSITION, v); } - -static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SIZE, v); } - -static inline void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_blend_mode_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BLEND_MODE, v); } - -static inline void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_TOP, v); } - -static inline void lv_obj_set_style_pad_bottom(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_BOTTOM, v); } - -static inline void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_LEFT, v); } - -static inline void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_RIGHT, v); } - -static inline void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_ROW, v); } - -static inline void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_COLUMN, v); } - -static inline void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_COLOR, v); } - -static inline void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_OPA, v); } - -static inline void lv_obj_set_style_bg_grad_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_COLOR, v); } - -static inline void lv_obj_set_style_bg_grad_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_grad_dir_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_DIR, v); } - -static inline void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_MAIN_STOP, v); } - -static inline void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_STOP, v); } - -static inline void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const void * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_SRC, v); } - -static inline void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_OPA, v); } - -static inline void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR, v); } - -static inline void lv_obj_set_style_bg_img_recolor_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR_FILTERED, v); } - -static inline void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR_OPA, v); } - -static inline void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_TILED, v); } - -static inline void lv_obj_set_style_border_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_COLOR, v); } - -static inline void lv_obj_set_style_border_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_OPA, v); } - -static inline void lv_obj_set_style_border_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_WIDTH, v); } - -static inline void lv_obj_set_style_border_side(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_border_side_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_SIDE, v); } - -static inline void lv_obj_set_style_border_post(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_POST, v); } - -static inline void lv_obj_set_style_text_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_COLOR, v); } - -static inline void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_OPA, v); } - -static inline void lv_obj_set_style_text_font(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_font_t * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_FONT, v); } - -static inline void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_LETTER_SPACE, v); } - -static inline void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_LINE_SPACE, v); } - -static inline void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_decor_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_DECOR, v); } - -static inline void lv_obj_set_style_text_align(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_align_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_ALIGN, v); } - -static inline void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_OPA, v); } - -static inline void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR, v); } - -static inline void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR_FILTERED, v); } - -static inline void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR_OPA, v); } - -static inline void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_WIDTH, v); } - -static inline void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_COLOR, v); } - -static inline void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_outline_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_OPA, v); } - -static inline void lv_obj_set_style_outline_pad(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_PAD, v); } - -static inline void lv_obj_set_style_shadow_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_WIDTH, v); } - -static inline void lv_obj_set_style_shadow_ofs_x(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OFS_X, v); } - -static inline void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OFS_Y, v); } - -static inline void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_SPREAD, v); } - -static inline void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_COLOR, v); } - -static inline void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OPA, v); } - -static inline void lv_obj_set_style_line_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_WIDTH, v); } - -static inline void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_DASH_WIDTH, v); } - -static inline void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_DASH_GAP, v); } - -static inline void lv_obj_set_style_line_rounded(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_ROUNDED, v); } - -static inline void lv_obj_set_style_line_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_COLOR, v); } - -static inline void lv_obj_set_style_line_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_line_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_OPA, v); } - -static inline void lv_obj_set_style_arc_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_WIDTH, v); } - -static inline void lv_obj_set_style_arc_rounded(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_ROUNDED, v); } - -static inline void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_COLOR, v); } - -static inline void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_OPA, v); } - -static inline void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const void * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_IMG_SRC, v); } - -static inline void lv_obj_set_style_content_text(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const char * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_TEXT, v); } - -static inline void lv_obj_set_style_content_align(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_align_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_ALIGN, v); } - -static inline void lv_obj_set_style_content_ofs_x(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OFS_X, v); } - -static inline void lv_obj_set_style_content_ofs_y(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OFS_Y, v); } - -static inline void lv_obj_set_style_content_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OPA, v); } - -static inline void lv_obj_set_style_content_font(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_font_t * value) { - lv_style_value_t v = {.ptr = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_FONT, v); } - -static inline void lv_obj_set_style_content_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_COLOR, v); } - -static inline void lv_obj_set_style_content_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_COLOR_FILTERED, v); } - -static inline void lv_obj_set_style_content_letter_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_LETTER_SPACE, v); } - -static inline void lv_obj_set_style_content_line_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_LINE_SPACE, v); } - -static inline void lv_obj_set_style_content_decor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_decor_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_DECOR, v); } +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_coord_t lv_obj_get_style_transform_width(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_WIDTH); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_transform_height(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_HEIGHT); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_transform_zoom(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ZOOM); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_transform_angle(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ANGLE); + return (lv_coord_t)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 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; +} + +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 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_coord_t lv_obj_get_style_size(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SIZE); + return (lv_coord_t)v.num; +} + +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 lv_coord_t lv_obj_get_style_pad_top(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_TOP); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_pad_bottom(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_BOTTOM); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_pad_left(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_LEFT); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_pad_right(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_RIGHT); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_pad_row(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_ROW); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_COLUMN); + return (lv_coord_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); + 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; +} + +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 (lv_opa_t)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; +} + +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; +} + +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 (lv_grad_dir_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_bg_main_stop(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_STOP); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_bg_grad_stop(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_STOP); + return (lv_coord_t)v.num; +} + +static inline const void * lv_obj_get_style_bg_img_src(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_SRC); + return (const void *)v.ptr; +} + +static inline lv_opa_t lv_obj_get_style_bg_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_BG_IMG_OPA); + return (lv_opa_t)v.num; +} + +static inline lv_color_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR); + return v.color; +} + +static inline lv_color_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR_FILTERED); + return v.color; +} + +static inline lv_opa_t lv_obj_get_style_bg_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_BG_IMG_RECOLOR_OPA); + return (lv_opa_t)v.num; +} + +static inline bool lv_obj_get_style_bg_img_tiled(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMG_TILED); + return (bool)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; +} + +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; +} + +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 (lv_opa_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_border_width(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_WIDTH); + return (lv_coord_t)v.num; +} + +static inline lv_border_side_t lv_obj_get_style_border_side(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_SIDE); + return (lv_border_side_t)v.num; +} + +static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_POST); + 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); + return (lv_coord_t)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; +} + +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; +} + +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 (lv_opa_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_outline_pad(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_PAD); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_shadow_width(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_WIDTH); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_shadow_ofs_x(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_X); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_shadow_ofs_y(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFS_Y); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_shadow_spread(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_SPREAD); + return (lv_coord_t)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; +} + +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; +} + +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 (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); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_line_dash_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_DASH_WIDTH); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_line_dash_gap(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_GAP); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_line_rounded(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_ROUNDED); + return (lv_coord_t)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; +} + +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; +} + +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 (lv_opa_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_arc_width(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_WIDTH); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_arc_rounded(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_ROUNDED); + return (lv_coord_t)v.num; +} + +static inline lv_color_t lv_obj_get_style_arc_color(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR); + return v.color; +} + +static inline lv_color_t lv_obj_get_style_arc_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_ARC_COLOR_FILTERED); + return v.color; +} + +static inline lv_opa_t lv_obj_get_style_arc_opa(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_OPA); + return (lv_opa_t)v.num; +} + +static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMG_SRC); + return (const void *)v.ptr; +} + +static inline const char * lv_obj_get_style_content_text(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_TEXT); + return (const char *)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 (lv_align_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_content_ofs_x(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OFS_X); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_content_ofs_y(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OFS_Y); + return (lv_coord_t)v.num; +} + +static inline lv_opa_t lv_obj_get_style_content_opa(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_OPA); + return (lv_opa_t)v.num; +} + +static inline const lv_font_t * lv_obj_get_style_content_font(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_FONT); + return (const lv_font_t *)v.ptr; +} + +static inline lv_color_t lv_obj_get_style_content_color(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_COLOR); + return v.color; +} + +static inline lv_color_t lv_obj_get_style_content_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_CONTENT_COLOR_FILTERED); + return v.color; +} + +static inline lv_coord_t lv_obj_get_style_content_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_CONTENT_LETTER_SPACE); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_content_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_CONTENT_LINE_SPACE); + return (lv_coord_t)v.num; +} + +static inline lv_text_decor_t lv_obj_get_style_content_decor(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CONTENT_DECOR); + return (lv_text_decor_t)v.num; +} + +static inline void lv_obj_set_style_radius(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_RADIUS, v); +} + +static inline void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CLIP_CORNER, v); +} + +static inline void lv_obj_set_style_transform_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_WIDTH, v); +} + +static inline void lv_obj_set_style_transform_height(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_HEIGHT, v); +} + +static inline void lv_obj_set_style_transform_zoom(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_ZOOM, v); +} + +static inline void lv_obj_set_style_transform_angle(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSFORM_ANGLE, v); +} + +static inline void lv_obj_set_style_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OPA, v); +} + +static inline void lv_obj_set_style_color_filter_cb(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_filter_cb_t value) +{ + lv_style_value_t v = { + .func = (void (*)(void))value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_COLOR_FILTER_CB, v); +} + +static inline void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_COLOR_FILTER_OPA, v); +} + +static inline void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t part, uint32_t state, uint32_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ANIM_TIME, v); +} + +static inline void lv_obj_set_style_transition(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_style_transition_dsc_t * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TRANSITION, v); +} + +static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SIZE, v); +} + +static inline void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_blend_mode_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BLEND_MODE, v); +} + +static inline void lv_obj_set_style_pad_top(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_TOP, v); +} + +static inline void lv_obj_set_style_pad_bottom(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_BOTTOM, v); +} + +static inline void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_LEFT, v); +} + +static inline void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_RIGHT, v); +} + +static inline void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_ROW, v); +} + +static inline void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_PAD_COLUMN, v); +} + +static inline void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_COLOR, v); +} + +static inline void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_OPA, v); +} + +static inline void lv_obj_set_style_bg_grad_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_COLOR, v); +} + +static inline void lv_obj_set_style_bg_grad_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_grad_dir_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_DIR, v); +} + +static inline void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_MAIN_STOP, v); +} + +static inline void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_GRAD_STOP, v); +} + +static inline void lv_obj_set_style_bg_img_src(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const void * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_SRC, v); +} + +static inline void lv_obj_set_style_bg_img_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_OPA, v); +} + +static inline void lv_obj_set_style_bg_img_recolor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR, v); +} + +static inline void lv_obj_set_style_bg_img_recolor_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_bg_img_recolor_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_RECOLOR_OPA, v); +} + +static inline void lv_obj_set_style_bg_img_tiled(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BG_IMG_TILED, v); +} + +static inline void lv_obj_set_style_border_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_COLOR, v); +} + +static inline void lv_obj_set_style_border_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_OPA, v); +} + +static inline void lv_obj_set_style_border_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_WIDTH, v); +} + +static inline void lv_obj_set_style_border_side(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_border_side_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_SIDE, v); +} + +static inline void lv_obj_set_style_border_post(struct _lv_obj_t * obj, uint32_t part, uint32_t state, bool value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_BORDER_POST, v); +} + +static inline void lv_obj_set_style_text_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_COLOR, v); +} + +static inline void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_OPA, v); +} + +static inline void lv_obj_set_style_text_font(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_font_t * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_FONT, v); +} + +static inline void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_LETTER_SPACE, v); +} + +static inline void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_LINE_SPACE, v); +} + +static inline void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_decor_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_DECOR, v); +} + +static inline void lv_obj_set_style_text_align(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_align_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_TEXT_ALIGN, v); +} + +static inline void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_OPA, v); +} + +static inline void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR, v); +} + +static inline void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_IMG_RECOLOR_OPA, v); +} + +static inline void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_WIDTH, v); +} + +static inline void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_COLOR, v); +} + +static inline void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_outline_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_OPA, v); +} + +static inline void lv_obj_set_style_outline_pad(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_OUTLINE_PAD, v); +} + +static inline void lv_obj_set_style_shadow_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_WIDTH, v); +} + +static inline void lv_obj_set_style_shadow_ofs_x(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OFS_X, v); +} + +static inline void lv_obj_set_style_shadow_ofs_y(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OFS_Y, v); +} + +static inline void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_SPREAD, v); +} + +static inline void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_COLOR, v); +} + +static inline void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_SHADOW_OPA, v); +} + +static inline void lv_obj_set_style_line_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_WIDTH, v); +} + +static inline void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_DASH_WIDTH, v); +} + +static inline void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_DASH_GAP, v); +} + +static inline void lv_obj_set_style_line_rounded(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_ROUNDED, v); +} + +static inline void lv_obj_set_style_line_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_COLOR, v); +} + +static inline void lv_obj_set_style_line_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_line_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_LINE_OPA, v); +} + +static inline void lv_obj_set_style_arc_width(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_WIDTH, v); +} + +static inline void lv_obj_set_style_arc_rounded(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_ROUNDED, v); +} + +static inline void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_COLOR, v); +} + +static inline void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_OPA, v); +} + +static inline void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const void * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_ARC_IMG_SRC, v); +} + +static inline void lv_obj_set_style_content_text(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const char * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_TEXT, v); +} + +static inline void lv_obj_set_style_content_align(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_align_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_ALIGN, v); +} + +static inline void lv_obj_set_style_content_ofs_x(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OFS_X, v); +} + +static inline void lv_obj_set_style_content_ofs_y(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OFS_Y, v); +} + +static inline void lv_obj_set_style_content_opa(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_opa_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_OPA, v); +} + +static inline void lv_obj_set_style_content_font(struct _lv_obj_t * obj, uint32_t part, uint32_t state, const lv_font_t * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_FONT, v); +} + +static inline void lv_obj_set_style_content_color(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_COLOR, v); +} + +static inline void lv_obj_set_style_content_color_filtered(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_COLOR_FILTERED, v); +} + +static inline void lv_obj_set_style_content_letter_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_LETTER_SPACE, v); +} + +static inline void lv_obj_set_style_content_line_space(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_LINE_SPACE, v); +} + +static inline void lv_obj_set_style_content_decor(struct _lv_obj_t * obj, uint32_t part, uint32_t state, lv_text_decor_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_CONTENT_DECOR, v); +} diff --git a/src/lv_misc/lv_style_gen.h b/src/lv_misc/lv_style_gen.h index e4f1410b5..5527e8dcd 100644 --- a/src/lv_misc/lv_style_gen.h +++ b/src/lv_misc/lv_style_gen.h @@ -1,261 +1,696 @@ -static inline 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); } - -static inline 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); } - -static inline void lv_style_set_transform_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_TRANSFORM_WIDTH, v); } - -static inline void lv_style_set_transform_height(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_TRANSFORM_HEIGHT, v); } - -static inline void lv_style_set_transform_zoom(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_TRANSFORM_ZOOM, v); } - -static inline void lv_style_set_transform_angle(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_TRANSFORM_ANGLE, v); } - -static inline 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); } - -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); } - -static inline 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); } - -static inline 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); } - -static inline 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); } - -static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_SIZE, v); } - -static inline 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); } - -static inline void lv_style_set_pad_top(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_TOP, v); } - -static inline void lv_style_set_pad_bottom(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_BOTTOM, v); } - -static inline void lv_style_set_pad_left(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_LEFT, v); } - -static inline void lv_style_set_pad_right(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_RIGHT, v); } - -static inline void lv_style_set_pad_row(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_ROW, v); } - -static inline void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_PAD_COLUMN, 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); } - -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); } - -static inline void lv_style_set_bg_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_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); } - -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); } - -static inline void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_DIR, v); } - -static inline void lv_style_set_bg_main_stop(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BG_MAIN_STOP, v); } - -static inline void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BG_GRAD_STOP, v); } - -static inline void lv_style_set_bg_img_src(lv_style_t * style, const void * value) { - lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_BG_IMG_SRC, v); } - -static inline void lv_style_set_bg_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_BG_IMG_OPA, v); } - -static inline void lv_style_set_bg_img_recolor(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_BG_IMG_RECOLOR, v); } - -static inline void lv_style_set_bg_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_BG_IMG_RECOLOR_FILTERED, v); } - -static inline void lv_style_set_bg_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_BG_IMG_RECOLOR_OPA, v); } - -static inline void lv_style_set_bg_img_tiled(lv_style_t * style, bool value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BG_IMG_TILED, 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); } - -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); } - -static inline void lv_style_set_border_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_BORDER_OPA, v); } - -static inline void lv_style_set_border_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BORDER_WIDTH, v); } - -static inline void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BORDER_SIDE, v); } - -static inline void lv_style_set_border_post(lv_style_t * style, bool value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_BORDER_POST, 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); } - -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); } - -static inline 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); } - -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); } - -static inline 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); } - -static inline 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); } - -static inline 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); } - -static inline 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); } - -static inline 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); } - -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); } - -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); } - -static inline 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); } - -static inline void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)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); } - -static inline void lv_style_set_outline_color_filtered(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_COLOR_FILTERED, v); } - -static inline void lv_style_set_outline_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_OUTLINE_OPA, v); } - -static inline void lv_style_set_outline_pad(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_OUTLINE_PAD, v); } - -static inline void lv_style_set_shadow_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_SHADOW_WIDTH, v); } - -static inline void lv_style_set_shadow_ofs_x(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_SHADOW_OFS_X, v); } - -static inline void lv_style_set_shadow_ofs_y(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_SHADOW_OFS_Y, v); } - -static inline void lv_style_set_shadow_spread(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_SHADOW_SPREAD, 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); } - -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); } - -static inline void lv_style_set_shadow_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_SHADOW_OPA, v); } - -static inline void lv_style_set_line_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_LINE_WIDTH, v); } - -static inline void lv_style_set_line_dash_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_LINE_DASH_WIDTH, v); } - -static inline void lv_style_set_line_dash_gap(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_LINE_DASH_GAP, v); } - -static inline void lv_style_set_line_rounded(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)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); } - -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); } - -static inline void lv_style_set_line_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_LINE_OPA, v); } - -static inline void lv_style_set_arc_width(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_ARC_WIDTH, v); } - -static inline void lv_style_set_arc_rounded(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_ARC_ROUNDED, v); } - -static inline void lv_style_set_arc_color(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_ARC_COLOR, v); } - -static inline void lv_style_set_arc_color_filtered(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_ARC_COLOR_FILTERED, v); } - -static inline void lv_style_set_arc_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_ARC_OPA, v); } - -static inline void lv_style_set_arc_img_src(lv_style_t * style, const void * value) { - lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v); } - -static inline void lv_style_set_content_text(lv_style_t * style, const char * value) { - lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_TEXT, v); } - -static inline void lv_style_set_content_align(lv_style_t * style, lv_align_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_CONTENT_ALIGN, v); } - -static inline void lv_style_set_content_ofs_x(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_CONTENT_OFS_X, v); } - -static inline void lv_style_set_content_ofs_y(lv_style_t * style, lv_coord_t value) { - lv_style_value_t v = {.num = (int32_t)value}; lv_style_set_prop(style, LV_STYLE_CONTENT_OFS_Y, v); } - -static inline void lv_style_set_content_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_CONTENT_OPA, v); } - -static inline void lv_style_set_content_font(lv_style_t * style, const lv_font_t * value) { - lv_style_value_t v = {.ptr = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_FONT, v); } - -static inline void lv_style_set_content_color(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_COLOR, v); } - -static inline void lv_style_set_content_color_filtered(lv_style_t * style, lv_color_t value) { - lv_style_value_t v = {.color = value}; lv_style_set_prop(style, LV_STYLE_CONTENT_COLOR_FILTERED, v); } - -static inline void lv_style_set_content_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_CONTENT_LETTER_SPACE, v); } - -static inline void lv_style_set_content_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_CONTENT_LINE_SPACE, v); } - -static inline void lv_style_set_content_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_CONTENT_DECOR, v); } +static inline 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); +} + +static inline 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); +} + +static inline void lv_style_set_transform_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_TRANSFORM_WIDTH, v); +} + +static inline void lv_style_set_transform_height(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_TRANSFORM_HEIGHT, v); +} + +static inline void lv_style_set_transform_zoom(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_TRANSFORM_ZOOM, v); +} + +static inline void lv_style_set_transform_angle(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_TRANSFORM_ANGLE, v); +} + +static inline 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); +} + +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); +} + +static inline 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); +} + +static inline 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); +} + +static inline 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); +} + +static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_SIZE, v); +} + +static inline 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); +} + +static inline void lv_style_set_pad_top(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_TOP, v); +} + +static inline void lv_style_set_pad_bottom(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_BOTTOM, v); +} + +static inline void lv_style_set_pad_left(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_LEFT, v); +} + +static inline void lv_style_set_pad_right(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_RIGHT, v); +} + +static inline void lv_style_set_pad_row(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_ROW, v); +} + +static inline void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_PAD_COLUMN, 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); +} + +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); +} + +static inline void lv_style_set_bg_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_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); +} + +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); +} + +static inline void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BG_GRAD_DIR, v); +} + +static inline void lv_style_set_bg_main_stop(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BG_MAIN_STOP, v); +} + +static inline void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BG_GRAD_STOP, v); +} + +static inline void lv_style_set_bg_img_src(lv_style_t * style, const void * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_style_set_prop(style, LV_STYLE_BG_IMG_SRC, v); +} + +static inline void lv_style_set_bg_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_BG_IMG_OPA, v); +} + +static inline void lv_style_set_bg_img_recolor(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_BG_IMG_RECOLOR, v); +} + +static inline void lv_style_set_bg_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_BG_IMG_RECOLOR_FILTERED, v); +} + +static inline void lv_style_set_bg_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_BG_IMG_RECOLOR_OPA, v); +} + +static inline void lv_style_set_bg_img_tiled(lv_style_t * style, bool value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BG_IMG_TILED, 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); +} + +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); +} + +static inline void lv_style_set_border_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_BORDER_OPA, v); +} + +static inline void lv_style_set_border_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BORDER_WIDTH, v); +} + +static inline void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BORDER_SIDE, v); +} + +static inline void lv_style_set_border_post(lv_style_t * style, bool value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_BORDER_POST, 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); +} + +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); +} + +static inline 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); +} + +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); +} + +static inline 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); +} + +static inline 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); +} + +static inline 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); +} + +static inline 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); +} + +static inline 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); +} + +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); +} + +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); +} + +static inline 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); +} + +static inline void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)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); +} + +static inline void lv_style_set_outline_color_filtered(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_OUTLINE_COLOR_FILTERED, v); +} + +static inline void lv_style_set_outline_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_OUTLINE_OPA, v); +} + +static inline void lv_style_set_outline_pad(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_OUTLINE_PAD, v); +} + +static inline void lv_style_set_shadow_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_SHADOW_WIDTH, v); +} + +static inline void lv_style_set_shadow_ofs_x(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_SHADOW_OFS_X, v); +} + +static inline void lv_style_set_shadow_ofs_y(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_SHADOW_OFS_Y, v); +} + +static inline void lv_style_set_shadow_spread(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_SHADOW_SPREAD, 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); +} + +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); +} + +static inline void lv_style_set_shadow_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_SHADOW_OPA, v); +} + +static inline void lv_style_set_line_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_LINE_WIDTH, v); +} + +static inline void lv_style_set_line_dash_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_LINE_DASH_WIDTH, v); +} + +static inline void lv_style_set_line_dash_gap(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_LINE_DASH_GAP, v); +} + +static inline void lv_style_set_line_rounded(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)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); +} + +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); +} + +static inline void lv_style_set_line_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_LINE_OPA, v); +} + +static inline void lv_style_set_arc_width(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_ARC_WIDTH, v); +} + +static inline void lv_style_set_arc_rounded(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_ARC_ROUNDED, v); +} + +static inline void lv_style_set_arc_color(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_ARC_COLOR, v); +} + +static inline void lv_style_set_arc_color_filtered(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_ARC_COLOR_FILTERED, v); +} + +static inline void lv_style_set_arc_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_ARC_OPA, v); +} + +static inline void lv_style_set_arc_img_src(lv_style_t * style, const void * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v); +} + +static inline void lv_style_set_content_text(lv_style_t * style, const char * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_TEXT, v); +} + +static inline void lv_style_set_content_align(lv_style_t * style, lv_align_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_ALIGN, v); +} + +static inline void lv_style_set_content_ofs_x(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_OFS_X, v); +} + +static inline void lv_style_set_content_ofs_y(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_OFS_Y, v); +} + +static inline void lv_style_set_content_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_CONTENT_OPA, v); +} + +static inline void lv_style_set_content_font(lv_style_t * style, const lv_font_t * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_FONT, v); +} + +static inline void lv_style_set_content_color(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_COLOR, v); +} + +static inline void lv_style_set_content_color_filtered(lv_style_t * style, lv_color_t value) +{ + lv_style_value_t v = { + .color = value + }; + lv_style_set_prop(style, LV_STYLE_CONTENT_COLOR_FILTERED, v); +} + +static inline void lv_style_set_content_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_CONTENT_LETTER_SPACE, v); +} + +static inline void lv_style_set_content_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_CONTENT_LINE_SPACE, v); +} + +static inline void lv_style_set_content_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_CONTENT_DECOR, v); +}