2018-12-20 17:33:31 +08:00
|
|
|
|
## theme\_t
|
|
|
|
|
### 概述
|
|
|
|
|
主题。
|
|
|
|
|
|
2018-12-30 11:49:59 +08:00
|
|
|
|
负责管理缺省的主题数据,方便实现style\_const。
|
|
|
|
|
|
|
|
|
|
|
2019-01-15 14:34:05 +08:00
|
|
|
|
|
|
|
|
|
----------------------------------
|
2018-12-20 17:33:31 +08:00
|
|
|
|
### 函数
|
|
|
|
|
<p id="theme_t_methods">
|
|
|
|
|
|
|
|
|
|
| 函数名称 | 说明 |
|
|
|
|
|
| -------- | ------------ |
|
2018-12-21 12:11:40 +08:00
|
|
|
|
| <a href="#theme_t_theme">theme</a> | 获取缺省的主题对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_create">theme\_create</a> | 创建主题对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_deinit">theme\_deinit</a> | 析构主题对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_destroy">theme\_destroy</a> | 析构并释放主题对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_find_style">theme\_find\_style</a> | 查找满足条件的style。 |
|
|
|
|
|
| <a href="#theme_t_theme_init">theme\_init</a> | 初始化主题对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_set">theme\_set</a> | 设置缺省的主题对象。 |
|
2018-12-20 17:33:31 +08:00
|
|
|
|
#### theme 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
|
|
|
|
> <p id="theme_t_theme"> 获取缺省的主题对象。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
theme_t* theme ();
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | theme\_t* | 返回主题对象。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_create 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_create"> 创建主题对象。
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
theme_t* theme_create (const uint8_t* data);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | theme\_t* | 返回主题对象。 |
|
|
|
|
|
| data | const uint8\_t* | 主题数据。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_deinit 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_deinit"> 析构主题对象。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ret_t theme_deinit (theme_t* theme);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
|
|
|
|
| theme | theme\_t* | 主题对象。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_destroy 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_destroy"> 析构并释放主题对象。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ret_t theme_destroy (theme_t* theme);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
|
|
|
|
| theme | theme\_t* | 主题对象。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_find\_style 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_find_style"> 查找满足条件的style。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2018-12-26 11:38:15 +08:00
|
|
|
|
theme_t* theme_find_style (theme_t* data, const char* widget_type, const char* name, const char* widget_state);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | theme\_t* | 返回主题对象。 |
|
|
|
|
|
| data | theme\_t* | 主题对象。 |
|
|
|
|
|
| widget\_type | const char* | 控件的类型名。 |
|
|
|
|
|
| name | const char* | style的名称。 |
|
2018-12-26 11:38:15 +08:00
|
|
|
|
| widget\_state | const char* | 控件的状态。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_init 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_init"> 初始化主题对象。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
theme_t* theme_init (theme_t* theme, const uint8_t* data);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | theme\_t* | 返回主题对象。 |
|
|
|
|
|
| theme | theme\_t* | 主题对象。 |
|
|
|
|
|
| data | const uint8\_t* | 主题数据。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### theme\_set 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2018-12-21 18:29:29 +08:00
|
|
|
|
> <p id="theme_t_theme_set"> 设置缺省的主题对象。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ret_t theme_set (theme_t* theme);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
|
|
|
|
| theme | theme\_t* | 主题对象。 |
|