1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

lv_theme: add lv_theme_set_apply_cb (#1616)

This commit is contained in:
Amir Gonnen 2020-06-28 00:46:22 +03:00 committed by GitHub
parent 2d7423100a
commit 40daa7195d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -106,6 +106,17 @@ void lv_theme_set_base(lv_theme_t * new, lv_theme_t * base)
new->base = base;
}
/**
* Set a callback for a theme.
* The callback is used to add styles to different objects
* @param theme pointer to theme which callback should be set
* @param cb pointer to the callback
*/
void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb)
{
theme->apply_cb = apply_cb;
}
/**
* Get the small font of the theme
* @return pointer to the font

View File

@ -206,6 +206,14 @@ void lv_theme_copy(lv_theme_t * theme, const lv_theme_t * copy);
*/
void lv_theme_set_base(lv_theme_t * new, lv_theme_t * base);
/**
* Set an apply callback for a theme.
* The apply callback is used to add styles to different objects
* @param theme pointer to theme which callback should be set
* @param apply_cb pointer to the callback
*/
void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb);
/**
* Get the small font of the theme
* @return pointer to the font