From c5d9da2a4f3bafafd9f1ad51448a4a926e628e42 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Tue, 8 Jul 2025 10:44:03 +0000 Subject: [PATCH] update api/@ohos.window.d.ts. 0328 to 0702 Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 2645 ++++++----------------------------------- 1 file changed, 367 insertions(+), 2278 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 07741a8a50..41f83ca054 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -58,6 +58,7 @@ declare interface Callback { } /*** endif */ +/*** if arkts 1.2 */ /** * Defines the window callback. * @@ -65,19 +66,9 @@ declare interface Callback { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 20 - * @arkts 1.2 */ type Callback = (data: T) => V; - -/** - * Defines the window animation curve param. - * - * @typedef { Array } AnimationCurveParam - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ -declare type WindowAnimationCurveParam = Array; +/*** endif */ /** * Window manager. @@ -137,7 +128,7 @@ declare namespace window { * @since 7 * @deprecated since 11 */ - TYPE_SYSTEM_ALERT, + TYPE_SYSTEM_ALERT = 1, /** * Input method. * @@ -147,7 +138,7 @@ declare namespace window { * @since 9 * @deprecated since 13 */ - TYPE_INPUT_METHOD, + TYPE_INPUT_METHOD = 2, /** * Status bar. * @@ -303,7 +294,7 @@ declare namespace window { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - TYPE_DIALOG= 16, + TYPE_DIALOG = 16, /** * Screenshot. * @@ -333,7 +324,7 @@ declare namespace window { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - TYPE_DIVIDER= 19, + TYPE_DIVIDER = 19, /** * Global Search. * @@ -343,7 +334,7 @@ declare namespace window { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - TYPE_GLOBAL_SEARCH= 20, + TYPE_GLOBAL_SEARCH = 20, /** * Handwrite. * @@ -380,35 +371,10 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. * @stagemodelonly - * @since arkts {'1.1':'17', '1.2':'20'} + * @since arkts {'1.1':'16', '1.2':'20'} * @arkts 1.1&1.2 */ - TYPE_FLOAT_NAVIGATION = 24, - /** - * TYPE_DYNAMIC. - * - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @stagemodelonly - * @since 20 - */ - TYPE_DYNAMIC, - /** - * TYPE_MUTISCREEN_COLLABORATION. - * - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @stagemodelonly - * @since 20 - */ - TYPE_MUTISCREEN_COLLABORATION = 26, - /** - * Main. - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 18 - */ - TYPE_MAIN = 32 + TYPE_FLOAT_NAVIGATION = 24 } /** @@ -644,16 +610,7 @@ declare namespace window { * @enum { number } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Describes the window status of an application - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ export enum WindowStatusType { @@ -668,15 +625,7 @@ declare namespace window { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Undefined status of the window - * - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ UNDEFINED = 0, @@ -691,15 +640,7 @@ declare namespace window { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Full screen status of the window - * - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ FULL_SCREEN = 1, @@ -729,15 +670,7 @@ declare namespace window { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Minimize status of the window - * - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ MINIMIZE = 3, @@ -752,15 +685,7 @@ declare namespace window { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Floating status of the window - * - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ FLOATING = 4, @@ -775,15 +700,7 @@ declare namespace window { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Split screen status of the window - * - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ SPLIT_SCREEN = 5 @@ -802,16 +719,7 @@ declare namespace window { * @interface SystemBarProperties * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Properties of status bar and navigation bar, it couldn't update automatically - * - * @interface SystemBarProperties - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ export interface SystemBarProperties { @@ -827,16 +735,7 @@ declare namespace window { * @type { ?string } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * The color of the status bar. - * - * @type { ?string } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ statusBarColor?: string; @@ -853,16 +752,7 @@ declare namespace window { * @type { ?boolean } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * The light icon of the status bar. - * - * @type { ?boolean } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ isStatusBarLightIcon?: boolean; @@ -896,19 +786,9 @@ declare namespace window { * @type { ?string } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * The color of the navigation bar. - * - * @type { ?string } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - navigationBarColor?: string; /** @@ -923,16 +803,7 @@ declare namespace window { * @type { ?boolean } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * The light icon of the navigation bar. - * - * @type { ?boolean } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ isNavigationBarLightIcon?: boolean; @@ -960,16 +831,7 @@ declare namespace window { * @type { ?boolean } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Enable the animation of the status bar. - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ enableStatusBarAnimation?: boolean; @@ -1247,117 +1109,6 @@ declare namespace window { height: number; } - /** - * Position - * - * @interface Position - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - export interface Position { - - /** - * The X-coordinate - * - * @type { number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - x: number; - - /** - * The Y-coordinate - * - * @type { number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - y: number; - } - - /** - * Enum for window anchor - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - enum WindowAnchor { - /** - * The value means window top left corner. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - TOP_START = 0, - /** - * The value means horizontal midpoint of the border on the window. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - TOP = 1, - /** - * The value means window top right corner. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - TOP_END = 2, - /** - * The value means vertical midpoint of the left border of the window. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - START = 3, - /** - * The value means window horizontal and vertical midpoint. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - CENTER = 4, - /** - * The value means vertical midpoint of the right border of the window. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - END = 5, - /** - * The value means window bottom left corner. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - BOTTOM_START = 6, - /** - * The value means horizontal midpoint of the lower border of the window. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - BOTTOM = 7, - /** - * The value means window bottom right corner. - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - BOTTOM_END = 8, - } - /** * Avoid area * @@ -1599,13 +1350,6 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * The info of window - * - * @interface WindowInfo - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ export interface WindowInfo { /** * The position and size of the window @@ -1615,25 +1359,8 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * The position and size of the window - * - * @type { Rect } - * @syscap SystemCapability.Window.SessionManager - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 - */ rect: Rect; - /** - * Global display rect. - * - * @type { ?Rect } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - globalDisplayRect?: Rect; - /** * bundleName of window * @@ -1642,13 +1369,6 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * bundleName of window - * - * @type { string } - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ bundleName: string; /** @@ -1659,13 +1379,6 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * abilityName of window - * - * @type { string } - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ abilityName: string; /** @@ -1676,13 +1389,6 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * Indicates target window id. - * - * @type { number } - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ windowId: number; /** @@ -1693,23 +1399,8 @@ declare namespace window { * @systemapi * @since 12 */ - /** - * The window status of an application. - * - * @type { WindowStatusType } - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ - /** - * The window status of an application. - * - * @type { WindowStatusType } - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @since 20 - */ - windowStatusType: WindowStatusType; - + windowStatusType: WindowStatusType; + /** * Whether the window is focused. The default value is false. * @@ -1718,13 +1409,6 @@ declare namespace window { * @systemapi * @since 14 */ - /** - * Whether the window is focused. The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ isFocused?: boolean; } @@ -1842,15 +1526,6 @@ declare namespace window { * @arkts 1.1&1.2 */ drawableRect: Rect; - - /** - * Global display rect. - * - * @type { ?Rect } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - globalDisplayRect?: Rect; /** * Window type @@ -2144,26 +1819,6 @@ declare namespace window { * @arkts 1.1&1.2 */ closeButtonRightMargin? : number; - - /** - * button icon size. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - buttonIconSize? : number; - - /** - * corner radius of button background when hover. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - buttonBackgroundCornerRadius? : number; } /** @@ -2627,26 +2282,6 @@ declare namespace window { * @since 12 */ title?: string; - - /** - * Indicates window container zIndex. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - zIndex?: number; - - /** - * Indicates whether to use default density. - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - defaultDensityEnabled?: boolean; } /** @@ -2866,16 +2501,7 @@ declare namespace window { * @interface AvoidAreaOptions * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Avoid area options - * - * @interface AvoidAreaOptions - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ export interface AvoidAreaOptions { @@ -2885,16 +2511,7 @@ declare namespace window { * @type { AvoidAreaType } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Avoid area type - * - * @type { AvoidAreaType } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ type: AvoidAreaType, @@ -2905,16 +2522,7 @@ declare namespace window { * @type { AvoidArea } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Avoid area - * - * @type { AvoidArea } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ area: AvoidArea @@ -3037,25 +2645,6 @@ declare namespace window { * @atomicservice * @since 12 */ - /** - * Creates a child window or system window. This API uses an asynchronous callback to return the result. - * - * @permission ohos.permission.SYSTEM_FLOAT_WINDOW - * @param { Configuration } config - Parameters used for creating the window. - * @param { AsyncCallback } callback - Callback used to return the window created. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300001 - Repeated operation. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300006 - This window context is abnormal. - * @throws { BusinessError } 1300009 - The parent window is invalid. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @atomicservice - * @since 17 - */ export function createWindow(config: Configuration, callback: AsyncCallback): void; /** @@ -3094,26 +2683,6 @@ declare namespace window { * @atomicservice * @since 12 */ - /** - * Create a window with a specific configuration - * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required - * - * @permission ohos.permission.SYSTEM_FLOAT_WINDOW - * @param { Configuration } config - Parameters for window creation. - * @returns { Promise } Promise used to return the window created. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300001 - Repeated operation. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300006 - This window context is abnormal. - * @throws { BusinessError } 1300009 - The parent window is invalid. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @atomicservice - * @since 17 - */ export function createWindow(config: Configuration): Promise; /** @@ -3220,9 +2789,9 @@ declare namespace window { * @since 10 */ /** - * Finds a window based on the name. + * Find the window by name. * - * @param { string } name - Window name, that is, the value of name in Configuration. + * @param { string } name - Indicates window name. * @returns { Window } Window found. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -3309,8 +2878,7 @@ declare namespace window { * @since 10 */ /** - * Obtains the top window of the current application. This API uses an asynchronous callback to return the result. - * If no child window is available, the main window of the application is returned. + * Get the top window. * * @param { BaseContext } ctx - Current application context. * @param { AsyncCallback } callback - Callback used to return the top window obtained. @@ -3352,8 +2920,7 @@ declare namespace window { * @since 10 */ /** - * Obtains the top window of the current application. This API uses a promise to return the result. - * If no child window is available, the main window of the application is returned. + * Get the top window. * * @param { BaseContext } ctx - Current application context. * @returns { Promise } Promise used to return the top window obtained. @@ -3613,8 +3180,7 @@ declare namespace window { * @since 11 */ /** - * Shifts the window focus from the source window to the target window in the same application. - * The window focus can be shifted between the main window and a child window. + * Shift window focus within the same application. And the window type contains only main window and subwindow. * * @param { number } sourceWindowId - Window id which the focus shift from. * @param { number } targetWindowId - Window id which the focus shift to. @@ -3633,11 +3199,10 @@ declare namespace window { export function shiftAppWindowFocus(sourceWindowId: number, targetWindowId: number): Promise; /** - * Transfers an input event from one window to another within the same application, particularly in split-window scenarios. - * It takes effect only for the main window and its child windows on 2-in-1 devices. + * Shift window pointer event within the same application. And the window type contains only main window and subwindow. * - * @param { number } sourceWindowId - ID of the source window. You are advised to call getWindowProperties() to obtain the window ID. - * @param { number } targetWindowId - ID of the target window. You are advised to call getWindowProperties() to obtain the window ID. + * @param { number } sourceWindowId - Window id which the pointer event shift from. + * @param { number } targetWindowId - Window id which the pointer event shift to. * @returns { Promise } - Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -3651,23 +3216,6 @@ declare namespace window { */ function shiftAppWindowPointerEvent(sourceWindowId: number, targetWindowId: number): Promise; - /** - * Shift window touch event within the same application. And the window type contains only main window and subwindow. - * - * @param { number } sourceWindowId - Window id which the touch event shift from. - * @param { number } targetWindowId - Window id which the touch event shift to. - * @param { number } fingerId - Finger id in touch event. - * @returns { Promise } - Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Function shiftAppWindowTouchEvent can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - function shiftAppWindowTouchEvent(sourceWindowId: number, targetWindowId: number, fingerId: number): Promise; - /** * Get info of visible windows. * @@ -3679,17 +3227,6 @@ declare namespace window { * @systemapi Hide this for inner system use. * @since 12 */ - /** - * Get info of visible windows. - * - * @permission ohos.permission.VISIBLE_WINDOW_INFO - * @returns { Promise> } - Promise that returns windowInfo list. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @throws { BusinessError } 801 - Capability not supported. Function getVisibleWindowInfo can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @since 18 - */ export function getVisibleWindowInfo(): Promise>; /** @@ -3742,52 +3279,8 @@ declare namespace window { * @atomicservice * @since 15 */ - /** - * Get Layout info of all windows on the selected display. - * - * @param { number } displayId - Indicate the id of display. - * @returns { Promise> } Promise used to return the WindowLayoutInfo. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; - * 3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. function getAllWindowLayoutInfo can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ function getAllWindowLayoutInfo(displayId: number): Promise>; - /** - * List the window modes of the foreground window on the specified display. - * - * @param { number } displayId - Indicate the id of display. - * @returns { Promise } Promise used to return the window modes. - * @throws { BusinessError } 801 - Capability not supported. function getGlobalWindowMode can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - function getGlobalWindowMode(displayId?: number): Promise; - - /** - * Get the name of the top navigation destination. - * - * @param { number } windowId - Indicates target window id. - * @returns { Promise } The name of the top navigation destination. - * @throws { BusinessError } 202 - Permission verification failed, non-system application uses system API. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - function getTopNavDestinationName(windowId: number): Promise; - /** * Register the callback of systemBarTintChange * @@ -3885,37 +3378,6 @@ declare namespace window { * @arkts 1.1&1.2 */ export function off(type: 'waterMarkFlagChange', callback?: Callback): void; - - /** - * Sets starting window background color - * - * @param { string } moduleName - module Name that needs to be set. - * @param { string } abilityName - ability Name that needs to be set. - * @param { ColorMetrics } color - Color metrics. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported.function setStartWindowBackgroundColor can not to work correctly due to limited device capabilities. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - function setStartWindowBackgroundColor(moduleName: string, abilityName: string, color: ColorMetrics): Promise; - - /** - * Notify screenshot event - * - * @param { ScreenshotEventType } eventType - Screenshot event type. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @systemapi Hide this for inner system use. - * @since 20 - */ - function notifyScreenshotEvent(eventType: ScreenshotEventType): Promise; - /** * Display orientation * @@ -4465,357 +3927,86 @@ declare namespace window { type SpecificSystemBar = 'status' | 'navigation' | 'navigationIndicator'; /** - * Describes the window transition type + * The infomation of keyboard * - * @enum { number } + * @interface KeyboardInfo * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - enum WindowTransitionType { + interface KeyboardInfo { /** - * Destroy transition + * The position and size of the keyboard * + * @type { Rect } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - DESTROY = 0, + rect: Rect; } /** - * Describes the window animation type + * Window * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 + * @interface Window + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 6 + */ + /** + * Window + * + * @interface Window + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - enum AnimationType { + export interface Window { /** - * Window animation type fade in out + * Hide window. * - * @syscap SystemCapability.Window.SessionManager - * @since 20 + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 7 */ - FADE_IN_OUT = 0, /** - * Window animation type fade in + * Hide window. * - * @syscap SystemCapability.Window.SessionManager + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 20 + * @since 12 */ - FADE_IN = 1, - } + hide(callback: AsyncCallback): void; - /** - * Describes the window animation curve - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - enum WindowAnimationCurve { /** - * Animation curve type linear + * Hide window. * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 7 */ - LINEAR = 0, - /** - * Animation curve type interpolation spring + * Hide window. * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 12 */ - INTERPOLATION_SPRING = 1, - } - - /** - * Window animation config - * - * @interface WindowAnimationConfig - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - interface WindowAnimationConfig { - /** - * Curve of the animation - * - * @type { WindowAnimationCurve } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - curve: WindowAnimationCurve; - - /** - * Duration of the animation - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - duration?: number; - - /** - * Param of animation curve - * - * @type { ?WindowAnimationCurveParam } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - param?: WindowAnimationCurveParam; - } - - /** - * The animation configuration of window transition - * - * @interface TransitionAnimation - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - interface TransitionAnimation { - /** - * The config of window animation - * - * @type { WindowAnimationConfig } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - config: WindowAnimationConfig; - /** - * The opacity of window - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - opacity?: number; - } - - /** - * The animation configuration of start system scene animation - * - * @interface StartAnimationSystemParams - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - interface StartAnimationSystemParams { - /** - * The type of window animation - * - * @type { AnimationType } - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - type: AnimationType; - /** - * The config of start system scene animation - * - * @type { ?WindowAnimationConfig } - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - animationConfig?: WindowAnimationConfig; - } - - /** - * The animation configuration of start scene animation - * - * @interface StartAnimationParams - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - interface StartAnimationParams { - /** - * The type of window animation - * - * @type { AnimationType } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - type: AnimationType; - } - - /** - * The information of keyboard - * - * @interface KeyboardInfo - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 - */ - interface KeyboardInfo { - /** - * The position and size of keyboard before animation. - * - * @type { Rect } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 18 - */ - beginRect: Rect; - - /** - * The position and size of keyboard after animation completed. - * - * @type { Rect } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 18 - */ - endRect: Rect; - - /** - * Indicates whether animation exists. - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - animated?: boolean; - - /** - * The configuration of keyboard animation. - * - * @type { ?WindowAnimationConfig } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - config?: WindowAnimationConfig; - } - - /** - * The policy of key frame. - * - * @interface KeyFramePolicy - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - interface KeyFramePolicy { - /** - * Whether to use key frame. - * - * @type { boolean } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - enable: boolean; - - /** - * Set the drag interval to notify rect change in millisecond. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - interval?: number; - - /** - * Set the drag distance to notify rect change in px. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - distance?: number; - - /** - * Set the rect change animation duration in millisecond. - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - animationDuration?: number; - - /** - * Set then rect change animation delay in millisecond - * - * @type { ?number } - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - animationDelay?: number; - } - - /** - * Window - * - * @interface Window - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 6 - */ - /** - * Window - * - * @interface Window - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface Window { - /** - * Hide window. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @systemapi Hide this for inner system use. - * @since 7 - */ - /** - * Hide window. - * - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @systemapi Hide this for inner system use. - * @since 12 - */ - hide(callback: AsyncCallback): void; - - /** - * Hide window. - * - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @systemapi Hide this for inner system use. - * @since 7 - */ - /** - * Hide window. - * - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @systemapi Hide this for inner system use. - * @since 12 - */ - hide(): Promise; + hide(): Promise; /** * Hide window with animation. @@ -4909,9 +4100,7 @@ declare namespace window { * @since 10 */ /** - * Shows this window. This API uses an asynchronous callback to return the result. - * This API takes effect only for a system window or an application child window. - * For the main window of an application, this API moves it at the top when the main window is already displayed. + * Show window. * * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -4941,9 +4130,7 @@ declare namespace window { * @since 10 */ /** - * Shows this window. This API uses a promise to return the result. - * This API takes effect only for a system window or an application child window. - * For the main window of an application, this API moves it at the top when the main window is already displayed. + * Show window. * * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -4955,23 +4142,6 @@ declare namespace window { */ showWindow(): Promise; - /** - * Show window. - * - * @param { ShowWindowOptions } options - options of window shown - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Function showWindow can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300016 - Parameter validation error. Possible cause: 1. The value of the parameter is out of the allowed range; - * 2. The length of the parameter exceeds the allowed length; - * 3. The parameter format is incorrect. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - showWindow(options: ShowWindowOptions): Promise; - /** * Show window with animation. * @@ -5060,16 +4230,17 @@ declare namespace window { * * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 */ /** - * Destroys this window. This API uses an asynchronous callback to return the result. - * This API takes effect only for a system window or an application child window. + * Destroy the window. * * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -5092,16 +4263,17 @@ declare namespace window { * * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 */ /** - * Destroys this window. This API uses an asynchronous callback to return the result. - * This API takes effect only for a system window or an application child window. + * Destroy the window. * * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -5304,22 +4476,6 @@ declare namespace window { */ moveWindowToGlobal(x: number, y: number, moveConfiguration?: MoveConfiguration): Promise; - /** - * Move window to the position relative to the main screen. - * - * @param { number } x - Indicate the X-coordinate of the window relative to the main screen. - * @param { number } y - Indicate the Y-coordinate of the window relative to the main screen. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300010 - The operation in the current window status is invalid. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - moveWindowToGlobalDisplay(x: number, y: number): Promise; - /** * Set the size of a window . * @@ -5480,29 +4636,6 @@ declare namespace window { */ setFollowParentWindowLayoutEnabled(enabled: boolean): Promise; - /** - * Set whether the first level sub window supports maintaining the same relative position with the main window. - * - * @param { boolean } enabled - The value true means the first level sub window supports maintaining the same relative position with the main window, - * and false means the opposite. - * @param { WindowAnchor } anchor - Window anchor point that setting - * when the relative position between the primary sub window and the main window remains unchanged. - * @param { number } offsetX - The x-axis offset between the anchor point of the first level sub window and the anchor point of the main window. - * @param { number } offsetY - The y-axis offset between the anchor point of the first level sub window and the anchor point of the main window. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. - * Function setRelativePositionToParentWindowEnabled can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - setRelativePositionToParentWindowEnabled(enabled: boolean, anchor?: WindowAnchor, offsetX?: number, offsetY?: number): Promise; - /** * Set the type of a window. * @@ -5669,22 +4802,6 @@ declare namespace window { */ getWindowDensityInfo(): WindowDensityInfo; - /** - * Determine whether the window spans multiple screens and displays in full screen mode. - * - * @returns { Promise } Whether the window spans multiple screens and displays in full screen mode. - * The value true means that the window spans multiple screens and displays in full screen mode,and false means the opposite. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - isMainWindowFullScreenAcrossDisplays(): Promise; - /** * Get the avoid area * @@ -5756,7 +4873,9 @@ declare namespace window { * * @param { boolean } enabled - If true, the system window type can obtain avoid area. If false, the avoid area obtained by the system window type will always be empty. * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @throws { BusinessError } 1300004 - Unauthorized operation. @@ -5859,9 +4978,9 @@ declare namespace window { setWindowLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback): void; /** - * Sets whether the main window layout or the child window layout is immersive. + * Set the property of the window can layout in full screen * - * @param { boolean } isLayoutFullScreen - Whether the window layout is immersive + * @param { boolean } isLayoutFullScreen - The window can layout in full screen * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -5871,9 +4990,9 @@ declare namespace window { * @since 9 */ /** - * Sets whether the main window layout or the child window layout is immersive. + * Set the property of the window can layout in full screen * - * @param { boolean } isLayoutFullScreen - Whether the window layout is immersive + * @param { boolean } isLayoutFullScreen - The window can layout in full screen * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -5955,9 +5074,9 @@ declare namespace window { setWindowSystemBarEnable(names: Array<'status' | 'navigation'>, callback: AsyncCallback): void; /** - * Sets whether to show the system bar of the main window. + * Set the system bar to have visible. * - * @param { Array<'status' | 'navigation'> } names - The set of system bar types + * @param { Array<'status' | 'navigation'> } names - The set of system bar * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -5967,9 +5086,9 @@ declare namespace window { * @since 9 */ /** - * Sets whether to show the system bar of the main window. + * Set the system bar to have visible. * - * @param { Array<'status' | 'navigation'> } names - The set of system bar types + * @param { Array<'status' | 'navigation'> } names - The set of system bar * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -5980,9 +5099,9 @@ declare namespace window { * @since 10 */ /** - * Sets whether to show the system bar of the main window. + * Set the system bar to have visible. * - * @param { Array<'status' | 'navigation'> } names - The set of system bar types + * @param { Array<'status' | 'navigation'> } names - The set of system bar * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5997,9 +5116,9 @@ declare namespace window { setWindowSystemBarEnable(names: Array<'status' | 'navigation'>): Promise; /** - * Sets whether to show the specific system bar of the main window. + * Set specific system bar to have visible. * - * @param {SpecificSystemBar} name - Type of the system bar to be shown or hidden + * @param {SpecificSystemBar} name - the set of system bar * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. * @returns { Promise } Promise that returns no value. * @throws {BusinessError} 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; @@ -6011,9 +5130,9 @@ declare namespace window { * @since 11 */ /** - * Sets whether to show the specific system bar of the main window. + * Set specific system bar to have visible. * - * @param {SpecificSystemBar} name - Type of the system bar to be shown or hidden + * @param {SpecificSystemBar} name - the set of system bar * @param {boolean} enable - Show specific system bar if true, or hide specific system bar if false. * @param {boolean} enableAnimation - Whether using animation during this setting, using animation if true or not using animation if false. * @returns { Promise } Promise that returns no value. @@ -6109,22 +5228,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Set the properties of system bar - * - * @param { SystemBarProperties } systemBarProperties - The properties of system bar - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ setWindowSystemBarProperties(systemBarProperties: SystemBarProperties): Promise; @@ -6143,9 +5247,9 @@ declare namespace window { getWindowSystemBarProperties(): SystemBarProperties; /** - * Set the content color of the status bar. + * Set the color of the status bar. * - * @param { ColorMetrics } color - Content color of the status bar + * @param { ColorMetrics } color - Color metrics. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -6228,9 +5332,7 @@ declare namespace window { * @since 10 */ /** - * Sets the preferred orientation for the main window. - * This API uses a promise to return the result. - * It does not take effect on devices that do not support rotation with the sensor, on 2-in-1 devices or for the child window. + * Set the preferred orientation config of the window * * @param { Orientation } orientation - The orientation config of the window * @returns { Promise } Promise that returns no value. @@ -6272,9 +5374,7 @@ declare namespace window { * @since 10 */ /** - * Sets the preferred orientation for the main window. - * This API uses an asynchronous callback to return the result. - * It does not take effect on devices that do not support rotation with the sensor, on 2-in-1 devices or for the child window. + * Set the preferred orientation config of the window * * @param { Orientation } orientation - The orientation config of the window * @param { AsyncCallback } callback - Callback used to return the result. @@ -6291,8 +5391,7 @@ declare namespace window { setPreferredOrientation(orientation: Orientation, callback: AsyncCallback): void; /** - * Obtains the orientation of the main window. - * This API can be called only by the main window. + * Get the preferred orientation config of the window * * @returns { Orientation } orientation - The orientation config of the window * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -6303,16 +5402,13 @@ declare namespace window { getPreferredOrientation(): Orientation; /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -6320,33 +5416,30 @@ declare namespace window { * @since 9 */ /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * - * @param { string } path - Path of the page from which the content will be loaded. The path is configured in the main_pages.json file of the project. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } path - Path of the page to which the content will be loaded + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -6357,16 +5450,13 @@ declare namespace window { loadContent(path: string, storage: LocalStorage, callback: AsyncCallback): void; /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -6374,33 +5464,30 @@ declare namespace window { * @since 9 */ /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to this window, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * - * @param { string } path - Path of the page from which the content will be loaded. The path is configured in the main_pages.json file of the project. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } path - Path of the page to which the content will be loaded + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -6411,8 +5498,7 @@ declare namespace window { loadContent(path: string, storage: LocalStorage): Promise; /** - * Loads content from a page to this window. This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @param { AsyncCallback } callback - Callback used to return the result. @@ -6424,8 +5510,7 @@ declare namespace window { loadContent(path: string, callback: AsyncCallback): void; /** - * Loads content from a page to this window. This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path - Path of the page to which the content will be loaded * @returns { Promise } Promise that returns no value. @@ -6450,9 +5535,9 @@ declare namespace window { * @since 10 */ /** - * Obtain a UIContext instance. + * Get the UIContext associate with the window content. * - * @returns { UIContext } UIContext instance obtained. + * @returns { UIContext } the object of UIContext. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @stagemodelonly @@ -6483,21 +5568,20 @@ declare namespace window { * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to this window. - * This API uses an asynchronous callback to return the result. + * Loads content * - * @param { string } path - Path of the page from which the content will be loaded. - * In the stage model, the path is configured in the main_pages.json file of the project. - * In the FA model, the path is configured in the config.json file of the project. + * @param { string } path - Path of the page to which the content will be loaded * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -6526,21 +5610,20 @@ declare namespace window { * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to this window. - * This API uses a promise to return the result. + * Loads content * - * @param { string } path - Path of the page from which the content will be loaded. - * In the stage model, the path is configured in the main_pages.json file of the project. - * In the FA model, the path is configured in the config.json file of the project. + * @param { string } path - Path of the page to which the content will be loaded * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -6550,13 +5633,10 @@ declare namespace window { setUIContent(path: string): Promise; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } name - name of the page to which the content will be loaded. + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -6571,12 +5651,9 @@ declare namespace window { loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback): void; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. + * @param { string } name - name of the page to which the content will be loaded. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -6591,13 +5668,10 @@ declare namespace window { loadContentByName(name: string, callback: AsyncCallback): void; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } name - name of the page to which the content will be loaded. + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -6797,20 +5871,7 @@ declare namespace window { * 3. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Register the callback of avoidAreaChange - * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback } callback - Callback used to return the area. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; - * 3. Parameter verification failed. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ on(type: 'avoidAreaChange', callback: Callback): void; @@ -6847,19 +5908,7 @@ declare namespace window { * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Unregister the callback of avoidAreaChange - * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback } callback - Callback used to return the area. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; - * 2. Parameter verification failed. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ off(type: 'avoidAreaChange', callback?: Callback): void; @@ -6868,7 +5917,7 @@ declare namespace window { * Register the callback of keyboardHeightChange * * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. - * @param { Callback } callback - Callback used to return the current keyboard height, which is an integer, in px. + * @param { Callback } callback - Callback used to return the current keyboard height. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -6879,7 +5928,7 @@ declare namespace window { * Register the callback of keyboardHeightChange * * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. - * @param { Callback } callback - Callback used to return the current keyboard height, which is an integer, in px. + * @param { Callback } callback - Callback used to return the current keyboard height. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -6894,9 +5943,7 @@ declare namespace window { * Unregister the callback of keyboardHeightChange * * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. - * @param { Callback } callback - Callback used to return the current keyboard height, which is an integer, in px. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { Callback } callback - Callback used to return the current keyboard height. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -6906,9 +5953,7 @@ declare namespace window { * Unregister the callback of keyboardHeightChange * * @param { 'keyboardHeightChange' } type - The value is fixed at 'keyboardHeightChange', indicating the keyboard height change event. - * @param { Callback } callback - Callback used to return the current keyboard height, which is an integer, in px. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { Callback } callback - Callback used to return the current keyboard height. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -6918,63 +5963,14 @@ declare namespace window { */ off(type: 'keyboardHeightChange', callback?: Callback): void; - /** - * Register the callback of keyboardWillShow - * - * @param { 'keyboardWillShow' } type - The value is fixed at 'keyboardWillShow', indicating the start of the keyboard show animation event. - * @param { Callback } callback - Callback invoked before the keyboard show animation start. - * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillShow can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - on(type: 'keyboardWillShow', callback: Callback): void; - - /** - * Unregister the callback of keyboardWillShow - * - * @param { 'keyboardWillShow' } type - The value is fixed at 'keyboardWillShow', indicating the start of the keyboard show animation event. - * @param { Callback } callback - Callback invoked before the keyboard show animation start. - * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillShow can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - off(type: 'keyboardWillShow', callback?: Callback): void; - - /** - * Register the callback of keyboardWillHide - * - * @param { 'keyboardWillHide' } type - The value is fixed at 'keyboardWillHide', indicating the start of the keyboard hide animation event. - * @param { Callback } callback - Callback invoked before the keyboard hide animation start. - * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillHide can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - on(type: 'keyboardWillHide', callback: Callback): void; - - /** - * Unregister the callback of keyboardWillHide - * - * @param { 'keyboardWillHide' } type - The value is fixed at 'keyboardWillHide', indicating the start of the keyboard hide animation event. - * @param { Callback } callback - Callback invoked before the keyboard hide animation start. - * @throws { BusinessError } 801 - Capability not supported. Function keyboardWillHide can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - off(type: 'keyboardWillHide', callback?: Callback): void; - /** * Register the callback of keyboardDidShow * * @param { 'keyboardDidShow' } type - The value is fixed at 'keyboardDidShow', indicating the completion of the keyboard show animation event. * @param { Callback } callback - Callback invoked when the keyboard show animation is completed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidShow can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -6989,6 +5985,8 @@ declare namespace window { * * @param { 'keyboardDidShow' } type - The value is fixed at 'keyboardDidShow', indicating the completion of the keyboard show animation event. * @param { Callback } callback - Callback invoked when the keyboard show animation is completed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; + * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidShow can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -7003,6 +6001,9 @@ declare namespace window { * * @param { 'keyboardDidHide' } type - The value is fixed at 'keyboardDidHide', indicating the completion of the keyboard hide animation event. * @param { Callback } callback - Callback invoked when the keyboard hide animation is completed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidHide can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -7017,6 +6018,8 @@ declare namespace window { * * @param { 'keyboardDidHide' } type - The value is fixed at 'keyboardDidHide', indicating the completion of the keyboard hide animation event. * @param { Callback } callback - Callback invoked when the keyboard hide animation is completed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; + * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function keyboardDidHide can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -7027,7 +6030,7 @@ declare namespace window { off(type: 'keyboardDidHide', callback?: Callback): void; /** - * Subscribes to the touch event outside this window. + * Touch outside callback on. * * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. * @param { Callback } callback - Callback used to return the click event outside this window. @@ -7042,7 +6045,7 @@ declare namespace window { on(type: 'touchOutside', callback: Callback): void; /** - * Unsubscribes from the touch event outside this window. + * Touch outside callback off. * * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. * @param { Callback } callback - Callback used to return the click event outside this window. @@ -7098,14 +6101,14 @@ declare namespace window { * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ /** - * Subscribes to the visibility status change event of this window. + * Window visibility change callback on. * - * @param { 'windowVisibilityChange' } type - Event type. The value is fixed at 'windowVisibilityChange', indicating the visibility status change event. - * @param { Callback } callback - Callback used to return the visibility status of the window, which is a Boolean value. - * The value true means that the window is visible, and false means the opposite. + * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. + * @param { Callback } callback - Callback used to notify the window visibility change. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -7130,15 +6133,14 @@ declare namespace window { * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ /** - * Unsubscribes from the visibility status change event of this window. + * Window visibility change callback off. * - * @param { 'windowVisibilityChange' } type - Event type. The value is fixed at 'windowVisibilityChange', indicating the visibility status change event. - * @param { Callback } callback - Callback used to return the visibility status of the window. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { 'windowVisibilityChange' } type - The value is fixed at 'windowVisibilityChange', indicating the window visibility change. + * @param { Callback } callback - Callback used to notify the window visibility change. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -7183,43 +6185,7 @@ declare namespace window { off(type: 'systemDensityChange', callback?: Callback): void; /** - * Register Callback for window spans multiple screens and displays in full screen mode changed. - * - * - * @param { 'mainWindowFullScreenAcrossDisplaysChanged' } type - The value is fixed at 'mainWindowFullScreenAcrossDisplaysChanged', - * indicating the window spans multiple screens and displays in full screen mode changed. - * @param { Callback } callback - Callback used to notify the window spans multiple screens and displays in full screen mode changed. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - on(type: 'mainWindowFullScreenAcrossDisplaysChanged', callback: Callback): void; - - /** - * Unregister Callback for window spans multiple screens and displays in full screen mode changed. - * - * @param { 'mainWindowFullScreenAcrossDisplaysChanged' } type - The value is fixed at 'mainWindowFullScreenAcrossDisplaysChanged', - * indicating the window spans multiple screens and displays in full screen mode changed. - * @param { Callback } [callback] - Callback used to notify the window spans multiple screens and displays in full screen mode changed. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @since 20 - */ - off(type: 'mainWindowFullScreenAcrossDisplaysChanged', callback?: Callback): void; - - /** - * Subscribes to non-interaction events in a window within the specified period. - * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events. + * Register the callback function that has no interaction for a long time. * * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. * @param { number } timeout - The timeout(in seconds) of no interaction detection. @@ -7238,8 +6204,7 @@ declare namespace window { on(type: 'noInteractionDetected', timeout: number, callback: Callback): void; /** - * Unsubscribes from non-interaction events in a window within the specified period. - * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events. + * Unregister the callback function that has no interaction for a long time. * * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. * @param { Callback } callback - Callback used to notify the window has no interaction for a long time. @@ -7307,30 +6272,6 @@ declare namespace window { */ off(type: 'screenshot', callback?: Callback): void; - /** - * Register the callback of screenshot app event - * - * @param { 'screenshotAppEvent' } type - The value is fixed at 'screenshotAppEvent', indicating the screenshot app event. - * @param { Callback } callback - Callback invoked when a screenshot app event occurs. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - on(type: 'screenshotAppEvent', callback: Callback): void; - - /** - * Unregister the callback of screenshot app event - * - * @param { 'screenshotAppEvent' } type - The value is fixed at 'screenshotAppEvent', indicating the screenshot app event. - * @param { Callback } callback - Callback invoked when a screenshot app event occurs. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - off(type: 'screenshotAppEvent', callback?: Callback): void; - /** * Register the callback of dialogTargetTouch * @@ -7343,7 +6284,7 @@ declare namespace window { * @since 10 */ /** - * Subscribes to click or touch events in a window covered by a modal window. This API takes effect only when it is called by a modal window. + * Register the callback of dialogTargetTouch * * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode. * @param { Callback } callback - Callback invoked when the click event occurs in the target window of the modal window mode. @@ -7369,7 +6310,7 @@ declare namespace window { * @since 10 */ /** - * Unsubscribes from the touch event of the target window in the modal window mode. + * Unregister the callback of dialogTargetTouch * * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', * indicating the click event of the target window in the modal window mode. @@ -7395,10 +6336,10 @@ declare namespace window { * @since 10 */ /** - * Subscribes to the window lifecycle change event. + * Register the callback of windowEvent * - * @param { 'windowEvent' } type - Event type. The value is fixed at 'windowEvent', indicating the window lifecycle change event. - * @param { Callback } callback - Callback used to return the window lifecycle state. + * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. + * @param { Callback } callback - the callback of window event * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -7421,12 +6362,10 @@ declare namespace window { * @since 10 */ /** - * Unsubscribes from the window lifecycle change event. + * Unregister the callback of windowEvent * - * @param { 'windowEvent' } type - Event type. The value is fixed at 'windowEvent', indicating the window lifecycle change event. - * @param { Callback } callback - Callback used to return the window lifecycle state. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { 'windowEvent' } type - The value is fixed at 'windowEvent', indicating the window lifecycle change event. + * @param { Callback } callback - the callback of window event * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -7460,21 +6399,7 @@ declare namespace window { * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Register the callback of windowStatusChange - * - * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. - * @param { Callback } callback - Callback used to return the window status. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; - * 3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ on(type: 'windowStatusChange', callback: Callback): void; @@ -7500,58 +6425,16 @@ declare namespace window { * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Unregister the callback of windowStatusChange - * - * @param { 'windowStatusChange' } type - The value is fixed at 'windowStatusChange', indicating the window status change event. - * @param { Callback } callback - Callback used to return the window status. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; - * 2. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @syscap SystemCapability.Window.SessionManager - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ off(type: 'windowStatusChange', callback?: Callback): void; /** - * Register the callback of windowStatusDidChange - * - * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event. - * @param { Callback } callback - Callback used to return the window status. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - on(type: 'windowStatusDidChange', callback: Callback): void; - - /** - * Unregister the callback of windowStatusDidChange + * Register the callback of subWindowClose * - * @param { 'windowStatusDidChange' } type - The value is fixed at 'windowStatusDidChange', indicating the window status change event. - * @param { Callback } [callback] - Callback used to return the window status. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - off(type: 'windowStatusDidChange', callback?: Callback): void; - - /** - * Subscribes to the event indicating that the child window is closed. - * This event is triggered only when the user clicks the system-provided close button in the upper right corner to close the child window. - * It is not triggered when the child window is closed in other ways. - * - * @param { 'subWindowClose' } type - Event type. The value is fixed at 'subWindowClose', indicating the child window close event. - * @param { Callback } callback - Callback invoked when the close button in the upper right corner of the child window is clicked. - * The internal logic of the callback function requires a return value of the Boolean type. - * The return value determines whether to continue to close the child window. - * The value true means not to close the child window, and false means to continue to close the child window. + * @param { 'subWindowClose' } type - The value is fixed at 'subWindowClose', indicating the subwindow close event. + * @param { Callback } callback - Callback used to return whether to terminate the subwindow close process. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -7564,15 +6447,10 @@ declare namespace window { on(type: 'subWindowClose', callback: Callback): void; /** - * Unsubscribes from the event indicating that the child window is closed. + * Unregister the callback of subWindowClose * - * @param { 'subWindowClose' } type - Event type. The value is fixed at 'subWindowClose', indicating the child window close event. - * @param { Callback } callback - Callback invoked when the close button in the upper right corner of the child window is clicked. - * The internal logic of the callback function requires a return value of the Boolean type. - * The return value determines whether to continue to close the child window. - * The value true means not to close the child window, and false means to continue to close the child window. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { 'subWindowClose' } type - The value is fixed at 'subWindowClose', indicating the subwindow close event. + * @param { Callback } callback - Callback used to return whether to terminate the subwindow close process. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -7585,15 +6463,10 @@ declare namespace window { off(type: 'subWindowClose', callback?: Callback): void; /** - * Subscribes to the event indicating that the main window or child window will be closed. - * This event is triggered only when the user clicks the close button in the system-provided title bar to close the window. - * It is not triggered when the window is closed in other ways. + * Asynchronous callback event for closing the registration window. * - * @param { 'windowWillClose' } type - Event type. The value is fixed at 'windowWillClose', indicating the window close event. - * @param { Callback> } callback - Callback used to when the close button in the upper right corner of the window is clicked. - * The internal logic of the callback function requires a return value of the Promise type. - * In the returned Promise function, resolve(true) means not to close the window, - * and resolve(false) or reject means to continue to close the window. + * @param { 'windowWillClose' } type - The value is fixed at 'windowWillClose', indicating the window close event. + * @param { Callback> } callback - The callback function returns a Promise to decide whether to close the window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -7607,14 +6480,10 @@ declare namespace window { on(type: 'windowWillClose', callback: Callback>): void; /** - * Unsubscribes from the event indicating that the main window or child window will be closed. + * Cancel the asynchronous callback event for closing the registration window. * - * @param { 'windowWillClose' } type - Event type. The value is fixed at 'windowWillClose', indicating the window close event. - * @param { Callback> } callback - Callback used to when the close button in the upper right corner of the window is clicked. - * The internal logic of the callback function requires a return value of the Promise type. - * It does not return any parameter. In the returned Promise function, - * resolve(true) means not to close the window, - * and resolve(false) or reject means to continue to close the window. + * @param { 'windowWillClose' } type - The value is fixed at 'windowWillClose', indicating the window close event. + * @param { Callback> } callback - The callback function returns a Promise to decide whether to close the window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -7784,10 +6653,9 @@ declare namespace window { ): void; /** - * Sets whether the modal window responds to the back gesture event. An error code is returned if this API is called for a non-modal window. + * Set whether the dialog window responds to back gesture. * - * @param { boolean } enabled - Whether to respond to the back gesture event. - * The value true means to respond to the back gesture event and trigger the onBackPress callback, and false means the opposite. + * @param { boolean } enabled - Responds to back gesture if true, or ignore back gesture if false. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -8096,20 +6964,6 @@ declare namespace window { */ setWindowBackgroundColor(color: string | ColorMetrics): void; - /** - * Sets the shadow enable of window. - * - * @param { boolean } enable - Enable or disable window shadow. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - setWindowShadowEnabled(enable: boolean): Promise; - /** * Sets the brightness of window. * @@ -8153,11 +7007,10 @@ declare namespace window { setTopmost(isTopmost: boolean): Promise; /** - * Places the main window above all the other windows of the application. + * Set whether the main window is topmost. * * @permission ohos.permission.WINDOW_TOPMOST - * @param { boolean } isWindowTopmost - Whether to pin the main window on top. - * The value true means to pin the main window on top, and false means the opposite. + * @param { boolean } isWindowTopmost - Main window is topmost if true. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; @@ -8610,22 +7463,7 @@ declare namespace window { * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 - */ - /** - * Sets whether is private mode or not. - * - * @permission ohos.permission.PRIVACY_WINDOW - * @param { boolean } isPrivacyMode in private mode if true, or not if false. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ setWindowPrivacyMode(isPrivacyMode: boolean): Promise; @@ -8655,30 +7493,15 @@ declare namespace window { * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ + setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback): void; + /** - * Sets whether is private mode or not. + * Ignore this window during screenshot. * - * @permission ohos.permission.PRIVACY_WINDOW - * @param { boolean } isPrivacyMode in private mode if true, or not if false. - * @param { AsyncCallback } callback Callback used to return the result. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} - * @arkts 1.1&1.2 - */ - setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback): void; - - /** - * Ignore this window during screenshot. - * - * @param { boolean } isSkip skip if true, or not if false. + * @param { boolean } isSkip skip if true, or not if false. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -8871,18 +7694,6 @@ declare namespace window { */ snapshot(): Promise; - /** - * Obtains snapshot of window - * - * @returns { image.PixelMap } Return pixel map of snapshot. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300018 - Timeout. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - snapshotSync(): image.PixelMap; - /** * Obtains snapshot of window even set the privacy mode. * @@ -8909,8 +7720,7 @@ declare namespace window { * @since 9 */ /** - * Sets the opacity for this window. - * This API can be used only when you customize an animation to be played during the display or hiding of a system window. + * Sets opacity of window * * @param { number } opacity Interval is 0.f-1.f. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -8940,8 +7750,7 @@ declare namespace window { * @since 9 */ /** - * Sets the scale parameters for this window. - * This API can be used only when you customize an animation to be played during the display or hiding of a system window. + * Sets scale options of window. * * @param { ScaleOptions } scaleOptions scale param of window. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -8971,8 +7780,7 @@ declare namespace window { * @since 9 */ /** - * Sets the rotation parameters for this window. - * This API can be used only when you customize an animation to be played during the display or hiding of a system window. + * Sets rotate options of window. * * @param { RotateOptions } rotateOptions rotate param of window. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -9002,8 +7810,7 @@ declare namespace window { * @since 9 */ /** - * Sets the translation parameters for this window. - * This API can be used only when you customize an animation to be played during the display or hiding of a system window. + * Sets translate options of window. * * @param { TranslateOptions } translateOptions translate param of window. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -9085,9 +7892,7 @@ declare namespace window { * @since 9 */ /** - * Blurs the background of this window. - * The window background refers to the lower-layer area covered by the window, which is the same as the window size. - * To make the blur effect visible, you must set the window background transparent by calling setWindowBackgroundColor. + * Sets the window backdrop blur radius. * * @param { number } radius the blur radius. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -9116,7 +7921,7 @@ declare namespace window { * @since 9 */ /** - * Sets the blur style for the background of this window. + * Sets the window backdrop blur style. * * @param { BlurStyle } blurStyle the specified blur style. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -9148,7 +7953,7 @@ declare namespace window { * @since 9 */ /** - * Sets the shadow for the window borders. + * Sets shadow. * * @param { number } radius the radius of the shadow. * @param { string } color the color of the shadow. @@ -9168,11 +7973,9 @@ declare namespace window { setShadow(radius: number, color?: string, offsetX?: number, offsetY?: number): void; /** - * Sets the blur radius of the shadow on the edges of a child window or floating window. + * Sets window shadow radius. * - * @param { number } radius - Radius of the shadow, measured in px. - * The value is a floating point number greater than or equal to 0.0, - * and the value 0.0 means that the shadow is disabled for the window borders. + * @param { number } radius the radius of the shadow. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -9181,7 +7984,7 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 17 + * @since 18 */ setWindowShadowRadius(radius: number): void; @@ -9199,7 +8002,7 @@ declare namespace window { * @since 9 */ /** - * Sets the radius of the rounded corners for this window. + * Sets corner radius. * * @param { number } cornerRadius the corner radius. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. @@ -9215,11 +8018,9 @@ declare namespace window { setCornerRadius(cornerRadius: number): void; /** - * Sets the radius of the rounded corners for a child window or floating window. + * Sets sub window or floating window corner radius. * - * @param { number } cornerRadius - Radius of the rounded corners, measured in vp. - * The value is a floating point number greater than or equal to 0.0. - * The value 0.0 means that the window does not use rounded corners. + * @param { number } cornerRadius - Indicate the corner radius of the window. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -9230,20 +8031,20 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 17 + * @since 18 */ setWindowCornerRadius(cornerRadius: number): Promise; /** - * Obtains the radius of rounded corners of a child window or floating window. + * Get sub window or floating window corner radius. * - * @returns { number } - Radius of the rounded corner of the child window or floating window, measured in vp. + * @returns { number } - The corner radius of window. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 17 + * @since 18 */ getWindowCornerRadius(): number; @@ -9522,11 +8323,9 @@ declare namespace window { * @since 11 */ /** - * Minimizes the main window if the caller is the main window. The main window can be restored in the dock bar. For 2-in-1 devices, it can be restored by calling restore(). - * Hides the child window if the caller is a child window. The child window cannot be restored in the dock bar. It can be made visible again by calling showWindow(). - * + * Minimize app main window and hide app subWindow. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - The callback of Minimize. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -9548,10 +8347,9 @@ declare namespace window { * @since 11 */ /** - * Minimizes the main window if the caller is the main window. The main window can be restored in the dock bar. For 2-in-1 devices, it can be restored by calling restore(). - * Hides the child window if the caller is a child window. The child window cannot be restored in the dock bar. It can be made visible again by calling showWindow(). + * Minimize app main window and hide app subWindow. * - * @returns { Promise } - Promise that returns no value. + * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -9573,22 +8371,7 @@ declare namespace window { * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Maximizes the main window. - * - * @param { ?MaximizePresentation } presentation - Layout when the window is maximized. - * The default value is window.MaximizePresentation.ENTER_IMMERSIVE, - * indicating that the window enters the immersive layout when maximized. - * @returns { Promise } - Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Function maximize can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ maximize(presentation?: MaximizePresentation): Promise; @@ -9767,8 +8550,7 @@ declare namespace window { /** * When get focused, keep the keyboard created by other windows, support system window and app subwindow. * - * @param { boolean } keepKeyboardFlag - Whether to keep the soft keyboard created by others. - * The value true means to keep the soft keyboard, and false means the opposite. + * @param { boolean } keepKeyboardFlag - keep the keyboard if true, otherwise means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -9792,10 +8574,9 @@ declare namespace window { * @since 11 */ /** - * Restores the main window from the full-screen, maximized, or split-screen mode to a floating window, - * and restores the window size and position to those before the full-screen, maximized, or split-screen mode is entered. + * Recover app main window. * - * @returns { Promise } - Promise that returns no value. + * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300001 - Repeated operation. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -9807,9 +8588,9 @@ declare namespace window { recover(): Promise; /** - * Restores the main window from minimization to the foreground, returning it to its size and position before it is minimized. + * After the app main window is minimized, if the Ability is not in the background state, you can restore app main window. * - * @returns { Promise } - Promise that returns no value. + * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -9843,27 +8624,15 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 - */ - /** - * Sets whether the title bar is visible in the window. - * - * @param { boolean } isVisible - Whether the title bar is visible. The value true means that the title bar is visible and false means the opposite. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ setWindowDecorVisible(isVisible: boolean): void; /** - * Checks whether the title bar of this window is visible. + * Get the visibility of the window decor. * - * @returns { boolean } - Check result. The value true means that the title bar is visible, and false means the opposite. + * @returns { boolean } - The visibility of window decor, true if the decor is visible, otherwise means the. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -9873,10 +8642,9 @@ declare namespace window { getWindowDecorVisible(): boolean; /** - * Enables or disables the capability to move the window (either main window or child window) by dragging its title bar and to maximize the window with a double-click. + * Set whether window can be moved by drag title. * - * @param { boolean } enabled - Whether to enable the capability to move the window by dragging the title bar and to maximize the window with a double-click. - * The value true means to enable the capability, and false means the opposite. + * @param { boolean } enabled - Enable the window title move if true, otherwise means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -9917,23 +8685,6 @@ declare namespace window { * @atomicservice * @since 12 */ - /** - * Enables the modal property of the child window. After the modal property is enabled, - * the parent window does not respond to user interactions until the child window is closed or the child window's modal property is disabled. - * - * @param { boolean } isModal - Whether to enable the modal property of the child window. - * The value true means to enable the modal property, and false means the opposite. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ setSubWindowModal(isModal: boolean): Promise; /** @@ -9951,24 +8702,6 @@ declare namespace window { * @atomicservice * @since 14 */ - /** - * Enables the modal property of the child window. After the modal property is enabled, - * the parent window does not respond to user interactions until the child window is closed or the child window's modal property is disabled. - * - * @param { boolean } isModal - Whether to enable the modal property of the child window. The value true means to enable the modal property, - * and false means the opposite. Currently, this parameter can only be set to true. - * @param { ModalityType } modalityType - Modality type of the child window. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ setSubWindowModal(isModal: boolean, modalityType: ModalityType): Promise; /** @@ -9984,12 +8717,9 @@ declare namespace window { * @since 11 */ /** - * Sets the height of the title bar of this window. - * This API takes effect for the window that has a title bar or a three-button area on 2-in-1 devices. + * Set the height of the window decor. * - * @param { number } height - Height of the title bar. It takes effect only for the window with the title bar. - * The value is an integer in the range [37,112]. The unit is vp. If a floating point number is passed in, - * the value is rounded down. A value outside the range is invalid. + * @param { number } height - The height of window decor. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -10012,10 +8742,9 @@ declare namespace window { * @since 11 */ /** - * Obtains the height of the title bar of this window. - * This API takes effect for the window that has a title bar or a three-button area on 2-in-1 devices. + * Get the height of the window decor. * - * @returns { number } - Height of the title bar. The value is an integer in the range [37,112]. The unit is vp. + * @returns { number } - The height of window decor. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -10026,9 +8755,9 @@ declare namespace window { getWindowDecorHeight(): number; /** - * Sets the button style of the decoration bar. The setting takes effect only for the main window and the child window with the window title enabled. + * Set the style of the window decor. * - * @param { DecorButtonStyle } dectorStyle - Button style of the decoration bar. + * @param { DecorButtonStyle } dectorStyle - The style of window decor. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -10042,10 +8771,9 @@ declare namespace window { setDecorButtonStyle(dectorStyle: DecorButtonStyle): void; /** - * Obtains the button style of the decoration bar. The setting takes effect only for the main window and the child window with the window title enabled. + * Get the style of the window decor. * - * @returns { DecorButtonStyle } - Button style on the decoration bar of the current window. - * The decoration button area is located in the upper right corner of the window. + * @returns { DecorButtonStyle } - The style of window decor. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -10084,9 +8812,9 @@ declare namespace window { * @since 11 */ /** - * Obtains the rectangle that holds the minimize, maximize, and close buttons on the title bar of the main window or the decorated child window. + * Get the area of window title buttons. * - * @returns { TitleButtonRect } - Rectangle obtained, which is located in the upper right corner of the window. + * @returns { TitleButtonRect } - The area of window title buttons. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager @@ -10096,11 +8824,11 @@ declare namespace window { getTitleButtonRect(): TitleButtonRect; /** - * Shows or hides the maximize, minimize, and split-screen buttons on the title bar of the main window. + * Set whether to display the maximize, minimize, split buttons of main window. * - * @param { boolean } isMaximizeVisible - Whether to show the maximize button. The value true means to show the button, and false means to hide it. - * @param { boolean } isMinimizeVisible - Whether to show the minimize button. The value true means to show the button, and false means to hide it. - * @param { boolean } isSplitVisible - Whether to show the split-screen button. The value true means to show the button, and false means to hide it. + * @param { boolean } isMaximizeVisible - Display maximize button if true, or hide maximize button if false. + * @param { boolean } isMinimizeVisible - Display minimize button if true, or hide minimize button if false. + * @param { boolean } isSplitVisible - Display split button if true, or hide split button if false. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -10114,12 +8842,11 @@ declare namespace window { setTitleButtonVisible(isMaximizeVisible: boolean, isMinimizeVisible: boolean, isSplitVisible: boolean): void; /** - * Shows or hides the maximize, minimize, and close buttons on the title bar of the main window. + * Set whether to display the maximize, minimize, close buttons of main window. * - * @param { boolean } isMaximizeButtonVisible - Whether to show the maximize button. The value true means to show the button, and false means the opposite. - * If the maximize button is hidden, the corresponding restore button is also hidden in the maximize scenario. - * @param { boolean } isMinimizeButtonVisible - Whether to show the minimize button. The value true means to show the button, and false means the opposite. - * @param { boolean } isCloseButtonVisible - Whether to show the close button. The value true means to show the button, and false means the opposite. + * @param { boolean } isMaximizeButtonVisible - Display maximize button if true, or hide maximize button if false. + * @param { boolean } isMinimizeButtonVisible - Display minimize button if true, or hide minimize button if false. + * @param { boolean } isCloseButtonVisible - Display close button if true, or hide close button if false. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -10132,6 +8859,18 @@ declare namespace window { */ setWindowTitleButtonVisible(isMaximizeButtonVisible: boolean, isMinimizeButtonVisible: boolean, isCloseButtonVisible?: boolean): void; + /** + * Checks whether the window title buttons is visible. + * + * @returns { boolean } - The value true means the window title buttons is visible, and false means the opposite. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 18 + */ + isWindowTitleButtonVisible(): boolean; + /** * Enable landscape multiWindow * @@ -10145,8 +8884,7 @@ declare namespace window { enableLandscapeMultiWindow(): Promise; /** - * Starts moving this window. This API uses a promise to return the result. - * The window moves along with the cursor only when this API is called in the callback function of onTouch, where the event type is TouchType.Down. + * Start moving window. * * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -10162,15 +8900,10 @@ declare namespace window { startMoving(): Promise; /** - * Specifies the cursor position within the window and moves the window. It first adjusts the window to the cursor position before starting to move the window. - * The window moves along with the cursor only when this API is called in the callback function of onTouch, where the event type is TouchType.Down. + * Start moving window. * - * @param { number } offsetX - X-axis offset of the cursor position relative to the upper left corner of the window during movement, measured in px. - * This parameter only accepts integer values; any floating-point input will be rounded down. - * Negative values or values exceeding the window width are invalid. The window width can be obtained from WindowProperties. - * @param { number } offsetY - Y-axis offset of the cursor position relative to the upper left corner of the window during movement, measured in px. - * This parameter only accepts integer values; any floating-point input will be rounded down. - * Negative values or values exceeding the window height are invalid. The window height can be obtained from WindowProperties. + * @param { number } offsetX - Expected pointer position x-axis offset in window when start moving. + * @param { number } offsetY - Expected pointer position y-axis offset in window when start moving. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -10187,7 +8920,7 @@ declare namespace window { startMoving(offsetX: number, offsetY: number): Promise; /** - * Stops window movement when a window is being dragged. This API uses a promise to return the result. + * Stop moving window. * * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -10216,18 +8949,6 @@ declare namespace window { * @systemapi Hide this for inner system use. * @since 14 */ - /** - * Enable drag window. - * - * @param { boolean } enable - The value true means to enable window dragging, and false means the opposite. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ enableDrag(enable: boolean): Promise; /** @@ -10242,42 +8963,6 @@ declare namespace window { */ disableLandscapeMultiWindow(): Promise; - /** - * Set window transition animation - * - * @param { WindowTransitionType } transitionType - Transition animation type. - * @param { TransitionAnimation } animation - Transition animation config. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. - * @syscap SystemCapability.Window.SessionManager - * @stagemodelonly - * @atomicservice - * @since 20 - */ - setWindowTransitionAnimation(transitionType: WindowTransitionType, animation: TransitionAnimation): Promise; - - - /** - * Get window transition animation configuration - * - * @param { WindowTransitionType } transitionType - Transition animation type. - * @returns { TransitionAnimation | undefined } Transition animation with transition type, or undefined if it has not been set. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. - * @syscap SystemCapability.Window.SessionManager - * @stagemodelonly - * @atomicservice - * @since 20 - */ - getWindowTransitionAnimation(transitionType: WindowTransitionType): TransitionAnimation | undefined; - /** * Register the callback of title buttons area change. * @@ -10292,11 +8977,10 @@ declare namespace window { * @since 11 */ /** - * Subscribes to the change event of the rectangle that holds the minimize, maximize, and close buttons on the title bar of the window. + * Register the callback of title buttons area change. * - * @param { 'windowTitleButtonRectChange' } type - Event type. The value is fixed at 'windowTitleButtonRectChange', - * indicating that the change event of the rectangle that holds the minimize, maximize, and close buttons. - * @param { Callback } callback - Callback used to return the new rectangle. + * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. + * @param { Callback } callback - Callback used to return the current title buttons area. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -10322,12 +9006,10 @@ declare namespace window { * @since 11 */ /** - * Unsubscribes from the change event of the rectangle that holds the minimize, maximize, and close buttons on the title bar of the window. + * Unregister the callback of title buttons area change. * - * @param { 'windowTitleButtonRectChange' } type - Event type. The value is fixed at 'windowTitleButtonRectChange', - * indicating that the change event of the rectangle that holds the minimize, maximize, and close buttons. - * @param { Callback } callback - Callback used to return the new rectangle. If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { 'windowTitleButtonRectChange' } type - The value is fixed at 'windowTitleButtonRectChange', indicating the title buttons area change event. + * @param { Callback } callback - Callback used to return the current title buttons area. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. @@ -10391,121 +9073,6 @@ declare namespace window { */ off(type: 'windowRectChange', callback?: Callback): void; - /** - * Register the callback of rectChangeInGlobalDisplay - * - * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window gloabl rect change event. - * @param { Callback } callback - Callback used to return the RectChangeOptions. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - on(type: 'rectChangeInGlobalDisplay', callback: Callback): void; - - /** - * Unregister the callback of rectChangeInGlobalDisplay - * - * @param { 'rectChangeInGlobalDisplay' } type - The value is fixed at 'rectChangeInGlobalDisplay', indicating the window global rect change event. - * @param { Callback } [callback] - Callback used to return the RectChangeOptions. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - off(type: 'rectChangeInGlobalDisplay', callback?: Callback): void; - - /** - * Convert the window coordinates to the global coordinates. - * - * @param { number } winX - Indicate the X-coordinate of the component relative to the current window. - * @param { number } winY - Indicate the Y-coordinate of the component relative to the current window. - * @returns { Promise } Promise used to return the Position. The pair {x, y} represents respectively the X-coordinate - * and Y-coordinate of the window relative to the main screen. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - clientToGlobalDisplay(winX: number, winY: number): Promise; - - /** - * Convert the global coordinates to the window coordinates. - * - * @param { number } globalDisplayX - Indicate the X-coordinate of the component relative to the main screen. - * @param { number } globalDisplayY - Indicate the Y-coordinate of the component relative to the main screen. - * @returns { Promise } Promise used to return the Position. The pair {x, y} represents respectively the X-coordinate - * and Y-coordinate of the window relative to the current screen. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1.Invalid parameter range. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - globalDisplayToClient(globalDisplayX: number, globalDisplayY: number): Promise; - - /** - * Register the callback of rotation change - * - * @param { 'rotationChange' } type - The value is fixed at 'rotationChange', indicating the window rotation change event. - * @param { RotationChangeCallback } callback - Callback used to return the rotation change result. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - on(type: 'rotationChange', callback: RotationChangeCallback): void; - - /** - * Unregister the callback of rotationChange - * - * @param { 'rotationChange' } type - The value is fixed at 'rotationChange', indicating the window rotation change event. - * @param { RotationChangeCallback } callback - Callback used to return the RectChangeOptions. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - off(type: 'rotationChange', callback?: RotationChangeCallback): void; - - /** - * UIExtension in window secure limit change callback on. - * - * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. - * @param { Callback } callback Callback used to return the result whether the APP has uiextension secure limit. - * @throws { BusinessError } 801 - Capability not supported.Function on('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - on(eventType: 'uiExtensionSecureLimitChange', callback: Callback): void; - - /** - * UIExtension in window secure limit change callback off. - * - * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. - * @param { Callback } callback Callback used to return the result whether the APP has uiextension secure limit. - * @throws { BusinessError } 801 - Capability not supported.Function off('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - off(eventType: 'uiExtensionSecureLimitChange', callback?: Callback): void; - - /** * Set gray scale of window. * @@ -10552,18 +9119,6 @@ declare namespace window { */ getImmersiveModeEnabledState(): boolean; - - /** - * Checks whether the layout is immersive. - * - * @returns { boolean } The value true means that the layout is immersive, and false means the opposite. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - isImmersiveLayout(): boolean; - /** * Get the window status of current window. * @@ -10589,11 +9144,11 @@ declare namespace window { isFocused(): boolean; /** - * Creates a child window under the main window, another child window, or floating window. + * Create sub window with options. * - * @param { string } name - Name of the child window. - * @param { SubWindowOptions } options - Parameters used for creating the child window. - * @returns { Promise } Promise used to used to return the child window created. + * @param { string } name - window name of sub window + * @param { SubWindowOptions } options - options of sub window creation + * @returns { Promise } Promise used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -10611,6 +9166,9 @@ declare namespace window { * * @param { number } windowId - Indicates parent window id. * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -10618,7 +9176,7 @@ declare namespace window { * @throws { BusinessError } 1300009 - The parent window is invaild. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since 18 */ setParentWindow(windowId: number): Promise; @@ -10632,7 +9190,7 @@ declare namespace window { * @throws { BusinessError } 1300009 - The parent window is invaild. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since 18 */ getParentWindow(): Window; @@ -10650,7 +9208,7 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 17 + * @since 16 */ setFollowParentMultiScreenPolicy(enabled: boolean): Promise; @@ -10669,21 +9227,6 @@ declare namespace window { * @atomicservice * @since 14 */ - /** - * Sets whether to show the window title bar and dock bar when the cursor hovers over the hot zone while the main window is in full-screen mode. - * - * @param { boolean } isTitleHoverShown - Whether to show the window title bar. The value true means to show the window title bar, - * and false means the opposite. The default value is true. - * @param { boolean } isDockHoverShown - Whether to show the dock bar. The value true means to show the dock bar, - * and false means the opposite. The default value is true. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ setTitleAndDockHoverShown(isTitleHoverShown?: boolean, isDockHoverShown?: boolean): Promise; /** @@ -10708,11 +9251,12 @@ declare namespace window { * Set whether window delay raise is enabled. * * @param { boolean } isEnabled - The value true means to enable window delay raise, and false means disable window delay raise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported.function setWindowDelayRaiseOnDrag can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since 18 */ setWindowDelayRaiseOnDrag(isEnabled: boolean): void; @@ -10739,7 +9283,7 @@ declare namespace window { * Get the zlevel of current sub window. * * @returns { number } - the zlevel of current sub window. - * @throws { BusinessError } 801 - Capability not supported. Function getSubWindowZLevel can not work correctly due to limited device capabilities. + * @throws { BusinessError } 801 - Capability not supported. Function setSubWindowZLevel can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager @@ -10747,21 +9291,6 @@ declare namespace window { * @since 18 */ getSubWindowZLevel(): number; - - /** - * Set the policy of key frame when resize by dragging. - * - * @param { KeyFramePolicy } keyFramePolicy - The policy of key frame to set. - * @returns { Promise } - Promise is used to return the effective policy of key frame. - * @throws { BusinessError } 801 - Capability not supported. Function setSubWindowZLevel can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300004 - Unauthorized operation. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Incorrect parameter format. - * @syscap SystemCapability.Window.SessionManager - * @since 20 - */ - setDragKeyFramePolicy(keyFramePolicy: KeyFramePolicy): Promise; } /** @@ -10922,50 +9451,7 @@ declare namespace window { } /** - * Window stage lifecycle callback event type - * - * @enum { number } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - enum WindowStageLifecycleEventType { - /** - * The window stage is running in the foreground. - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - SHOWN = 1, - /** - * The window stage is interactive in the foreground. - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - RESUMED = 2, - /** - * The window stage is not interactive in the foreground. - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - PAUSED = 3, - /** - * The window stage is running in the background. - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - HIDDEN = 4 - } - - /** - * Enum for window modality Type + * Enum for window modality Type * * @enum { number } * @syscap SystemCapability.Window.SessionManager @@ -10994,28 +9480,6 @@ declare namespace window { APPLICATION_MODALITY = 1, } - - /** - * Options for window shown - * - * @interface ShowWindowOptions - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - interface ShowWindowOptions { - /** - * Indicates whether the window get focus when it is shown - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - focusOnShow?: boolean; - } - - /** * Options for subwindow creation * @@ -11107,7 +9571,7 @@ declare namespace window { * @type { ?boolean } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since 18 */ maximizeSupported?: boolean; /** @@ -11119,16 +9583,6 @@ declare namespace window { * @since 18 */ zLevel?: number; - /** - * Indicates whether subwindow show outline - * - * @type { ?boolean } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - outlineEnabled?: boolean; - } /** * WindowStage @@ -11178,9 +9632,9 @@ declare namespace window { * @since 10 */ /** - * Obtains the main window of this window stage. This API uses a promise to return the result. + * Get main window of the stage. * - * @returns { Promise } Promise used to return the main window. + * @returns { Promise } Callback used to return the subwindow. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -11213,7 +9667,7 @@ declare namespace window { * @since 10 */ /** - * Obtains the main window of this window stage. This API uses an asynchronous callback to return the result. + * Get main window of the stage. * * @param { AsyncCallback } callback Callback used to return the main window. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -11248,9 +9702,9 @@ declare namespace window { * @since 10 */ /** - * Obtains the main window of this window stage. + * Get main window of the stage. * - * @returns { Window } Main window. + * @returns { Window } * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -11280,18 +9734,20 @@ declare namespace window { * @returns { Promise } Promise used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Creates a child window for this window stage. This API uses a promise to return the result. + * Create sub window of the stage. * - * @param { string } name Name of the child window. - * @returns { Promise } Promise used to return the child window. + * @param { string } name window name of sub window + * @returns { Promise } Promise used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11318,18 +9774,20 @@ declare namespace window { * @param { AsyncCallback } callback Callback used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Creates a child window for this window stage. This API uses an asynchronous callback to return the result. + * Create sub window of the stage. * - * @param { string } name Name of the child window. - * @param { AsyncCallback } callback Callback used to return the child window. + * @param { string } name window name of sub window + * @param { AsyncCallback } callback Callback used to return the subwindow. * @throws { BusinessError } 401 - Parameter error. Possible cause: Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11380,17 +9838,17 @@ declare namespace window { * Get sub window of the stage. * * @returns { Promise> } - * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Obtains all the child windows of this window stage. This API uses a promise to return the result. + * Get sub window of the stage. * - * @returns { Promise> } Promise used to return all the child windows. - * @throws { BusinessError } 1300002 - This window state is abnormal. + * @returns { Promise> } + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11411,17 +9869,17 @@ declare namespace window { * Get sub window of the stage. * * @param { AsyncCallback> } callback Callback used to return all the subwindows. - * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Obtains all the child windows of this window stage. This API uses a promise to return the result. + * Get sub window of the stage. * - * @param { AsyncCallback> } callback Callback used to return all the child windows. - * @throws { BusinessError } 1300002 - This window state is abnormal. + * @param { AsyncCallback> } callback Callback used to return all the subwindows. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11430,16 +9888,13 @@ declare namespace window { */ getSubWindow(callback: AsyncCallback>): void; /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path Path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -11447,34 +9902,30 @@ declare namespace window { * @since 9 */ /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path Path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path Path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11484,16 +9935,13 @@ declare namespace window { */ loadContent(path: string, storage: LocalStorage, callback: AsyncCallback): void; /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -11501,34 +9949,30 @@ declare namespace window { * @since 9 */ /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Loads the content of a page, with its path in the current project specified, to the main window of this window stage, and transfers the state attribute to the page through a local storage. - * This API uses a promise to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { LocalStorage } storage The data object shared within the content instance loaded by the window * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11538,14 +9982,12 @@ declare namespace window { */ loadContent(path: string, storage?: LocalStorage): Promise; /** - * Loads content from a page to this window stage. This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -11553,30 +9995,28 @@ declare namespace window { * @since 9 */ /** - * Loads content from a page to this window stage. This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform * @since 10 */ /** - * Loads content from a page to this window stage. This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. Exercise caution when using it. + * Loads content * * @param { string } path of the page to which the content will be loaded * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. - * 3. Invalid path parameter. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300005 - This window stage is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core * @StageModelOnly * @crossplatform @@ -11587,17 +10027,15 @@ declare namespace window { loadContent(path: string, callback: AsyncCallback): void; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } name - name of the page to which the content will be loaded. + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @stagemodelonly * @crossplatform @@ -11608,16 +10046,14 @@ declare namespace window { loadContentByName(name: string, storage: LocalStorage, callback: AsyncCallback): void; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. + * @param { string } name - name of the page to which the content will be loaded. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @stagemodelonly * @crossplatform @@ -11628,17 +10064,15 @@ declare namespace window { loadContentByName(name: string, callback: AsyncCallback): void; /** - * Loads the content of a named route page to this window, and transfers the state attribute to the page through a local storage. - * This API uses an asynchronous callback to return the result. You are advised to call this API during UIAbility startup. - * If called multiple times, this API will destroy the existing page content (UIContent) before loading the new content. - * Exercise caution when using it. + * Loads content by named router * - * @param { string } name - Name of the named route page. - * @param { LocalStorage } storage - Page-level UI state storage unit, which is used to transfer the state attribute for the page. + * @param { string } name - name of the page to which the content will be loaded. + * @param { LocalStorage } storage - The data object shared within the content instance loaded by the window. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @stagemodelonly * @crossplatform @@ -11678,9 +10112,9 @@ declare namespace window { * @since 10 */ /** - * Subscribes to the window stage lifecycle change event. + * Window stage event callback on. * - * @param { 'windowStageEvent' } eventType Event type. The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. + * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. * @param { Callback } callback Callback used to return the window stage lifecycle state. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -11723,12 +10157,10 @@ declare namespace window { * @since 10 */ /** - * Unsubscribes from the window stage lifecycle change event. + * Window stage event callback off. * - * @param { 'windowStageEvent' } eventType Event type. The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. + * @param { 'windowStageEvent' } eventType The value is fixed at 'windowStageEvent', indicating the window stage lifecycle change event. * @param { Callback } callback Callback used to return the window stage lifecycle state. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -11743,42 +10175,10 @@ declare namespace window { off(eventType: 'windowStageEvent', callback?: Callback): void; /** - * Subscribes to the window stage lifecycle change event. - * - * @param { 'windowStageLifecycleEvent' } eventType Event type. The value is fixed at 'windowStageLifecycleEvent', indicating the window stage lifecycle change event. - * @param { Callback } callback Callback used to return the window stage lifecycle state. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300005 - This window stage is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - on(eventType: 'windowStageLifecycleEvent', callback: Callback): void; - - /** - * Unsubscribes from the window stage lifecycle change event. - * - * @param { 'windowStageLifecycleEvent' } eventType Event type. The value is fixed at 'windowStageLifecycleEvent', indicating the window stage lifecycle change event. - * @param { Callback } [callback] Callback used to return the window stage lifecycle state. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300005 - This window stage is abnormal. - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @stagemodelonly - * @since 20 - */ - off(eventType: 'windowStageLifecycleEvent', callback?: Callback): void; - - /** - * Subscribes to the click event on the close button in the three-button navigation bar of the main window. - * This event is triggered when the close button in the three-button navigation bar of the main window is clicked. + * Window stage close callback on. * - * @param { 'windowStageClose' } eventType - Event type. The value is fixed at 'windowStageClose', - * indicating that the close button in the three-button navigation bar of the main window is clicked. - * @param { Callback } callback - Callback invoked when the close button in the upper right corner of the main window is clicked. - * The return value determines whether to continue to close the main window. - * The value true means not to close the main window, and false means to continue to close the main window. + * @param { 'windowStageClose' } eventType The value is fixed at 'windowStageClose', indicating the window stage close event. + * @param { Callback } callback Callback function requires a boolean return value to determine whether to close the current main window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -11793,13 +10193,10 @@ declare namespace window { on(eventType: 'windowStageClose', callback: Callback): void; /** - * Unsubscribes from the event indicating that the main window is closed. + * Window stage close callback off. * - * @param { 'windowStageClose' } eventType - Event type. The value is fixed at 'windowStageClose', - * indicating that the close button in the three-button navigation bar of the main window is clicked. - * @param { Callback } callback - Callback invoked when the close button in the upper right corner of the main window is clicked. - * If a value is passed in, the corresponding subscription is canceled. - * If no value is passed in, all subscriptions to the specified event are canceled. + * @param { 'windowStageClose' } eventType The value is fixed at 'windowStageClose', indicating the window stage close event. + * @param { Callback } callback Callback function requires a boolean return value to determine whether to close the current main window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -11900,10 +10297,9 @@ declare namespace window { setCustomDensity(density: number): void; /** - * Allows the application to control the time when the launch page disappears. - * This API takes effect only for the application main window when enable.remove.starting.window under metadata in abilities in the module.json5 file is set to true. + * Remove the starting window, it must be used with configuration "enable.remove.starting.window". * - * @returns { Promise } - Promise that returns no value. + * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -11929,30 +10325,12 @@ declare namespace window { * @atomicservice * @since 14 */ - /** - * Enables the modal property of the main window. - * - * @param { boolean } isModal - Whether to enable the modal property of the main window. - * The value true means to enable the modal property, and false means the opposite. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300005 - This window stage is abnormal. - * @syscap SystemCapability.Window.SessionManager - * @StageModelOnly - * @atomicservice - * @since 20 - */ setWindowModal(isModal: boolean): Promise; /** - * Sets whether to enable the auto-save feature for the size of the main window. + * Set to automatically save the window rect. * - * @param { boolean } enabled - Whether to enable the auto-save feature for the main window's size. - * The value true means to enable the auto-save feature, and false means the opposite. + * @param { boolean } enabled - Enable the window rect auto-save if true, otherwise means the opposite. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. @@ -11981,7 +10359,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @stagemodelonly * @atomicservice - * @since 17 + * @since 18 */ setWindowRectAutoSave(enabled: boolean, isSaveBySpecifiedFlag: boolean): Promise; @@ -11997,22 +10375,10 @@ declare namespace window { * @atomicservice * @since 14 */ - /** - * Checks whether the auto-save feature is enabled for the main window's size. - * - * @returns { Promise } Promise used to return the result. The value true means that the auto-save feature is enabled, and false means the opposite. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.Window.SessionManager - * @StageModelOnly - * @atomicservice - * @since 20 - */ isWindowRectAutoSave(): Promise; /** - * Sets the supported window modes of the main window. + * Sets the supported window modes. * * @param { Array } supportedWindowModes - The supported modes of window. * @returns { Promise } Promise that returns no value. @@ -12027,40 +10393,6 @@ declare namespace window { * @since 15 */ setSupportedWindowModes(supportedWindowModes: Array): Promise; - - /** - * Sets the supported window modes of the main window. - * - * @param { Array } supportedWindowModes - The supported modes of window. - * @param { boolean } grayOutMaximizeButton - Whether to gray out the window maximize button. The value true means to gray out the button, and false means the opposite. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported. Function setSupportedWindowModes can not work correctly due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. 3. Incorrect parameter format. - * @syscap SystemCapability.Window.SessionManager - * @stagemodelonly - * @since 20 - */ - setSupportedWindowModes(supportedWindowModes: Array, grayOutMaximizeButton: boolean): Promise; - - /** - * Sets Image for recent. - * - * @param { number } imgResourceId - This value is resource ID for the recent image. - * @param { ImageFit } value - Sets the zoom type of an image. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300016 - Parameter error. Possible cause: 1. Invalid parameter range. 2. Invalid parameter length. 3. Incorrect parameter format. - * @syscap SystemCapability.Window.SessionManager - * @systemapi Hide this for inner system use. - * @stagemodelonly - * @since 19 - */ - setImageForRecent(imgResourceId: number, value: ImageFit): Promise; } /** @@ -12208,249 +10540,6 @@ declare namespace window { */ windowRect: Rect; } - - /** - * Enum for window mode - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - enum GlobalWindowMode { - /** - * Fullscreen - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - FULLSCREEN = 1, - - /** - * Split - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - SPLIT = 1 << 1, - - /** - * Float - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - FLOAT = 1 << 2, - - /** - * Picture in picture - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 20 - */ - PIP = 1 << 3 - } - - /** - * Rotation change type - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - enum RotationChangeType { - /** - * Rotation will begin - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - WINDOW_WILL_ROTATE = 0, - - /** - * Rotation end - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - WINDOW_DID_ROTATE = 1 - } - - /** - * Rect type - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - enum RectType { - /** - * Rect relative to screen - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - RELATIVE_TO_SCREEN = 0, - /** - * Rect relative to parent window - * - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - RELATIVE_TO_PARENT_WINDOW = 1 - } - - /** - * Screenshot event type - * - * @enum { number } - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - enum ScreenshotEventType { - /** - * System screenshot - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - SYSTEM_SCREENSHOT = 0, - /** - * System screenshot abort - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - SYSTEM_SCREENSHOT_ABORT = 1, - /** - * Scroll shot start - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - SCROLL_SHOT_START = 2, - /** - * Scroll shot end - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - SCROLL_SHOT_END = 3, - /** - * Scroll shot abort - * - * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 20 - */ - SCROLL_SHOT_ABORT = 4, - } - - /** - * Rotation change info - * - * @interface RotationChangeInfo - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - interface RotationChangeInfo { - /** - * Rotation change type - * - * @type { RotationChangeType } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - type: RotationChangeType; - /** - * window orientation - * - * @type { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - orientation: number; - /** - * Display id - * - * @type { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - displayId: number; - /** - * Display rect - * - * @type { Rect } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - displayRect: Rect; - } - - /** - * Rotation change result - * - * @interface RotationChangeResult - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - interface RotationChangeResult { - /** - * Rect type - * - * @type { RectType } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - rectType: RectType; - /** - * Window rect - * - * @type { Rect } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - windowRect: Rect; - } - - /** - * Rotation Change callback - * - * @typedef RotationChangeCallback - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - interface RotationChangeCallback { - /** - * Defines the rotation change callback - * - * @param { T } info - * @returns { U } result - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ - (info: T): U; - } } export default window; -- Gitee