未验证 提交 aafe227d 编写于 作者: O openharmony_ci 提交者: Gitee

!8920 修改取消monthly分支level9接口说明

Merge pull request !8920 from 赵凌岚/monthly_20220816
...@@ -45,11 +45,6 @@ import inputMethodEngine from '@ohos.inputmethodengine'; ...@@ -45,11 +45,6 @@ import inputMethodEngine from '@ohos.inputmethodengine';
| FLAG_SINGLE_LINE | number | 是 | 否 | 编辑框为单行。 | | FLAG_SINGLE_LINE | number | 是 | 否 | 编辑框为单行。 |
| DISPLAY_MODE_PART | number | 是 | 否 | 编辑框显示为半屏。 | | DISPLAY_MODE_PART | number | 是 | 否 | 编辑框显示为半屏。 |
| DISPLAY_MODE_FULL | number | 是 | 否 | 编辑框显示为全屏。 | | DISPLAY_MODE_FULL | number | 是 | 否 | 编辑框显示为全屏。 |
| CURSOR_UP<sup>9+</sup> | number | 是 | 否 | 光标上移。 |
| CURSOR_DOWN<sup>9+</sup> | number | 是 | 否 | 光标下移。 |
| CURSOR_LEFT<sup>9+</sup> | number | 是 | 否 | 光标左移。 |
| CURSOR_RIGHT<sup>9+</sup> | number | 是 | 否 | 光标右移。 |
| WINDOW_TYPE_INPUT_METHOD_FLOAT<sup>9+</sup> | number | 是 | 否 | 输入法应用窗口风格标识。 |
## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a> ## inputMethodEngine.getInputMethodEngine<a name="getInputMethodEngine"></a>
...@@ -144,98 +139,6 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC ...@@ -144,98 +139,6 @@ off(type: 'inputStart', callback?: (kbController: KeyboardController, textInputC
}); });
``` ```
### on('inputStop')<sup>9+</sup>
on(type: 'inputStop', callback: () => void): void
订阅停止输入法应用事件,使用callback回调。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。<br/>-type为‘inputStop’时表示订阅停止输入法应用事件。 |
| callback | void | 是 | 回调函数。 |
**示例:**
```js
InputMethodEngine.getInputMethodEngine().on('inputStop', () => {
console.log("inputMethodEngine inputStop");
});
```
### off('inputStop')<sup>9+</sup>
off(type: 'inputStop', callback: () => void): void
取消订阅停止输入法应用事件。使用callback回调。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。<br/>-type为‘inputStop’时表示订阅停止输入法应用事件。 |
| callback | void | 是 | 回调函数。 |
**示例:**
```js
InputMethodEngine.getInputMethodEngine().off('inputStop', () => {
console.log("inputMethodEngine delete inputStop notification.");
});
```
### on('setCallingWindow')<sup>9+</sup>
on(type: 'setCallingWindow', callback: (wid:number) => void): void
订阅设置调用窗口事件,使用callback回调。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。<br/>-type为‘setCallingWindow’时表示订阅设置调用窗口事件。 |
| callback | number | 是 | 调用方window id。 |
**示例:**
```js
InputMethodEngine.getInputMethodEngine().on('setCallingWindow', (wid) => {
console.log("inputMethodEngine setCallingWindow");
});
```
### off('setCallingWindow')<sup>9+</sup>
off(type: 'setCallingWindow', callback: (wid:number) => void): void
取消订阅设置调用窗口事件。使用callback回调。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| type | string | 是 | 设置监听类型。<br/>-type为‘setCallingWindow’时表示订阅设置调用窗口事件。 |
| callback | number | 是 | 调用方window id。 |
**示例:**
```js
InputMethodEngine.getInputMethodEngine().off('setCallingWindow', () => {
console.log("inputMethodEngine delete setCallingWindow notification.");
});
```
### on('keyboardShow'|'keyboardHide') ### on('keyboardShow'|'keyboardHide')
on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void on(type: 'keyboardShow'|'keyboardHide', callback: () => void): void
...@@ -1005,64 +908,6 @@ getEditorAttribute(): Promise&lt;EditorAttribute&gt; ...@@ -1005,64 +908,6 @@ getEditorAttribute(): Promise&lt;EditorAttribute&gt;
} }
``` ```
### moveCursor<sup>9+</sup>
moveCursor(direction: number, callback: AsyncCallback&lt;void&gt;): void
移动光标。使用callback形式返回结果。参数个数为1,否则抛出异常。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------- | ---- | -------------- |
| direction | number | 是 | 光标移动方向。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调函数。 |
**示例:**
```js
TextInputClient.moveCursor(inputMethodEngine.CURSOR_xxx, (err) => {
if (err == undefined) {
console.error("moveCursor callback result---err: " + err.msg);
return;
}
});
```
### moveCursor<sup>9+</sup>
moveCursor(direction: number): Promise&lt;void&gt;
移动光标。使用promise形式返回结果。参数个数为1,否则抛出异常。
**系统能力**: SystemCapability.MiscServices.InputMethodFramework
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | -------------- |
| direction | number | 是 | 光标移动方向。 |
**返回值:**
| 类型 | 说明 |
| ------------------- | ------------------------- |
| Promise&lt;void&gt; | 无返回结果的Promise对象。 |
**示例:**
```js
async function InputMethodEngine() {
await TextInputClient.moveCursor(inputMethodEngine.CURSOR_xxx).then(async (err) => {
console.log('moveCursor success');
}).catch((err) => {
console.error("moveCursor success err: " + err.msg);
});
}
```
## EditorAttribute<a name="EditorAttribute"></a> ## EditorAttribute<a name="EditorAttribute"></a>
编辑框属性值。 编辑框属性值。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册