diff --git a/api/@ohos.arkui.uiExtension.d.ts b/api/@ohos.arkui.uiExtension.d.ts index 8c983c715b0e8c8cc32f9c3f894a6c9077d16b32..812a9b93c7d767b1dacd4daad71e97f528438dd3 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -71,10 +71,19 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 dynamic - * @since 20 static */ on(type: 'avoidAreaChange', callback: Callback): void; + /** + * Subscribes to the event indicating changes to the area where the window cannot be displayed. + * + * @param { Callback } callback - Callback used to return the avoid area information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + onAvoidAreaChange(callback: Callback): void; + /** * Unsubscribes from the event indicating changes to the area where the window cannot be displayed. * @@ -88,14 +97,25 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 dynamic - * @since 20 static */ off(type: 'avoidAreaChange', callback?: Callback): void; + /** + * Unsubscribes from the event indicating changes to the area where the window cannot be displayed. + * + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + offAvoidAreaChange(callback?: Callback): void; + /** * Subscribes to the window size change event of the host application. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. + * @param { 'windowSizeChange' } type - Event type. + * The value is fixed at 'windowSizeChange', indicating the window size change event. * @param { Callback } callback - Callback used to return the window size. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -104,14 +124,24 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 dynamic - * @since 20 static */ on(type: 'windowSizeChange', callback: Callback): void; + /** + * Subscribes to the window size change event of the host application. + * + * @param { Callback } callback - Callback used to return the window size. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + onWindowSizeChange(callback: Callback): void; + /** * Unsubscribes from the window size change event of the host application. * - * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', indicating the window size change event. + * @param { 'windowSizeChange' } type - Event type. The value is fixed at 'windowSizeChange', + * indicating the window size change event. * @param { Callback } callback - Callback used to return the window size. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -120,12 +150,23 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 dynamic - * @since 20 static */ off(type: 'windowSizeChange', callback?: Callback): void; /** - * Subscribes to changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). This API can be used only on 2-in-1 devices. + * Unsubscribes from the window size change event of the host application. + * + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + offWindowSizeChange(callback?: Callback): void; + + /** + * Subscribes to changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). + * This API can be used only on 2-in-1 devices. * * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', * indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). @@ -135,13 +176,28 @@ declare namespace uiExtension { *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. - * @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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic */ on(type: 'rectChange', reasons: number, callback: Callback): void; + /** + * Subscribes to changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). + * This API can be used only on 2-in-1 devices. + * + * @param { int } reasons - The reasons of component rect change. + * @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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + onRectChange(reasons: int, callback: Callback): void; + /** * Unsubscribes from changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). * This API can be used only on 2-in-1 devices. @@ -153,13 +209,28 @@ declare namespace uiExtension { *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. - * @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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic */ off(type: 'rectChange', callback?: Callback): void; + /** + * Unsubscribes from changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). + * This API can be used only on 2-in-1 devices. + * + * @param { Callback } [callback] - Unregister the callback function. + * 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.ArkUI.ArkUI.Full + * @atomicservice + * @since 22 static + */ + offRectChange(callback?: Callback): void; + /** * Sets whether to hide insecure windows. * When called by modal UIExtension and shouldHide == false, the "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS" permission is required. @@ -224,7 +295,8 @@ declare namespace uiExtension { * Sets the events that the component (EmbeddedComponent or UIExtensionComponent) will occupy, * preventing the host from responding to these events within the component's area. * - * @param { EventFlag } eventFlags - Type of events to occupy. For details about the available values, see {@link uiExtension.EventFlag }. + * @param { EventFlag } eventFlags - Type of events to occupy. + * For details about the available values, see {@link uiExtension.EventFlag }. * @returns { Promise } - The promise returned by the function * @throws { BusinessError } 401 - Parameter error. Possible cause: *
1. Mandatory parameters are left unspecified. @@ -235,8 +307,9 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ - occupyEvents(eventFlags: number): Promise; + occupyEvents(eventFlags: int): Promise; /** * The properties of the UIExtension window @@ -245,6 +318,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ properties: WindowProxyProperties; } @@ -256,6 +330,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ enum EventFlag { /** @@ -264,6 +339,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_NONE = 0x00000000, /** @@ -272,6 +348,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_PAN_GESTURE_LEFT = 0x00000001, /** @@ -280,6 +357,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_PAN_GESTURE_RIGHT = 0x00000002, /** @@ -288,6 +366,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_PAN_GESTURE_UP = 0x00000004, /** @@ -296,6 +375,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_PAN_GESTURE_DOWN = 0x00000008, /** @@ -304,6 +384,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_CLICK = 0x00000100, /** @@ -312,6 +393,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 dynamic + * @since 20 static */ EVENT_LONG_PRESS = 0x00000200, } @@ -379,6 +461,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ enum RectChangeReason { /** @@ -387,6 +470,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ HOST_WINDOW_RECT_CHANGE = 0x0001, } @@ -398,6 +482,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ interface RectChangeOptions { /** @@ -407,6 +492,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ rect: window.Rect, @@ -417,6 +503,7 @@ declare namespace uiExtension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 dynamic + * @since 20 static */ reason: RectChangeReason } diff --git a/api/@ohos.uiExtensionHost.d.ts b/api/@ohos.uiExtensionHost.d.ts index f03e2c8a03c6e1d3890ade349ab33e4814c8b6b2..14c3244cd2ec400939abb4ff1996148dd7041478 100644 --- a/api/@ohos.uiExtensionHost.d.ts +++ b/api/@ohos.uiExtensionHost.d.ts @@ -28,6 +28,7 @@ import window from './@ohos.window'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 11 dynamic + * @since 20 static */ declare namespace uiExtensionHost { /** @@ -37,6 +38,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 11 dynamic + * @since 20 static */ interface UIExtensionHostWindowProxy { /** @@ -48,14 +50,17 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 11 dynamic + * @since 20 static */ getWindowAvoidArea(type: window.AvoidAreaType): window.AvoidArea; /** * Register the callback of avoidAreaChange * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area. + * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', + * indicating the event of changes to the avoid area. + * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback + * - Callback used to return the area. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -66,11 +71,24 @@ declare namespace uiExtensionHost { */ on(type: 'avoidAreaChange', callback: Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }>): void; + /** + * Register the callback of avoidAreaChange + * + * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback + * - Callback used to return the area. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 22 static + */ + onAvoidAreaChange(callback: Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }>): void; + /** * Unregister the callback of avoidAreaChange * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback - Callback used to return the area. + * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', + * indicating the event of changes to the avoid area. + * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } callback + * - Callback used to return the area. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. @@ -81,10 +99,22 @@ declare namespace uiExtensionHost { */ off(type: 'avoidAreaChange', callback?: Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }>): void; + /** + * Unregister the callback of avoidAreaChange + * + * @param { Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }> } [callback] + * - Unregister the callback function. If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 22 static + */ + offAvoidAreaChange(callback?: Callback<{ type: window.AvoidAreaType, area: window.AvoidArea }>): void; + /** * Register the callback of windowSizeChange * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. + * @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. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -96,10 +126,21 @@ declare namespace uiExtensionHost { */ on(type: 'windowSizeChange', callback: Callback): void; + /** + * Register the callback of windowSizeChange + * + * @param { Callback } callback - Callback used to return the window size. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 22 static + */ + onWindowSizeChange(callback: Callback): void; + /** * Unregister the callback of windowSizeChange * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. + * @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. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -111,6 +152,17 @@ declare namespace uiExtensionHost { */ off(type: 'windowSizeChange', callback?: Callback): void; + /** + * Unregister the callback of windowSizeChange + * + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 22 static + */ + offWindowSizeChange(callback?: Callback): void; + /** * The properties of the UIExtension window * @@ -118,6 +170,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 11 dynamic + * @since 20 static */ properties: UIExtensionHostWindowProxyProperties; @@ -153,6 +206,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 dynamic + * @since 20 static */ hideNonSecureWindows(shouldHide: boolean): Promise; @@ -172,6 +226,7 @@ declare namespace uiExtensionHost { * @systemapi * @StageModelOnly * @since 12 dynamic + * @since 20 static */ createSubWindowWithOptions(name: string, subWindowOptions: window.SubWindowOptions): Promise; @@ -186,6 +241,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 dynamic + * @since 20 static */ setWaterMarkFlag(enable: boolean): Promise; @@ -206,6 +262,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 13 dynamic + * @since 20 static */ hidePrivacyContentForHost(shouldHide: boolean): Promise; } @@ -226,6 +283,7 @@ declare namespace uiExtensionHost { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 11 dynamic + * @since 20 static */ uiExtensionHostWindowProxyRect: window.Rect; } diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 69d0beedad1e139ad9a900b986a8cdb2fdcf76d0..e06315e197ef8a6ca6c91d2bfaafa478ccfc0c58 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -7058,7 +7058,8 @@ declare namespace window { /** * Subscribes to the touch event outside this window. * - * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. + * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', + * indicating the click event outside this window. * @param { Callback } callback - Callback used to return the click event outside this window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -7066,24 +7067,44 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 11 dynamic - * @since 20 static */ on(type: 'touchOutside', callback: Callback): void; + /** + * Subscribes to the touch event outside this window. + * + * @param { Callback } callback - Callback used to return the click event outside this window. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since 22 static + */ + onTouchOutside(callback: Callback): void; + /** * Unsubscribes from the touch event outside this window. * - * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', indicating the click event outside this window. + * @param { 'touchOutside' } type - The value is fixed at 'touchOutside', + * indicating the click event outside this window. * @param { Callback } callback - Callback used to return the click event outside this window. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 11 dynamic - * @since 20 static */ off(type: 'touchOutside', callback?: Callback): void; + /** + * Unsubscribes from the touch event outside this window. + * + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since 22 static + */ + offTouchOutside(callback?: Callback): void; + /** * Window displayId change callback on. * @@ -7252,42 +7273,80 @@ declare namespace window { /** * Subscribes to non-interaction events in a window within the specified period. - * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events. + * Interaction events include physical keyboard input events and screen touch/click events, + * but not soft keyboard input events. * - * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. - * @param { long } timeout - The timeout(in seconds) of no interaction detection. + * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', + * indicating the window has no interaction for a long time. + * @param { number } timeout - The timeout(in seconds) of no interaction detection. * @param { Callback } callback - Callback used to notify the window has no interaction for a long time. * @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 } 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 12 dynamic - * @since 20 static */ - on(type: 'noInteractionDetected', timeout: long, callback: Callback): void; + on(type: 'noInteractionDetected', timeout: number, callback: Callback): void; + + /** + * Subscribes to non-interaction events in a window within the specified period. + * Interaction events include physical keyboard input events and screen touch/click events, + * but not soft keyboard input events. + * + * @param { long } timeout - The timeout(in seconds) of no interaction detection. + * @param { Callback } callback - Callback used to notify the window has no interaction for a long time. + * @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 + */ + onNoInteractionDetected(timeout: long, callback: Callback): void; /** * Unsubscribes from non-interaction events in a window within the specified period. - * Interaction events include physical keyboard input events and screen touch/click events, but not soft keyboard input events. + * Interaction events include physical keyboard input events and screen touch/click events, + * but not soft keyboard input events. * - * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', indicating the window has no interaction for a long time. + * @param { 'noInteractionDetected' } type - The value is fixed at 'noInteractionDetected', + * indicating the window has no interaction for a long time. * @param { Callback } callback - Callback used to notify the window has no interaction for a long time. * @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 } 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 12 dynamic - * @since 20 static */ off(type: 'noInteractionDetected', callback?: Callback): void; + /** + * Unsubscribes from non-interaction events in a window within the specified period. + * Interaction events include physical keyboard input events and screen touch/click events, + * but not soft keyboard input events. + * + * @param { Callback } [callback] - Unregister the callback function. + * 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 + */ + offNoInteractionDetected(callback?: Callback): void; + /** * Register the callback of screenshot, only the focused window called back * @@ -7374,20 +7433,34 @@ declare namespace window { * @since 10 */ /** - * Subscribes to click or touch events in a window covered by a modal window. This API takes effect only when it is called by a modal window. + * Subscribes to click or touch events in a window covered by a modal window. + * This API takes effect only when it is called by a modal window. * - * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', indicating the click event of the target window in the modal window mode. - * @param { Callback } callback - Callback invoked when the click event occurs in the target window of the modal window mode. + * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', + * indicating the click event of the target window in the modal window mode. + * @param { Callback } callback + * - Callback invoked when the click event occurs in the target window of the modal window mode. * @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 * @atomicservice * @since 12 dynamic - * @since 20 static */ on(type: 'dialogTargetTouch', callback: Callback): void; + /** + * Subscribes to click or touch events in a window covered by a modal window. + * This API takes effect only when it is called by a modal window. + * + * @param { Callback } callback + * - Callback invoked when the click event occurs in the target window of the modal window mode. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since 22 static + */ + onDialogTargetTouch(callback: Callback): void; + /** * Unregister the callback of dialogTargetTouch * @@ -7403,17 +7476,28 @@ declare namespace window { * Unsubscribes from the touch event of the target window in the modal window mode. * * @param { 'dialogTargetTouch' } type - The value is fixed at 'dialogTargetTouch', - * indicating the click event of the target window in the modal window mode. - * @param { Callback } callback - Callback invoked when the click event occurs in the target window of the modal window mode. + * indicating the click event of the target window in the modal window mode. + * @param { Callback } callback + * - Callback invoked when the click event occurs in the target window of the modal window mode. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Incorrect parameter types; * 2. Parameter verification failed. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 12 dynamic - * @since 20 static */ off(type: 'dialogTargetTouch', callback?: Callback): void; + /** + * Unsubscribes from the touch event of the target window in the modal window mode. + * + * @param { Callback } [callback] - Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since 22 static + */ + offDialogTargetTouch(callback?: Callback): void; + /** * Register the callback of windowEvent * @@ -10583,9 +10667,12 @@ declare namespace window { /** * UIExtension in window secure limit change callback on. * - * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. - * @param { Callback } callback Callback used to return the result whether the APP has uiextension secure limit. - * @throws { BusinessError } 801 - Capability not supported.Function on('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities. + * @param { 'uiExtensionSecureLimitChange' } eventType + * The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. + * @param { Callback } callback + * Callback used to return the result whether the APP has uiextension secure limit. + * @throws { BusinessError } 801 - Capability not supported. + * Function on('uiExtensionSecureLimitChange') can not work correctly 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 @@ -10594,12 +10681,30 @@ declare namespace window { */ on(eventType: 'uiExtensionSecureLimitChange', callback: Callback): void; + /** + * UIExtension in window secure limit change callback on. + * + * @param { Callback } callback + * Callback used to return the result whether the APP has uiextension secure limit. + * @throws { BusinessError } 801 - Capability not supported. + * Function on('uiExtensionSecureLimitChange') can not work correctly 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 + */ + onUiExtensionSecureLimitChange(callback: Callback): void; + /** * UIExtension in window secure limit change callback off. * - * @param { 'uiExtensionSecureLimitChange' } eventType The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. - * @param { Callback } callback Callback used to return the result whether the APP has uiextension secure limit. - * @throws { BusinessError } 801 - Capability not supported.Function off('uiExtensionSecureLimitChange') can not work correctly due to limited device capabilities. + * @param { 'uiExtensionSecureLimitChange' } eventType + * The value is fixed at 'uiExtensionSecureLimitChange', indicating the UIExtension secure limit change. + * @param { Callback } callback + * Callback used to return the result whether the APP has uiextension secure limit. + * @throws { BusinessError } 801 - Capability not supported. + * Function off('uiExtensionSecureLimitChange') can not work correctly 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 @@ -10607,6 +10712,21 @@ declare namespace window { * @since 20 dynamic */ off(eventType: 'uiExtensionSecureLimitChange', callback?: Callback): void; + + /** + * UIExtension in window secure limit change callback off. + * + * @param { Callback } [callback] Unregister the callback function. + * If not provided, all callbacks for the given event type will be removed. + * @throws { BusinessError } 801 - Capability not supported. + * Function off('uiExtensionSecureLimitChange') can not work correctly 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 + */ + offUiExtensionSecureLimitChange(callback?: Callback): void; /** @@ -12277,6 +12397,7 @@ declare namespace window { * @systemapi Hide this for inner system use. * @stagemodelonly * @since 14 dynamic + * @since 20 static */ windowAttribute: ExtensionWindowAttribute; @@ -12288,6 +12409,7 @@ declare namespace window { * @systemapi Hide this for inner system use. * @stagemodelonly * @since 14 dynamic + * @since 20 static */ windowRect: Rect; @@ -12299,6 +12421,7 @@ declare namespace window { * @systemapi Hide this for inner system use. * @stagemodelonly * @since 14 dynamic + * @since 20 static */ subWindowOptions?: SubWindowOptions; @@ -12310,6 +12433,7 @@ declare namespace window { * @systemapi Hide this for inner system use. * @stagemodelonly * @since 14 dynamic + * @since 20 static */ systemWindowOptions?: SystemWindowOptions; }