!10733 [新需求]: 新增预上屏相关接口

Merge pull request !10733 from 赵凌岚/master
This commit is contained in:
openharmony_ci 2024-04-19 09:52:41 +00:00 committed by Gitee
commit 363a055347
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 58 additions and 0 deletions

View File

@ -1301,6 +1301,54 @@ declare namespace inputMethodEngine {
* @since 12
*/
getCallingWindowInfo(): Promise<WindowInfo>;
/**
* Insert the provided text as preview text.
*
* @param { string } text - the text to be previewed.
* @param { Range } range - the range of the text to be replaced by the preview text.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 12800003 - input method client error.
* @throws { BusinessError } 12800011 - text preview is not supported.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 12
*/
setPreviewText(text: string, range: Range): Promise<void>;
/**
* Insert the provided text as preview text.
*
* @param { string } text - the text to be previewed.
* @param { Range } range - the range of the text to be replaced by the preview text.
* @throws { BusinessError } 401 - parameter error.
* @throws { BusinessError } 12800003 - input method client error.
* @throws { BusinessError } 12800011 - text preview is not supported.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 12
*/
setPreviewTextSync(text: string, range: Range): void;
/**
* Finish the text preview.
*
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 12800003 - input method client error.
* @throws { BusinessError } 12800011 - text preview is not supported.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 12
*/
finishTextPreview(): Promise<void>;
/**
* Finish the text preview.
*
* @throws { BusinessError } 12800003 - input method client error.
* @throws { BusinessError } 12800011 - text preview is not supported.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 12
*/
finishTextPreviewSync(): void;
}
/**
@ -1674,6 +1722,15 @@ declare namespace inputMethodEngine {
* @since 8
*/
readonly enterKeyType: number;
/**
* Indicates whether the editor supports the text preview.
*
* @type { boolean }
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 12
*/
isTextPreviewSupported: boolean;
}
/**

View File

@ -657,6 +657,7 @@ preresolve
presentationml
presently
presistent
previewed
prevgroup
prikey
primaries