| windowType | [WindowType](#windowtype7) | Yes| Type of the window. |
| windowType | [WindowType](#windowtype7) | Yes| Type of the window. |
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | No| Current application context. If this parameter is not set, no context is used.<br>You do not need to set this parameter to create a subwindow in the FA model or a system window in the stage model.|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | No| Current application context. If this parameter is not set, no context is used.<br>You do not need to set this parameter to create a subwindow in the FA model or a system window in the stage model.|
| displayId | number | No| ID of the current physical screen. If this parameter is not set, the default value **-1** is used.|
| displayId | number | No| ID of the current physical screen. If this parameter is not set, the default value **-1** is used.|
| parentId | number | No| ID of the parent window. If this parameter is not set, the default value **-1** is used. |
| parentId | number | No| ID of the parent window. If this parameter is not set, the default value **-1** is used. |
...
@@ -66,7 +66,7 @@ Enumerates the types of the area where the window cannot be displayed.
...
@@ -66,7 +66,7 @@ Enumerates the types of the area where the window cannot be displayed.
| TYPE_SYSTEM | 0 | Default area of the system. Generally, the status bar, navigation bar, and Dock bar are included. The default area may vary according to the device in use.|
| TYPE_SYSTEM | 0 | Default area of the system. Generally, the status bar and navigation bar are included. The default area may vary according to the device in use.|
| statusBarColor | string | No | Background color of the status bar. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. The default value is **#0x66000000**. |
| statusBarColor | string | No | Background color of the status bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. The default value is **#0x66000000**.|
| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Whether any icon on the status bar is highlighted. The value **true** means that the icon is highlighted, and **false** means the opposite. The default value is **false**.|
| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Whether any icon on the status bar is highlighted. The value **true** means that the icon is highlighted, and **false** means the opposite. The default value is **false**.|
| statusBarContentColor<sup>8+</sup> | string | No | Color of the text on the status bar. After this property is set, the setting of **isStatusBarLightIcon** is invalid. The default value is **0xE5FFFFFF**.|
| statusBarContentColor<sup>8+</sup> | string | No | Color of the text on the status bar. After this property is set, the setting of **isStatusBarLightIcon** is invalid. The default value is **0xE5FFFFFF**.|
| navigationBarColor | string | No | Background color of the navigation bar. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. The default value is **#0x66000000**. |
| navigationBarColor | string | No | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. The default value is **#0x66000000**.|
| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | Whether any icon on the navigation bar is highlighted. The value **true** means that the icon is highlighted, and **false** means the opposite. The default value is **false**.|
| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | Whether any icon on the navigation bar is highlighted. The value **true** means that the icon is highlighted, and **false** means the opposite. The default value is **false**.|
| navigationBarContentColor<sup>8+</sup> | string | No | Color of the text on the navigation bar. After this property is set, the setting of **isNavigationBarLightIcon** is invalid. The default value is **0xE5FFFFFF**.|
| navigationBarContentColor<sup>8+</sup> | string | No | Color of the text on the navigation bar. After this property is set, the setting of **isNavigationBarLightIcon** is invalid. The default value is **0xE5FFFFFF**.|
...
@@ -164,7 +164,7 @@ Describes the callback for a single system bar.
...
@@ -164,7 +164,7 @@ Describes the callback for a single system bar.
| type | [WindowType](#windowtype7) | Yes | No | Type of the system bar whose properties are changed. Only the status bar and navigation bar are supported.|
| type | [WindowType](#windowtype7) | Yes | No | Type of the system bar whose properties are changed. Only the status bar and navigation bar are supported.|
| isEnable | boolean | Yes | No | Whether the system bar is displayed. The value **true** means that the system bar is displayed, and **false** means the opposite.|
| isEnable | boolean | Yes | No | Whether the system bar is displayed. The value **true** means that the system bar is displayed, and **false** means the opposite.|
| region | [Rect](#rect7) | Yes | No | Current position and size of the system bar. |
| region | [Rect](#rect7) | Yes | No | Current position and size of the system bar. |
| backgroundColor | string | Yes | No | Background color of the system bar. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
| backgroundColor | string | Yes | No | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
| contentColor | string | Yes | No | Color of the text on the system bar. |
| contentColor | string | Yes | No | Color of the text on the system bar. |
## SystemBarTintState<sup>8+</sup>
## SystemBarTintState<sup>8+</sup>
...
@@ -2346,7 +2346,7 @@ Loads content from a page associated with a local storage to this window. This A
...
@@ -2346,7 +2346,7 @@ Loads content from a page associated with a local storage to this window. This A
| path | string | Yes | Path of the page from which the content will be loaded. |
| path | string | Yes | Path of the page from which the content will be loaded. |
| storage | [LocalStorage](../../quick-start/arkts-state-mgmt-application-level.md#localstorage) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Error codes**
**Error codes**
...
@@ -2392,7 +2392,7 @@ Loads content from a page associated with a local storage to this window. This A
...
@@ -2392,7 +2392,7 @@ Loads content from a page associated with a local storage to this window. This A
| path | string | Yes | Path of the page from which the content will be loaded. |
| path | string | Yes | Path of the page from which the content will be loaded. |
| storage | [LocalStorage](../../quick-start/arkts-state-mgmt-application-level.md#localstorage) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
**Return value**
**Return value**
...
@@ -3064,7 +3064,7 @@ Sets the background color for this window. In the stage model, this API must be
...
@@ -3064,7 +3064,7 @@ Sets the background color for this window. In the stage model, this API must be
| color | string | Yes| Background color to set. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
| color | string | Yes| Background color to set. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
**Error codes**
**Error codes**
...
@@ -3685,15 +3685,15 @@ Captures this window. This API uses an asynchronous callback to return the resul
...
@@ -3685,15 +3685,15 @@ Captures this window. This API uses an asynchronous callback to return the resul
| Promise<[image.PixelMap](js-apis-image.md#pixelmap7)> | Promise used to return the window screenshot.|
| Promise<[image.PixelMap](js-apis-image.md#pixelmap7)> | Promise used to return the window screenshot.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
...
@@ -3748,7 +3748,7 @@ promise.then((pixelMap)=> {
...
@@ -3748,7 +3748,7 @@ promise.then((pixelMap)=> {
opacity(opacity: number): void
opacity(opacity: number): void
Sets the opacity for this window.
Sets the opacity for this window. This API can be used only when you [customize an animation to be played during the display or hiding of a system window](../../windowmanager/system-window-stage.md#customizing-an-animation-to-be-played-during-the-display-or-hiding-of-a-system-window).
**System API**: This is a system API.
**System API**: This is a system API.
...
@@ -3756,18 +3756,18 @@ Sets the opacity for this window.
...
@@ -3756,18 +3756,18 @@ Sets the opacity for this window.
| opacity | number | Yes | Opacity to set. The value ranges from 0.0 to 1.0. |
| opacity | number | Yes | Opacity to set. The value ranges from 0.0 to 1.0. The value **0.0** means completely transparent, and **1.0** means completely opaque.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300004 | Unauthorized operation. |
| 1300004 | Unauthorized operation. |
**Example**
**Example**
...
@@ -3783,7 +3783,7 @@ try {
...
@@ -3783,7 +3783,7 @@ try {
scale(scaleOptions: ScaleOptions): void
scale(scaleOptions: ScaleOptions): void
Sets the scale parameters for this window.
Sets the scale parameters for this window. This API can be used only when you [customize an animation to be played during the display or hiding of a system window](../../windowmanager/system-window-stage.md#customizing-an-animation-to-be-played-during-the-display-or-hiding-of-a-system-window).
**System API**: This is a system API.
**System API**: This is a system API.
...
@@ -3791,18 +3791,18 @@ Sets the scale parameters for this window.
...
@@ -3791,18 +3791,18 @@ Sets the scale parameters for this window.
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300004 | Unauthorized operation. |
| 1300004 | Unauthorized operation. |
**Example**
**Example**
...
@@ -3824,7 +3824,7 @@ try {
...
@@ -3824,7 +3824,7 @@ try {
rotate(rotateOptions: RotateOptions): void
rotate(rotateOptions: RotateOptions): void
Sets the rotation parameters for this window.
Sets the rotation parameters for this window. This API can be used only when you [customize an animation to be played during the display or hiding of a system window](../../windowmanager/system-window-stage.md#customizing-an-animation-to-be-played-during-the-display-or-hiding-of-a-system-window).
**System API**: This is a system API.
**System API**: This is a system API.
...
@@ -3832,18 +3832,18 @@ Sets the rotation parameters for this window.
...
@@ -3832,18 +3832,18 @@ Sets the rotation parameters for this window.
Sets the translation parameters for this window. This API can be used only when you [customize an animation to be played during the display or hiding of a system window](../../windowmanager/system-window-stage.md#customizing-an-animation-to-be-played-during-the-display-or-hiding-of-a-system-window).
**System API**: This is a system API.
**System API**: This is a system API.
...
@@ -3874,18 +3874,18 @@ Sets the translation parameters for this window.
...
@@ -3874,18 +3874,18 @@ Sets the translation parameters for this window.
| radius | number | Yes | Radius of the blur. The value is greater than or equal to 0. The value **0** means that the blur is disabled for the window. |
| radius | number | Yes | Radius of the blur. The value is greater than or equal to 0. The value **0** means that the blur is disabled for the window.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300004 | Unauthorized operation. |
| 1300004 | Unauthorized operation. |
**Example**
**Example**
...
@@ -4011,18 +4011,18 @@ Blurs the background of this window.
...
@@ -4011,18 +4011,18 @@ Blurs the background of this window.
| radius | number | Yes | Radius of the blur. The value is greater than or equal to 0. The value **0** means that the blur is disabled for the background of the window. |
| radius | number | Yes | Radius of the blur. The value is greater than or equal to 0. The value **0** means that the blur is disabled for the background of the window.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300004 | Unauthorized operation. |
| 1300004 | Unauthorized operation. |
**Example**
**Example**
...
@@ -4046,18 +4046,18 @@ Sets the blur style for the background of this window.
...
@@ -4046,18 +4046,18 @@ Sets the blur style for the background of this window.
| radius | number | Yes | Radius of the shadow. The value is greater than or equal to 0. The value **0** means that the shadow is disabled for the window borders. |
| radius | number | Yes | Radius of the shadow. The value is greater than or equal to 0. The value **0** means that the shadow is disabled for the window borders.|
| color | string | No | Color of the shadow. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
| color | string | No | Color of the shadow. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
| offsetX | number | No | Offset of the shadow along the x-axis, in pixels. |
| offsetX | number | No | Offset of the shadow along the x-axis, in pixels. |
| offsetY | number | No | Offset of the shadow along the y-axis, in pixels. |
| offsetY | number | No | Offset of the shadow along the y-axis, in pixels. |
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300004 | Unauthorized operation. |
| 1300004 | Unauthorized operation. |
**Example**
**Example**
...
@@ -4119,18 +4119,18 @@ Sets the radius of the rounded corners for this window.
...
@@ -4119,18 +4119,18 @@ Sets the radius of the rounded corners for this window.
| radius | number | Yes | Radius of the rounded corners. The value is greater than or equal to 0. The value **0** means that the window does not use rounded corners. |
| radius | number | Yes | Radius of the rounded corners. The value is greater than or equal to 0. The value **0** means that the window does not use rounded corners.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
Obtains the properties of this window. This API uses an asynchronous callback to return the result.
Obtains the properties of this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getWindowProperties()](#getwindowproperties9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getWindowProperties()](#getwindowproperties9) instead.
Obtains the properties of this window. This API uses a promise to return the result.
Obtains the properties of this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getWindowProperties()](#getwindowproperties9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [getWindowProperties()](#getwindowproperties9) instead.
Obtains the area where this window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. This API uses an asynchronous callback to return the result.
Obtains the area where this window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [getWindowAvoidArea()](#getwindowavoidarea9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [getWindowAvoidArea()](#getwindowavoidarea9) instead.
Obtains the area where this window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. This API uses a promise to return the result.
Obtains the area where this window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [getWindowAvoidArea()](#getwindowavoidarea9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [getWindowAvoidArea()](#getwindowavoidarea9) instead.
Sets whether to enable the full-screen mode for this window. This API uses an asynchronous callback to return the result.
Sets whether to enable the full-screen mode for this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9) instead.
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. The value **true** means to enable the full-screen mode, and **false** means the opposite. |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. The value **true** means to enable the full-screen mode, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether to enable the full-screen mode for this window. This API uses a promise to return the result.
Sets whether to enable the full-screen mode for this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9-1) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9-1) instead.
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. The value **true** means to enable the full-screen mode, and **false** means the opposite. |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden. The value **true** means to enable the full-screen mode, and **false** means the opposite.|
Sets whether to enable the full-screen mode for the window layout. This API uses an asynchronous callback to return the result.
Sets whether to enable the full-screen mode for the window layout. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9) instead.
| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed. The value **true** means to enable the full-screen mode for the window layout, and **false** means the opposite. |
| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed. The value **true** means to enable the full-screen mode for the window layout, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether to enable the full-screen mode for the window layout. This API uses a promise to return the result.
Sets whether to enable the full-screen mode for the window layout. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9-1) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowLayoutFullScreen()](#setwindowlayoutfullscreen9-1) instead.
| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed. The value **true** means to enable the full-screen mode for the window layout, and **false** means the opposite. |
| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed. The value **true** means to enable the full-screen mode for the window layout, and **false** means the opposite.|
Sets whether to display the status bar and navigation bar in this window. This API uses an asynchronous callback to return the result.
Sets whether to display the status bar and navigation bar in this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9) instead.
| names | Array<'status'\|'navigation'> | Yes | Whether to display the status bar and navigation bar.<br>For example, to display the status bar and navigation bar, set this parameter to **['status', 'navigation']**. By default, they are not displayed. |
| names | Array<'status'\|'navigation'> | Yes | Whether to display the status bar and navigation bar.<br>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 result. |
| callback | AsyncCallback<void>| Yes | Callback used to return the result. |
Sets whether to display the status bar and navigation bar in this window. This API uses a promise to return the result.
Sets whether to display the status bar and navigation bar in this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9-1) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowSystemBarEnable()](#setwindowsystembarenable9-1) instead.
| names | Array<'status'\|'navigation'> | Yes | Whether to display the status bar and navigation bar.<br>For example, to display the status bar and navigation bar, set this parameter to **['status', 'navigation']**. By default, they are not displayed. |
| names | Array<'status'\|'navigation'> | Yes | Whether to display the status bar and navigation bar.<br>For example, to display the status bar and navigation bar, set this parameter to **['status', 'navigation']**. By default, they are not displayed.|
Sets the properties of the status bar and navigation bar in this window. This API uses an asynchronous callback to return the result.
Sets the properties of the status bar and navigation bar in this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarProperties()](#setwindowsystembarproperties9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarProperties()](#setwindowsystembarproperties9) instead.
Sets the properties of the status bar and navigation bar in this window. This API uses a promise to return the result.
Sets the properties of the status bar and navigation bar in this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarProperties()](#setwindowsystembarproperties9-1) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowSystemBarProperties()](#setwindowsystembarproperties9-1) instead.
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the window is displayed, and **false** means the opposite. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the window is displayed, and **false** means the opposite.|
| Promise<boolean> | Promise used to return the result. The value **true** means that the window is displayed, and **false** means the opposite.|
| Promise<boolean> | Promise used to return the result. The value **true** means that the window is displayed, and **false** means the opposite.|
| type | string | Yes | Event type. The value is fixed at **'systemAvoidAreaChange'**, indicating the event of changes to the area where the window cannot be displayed. |
| type | string | Yes | Event type. The value is fixed at **'systemAvoidAreaChange'**, indicating the event of changes to the area where the window cannot be displayed.|
| callback | Callback<[AvoidArea](#avoidarea7)> | Yes | Callback used to return the area. |
| callback | Callback<[AvoidArea](#avoidarea7)> | Yes | Callback used to return the area. |
| type | string | Yes | Event type. The value is fixed at **'systemAvoidAreaChange'**, indicating the event of changes to the area where the window cannot be displayed. |
| type | string | Yes | Event type. The value is fixed at **'systemAvoidAreaChange'**, indicating the event of changes to the area where the window cannot be displayed.|
| callback | Callback<[AvoidArea](#avoidarea7)> | No | Callback used to return the area. |
| callback | Callback<[AvoidArea](#avoidarea7)> | No | Callback used to return the area. |
Checks whether this window supports the wide-gamut color space. This API uses an asynchronous callback to return the result.
Checks whether this window supports the wide-gamut color space. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [isWindowSupportWideGamut()](#iswindowsupportwidegamut9) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [isWindowSupportWideGamut()](#iswindowsupportwidegamut9) instead.
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the wide-gamut color space is supported, and **false** means the opposite. |
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the wide-gamut color space is supported, and **false** means the opposite.|
Checks whether this window supports the wide-gamut color space. This API uses a promise to return the result.
Checks whether this window supports the wide-gamut color space. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [isWindowSupportWideGamut()](#iswindowsupportwidegamut9-1) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [isWindowSupportWideGamut()](#iswindowsupportwidegamut9-1) instead.
| Promise<boolean> | Promise used to return the result. The value **true** means that the wide-gamut color space is supported, and **false** means the opposite.|
| Promise<boolean> | Promise used to return the result. The value **true** means that the wide-gamut color space is supported, and **false** means the opposite.|
Sets a color space for this window. This API uses an asynchronous callback to return the result.
Sets a color space for this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [setWindowColorSpace()](#setwindowcolorspace9) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [setWindowColorSpace()](#setwindowcolorspace9) instead.
Sets a color space for this window. This API uses a promise to return the result.
Sets a color space for this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [setWindowColorSpace()](#setwindowcolorspace9-1) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [setWindowColorSpace()](#setwindowcolorspace9-1) instead.
Obtains the color space of this window. This API uses an asynchronous callback to return the result.
Obtains the color space of this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getWindowColorSpace()](#getwindowcolorspace9) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getWindowColorSpace()](#getwindowcolorspace9) instead.
| callback | AsyncCallback<[ColorSpace](#colorspace8)> | Yes | Callback used to return the result. When the color space is obtained successfully, **err** is **undefined**, and **data** is the current color space. |
| callback | AsyncCallback<[ColorSpace](#colorspace8)> | Yes | Callback used to return the result. When the color space is obtained successfully, **err** is **undefined**, and **data** is the current color space.|
Obtains the color space of this window. This API uses a promise to return the result.
Obtains the color space of this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getWindowColorSpace()](#getwindowcolorspace9) instead.
> This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getWindowColorSpace()](#getwindowcolorspace9) instead.
Sets the background color for this window. This API uses an asynchronous callback to return the result. In the stage model, this API must be used after [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9).
Sets the background color for this window. This API uses an asynchronous callback to return the result. In the stage model, this API must be used after [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9).
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBackgroundColor()](#setwindowbackgroundcolor9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBackgroundColor()](#setwindowbackgroundcolor9) instead.
| color | string | Yes | Background color to set. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
| color | string | Yes | Background color to set. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets the background color for this window. This API uses a promise to return the result. In the stage model, this API must be used after [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9).
Sets the background color for this window. This API uses a promise to return the result. In the stage model, this API must be used after [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9).
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBackgroundColor()](#setwindowbackgroundcolor9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBackgroundColor()](#setwindowbackgroundcolor9) instead.
| color | string | Yes | Background color to set. The value is a hexadecimal RGB or ARGB color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
| color | string | Yes | Background color to set. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9) instead.
Sets the screen brightness for this window. This API uses a promise to return the result.
Sets the screen brightness for this window. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9-1) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9-1) instead.
Sets whether this window can gain focus. This API uses an asynchronous callback to return the result.
Sets whether this window can gain focus. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowFocusable()](#setwindowfocusable9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowFocusable()](#setwindowfocusable9) instead.
| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite. |
| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether this window can gain focus. This API uses a promise to return the result.
Sets whether this window can gain focus. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowFocusable()](#setwindowfocusable9-1) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowFocusable()](#setwindowfocusable9-1) instead.
| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite. |
| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite.|
| Promise<void> | Promise that returns no value.|
| Promise<void> | Promise that returns no value.|
**Example**
**Example**
...
@@ -5539,17 +5539,17 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): v
...
@@ -5539,17 +5539,17 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback<void>): v
Sets whether to keep the screen always on. This API uses an asynchronous callback to return the result.
Sets whether to keep the screen always on. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowKeepScreenOn()](#setwindowkeepscreenon9) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowKeepScreenOn()](#setwindowkeepscreenon9) instead.
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. The value **true** means to keep the screen always on, and **false** means the opposite. |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. The value **true** means to keep the screen always on, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether to keep the screen always on. This API uses a promise to return the result.
Sets whether to keep the screen always on. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowKeepScreenOn()](#setwindowkeepscreenon9-1) instead.
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowKeepScreenOn()](#setwindowkeepscreenon9-1) instead.
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. The value **true** means to keep the screen always on, and **false** means the opposite. |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on. The value **true** means to keep the screen always on, and **false** means the opposite.|
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means the area outside the subwindow is touchable, and **false** means the opposite. |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means the area outside the subwindow is touchable, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means the area outside the subwindow is touchable, and **false** means the opposite. |
| touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means the area outside the subwindow is touchable, and **false** means the opposite.|
| Promise<void> | Promise that returns no value.|
| Promise<void> | Promise that returns no value.|
**Example**
**Example**
...
@@ -5673,17 +5673,17 @@ setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): voi
...
@@ -5673,17 +5673,17 @@ setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): voi
Sets whether this window is in privacy mode. This API uses an asynchronous callback to return the result. When in privacy mode, the window content cannot be captured or recorded.
Sets whether this window is in privacy mode. This API uses an asynchronous callback to return the result. When in privacy mode, the window content cannot be captured or recorded.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowPrivacyMode()](#setwindowprivacymode9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowPrivacyMode()](#setwindowprivacymode9) instead.
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. The value **true** means that the window is in privacy mode, and **false** means the opposite. |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. The value **true** means that the window is in privacy mode, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether this window is in privacy mode. This API uses a promise to return the result. When in privacy mode, the window content cannot be captured or recorded.
Sets whether this window is in privacy mode. This API uses a promise to return the result. When in privacy mode, the window content cannot be captured or recorded.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowPrivacyMode()](#setwindowprivacymode9-1) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowPrivacyMode()](#setwindowprivacymode9-1) instead.
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. The value **true** means that the window is in privacy mode, and **false** means the opposite. |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode. The value **true** means that the window is in privacy mode, and **false** means the opposite.|
Sets whether this window is touchable. This API uses an asynchronous callback to return the result.
Sets whether this window is touchable. This API uses an asynchronous callback to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowTouchable()](#setwindowtouchable9) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowTouchable()](#setwindowtouchable9) instead.
| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite. |
| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
Sets whether this window is touchable. This API uses a promise to return the result.
Sets whether this window is touchable. This API uses a promise to return the result.
> **NOTE**
> **NOTE**
>
>
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowTouchable()](#setwindowtouchable9-1) instead.
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [setWindowTouchable()](#setwindowtouchable9-1) instead.
| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite. |
| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite.|
| path | string | Yes | Path of the page from which the content will be loaded. |
| path | string | Yes | Path of the page from which the content will be loaded. |
| storage | [LocalStorage](../../quick-start/arkts-state-mgmt-application-level.md#localstorage) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application. |
| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | Yes | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
| callback | AsyncCallback<void>| Yes | Callback used to return the result. |
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300005 | This window stage is abnormal. |
| 1300005 | This window stage is abnormal. |
...
@@ -6214,22 +6214,22 @@ Loads content from a page associated with a local storage to the main window in
...
@@ -6214,22 +6214,22 @@ Loads content from a page associated with a local storage to the main window in
| path | string | Yes | Path of the page from which the content will be loaded. |
| path | string | Yes | Path of the page from which the content will be loaded. |
| storage | [LocalStorage](../../quick-start/arkts-state-mgmt-application-level.md#localstorage) | No | A storage unit, which provides storage for variable state properties and non-variable state properties of an application. |
| storage | [LocalStorage](../../quick-start/arkts-localstorage.md) | No | A storage unit, which provides storage for variable state properties and non-variable state properties of an application.|
| showOnLockScreen | boolean | Yes | Whether to display the window on the lock screen. The value **true** means to display the window on the lock screen, and **false** means the opposite. |
| showOnLockScreen | boolean | Yes | Whether to display the window on the lock screen. The value **true** means to display the window on the lock screen, and **false** means the opposite.|
**Error codes**
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ID| Error Message|
| ------- | ------------------------------ |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
| 1300002 | This window state is abnormal. |
| 1300005 | This window stage is abnormal. |
| 1300005 | This window stage is abnormal. |
...
@@ -6486,9 +6486,9 @@ Provides the context for the transition animation.
...
@@ -6486,9 +6486,9 @@ Provides the context for the transition animation.
| isCompleted | boolean | Yes | Whether the transition is complete. The value **true** means that the transition is complete, and **false** means the opposite. |
| isCompleted | boolean | Yes | Whether the transition is complete. The value **true** means that the transition is complete, and **false** means the opposite.|
**Example**
**Example**
...
@@ -6554,9 +6554,9 @@ Customizes the animation for the scenario when the window is shown.
...
@@ -6554,9 +6554,9 @@ Customizes the animation for the scenario when the window is shown.