2018-12-20 17:33:31 +08:00
|
|
|
|
## suggest\_words\_t
|
|
|
|
|
### 概述
|
2019-11-15 11:33:43 +08:00
|
|
|
|
输入法联想字词。
|
2019-01-15 14:34:05 +08:00
|
|
|
|
----------------------------------
|
2018-12-20 17:33:31 +08:00
|
|
|
|
### 函数
|
|
|
|
|
<p id="suggest_words_t_methods">
|
|
|
|
|
|
|
|
|
|
| 函数名称 | 说明 |
|
|
|
|
|
| -------- | ------------ |
|
2018-12-21 12:11:40 +08:00
|
|
|
|
| <a href="#suggest_words_t_suggest_words_create">suggest\_words\_create</a> | 创建联想字对象。 |
|
2019-12-14 13:25:56 +08:00
|
|
|
|
| <a href="#suggest_words_t_suggest_words_destroy">suggest\_words\_destroy</a> | @deconstructor |
|
2018-12-21 12:11:40 +08:00
|
|
|
|
| <a href="#suggest_words_t_suggest_words_find">suggest\_words\_find</a> | 查找prefix对应的联想字列表,成功后会更新words/words_nr。 |
|
2018-12-20 17:33:31 +08:00
|
|
|
|
### 属性
|
|
|
|
|
<p id="suggest_words_t_properties">
|
|
|
|
|
|
2019-01-17 15:56:15 +08:00
|
|
|
|
| 属性名称 | 类型 | 说明 |
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| -------- | ----- | ------------ |
|
|
|
|
|
#### suggest\_words\_create 函数
|
2018-12-21 18:29:29 +08:00
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2019-11-15 11:33:43 +08:00
|
|
|
|
> <p id="suggest_words_t_suggest_words_create">创建联想字对象。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
2023-06-29 10:44:29 +08:00
|
|
|
|
suggest_words_t* suggest_words_create (const asset_info_t* res);
|
2018-12-21 11:39:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | suggest\_words\_t* | 返回联想字对象。 |
|
2023-06-29 10:44:29 +08:00
|
|
|
|
| res | const asset\_info\_t* | 数据资源。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### suggest\_words\_destroy 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2019-12-14 13:25:56 +08:00
|
|
|
|
> <p id="suggest_words_t_suggest_words_destroy">@deconstructor
|
|
|
|
|
销毁联想字对象。
|
2018-12-20 17:33:31 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ret_t suggest_words_destroy (suggest_words_t* suggest_words);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
|
|
|
|
| suggest\_words | suggest\_words\_t* | 联想字对象。 |
|
2018-12-21 18:29:29 +08:00
|
|
|
|
#### suggest\_words\_find 函数
|
|
|
|
|
-----------------------
|
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数功能:
|
|
|
|
|
|
2019-11-15 11:33:43 +08:00
|
|
|
|
> <p id="suggest_words_t_suggest_words_find">查找prefix对应的联想字列表,成功后会更新words/words_nr。
|
2019-10-16 09:02:32 +08:00
|
|
|
|
|
2018-12-21 11:39:05 +08:00
|
|
|
|
* 函数原型:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
ret_t suggest_words_find (suggest_words_t* suggest_words, wchar_t c);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* 参数说明:
|
|
|
|
|
|
2018-12-20 17:33:31 +08:00
|
|
|
|
| 参数 | 类型 | 说明 |
|
|
|
|
|
| -------- | ----- | --------- |
|
|
|
|
|
| 返回值 | ret\_t | 返回RET\_OK表示成功,否则表示失败。 |
|
|
|
|
|
| suggest\_words | suggest\_words\_t* | 联想字对象。 |
|
|
|
|
|
| c | wchar\_t | 字符。 |
|