2018-12-20 17:33:31 +08:00
|
|
|
|
## theme\_t
|
|
|
|
|
### 概述
|
2021-05-11 15:50:24 +08:00
|
|
|
|
窗体样式。
|
2019-12-14 13:25:56 +08:00
|
|
|
|
|
2021-05-11 15:50:24 +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">
|
|
|
|
|
|
|
|
|
|
| 函数名称 | 说明 |
|
|
|
|
|
| -------- | ------------ |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| <a href="#theme_t_theme">theme</a> | 获取缺省的窗体样式对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_default_create">theme\_default\_create</a> | 创建窗体样式对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_destroy">theme\_destroy</a> | 析构并释放窗体样式对象。 |
|
2018-12-21 12:11:40 +08:00
|
|
|
|
| <a href="#theme_t_theme_find_style">theme\_find\_style</a> | 查找满足条件的style。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| <a href="#theme_t_theme_get_style_type">theme\_get\_style\_type</a> | 获取窗体样式的风格类型。 |
|
|
|
|
|
| <a href="#theme_t_theme_set">theme\_set</a> | 设置缺省的窗体样式对象。 |
|
|
|
|
|
| <a href="#theme_t_theme_set_theme_data">theme\_set\_theme\_data</a> | 设置窗体样式的数据。 |
|
2018-12-20 17:33:31 +08:00
|
|
|
|
#### theme 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme">获取缺省的窗体样式对象。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
theme_t* theme ();
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| 返回值 | theme\_t* | 返回窗体样式对象。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
#### theme\_default\_create 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme_default_create">创建窗体样式对象。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
theme_t* theme_default_create (const uint8_t* data);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| 返回值 | theme\_t* | 返回窗体样式对象。 |
|
|
|
|
|
| data | const uint8\_t* | 窗体样式数据。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
#### theme\_destroy 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme_destroy">析构并释放窗体样式对象。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
ret_t theme_destroy (theme_t* theme);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| theme | theme\_t* | 窗体样式对象。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
#### theme\_find\_style 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-02-23 11:17:36 +08:00
|
|
|
|
> <p id="theme_t_theme_find_style">查找满足条件的style。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
const uint8_t* theme_find_style (theme_t* theme, 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
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
| 返回值 | const uint8\_t* | 返回风格对象数据。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| theme | theme\_t* | 窗体样式对象。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
| widget\_type | const char* | 控件的类型名。 |
|
|
|
|
|
| name | const char* | style的名称。 |
|
|
|
|
|
| widget\_state | const char* | 控件的状态。 |
|
|
|
|
|
#### theme\_get\_style\_type 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme_get_style_type">获取窗体样式的风格类型。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
const char* theme_get_style_type (theme_t* theme);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
| 返回值 | const char* | 返回风格类型。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| theme | theme\_t* | 窗体样式对象。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
#### theme\_set 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme_set">设置缺省的窗体样式对象。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
ret_t theme_set (theme_t* theme);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| theme | theme\_t* | 窗体样式对象。 |
|
2021-02-23 11:17:36 +08:00
|
|
|
|
#### theme\_set\_theme\_data 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2021-05-11 15:50:24 +08:00
|
|
|
|
> <p id="theme_t_theme_set_theme_data">设置窗体样式的数据。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2021-02-23 11:17:36 +08:00
|
|
|
|
ret_t theme_set_theme_data (theme_t* theme, const uint8_t* data);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
2021-05-11 15:50:24 +08:00
|
|
|
|
| theme | theme\_t* | 窗体样式对象。 |
|
|
|
|
|
| data | const uint8\_t* | 窗体样式数据。 |
|