diff --git a/api/@ohos.inputMethodEngine.d.ts b/api/@ohos.inputMethodEngine.d.ts index ba7993665199844c3a3cab797338991e62297a8a..82d855a152d5f7c60f65fb739bc399483d13eea0 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