lv_theme.h

API reference for lv_theme.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_theme_private.h

Functions

lv_theme_set_parent

Set a base theme for a theme. The styles from the base them will be added before the styles of the current theme. Arbitrary long chain of themes can be created by setting base themes.

 
void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent)
Parameters
NameTypeDescription
themelv_theme_t *pointer to theme which base should be set
parentlv_theme_t *pointer to the base theme

lv_theme_set_apply_cb

Set an apply callback for a theme. The apply callback is used to add styles to different objects

 
void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb)
Parameters
NameTypeDescription
themelv_theme_t *pointer to theme which callback should be set
apply_cblv_theme_apply_cb_tpointer to the callback

lv_theme_set_external_data

Attaches external user data and destructor callback to the theme.

Associates custom user data with an LVGL theme and specifies a destructor function that will be automatically invoked when the theme is deleted to properly clean up the associated resources.

 
void lv_theme_set_external_data(lv_theme_t *theme, void *data, void(*free_cb)(void *data))
Parameters
NameTypeDescription
themelv_theme_t *Pointer to theme which callback should be set
datavoid *User-defined data pointer to associate with the theme
free_cbvoid(*)(void *data)Callback function for cleaning up ext_data when theme is deleted. Receives ext_data as parameter. NULL means no cleanup required.

Typedefs

lv_theme_apply_cb_t

 
typedef void(* lv_theme_apply_cb_t) (lv_theme_t *, lv_obj_t *)
Used by 1 function
  • lv_theme_set_apply_cb — param apply_cb

Dependencies

How is this guide?

Last updated on

On this page