lv_layout.h

Typedefs

typedef void (*lv_layout_update_cb_t)(lv_obj_t*, void *user_data)
typedef bool (*lv_layout_get_min_size_cb_t)(lv_obj_t*, int32_t *req_size, bool width, void *user_data)

Enums

enum lv_layout_t

Values:

enumerator LV_LAYOUT_NONE
enumerator LV_LAYOUT_FLEX
enumerator LV_LAYOUT_GRID
enumerator LV_LAYOUT_LAST

Functions

uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data)

Create a new layout

Parameters:
  • callbacks – the layout callbacks

  • user_data – custom data that will be passed when a callback is invoked

Returns:

the ID of the new layout

uint32_t lv_layout_register(lv_layout_update_cb_t cb, void *user_data)

DEPRECATED: lv_layout_register is deprecated. lv_layout_create should be used instead.

Register a new layout

Parameters:
  • cb – the layout update callback

  • user_data – custom data that will be passed to cb

Returns:

the ID of the new layout

struct lv_layout_callbacks_t

Public Members

lv_layout_update_cb_t layout_update_cb
lv_layout_get_min_size_cb_t get_min_size_cb