From 23f6fd4110689e1f6d06a87d4f9f2368fef48ef8 Mon Sep 17 00:00:00 2001 From: guojin31 Date: Thu, 29 May 2025 11:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=B3=95=E5=BA=94=E7=94=A8=E8=8E=B7=E5=8F=96=E5=81=8F?= =?UTF-8?q?=E7=A7=BB=E5=8C=BA=E5=9F=9F=E5=A4=A7=E5=B0=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: guojin31 --- api/@ohos.inputMethodEngine.d.ts | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/api/@ohos.inputMethodEngine.d.ts b/api/@ohos.inputMethodEngine.d.ts index ba79936651..82d855a152 100644 --- a/api/@ohos.inputMethodEngine.d.ts +++ b/api/@ohos.inputMethodEngine.d.ts @@ -2188,7 +2188,60 @@ declare namespace inputMethodEngine { * @since 15 */ getImmersiveMode(): ImmersiveMode; + +    /** +     * Get system panel insets. +     *

It's only used for SOFT_KEYBOARD panel with FLG_FIXED or FLG_FLOATING.

+     *  +     * @param { displayId } displayId - specify which display's system panel insets. +     * @returns { Promise } the promise returned by the function. +     * @throws { BusinessError } 12800013 - window manager service error. +     * @throws { BusinessError } 12800017 - invalid panel type or panel flag. Possible causes: +     *     1. Current panel's type is not SOFT_KEYBOARD.  2. Panel's flag is not FLG_FIXED or FLG_FLOATING.  +     * @throws { BusinessError } 12800020 - invalid displayId. +     * @syscap SystemCapability.MiscServices.InputMethodFramework +     * @since 20 +     */ +    getSystemPanelInsets(displayId: number): Promise; } + +  /** +   * @interface SystemPanelInsets.  +   * Input method system panel's insets, used to indicate the distance between the input method panel and the system panel. +   * The distance unit is px. +   *  +   * @syscap SystemCapability.MiscServices.InputMethodFramework +   * @since 20 +   */ +  interface SystemPanelInsets { +    /** +     * Distance on the left. +     * +     * @type { number } +     * @readonly +     * @syscap SystemCapability.MiscServices.InputMethodFramework +     * @since 20 +     */ +    readonly left: number; +    /** +     * Distance on the right. +     * +     * @type { number } +     * @readonly +     * @syscap SystemCapability.MiscServices.InputMethodFramework +     * @since 20 +     */ +    readonly right: number; +    /** +     * Distance on the bottom. +     * +     * @type { number } +     * @readonly +     * @syscap SystemCapability.MiscServices.InputMethodFramework +     * @since 20 +     */ +    readonly bottom: number; +  } /** * @interface EditorAttribute -- Gitee