From f7b45fa07ad723c17b6e5d60fa308e96a83c8a6f Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Tue, 9 Sep 2025 07:00:32 +0000 Subject: [PATCH 1/4] fix overload windowHighlightChange Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 123b7b22a4..954bad085f 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7673,7 +7673,7 @@ declare namespace window { * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'windowHighlightChange', callback: Callback): void; + onWindowHighlightChange(callback: Callback): void; /** * Unregister the callback of window highlight state change @@ -7691,7 +7691,7 @@ declare namespace window { * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'windowHighlightChange', callback?: Callback): void; + offWindowHighlightChange(callback?: Callback): void; /** * Bind dialog to the target window. -- Gitee From 15ebc896c945f2f50d9739d5fe54f087cae9aae4 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Thu, 11 Sep 2025 06:44:37 +0000 Subject: [PATCH 2/4] overloader focus 3stage Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 954bad085f..a5e47a4f76 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7670,8 +7670,24 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 dynamic + */ + on(type: 'windowHighlightChange', callback: Callback): void; + + /** + * Register the callback of window highlight state change + * + * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight state change event. + * @param { Callback } callback - Callback used to return the highlight status of the window. + * @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 20 static */ onWindowHighlightChange(callback: Callback): void; @@ -7688,8 +7704,24 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 dynamic + */ + off(type: 'windowHighlightChange', callback?: Callback): void; + + /** + * Unregister the callback of window highlight state change + * + * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight change event. + * @param { Callback } callback - Callback used to return the highlight status of the window. + * @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 20 static */ offWindowHighlightChange(callback?: Callback): void; -- Gitee From 8e0d7eabb5cf6b531ad7a090fd9469ab48122893 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Thu, 11 Sep 2025 11:18:21 +0000 Subject: [PATCH 3/4] del Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index a5e47a4f76..04c6c49a3c 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7677,7 +7677,6 @@ declare namespace window { /** * Register the callback of window highlight state change * - * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight state change event. * @param { Callback } callback - Callback used to return the highlight status of the window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -7711,7 +7710,6 @@ declare namespace window { /** * Unregister the callback of window highlight state change * - * @param { 'windowHighlightChange' } type - The value is fixed at 'windowHighlightChange', indicating the window highlight change event. * @param { Callback } callback - Callback used to return the highlight status of the window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; -- Gitee From 43bd463f655a2b0c460202e9d83ae4a491628264 Mon Sep 17 00:00:00 2001 From: chuanstudy Date: Thu, 11 Sep 2025 11:54:21 +0000 Subject: [PATCH 4/4] 20 to 22 Signed-off-by: chuanstudy --- api/@ohos.window.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 04c6c49a3c..969edefbaa 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7686,7 +7686,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 static + * @since 22 static */ onWindowHighlightChange(callback: Callback): void; @@ -7719,7 +7719,7 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 20 static + * @since 22 static */ offWindowHighlightChange(callback?: Callback): void; -- Gitee