diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 659499edb68ccc9e1f653379084037635ab3848f..29030e411813c7677ee6abbbbb2b2d150a32e147 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -143,7 +143,19 @@ declare namespace window { /** * Notch */ - TYPE_CUTOUT + TYPE_CUTOUT, + + /** + * area for system gesture + * @since 9 + */ + TYPE_SYSTEM_GESTURE, + + /** + * area for keyboard + * @since 9 + */ + TYPE_KEYBOARD } /** * Describes the window mode of an application @@ -293,6 +305,12 @@ declare namespace window { * @since 7 */ interface AvoidArea { + /** + * Whether avoidArea is visible on screen + * @since 9 + */ + visible: boolean; + /** * Rectangle on the left of the screen */ @@ -823,6 +841,7 @@ declare namespace window { * @param type: 'systemAvoidAreaChange' * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 + * @deprecated since 9, please use on_avoidAreaChange instead. */ on(type: 'systemAvoidAreaChange', callback: Callback): void; @@ -831,9 +850,26 @@ declare namespace window { * @param type: 'systemAvoidAreaChange' * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 + * @deprecated since 9, please use off_avoidAreaChange instead. */ off(type: 'systemAvoidAreaChange', callback?: Callback): void; + /** + * register the callback of avoidAreaChange + * @param type: 'avoidAreaChange' + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 9 + */ + on(type: 'avoidAreaChange', callback: Callback<{ type: AvoidAreaType, area: AvoidArea }>): void; + + /** + * unregister the callback of avoidAreaChange + * @param type: 'avoidAreaChange' + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 9 + */ + off(type: 'avoidAreaChange', callback?: Callback<{ type: AvoidAreaType, area: AvoidArea }>): void; + /** * register the callback of keyboardHeightChange * @param type: 'keyboardHeightChange'