From 1ff811bee81e7dd7a7e4ab4c11861bc140305019 Mon Sep 17 00:00:00 2001 From: yyuehao Date: Thu, 11 Sep 2025 06:41:06 +0000 Subject: [PATCH 1/7] update api/@ohos.window.d.ts. overload -rectChange Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 62 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69d0beedad..eb0878fb42 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -10430,10 +10430,27 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 dynamic - * @since 20 static */ 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 static + */ + onWindowRectChange(callback: Callback): void; + /** * Unregister the callback of windowRectChange * @@ -10447,10 +10464,26 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 dynamic - * @since 20 static */ 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 static + */ + offWindowRectChange(callback?: Callback): void; + /** * Register the callback of rectChangeInGlobalDisplay * @@ -10464,6 +10497,19 @@ declare namespace window { */ 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 22 static + */ + onRectChangeInGlobalDisplay(callback: Callback): void; + /** * Unregister the callback of rectChangeInGlobalDisplay * @@ -10477,6 +10523,18 @@ declare namespace window { */ 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 static + */ + offRectChangeInGlobalDisplay(callback?: Callback): void; + /** * Convert the window coordinates to the global coordinates. * -- Gitee From be09fff0b3f8648d1ba43521950c23e0a2f8ca79 Mon Sep 17 00:00:00 2001 From: yyuehao Date: Thu, 11 Sep 2025 06:47:08 +0000 Subject: [PATCH 2/7] update api/@ohos.window.d.ts. overload - statusChange Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 90 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index eb0878fb42..a54b777b2e 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6733,10 +6733,24 @@ declare namespace window { * @crossplatform * @atomicservice * @since 12 dynamic - * @since 20 static */ on(type: 'windowSizeChange', callback: Callback): void; + /** + * Register the callback of windowSizeChange + * + * @param { Callback } callback - Callback used to return the window size. + * @throws { BusinessError } 401 - Parameter error. Possible cause: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; + * 3. Parameter verification failed. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @crossplatform + * @atomicservice + * @since 22 static + */ + onWindowSizeChange(callback: Callback): void; + /** * Unregister the callback of windowSizeChange * @@ -6769,10 +6783,23 @@ declare namespace window { * @crossplatform * @atomicservice * @since 12 dynamic - * @since 20 static */ off(type: 'windowSizeChange', callback?: Callback): void; + /** + * Unregister the callback of windowSizeChange + * + * @param { Callback } callback - Callback used to return the window size. + * @throws { BusinessError } 401 - Parameter error. Possible cause: + * 1. Incorrect parameter types; + * 2. Parameter verification failed. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @crossplatform + * @atomicservice + * @since 22 static + */ + offWindowSizeChange(callback?: Callback): void; + /** * Register the callback of systemAvoidAreaChange * @@ -7505,10 +7532,27 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 20 dynamic&static + * @since 20 dynamic */ 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 static + */ + onWindowStatusChange(callback: Callback): void; + /** * Unregister the callback of windowStatusChange * @@ -7547,6 +7591,22 @@ declare namespace window { */ 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 static + */ + offWindowStatusChange(callback?: Callback): void; + /** * Register the callback of windowStatusDidChange * @@ -7559,6 +7619,18 @@ declare namespace window { */ 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 static + */ + onWindowStatusDidChange(callback: Callback): void; + /** * Unregister the callback of windowStatusDidChange * @@ -7571,6 +7643,18 @@ declare namespace window { */ 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 static + */ + offWindowStatusDidChange(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. -- Gitee From b1a5c1cf12ddafe7dafd8984001785f34c4034f4 Mon Sep 17 00:00:00 2001 From: yyuehao Date: Thu, 11 Sep 2025 13:03:12 +0000 Subject: [PATCH 3/7] update api/@ohos.window.d.ts. Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index a54b777b2e..3d32bf6fc4 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6740,10 +6740,6 @@ declare namespace window { * Register the callback of windowSizeChange * * @param { Callback } callback - Callback used to return the window size. - * @throws { BusinessError } 401 - Parameter error. Possible cause: - * 1. Mandatory parameters are left unspecified; - * 2. Incorrect parameter types; - * 3. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -6789,10 +6785,7 @@ declare namespace window { /** * Unregister the callback of windowSizeChange * - * @param { Callback } callback - Callback used to return the window size. - * @throws { BusinessError } 401 - Parameter error. Possible cause: - * 1. Incorrect parameter types; - * 2. Parameter verification failed. + * @param { Callback } [callback] - Callback used to return the window size. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -7540,10 +7533,6 @@ declare namespace window { * 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 @@ -7594,10 +7583,7 @@ declare namespace window { /** * 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. + * @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. * @syscap SystemCapability.Window.SessionManager @@ -10521,10 +10507,6 @@ declare namespace window { * 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. @@ -10554,10 +10536,7 @@ declare namespace window { /** * 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. + * @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. -- Gitee From f820edead8541a975db2e7d3cac5140760bba505 Mon Sep 17 00:00:00 2001 From: yyuehao Date: Thu, 11 Sep 2025 13:11:38 +0000 Subject: [PATCH 4/7] update api/@ohos.window.d.ts. Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 3d32bf6fc4..75a3940cfd 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6743,7 +6743,7 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since 22 static + * @since 20 static */ onWindowSizeChange(callback: Callback): void; @@ -6789,7 +6789,7 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since 22 static + * @since 20 static */ offWindowSizeChange(callback?: Callback): void; @@ -7538,7 +7538,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 22 static + * @since 20 static */ onWindowStatusChange(callback: Callback): void; @@ -7576,7 +7576,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 20 dynamic&static + * @since 20 dynamic */ off(type: 'windowStatusChange', callback?: Callback): void; @@ -7589,7 +7589,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 22 static + * @since 20 static */ offWindowStatusChange(callback?: Callback): void; @@ -10513,7 +10513,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 22 static + * @since 20 static */ onWindowRectChange(callback: Callback): void; @@ -10543,7 +10543,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 22 static + * @since 20 static */ offWindowRectChange(callback?: Callback): void; -- Gitee From 72d4ebadc9afb1888a86392532fa3cba935e0f5c Mon Sep 17 00:00:00 2001 From: yyuehao Date: Fri, 12 Sep 2025 01:43:40 +0000 Subject: [PATCH 5/7] =?UTF-8?q?update=20api/@ohos.window.d.ts.=20=E9=9D=99?= =?UTF-8?q?=E6=80=81=E5=8C=96=E6=94=B9=E9=80=A0=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 75a3940cfd..21c5c69cb5 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6743,7 +6743,7 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since 20 static + * @since 22 static */ onWindowSizeChange(callback: Callback): void; @@ -6789,7 +6789,7 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since 20 static + * @since 22 static */ offWindowSizeChange(callback?: Callback): void; @@ -7538,7 +7538,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 20 static + * @since 22 static */ onWindowStatusChange(callback: Callback): void; @@ -7589,7 +7589,7 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since 20 static + * @since 22 static */ offWindowStatusChange(callback?: Callback): void; @@ -10513,7 +10513,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 static + * @since 22 static */ onWindowRectChange(callback: Callback): void; @@ -10543,7 +10543,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 static + * @since 22 static */ offWindowRectChange(callback?: Callback): void; -- Gitee From d01d3e128db17caf2d113da6c9de699c67287a1f Mon Sep 17 00:00:00 2001 From: yyuehao Date: Fri, 12 Sep 2025 06:59:39 +0000 Subject: [PATCH 6/7] update api/@ohos.window.d.ts. Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 21c5c69cb5..1bd8778a6e 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6786,6 +6786,7 @@ declare namespace window { * Unregister the callback of windowSizeChange * * @param { Callback } [callback] - Callback used to return the window size. + * If not provided, all callbacks for the given event type will be removed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice @@ -7584,6 +7585,7 @@ declare namespace window { * Unregister the callback of windowStatusChange * * @param { Callback } [callback] - Callback used to return the window status. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 801 - Capability not supported. * Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Window.SessionManager @@ -7633,6 +7635,7 @@ declare namespace window { * Unregister the callback of windowStatusDidChange * * @param { Callback } [callback] - Callback used to return the window status. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 801 - Capability not supported. * Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -10537,6 +10540,7 @@ declare namespace window { * Unregister the callback of windowRectChange * * @param { Callback } [callback] - Callback used to return the RectChangeOptions. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 801 - Capability not supported. * Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. @@ -10590,6 +10594,7 @@ declare namespace window { * Unregister the callback of rectChangeInGlobalDisplay * * @param { Callback } [callback] - Callback used to return the RectChangeOptions. + * If not provided, all callbacks for the given event type will be removed. * @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. -- Gitee From 31ececb608b480bed4be0bc4a53559acd6b75025 Mon Sep 17 00:00:00 2001 From: yyuehao Date: Fri, 12 Sep 2025 08:04:18 +0000 Subject: [PATCH 7/7] update api/@ohos.window.d.ts. Signed-off-by: yyuehao --- api/@ohos.window.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 1bd8778a6e..76d6d981cb 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -6772,7 +6772,8 @@ declare namespace window { * Unregister the callback of windowSizeChange * * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. + * @param { Callback } [callback] - Callback used to return the window size. + * If not provided, all callbacks for the given event type will be removed. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core @@ -7570,7 +7571,8 @@ declare namespace window { * 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. + * @param { Callback } [callback] - Callback used to return the window status. + * If not provided, all callbacks for the given event type will be removed. * @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. @@ -7624,6 +7626,7 @@ declare namespace window { * * @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. + * If not provided, all callbacks for the given event type will be removed. * @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 @@ -10524,7 +10527,8 @@ declare namespace window { * Unregister the callback of windowRectChange * * @param { 'windowRectChange' } type - The value is fixed at 'windowRectChange', indicating the window rect change event. - * @param { Callback } callback - Callback used to return the RectChangeOptions. + * @param { Callback } [callback] - Callback used to return the RectChangeOptions. + * If not provided, all callbacks for the given event type will be removed. * @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. @@ -10582,6 +10586,7 @@ declare namespace window { * * @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. + * If not provided, all callbacks for the given event type will be removed. * @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. -- Gitee