mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-02 09:37:42 +08:00
docs(style) minor style fix (#2818)
* fix(misc): avoid ;; after LV_ASSERT_STYLE/LV_ASSERT_OBJ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): remove the unused docs_prop_cnt variable and remove the trailing space Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): ensure the generated code follow the coding style Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> * fix(style_api_gen.py): ensure props has the same order of lv_style_prop_t and correct the style flags Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
+204
-362
File diff suppressed because it is too large
Load Diff
+113
-127
@@ -5,7 +5,7 @@ import sys, os, re
|
|||||||
props = [
|
props = [
|
||||||
{'section': 'Size and position', 'dsc':'Properties related to size, position, alignment and layout of the objects.' },
|
{'section': 'Size and position', 'dsc':'Properties related to size, position, alignment and layout of the objects.' },
|
||||||
{'name': 'WIDTH',
|
{'name': 'WIDTH',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':'widget dependent', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':'Widget dependent', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
'dsc': "Sets the width of object. Pixel, percentage and `LV_SIZE_CONTENT` values can be used. Percentage values are relative to the width of the parent's content area."},
|
'dsc': "Sets the width of object. Pixel, percentage and `LV_SIZE_CONTENT` values can be used. Percentage values are relative to the width of the parent's content area."},
|
||||||
|
|
||||||
{'name': 'MIN_WIDTH',
|
{'name': 'MIN_WIDTH',
|
||||||
@@ -17,7 +17,7 @@ props = [
|
|||||||
'dsc': "Sets a maximal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area."},
|
'dsc': "Sets a maximal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area."},
|
||||||
|
|
||||||
{'name': 'HEIGHT',
|
{'name': 'HEIGHT',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':'widget dependent', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':'Widget dependent', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
'dsc': "Sets the height of object. Pixel, percentage and `LV_SIZE_CONTENT` can be used. Percentage values are relative to the height of the parent's content area."},
|
'dsc': "Sets the height of object. Pixel, percentage and `LV_SIZE_CONTENT` can be used. Percentage values are relative to the height of the parent's content area."},
|
||||||
|
|
||||||
{'name': 'MIN_HEIGHT',
|
{'name': 'MIN_HEIGHT',
|
||||||
@@ -37,7 +37,7 @@ props = [
|
|||||||
'dsc': "Set the Y coordinate of the object considering the set `align`. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area."},
|
'dsc': "Set the Y coordinate of the object considering the set `align`. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area."},
|
||||||
|
|
||||||
{'name': 'ALIGN',
|
{'name': 'ALIGN',
|
||||||
'style_type': 'num', 'var_type': 'lv_align_t', 'default':'`LV_ALIGN_DEFAULT`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_align_t', 'default':'`LV_ALIGN_DEFAULT`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
'dsc': "Set the alignment which tells from which point of the parent the X and Y coordinates should be interpreted. The possible values are: `LV_ALIGN_DEFAULT`, `LV_ALIGN_TOP_LEFT/MID/RIGHT`, `LV_ALIGN_BOTTOM_LEFT/MID/RIGHT`, `LV_ALIGN_LEFT/RIGHT_MID`, `LV_ALIGN_CENTER`. `LV_ALIGN_DEFAULT` means `LV_ALIGN_TOP_LEFT` with LTR base direction and `LV_ALIGN_TOP_RIGHT` with RTL base direction."},
|
'dsc': "Set the alignment which tells from which point of the parent the X and Y coordinates should be interpreted. The possible values are: `LV_ALIGN_DEFAULT`, `LV_ALIGN_TOP_LEFT/MID/RIGHT`, `LV_ALIGN_BOTTOM_LEFT/MID/RIGHT`, `LV_ALIGN_LEFT/RIGHT_MID`, `LV_ALIGN_CENTER`. `LV_ALIGN_DEFAULT` means `LV_ALIGN_TOP_LEFT` with LTR base direction and `LV_ALIGN_TOP_RIGHT` with RTL base direction."},
|
||||||
|
|
||||||
{'name': 'TRANSFORM_WIDTH',
|
{'name': 'TRANSFORM_WIDTH',
|
||||||
@@ -74,7 +74,7 @@ props = [
|
|||||||
'dsc': "Sets the padding on the bottom. It makes the content area smaller in this direction."},
|
'dsc': "Sets the padding on the bottom. It makes the content area smaller in this direction."},
|
||||||
|
|
||||||
{'name': 'PAD_LEFT',
|
{'name': 'PAD_LEFT',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
'dsc': "Sets the padding on the left. It makes the content area smaller in this direction."},
|
'dsc': "Sets the padding on the left. It makes the content area smaller in this direction."},
|
||||||
|
|
||||||
{'name': 'PAD_RIGHT',
|
{'name': 'PAD_RIGHT',
|
||||||
@@ -89,53 +89,7 @@ props = [
|
|||||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
'dsc': "Sets the padding between the columns. Used by the layouts."},
|
'dsc': "Sets the padding between the columns. Used by the layouts."},
|
||||||
|
|
||||||
{'section': 'Miscellaneous', 'dsc':'Mixed proprites for various purposes.' },
|
{'section': 'Background', 'dsc':'Properties to describe the background color and image of the objects.' },
|
||||||
{'name': 'RADIUS',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the radius on every corner. The value is interpreted in pixel (>= 0) or `LV_RADIUS_CIRCLE` for max. radius"},
|
|
||||||
|
|
||||||
{'name': 'CLIP_CORNER',
|
|
||||||
'style_type': 'num', 'var_type': 'bool', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Enable to clip the overflowed content on the rounded corner. Can be `true` or `false`." },
|
|
||||||
|
|
||||||
{'name': 'OPA',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Scale down all opacity values of the object by this factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency." },
|
|
||||||
|
|
||||||
{'name': 'COLOR_FILTER_DSC',
|
|
||||||
'style_type': 'ptr', 'var_type': 'const lv_color_filter_dsc_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Mix a color to all colors of the object." },
|
|
||||||
|
|
||||||
{'name': 'COLOR_FILTER_OPA',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_TRANSP`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "The intensity of mixing of color filter."},
|
|
||||||
|
|
||||||
{'name': 'ANIM_TIME',
|
|
||||||
'style_type': 'num', 'var_type': 'uint32_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "The animation time in milliseconds. It's meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more."},
|
|
||||||
|
|
||||||
{'name': 'ANIM_SPEED',
|
|
||||||
'style_type': 'num', 'var_type': 'uint32_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "The animation speed in pixel/sec. It's meaning is widget specific. E.g. scroll speed of label. See the widgets' documentation to learn more."},
|
|
||||||
|
|
||||||
{'name': 'TRANSITION',
|
|
||||||
'style_type': 'ptr', 'var_type': 'const lv_style_transition_dsc_t *' , 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "An initialized `lv_style_transition_dsc_t` to describe a transition."},
|
|
||||||
|
|
||||||
{'name': 'BLEND_MODE',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_blend_mode_t' , 'default':'`LV_BLEND_MODE_NORMAL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Describes how to blend the colors to the background. The possibel values are `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY`"},
|
|
||||||
|
|
||||||
{'name': 'LAYOUT',
|
|
||||||
'style_type': 'num', 'var_type': 'uint16_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the layout if the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts."},
|
|
||||||
|
|
||||||
{'name': 'BASE_DIR',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_base_dir_t', 'default':'`LV_BASE_DIR_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the base direction of the obejct. The possible values are `LV_BIDI_DIR_LTR/RTL/AUTO`."},
|
|
||||||
|
|
||||||
|
|
||||||
{'section': 'Background', 'dsc':'Properties for to describe the background color and image of the objects.' },
|
|
||||||
{'name': 'BG_COLOR',
|
{'name': 'BG_COLOR',
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0xffffff`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0xffffff`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
'dsc': "Set the background color of the object."},
|
'dsc': "Set the background color of the object."},
|
||||||
@@ -148,7 +102,7 @@ props = [
|
|||||||
'dsc': "Set the opacity of the background. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
'dsc': "Set the opacity of the background. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
||||||
|
|
||||||
{'name': 'BG_GRAD_COLOR',
|
{'name': 'BG_GRAD_COLOR',
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`LV_OPA_TRANSP`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0x000000`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
'dsc': "Set the gradient color of the background. Used only if `grad_dir` is not `LV_GRAD_DIR_NONE`"},
|
'dsc': "Set the gradient color of the background. Used only if `grad_dir` is not `LV_GRAD_DIR_NONE`"},
|
||||||
|
|
||||||
{'name': 'BG_GRAD_COLOR_FILTERED',
|
{'name': 'BG_GRAD_COLOR_FILTERED',
|
||||||
@@ -167,7 +121,7 @@ props = [
|
|||||||
'dsc': "Set the point from which the background's gradient color should start. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on"},
|
'dsc': "Set the point from which the background's gradient color should start. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on"},
|
||||||
|
|
||||||
{'name': 'BG_IMG_SRC',
|
{'name': 'BG_IMG_SRC',
|
||||||
'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
||||||
'dsc': "Set a background image. Can be a pointer to `lv_img_dsc_t`, a path to a file or an `LV_SYMBOL_...`"},
|
'dsc': "Set a background image. Can be a pointer to `lv_img_dsc_t`, a path to a file or an `LV_SYMBOL_...`"},
|
||||||
|
|
||||||
{'name': 'BG_IMG_OPA',
|
{'name': 'BG_IMG_OPA',
|
||||||
@@ -213,54 +167,6 @@ props = [
|
|||||||
'style_type': 'num', 'var_type': 'bool' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'bool' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
'dsc': "Sets whether the the border should be drawn before or after the children ar drawn. `true`: after children, `false`: before children"},
|
'dsc': "Sets whether the the border should be drawn before or after the children ar drawn. `true`: after children, `false`: before children"},
|
||||||
|
|
||||||
{'section': 'Text', 'dsc':'Properties to describe the propeties of text. All these properties are inherited.' },
|
|
||||||
{'name': 'TEXT_COLOR',
|
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0x000000`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Sets the color of the text."},
|
|
||||||
|
|
||||||
{'name': 'TEXT_COLOR_FILTERED',
|
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t'},
|
|
||||||
|
|
||||||
{'name': 'TEXT_OPA',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the opacity of the text. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
|
||||||
|
|
||||||
{'name': 'TEXT_FONT',
|
|
||||||
'style_type': 'ptr', 'var_type': 'const lv_font_t *', 'default':'`LV_FONT_DEFAULT`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the font of the text (a pointer `lv_font_t *`). "},
|
|
||||||
|
|
||||||
{'name': 'TEXT_LETTER_SPACE',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the letter space in pixels"},
|
|
||||||
|
|
||||||
{'name': 'TEXT_LINE_SPACE',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the line space in pixels."},
|
|
||||||
|
|
||||||
{'name': 'TEXT_DECOR',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_text_decor_t' , 'default':'`LV_TEXT_DECOR_NONE`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set decoration for the text. The possible values are `LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH`. OR-ed values can be used as well." },
|
|
||||||
|
|
||||||
{'name': 'TEXT_ALIGN',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_text_align_t' , 'default':'`LV_TEXT_ALIGN_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
|
||||||
'dsc': "Set how to align the lines of the text. Note that it doesn't align the object itself, only the lines inside the object. The possible values are `LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO`. `LV_TEXT_ALIGN_AUTO` detect the text base direction and uses left or right alignment accordingly"},
|
|
||||||
|
|
||||||
{'section': 'Image', 'dsc':'Properties to describe the images' },
|
|
||||||
{'name': 'IMG_OPA',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_COVER`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the opacity of an image. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
|
||||||
|
|
||||||
{'name': 'IMG_RECOLOR',
|
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0x000000`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set color to mixt to the image."},
|
|
||||||
|
|
||||||
{'name': 'IMG_RECOLOR_FILTERED',
|
|
||||||
'style_type': 'color', 'var_type': 'lv_color_t'},
|
|
||||||
|
|
||||||
{'name': 'IMG_RECOLOR_OPA',
|
|
||||||
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
|
||||||
'dsc': "Set the intensity of the color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
|
||||||
|
|
||||||
{'section': 'Outline', 'dsc':'Properties to describe the outline. It\'s like a border but drawn outside of the rectangles.' },
|
{'section': 'Outline', 'dsc':'Properties to describe the outline. It\'s like a border but drawn outside of the rectangles.' },
|
||||||
{'name': 'OUTLINE_WIDTH',
|
{'name': 'OUTLINE_WIDTH',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
||||||
@@ -309,6 +215,22 @@ props = [
|
|||||||
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_COVER`', 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_COVER`', 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
||||||
'dsc': "Set the opacity of the shadow. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
'dsc': "Set the opacity of the shadow. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
||||||
|
|
||||||
|
{'section': 'Image', 'dsc':'Properties to describe the images' },
|
||||||
|
{'name': 'IMG_OPA',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_COVER`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the opacity of an image. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
||||||
|
|
||||||
|
{'name': 'IMG_RECOLOR',
|
||||||
|
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0x000000`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set color to mixt to the image."},
|
||||||
|
|
||||||
|
{'name': 'IMG_RECOLOR_FILTERED',
|
||||||
|
'style_type': 'color', 'var_type': 'lv_color_t'},
|
||||||
|
|
||||||
|
{'name': 'IMG_RECOLOR_OPA',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the intensity of the color mixing. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
||||||
|
|
||||||
{'section': 'Line', 'dsc':'Properties to describe line-like objects' },
|
{'section': 'Line', 'dsc':'Properties to describe line-like objects' },
|
||||||
{'name': 'LINE_WIDTH',
|
{'name': 'LINE_WIDTH',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
||||||
@@ -339,7 +261,7 @@ props = [
|
|||||||
|
|
||||||
{'section': 'Arc', 'dsc':'TODO' },
|
{'section': 'Arc', 'dsc':'TODO' },
|
||||||
{'name': 'ARC_WIDTH',
|
{'name': 'ARC_WIDTH',
|
||||||
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 1,
|
||||||
'dsc': "Set the width (ticjkness) of the arcs in pixel."},
|
'dsc': "Set the width (ticjkness) of the arcs in pixel."},
|
||||||
|
|
||||||
{'name': 'ARC_ROUNDED',
|
{'name': 'ARC_ROUNDED',
|
||||||
@@ -360,14 +282,93 @@ props = [
|
|||||||
{'name': 'ARC_IMG_SRC',
|
{'name': 'ARC_IMG_SRC',
|
||||||
'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
'style_type': 'ptr', 'var_type': 'const void *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
'dsc': "Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to `lv_img_dsc_t` or a path to a file"},
|
'dsc': "Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to `lv_img_dsc_t` or a path to a file"},
|
||||||
|
|
||||||
|
{'section': 'Text', 'dsc':'Properties to describe the propeties of text. All these properties are inherited.' },
|
||||||
|
{'name': 'TEXT_COLOR',
|
||||||
|
'style_type': 'color', 'var_type': 'lv_color_t', 'default':'`0x000000`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Sets the color of the text."},
|
||||||
|
|
||||||
|
{'name': 'TEXT_COLOR_FILTERED',
|
||||||
|
'style_type': 'color', 'var_type': 'lv_color_t'},
|
||||||
|
|
||||||
|
{'name': 'TEXT_OPA',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the opacity of the text. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency."},
|
||||||
|
|
||||||
|
{'name': 'TEXT_FONT',
|
||||||
|
'style_type': 'ptr', 'var_type': 'const lv_font_t *', 'default':'`LV_FONT_DEFAULT`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the font of the text (a pointer `lv_font_t *`). "},
|
||||||
|
|
||||||
|
{'name': 'TEXT_LETTER_SPACE',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the letter space in pixels"},
|
||||||
|
|
||||||
|
{'name': 'TEXT_LINE_SPACE',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_coord_t' , 'default':0, 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the line space in pixels."},
|
||||||
|
|
||||||
|
{'name': 'TEXT_DECOR',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_text_decor_t' , 'default':'`LV_TEXT_DECOR_NONE`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set decoration for the text. The possible values are `LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH`. OR-ed values can be used as well." },
|
||||||
|
|
||||||
|
{'name': 'TEXT_ALIGN',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_text_align_t' , 'default':'`LV_TEXT_ALIGN_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set how to align the lines of the text. Note that it doesn't align the object itself, only the lines inside the object. The possible values are `LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO`. `LV_TEXT_ALIGN_AUTO` detect the text base direction and uses left or right alignment accordingly"},
|
||||||
|
|
||||||
|
{'section': 'Miscellaneous', 'dsc':'Mixed proprites for various purposes.' },
|
||||||
|
{'name': 'RADIUS',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the radius on every corner. The value is interpreted in pixel (>= 0) or `LV_RADIUS_CIRCLE` for max. radius"},
|
||||||
|
|
||||||
|
{'name': 'CLIP_CORNER',
|
||||||
|
'style_type': 'num', 'var_type': 'bool', 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Enable to clip the overflowed content on the rounded corner. Can be `true` or `false`." },
|
||||||
|
|
||||||
|
{'name': 'OPA',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_opa_t', 'default':'`LV_OPA_COVER`', 'inherited': 1, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Scale down all opacity values of the object by this factor. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully transparent, 256, `LV_OPA_100` or `LV_OPA_COVER` means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency." },
|
||||||
|
|
||||||
|
{'name': 'COLOR_FILTER_DSC',
|
||||||
|
'style_type': 'ptr', 'var_type': 'const lv_color_filter_dsc_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Mix a color to all colors of the object." },
|
||||||
|
|
||||||
|
{'name': 'COLOR_FILTER_OPA',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_opa_t' , 'default':'`LV_OPA_TRANSP`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "The intensity of mixing of color filter."},
|
||||||
|
|
||||||
|
{'name': 'ANIM_TIME',
|
||||||
|
'style_type': 'num', 'var_type': 'uint32_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "The animation time in milliseconds. It's meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more."},
|
||||||
|
|
||||||
|
{'name': 'ANIM_SPEED',
|
||||||
|
'style_type': 'num', 'var_type': 'uint32_t' , 'default':0, 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "The animation speed in pixel/sec. It's meaning is widget specific. E.g. scroll speed of label. See the widgets' documentation to learn more."},
|
||||||
|
|
||||||
|
{'name': 'TRANSITION',
|
||||||
|
'style_type': 'ptr', 'var_type': 'const lv_style_transition_dsc_t *' , 'default':'`NULL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "An initialized `lv_style_transition_dsc_t` to describe a transition."},
|
||||||
|
|
||||||
|
{'name': 'BLEND_MODE',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_blend_mode_t' , 'default':'`LV_BLEND_MODE_NORMAL`', 'inherited': 0, 'layout': 0, 'ext_draw': 0,
|
||||||
|
'dsc': "Describes how to blend the colors to the background. The possibel values are `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY`"},
|
||||||
|
|
||||||
|
{'name': 'LAYOUT',
|
||||||
|
'style_type': 'num', 'var_type': 'uint16_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the layout if the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts."},
|
||||||
|
|
||||||
|
{'name': 'BASE_DIR',
|
||||||
|
'style_type': 'num', 'var_type': 'lv_base_dir_t', 'default':'`LV_BASE_DIR_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||||
|
'dsc': "Set the base direction of the obejct. The possible values are `LV_BIDI_DIR_LTR/RTL/AUTO`."},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def style_get_cast(style_type, var_type):
|
def style_get_cast(style_type, var_type):
|
||||||
cast = ""
|
cast = ""
|
||||||
if style_type != 'color':
|
if style_type != 'color':
|
||||||
cast = "(" + var_type + ")"
|
cast = "(" + var_type + ")"
|
||||||
return cast
|
return cast
|
||||||
|
|
||||||
|
|
||||||
def obj_style_get(p):
|
def obj_style_get(p):
|
||||||
if 'section' in p: return
|
if 'section' in p: return
|
||||||
|
|
||||||
@@ -379,16 +380,19 @@ def obj_style_get(p):
|
|||||||
print("}")
|
print("}")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
def style_set_cast(style_type):
|
def style_set_cast(style_type):
|
||||||
cast = ""
|
cast = ""
|
||||||
if style_type == 'num':
|
if style_type == 'num':
|
||||||
cast = "(int32_t)"
|
cast = "(int32_t)"
|
||||||
return cast
|
return cast
|
||||||
|
|
||||||
|
|
||||||
def style_set_c(p):
|
def style_set_c(p):
|
||||||
if 'section' in p: return
|
if 'section' in p: return
|
||||||
|
|
||||||
cast = style_set_cast(p['style_type'])
|
cast = style_set_cast(p['style_type'])
|
||||||
|
print("")
|
||||||
print("void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value)")
|
print("void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value)")
|
||||||
print("{")
|
print("{")
|
||||||
print(" lv_style_value_t v = {")
|
print(" lv_style_value_t v = {")
|
||||||
@@ -396,17 +400,19 @@ def style_set_c(p):
|
|||||||
print(" };")
|
print(" };")
|
||||||
print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);")
|
print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);")
|
||||||
print("}")
|
print("}")
|
||||||
print("")
|
|
||||||
|
|
||||||
def style_set_h(p):
|
def style_set_h(p):
|
||||||
if 'section' in p: return
|
if 'section' in p: return
|
||||||
|
|
||||||
print("void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value);")
|
print("void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value);")
|
||||||
|
|
||||||
|
|
||||||
def local_style_set_c(p):
|
def local_style_set_c(p):
|
||||||
if 'section' in p: return
|
if 'section' in p: return
|
||||||
|
|
||||||
cast = style_set_cast(p['style_type'])
|
cast = style_set_cast(p['style_type'])
|
||||||
|
print("")
|
||||||
print("void lv_obj_set_style_" + p['name'].lower() + "(struct _lv_obj_t * obj, " + p['var_type'] +" value, lv_style_selector_t selector)")
|
print("void lv_obj_set_style_" + p['name'].lower() + "(struct _lv_obj_t * obj, " + p['var_type'] +" value, lv_style_selector_t selector)")
|
||||||
print("{")
|
print("{")
|
||||||
print(" lv_style_value_t v = {")
|
print(" lv_style_value_t v = {")
|
||||||
@@ -414,7 +420,6 @@ def local_style_set_c(p):
|
|||||||
print(" };")
|
print(" };")
|
||||||
print(" lv_obj_set_local_style_prop(obj, LV_STYLE_" + p['name'] +", v, selector);")
|
print(" lv_obj_set_local_style_prop(obj, LV_STYLE_" + p['name'] +", v, selector);")
|
||||||
print("}")
|
print("}")
|
||||||
print("")
|
|
||||||
|
|
||||||
|
|
||||||
def local_style_set_h(p):
|
def local_style_set_h(p):
|
||||||
@@ -426,18 +431,13 @@ def style_const_set(p):
|
|||||||
if 'section' in p: return
|
if 'section' in p: return
|
||||||
|
|
||||||
cast = style_set_cast(p['style_type'])
|
cast = style_set_cast(p['style_type'])
|
||||||
|
print("")
|
||||||
print("#define LV_STYLE_CONST_" + p['name'] + "(val) \\")
|
print("#define LV_STYLE_CONST_" + p['name'] + "(val) \\")
|
||||||
print(" { \\")
|
print(" { \\")
|
||||||
print(" .prop = LV_STYLE_" + p['name'] + ", \\")
|
print(" .prop = LV_STYLE_" + p['name'] + ", .value = { ." + p['style_type'] +" = " + cast + "val } \\")
|
||||||
print(" .value = { \\")
|
|
||||||
print(" ." + p['style_type'] +" = " + cast + "val \\")
|
|
||||||
print(" } \\")
|
|
||||||
print(" }")
|
print(" }")
|
||||||
print("")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
docs_prop_cnt = 0
|
|
||||||
def docs(p):
|
def docs(p):
|
||||||
if "section" in p:
|
if "section" in p:
|
||||||
print("")
|
print("")
|
||||||
@@ -460,17 +460,8 @@ def docs(p):
|
|||||||
|
|
||||||
li_style = "style='display:inline; margin-right: 20px; margin-left: 0px"
|
li_style = "style='display:inline; margin-right: 20px; margin-left: 0px"
|
||||||
|
|
||||||
global docs_prop_cnt
|
dsc = p['dsc']
|
||||||
div_style = "padding: 16px;"
|
|
||||||
if docs_prop_cnt % 2:
|
|
||||||
div_style += " background-color:#eee;"
|
|
||||||
|
|
||||||
docs_prop_cnt+=1
|
|
||||||
|
|
||||||
dsc = p['dsc'];
|
|
||||||
|
|
||||||
print("")
|
|
||||||
#print("<div style=\"" + div_style +"\">");
|
|
||||||
print("")
|
print("")
|
||||||
print("### " + p["name"].lower())
|
print("### " + p["name"].lower())
|
||||||
print(dsc)
|
print(dsc)
|
||||||
@@ -481,8 +472,7 @@ def docs(p):
|
|||||||
print("<li " + li_style + "'><strong>Layout</strong> " + l + "</li>")
|
print("<li " + li_style + "'><strong>Layout</strong> " + l + "</li>")
|
||||||
print("<li " + li_style + "'><strong>Ext. draw</strong> " + e + "</li>")
|
print("<li " + li_style + "'><strong>Ext. draw</strong> " + e + "</li>")
|
||||||
print("</ul>")
|
print("</ul>")
|
||||||
#print("</div>")
|
|
||||||
print("")
|
|
||||||
|
|
||||||
base_dir = os.path.abspath(os.path.dirname(__file__))
|
base_dir = os.path.abspath(os.path.dirname(__file__))
|
||||||
sys.stdout = open(base_dir + '/../src/core/lv_obj_style_gen.h', 'w')
|
sys.stdout = open(base_dir + '/../src/core/lv_obj_style_gen.h', 'w')
|
||||||
@@ -502,7 +492,6 @@ for p in props:
|
|||||||
sys.stdout = open(base_dir + '/../src/misc/lv_style_gen.c', 'w')
|
sys.stdout = open(base_dir + '/../src/misc/lv_style_gen.c', 'w')
|
||||||
|
|
||||||
print("#include \"lv_style.h\"")
|
print("#include \"lv_style.h\"")
|
||||||
print("#include <stdbool.h>")
|
|
||||||
for p in props:
|
for p in props:
|
||||||
style_set_c(p)
|
style_set_c(p)
|
||||||
|
|
||||||
@@ -519,6 +508,3 @@ sys.stdout = open(base_dir + '/../docs/overview/style-props.md', 'w')
|
|||||||
print('# Style properties')
|
print('# Style properties')
|
||||||
for p in props:
|
for p in props:
|
||||||
docs(p)
|
docs(p)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -378,10 +378,11 @@ static inline lv_coord_t lv_obj_dpx(const lv_obj_t * obj, lv_coord_t n)
|
|||||||
|
|
||||||
#if LV_USE_ASSERT_OBJ
|
#if LV_USE_ASSERT_OBJ
|
||||||
# define LV_ASSERT_OBJ(obj_p, obj_class) \
|
# define LV_ASSERT_OBJ(obj_p, obj_class) \
|
||||||
|
do { \
|
||||||
LV_ASSERT_MSG(obj_p != NULL, "The object is NULL"); \
|
LV_ASSERT_MSG(obj_p != NULL, "The object is NULL"); \
|
||||||
LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
|
LV_ASSERT_MSG(lv_obj_has_class(obj_p, obj_class) == true, "Incompatible object type."); \
|
||||||
LV_ASSERT_MSG(lv_obj_is_valid(obj_p) == true, "The object is invalid, deleted or corrupted?");
|
LV_ASSERT_MSG(lv_obj_is_valid(obj_p) == true, "The object is invalid, deleted or corrupted?"); \
|
||||||
|
} while(0)
|
||||||
# else
|
# else
|
||||||
# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
|
# define LV_ASSERT_OBJ(obj_p, obj_class) do{}while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+184
-184
@@ -1,4 +1,5 @@
|
|||||||
#include "lv_obj.h"
|
#include "lv_obj.h"
|
||||||
|
|
||||||
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -167,94 +168,6 @@ void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_st
|
|||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_COLUMN, v, selector);
|
lv_obj_set_local_style_prop(obj, LV_STYLE_PAD_COLUMN, v, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -415,102 +328,6 @@ void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_s
|
|||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_POST, v, selector);
|
lv_obj_set_local_style_prop(obj, LV_STYLE_BORDER_POST, v, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -607,6 +424,38 @@ void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_styl
|
|||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector);
|
lv_obj_set_local_style_prop(obj, LV_STYLE_SHADOW_OPA, v, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_OPA, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_FILTERED, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_IMG_RECOLOR_OPA, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -711,3 +560,154 @@ void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv
|
|||||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMG_SRC, v, selector);
|
lv_obj_set_local_style_prop(obj, LV_STYLE_ARC_IMG_SRC, v, selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_COLOR_FILTERED, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_OPA, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_FONT, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LETTER_SPACE, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_LINE_SPACE, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_DECOR, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TEXT_ALIGN, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_RADIUS, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_CLIP_CORNER, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_DSC, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_COLOR_FILTER_OPA, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_TIME, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSITION, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_BLEND_MODE, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_LAYOUT, v, selector);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
|
||||||
|
}
|
||||||
|
|||||||
+161
-161
@@ -124,72 +124,6 @@ static inline lv_coord_t lv_obj_get_style_pad_column(const struct _lv_obj_t * ob
|
|||||||
return (lv_coord_t)v.num;
|
return (lv_coord_t)v.num;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS);
|
|
||||||
return (lv_coord_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER);
|
|
||||||
return (bool)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA);
|
|
||||||
return (lv_opa_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
|
|
||||||
return (const lv_color_filter_dsc_t *)v.ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA);
|
|
||||||
return (lv_opa_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t lv_obj_get_style_anim_time(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
|
|
||||||
return (uint32_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_SPEED);
|
|
||||||
return (uint32_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION);
|
|
||||||
return (const lv_style_transition_dsc_t *)v.ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE);
|
|
||||||
return (lv_blend_mode_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT);
|
|
||||||
return (uint16_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * obj, uint32_t part)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR);
|
|
||||||
return (lv_base_dir_t)v.num;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline lv_color_t lv_obj_get_style_bg_color(const struct _lv_obj_t * obj, uint32_t part)
|
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);
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR);
|
||||||
@@ -310,78 +244,6 @@ static inline bool lv_obj_get_style_border_post(const struct _lv_obj_t * obj, ui
|
|||||||
return (bool)v.num;
|
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)
|
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);
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_WIDTH);
|
||||||
@@ -454,6 +316,30 @@ static inline lv_opa_t lv_obj_get_style_shadow_opa(const struct _lv_obj_t * obj,
|
|||||||
return (lv_opa_t)v.num;
|
return (lv_opa_t)v.num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline lv_opa_t lv_obj_get_style_img_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_OPA);
|
||||||
|
return (lv_opa_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_color_t lv_obj_get_style_img_recolor(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR);
|
||||||
|
return v.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_color_t lv_obj_get_style_img_recolor_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_FILTERED);
|
||||||
|
return v.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_opa_t lv_obj_get_style_img_recolor_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMG_RECOLOR_OPA);
|
||||||
|
return (lv_opa_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
static inline lv_coord_t lv_obj_get_style_line_width(const struct _lv_obj_t * obj, uint32_t part)
|
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);
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_WIDTH);
|
||||||
@@ -532,6 +418,120 @@ static inline const void * lv_obj_get_style_arc_img_src(const struct _lv_obj_t *
|
|||||||
return (const void *)v.ptr;
|
return (const void *)v.ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline lv_color_t lv_obj_get_style_text_color(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR);
|
||||||
|
return v.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_color_t lv_obj_get_style_text_color_filtered(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR_FILTERED);
|
||||||
|
return v.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_opa_t lv_obj_get_style_text_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OPA);
|
||||||
|
return (lv_opa_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const lv_font_t * lv_obj_get_style_text_font(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT);
|
||||||
|
return (const lv_font_t *)v.ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_coord_t lv_obj_get_style_text_letter_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LETTER_SPACE);
|
||||||
|
return (lv_coord_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_coord_t lv_obj_get_style_text_line_space(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LINE_SPACE);
|
||||||
|
return (lv_coord_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_text_decor_t lv_obj_get_style_text_decor(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_DECOR);
|
||||||
|
return (lv_text_decor_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_text_align_t lv_obj_get_style_text_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_ALIGN);
|
||||||
|
return (lv_text_align_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_coord_t lv_obj_get_style_radius(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS);
|
||||||
|
return (lv_coord_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool lv_obj_get_style_clip_corner(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER);
|
||||||
|
return (bool)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA);
|
||||||
|
return (lv_opa_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
|
||||||
|
return (const lv_color_filter_dsc_t *)v.ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_opa_t lv_obj_get_style_color_filter_opa(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA);
|
||||||
|
return (lv_opa_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint32_t lv_obj_get_style_anim_time(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_TIME);
|
||||||
|
return (uint32_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint32_t lv_obj_get_style_anim_speed(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_SPEED);
|
||||||
|
return (uint32_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION);
|
||||||
|
return (const lv_style_transition_dsc_t *)v.ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE);
|
||||||
|
return (lv_blend_mode_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint16_t lv_obj_get_style_layout(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT);
|
||||||
|
return (uint16_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * obj, uint32_t part)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR);
|
||||||
|
return (lv_base_dir_t)v.num;
|
||||||
|
}
|
||||||
|
|
||||||
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
@@ -553,17 +553,6 @@ void lv_obj_set_style_pad_left(struct _lv_obj_t * obj, lv_coord_t value, lv_styl
|
|||||||
void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_pad_right(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_pad_row(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_bg_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_bg_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_bg_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
@@ -584,18 +573,6 @@ void lv_obj_set_style_border_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_styl
|
|||||||
void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_border_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_border_side(struct _lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_border_side(struct _lv_obj_t * obj, lv_border_side_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
void lv_obj_set_style_border_post(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
|
||||||
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_outline_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_outline_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_outline_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
@@ -608,6 +585,10 @@ void lv_obj_set_style_shadow_spread(struct _lv_obj_t * obj, lv_coord_t value, lv
|
|||||||
void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_shadow_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_shadow_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_shadow_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_img_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_img_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_img_recolor_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_img_recolor_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_line_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_line_dash_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_line_dash_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
@@ -621,3 +602,22 @@ void lv_obj_set_style_arc_color(struct _lv_obj_t * obj, lv_color_t value, lv_sty
|
|||||||
void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_arc_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
void lv_obj_set_style_arc_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector);
|
void lv_obj_set_style_arc_img_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_color(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_color_filtered(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_font(struct _lv_obj_t * obj, const lv_font_t * value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_letter_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_line_space(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_decor(struct _lv_obj_t * obj, lv_text_decor_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_text_align(struct _lv_obj_t * obj, lv_text_align_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
||||||
|
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ void lv_style_reset(lv_style_t * style)
|
|||||||
#if LV_USE_ASSERT_STYLE
|
#if LV_USE_ASSERT_STYLE
|
||||||
style->sentinel = LV_STYLE_SENTINEL_VALUE;
|
style->sentinel = LV_STYLE_SENTINEL_VALUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_style_prop_t lv_style_register_prop(void)
|
lv_style_prop_t lv_style_register_prop(void)
|
||||||
|
|||||||
+14
-10
@@ -14,6 +14,7 @@ extern "C" {
|
|||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "../font/lv_font.h"
|
#include "../font/lv_font.h"
|
||||||
#include "lv_color.h"
|
#include "lv_color.h"
|
||||||
#include "lv_area.h"
|
#include "lv_area.h"
|
||||||
@@ -411,7 +412,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop);
|
|||||||
/**
|
/**
|
||||||
* Checks if a style is empty (has no properties)
|
* Checks if a style is empty (has no properties)
|
||||||
* @param style pointer to a style
|
* @param style pointer to a style
|
||||||
* @return
|
* @return true if the style is empty
|
||||||
*/
|
*/
|
||||||
bool lv_style_is_empty(const lv_style_t * style);
|
bool lv_style_is_empty(const lv_style_t * style);
|
||||||
|
|
||||||
@@ -425,6 +426,12 @@ uint8_t _lv_style_get_prop_group(lv_style_prop_t prop);
|
|||||||
|
|
||||||
#include "lv_style_gen.h"
|
#include "lv_style_gen.h"
|
||||||
|
|
||||||
|
static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
||||||
|
{
|
||||||
|
lv_style_set_width(style, value);
|
||||||
|
lv_style_set_height(style, value);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void lv_style_set_pad_all(lv_style_t * style, lv_coord_t value)
|
static inline void lv_style_set_pad_all(lv_style_t * style, lv_coord_t value)
|
||||||
{
|
{
|
||||||
lv_style_set_pad_left(style, value);
|
lv_style_set_pad_left(style, value);
|
||||||
@@ -451,12 +458,6 @@ static inline void lv_style_set_pad_gap(lv_style_t * style, lv_coord_t value)
|
|||||||
lv_style_set_pad_column(style, value);
|
lv_style_set_pad_column(style, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
|
||||||
{
|
|
||||||
lv_style_set_width(style, value);
|
|
||||||
lv_style_set_height(style, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*************************
|
/*************************
|
||||||
* GLOBAL VARIABLES
|
* GLOBAL VARIABLES
|
||||||
@@ -467,10 +468,13 @@ static inline void lv_style_set_size(lv_style_t * style, lv_coord_t value)
|
|||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
#if LV_USE_ASSERT_STYLE
|
#if LV_USE_ASSERT_STYLE
|
||||||
# define LV_ASSERT_STYLE(style_p) LV_ASSERT_MSG(style_p != NULL, "The style is NULL"); \
|
# define LV_ASSERT_STYLE(style_p) \
|
||||||
LV_ASSERT_MSG(style_p->sentinel == LV_STYLE_SENTINEL_VALUE, "Style is not initialized or corrupted");
|
do { \
|
||||||
|
LV_ASSERT_MSG(style_p != NULL, "The style is NULL"); \
|
||||||
|
LV_ASSERT_MSG(style_p->sentinel == LV_STYLE_SENTINEL_VALUE, "Style is not initialized or corrupted"); \
|
||||||
|
} while(0)
|
||||||
#else
|
#else
|
||||||
# define LV_ASSERT_STYLE(p)
|
# define LV_ASSERT_STYLE(p) do{}while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
+184
-185
@@ -1,5 +1,5 @@
|
|||||||
#include "lv_style.h"
|
#include "lv_style.h"
|
||||||
#include <stdbool.h>
|
|
||||||
void lv_style_set_width(lv_style_t * style, lv_coord_t value)
|
void lv_style_set_width(lv_style_t * style, lv_coord_t value)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -168,94 +168,6 @@ void lv_style_set_pad_column(lv_style_t * style, lv_coord_t value)
|
|||||||
lv_style_set_prop(style, LV_STYLE_PAD_COLUMN, v);
|
lv_style_set_prop(style, LV_STYLE_PAD_COLUMN, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_style_set_radius(lv_style_t * style, lv_coord_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_RADIUS, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_clip_corner(lv_style_t * style, bool value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_CLIP_CORNER, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_opa(lv_style_t * style, lv_opa_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_OPA, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_DSC, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_ANIM_TIME, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_ANIM_SPEED, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TRANSITION, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_BLEND_MODE, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_layout(lv_style_t * style, uint16_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_LAYOUT, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_BASE_DIR, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_bg_color(lv_style_t * style, lv_color_t value)
|
void lv_style_set_bg_color(lv_style_t * style, lv_color_t value)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -416,102 +328,6 @@ void lv_style_set_border_post(lv_style_t * style, bool value)
|
|||||||
lv_style_set_prop(style, LV_STYLE_BORDER_POST, v);
|
lv_style_set_prop(style, LV_STYLE_BORDER_POST, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_style_set_text_color(lv_style_t * style, lv_color_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR_FILTERED, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_OPA, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.ptr = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_LETTER_SPACE, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_LINE_SPACE, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_DECOR, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_TEXT_ALIGN, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_IMG_OPA, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.color = value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_FILTERED, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value)
|
|
||||||
{
|
|
||||||
lv_style_value_t v = {
|
|
||||||
.num = (int32_t)value
|
|
||||||
};
|
|
||||||
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value)
|
void lv_style_set_outline_width(lv_style_t * style, lv_coord_t value)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -608,6 +424,38 @@ void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value)
|
|||||||
lv_style_set_prop(style, LV_STYLE_SHADOW_OPA, v);
|
lv_style_set_prop(style, LV_STYLE_SHADOW_OPA, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lv_style_set_img_opa(lv_style_t * style, lv_opa_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_IMG_OPA, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_img_recolor(lv_style_t * style, lv_color_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_img_recolor_filtered(lv_style_t * style, lv_color_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_FILTERED, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_img_recolor_opa(lv_style_t * style, lv_opa_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_IMG_RECOLOR_OPA, v);
|
||||||
|
}
|
||||||
|
|
||||||
void lv_style_set_line_width(lv_style_t * style, lv_coord_t value)
|
void lv_style_set_line_width(lv_style_t * style, lv_coord_t value)
|
||||||
{
|
{
|
||||||
lv_style_value_t v = {
|
lv_style_value_t v = {
|
||||||
@@ -712,3 +560,154 @@ void lv_style_set_arc_img_src(lv_style_t * style, const void * value)
|
|||||||
lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v);
|
lv_style_set_prop(style, LV_STYLE_ARC_IMG_SRC, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_color(lv_style_t * style, lv_color_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_color_filtered(lv_style_t * style, lv_color_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.color = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_COLOR_FILTERED, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_OPA, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_letter_space(lv_style_t * style, lv_coord_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_LETTER_SPACE, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_line_space(lv_style_t * style, lv_coord_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_LINE_SPACE, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_DECOR, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TEXT_ALIGN, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_radius(lv_style_t * style, lv_coord_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_RADIUS, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_clip_corner(lv_style_t * style, bool value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_CLIP_CORNER, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_opa(lv_style_t * style, lv_opa_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_OPA, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_DSC, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_COLOR_FILTER_OPA, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_anim_time(lv_style_t * style, uint32_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_ANIM_TIME, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_anim_speed(lv_style_t * style, uint32_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_ANIM_SPEED, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.ptr = value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_TRANSITION, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_BLEND_MODE, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_layout(lv_style_t * style, uint16_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_LAYOUT, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
|
||||||
|
{
|
||||||
|
lv_style_value_t v = {
|
||||||
|
.num = (int32_t)value
|
||||||
|
};
|
||||||
|
lv_style_set_prop(style, LV_STYLE_BASE_DIR, v);
|
||||||
|
}
|
||||||
|
|||||||
+204
-471
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user