lv_xml_base_types.h¶
Functions
-
lv_state_t lv_xml_state_to_enum(const char *txt)¶
Convert an state string to enum
- Parameters:
txt – e.g. "pressed"
- Returns:
the related enum, e.g.
LV_STATE_PRESSED
-
int32_t lv_xml_to_size(const char *txt)¶
Process inputs "content", "32", "32px", or "25%" and convert them to integer
- Parameters:
txt – the input string
- Returns:
the integer size
-
lv_align_t lv_xml_align_to_enum(const char *txt)¶
Convert an align string to enum
- Parameters:
txt – e.g. "center"
- Returns:
the related enum, e.g.
LV_ALIGN_CENTER
-
lv_dir_t lv_xml_dir_to_enum(const char *txt)¶
Convert a direction string to enum
- Parameters:
txt – e.g. "top"
- Returns:
the related enum, e.g.
LV_DIR_TOP
-
lv_border_side_t lv_xml_border_side_to_enum(const char *txt)¶
Convert a direction string to enum
- Parameters:
txt – e.g. "top"
- Returns:
the related enum, e.g.
LV_BORDER_SIDE_TOP
-
lv_base_dir_t lv_xml_base_dir_to_enum(const char *txt)¶
Convert a base dir string to enum
- Parameters:
txt – e.g. "rtl"
- Returns:
the related enum, e.g.
LV_BASE_DIR_RTL
-
lv_grad_dir_t lv_xml_grad_dir_to_enum(const char *txt)¶
Convert a grad dir string to enum
- Parameters:
txt – e.g. "hor"
- Returns:
the related enum, e.g.
LV_GRAD_DIR_HOR
-
lv_text_align_t lv_xml_text_align_to_enum(const char *txt)¶
Convert a text align string to enum
- Parameters:
txt – e.g. "left"
- Returns:
the related enum, e.g.
LV_TEXT_ALIGN_LEFT
-
lv_text_decor_t lv_xml_text_decor_to_enum(const char *txt)¶
Convert a text decor string to enum
- Parameters:
txt – e.g. "underline"
- Returns:
the related enum, e.g.
LV_TEXT_DECOR_UNDERLINE
-
lv_scroll_snap_t lv_xml_scroll_snap_to_enum(const char *txt)¶
Convert a scroll snap string to enum
- Parameters:
txt – e.g. "start"
- Returns:
the related enum, e.g.
LV_SCROLL_SNAP_START
-
lv_scrollbar_mode_t lv_xml_scrollbar_mode_to_enum(const char *txt)¶
Convert a scrollbar mode string to enum
- Parameters:
txt – e.g. "active"
- Returns:
the related enum, e.g.
LV_SCROLLBAR_MODE_ACTIVE
-
lv_flex_flow_t lv_xml_flex_flow_to_enum(const char *txt)¶
Convert a flex flow string to enum
- Parameters:
txt – e.g. "row_wrap"
- Returns:
the related enum, e.g.
LV_FLEX_FLOW_ROW_WRAP
-
lv_flex_align_t lv_xml_flex_align_to_enum(const char *txt)¶
Convert a flex align string to enum
- Parameters:
txt – e.g. "space_between"
- Returns:
the related enum, e.g.
LV_FLEX_ALIGN_SPACE_BETWEEN
-
lv_grid_align_t lv_xml_grid_align_to_enum(const char *txt)¶
Convert a grid align string to enum
- Parameters:
txt – e.g. "space_between"
- Returns:
the related enum, e.g.
LV_GRID_ALIGN_SPACE_BETWEEN
-
lv_layout_t lv_xml_layout_to_enum(const char *txt)¶
Convert a layout string to enum
- Parameters:
txt – e.g. "flex"
- Returns:
the related enum, e.g.
LV_LAYOUT_FLEX
-
lv_blend_mode_t lv_xml_blend_mode_to_enum(const char *txt)¶
Convert a blend mode string to enum
- Parameters:
txt – e.g. "additive"
- Returns:
the related enum, e.g.
LV_BLEND_MODE_ADDITIVE
-
lv_event_code_t lv_xml_trigger_text_to_enum_value(const char *txt)¶
Convert an event trigger string to enum
- Parameters:
txt – e.g. "clicked"
- Returns:
the related enum, e.g.
LV_EVENT_CLICKED
-
lv_screen_load_anim_t lv_xml_screen_load_anim_text_to_enum_value(const char *txt)¶
Convert a screen animation type string to enum
- Parameters:
txt – e.g. "over_right"
- Returns:
the related enum, e.g.
LV_SCREEN_LOAD_ANIM_OVER_RIGHT
-
lv_style_prop_t lv_xml_style_prop_to_enum(const char *txt)¶
Convert a style property string to enum
- Parameters:
txt – e.g. "bg_color"
- Returns:
the related enum, e.g.
LV_STYLE_BG_COLORorLV_STYLE_PROP_INVif not found.
-
lv_state_t lv_xml_style_state_to_enum(const char *txt)¶
Convert a style state to enum
- Parameters:
txt – e.g. "pressed"
- Returns:
the enum
LV_STATE_PRESSED
-
lv_part_t lv_xml_style_part_to_enum(const char *txt)¶
Convert a style part to enum
- Parameters:
txt – e.g. "knob"
- Returns:
the enum
LV_PART_KNOB
-
lv_style_selector_t lv_xml_style_selector_text_to_enum(const char *str)¶
Convert ORed style parts and states to an ORed selector
- Parameters:
txt – e.g. "knob|pressed"
- Returns:
the enum
LV_PART_KNOB|LV_STATE_PRESSED