diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 6dc429c950a5b0585cf8a3b7b7261cdb4a5f0115..8c0f2035cc099fcf45d27dbfd406e6c1b92f6bb0 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7664,7 +7664,23 @@ declare namespace window { * @since arkts {'1.1':'20', '1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'windowStatusChange', callback: Callback): void; + /** + * Register the callback of windowStatusChange + * + * @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 22 + * @arkts 1.1&1.2 + */ + onWindowStatusChange(callback: Callback): void; /** * Unregister the callback of windowStatusChange @@ -7703,7 +7719,22 @@ declare namespace window { * @since arkts {'1.1':'20', '1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'windowStatusChange', callback?: Callback): void; + /** + * Unregister the callback of windowStatusChange + * + * @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 22 + * @arkts 1.1&1.2 + */ + offWindowStatusChange(callback?: Callback): void; /** * Register the callback of windowStatusDidChange @@ -7715,7 +7746,17 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @since 20 */ - on(type: 'windowStatusDidChange', callback: Callback): void; + /** + * Register the callback of windowStatusDidChange + * + * @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 22 + */ + onWindowStatusDidChange(callback: Callback): void; /** * Unregister the callback of windowStatusDidChange @@ -7727,7 +7768,16 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @since 20 */ - off(type: 'windowStatusDidChange', callback?: Callback): void; + /** + * Unregister the callback of windowStatusDidChange + * + * @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 22 + */ + offWindowStatusDidChange(callback?: Callback): void; /** * Subscribes to the event indicating that the child window is closed. @@ -10556,12 +10606,15 @@ declare namespace window { /** * Register the callback of windowRectChange * - * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. + * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', + * indicating the window rect change event. * @param { Callback } callback - Callback used to return the RectChangeOptions. - * @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 } 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. * @syscap SystemCapability.Window.SessionManager @@ -10569,16 +10622,36 @@ declare namespace window { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'windowRectChange', callback: Callback): void; + /** + * Register the callback of windowRectChange + * + * @param { Callback } callback - Callback used to return the RectChangeOptions. + * @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. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 22 + * @arkts 1.1&1.2 + */ + onWindowRectChange(callback: Callback): void; /** * Unregister the callback of windowRectChange * - * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. + * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', + * indicating the window rect change event. * @param { Callback } callback - Callback used to return the RectChangeOptions. - * @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. + * @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. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager @@ -10586,7 +10659,23 @@ declare namespace window { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'windowRectChange', callback?: Callback): void; + /** + * Unregister the callback of windowRectChange + * + * @param { Callback } callback - Callback used to return the RectChangeOptions. + * @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. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 22 + * @arkts 1.1&1.2 + */ + offWindowRectChange(callback?: Callback): void; /** * Register the callback of rectChangeInGlobalDisplay @@ -10599,7 +10688,18 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @since 20 */ - on(type: 'rectChangeInGlobalDisplay', callback: Callback): void; + /** + * Register the callback of rectChangeInGlobalDisplay + * + * @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 + */ + onRectChangeInGlobalDisplay(callback: Callback): void; /** * Unregister the callback of rectChangeInGlobalDisplay @@ -10612,7 +10712,17 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @since 20 */ - off(type: 'rectChangeInGlobalDisplay', callback?: Callback): void; + /** + * Unregister the callback of rectChangeInGlobalDisplay + * + * @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 22 + */ + offRectChangeInGlobalDisplay(callback?: Callback): void; /** * Convert the window coordinates to the global coordinates.