1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00
lvgl/src/lv_themes/lv_theme.c
2020-01-06 22:14:04 +01:00

70 lines
1.2 KiB
C

/**
* @file lv_theme.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_theme.h"
#include "../lv_core/lv_obj.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static lv_theme_t * act_theme;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Set a theme for the system.
* From now, all the created objects will use styles from this theme by default
* @param th pointer to theme (return value of: 'lv_theme_init_xxx()')
*/
void lv_theme_set_act(lv_theme_t * th)
{
act_theme = th;
}
/**
* Get the current system theme.
* @return pointer to the current system theme. NULL if not set.
*/
lv_theme_t * lv_theme_get_act(void)
{
return act_theme;
}
lv_style_t * lv_theme_get_style(lv_theme_style_t name)
{
return act_theme->get_style_cb(name);
}
void lv_obj_add_style_theme(lv_obj_t * obj, uint8_t part, lv_theme_style_t name)
{
}
/**********************
* STATIC FUNCTIONS
**********************/