Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Jan 24, 2025
1 parent 62ec90c commit f009884
Show file tree
Hide file tree
Showing 48 changed files with 3,145 additions and 76 deletions.
139 changes: 139 additions & 0 deletions docs/manual/bitmap_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
| <a href="#bitmap_t_bitmap_clone">bitmap\_clone</a> | Clone图片。 |
| <a href="#bitmap_t_bitmap_create">bitmap\_create</a> | 创建图片对象(一般供脚本语言中使用)。 |
| <a href="#bitmap_t_bitmap_create_ex">bitmap\_create\_ex</a> | 创建图片对象。 |
| <a href="#bitmap_t_bitmap_create_ex2">bitmap\_create\_ex2</a> | 创建图片对象。 |
| <a href="#bitmap_t_bitmap_create_ex3">bitmap\_create\_ex3</a> | 创建图片对象。 |
| <a href="#bitmap_t_bitmap_deinit">bitmap\_deinit</a> | 反初始化图片。 |
| <a href="#bitmap_t_bitmap_destroy">bitmap\_destroy</a> | 销毁图片。 |
| <a href="#bitmap_t_bitmap_destroy_with_self">bitmap\_destroy\_with\_self</a> | 销毁图片(for script only)。 |
| <a href="#bitmap_t_bitmap_get_bpp">bitmap\_get\_bpp</a> | 获取图片一个像素占用的字节数。 |
Expand All @@ -21,12 +24,15 @@
| <a href="#bitmap_t_bitmap_get_pixel">bitmap\_get\_pixel</a> | 获取图片指定像素的rgba颜色值(主要用于测试程序)。 |
| <a href="#bitmap_t_bitmap_init">bitmap\_init</a> | 初始化图片。 |
| <a href="#bitmap_t_bitmap_init_ex">bitmap\_init\_ex</a> | 初始化图片。 |
| <a href="#bitmap_t_bitmap_init_ex2">bitmap\_init\_ex2</a> | 创建图片对象。 |
| <a href="#bitmap_t_bitmap_init_from_bgra">bitmap\_init\_from\_bgra</a> | 初始化图片。 |
| <a href="#bitmap_t_bitmap_init_from_rgba">bitmap\_init\_from\_rgba</a> | 初始化图片。 |
| <a href="#bitmap_t_bitmap_is_dirty">bitmap\_is\_dirty</a> | 获取图片是否脏。 |
| <a href="#bitmap_t_bitmap_lock_buffer_for_read">bitmap\_lock\_buffer\_for\_read</a> | 为读取数据而锁定bitmap的图片缓冲区。 |
| <a href="#bitmap_t_bitmap_lock_buffer_for_write">bitmap\_lock\_buffer\_for\_write</a> | 为修改数据而锁定bitmap的图片缓冲区。 |
| <a href="#bitmap_t_bitmap_mono_dump">bitmap\_mono\_dump</a> | dump mono bitmap。 |
| <a href="#bitmap_t_bitmap_save_png">bitmap\_save\_png</a> | 把bitmap保存为png。 |
| <a href="#bitmap_t_bitmap_set_dirty">bitmap\_set\_dirty</a> | 设置图片是否脏。 |
| <a href="#bitmap_t_bitmap_set_line_length">bitmap\_set\_line\_length</a> | 设置line_length。 |
| <a href="#bitmap_t_bitmap_transform">bitmap\_transform</a> | 对图片每个像素进行变换。 |
| <a href="#bitmap_t_bitmap_unlock_buffer">bitmap\_unlock\_buffer</a> | 解锁图像缓冲区。 |
Expand Down Expand Up @@ -102,6 +108,74 @@ bitmap_t* bitmap_create_ex (uint32_t w, uint32_t h, uint32_t line_length, bitmap
| h | uint32\_t | 高度。 |
| line\_length | uint32\_t | line\_length。 |
| format | bitmap\_format\_t | 格式。 |
#### bitmap\_create\_ex2 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_create_ex2">创建图片对象。
* 函数原型:

```
bitmap_t* bitmap_create_ex2 (uint32_t w, uint32_t h, uint32_t line_length, bitmap_format_t format, uint8_t* data, bool_t should_free_data);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | bitmap\_t* | 返回bitmap对象。 |
| w | uint32\_t | 宽度。 |
| h | uint32\_t | 高度。 |
| line\_length | uint32\_t | line\_length。 |
| format | bitmap\_format\_t | 格式。 |
| data | uint8\_t* | 图像数据。 |
| should\_free\_data | bool\_t | 是否释放数据。 |
#### bitmap\_create\_ex3 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_create_ex3">创建图片对象。
* 函数原型:

```
bitmap_t* bitmap_create_ex3 (uint32_t w, uint32_t h, uint32_t line_length, bitmap_format_t format, uint8_t* data, uint8_t* physical_data_addr, bool_t should_free_data);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | bitmap\_t* | 返回bitmap对象。 |
| w | uint32\_t | 宽度。 |
| h | uint32\_t | 高度。 |
| line\_length | uint32\_t | line\_length。 |
| format | bitmap\_format\_t | 格式。 |
| data | uint8\_t* | 图像数据。 |
| physical\_data\_addr | uint8\_t* | 物理地址(部分硬件加速需要)。 |
| should\_free\_data | bool\_t | 是否释放数据。 |
#### bitmap\_deinit 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_deinit">反初始化图片。
* 函数原型:

```
ret_t bitmap_deinit (bitmap_t* bitmap);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| bitmap | bitmap\_t* | bitmap对象。 |
#### bitmap\_destroy 函数
-----------------------

Expand Down Expand Up @@ -323,6 +397,32 @@ ret_t bitmap_init_ex (bitmap_t* bitmap, uint32_t w, uint32_t h, uint32_t line_le
| line\_length | uint32\_t | 行长。 |
| format | bitmap\_format\_t | 格式。 |
| data | uint8\_t* | 数据,直接引用,但不负责释放。如果为空,由内部自动分配和释放。 |
#### bitmap\_init\_ex2 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_init_ex2">创建图片对象。
* 函数原型:

```
ret_t bitmap_init_ex2 (bitmap_t* bitmap, uint32_t w, uint32_t h, uint32_t line_length, bitmap_format_t format, uint8_t* data, uint8_t* physical_data_addr, bool_t should_free_data);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| bitmap | bitmap\_t* | bitmap对象。 |
| w | uint32\_t | 宽度。 |
| h | uint32\_t | 高度。 |
| line\_length | uint32\_t | line\_length。 |
| format | bitmap\_format\_t | 格式。 |
| data | uint8\_t* | 图像数据。 |
| physical\_data\_addr | uint8\_t* | 物理地址(部分硬件加速需要)。 |
| should\_free\_data | bool\_t | 是否释放数据。 |
#### bitmap\_init\_from\_bgra 函数
-----------------------

Expand Down Expand Up @@ -373,6 +473,25 @@ ret_t bitmap_init_from_rgba (bitmap_t* bitmap, uint32_t w, uint32_t h, bitmap_fo
| data | const uint8\_t* | 数据。3通道时为RGB888格式,4通道时为RGBA888格式(内部拷贝该数据,不会引用,调用者自行释放)。 |
| comp | uint32\_t | 颜色通道数(目前支持3(rgb)和4(rgba))。 |
| o | lcd\_orientation\_t | 旋转方向。 |
#### bitmap\_is\_dirty 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_is_dirty">获取图片是否脏。
* 函数原型:

```
bool_t bitmap_is_dirty (bitmap_t* bitmap);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | bool\_t | 返回TRUE表示脏,FALSE表示不脏。 |
| bitmap | bitmap\_t* | bitmap对象。 |
#### bitmap\_lock\_buffer\_for\_read 函数
-----------------------

Expand Down Expand Up @@ -452,6 +571,26 @@ bool_t bitmap_save_png (bitmap_t* bitmap, const char* filename);
| 返回值 | bool\_t | 返回TRUE表示成功,FALSE表示失败。 |
| bitmap | bitmap\_t* | bitmap对象。 |
| filename | const char* | 文件名。 |
#### bitmap\_set\_dirty 函数
-----------------------

* 函数功能:

> <p id="bitmap_t_bitmap_set_dirty">设置图片是否脏。
* 函数原型:

```
ret_t bitmap_set_dirty (bitmap_t* bitmap, bool_t dirty);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| bitmap | bitmap\_t* | bitmap对象。 |
| dirty | bool\_t | 是否脏。 |
#### bitmap\_set\_line\_length 函数
-----------------------

Expand Down
38 changes: 38 additions & 0 deletions docs/manual/candidates_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
| <a href="#candidates_t_candidates_set_button_style">candidates\_set\_button\_style</a> | 设置按钮的style名称。 |
| <a href="#candidates_t_candidates_set_pre">candidates\_set\_pre</a> | 设置是否为预候选字列表。 |
| <a href="#candidates_t_candidates_set_select_by_num">candidates\_set\_select\_by\_num</a> | 设置是否启用用数字选择候选字。 |
| <a href="#candidates_t_candidates_set_visible_num">candidates\_set\_visible\_num</a> | 设置可见候选词个数。 |
### 属性
<p id="candidates_t_properties">

Expand All @@ -47,6 +48,7 @@
| <a href="#candidates_t_enable_preview">enable\_preview</a> | bool\_t | 是否启用候选字预览。 |
| <a href="#candidates_t_pre">pre</a> | bool\_t | 是否为预候选字。 |
| <a href="#candidates_t_select_by_num">select\_by\_num</a> | bool\_t | 是否启用用数字选择候选字。比如按下1选择第1个候选字,按下2选择第2个候选字。 |
| <a href="#candidates_t_visible_num">visible\_num</a> | uint32\_t | 候选字可见个数。 |
#### candidates\_cast 函数
-----------------------

Expand Down Expand Up @@ -189,6 +191,26 @@ ret_t candidates_set_select_by_num (widget_t* widget, bool_t select_by_num);
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| widget | widget\_t* | 控件对象。 |
| select\_by\_num | bool\_t | 是否启用用数字选择候选字。 |
#### candidates\_set\_visible\_num 函数
-----------------------

* 函数功能:

> <p id="candidates_t_candidates_set_visible_num">设置可见候选词个数。
* 函数原型:

```
ret_t candidates_set_visible_num (widget_t* widget, uint32_t visible_num);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
| widget | widget\_t* | 控件对象。 |
| visible\_num | uint32\_t | 可见个数。 |
#### auto\_hide 属性
-----------------------
> <p id="candidates_t_auto_hide">没有候选字时,是否自动隐藏控件。
Expand Down Expand Up @@ -272,3 +294,19 @@ ret_t candidates_set_select_by_num (widget_t* widget, bool_t select_by_num);
| 可在XML中设置 ||
| 可通过widget\_get\_prop读取 ||
| 可通过widget\_set\_prop修改 ||
#### visible\_num 属性
-----------------------
> <p id="candidates_t_visible_num">候选字可见个数。
* 类型:uint32\_t

| 特性 | 是否支持 |
| -------- | ----- |
| 可直接读取 ||
| 可直接修改 ||
| 可持久化 ||
| 可脚本化 ||
| 可在IDE中设置 ||
| 可在XML中设置 ||
| 可通过widget\_get\_prop读取 ||
| 可通过widget\_set\_prop修改 ||
8 changes: 4 additions & 4 deletions docs/manual/conf_node_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
| 属性名称 | 类型 | 说明 |
| -------- | ----- | ------------ |
| <a href="#conf_node_t_next">next</a> | conf\_node\_t* | 下一个兄弟节点。 |
| <a href="#conf_node_t_node_type">node\_type</a> | uint8\_t | 节点类型。 |
| <a href="#conf_node_t_node_type">node\_type</a> | conf\_node\_type\_t | 节点类型。 |
| <a href="#conf_node_t_parent">parent</a> | conf\_node\_t* | 父节点。 |
| <a href="#conf_node_t_value_type">value\_type</a> | uint8\_t | 值的类型。 |
| <a href="#conf_node_t_value_type">value\_type</a> | conf\_node\_value\_t | 值的类型。 |
#### conf\_doc\_foreach 函数
-----------------------

Expand Down Expand Up @@ -536,7 +536,7 @@ ret_t conf_node_set_value (conf_node_t* node, const value_t* v);
-----------------------
> <p id="conf_node_t_node_type">节点类型。
* 类型:uint8\_t
* 类型:conf\_node\_type\_t

#### parent 属性
-----------------------
Expand All @@ -548,5 +548,5 @@ ret_t conf_node_set_value (conf_node_t* node, const value_t* v);
-----------------------
> <p id="conf_node_t_value_type">值的类型。
* 类型:uint8\_t
* 类型:conf\_node\_value\_t

1 change: 1 addition & 0 deletions docs/manual/conf_node_value_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| CONF\_NODE\_VALUE\_UINT32 | uint32\_t类型。 |
| CONF\_NODE\_VALUE\_INT64 | int64\_t类型。 |
| CONF\_NODE\_VALUE\_UINT64 | uint64\_t类型。 |
| CONF\_NODE\_VALUE\_POINTER | 指针类型。 |
| CONF\_NODE\_VALUE\_FLOAT32 | float类型。 |
| CONF\_NODE\_VALUE\_DOUBLE | double类型。 |
| CONF\_NODE\_VALUE\_STRING | 字符串类型。 |
Expand Down
26 changes: 26 additions & 0 deletions docs/manual/debugger_t.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| <a href="#debugger_t_debugger_dispatch_messages">debugger\_dispatch\_messages</a> | dispatch_messages(仅适用于客户端) |
| <a href="#debugger_t_debugger_get_break_points">debugger\_get\_break\_points</a> | 获取断点列表。 |
| <a href="#debugger_t_debugger_get_callstack">debugger\_get\_callstack</a> | 获取当前线程的callstack。 |
| <a href="#debugger_t_debugger_get_callstack_ex">debugger\_get\_callstack\_ex</a> | 获取当前线程的callstack。 |
| <a href="#debugger_t_debugger_get_code">debugger\_get\_code</a> | 获取代码。 |
| <a href="#debugger_t_debugger_get_current_frame">debugger\_get\_current\_frame</a> | 获取当前callstack的frame。 |
| <a href="#debugger_t_debugger_get_current_thread_id">debugger\_get\_current\_thread\_id</a> | 获取当前线程 ID。 |
Expand Down Expand Up @@ -187,6 +188,31 @@ tk_object_t* debugger_get_callstack (debugger_t* debugger);
| -------- | ----- | --------- |
| 返回值 | tk\_object\_t* | 返回堆栈信息。 |
| debugger | debugger\_t* | debugger对象。 |
#### debugger\_get\_callstack\_ex 函数
-----------------------

* 函数功能:

> <p id="debugger_t_debugger_get_callstack_ex">获取当前线程的callstack。
备注:
1,如果 tk_object_t 的 callstack.#size 返回来的长度小于 levels 的话,就已经全部拿完了。
2,返回值和 debugger_get_callstack 是一样的。

* 函数原型:

```
tk_object_t* debugger_get_callstack_ex (debugger_t* debugger, uint32_t start, uint32_t levels, uint64_t thread_id);
```

* 参数说明:

| 参数 | 类型 | 说明 |
| -------- | ----- | --------- |
| 返回值 | tk\_object\_t* | 返回堆栈信息。 |
| debugger | debugger\_t* | debugger对象。 |
| start | uint32\_t | 堆栈 startFrame。 |
| levels | uint32\_t | 堆栈层数。(如果是输入 0 的话,就获取最大层数) |
| thread\_id | uint64\_t | 线程 id。 |
#### debugger\_get\_code 函数
-----------------------

Expand Down
Loading

0 comments on commit f009884

Please sign in to comment.