提交 52dfe72a 编写于 作者: H Hollokin

输入法框架API资料补充

Signed-off-by: NHollokin <taoyuxin2@huawei.com>
上级 ae36ff33
...@@ -22,7 +22,18 @@ import inputMethod from '@ohos.inputmethod'; ...@@ -22,7 +22,18 @@ import inputMethod from '@ohos.inputmethod';
| 名称 | 参数类型 | 可读 | 可写 | 说明 | | 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| MAX_TYPE_NUM | number | 是 | 否 | 可支持的最大输入法个数。 | | MAX_TYPE_NUM | number | 是 | 否 | 可支持的最大输入法个数。 |
| EXCEPTION_PERMISSION | number | 是 | 否 | 错误码。详见../errorcodes/errcode-inputmethod-framework.md,下同 |
| EXCEPTION_PARAMCHECK | number | 是 | 否 | 错误码。 |
| EXCEPTION_UNSUPPORTED | number | 是 | 否 | 错误码。 |
| EXCEPTION_PACKAGEMANAGER | number | 是 | 否 | 错误码。 |
| EXCEPTION_IMENGINE | number | 是 | 否 | 错误码。 |
| EXCEPTION_IMCLIENT | number | 是 | 否 | 错误码。 |
| EXCEPTION_KEYEVENT | number | 是 | 否 | 错误码。 |
| EXCEPTION_CONFPERSIST | number | 是 | 否 | 错误码。 |
| EXCEPTION_CONTROLLER | number | 是 | 否 | 错误码。 |
| EXCEPTION_SETTINGS | number | 是 | 否 | 错误码。 |
| EXCEPTION_IMMS | number | 是 | 否 | 错误码。 |
| EXCEPTION_OTHERS | number | 是 | 否 | 错误码。 |
## InputMethodProperty<sup>8+</sup> ## InputMethodProperty<sup>8+</sup>
...@@ -698,7 +709,8 @@ on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, input ...@@ -698,7 +709,8 @@ on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, input
**示例:** **示例:**
```js ```js
InputMethodEngine.on('imeChange', (inputMethodProperty, inputMethodSubtype) => { let InputMethodSetting = inputMethod.getSetting();
InputMethodSetting.on('imeChange', (inputMethodProperty, inputMethodSubtype) => {
InputMethodProperty = inputMethodProperty; InputMethodProperty = inputMethodProperty;
InputMethodSubtype = inputMethodSubtype; InputMethodSubtype = inputMethodSubtype;
}); });
...@@ -706,7 +718,7 @@ InputMethodEngine.on('imeChange', (inputMethodProperty, inputMethodSubtype) => { ...@@ -706,7 +718,7 @@ InputMethodEngine.on('imeChange', (inputMethodProperty, inputMethodSubtype) => {
### off('imeChange')<sup>9+</sup> ### off('imeChange')<sup>9+</sup>
on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype) => void): void off(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, inputMethodSubtype: InputMethodSubtype) => void): void
取消订阅输入法及子类型变化监听事件。使用callback异步回调。 取消订阅输入法及子类型变化监听事件。使用callback异步回调。
...@@ -722,7 +734,8 @@ on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, input ...@@ -722,7 +734,8 @@ on(type: 'imeChange', callback: (inputMethodProperty: InputMethodProperty, input
**示例:** **示例:**
```js ```js
InputMethodAbility.off('imeChange'); let InputMethodSetting = inputMethod.getSetting();
InputMethodSetting.off('imeChange');
``` ```
### listInputMethodSubtype<sup>9+</sup> ### listInputMethodSubtype<sup>9+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册