fix:add sync method

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2023-08-14 10:13:26 +08:00
parent 923aafb2a6
commit e049a31a0f

View File

@ -580,6 +580,20 @@ declare namespace inputMethodEngine {
*/
createPanel(ctx: BaseContext, info: PanelInfo): Promise<Panel>;
/**
* Creates a panel.
* <p>The system only allows one soft keyboard and one status bar to be created.</p>
*
* @param { BaseContext } ctx - indicates the context on which the window depends.
* @param { PanelInfo } info - the info of panel to be created.
* @returns { Panel } the created panel.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 12800004 - not an input method extension.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
createPanelSync(ctx: BaseContext, info: PanelInfo): Panel;
/**
* Destroys a panel.
*
@ -1063,6 +1077,17 @@ declare namespace inputMethodEngine {
*/
selectByRange(range: Range): Promise<void>;
/**
* Select text in editor by range.
*
* @param { Range } range - indicates the range of selected text in editor.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 12800003 - input method client error.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
selectByRangeSync(range: Range): void;
/**
* Select text in editor by cursor movement.
*
@ -1087,6 +1112,17 @@ declare namespace inputMethodEngine {
*/
selectByMovement(movement: Movement): Promise<void>;
/**
* Select text in editor by cursor movement.
*
* @param { Movement } movement - indicates the movement of cursor when selecting.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 12800003 - input method client error.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
selectByMovementSyncz(movement: Movement): void;
/**
* Get the index number of text at cursor.
*