lv_obj.h
API reference for lv_obj.h
Functions
lv_obj_set_flag
Set add or remove one or more flags.
> Deprecated: Use the dedicated per-flag setter instead, e.g. lv_obj_set_hidden(obj, en).
void lv_obj_set_flag(lv_obj_t *obj, lv_obj_flag_t f, bool v)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
f | lv_obj_flag_t | OR-ed values from lv_obj_flag_t to update. |
v | bool | true: add the flags; false: remove the flags |
lv_obj_set_hidden
Make the object hidden. (Like it wasn't there at all)
void lv_obj_set_hidden(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the hidden property |
lv_obj_set_clickable
Make the object clickable by the input devices
void lv_obj_set_clickable(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the clickable property |
lv_obj_set_click_focusable
Add focused state to the object when clicked
void lv_obj_set_click_focusable(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the click focusable property |
lv_obj_set_checkable
Toggle checked state when the object is clicked
void lv_obj_set_checkable(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the checkable property |
lv_obj_set_scrollable
Make the object scrollable
void lv_obj_set_scrollable(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the scrollable property |
lv_obj_set_scroll_elastic
Allow scrolling inside but with slower speed
void lv_obj_set_scroll_elastic(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the scroll elastic property |
lv_obj_set_scroll_momentum
Make the object scroll further when "thrown"
void lv_obj_set_scroll_momentum(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the scroll momentum property |
lv_obj_set_scroll_one
Allow scrolling only one snappable child
void lv_obj_set_scroll_one(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the scroll one property |
lv_obj_set_scroll_chain
Allow propagating the scrolling in any directions to a parent
void lv_obj_set_scroll_chain(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable scroll chaining |
lv_obj_set_scroll_chain_hor
Allow propagating the horizontal scroll to a parent
void lv_obj_set_scroll_chain_hor(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable horizontal scroll chaining |
lv_obj_set_scroll_chain_ver
Allow propagating the vertical scroll to a parent
void lv_obj_set_scroll_chain_ver(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable vertical scroll chaining |
lv_obj_set_scroll_on_focus
Automatically scroll object to make it visible when focused
void lv_obj_set_scroll_on_focus(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable scroll on focus |
lv_obj_set_scroll_with_arrow
Allow scrolling the focused object with arrow keys
void lv_obj_set_scroll_with_arrow(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable scroll with arrow keys |
lv_obj_set_snappable
Allow snapping to this object if scroll snap is enabled on the parent
void lv_obj_set_snappable(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the snappable property |
lv_obj_set_press_lock
Keep the object pressed even if the press slid from the object
void lv_obj_set_press_lock(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable the press lock property |
lv_obj_set_event_bubble
Propagate the events to the parent too
void lv_obj_set_event_bubble(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable event bubbling |
lv_obj_set_gesture_bubble
Propagate the gestures to the parent
void lv_obj_set_gesture_bubble(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable gesture bubbling |
lv_obj_set_adv_hittest
Allow performing more accurate hit test
void lv_obj_set_adv_hittest(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable advanced hit testing |
lv_obj_set_ignore_layout
Make the object not positioned by layouts
void lv_obj_set_ignore_layout(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable ignoring layout |
lv_obj_set_floating
Do not scroll the object when the parent scrolls and ignore layout
void lv_obj_set_floating(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable floating mode |
lv_obj_set_send_draw_task_events
Send LV_EVENT_DRAW_TASK_ADDED events
void lv_obj_set_send_draw_task_events(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable draw task events |
lv_obj_set_overflow_visible
Do not clip the children to the parent's extended draw size
void lv_obj_set_overflow_visible(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable overflow visibility |
lv_obj_set_event_trickle
Propagate the events to the children too
void lv_obj_set_event_trickle(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable event trickling |
lv_obj_set_state_trickle
Propagate the states to the children too
void lv_obj_set_state_trickle(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable state trickling |
lv_obj_set_radio_button
Allow only one RADIO_BUTTON sibling to be checked
void lv_obj_set_radio_button(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable radio button behavior |
lv_obj_set_flex_in_new_track
Start a new flex track on this item
void lv_obj_set_flex_in_new_track(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | enable or disable new flex track |
lv_obj_set_state
Add or remove one or more states to the object. The other state bits will remain unchanged.
void lv_obj_set_state(lv_obj_t *obj, lv_state_t state, bool v)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
state | lv_state_t | the states to add. E.g `LV_STATE_PRESSED |
v | bool | true: add the states; false: remove the states |
lv_obj_set_alt
Add or remove LV_STATE_ALT. The other states remain unchanged.
void lv_obj_set_alt(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_checked
Add or remove LV_STATE_CHECKED. The other states remain unchanged.
void lv_obj_set_checked(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_focused
Add or remove LV_STATE_FOCUSED. The other states remain unchanged.
void lv_obj_set_focused(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_focus_key
Add or remove LV_STATE_FOCUS_KEY. The other states remain unchanged.
void lv_obj_set_focus_key(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_edited
Add or remove LV_STATE_EDITED. The other states remain unchanged.
void lv_obj_set_edited(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_hovered
Add or remove LV_STATE_HOVERED. The other states remain unchanged.
void lv_obj_set_hovered(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_pressed
Add or remove LV_STATE_PRESSED. The other states remain unchanged.
void lv_obj_set_pressed(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_scrolled
Add or remove LV_STATE_SCROLLED. The other states remain unchanged.
void lv_obj_set_scrolled(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_disabled
Add or remove LV_STATE_DISABLED. The other states remain unchanged.
void lv_obj_set_disabled(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_state_user_1
Add or remove LV_STATE_USER_1. The other states remain unchanged.
void lv_obj_set_state_user_1(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_state_user_2
Add or remove LV_STATE_USER_2. The other states remain unchanged.
void lv_obj_set_state_user_2(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_state_user_3
Add or remove LV_STATE_USER_3. The other states remain unchanged.
void lv_obj_set_state_user_3(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_state_user_4
Add or remove LV_STATE_USER_4. The other states remain unchanged.
void lv_obj_set_state_user_4(lv_obj_t *obj, bool en)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a widget |
en | bool | true: add the state; false: remove the state |
lv_obj_set_user_data
Set the user_data field of the object
void lv_obj_set_user_data(lv_obj_t *obj, void *user_data)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
user_data | void * | pointer to the new user_data. May be NULL. |
lv_obj_set_user_flag
Set one of the 4 flags available for the user
void lv_obj_set_user_flag(lv_obj_t *obj, uint32_t bit, bool v)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
bit | uint32_t | the index of the bit (0..3) |
v | bool | the value of the bit, true or false |
lv_obj_set_id
Set an id for an object.
void lv_obj_set_id(lv_obj_t *obj, void *id)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
id | void * | the id of the object May be NULL.. When NULL any previous id is dropped. |
lv_obj_get_state
Get the state of an object
lv_state_t lv_obj_get_state(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
Returns: lv_state_t — the state (OR-ed values from lv_state_t)
lv_obj_get_group
Get the group of the object
lv_group_t * lv_obj_get_group(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
Returns: lv_group_t * — the pointer to group of the object
lv_obj_get_user_data
Get the user_data field of the object
void * lv_obj_get_user_data(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
Returns: void * — the pointer to the user_data of the object
lv_obj_get_user_flag
Get the value of one of the 4 flags available for the user
bool lv_obj_get_user_flag(lv_obj_t *obj, uint32_t bit)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
bit | uint32_t | the index of the bit (0..3) |
Returns: bool — the value of the bit, true or false
lv_obj_get_class
Get the class (type) of the object
const lv_obj_class_t * lv_obj_get_class(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
Returns: const lv_obj_class_t * — the class (type) of the object
lv_obj_get_id
Get the id of an object.
void * lv_obj_get_id(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
Returns: void * — the id of the object
lv_obj_create
Create a base object (a rectangle)
lv_obj_t * lv_obj_create(lv_obj_t *parent)| Name | Type | Description |
|---|---|---|
parent | lv_obj_t * | pointer to a parent widget May be NULL.. When NULL, the widget is created as a screen on the default display. |
Returns: lv_obj_t * — pointer to the new object
lv_obj_add_flag
Set one or more flags
> Deprecated: Use the dedicated per-flag setter instead, e.g. lv_obj_set_hidden(obj, true).
void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
f | lv_obj_flag_t | OR-ed values from lv_obj_flag_t to set. |
lv_obj_remove_flag
Remove one or more flags
> Deprecated: Use the dedicated per-flag setter instead, e.g. lv_obj_set_hidden(obj, false).
void lv_obj_remove_flag(lv_obj_t *obj, lv_obj_flag_t f)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
f | lv_obj_flag_t | OR-ed values from lv_obj_flag_t to clear. |
lv_obj_add_state
Add one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current.
void lv_obj_add_state(lv_obj_t *obj, lv_state_t state)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
state | lv_state_t | the states to add. E.g `LV_STATE_PRESSED |
lv_obj_remove_state
Remove one or more states to the object. The other state bits will remain unchanged. If specified in the styles, transition animation will be started from the previous state to the current.
void lv_obj_remove_state(lv_obj_t *obj, lv_state_t state)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
state | lv_state_t | the states to add. E.g `LV_STATE_PRESSED |
lv_obj_has_flag
Check if a given flag or all the given flags are set on an object.
> Deprecated: Use the dedicated per-flag setter instead, e.g. lv_obj_is_hidden(obj).
bool lv_obj_has_flag(const lv_obj_t *obj, lv_obj_flag_t f)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
f | lv_obj_flag_t | the flag(s) to check (OR-ed values can be used) |
Returns: bool — true: all flags are set; false: not all flags are set
lv_obj_has_flag_any
Check if a given flag or any of the flags are set on an object.
> Deprecated: Use the dedicated per-flag setter instead, e.g. lv_obj_set_hidden(obj).
bool lv_obj_has_flag_any(const lv_obj_t *obj, lv_obj_flag_t f)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
f | lv_obj_flag_t | the flag(s) to check (OR-ed values can be used) |
Returns: bool — true: at least one flag is set; false: none of the flags are set
lv_obj_is_hidden
Get whether the object is hidden
bool lv_obj_is_hidden(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the object is hidden, false otherwise
lv_obj_is_clickable
Get whether the object is clickable by input devices
bool lv_obj_is_clickable(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the object is clickable
lv_obj_is_click_focusable
Get whether the object gets focused when clicked
bool lv_obj_is_click_focusable(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if click focusable is enabled
lv_obj_is_checkable
Get whether the object toggles checked state when clicked
bool lv_obj_is_checkable(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the object is checkable
lv_obj_is_scrollable
Get whether the object is scrollable
bool lv_obj_is_scrollable(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the object is scrollable
lv_obj_is_scroll_elastic
Get whether elastic scrolling is enabled
bool lv_obj_is_scroll_elastic(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if scroll elastic is enabled
lv_obj_is_scroll_momentum
Get whether scroll momentum is enabled
bool lv_obj_is_scroll_momentum(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if scroll momentum is enabled
lv_obj_is_scroll_one
Get whether only one snappable child can be scrolled
bool lv_obj_is_scroll_one(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if scroll one is enabled
lv_obj_is_scroll_chain_hor
Get whether horizontal scroll chaining is enabled
bool lv_obj_is_scroll_chain_hor(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if horizontal scroll chaining is enabled
lv_obj_is_scroll_chain_ver
Get whether vertical scroll chaining is enabled
bool lv_obj_is_scroll_chain_ver(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if vertical scroll chaining is enabled
lv_obj_is_scroll_on_focus
Get whether the object auto-scrolls into view when focused
bool lv_obj_is_scroll_on_focus(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if scroll on focus is enabled
lv_obj_is_scroll_with_arrow
Get whether the focused object can be scrolled with arrow keys
bool lv_obj_is_scroll_with_arrow(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if scroll with arrow keys is enabled
lv_obj_is_snappable
Get whether the object is snappable by a scrolling parent
bool lv_obj_is_snappable(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the object is snappable
lv_obj_is_press_lock
Get whether press lock is enabled
bool lv_obj_is_press_lock(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if press lock is enabled
lv_obj_is_event_bubble
Get whether events bubble to the parent
bool lv_obj_is_event_bubble(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if event bubbling is enabled
lv_obj_is_gesture_bubble
Get whether gestures bubble to the parent
bool lv_obj_is_gesture_bubble(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if gesture bubbling is enabled
lv_obj_is_adv_hittest
Get whether advanced hit testing is enabled
bool lv_obj_is_adv_hittest(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if advanced hit testing is enabled
lv_obj_is_ignore_layout
Get whether the object ignores layout positioning
bool lv_obj_is_ignore_layout(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if ignore layout is enabled
lv_obj_is_floating
Get whether the object is floating
bool lv_obj_is_floating(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if floating mode is enabled
lv_obj_is_send_draw_task_events
Get whether draw task events are sent
bool lv_obj_is_send_draw_task_events(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if draw task events are enabled
lv_obj_is_overflow_visible
Get whether overflow is visible outside the parent
bool lv_obj_is_overflow_visible(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if overflow is visible
lv_obj_is_event_trickle
Get whether events trickle to the children
bool lv_obj_is_event_trickle(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if event trickling is enabled
lv_obj_is_state_trickle
Get whether states trickle to the children
bool lv_obj_is_state_trickle(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if state trickling is enabled
lv_obj_is_radio_button
Get whether the object is a radio button
bool lv_obj_is_radio_button(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if radio button behavior is enabled
lv_obj_is_flex_in_new_track
Get whether the widget should be placed in a new flex track
bool lv_obj_is_flex_in_new_track(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if flex in new track is enabled
lv_obj_has_state
Check if the object is in a given state or not.
bool lv_obj_has_state(const lv_obj_t *obj, lv_state_t state)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
state | lv_state_t | a state or combination of states to check |
Returns: bool — true: obj is in state; false: obj is not in state
lv_obj_is_alt
Get whether the object is in LV_STATE_ALT
bool lv_obj_is_alt(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_checked
Get whether the object is in LV_STATE_CHECKED
bool lv_obj_is_checked(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_focused
Get whether the object is in LV_STATE_FOCUSED
bool lv_obj_is_focused(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_focus_key
Get whether the object is in LV_STATE_FOCUS_KEY
bool lv_obj_is_focus_key(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_edited
Get whether the object is in LV_STATE_EDITED
bool lv_obj_is_edited(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_hovered
Get whether the object is in LV_STATE_HOVERED
bool lv_obj_is_hovered(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_pressed
Get whether the object is in LV_STATE_PRESSED
bool lv_obj_is_pressed(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_scrolled
Get whether the object is in LV_STATE_SCROLLED
bool lv_obj_is_scrolled(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_disabled
Get whether the object is in LV_STATE_DISABLED
bool lv_obj_is_disabled(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_state_user_1
Get whether the object is in LV_STATE_USER_1
bool lv_obj_is_state_user_1(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_state_user_2
Get whether the object is in LV_STATE_USER_2
bool lv_obj_is_state_user_2(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_state_user_3
Get whether the object is in LV_STATE_USER_3
bool lv_obj_is_state_user_3(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_is_state_user_4
Get whether the object is in LV_STATE_USER_4
bool lv_obj_is_state_user_4(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to a widget |
Returns: bool — true if the state is set
lv_obj_check_type
Check the type of obj.
bool lv_obj_check_type(const lv_obj_t *obj, const lv_obj_class_t *class_p)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
class_p | const lv_obj_class_t * | a class to check (e.g. lv_slider_class) |
Returns: bool — true: class_p is the obj class.
lv_obj_has_class
Check if any object has a given class (type). It checks the ancestor classes too.
bool lv_obj_has_class(const lv_obj_t *obj, const lv_obj_class_t *class_p)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
class_p | const lv_obj_class_t * | a class to check (e.g. lv_slider_class) |
Returns: bool — true: obj has the given class
lv_obj_is_in_widget_tree
Walk up obj's parent chain to its root and check whether that root is present in some lv_display_t's screen list.
For any properly-created live object this returns true: the public API does not allow creating a screen without registering it on a display, nor detaching a subtree from its display. The function is therefore primarily a defensive check — it returns false for NULL, and (best-effort) for stale/corrupted pointers whose memory no longer reads back as a chain terminating at a registered screen. It is not a reliable use-after-free detector: freed memory may still satisfy the check by coincidence.
bool lv_obj_is_in_widget_tree(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object |
Returns: bool — true if the root of obj's parent chain is a registered screen
lv_obj_null_on_delete
Utility to set an object reference to NULL when it gets deleted. The reference should be in a location that will not become invalid during the object's lifetime, i.e. static or allocated.
void lv_obj_null_on_delete(lv_obj_t **obj_ptr)| Name | Type | Description |
|---|---|---|
obj_ptr | lv_obj_t ** | a pointer to a pointer to an object |
lv_obj_add_delete_cb
Attach a delete callback to an object.
The registered callback will be automatically invoked with user_data as its argument when the object is deleted, allowing associated resources to be released or any other cleanup logic to be executed by the callback.
This is a utility function that simplifies attaching an LV_EVENT_DELETE event callback to obj and passing user_data to that callback when the object is deleted.
The lv_delete_dsc_t returned by this function is automatically released when the object is deleted as well.
lv_delete_dsc_t * lv_obj_add_delete_cb(lv_obj_t *obj, lv_delete_cb_t cb, void *user_data)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | Pointer to the LVGL object to attach the delete callback to. |
cb | lv_delete_cb_t | The delete callback function to register. |
user_data | void * | User data pointer passed to cb when the object is deleted. May be NULL. |
Returns: lv_delete_dsc_t * — Pointer to the delete descriptor or NULL if the operation failed.
lv_obj_remove_delete_cb
Detach a delete callback from an object.
Removes a delete descriptor previously created via lv_obj_add_delete_cb
void lv_obj_remove_delete_cb(lv_delete_dsc_t *dsc)| Name | Type | Description |
|---|---|---|
dsc | lv_delete_dsc_t * | Pointer to the delete descriptor. Passing NULL results in a no-op May be NULL. |
lv_obj_add_screen_load_event
Add an event handler to a widget that will load a screen on a trigger.
void lv_obj_add_screen_load_event(lv_obj_t *obj, lv_event_code_t trigger, lv_obj_t *screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to widget which should load the screen |
trigger | lv_event_code_t | an event code, e.g. LV_EVENT_CLICKED |
screen | lv_obj_t * | the screen to load (must be a valid widget) |
anim_type | lv_screen_load_anim_t | element of lv_screen_load_anim_t the screen load animation |
duration | uint32_t | duration of the animation in milliseconds |
delay | uint32_t | delay before the screen load in milliseconds |
lv_obj_add_screen_create_event
Add an event handler to a widget that will create a screen on a trigger. The created screen will be deleted when it's unloaded
void lv_obj_add_screen_create_event(lv_obj_t *obj, lv_event_code_t trigger, lv_screen_create_cb_t screen_create_cb, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to widget which should load the screen |
trigger | lv_event_code_t | an event code, e.g. LV_EVENT_CLICKED |
screen_create_cb | lv_screen_create_cb_t | a callback to create the screen, e.g. lv_obj_t * myscreen_create(void) |
anim_type | lv_screen_load_anim_t | element of lv_screen_load_anim_t the screen load animation |
duration | uint32_t | duration of the animation in milliseconds |
delay | uint32_t | delay before the screen load in milliseconds |
lv_obj_add_play_timeline_event
Play a timeline animation on a trigger
void lv_obj_add_play_timeline_event(lv_obj_t *obj, lv_event_code_t trigger, lv_anim_timeline_t *at, uint32_t delay, bool reverse)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to widget which should trigger playing the animation |
trigger | lv_event_code_t | an event code, e.g. LV_EVENT_CLICKED |
at | lv_anim_timeline_t * | pointer to an animation timeline |
delay | uint32_t | wait time before starting the animation |
reverse | bool | true: play in reverse |
lv_obj_find_by_id
Get the child object by its id. It will check children and grandchildren recursively. Function lv_obj_id_compare is used to matched obj id with given id.
> Deprecated: IDs are used only to print the widget trees. To find a widget use lv_obj_find_by_name
lv_obj_t * lv_obj_find_by_id(const lv_obj_t *obj, const void *id)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to an object May be NULL.. When NULL the active screen is searched. |
id | const void * | the id of the child object |
Returns: lv_obj_t * — pointer to the child object or NULL if not found
lv_obj_assign_id
Assign id to object if not previously assigned. This function gets called automatically when LV_OBJ_ID_AUTO_ASSIGN is enabled.
Set LV_USE_OBJ_ID_BUILTIN to use the builtin method to generate object ID. Otherwise, these functions including lv_obj_[set|assign|free|stringify]_id and lv_obj_id_compareshould be implemented externally.
void lv_obj_assign_id(const lv_obj_class_t *class_p, lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
class_p | const lv_obj_class_t * | the class this obj belongs to. Note obj->class_p is the class currently being constructed. |
obj | lv_obj_t * | pointer to an object |
lv_obj_free_id
Free resources allocated by lv_obj_assign_id or lv_obj_set_id. This function is also called automatically when object is deleted.
void lv_obj_free_id(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
lv_obj_id_compare
Compare two obj id, return 0 if they are equal.
Set LV_USE_OBJ_ID_BUILTIN to use the builtin method for compare. Otherwise, it must be implemented externally.
int lv_obj_id_compare(const void *id1, const void *id2)| Name | Type | Description |
|---|---|---|
id1 | const void * | the first id May be NULL. |
id2 | const void * | the second id May be NULL. |
Returns: int — 0 if they are equal, non-zero otherwise.
lv_obj_stringify_id
Format an object's id into a string.
const char * lv_obj_stringify_id(lv_obj_t *obj, char *buf, uint32_t len)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
buf | char * | buffer to write the string into |
len | uint32_t | length of the buffer |
lv_objid_builtin_destroy
Free resources used by builtin ID generator.
void lv_objid_builtin_destroy(void)Enums
lv_obj_flag_t
On/Off features controlling the object's behavior. OR-ed values are possible
Note: update obj flags corresponding properties below whenever add/remove flags or change bit definition of flags.
| Name | Value | Description |
|---|---|---|
LV_OBJ_FLAG_HIDDEN | (1u << 0) | Make the object hidden. (Like it wasn't there at all) |
LV_OBJ_FLAG_CLICKABLE | (1u << 1) | Make the object clickable by the input devices |
LV_OBJ_FLAG_CLICK_FOCUSABLE | (1u << 2) | Add focused state to the object when clicked |
LV_OBJ_FLAG_CHECKABLE | (1u << 3) | Toggle checked state when the object is clicked |
LV_OBJ_FLAG_SCROLLABLE | (1u << 4) | Make the object scrollable |
LV_OBJ_FLAG_SCROLL_ELASTIC | (1u << 5) | Allow scrolling inside but with slower speed |
LV_OBJ_FLAG_SCROLL_MOMENTUM | (1u << 6) | Make the object scroll further when "thrown" |
LV_OBJ_FLAG_SCROLL_ONE | (1u << 7) | Allow scrolling only one snappable children |
LV_OBJ_FLAG_SCROLL_CHAIN_HOR | (1u << 8) | Allow propagating the horizontal scroll to a parent |
LV_OBJ_FLAG_SCROLL_CHAIN_VER | (1u << 9) | Allow propagating the vertical scroll to a parent |
LV_OBJ_FLAG_SCROLL_CHAIN | (LV_OBJ_FLAG_SCROLL_CHAIN_HOR | LV_OBJ_FLAG_SCROLL_CHAIN_VER) | |
LV_OBJ_FLAG_SCROLL_ON_FOCUS | (1u << 10) | Automatically scroll object to make it visible when focused |
LV_OBJ_FLAG_SCROLL_WITH_ARROW | (1u << 11) | Allow scrolling the focused object with arrow keys |
LV_OBJ_FLAG_SNAPPABLE | (1u << 12) | If scroll snap is enabled on the parent it can snap to this object |
LV_OBJ_FLAG_PRESS_LOCK | (1u << 13) | Keep the object pressed even if the press slid from the object |
LV_OBJ_FLAG_EVENT_BUBBLE | (1u << 14) | Propagate the events to the parent too |
LV_OBJ_FLAG_GESTURE_BUBBLE | (1u << 15) | Propagate the gestures to the parent |
LV_OBJ_FLAG_ADV_HITTEST | (1u << 16) | Allow performing more accurate hit (click) test. E.g. consider rounded corners. |
LV_OBJ_FLAG_IGNORE_LAYOUT | (1u << 17) | Make the object not positioned by the layouts |
LV_OBJ_FLAG_FLOATING | (1u << 18) | Do not scroll the object when the parent scrolls and ignore layout |
LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS | (1u << 19) | Send LV_EVENT_DRAW_TASK_ADDED events |
LV_OBJ_FLAG_OVERFLOW_VISIBLE | (1u << 20) | Do not clip the children to the parent's ext draw size |
LV_OBJ_FLAG_EVENT_TRICKLE | (1u << 21) | Propagate the events to the children too |
LV_OBJ_FLAG_STATE_TRICKLE | (1u << 22) | Propagate the states to the children too |
LV_OBJ_FLAG_LAYOUT_1 | (1u << 23) | Custom flag, free to use by layouts |
LV_OBJ_FLAG_LAYOUT_2 | (1u << 24) | Custom flag, free to use by layouts |
LV_OBJ_FLAG_FLEX_IN_NEW_TRACK | LV_OBJ_FLAG_LAYOUT_1 | Start a new flex track on this item |
LV_OBJ_FLAG_WIDGET_1 | (1u << 25) | Custom flag, free to use by widget |
LV_OBJ_FLAG_WIDGET_2 | (1u << 26) | Custom flag, free to use by widget |
LV_OBJ_FLAG_USER_1 | (1u << 27) | Custom flag, free to use by user |
LV_OBJ_FLAG_USER_2 | (1u << 28) | Custom flag, free to use by user |
LV_OBJ_FLAG_USER_3 | (1u << 29) | Custom flag, free to use by user |
LV_OBJ_FLAG_USER_4 | (1u << 30) | Custom flag, free to use by user |
Used by 11 functions
lv_obj_add_flag— paramflv_obj_remove_flag— paramflv_obj_set_flag— paramflv_obj_has_flag— paramflv_obj_has_flag_any— paramflv_obj_bind_flag_if_eq— paramflaglv_obj_bind_flag_if_not_eq— paramflaglv_obj_bind_flag_if_gt— paramflaglv_obj_bind_flag_if_ge— paramflaglv_obj_bind_flag_if_lt— paramflaglv_obj_bind_flag_if_le— paramflag
_lv_signed_prop_id_t
| Name | Value |
|---|---|
LV_PROPERTY_OBJ_FLAG_START | (LV_PROPERTY_OBJ_START + ((int) 0 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_HIDDEN | (LV_PROPERTY_OBJ_START + ((int) 0 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_CLICKABLE | (LV_PROPERTY_OBJ_START + ((int) 1 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_CLICK_FOCUSABLE | (LV_PROPERTY_OBJ_START + ((int) 2 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_CHECKABLE | (LV_PROPERTY_OBJ_START + ((int) 3 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLLABLE | (LV_PROPERTY_OBJ_START + ((int) 4 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_ELASTIC | (LV_PROPERTY_OBJ_START + ((int) 5 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_MOMENTUM | (LV_PROPERTY_OBJ_START + ((int) 6 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_ONE | (LV_PROPERTY_OBJ_START + ((int) 7 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_CHAIN_HOR | (LV_PROPERTY_OBJ_START + ((int) 8 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_CHAIN_VER | (LV_PROPERTY_OBJ_START + ((int) 9 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_ON_FOCUS | (LV_PROPERTY_OBJ_START + ((int) 10 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SCROLL_WITH_ARROW | (LV_PROPERTY_OBJ_START + ((int) 11 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SNAPPABLE | (LV_PROPERTY_OBJ_START + ((int) 12 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_PRESS_LOCK | (LV_PROPERTY_OBJ_START + ((int) 13 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_EVENT_BUBBLE | (LV_PROPERTY_OBJ_START + ((int) 14 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_GESTURE_BUBBLE | (LV_PROPERTY_OBJ_START + ((int) 15 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_ADV_HITTEST | (LV_PROPERTY_OBJ_START + ((int) 16 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_IGNORE_LAYOUT | (LV_PROPERTY_OBJ_START + ((int) 17 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_FLOATING | (LV_PROPERTY_OBJ_START + ((int) 18 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_SEND_DRAW_TASK_EVENTS | (LV_PROPERTY_OBJ_START + ((int) 19 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_OVERFLOW_VISIBLE | (LV_PROPERTY_OBJ_START + ((int) 20 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_EVENT_TRICKLE | (LV_PROPERTY_OBJ_START + ((int) 21 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_STATE_TRICKLE | (LV_PROPERTY_OBJ_START + ((int) 22 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_LAYOUT_1 | (LV_PROPERTY_OBJ_START + ((int) 23 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_LAYOUT_2 | (LV_PROPERTY_OBJ_START + ((int) 24 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_FLEX_IN_NEW_TRACK | (LV_PROPERTY_OBJ_START + ((int) 23 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_WIDGET_1 | (LV_PROPERTY_OBJ_START + ((int) 25 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_WIDGET_2 | (LV_PROPERTY_OBJ_START + ((int) 26 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_USER_1 | (LV_PROPERTY_OBJ_START + ((int) 27 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_USER_2 | (LV_PROPERTY_OBJ_START + ((int) 28 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_USER_3 | (LV_PROPERTY_OBJ_START + ((int) 29 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_USER_4 | (LV_PROPERTY_OBJ_START + ((int) 30 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_FLAG_END | (LV_PROPERTY_OBJ_START + ((int) 30 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_START | (LV_PROPERTY_OBJ_START + ((int) 31 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_ALT | (LV_PROPERTY_OBJ_START + ((int) 31 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_CHECKED | (LV_PROPERTY_OBJ_START + ((int) 33 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_FOCUSED | (LV_PROPERTY_OBJ_START + ((int) 34 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_FOCUS_KEY | (LV_PROPERTY_OBJ_START + ((int) 35 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_EDITED | (LV_PROPERTY_OBJ_START + ((int) 36 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_HOVERED | (LV_PROPERTY_OBJ_START + ((int) 37 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_PRESSED | (LV_PROPERTY_OBJ_START + ((int) 38 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_SCROLLED | (LV_PROPERTY_OBJ_START + ((int) 39 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_DISABLED | (LV_PROPERTY_OBJ_START + ((int) 40 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_USER_1 | (LV_PROPERTY_OBJ_START + ((int) 43 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_USER_2 | (LV_PROPERTY_OBJ_START + ((int) 44 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_USER_3 | (LV_PROPERTY_OBJ_START + ((int) 45 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_USER_4 | (LV_PROPERTY_OBJ_START + ((int) 46 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_ANY | (LV_PROPERTY_OBJ_START + ((int) 47 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_END | (LV_PROPERTY_OBJ_START + ((int) 47 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_PARENT | (LV_PROPERTY_OBJ_START + ((int) 48 )) | (( 8 ) << 28 ) |
LV_PROPERTY_OBJ_X | (LV_PROPERTY_OBJ_START + ((int) 49 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_Y | (LV_PROPERTY_OBJ_START + ((int) 50 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_W | (LV_PROPERTY_OBJ_START + ((int) 51 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_H | (LV_PROPERTY_OBJ_START + ((int) 52 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_CONTENT_WIDTH | (LV_PROPERTY_OBJ_START + ((int) 53 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_CONTENT_HEIGHT | (LV_PROPERTY_OBJ_START + ((int) 54 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_LAYOUT | (LV_PROPERTY_OBJ_START + ((int) 55 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_ALIGN | (LV_PROPERTY_OBJ_START + ((int) 56 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLLBAR_MODE | (LV_PROPERTY_OBJ_START + ((int) 57 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_DIR | (LV_PROPERTY_OBJ_START + ((int) 58 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_SNAP_X | (LV_PROPERTY_OBJ_START + ((int) 59 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_SNAP_Y | (LV_PROPERTY_OBJ_START + ((int) 60 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_X | (LV_PROPERTY_OBJ_START + ((int) 61 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_Y | (LV_PROPERTY_OBJ_START + ((int) 62 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_TOP | (LV_PROPERTY_OBJ_START + ((int) 63 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_BOTTOM | (LV_PROPERTY_OBJ_START + ((int) 64 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_LEFT | (LV_PROPERTY_OBJ_START + ((int) 65 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_RIGHT | (LV_PROPERTY_OBJ_START + ((int) 66 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_END | (LV_PROPERTY_OBJ_START + ((int) 67 )) | (( 4 ) << 28 ) |
LV_PROPERTY_OBJ_EXT_DRAW_SIZE | (LV_PROPERTY_OBJ_START + ((int) 68 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_EVENT_COUNT | (LV_PROPERTY_OBJ_START + ((int) 69 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_SCREEN | (LV_PROPERTY_OBJ_START + ((int) 70 )) | (( 8 ) << 28 ) |
LV_PROPERTY_OBJ_DISPLAY | (LV_PROPERTY_OBJ_START + ((int) 71 )) | (( 5 ) << 28 ) |
LV_PROPERTY_OBJ_CHILD_COUNT | (LV_PROPERTY_OBJ_START + ((int) 72 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_INDEX | (LV_PROPERTY_OBJ_START + ((int) 73 )) | (( 1 ) << 28 ) |
LV_PROPERTY_OBJ_HIDDEN | (LV_PROPERTY_OBJ_START + ((int) 74 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_CLICKABLE | (LV_PROPERTY_OBJ_START + ((int) 75 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_CLICK_FOCUSABLE | (LV_PROPERTY_OBJ_START + ((int) 76 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_CHECKABLE | (LV_PROPERTY_OBJ_START + ((int) 77 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLLABLE | (LV_PROPERTY_OBJ_START + ((int) 78 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_ELASTIC | (LV_PROPERTY_OBJ_START + ((int) 79 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_MOMENTUM | (LV_PROPERTY_OBJ_START + ((int) 80 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_ONE | (LV_PROPERTY_OBJ_START + ((int) 81 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_CHAIN_HOR | (LV_PROPERTY_OBJ_START + ((int) 82 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_CHAIN_VER | (LV_PROPERTY_OBJ_START + ((int) 83 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_ON_FOCUS | (LV_PROPERTY_OBJ_START + ((int) 84 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SCROLL_WITH_ARROW | (LV_PROPERTY_OBJ_START + ((int) 85 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SNAPPABLE | (LV_PROPERTY_OBJ_START + ((int) 86 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_PRESS_LOCK | (LV_PROPERTY_OBJ_START + ((int) 87 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_EVENT_BUBBLE | (LV_PROPERTY_OBJ_START + ((int) 88 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_GESTURE_BUBBLE | (LV_PROPERTY_OBJ_START + ((int) 89 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_ADV_HITTEST | (LV_PROPERTY_OBJ_START + ((int) 90 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_IGNORE_LAYOUT | (LV_PROPERTY_OBJ_START + ((int) 91 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_FLOATING | (LV_PROPERTY_OBJ_START + ((int) 92 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_SEND_DRAW_TASK_EVENTS | (LV_PROPERTY_OBJ_START + ((int) 93 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_OVERFLOW_VISIBLE | (LV_PROPERTY_OBJ_START + ((int) 94 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_EVENT_TRICKLE | (LV_PROPERTY_OBJ_START + ((int) 95 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_STATE_TRICKLE | (LV_PROPERTY_OBJ_START + ((int) 96 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_FLEX_IN_NEW_TRACK | (LV_PROPERTY_OBJ_START + ((int) 97 )) | (( 11 ) << 28 ) |
LV_PROPERTY_OBJ_NAME | (LV_PROPERTY_OBJ_START + ((int) 98 )) | (( 7 ) << 28 ) |
LV_PROPERTY_OBJ_END |
Typedefs
lv_delete_cb_t
typedef void(* lv_delete_cb_t) (void *user_data)Used by 1 function
lv_obj_add_delete_cb— paramcb
Macros
LV_ASSERT_OBJ
#define LV_ASSERT_OBJ(obj_p, obj_class) \
do { \
LV_DEPRECATED_MACRO_WARN("LV_ASSERT_OBJ is deprecated. Use LV_CHECK_OBJ instead."); \
LV_ASSERT_INTERNAL(obj_p != NULL, ""); \
LV_ASSERT_INTERNAL(lv_obj_has_class(obj_p, obj_class) == true, ""); \
LV_ASSERT_INTERNAL(lv_obj_is_in_widget_tree(obj_p) == true, ""); \
} while(0)> Deprecated: Use LV_CHECK_OBJ(obj, cls, return) instead. LV_ASSERT_OBJ aborts on failure; LV_CHECK_OBJ logs a warning and executes the supplied action, which is safer in production.
LV_TRACE_OBJ_CREATE
#define LV_TRACE_OBJ_CREATE(...) \
LV_LOG_TRACE(__VA_ARGS__)Variables
lv_obj_class
const lv_obj_class_t lv_obj_classMake the base object's class publicly available.
Dependencies
lv_observer.hlv_refr.hlv_snapshot.hlv_gridnav.hlv_indev_gesture.hlvgl.hlv_file_explorer.hlv_fragment.hlv_theme.hlv_3dtexture.hlv_arc.hlv_bar.hlv_button.hlv_buttonmatrix.hlv_calendar_header_arrow.hlv_calendar_header_dropdown.hlv_chart.hlv_checkbox.hlv_gstreamer.hlv_image.hlv_imagebutton.hlv_ime_pinyin.hlv_label.hlv_led.hlv_line.hlv_list.hlv_menu.hlv_msgbox.hlv_roller.hlv_scale.hlv_span.hlv_switch.hlv_tabview.hlv_tileview.hlv_win.h
Indirect dependencies
lv_anim.hlv_bidi.hlv_color_op.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj_style_gen.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_timer.h
Last updated on