【输入法框架】原子化绑定编辑框信息

Signed-off-by: Hollokin <taoyuxin2@huawei.com>
This commit is contained in:
Hollokin 2023-07-06 16:49:09 +08:00
parent 8e21ef83c2
commit fc38c3ca49
2 changed files with 47 additions and 0 deletions

View File

@ -1433,6 +1433,33 @@ declare namespace inputMethod {
* @since 10
*/
inputAttribute: InputAttribute;
/**
* Cursor information.
*
* @type { ?CursorInfo }
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
cursorInfo?: CursorInfo;
/**
* Selection information.
*
* @type { ?Range }
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
selection?: Range;
/**
* The window ID of the application currently bound to the input method.
*
* @type { ?number }
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
windowId?: number;
}
/**

View File

@ -1169,6 +1169,26 @@ declare namespace inputMethodEngine {
* @since 8
*/
off(type: 'textChange', callback?: (text: string) => void): void;
/**
* Subscribe input text attribute change
*
* @param { 'editorAttributeChanged' } type - indicates the type of subscribe event.
* @param { function } callback - indicates the callback function of on('editorAttributeChanged').
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
on(type: 'editorAttributeChanged', callback: (attr: EditorAttribute) => void): void;
/**
* Unsubscribe input text attribute change
*
* @param { 'editorAttributeChanged' } type - indicates the type of subscribe event.
* @param { function } [callback] - indicates the callback function of off('editorAttributeChanged').
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
off(type: 'editorAttributeChanged', callback?: (attr: EditorAttribute) => void): void;
}
/**