From b8d0cc3adb89f79db85e64c9cc653e408a2cc628 Mon Sep 17 00:00:00 2001 From: zhangsaiyang Date: Sun, 9 Feb 2025 14:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BD=BF=E8=83=BD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=C3=A9=C2=93=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangsaiyang --- api/@ohos.inputMethod.d.ts | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/api/@ohos.inputMethod.d.ts b/api/@ohos.inputMethod.d.ts index a12403657d..b450cefab5 100644 --- a/api/@ohos.inputMethod.d.ts +++ b/api/@ohos.inputMethod.d.ts @@ -633,6 +633,17 @@ declare namespace inputMethod { * @useinstead inputMethod.InputMethodSetting#showOptionalInputMethods */ displayOptionalInputMethod(): Promise; + + /** + * The input method application calls this interface to obtain its own enabled state. + * + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 12800004 - not an input method application. + * @throws { BusinessError } 12800008 - input method manager service error. + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 15 + */ + getInputMethodState(): Promise; } /** @@ -1894,6 +1905,39 @@ declare namespace inputMethod { */ height: number; } + + /** + * Enumerates the enabled state. + * + * @enum { number } + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 15 + */ + export enum EnabledState { + /** + * Disabled state. + * + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 15 + */ + DISABLED = 0, + + /** + * Enabled state with basic mode. + * + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 15 + */ + BASIC_MODE, + + /** + * Enabled state with full experience mode. + * + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 15 + */ + FULL_EXPERIENCE_MODE + } } export default inputMethod; \ No newline at end of file -- Gitee