theme_t

概述

主题。

负责管理缺省的主题数据,方便实现style_const。


函数

函数名称 说明
theme 获取缺省的主题对象。
theme_create 创建主题对象。
theme_deinit 析构主题对象。
theme_destroy 析构并释放主题对象。
theme_find_style 查找满足条件的style。
theme_init 初始化主题对象。
theme_set 设置缺省的主题对象。

theme 函数


  • 函数功能:

获取缺省的主题对象。

  • 函数原型:
  1. theme_t* theme ();
  • 参数说明:
参数 类型 说明
返回值 theme_t* 返回主题对象。

theme_create 函数


  • 函数功能:

创建主题对象。

  • 函数原型:
  1. theme_t* theme_create (const uint8_t* data);
  • 参数说明:
参数 类型 说明
返回值 theme_t* 返回主题对象。
data const uint8_t* 主题数据。

theme_deinit 函数


  • 函数功能:

析构主题对象。

  • 函数原型:
  1. ret_t theme_deinit (theme_t* theme);
  • 参数说明:
参数 类型 说明
返回值 ret_t 返回RET_OK表示成功,否则表示失败。
theme theme_t* 主题对象。

theme_destroy 函数


  • 函数功能:

析构并释放主题对象。

  • 函数原型:
  1. ret_t theme_destroy (theme_t* theme);
  • 参数说明:
参数 类型 说明
返回值 ret_t 返回RET_OK表示成功,否则表示失败。
theme theme_t* 主题对象。

theme_find_style 函数


  • 函数功能:

查找满足条件的style。

  • 函数原型:
  1. theme_t* theme_find_style (theme_t* data, const char* widget_type, const char* name, const char* widget_state);
  • 参数说明:
参数 类型 说明
返回值 theme_t* 返回主题对象。
data theme_t* 主题对象。
widget_type const char* 控件的类型名。
name const char* style的名称。
widget_state const char* 控件的状态。

theme_init 函数


  • 函数功能:

初始化主题对象。

  • 函数原型:
  1. theme_t* theme_init (theme_t* theme, const uint8_t* data);
  • 参数说明:
参数 类型 说明
返回值 theme_t* 返回主题对象。
theme theme_t* 主题对象。
data const uint8_t* 主题数据。

theme_set 函数


  • 函数功能:

设置缺省的主题对象。

  • 函数原型:
  1. ret_t theme_set (theme_t* theme);
  • 参数说明:
参数 类型 说明
返回值 ret_t 返回RET_OK表示成功,否则表示失败。
theme theme_t* 主题对象。