未验证 提交 8c05a2d0 编写于 作者: O openharmony_ci 提交者: Gitee

!3706 翻译完成: 3633 window-master示例代码标记语言,接口链接Context修改:window需同步翻译

Merge pull request !3706 from wusongqing/TR3633
# Window
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
## Modules to Import
......@@ -15,10 +16,10 @@ Enumerates the window types.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Default Value | Description |
| ----------------- | ------------- | ---------------------- |
| TYPE_APP | 0 | Application subwindow. |
| TYPE_SYSTEM_ALERT | 1 | System alert window. |
| Name | Default Value| Description |
| ----------------- | ------ | ------------------ |
| TYPE_APP | 0 | Application subwindow. |
| TYPE_SYSTEM_ALERT | 1 | System alert window.|
## AvoidAreaType<sup>7+</sup><a name="avoidareatype"></a>
......@@ -26,10 +27,10 @@ Enumerates the types of the area where the window cannot be displayed.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Default Value | Description |
| ----------- | ------------- | --------------------------- |
| TYPE_SYSTEM | 0 | Default area of the system. |
| TYPE_CUTOUT | 1 | Notch. |
| Name | Default Value| Description |
| ----------- | ------ | ------------------ |
| TYPE_SYSTEM | 0 | Default area of the system.|
| TYPE_CUTOUT | 1 | Notch. |
## WindowMode<sup>7+</sup><a name="windowmode"></a>
......@@ -39,13 +40,13 @@ This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Default Value | Description |
| ---------- | ------------- | ------------------------------------------------------------ |
| UNDEFINED | 1 | The window mode is not defined by the application. |
| FULLSCREEN | 2 | The application is displayed in full screen. |
| PRIMARY | 3 | The application is displayed in the primary window in split-screen mode. |
| SECONDARY | 4 | The application is displayed in the secondary window in split-screen mode. |
| FLOATING | 5 | The application is displayed in a floating window. |
| Name | Default Value| Description |
| ---------- | ------ | ----------------------------- |
| UNDEFINED | 1 | The window mode is not defined by the application. |
| FULLSCREEN | 2 | The application is displayed in full screen. |
| PRIMARY | 3 | The application is displayed in the primary window in split-screen mode. |
| SECONDARY | 4 | The application is displayed in the secondary window in split-screen mode. |
| FLOATING | 5 | The application is displayed in a floating window.|
## SystemBarProperties<a name="systembarproperties"></a>
......@@ -53,14 +54,14 @@ Describes the properties of the status bar and navigation bar.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| -------------------------------------- | ------- | -------- | -------- | ------------------------------------------------------------ |
| statusBarColor | string | Yes | Yes | Background color of the status bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**. |
| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the status bar is highlighted. |
| statusBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the status bar. |
| navigationBarColor | string | Yes | Yes | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**. |
| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | No | Whether any icon on the navigation bar is highlighted. |
| navigationBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the navigation bar. |
| Name | Type| Readable| Writable| Description |
| -------------------------------------- | -------- | ---- | ---- | ------------------------------------------------------------ |
| statusBarColor | string | Yes | Yes | Background color of the status bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the status bar is highlighted. |
| statusBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the status bar. |
| navigationBarColor | string | Yes | Yes | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | No | Whether any icon on the navigation bar is highlighted. |
| navigationBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the navigation bar. |
## SystemBarRegionTint<sup>8+</sup><a name="systembartegiontint"></a>
......@@ -70,13 +71,13 @@ This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| --------------- | ------------------------- | -------- | -------- | ------------------------------------------------------------ |
| type | [WindowType](#windowtype) | Yes | Yes | Type of the system bar whose properties are changed. Only the navigation bar and status bar are supported. |
| isEnable | boolean | Yes | Yes | Whether the system bar is displayed. |
| region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. |
| backgroundColor | string | Yes | Yes | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**. |
| contentColor | string | Yes | Yes | Color of the text on the system bar. |
| Name | Type | Readable| Writable| Description |
| --------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
| type | [WindowType](#windowtype) | Yes | Yes | Type of the system bar whose properties are changed. Only the navigation bar and status bar are supported.|
| isEnable | boolean | Yes | Yes | Whether the system bar is displayed. |
| region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. |
| backgroundColor | string | Yes | Yes | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
| contentColor | string | Yes | Yes | Color of the text on the system bar. |
## SystemBarTintState<sup>8+</sup><a name="systembartintstate"></a>
......@@ -86,10 +87,10 @@ This is a system API and cannot be called by third-party applications.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| ---------- | -------------------------------------------------- | -------- | -------- | ----------------------------------- |
| displayId | number | Yes | No | ID of the current physical screen. |
| regionTint | Array<[SystemBarRegionTint](#systembartegiontint)> | Yes | Yes | All system bar information changed. |
| Name | Type | Readable| Writable| Description |
| ---------- | -------------------------------------------------- | ---- | ---- | -------------------------- |
| displayId | number | Yes | No | ID of the current physical screen. |
| regionTint | Array<[SystemBarRegionTint](#systembartegiontint)> | Yes | Yes | All system bar information changed.|
## Rect<sup>7+</sup><a name="rect"></a>
......@@ -97,12 +98,12 @@ Describes a rectangle.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| ------ | ------ | -------- | -------- | ------------------------------- |
| left | number | Yes | Yes | Left boundary of the rectangle. |
| top | number | Yes | Yes | Top boundary of the rectangle. |
| width | number | Yes | Yes | Width of the rectangle. |
| height | number | Yes | Yes | Height of the rectangle. |
| Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ------------------ |
| left | number | Yes | Yes | Left boundary of the rectangle.|
| top | number | Yes | Yes | Top boundary of the rectangle.|
| width | number | Yes | Yes | Width of the rectangle. |
| height | number | Yes | Yes | Height of the rectangle. |
## AvoidArea<sup>7+</sup><a name="avoidarea"></a>
......@@ -110,12 +111,12 @@ Describes the area where the window cannot be displayed.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| ---------- | ------------- | -------- | -------- | -------------------------------------- |
| leftRect | [Rect](#rect) | Yes | Yes | Rectangle on the left of the screen. |
| topRect | [Rect](#rect) | Yes | Yes | Rectangle at the top of the screen. |
| rightRect | [Rect](#rect) | Yes | Yes | Rectangle on the right of the screen. |
| bottomRect | [Rect](#rect) | Yes | Yes | Rectangle at the bottom of the screen. |
| Name | Type | Readable| Writable| Description |
| ---------- | ------------- | ---- | ---- | ------------------ |
| leftRect | [Rect](#rect) | Yes | Yes | Rectangle on the left of the screen.|
| topRect | [Rect](#rect) | Yes | Yes | Rectangle at the top of the screen.|
| rightRect | [Rect](#rect) | Yes | Yes | Rectangle on the right of the screen.|
| bottomRect | [Rect](#rect) | Yes | Yes | Rectangle at the bottom of the screen.|
## Size<sup>7+</sup><a name="size"></a>
......@@ -123,10 +124,10 @@ Describes the window size.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| ------ | ------ | -------- | -------- | -------------- |
| width | number | Yes | Yes | Window width. |
| height | number | Yes | Yes | Window height. |
| Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ---------- |
| width | number | Yes | Yes | Window width.|
| height | number | Yes | Yes | Window height.|
## WindowProperties<a name="windowproperties"></a>
......@@ -134,20 +135,20 @@ Describes the window properties.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable | Writable | Description |
| ------------------------------- | ------------------------- | -------- | -------- | ------------------------------------------------------------ |
| windowRect<sup>7+</sup> | [Rect](#rect) | Yes | Yes | Window size. |
| type<sup>7+</sup> | [WindowType](#windowtype) | Yes | Yes | Window type. |
| isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. |
| isLayoutFullScreen<sup>7+</sup> | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. |
| focusable<sup>7+</sup> | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. |
| touchable<sup>7+</sup> | boolean | Yes | No | Whether the window is touchable. The default value is **true**. |
| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| dimBehindValue<sup>7+</sup> | number | Yes | Yes | Dimness of the window that is not on top. The value ranges from 0 to 1. The value **1** indicates the maximum dimness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| isPrivacyMode<sup>7+</sup> | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| isRoundCorner<sup>7+</sup> | boolean | Yes | Yes | Whether the window has rounded corners.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| isTransparent<sup>7+</sup> | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR. |
| Name | Type | Readable| Writable| Description |
| ------------------------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
| windowRect<sup>7+</sup> | [Rect](#rect) | Yes | Yes | Window size. |
| type<sup>7+</sup> | [WindowType](#windowtype) | Yes | Yes | Window type. |
| isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. |
| isLayoutFullScreen<sup>7+</sup> | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. |
| focusable<sup>7+</sup> | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. |
| touchable<sup>7+</sup> | boolean | Yes | No | Whether the window is touchable. The default value is **true**. |
| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| dimBehindValue<sup>7+</sup> | number | Yes | Yes | Dimness of the window that is not on top. The value ranges from 0 to 1. The value **1** indicates the maximum dimness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| isPrivacyMode<sup>7+</sup> | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| isRoundCorner<sup>7+</sup> | boolean | Yes | Yes | Whether the window has rounded corners.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| isTransparent<sup>7+</sup> | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
## ColorSpace<sup>8+</sup><a name="colorspace"></a>
......@@ -155,10 +156,10 @@ Describes the color gamut mode.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Default Value | Description |
| ---------- | ------------- | ------------------------- |
| DEFAULT | 0 | Default color gamut mode. |
| WIDE_GAMUT | 1 | Wide color gamut mode. |
| Name | Default Value| Description |
| ---------- | ------ | -------------- |
| DEFAULT | 0 | Default color gamut mode.|
| WIDE_GAMUT | 1 | Wide color gamut mode. |
## window.create<sup>7+</sup>
......@@ -172,11 +173,11 @@ This API is discarded since API version 8. You are advised to use [window.create
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ---------------------------------------------- |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | -------------------------- |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.|
- Example
......@@ -205,16 +206,16 @@ This API is discarded since API version 8. You are advised to use [window.create
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------------------------- | --------- | ------------ |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ---------- |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type.|
- Return value
| Type | Description |
| -------------------------------- | --------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created. |
| Type | Description |
| -------------------------------- | ------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.|
- Example
......@@ -233,18 +234,20 @@ This API is discarded since API version 8. You are advised to use [window.create
create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback&lt;Window&gt;): void
Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md). This API uses an asynchronous callback to return the result.
Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses an asynchronous callback to return the result.
Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md), starting from API version 9. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ----------------------------------------------- | --------- | -------------------------------------------------- |
| ctx | [Context](js-apis-service-extension-context.md) | Yes | Current application context. |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the system window created. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window created. |
- Example
......@@ -265,23 +268,25 @@ Creates a system window when the context is [ServiceExtensionContext](js-apis-se
create(ctx: Context, id: string, type: WindowType): Promise&lt;Window&gt;
Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md). This API uses a promise to return the result.
Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses a promise to return the result.
Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md), starting from API version 9. This API uses a promise to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ----------------------------------------------- | --------- | ---------------------------- |
| ctx | [Context](js-apis-service-extension-context.md) | Yes | Current application context. |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
| Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. |
- Return value
| Type | Description |
| -------------------------------- | ------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the system window created. |
| Type | Description |
| -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the window created.|
- Example
......@@ -296,7 +301,7 @@ Creates a system window when the context is [ServiceExtensionContext](js-apis-se
});
```
## window.find<sup>7+</sup><a name="window-find"></a>
## window.find<sup>7+</sup>
find(id: string, callback: AsyncCallback&lt;Window&gt;): void
......@@ -306,10 +311,10 @@ Finds a window based on the ID. This API uses an asynchronous callback to return
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ----------------------------------------- |
| id | string | Yes | Window ID. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window found. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ---------------------------- |
| id | string | Yes | Window ID. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window found.|
- Example
......@@ -335,15 +340,15 @@ Finds a window based on the ID. This API uses a promise to return the result.
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------ | --------- | ----------- |
| id | string | Yes | Window ID. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------- |
| id | string | Yes | Window ID.|
- Return value
| Type | Description |
| -------------------------------- | ---------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the window found. |
| Type | Description |
| -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the window found.|
- Example
......@@ -358,7 +363,7 @@ Finds a window based on the ID. This API uses a promise to return the result.
});
```
## window.getTopWindow<a name="window-gettopwindow"></a>
## window.getTopWindow
getTopWindow(callback: AsyncCallback&lt;Window&gt;): void
......@@ -368,9 +373,9 @@ Obtains the top window of the current application. This API uses an asynchronous
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ------------------------------------------------ |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained.|
- Example
......@@ -396,9 +401,9 @@ Obtains the top window of the current application. This API uses a promise to re
- Return value
| Type | Description |
| -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained. |
| Type | Description |
| -------------------------------- | --------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.|
- Example
......@@ -423,10 +428,10 @@ Obtains the top window of the current application. This API uses an asynchronous
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.For the definition of **Context** of API version 8, see [Context](js-apis-Context.md). For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md). |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. |
- Example
......@@ -452,15 +457,15 @@ Obtains the top window of the current application. This API uses a promise to re
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------- | --------- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.For the definition of **Context** of API version 8, see [Context](js-apis-Context.md). For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md). |
| Name| Type | Mandatory| Description |
| ------ | ------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
- Return value
| Type | Description |
| -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained. |
| Type | Description |
| -------------------------------- | --------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.|
- Example
......@@ -479,7 +484,7 @@ Obtains the top window of the current application. This API uses a promise to re
on(type: 'systemBarTintChange', callback: Callback&lt;SystemBarTintState&gt;): void
Enables listening for the properties changes of the status bar and navigation bar.
Enables listening for properties changes of the status bar and navigation bar.
This is a system API and cannot be called by third-party applications.
......@@ -487,10 +492,10 @@ This is a system API and cannot be called by third-party applications.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar. |
| callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | Yes | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar.|
| callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | Yes | Callback used to return the information. |
- Example
......@@ -513,10 +518,10 @@ This is a system API and cannot be called by third-party applications.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar. |
| callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | No | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar.|
| callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | No | Callback used to return the information. |
- Example
......@@ -527,7 +532,7 @@ This is a system API and cannot be called by third-party applications.
## Window
In the following API examples, you must use [getTopWindow()](#window-gettopwindow), [create()](#windowcreate7), or [find()](#window-find) to obtain a **Window** instance and then call a method in this instance.
In the following API examples, you must use [getTopWindow()](#windowgettopwindow), [create()](#windowcreate7), or [find()](#windowfind7) to obtain a **Window** instance and then call a method in this instance.
### hide<sup>7+</sup>
......@@ -541,9 +546,9 @@ This is a system API and cannot be called by third-party applications.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | --------------------------------------------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
- Example
......@@ -569,9 +574,9 @@ This is a system API and cannot be called by third-party applications.
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -594,9 +599,9 @@ Shows this window. This API uses an asynchronous callback to return the result.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | --------------------------------------------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
- Example
......@@ -620,9 +625,9 @@ Shows this window. This API uses a promise to return the result.
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -645,9 +650,9 @@ Destroys this window. This API uses an asynchronous callback to return the resul
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | --------------------------------------------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
- Example
......@@ -671,9 +676,9 @@ Destroys this window. This API uses a promise to return the result.
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -696,11 +701,11 @@ Moves the position of this window. This API uses an asynchronous callback to ret
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right. |
| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | --------------------------------------- |
| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -725,16 +730,16 @@ Moves the position of this window. This API uses a promise to return the result.
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------ | --------- | ------------------------------------------------------------ |
| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right. |
| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | --------------------------------------- |
| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -757,11 +762,11 @@ Changes the size of this window. This API uses an asynchronous callback to retur
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | --------------------------------------------- |
| width | number | Yes | New width of the window. |
| height | number | Yes | New height of the window. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------------- |
| width | number | Yes | New width of the window.|
| height | number | Yes | New height of the window.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -785,16 +790,16 @@ Changes the size of this window. This API uses a promise to return the result.
- Parameters
| Name | Type | Mandatory | Description |
| ------ | ------ | --------- | ------------------------- |
| width | number | Yes | New width of the window. |
| height | number | Yes | New height of the window. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- |
| width | number | Yes | New width of the window.|
| height | number | Yes | New height of the window.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -819,10 +824,10 @@ This is a system API and cannot be called by third-party applications.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | --------------------------------------------- |
| type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- |
| type | [WindowType](#windowtype) | Yes | Window type.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
- Example
......@@ -849,15 +854,15 @@ This is a system API and cannot be called by third-party applications.
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------------------------- | --------- | ------------ |
| type | [WindowType](#windowtype) | Yes | Window type. |
| Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ---------- |
| type | [WindowType](#windowtype) | Yes | Window type.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -881,9 +886,9 @@ Obtains the properties of this window. This API uses an asynchronous callback to
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------------------------- | --------- | ---------------------------------------------- |
| callback | AsyncCallback&lt;[WindowProperties](#windowproperties)&gt; | Yes | Callback used to return the window properties. |
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------------------- | ---- | ------------------ |
| callback | AsyncCallback&lt;[WindowProperties](#windowproperties)&gt; | Yes | Callback used to return the window properties.|
- Example
......@@ -907,13 +912,13 @@ Obtains the properties of this window. This API uses a promise to return the res
- Return value
| Type | Description |
| ---------------------------------------------------- | --------------------------------------------- |
| Promise&lt;[WindowProperties](#windowproperties)&gt; | Promise used to return the window properties. |
| Type | Description |
| ---------------------------------------------------- | ------------------------------------- |
| Promise&lt;[WindowProperties](#windowproperties)&gt; | Promise used to return the window properties.|
- Example
```
```js
let promise = windowClass.getProperties();
promise.then((data)=> {
console.info('Succeeded in obtaining the window properties. Data: ' + JSON.stringify(data))
......@@ -932,10 +937,10 @@ Obtains the area where this window cannot be displayed, for example, the system
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------------- | --------- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch. |
| callback | AsyncCallback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the area. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
| callback | AsyncCallback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the area. |
- Example
......@@ -960,15 +965,15 @@ Obtains the area where this window cannot be displayed, for example, the system
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------------------------------- | --------- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch. |
| Name| Type | Mandatory| Description |
| ------ | ------------------------------- | ---- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
- Return value
| Type | Description |
| -------------------------------------- | -------------------------------- |
| Promise&lt;[AvoidArea](#avoidarea)&gt; | Promise used to return the area. |
| Type | Description |
| -------------------------------------- | --------------------------------------------- |
| Promise&lt;[AvoidArea](#avoidarea)&gt; | Promise used to return the area.|
- Example
......@@ -991,10 +996,10 @@ Sets whether to enable the full-screen mode for this window. This API uses an as
- Parameters
| Name | Type | Mandatory | Description |
| ------------ | ------------------------- | --------- | ------------------------------------------------------------ |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ------------ | ------------------------- | ---- | ---------------------------------------------- |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1019,15 +1024,15 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro
- Parameters
| Name | Type | Mandatory | Description |
| ------------ | ------- | --------- | ------------------------------------------------------------ |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. |
| Name | Type | Mandatory| Description |
| ------------ | ------- | ---- | ---------------------------------------------- |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1051,10 +1056,10 @@ Sets whether the window layout is in full-screen mode. This API uses an asynchro
- Parameters
| Name | Type | Mandatory | Description |
| ------------------ | ------------------------- | --------- | ------------------------------------------------------------ |
| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ------------------ | ------------------------- | ---- | ------------------------------------------------------------ |
| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1079,15 +1084,15 @@ Sets whether the window layout is in full-screen mode. This API uses a promise t
- Parameters
| Name | Type | Mandatory | Description |
| ------------------ | ------- | --------- | ------------------------------------------------------------ |
| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed. |
| Name | Type | Mandatory| Description |
| ------------------ | ------- | ---- | ------------------------------------------------------------ |
| isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1111,10 +1116,10 @@ Sets whether to display the status bar and navigation bar in this window. This A
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1139,15 +1144,15 @@ Sets whether to display the status bar and navigation bar in this window. This A
- Parameters
| Name | Type | Mandatory | Description |
| ----- | ----- | --------- | ------------------------------------------------------------ |
| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed. |
| Name| Type | Mandatory| Description |
| ------ | ----- | ---- | ------------------------------------------------------------ |
| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1171,10 +1176,10 @@ Sets the properties of the status bar and navigation bar in this window. This AP
- Parameters
| Name | Type | Mandatory | Description |
| ------------------- | ------------------------------------------- | --------- | ------------------------------------------------ |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------- | ---- | -------------------- |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1208,15 +1213,15 @@ Sets the properties of the status bar and navigation bar in this window. This AP
- Parameters
| Name | Type | Mandatory | Description |
| ------------------- | ------------------------------------------- | --------- | ------------------------------------------------ |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar. |
| Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------- | ---- | -------------------- |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1249,10 +1254,10 @@ Loads content to this window. This API uses an asynchronous callback to return t
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | ------------------------------------------------------- |
| path | string | Yes | Path of the page from which the content will be loaded. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1276,15 +1281,15 @@ Loads content to this window. This API uses a promise to return the result.
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------ | --------- | ------------------------------------------------------- |
| path | string | Yes | Path of the page from which the content will be loaded. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1307,9 +1312,9 @@ Checks whether this window is displayed. This API uses an asynchronous callback
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------------- | --------- | -------------------------------------------------------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the window is displayed. |
| Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the window is displayed.|
- Example
......@@ -1333,9 +1338,9 @@ Checks whether this window is displayed. This API uses a promise to return the r
- Return value
| Type | Description |
| ---------------------- | ------------------------------------------------------- |
| Promise&lt;boolean&gt; | Promise used to return whether the window is displayed. |
| Type | Description |
| ---------------------- | ----------------------------------------------------- |
| Promise&lt;boolean&gt; | Promise used to return whether the window is displayed.|
- Example
......@@ -1358,10 +1363,10 @@ Enables listening for window size changes.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ----------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowSizeChange**, which indicates listening for window size changes. |
| callback | Callback&lt;[Size](#size)&gt; | Yes | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ----------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowSizeChange**, which indicates listening for window size changes.|
| callback | Callback&lt;[Size](#size)&gt; | Yes | Callback used to return the information. |
- Example
......@@ -1382,10 +1387,10 @@ Disables listening for window size changes.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ----------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowSizeChange<sup>7+</sup>**, which indicates listening for window size changes. |
| callback | Callback&lt;[Size](#size)&gt; | No | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ----------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowSizeChange<sup>7+</sup>**, which indicates listening for window size changes.|
| callback | Callback&lt;[Size](#size)&gt; | No | Callback used to return the information. |
- Example
......@@ -1404,10 +1409,10 @@ Enables listening for changes to the area where the window cannot be displayed.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed. |
| callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed.|
| callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the information. |
- Example
......@@ -1428,10 +1433,10 @@ Disables listening for changes to the area where the window cannot be displayed.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed. |
| callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | No | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed.|
| callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | No | Callback used to return the information. |
- Example
......@@ -1452,10 +1457,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **keyboardHeightChange**, which indicates listening for keyboard height changes. |
| callback | Callback&lt;number&gt; | Yes | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **keyboardHeightChange**, which indicates listening for keyboard height changes.|
| callback | Callbacknumber&gt; | Yes | Callback used to return the information. |
- Example
......@@ -1478,10 +1483,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------- | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **keyboardHeightChange**, which indicates listening for keyboard height changes. |
| callback | Callback&lt;number&gt; | No | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **keyboardHeightChange**, which indicates listening for keyboard height changes.|
| callback | Callback&lt;number&gt; | No | Callback used to return the information. |
- Example
......@@ -1500,9 +1505,9 @@ Checks whether this window supports the wide color gamut mode. This API uses an
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------------- | --------- | ------------------------------------------------------------ |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the wide color gamut mode is supported. |
| Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the wide color gamut mode is supported.|
- Example
......@@ -1526,13 +1531,13 @@ Checks whether this window supports the wide color gamut mode. This API uses a p
- Return value
| Type | Description |
| Type | Description |
| ---------------------- | ------------------------------------------------------------ |
| Promise&lt;boolean&gt; | Promise used to return whether the wide color gamut mode is supported. |
| Promise&lt;boolean&gt; | Promise used to return whether the wide color gamut mode is supported.|
- Example
```js
```
let promise = windowClass.isSupportWideGamut();
promise.then((data)=> {
console.info('Succeeded in checking whether the window support WideGamut. Data: ' + JSON.stringify(data))
......@@ -1551,10 +1556,10 @@ Sets this window to the wide or default color gamut mode. This API uses an async
- Parameters
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | --------- | --------------------------------------------- |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------ |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1578,15 +1583,15 @@ Sets this window to the wide or default color gamut mode. This API uses a promis
- Parameters
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | --------- | ----------------- |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------ |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1609,9 +1614,9 @@ Obtains the color gamut mode of this window. This API uses an asynchronous callb
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------------- | --------- | ------------------------------------------------------ |
| callback | AsyncCallback&lt;[ColorSpace](#colorspace)&gt; | Yes | Callback used to return the color gamut mode obtained. |
| Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------- | ---- | -------------------------- |
| callback | AsyncCallback&lt;[ColorSpace](#colorspace)&gt; | Yes | Callback used to return the color gamut mode obtained.|
- Example
......@@ -1635,9 +1640,9 @@ Obtains the color gamut mode of this window. This API uses a promise to return t
- Return value
| Type | Description |
| ---------------------------------------- | ----------------------------------------------------- |
| Promise&lt;[ColorSpace](#colorspace)&gt; | Promise used to return the color gamut mode obtained. |
| Type | Description |
| ---------------------------------------- | ----------------------------------------- |
| Promise&lt;[ColorSpace](#colorspace)&gt; | Promise used to return the color gamut mode obtained.|
- Example
......@@ -1662,10 +1667,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1692,15 +1697,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ----- | ------ | --------- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1726,10 +1731,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | --------- | ------------------------------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1756,15 +1761,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ---------- | ------ | --------- | ------------------------------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest. |
| Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1790,10 +1795,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------------- | ------------------------- | --------- | ------------------------------------------------------------ |
| dimBehindValue | number | Yes | Dimness of the window to set. The value ranges from 0 to 1. The value **1** indicates the dimmest. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------------- | ------------------------- | ---- | -------------------------------------------------- |
| dimBehindValue | number | Yes | Dimness of the window to set. The value ranges from 0 to 1. The value **1** indicates the dimmest.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1819,15 +1824,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------------- | ------ | --------- | ------------------------------------------------------------ |
| dimBehindValue | number | Yes | Dimness of the window to set. The value ranges from 0 to 1. The value **1** indicates the dimmest. |
| Name | Type | Mandatory| Description |
| -------------- | ------ | ---- | -------------------------------------------------- |
| dimBehindValue | number | Yes | Dimness of the window to set. The value ranges from 0 to 1. The value **1** indicates the dimmest.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1852,10 +1857,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ----------- | ------------------------- | --------- | --------------------------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ----------- | ------------------------- | ---- | ---------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1882,15 +1887,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ----------- | ------- | --------- | ---------------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus. |
| Name | Type | Mandatory| Description |
| ----------- | ------- | ---- | ---------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1916,10 +1921,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------------- | ------------------------- | --------- | --------------------------------------------- |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------------- | ------------------------- | ---- | ------------------------ |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -1946,15 +1951,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| -------------- | ------- | --------- | ------------------------------------- |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. |
| Name | Type | Mandatory| Description |
| -------------- | ------- | ---- | ------------------------ |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -1980,10 +1985,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| --------- | ------------------------- | --------- | ------------------------------------------------------------ |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| --------- | ------------------------- | ---- | ---------------- |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -2009,15 +2014,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| --------- | ------- | --------- | ------------------------------------------------------------ |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite. |
| Name | Type | Mandatory| Description |
| --------- | ------- | ---- | ---------------- |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -2042,10 +2047,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ------------- | ------------------------- | --------- | --------------------------------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ------------- | ------------------------- | ---- | -------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -2073,15 +2078,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ------------- | ------- | --------- | -------------------------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. |
| Name | Type | Mandatory| Description |
| ------------- | ------- | ---- | -------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -2107,10 +2112,10 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ----------- | ------------------------- | --------- | --------------------------------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| ----------- | ------------------------- | ---- | -------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -2138,15 +2143,15 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
- Parameters
| Name | Type | Mandatory | Description |
| ----------- | ------- | --------- | -------------------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable. |
| Name | Type | Mandatory| Description |
| ----------- | ------- | ---- | -------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable.|
- Return value
| Type | Description |
| ------------------- | -------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result. |
| Type | Description |
| ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.|
- Example
......@@ -2166,12 +2171,12 @@ Describes the lifecycle of a window stage.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Default Value | Description |
| ---------- | ------------- | ---------------------------------------------- |
| FOREGROUND | 1 | The window stage is running in the foreground. |
| ACTIVE | 2 | The window stage gains focus. |
| INACTIVE | 3 | The window stage loses focus. |
| BACKGROUND | 4 | The window stage is running in the background. |
| Name | Default Value| Description |
| ---------- | ------ | -------- |
| FOREGROUND | 1 | The window stage is running in the foreground.|
| ACTIVE | 2 | The window stage gains focus.|
| INACTIVE | 3 | The window stage loses focus.|
| BACKGROUND | 4 | The window stage is running in the background.|
## WindowStage<sup>9+</sup>
......@@ -2187,9 +2192,9 @@ Obtains the main window of this window stage. This API uses a promise to return
- Return value
| Type | Description |
| -------------------------------- | --------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the main window. |
| Type | Description |
| -------------------------------- | ---------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the main window.|
- Example
......@@ -2219,9 +2224,9 @@ Obtains the main window of this window stage. This API uses an asynchronous call
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ---------------------------------------- |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the main window. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | --------------------------------------- |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the main window.|
- Example
......@@ -2252,15 +2257,15 @@ Creates a subwindow for this window stage. This API uses a promise to return the
- Parameters
| Name | Type | Mandatory | Description |
| ---- | ------ | --------- | ---------------------- |
| name | String | Yes | Name of the subwindow. |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------- |
| name | String | Yes | Name of the subwindow.|
- Return value
| Type | Description |
| -------------------------------- | --------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created. |
| Type | Description |
| -------------------------------- | ------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.|
- Example
......@@ -2290,10 +2295,10 @@ Creates a subwindow for this window stage. This API uses an asynchronous callbac
- Parameters
| Name | Type | Mandatory | Description |
| -------- | -------------------------------------- | --------- | ---------------------------------------------- |
| name | String | Yes | Name of the subwindow. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created. |
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------ |
| name | String | Yes | Name of the subwindow. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.|
- Example
......@@ -2325,9 +2330,9 @@ Obtains all the subwindows of this window stage. This API uses a promise to retu
- Return value
| Type | Description |
| --------------------------------------------- | ------------------------------------------ |
| Promise&lt;Array&lt;[Window](#window)&gt;&gt; | Promise used to return all the subwindows. |
| Type | Description |
| --------------------------------------------- | ------------------------------------------------------------ |
| Promise&lt;Array&lt;[Window](#window)&gt;&gt; | Promise used to return all the subwindows.|
- Example
......@@ -2357,9 +2362,9 @@ Obtains all the subwindows of this window stage. This API uses an asynchronous c
- Parameters
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------------- | --------- | ------------------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[Window](#window)&gt;&gt; | Yes | Callback used to return all the subwindows. |
| Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ------------------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[Window](#window)&gt;&gt; | Yes | Callback used to return all the subwindows.|
- Example
......@@ -2390,10 +2395,10 @@ Loads content to this window stage. This API uses an asynchronous callback to re
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------- | --------- | ------------------------------------------------------- |
| path | string | Yes | Path of the page from which the content will be loaded. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
- Example
......@@ -2422,10 +2427,10 @@ Enables listening for window stage lifecycle changes.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------------------------------------------ | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowStageEvent**, which indicates listening for window stage lifecycle changes. |
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | Yes | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowStageEvent**, which indicates listening for window stage lifecycle changes.|
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | Yes | Callback used to return the information. |
- Example
......@@ -2451,10 +2456,10 @@ Disables listening for window stage lifecycle changes.
- Parameters
| Name | Type | Mandatory | Description |
| -------- | ------------------------------------------------------------ | --------- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowStageEvent**, which indicates listening for window stage lifecycle changes. |
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | No | Callback used to return the information. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| type | string | Yes | Listening type.<br>Set it to **windowStageEvent**, which indicates listening for window stage lifecycle changes.|
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | No | Callback used to return the information. |
- Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册