1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(style): make the code generated by style_api_gen.py confirm the coding style (#2093)

This commit is contained in:
Xiang Xiao 2021-02-23 07:01:46 -08:00 committed by GitHub
parent 6b1d25a140
commit 7f6a2eccea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1949 additions and 807 deletions

View File

@ -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)

File diff suppressed because it is too large Load Diff

View File

@ -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);
}