From 411351e25c806d3f534dfc52689a931be1f7e173 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Fri, 12 Sep 2025 07:26:42 +0000 Subject: [PATCH 1/3] overload focus Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69d0beedad..0e86649523 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7672,10 +7672,22 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 15 dynamic - * @since 20 static */ on(type: 'windowHighlightChange', callback: Callback): void; + /** + * Register the callback of window highlight state change + * + * @param { Callback } callback - Callback used to return the highlight status of the 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 } 1300003 - This window manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 22 static + */ + onWindowHighlightChange(callback: Callback): void; + /** * Unregister the callback of window highlight state change * @@ -7690,10 +7702,23 @@ declare namespace window { * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 15 dynamic - * @since 20 static */ off(type: 'windowHighlightChange', callback?: Callback): void; - + + /** + * Unregister the callback of window highlight state change + * + * @param { Callback } [callback] - Callback used to return the highlight status of the window. + * 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. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 22 static + */ + offWindowHighlightChange(callback?: Callback): void; + /** * Bind dialog to the target window. * -- Gitee From 61e4457a4ce014559d07595e5f15c061bca83fe7 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Mon, 15 Sep 2025 01:20:08 +0000 Subject: [PATCH 2/3] 4 space Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 0e86649523..8eb58be827 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7709,7 +7709,7 @@ declare namespace window { * Unregister the callback of window highlight state change * * @param { Callback } [callback] - Callback used to return the highlight status of the window. - * if not provided, all callbacks for the given event type will be removed. + * 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 f887e61fc9e408adf4c30eb90241bc396d8cb975 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Mon, 15 Sep 2025 01:56:41 +0000 Subject: [PATCH 3/3] update space Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 8eb58be827..a36427a131 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7679,7 +7679,8 @@ declare namespace window { * Register the callback of window highlight state change * * @param { Callback } callback - Callback used to return the highlight status of the window. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @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 @@ -7710,7 +7711,8 @@ declare namespace window { * * @param { Callback } [callback] - Callback used to return the highlight status of the window. * 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 } 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 -- Gitee