diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md
index d00c77b95c8870f0c97404a0e08d2ba3d449160b..726f05fc58a6ef1f82cb1955d24388fc17f48ebd 100644
--- a/en/application-dev/reference/apis/js-apis-window.md
+++ b/en/application-dev/reference/apis/js-apis-window.md
@@ -232,7 +232,7 @@ Describes the window properties.
| isLayoutFullScreen7+ | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. The value **true** means that the window is immersive, and **false** means the opposite.|
| focusable7+ | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. The value **true** means that the window can gain focus, and **false** means the opposite.|
| touchable7+ | boolean | Yes | No | Whether the window is touchable. The default value is **true**. The value **true** means that the window is touchable, and **false** means the opposite.|
-| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness. |
+| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness. If no value is passed, the brightness follows the system. In this case, the obtained brightness value is –1.|
| dimBehindValue(deprecated) | 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.
**NOTE**
This property is supported since API version 7 and deprecated since API version 9.
|
| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**. The value **true** means that the screen is always on, and **false** means the opposite.|
| isPrivacyMode7+ | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**. The value **true** means that the window is in privacy mode, and **false** means the opposite.|
@@ -332,6 +332,8 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
| ------- | -------------------------------- |
| 1300001 | Repeated operation. |
| 1300006 | This window context is abnormal. |
+| 1300008 | The operation is on invalid display. |
+| 1300009 | The parent window is invalid. |
**Example**
@@ -381,6 +383,8 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
| ------- | -------------------------------- |
| 1300001 | Repeated operation. |
| 1300006 | This window context is abnormal. |
+| 1300008 | The operation is on invalid display. |
+| 1300009 | The parent window is invalid. |
**Example**
@@ -420,6 +424,14 @@ Finds a window based on the name.
| ----------------- | ------------------- |
| [Window](#window) | Window found.|
+**Error codes**
+
+For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
+
+| ID| Error Message|
+| ------- | -------------------------------- |
+| 1300002 | This window state is abnormal. |
+
**Example**
```js
@@ -2701,7 +2713,7 @@ try {
### off('avoidAreaChange')9+
-off(type: 'avoidAreaChange', callback: Callback<{AvoidAreaType, AvoidArea}>): void
+off(type: 'avoidAreaChange', callback?: Callback<{AvoidAreaType, AvoidArea}>): void
Disables listening for changes to the area where the window cannot be displayed.
@@ -3471,7 +3483,7 @@ let colorSpace = windowClass.getWindowColorSpace();
setWindowBackgroundColor(color: string): void
-Sets the background color for this window. In the stage model, this API must be used after [loadContent](#loadcontent9).
+Sets the background color for this window. In the stage model, this API must be used after the call of [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9) takes effect.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
@@ -3506,6 +3518,8 @@ setWindowBrightness(brightness: number, callback: AsyncCallback<void>): vo
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
+When the screen brightness setting for the window takes effect, Control Panel cannot adjust the system screen brightness. It can do so only after the window screen brightness is restored to the default value.
+
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
@@ -3547,6 +3561,8 @@ setWindowBrightness(brightness: number): Promise<void>
Sets the screen brightness for this window. This API uses a promise to return the result.
+When the screen brightness setting for the window takes effect, Control Panel cannot adjust the system screen brightness. It can do so only after the window screen brightness is restored to the default value.
+
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
@@ -4100,15 +4116,15 @@ Captures this window. This API uses an asynchronous callback to return the resul
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------------------------------------ | --------- | ----------------------------------- |
-| callback | AsyncCallback<[image.PixelMap](js-apis-image.md#pixelmap7)> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------------------------- | ---- | -------------------- |
+| callback | AsyncCallback<[image.PixelMap](js-apis-image.md#pixelmap7)> | Yes | Callback used to return the result. |
**Error codes**
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. |
@@ -4135,15 +4151,15 @@ Captures this window. This API uses a promise to return the result.
**Return value**
-| Type | Description |
-| ----------------------------------------------------------- | --------------------------------------------- |
-| Promise<[image.PixelMap](js-apis-image.md#pixelmap7)> | Promise used to return the window screenshot. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<[image.PixelMap](js-apis-image.md#pixelmap7)> | Promise used to return the window screenshot.|
**Error codes**
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. |
@@ -4171,18 +4187,18 @@ Sets the opacity for this window. This API can be used only when you [customize
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------- | ------ | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ------- | ------ | ---- | ----------------------------------------------------------- |
+| 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**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4206,18 +4222,18 @@ Sets the scale parameters for this window. This API can be used only when you [c
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------ | ------------------------------ | --------- | ------------------------ |
-| scaleOptions | [ScaleOptions](#scaleoptions9) | Yes | Scale parameters to set. |
+| Name | Type | Mandatory| Description |
+| ------------ | ------------------------------ | ---- | ---------- |
+| scaleOptions | [ScaleOptions](#scaleoptions9) | Yes | Scale parameters to set.|
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4247,18 +4263,18 @@ Sets the rotation parameters for this window. This API can be used only when you
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------- | -------------------------------- | --------- | --------------------------- |
-| rotateOptions | [RotateOptions](#rotateoptions9) | Yes | Rotation parameters to set. |
+| Name | Type | Mandatory| Description |
+| ------------- | -------------------------------- | ---- | ---------- |
+| rotateOptions | [RotateOptions](#rotateoptions9) | Yes | Rotation parameters to set.|
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4289,18 +4305,18 @@ Sets the translation parameters for this window. This API can be used only when
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------------- | -------------------------------------- | --------- | ------------------------------------------- |
-| translateOptions | [TranslateOptions](#translateoptions9) | Yes | Translation parameters. The unit is pixels. |
+| Name | Type | Mandatory| Description |
+| ---------------- | -------------------------------------- | ---- | -------------------- |
+| translateOptions | [TranslateOptions](#translateoptions9) | Yes | Translation parameters. The unit is pixels.|
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4329,18 +4345,18 @@ Obtains the transition animation controller.
**Return value**
-| Type | Description |
-| ---------------------------------------------- | -------------------------------- |
-| [TransitionController](#transitioncontroller9) | Transition animation controller. |
+| Type | Description |
+| ---------------------------------------------- | ---------------- |
+| [TransitionController](#transitioncontroller9) | Transition animation controller.|
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4391,18 +4407,18 @@ Blurs this window.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------ | ------ | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| 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**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4426,18 +4442,18 @@ Blurs the background of this window.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------ | ------ | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| 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**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4461,18 +4477,18 @@ Sets the blur style for the background of this window.
**Parameters**
-| Name | Type | Mandatory | Description |
-| --------- | ------------------------ | --------- | --------------------------------------------------- |
-| blurStyle | [BlurStyle](#blurstyle9) | Yes | Blur style to set for the background of the window. |
+| Name | Type | Mandatory| Description |
+| --------- | --------- | ---- | ---------------------- |
+| blurStyle | [BlurStyle](#blurstyle9) | Yes | Blur style to set for the background of the window.|
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4496,21 +4512,21 @@ Sets the shadow for the window borders.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------- | ------ | --------- | ------------------------------------------------------------ |
-| 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 code and is case insensitive, for example, **#00FF00** or **#FF00FF00**. |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ------- | ------ | ---- | ------------------------------------------------------------ |
+| 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 code and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
+| 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. |
**Error codes**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4534,18 +4550,18 @@ Sets the radius of the rounded corners for this window.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------ | ------ | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | -------------------- |
+| 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**
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. |
-| 1300004 | Unauthorized operation. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4569,20 +4585,20 @@ Raises the application subwindow to the top layer of the application. This API u
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ----------------------------------- |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | --------------------------------------------- |
-| 1300002 | This window state is abnormal. |
+| ID| Error Message|
+| ------- | ------------------------------ |
+| 1300002 | This window state is abnormal. |
| 1300003 | This window manager service works abnormally. |
-| 1300004 | Unauthorized operation. |
-| 1300009 | The parent window is invalid. |
+| 1300004 | Unauthorized operation. |
+| 1300009 | The parent window is invalid. |
**Example**
@@ -4608,20 +4624,20 @@ Raises the application subwindow to the top layer of the application. This API u
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | --------------------------------------------- |
-| 1300002 | This window state is abnormal. |
+| ID| Error Message|
+| ------- | ------------------------------ |
+| 1300002 | This window state is abnormal. |
| 1300003 | This window manager service works abnormally. |
-| 1300004 | Unauthorized operation. |
-| 1300009 | The parent window is invalid. |
+| 1300004 | Unauthorized operation. |
+| 1300009 | The parent window is invalid. |
**Example**
@@ -4645,24 +4661,24 @@ This API is available only for the main window of the application. The aspect ra
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | --------- | ------------------------------------------------------------ |
-| ratio | number | Yes | Aspect ratio of the window content layout except border decoration. The value must be greater than 0. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------- | ---- | ------------------------------------------------------------ |
+| ratio | number | Yes | Aspect ratio of the window content layout except border decoration. The value must be greater than 0.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | ------------------------------ |
-| 1300002 | This window state is abnormal. |
-| 1300004 | Unauthorized operation. |
+| ID| Error Message|
+| ------- | -------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4692,19 +4708,19 @@ This API is available only for the main window of the application. The aspect ra
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| ratio | number | Yes | Aspect ratio of the window content layout except border decoration. The value must be greater than 0. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------- | ---- | ------------------------------------------------------------ |
+| ratio | number | Yes | Aspect ratio of the window content layout except border decoration. The value must be greater than 0.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | ------------------------------ |
-| 1300002 | This window state is abnormal. |
-| 1300004 | Unauthorized operation. |
+| ID| Error Message|
+| ------- | -------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4735,18 +4751,18 @@ This API is available only for the main window of the application. After this AP
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | ------------------------------ |
-| 1300002 | This window state is abnormal. |
-| 1300004 | Unauthorized operation. |
+| ID| Error Message|
+| ------- | -------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4775,18 +4791,18 @@ This API is available only for the main window of the application. After this AP
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ----------------------------------- |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------- | ---- | ------------------------------------------------------------ |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | ------------------------------ |
-| 1300002 | This window state is abnormal. |
-| 1300004 | Unauthorized operation. |
+| ID| Error Message|
+| ------- | -------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300004 | Unauthorized operation. |
**Example**
@@ -4816,25 +4832,25 @@ Adds or deletes the watermark flag for this window. This API uses a promise to r
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------ | ------- | --------- | ------------------------------------------------------------ |
-| enable | boolean | Yes | Whether to add or delete the watermark flag to the window. The value **true** means to add the watermark flag and **false** means to delete the watermark flag. |
+| Name| Type | Mandatory| Description |
+| ------ | ------- | --- | ------------------------------------------------ |
+| enable | boolean | Yes | Whether to add or delete the watermark flag to the window. The value **true** means to add the watermark flag and **false** means to delete the watermark flag.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | --------------------------------------------- |
-| 1300002 | This window state is abnormal. |
-| 1300003 | This window manager service works abnormally. |
-| 1300008 | The operation is on invalid display. |
+| ID| Error Message|
+| ------- | ---------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300003 | This window manager service works abnormally. |
+| 1300008 | The operation is on invalid display. |
**Example**
@@ -4864,20 +4880,20 @@ Adds or deletes the watermark flag for this window. This API uses an asynchronou
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| enable | boolean | Yes | Whether to add or delete the watermark flag to the window. The value **true** means to add the watermark flag and **false** means to delete the watermark flag. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | --- | ----------------------------------------------- |
+| enable | boolean | Yes | Whether to add or delete the watermark flag to the window. The value **true** means to add the watermark flag and **false** means to delete the watermark flag.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
-| ------- | --------------------------------------------- |
-| 1300002 | This window state is abnormal. |
-| 1300003 | This window manager service works abnormally. |
-| 1300008 | The operation is on invalid display. |
+| ID| Error Message|
+| ------- | ---------------------------------------------- |
+| 1300002 | This window state is abnormal. |
+| 1300003 | This window manager service works abnormally. |
+| 1300008 | The operation is on invalid display. |
**Example**
@@ -4910,9 +4926,9 @@ Shows this window. This API uses an asynchronous callback to return the result.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ----------------------------------- |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
**Example**
@@ -4940,9 +4956,9 @@ Shows this window. This API uses a promise to return the result.
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -4969,9 +4985,9 @@ Destroys this window. This API uses an asynchronous callback to return the resul
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ----------------------------------- |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
**Example**
@@ -4999,9 +5015,9 @@ Destroys this window. This API uses a promise to return the result.
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5030,11 +5046,11 @@ This operation is not supported in a window in full-screen mode.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| x | number | Yes | Distance that the window moves along the x-axis, in px. A positive value indicates that the window moves to the right. |
-| y | number | Yes | Distance that the window moves along the y-axis, in px. A positive value indicates that the window moves downwards. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ------------------------------------------------- |
+| x | number | Yes | Distance that the window moves along the x-axis, in px. A positive value indicates that the window moves to the right.|
+| y | number | Yes | Distance that the window moves along the y-axis, in px. A positive value indicates that the window moves downwards.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5064,16 +5080,16 @@ This operation is not supported in a window in full-screen mode.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---- | ------ | --------- | ------------------------------------------------------------ |
-| x | number | Yes | Distance that the window moves along the x-axis, in px. A positive value indicates that the window moves to the right. |
-| y | number | Yes | Distance that the window moves along the y-axis, in px. 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, in px. A positive value indicates that the window moves to the right.|
+| y | number | Yes | Distance that the window moves along the y-axis, in px. A positive value indicates that the window moves downwards.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5108,11 +5124,11 @@ This operation is not supported in a window in full-screen mode.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ----------------------------------- |
-| width | number | Yes | New width of the window, in px. |
-| height | number | Yes | New height of the window, in px. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | -------------------------- |
+| width | number | Yes | New width of the window, in px.|
+| height | number | Yes | New height of the window, in px.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5148,16 +5164,16 @@ This operation is not supported in a window in full-screen mode.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------ | ------ | --------- | -------------------------------- |
-| width | number | Yes | New width of the window, in px. |
-| height | number | Yes | New height of the window, in px. |
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------------- |
+| width | number | Yes | New width of the window, in px.|
+| height | number | Yes | New height of the window, in px.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5186,10 +5202,10 @@ Sets the type of this window. This API uses an asynchronous callback to return t
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | -------------------------- | --------- | ----------------------------------- |
-| type | [WindowType](#windowtype7) | Yes | Window type. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| type | [WindowType](#windowtype7) | Yes | Window type.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result.|
**Example**
@@ -5220,15 +5236,15 @@ Sets the type of this window. This API uses a promise to return the result.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---- | -------------------------- | --------- | ------------ |
-| type | [WindowType](#windowtype7) | Yes | Window type. |
+| Name| Type | Mandatory| Description |
+| ------ | ------------------------- | ---- | ---------- |
+| type | [WindowType](#windowtype7) | Yes | Window type.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5256,9 +5272,9 @@ Obtains the properties of this window. This API uses an asynchronous callback to
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------------------------- | --------- | ---------------------------------------------- |
-| callback | AsyncCallback<[WindowProperties](#windowproperties)> | Yes | Callback used to return the window properties. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------------------------------------- | ---- | ---------------------------- |
+| callback | AsyncCallback<[WindowProperties](#windowproperties)> | Yes | Callback used to return the window properties.|
**Example**
@@ -5286,9 +5302,9 @@ Obtains the properties of this window. This API uses a promise to return the res
**Return value**
-| Type | Description |
-| ---------------------------------------------------- | --------------------------------------------- |
-| Promise<[WindowProperties](#windowproperties)> | Promise used to return the window properties. |
+| Type | Description |
+| ---------------------------------------------------- | ------------------------------- |
+| Promise<[WindowProperties](#windowproperties)> | Promise used to return the window properties.|
**Example**
@@ -5315,10 +5331,10 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | --------------------------------------------- | --------- | --------------------------------- |
-| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
-| callback | AsyncCallback<[AvoidArea](#avoidarea7)> | Yes | Callback used to return the area. |
+| Name | Type | Mandatory| Description |
+| -------- |-----------------------------------------------| ---- | ------------------------------------------------------------ |
+| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area.|
+| callback | AsyncCallback<[AvoidArea](#avoidarea7)> | Yes | Callback used to return the area. |
**Example**
@@ -5347,15 +5363,15 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---- | -------------------------------- | --------- | ----------------- |
-| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
+| Name| Type | Mandatory| Description |
+| ------ |----------------------------------| ---- | ------------------------------------------------------------ |
+| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area.|
**Return value**
-| Type | Description |
-| --------------------------------------- | -------------------------------- |
-| Promise<[AvoidArea](#avoidarea7)> | Promise used to return the area. |
+| Type | Description |
+|-----------------------------------------| ----------------------------------- |
+| Promise<[AvoidArea](#avoidarea7)> | Promise used to return the area.|
**Example**
@@ -5383,10 +5399,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. 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. |
+| Name | Type | Mandatory| Description |
+| ------------ | ------------------------- | ---- | ---------------------------------------------- |
+| 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. |
**Example**
@@ -5415,15 +5431,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. The value **true** means to enable the full-screen mode, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| ------------ | ------- | ---- | ---------------------------------------------- |
+| 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.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5453,10 +5469,10 @@ A non-immersive layout means that the layout avoids the status bar and navigatio
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------------ | ------------------------- | --------- | ------------------------------------------------------------ |
-| isLayoutFullScreen | boolean | Yes | Whether the window layout is immersive. (The status bar and navigation bar of the immersive layout are still displayed.) The value **true** means that the window is immersive, and **false** means the opposite. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------------------------- | ---- | ------------------------------------------------------------ |
+| isLayoutFullScreen | boolean | Yes | Whether the window layout is immersive. (The status bar and navigation bar of the immersive layout are still displayed.) The value **true** means that the window layout is immersive, and **false** means the opposite.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5487,15 +5503,15 @@ A non-immersive layout means that the layout avoids the status bar and navigatio
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------------ | ------- | --------- | ------------------------------------------------------------ |
-| isLayoutFullScreen | boolean | Yes | Whether the window layout is immersive. (The status bar and navigation bar of the immersive layout are still displayed.) The value **true** means that the window is immersive, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------- | ---- | ------------------------------------------------------------ |
+| isLayoutFullScreen | boolean | Yes | Whether the window layout is immersive. (The status bar and navigation bar of the immersive layout are still displayed.) The value **true** means that the window layout is immersive, and **false** means the opposite.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5523,10 +5539,10 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ----------------------------- | --------- | ------------------------------------------------------------ |
-| names | Array<'status'\|'navigation'> | 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 result. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
+| names | Array<'status'\|'navigation'> | 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 result. |
**Example**
@@ -5556,15 +5572,15 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ----------------------------- | --------- | ------------------------------------------------------------ |
-| names | Array<'status'\|'navigation'> | 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<'status'\|'navigation'> | 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<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5593,10 +5609,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<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ------------------- | ------------------------------------------- | ---- | ---------------------- |
+| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5631,15 +5647,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<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5673,10 +5689,10 @@ Loads content from a page to this window. This API uses an asynchronous callback
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------- |
-| path | string | Yes | Path of the page from which the content will be loaded. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | -------------------- |
+| path | string | Yes | Path of the page from which the content will be loaded.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5704,15 +5720,15 @@ Loads content from a page to this window. This API uses a promise to return the
**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<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5739,9 +5755,9 @@ Checks whether this window is displayed. This API uses an asynchronous callback
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------- | --------- | ------------------------------------------------------------ |
-| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the window is displayed, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
+| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** means that the window is displayed, and **false** means the opposite.|
**Example**
@@ -5769,9 +5785,9 @@ Checks whether this window is displayed. This API uses a promise to return the r
**Return value**
-| Type | Description |
+| Type | Description |
| ---------------------- | ------------------------------------------------------------ |
-| 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.|
**Example**
@@ -5798,10 +5814,10 @@ Enables listening for changes to the area where the window cannot be displayed.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- |------------------------------------------| ---- | ------------------------------------------------------- |
+| 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. |
**Example**
@@ -5825,10 +5841,10 @@ Disables listening for changes to the area where the window cannot be displayed.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- |------------------------------------------| ---- | ------------------------------------------------------- |
+| 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. |
**Example**
@@ -5850,9 +5866,9 @@ Checks whether this window supports the wide-gamut color space. This API uses an
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ---------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------- | ---- | ------------------------------------------------------------ |
+| 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.|
**Example**
@@ -5880,9 +5896,9 @@ Checks whether this window supports the wide-gamut color space. This API uses a
**Return value**
-| Type | Description |
+| Type | Description |
| ---------------------- | ------------------------------------------------------------ |
-| 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.|
**Example**
@@ -5909,10 +5925,10 @@ Sets a color space for this window. This API uses an asynchronous callback to re
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------- | -------------------------- | --------- | ----------------------------------- |
-| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| ---------- | ------------------------- | ---- | ------------ |
+| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Example**
@@ -5940,15 +5956,15 @@ Sets a color space for this window. This API uses a promise to return the result
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------- | -------------------------- | --------- | ------------------- |
-| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set. |
+| Name | Type | Mandatory| Description |
+| ---------- | ------------------------- | ---- | -------------- |
+| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -5975,9 +5991,9 @@ Obtains the color space of this window. This API uses an asynchronous callback t
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ----------------------------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------------------------- | ---- | ---------------------------------------------------------- |
+| 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.|
**Example**
@@ -6005,9 +6021,9 @@ Obtains the color space of this window. This API uses a promise to return the re
**Return value**
-| Type | Description |
-| ----------------------------------------- | ----------------------------------------------- |
-| Promise<[ColorSpace](#colorspace8)> | Promise used to return the current color space. |
+| Type | Description |
+| ---------------------------------------- | ------------------------------- |
+| Promise<[ColorSpace](#colorspace8)> | Promise used to return the current color space.|
**Example**
@@ -6024,7 +6040,7 @@ promise.then((data)=> {
setBackgroundColor(color: string, callback: AsyncCallback<void>): void
-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 the call of [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9) takes effect.
> **NOTE**
>
@@ -6034,10 +6050,10 @@ Sets the background color for this window. This API uses an asynchronous callbac
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
+| 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. |
**Example**
@@ -6056,7 +6072,7 @@ windowClass.setBackgroundColor(color, (err) => {
setBackgroundColor(color: string): Promise<void>
-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 the call of [loadContent](#loadcontent9) or [setUIContent()](#setuicontent9) takes effect.
> **NOTE**
>
@@ -6066,15 +6082,15 @@ Sets the background color for this window. This API uses a promise to return the
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----- | ------ | --------- | ------------------------------------------------------------ |
-| 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**. |
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| 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**.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6094,6 +6110,8 @@ setBrightness(brightness: number, callback: AsyncCallback<void>): void
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
+When the screen brightness setting for the window takes effect, Control Panel cannot adjust the system screen brightness. It can do so only after the window screen brightness is restored to the default value.
+
> **NOTE**
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9) instead.
@@ -6102,10 +6120,10 @@ Sets the screen brightness for this window. This API uses an asynchronous callba
**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<void> | Yes | Callback used to return the 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<void> | Yes | Callback used to return the result. |
**Example**
@@ -6126,6 +6144,8 @@ setBrightness(brightness: number): Promise<void>
Sets the screen brightness for this window. This API uses a promise to return the result.
+When the screen brightness setting for the window takes effect, Control Panel cannot adjust the system screen brightness. It can do so only after the window screen brightness is restored to the default value.
+
> **NOTE**
>
> This API is supported since API version 6 and deprecated since API version 9. You are advised to use [setWindowBrightness()](#setwindowbrightness9-1) instead.
@@ -6134,15 +6154,15 @@ Sets the screen brightness for this window. This API uses a promise to return th
**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<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6170,10 +6190,10 @@ Sets the dimness of the window that is not on top. This API uses an asynchronous
**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<void> | Yes | Callback used to return the 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<void> | Yes | Callback used to return the result. |
**Example**
@@ -6201,15 +6221,15 @@ Sets the dimness of the window that is not on top. This API uses a promise to re
**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<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6236,10 +6256,10 @@ Sets whether this window can gain focus. This API uses an asynchronous callback
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------------------------- | ---- | ---------------------------- |
+| 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. |
**Example**
@@ -6268,15 +6288,15 @@ Sets whether this window can gain focus. This API uses a promise to return the r
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----------- | ------- | --------- | ------------------------------------------------------------ |
-| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | ---------------------------- |
+| isFocusable | boolean | Yes | Whether the window can gain focus. The value **true** means that the window can gain focus, and **false** means the opposite.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6304,10 +6324,10 @@ Sets whether to keep the screen always on. This API uses an asynchronous callbac
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------------- | ------------------------- | ---- | ------------------------ |
+| 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. |
**Example**
@@ -6336,15 +6356,15 @@ Sets whether to keep the screen always on. This API uses a promise to return the
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------------- | ------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------------- | ------- | ---- | ------------------------ |
+| 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.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6372,10 +6392,10 @@ Sets whether the area outside the subwindow is touchable. This API uses an async
**Parameters**
-| Name | Type | Mandatory | Description |
-| --------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| --------- | ------------------------- | ---- | ---------------- |
+| 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. |
**Example**
@@ -6403,15 +6423,15 @@ Sets whether the area outside the subwindow is touchable. This API uses a promis
**Parameters**
-| Name | Type | Mandatory | Description |
-| --------- | ------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| --------- | ------- | ---- | ---------------- |
+| 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.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6438,10 +6458,10 @@ Sets whether this window is in privacy mode. This API uses an asynchronous callb
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ------------- | ------------------------- | ---- | -------------------- |
+| 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. |
**Example**
@@ -6470,15 +6490,15 @@ Sets whether this window is in privacy mode. This API uses a promise to return t
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------------- | ------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ------------- | ------- | ---- | -------------------- |
+| 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.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6506,10 +6526,10 @@ Sets whether this window is touchable. This API uses an asynchronous callback to
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----------- | ------------------------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------------------------- | ---- | -------------------- |
+| 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. |
**Example**
@@ -6538,15 +6558,15 @@ Sets whether this window is touchable. This API uses a promise to return the res
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----------- | ------- | --------- | ------------------------------------------------------------ |
-| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | -------------------- |
+| isTouchable | boolean | Yes | Whether the window is touchable. The value **true** means that the window is touchable, and **false** means the opposite.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Example**
@@ -6568,12 +6588,12 @@ Describes the lifecycle of a window stage.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
-| Name | Value | Description |
-| -------- | ----- | ---------------------------------------------- |
-| SHOWN | 1 | The window stage is running in the foreground. |
-| ACTIVE | 2 | The window stage gains focus. |
-| INACTIVE | 3 | The window stage loses focus. |
-| HIDDEN | 4 | The window stage is running in the background. |
+| Name | Value| Description |
+| ---------- | ------ | ---------- |
+| SHOWN | 1 | The window stage is running in the foreground.|
+| ACTIVE | 2 | The window stage gains focus.|
+| INACTIVE | 3 | The window stage loses focus.|
+| HIDDEN | 4 | The window stage is running in the background.|
## WindowStage9+
@@ -6593,15 +6613,15 @@ Obtains the main window of this window stage. This API uses an asynchronous call
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | -------------------------------------- | --------- | ---------------------------------------- |
-| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the main window. |
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | --------------------------------------------- |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the main window.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6641,15 +6661,15 @@ Obtains the main window of this window stage. This API uses a promise to return
**Return value**
-| Type | Description |
-| -------------------------------- | --------------------------------------- |
-| Promise<[Window](#window)> | Promise used to return the main window. |
+| Type | Description |
+| -------------------------------- | ------------------------------------------------ |
+| Promise<[Window](#window)> | Promise used to return the main window.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6688,15 +6708,15 @@ Obtains the main window of this window stage.
**Return value**
-| Type | Description |
-| ----------------- | ----------------------- |
-| [Window](#window) | return the main window. |
+| Type| Description|
+| ----------------- | --------------------------------- |
+| [Window](#window) | return the main window.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6732,16 +6752,16 @@ 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<[Window](#window)> | Yes | Callback used to return the subwindow. |
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | --------------------------------------------- |
+| name | string | Yes | Name of the subwindow. |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the subwindow.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6785,21 +6805,21 @@ 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<[Window](#window)> | Promise used to return the subwindow. |
+| Type | Description |
+| -------------------------------- | ------------------------------------------------ |
+| Promise<[Window](#window)> | Promise used to return the subwindow.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6842,15 +6862,15 @@ Obtains all the subwindows of this window stage. This API uses an asynchronous c
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | --------------------------------------------------- | --------- | ------------------------------------------- |
-| callback | AsyncCallback<Array<[Window](#window)>> | Yes | Callback used to return all the subwindows. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------------------------------- | ---- | ------------------------------------------------- |
+| callback | AsyncCallback<Array<[Window](#window)>> | Yes | Callback used to return all the subwindows.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
+| ID| Error Message|
| ------- | ------------------------------ |
| 1300005 | This window stage is abnormal. |
@@ -6888,15 +6908,15 @@ Obtains all the subwindows of this window stage. This API uses a promise to retu
**Return value**
-| Type | Description |
-| --------------------------------------------- | ------------------------------------------ |
-| Promise<Array<[Window](#window)>> | Promise used to return all the subwindows. |
+| Type | Description |
+| --------------------------------------------- | ---------------------------------------------------- |
+| Promise<Array<[Window](#window)>> | Promise used to return all the subwindows.|
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
-| ID | Error Message |
+| ID| Error Message|
| ------- | ------------------------------ |
| 1300005 | This window stage is abnormal. |
@@ -6933,17 +6953,17 @@ Loads content from a page associated with a local storage to the main window in
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------------------------------- | --------- | ------------------------------------------------------------ |
-| path | string | Yes | Path of the page from which the content will be loaded. |
-| 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. |
+| Name | Type | Mandatory| Description |
+| -------- | ----------------------------------------------- | ---- | ------------------------------------------------------------ |
+| path | string | Yes | Path of the page from which the content will be loaded. |
+| 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. |
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -6988,22 +7008,22 @@ Loads content from a page associated with a local storage to the main window in
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------- | ------------------------------------------------------- | --------- | ------------------------------------------------------------ |
-| path | string | Yes | Path of the page from which the content will be loaded. |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ------- | ----------------------------------------------- | ---- | ------------------------------------------------------------ |
+| path | string | Yes | Path of the page from which the content will be loaded. |
+| 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.|
**Return value**
-| Type | Description |
-| ------------------- | ------------------------------ |
-| Promise<void> | Promise that returns no value. |
+| Type | Description |
+| ------------------- | ------------------------- |
+| Promise<void> | Promise that returns no value.|
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -7047,16 +7067,16 @@ Loads content from a page to this window stage. This API uses an asynchronous ca
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------- | --------- | ------------------------------------------------------- |
-| path | string | Yes | Path of the page from which the content will be loaded. |
-| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | -------------------- |
+| path | string | Yes | Path of the page from which the content will be loaded.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the result. |
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -7098,16 +7118,16 @@ Enables listening for window stage lifecycle changes.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------------------------------------ | --------- | ------------------------------------------------------------ |
-| type | string | Yes | Event type. The value is fixed at **'windowStageEvent'**, indicating the window stage lifecycle change event. |
-| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | Yes | Callback used to return the window stage lifecycle state. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Event type. The value is fixed at **'windowStageEvent'**, indicating the window stage lifecycle change event.|
+| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | Yes | Callback used to return the window stage lifecycle state. |
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -7147,16 +7167,16 @@ Disables listening for window stage lifecycle changes.
**Parameters**
-| Name | Type | Mandatory | Description |
-| -------- | ------------------------------------------------------------ | --------- | ------------------------------------------------------------ |
-| type | string | Yes | Event type. The value is fixed at **'windowStageEvent'**, indicating the window stage lifecycle change event. |
-| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | No | Callback used to return the window stage lifecycle state. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Event type. The value is fixed at **'windowStageEvent'**, indicating the window stage lifecycle change event.|
+| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | No | Callback used to return the window stage lifecycle state. |
**Error codes**
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. |
| 1300005 | This window stage is abnormal. |
@@ -7197,7 +7217,7 @@ Disables window decorators.
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. |
| 1300005 | This window stage is abnormal. |
@@ -7231,15 +7251,15 @@ Sets whether to display the window of the application on the lock screen.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ---------------- | ------- | --------- | ------------------------------------------------------------ |
-| 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. |
+| Name | Type | Mandatory| Description |
+| ---------------- | ------- | ---- | ---------------------------- |
+| 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**
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. |
| 1300005 | This window stage is abnormal. |
@@ -7272,9 +7292,9 @@ Provides the context for the transition animation.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
-| Name | Type | Readable | Writable | Description |
-| --------------------- | ----------------- | -------- | -------- | --------------------------------------- |
-| toWindow9+ | [Window](#window) | Yes | Yes | Target window to display the animation. |
+| Name | Type | Readable| Writable| Description |
+| --------------------- | ----------------- | ---- | ---- | ---------------- |
+| toWindow9+ | [Window](#window) | Yes | Yes | Target window to display the animation.|
### completeTransition9+
@@ -7288,9 +7308,9 @@ Completes the transition. This API can be called only after [animateTo()](../ark
**Parameters**
-| Name | Type | Mandatory | Description |
-| ----------- | ------- | --------- | ------------------------------------------------------------ |
-| isCompleted | boolean | Yes | Whether the transition is complete. The value **true** means that the transition is complete, and **false** means the opposite. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | ------------------------------------------------------------ |
+| isCompleted | boolean | Yes | Whether the transition is complete. The value **true** means that the transition is complete, and **false** means the opposite.|
**Example**
@@ -7340,9 +7360,9 @@ Customizes the animation for the scenario when the window is shown.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | --------- | ------------------------------------ |
-| context | [TransitionContext](#transitioncontext9) | Yes | Context of the transition animation. |
+| Name | Type | Mandatory| Description |
+| ------- | ---------------------------------------- | ---- | -------------------- |
+| context | [TransitionContext](#transitioncontext9) | Yes | Context of the transition animation.|
**Example**
@@ -7386,9 +7406,9 @@ Customizes the animation for the scenario when the window is hidden.
**Parameters**
-| Name | Type | Mandatory | Description |
-| ------- | ---------------------------------------- | --------- | ------------------------------------ |
-| context | [TransitionContext](#transitioncontext9) | Yes | Context of the transition animation. |
+| Name | Type | Mandatory| Description |
+| ------- | ---------------------------------------- | ---- | -------------------- |
+| context | [TransitionContext](#transitioncontext9) | Yes | Context of the transition animation.|
**Example**
@@ -7419,5 +7439,3 @@ controller.animationForHidden = (context : window.TransitionContext) => {
console.info('complete transition end');
};
```
-
-
\ No newline at end of file