> 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.
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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.|
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.
| 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<[Window](#window)>| 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
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.
| 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. |
| 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<[Window](#window)> | Yes | Callback used to return the top window obtained. |
| 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<[Window](#window)> | 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
| 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). |
| 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).|
| 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<[SystemBarTintState](#systembartintstate)> | Yes | Callback used to return the information. |
| 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<[SystemBarTintState](#systembartintstate)> | 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.
| 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<[SystemBarTintState](#systembartintstate)> | No | Callback used to return the information. |
| 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<[SystemBarTintState](#systembartintstate)> | 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.
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch. |
| callback | AsyncCallback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the area. |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
| callback | AsyncCallback<[AvoidArea](#avoidarea)> | 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
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch. |
| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
| 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<void> | Yes | Callback used to return the execution result. |
| 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<void> | 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
| 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. |
| 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.|
| 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<[AvoidArea](#avoidarea)> | Yes | Callback used to return the information. |
| 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<[AvoidArea](#avoidarea)> | 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.
| 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<[AvoidArea](#avoidarea)> | No | Callback used to return the information. |
| 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<[AvoidArea](#avoidarea)> | 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
| 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<void> | Yes | Callback used to return the execution result. |
| 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<void> | 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
| 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.|