diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69d0beedad1e139ad9a900b986a8cdb2fdcf76d0..a36427a131988e153c841b34a4f99e98f30f753b 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7672,10 +7672,23 @@ 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 +7703,24 @@ 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. *