diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md
index 358dead42d99dc9a23977d1e9299c5f5e01ae27b..4c4f1e76a0fbfb8d847f092698a27899fba367d3 100644
--- a/en/application-dev/reference/apis/js-apis-window.md
+++ b/en/application-dev/reference/apis/js-apis-window.md
@@ -2,7 +2,8 @@
The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes.
-> **NOTE**
+> **NOTE**
+>
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
@@ -136,20 +137,19 @@ Describes the window properties.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
-| Name | Type | Readable| Writable| Description |
-| ------------------------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ |
-| windowRect7+ | [Rect](#rect) | Yes | Yes | Window size. |
-| type7+ | [WindowType](#windowtype) | Yes | Yes | Window type. |
-| isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. |
-| isLayoutFullScreen7+ | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. |
-| focusable7+ | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. |
-| touchable7+ | boolean | Yes | No | Whether the window is touchable. The default value is **true**. |
-| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
-| dimBehindValue7+ | 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.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
-| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
-| isPrivacyMode7+ | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
-| isRoundCorner7+ | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
-| isTransparent7+ | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
+| Name | Type | Readable| Writable| Description |
+| ------------------------------- | ------------------------- | ---- | ---- | -------------------------------------------- |
+| windowRect7+ | [Rect](#rect) | Yes | Yes | Window size. |
+| type7+ | [WindowType](#windowtype) | Yes | Yes | Window type. |
+| isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. |
+| isLayoutFullScreen7+ | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. |
+| focusable7+ | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. |
+| touchable7+ | boolean | Yes | No | Whether the window is touchable. The default value is **true**. |
+| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness. |
+| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**. |
+| isPrivacyMode7+ | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**. |
+| isRoundCorner7+ | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**. |
+| isTransparent7+ | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**. |
## ColorSpace8+
@@ -174,11 +174,11 @@ This API is discarded since API version 8. You are advised to use [window.create
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | -------------------------- |
- | id | string | Yes | Window ID. |
- | type | [WindowType](#windowtype) | Yes | Window type. |
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the subwindow created.|
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | -------------------------- |
+| id | string | Yes | Window ID. |
+| type | [WindowType](#windowtype) | Yes | Window type. |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the subwindow created.|
**Example**
@@ -207,16 +207,16 @@ This API is discarded since API version 8. You are advised to use [window.create
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------------------------- | ---- | ---------- |
- | id | string | Yes | Window ID. |
- | type | [WindowType](#windowtype) | Yes | Window type.|
+| Name| Type | Mandatory| Description |
+| ------ | ------------------------- | ---- | ---------- |
+| id | string | Yes | Window ID. |
+| type | [WindowType](#windowtype) | Yes | Window type.|
**Return value**
- | Type | Description |
- | -------------------------------- | ------------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the subwindow created.|
+| Type | Description |
+| -------------------------------- | ------------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the subwindow created.|
**Example**
@@ -237,18 +237,18 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback<Wi
Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses an asynchronous callback to return the result.
-Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md), starting from API version 9. This API uses an asynchronous callback to return the result.
+Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md). This API uses an asynchronous callback to return the result. It is valid since API version 9.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
- | ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
- | id | string | Yes | Window ID. |
- | type | [WindowType](#windowtype) | Yes | Window type. |
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the window created. |
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
+| ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
+| id | string | Yes | Window ID. |
+| type | [WindowType](#windowtype) | Yes | Window type. |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the window created. |
**Example**
@@ -271,23 +271,23 @@ create(ctx: Context, id: string, type: WindowType): Promise<Window>
Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses a promise to return the result.
-Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md), starting from API version 9. This API uses a promise to return the result.
+Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md). This API uses a promise to return the result. It is valid since API version 9.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------------------------- | ---- | ------------------------------------------------------------ |
- | ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
- | id | string | Yes | Window ID. |
- | type | [WindowType](#windowtype) | Yes | Window type. |
+| Name| Type | Mandatory| Description |
+| ------ | ------------------------- | ---- | ------------------------------------------------------------ |
+| ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
+| id | string | Yes | Window ID. |
+| type | [WindowType](#windowtype) | Yes | Window type. |
**Return value**
- | Type | Description |
- | -------------------------------- | ----------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the window created.|
+| Type | Description |
+| -------------------------------- | ----------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the window created.|
**Example**
@@ -312,10 +312,10 @@ Finds a window based on the ID. This API uses an asynchronous callback to return
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | ---------------------------- |
- | id | string | Yes | Window ID. |
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the window found.|
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | ---------------------------- |
+| id | string | Yes | Window ID. |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the window found.|
**Example**
@@ -341,15 +341,15 @@ Finds a window based on the ID. This API uses a promise to return the result.
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | -------- |
- | id | string | Yes | Window ID.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------- |
+| id | string | Yes | Window ID.|
**Return value**
- | Type | Description |
- | -------------------------------- | ----------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the window found.|
+| Type | Description |
+| -------------------------------- | ----------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the window found.|
**Example**
@@ -376,9 +376,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | -------------------------------------- |
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the top window obtained.|
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | -------------------------------------- |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the top window obtained.|
**Example**
@@ -406,9 +406,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop
**Return value**
- | Type | Description |
- | -------------------------------- | --------------------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the top window obtained.|
+| Type | Description |
+| -------------------------------- | --------------------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the top window obtained.|
**Example**
@@ -433,10 +433,10 @@ Obtains the top window of the current application. This API uses an asynchronous
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
- | ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the top window obtained. |
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
+| ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the top window obtained. |
**Example**
@@ -462,15 +462,15 @@ Obtains the top window of the current application. This API uses a promise to re
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------- | ---- | ------------------------------------------------------------ |
- | ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
+| Name| Type | Mandatory| Description |
+| ------ | ------- | ---- | ------------------------------------------------------------ |
+| ctx | Context | Yes | Current application context.
For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).
For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
**Return value**
- | Type | Description |
- | -------------------------------- | --------------------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the top window obtained.|
+| Type | Description |
+| -------------------------------- | --------------------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the top window obtained.|
**Example**
@@ -497,10 +497,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **systemBarTintChange**, indicating the property change event of the status bar and navigation bar.|
- | callback | Callback<[SystemBarTintState](#systembartintstate)> | Yes | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **systemBarTintChange**, indicating the property change event of the status bar and navigation bar.|
+| callback | Callback<[SystemBarTintState](#systembartintstate)> | Yes | Callback used to return the information. |
**Example**
@@ -523,10 +523,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **systemBarTintChange**, indicating the property change event of the status bar and navigation bar.|
- | callback | Callback<[SystemBarTintState](#systembartintstate)> | No | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------------------------------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **systemBarTintChange**, indicating the property change event of the status bar and navigation bar.|
+| callback | Callback<[SystemBarTintState](#systembartintstate)> | No | Callback used to return the information. |
**Example**
@@ -551,9 +551,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | ---------- |
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
**Example**
@@ -579,9 +579,9 @@ This is a system API and cannot be called by third-party applications.
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -604,9 +604,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 execution result.|
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
**Example**
@@ -630,9 +630,9 @@ Shows this window. This API uses a promise to return the result.
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -655,9 +655,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 execution result.|
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
**Example**
@@ -681,9 +681,9 @@ Destroys this window. This API uses a promise to return the result.
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -700,17 +700,17 @@ Destroys this window. This API uses a promise to return the result.
moveTo(x: number, y: number, callback: AsyncCallback<void>): void
-Moves the position of this window. This API uses an asynchronous callback to return the result.
+Moves this window. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | --------------------------------------- |
- | x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
- | y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | --------------------------------------- |
+| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
+| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -729,22 +729,22 @@ Moves the position of this window. This API uses an asynchronous callback to ret
moveTo(x: number, y: number): Promise<void>
-Moves the position of this window. This API uses a promise to return the result.
+Moves this window. This API uses a promise to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | --------------------------------------- |
- | x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
- | y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | --------------------------------------- |
+| x | number | Yes | Distance that the window moves along the x-axis. A positive value indicates that the window moves to the right.|
+| y | number | Yes | Distance that the window moves along the y-axis. A positive value indicates that the window moves downwards.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -767,11 +767,11 @@ Changes the size of this window. This API uses an asynchronous callback to retur
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | ---------------- |
- | width | number | Yes | New width of the window.|
- | height | number | Yes | New height of the window.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------------- |
+| width | number | Yes | New width of the window.|
+| height | number | Yes | New height of the window.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -795,16 +795,16 @@ Changes the size of this window. This API uses a promise to return the result.
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | ---------------- |
- | width | number | Yes | New width of the window.|
- | height | number | Yes | New height of the window.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ---------------- |
+| width | number | Yes | New width of the window.|
+| height | number | Yes | New height of the window.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -829,10 +829,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | ---------- |
- | type | [WindowType](#windowtype) | Yes | Window type.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ---------- |
+| type | [WindowType](#windowtype) | Yes | Window type.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result.|
**Example**
@@ -859,15 +859,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------------------------- | ---- | ---------- |
- | type | [WindowType](#windowtype) | Yes | Window type.|
+| Name| Type | Mandatory| Description |
+| ------ | ------------------------- | ---- | ---------- |
+| type | [WindowType](#windowtype) | Yes | Window type.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -891,9 +891,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**
@@ -917,9 +917,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**
@@ -942,10 +942,10 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------------- | ---- | ------------------------------------------------------------ |
- | type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
- | callback | AsyncCallback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the area. |
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------------- | ---- | ------------------------------------------------------------ |
+| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
+| callback | AsyncCallback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the area. |
**Example**
@@ -970,15 +970,15 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------------------------------- | ---- | ------------------------------------------------------------ |
- | type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
+| Name| Type | Mandatory| Description |
+| ------ | ------------------------------- | ---- | ------------------------------------------------------------ |
+| type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
**Return value**
- | Type | Description |
- | -------------------------------------- | --------------------------------------------- |
- | Promise<[AvoidArea](#avoidarea)> | Promise used to return the area.|
+| Type | Description |
+| -------------------------------------- | --------------------------------------------- |
+| Promise<[AvoidArea](#avoidarea)> | Promise used to return the area.|
**Example**
@@ -1001,10 +1001,10 @@ Sets whether to enable the full-screen mode for this window. This API uses an as
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------ | ------------------------- | ---- | ---------------------------------------------- |
- | isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ------------ | ------------------------- | ---- | ---------------------------------------------- |
+| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1029,15 +1029,15 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------ | ------- | ---- | ---------------------------------------------- |
- | isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
+| Name | Type | Mandatory| Description |
+| ------------ | ------- | ---- | ---------------------------------------------- |
+| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1055,16 +1055,16 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro
setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback<void>): void
-Sets whether the window layout is in full-screen mode. 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.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------------ | ------------------------- | ---- | ------------------------------------------------------------ |
- | isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ------------------ | ------------------------- | ---- | ------------------------------------------------------------ |
+| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1083,21 +1083,21 @@ Sets whether the window layout is in full-screen mode. This API uses an asynchro
setLayoutFullScreen(isLayoutFullScreen: boolean): Promise<void>
-Sets whether the window layout is in full-screen mode. 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.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------------ | ------- | ---- | ------------------------------------------------------------ |
- | isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
+| Name | Type | Mandatory| Description |
+| ------------------ | ------- | ---- | ------------------------------------------------------------ |
+| isLayoutFullScreen | boolean | Yes | Whether to enable the full-screen mode for the window layout, in which the status bar and navigation bar are displayed.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1121,10 +1121,10 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | ------------------------------------------------------------ |
- | names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
+| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1149,15 +1149,15 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ----- | ---- | ------------------------------------------------------------ |
- | names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
+| Name| Type | Mandatory| Description |
+| ------ | ----- | ---- | ------------------------------------------------------------ |
+| names | Array | Yes | Whether to display the status bar and navigation bar. For example, to display the status bar and navigation bar, set this parameter to **["status", "navigation"]**. By default, they are not displayed.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1181,10 +1181,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 execution 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 execution result. |
**Example**
@@ -1218,15 +1218,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 used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1259,10 +1259,10 @@ Loads content to this window. This API uses an asynchronous callback to return t
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | -------------------- |
- | path | string | Yes | Path of the page from which the content will be loaded.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | -------------------- |
+| path | string | Yes | Path of the page from which the content will be loaded.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1286,15 +1286,15 @@ Loads content to this window. This API uses a promise to return the result.
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | -------------------- |
- | path | string | Yes | Path of the page from which the content will be loaded.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------------- |
+| path | string | Yes | Path of the page from which the content will be loaded.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1317,9 +1317,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 whether the window is displayed.|
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------- | ---- | -------------------------------- |
+| callback | AsyncCallback<boolean> | Yes | Callback used to return whether the window is displayed.|
**Example**
@@ -1343,9 +1343,9 @@ Checks whether this window is displayed. This API uses a promise to return the r
**Return value**
- | Type | Description |
- | ---------------------- | ----------------------------------------------------- |
- | Promise<boolean> | Promise used to return whether the window is displayed.|
+| Type | Description |
+| ---------------------- | ----------------------------------------------------- |
+| Promise<boolean> | Promise used to return whether the window is displayed.|
**Example**
@@ -1368,10 +1368,10 @@ Enables listening for window size changes.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ----------------------------- | ---- | -------------------------------------------------------- |
- | type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
- | callback | Callback<[Size](#size)> | Yes | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ----------------------------- | ---- | -------------------------------------------------------- |
+| type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
+| callback | Callback<[Size](#size)> | Yes | Callback used to return the information. |
**Example**
@@ -1392,10 +1392,10 @@ Disables listening for window size changes.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ----------------------------- | ---- | -------------------------------------------------------- |
- | type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
- | callback | Callback<[Size](#size)> | No | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ----------------------------- | ---- | -------------------------------------------------------- |
+| type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
+| callback | Callback<[Size](#size)> | No | Callback used to return the information. |
**Example**
@@ -1414,10 +1414,10 @@ Enables listening for changes to the area where the window cannot be displayed.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **systemAvoidAreaChange**, indicating the event of changes to the area where the window cannot be displayed.|
- | callback | Callback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **systemAvoidAreaChange**, indicating the event of changes to the area where the window cannot be displayed.|
+| callback | Callback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the information. |
**Example**
@@ -1438,10 +1438,10 @@ Disables listening for changes to the area where the window cannot be displayed.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **systemAvoidAreaChange**, indicating the event of changes to the area where the window cannot be displayed.|
- | callback | Callback<[AvoidArea](#avoidarea)> | No | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | --------------------------------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **systemAvoidAreaChange**, indicating the event of changes to the area where the window cannot be displayed.|
+| callback | Callback<[AvoidArea](#avoidarea)> | No | Callback used to return the information. |
**Example**
@@ -1456,16 +1456,14 @@ on(type: 'keyboardHeightChange', callback: Callback<number>): void
Enables listening for keyboard height changes.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------ | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
- | callback | Callbacknumber> | Yes | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
+| callback | Callbacknumber> | Yes | Callback used to return the information. |
**Example**
@@ -1482,16 +1480,14 @@ off(type: 'keyboardHeightChange', callback?: Callback<number>): void
Disables listening for keyboard height changes.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ---------------------- | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
- | callback | Callback<number> | No | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------- | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
+| callback | Callback<number> | No | Callback used to return the information. |
**Example**
@@ -1510,9 +1506,9 @@ Checks whether this window supports the wide color gamut mode. This API uses an
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ---------------------------- | ---- | -------------------------------- |
- | callback | AsyncCallback<boolean> | Yes | Callback used to return whether the wide color gamut mode is supported.|
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------- | ---- | -------------------------------- |
+| callback | AsyncCallback<boolean> | Yes | Callback used to return whether the wide color gamut mode is supported.|
**Example**
@@ -1536,9 +1532,9 @@ Checks whether this window supports the wide color gamut mode. This API uses a p
**Return value**
- | Type | Description |
- | ---------------------- | ------------------------------------------------------------ |
- | Promise<boolean> | Promise used to return whether the wide color gamut mode is supported.|
+| Type | Description |
+| ---------------------- | ------------------------------------------------------------ |
+| Promise<boolean> | Promise used to return whether the wide color gamut mode is supported.|
**Example**
@@ -1561,10 +1557,10 @@ Sets this window to the wide or default color gamut mode. This API uses an async
**Parameters**
- | Name | Type | Mandatory| Description |
- | ---------- | ------------------------- | ---- | ------------ |
- | colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ---------- | ------------------------- | ---- | ------------ |
+| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1588,15 +1584,15 @@ Sets this window to the wide or default color gamut mode. This API uses a promis
**Parameters**
- | Name | Type | Mandatory| Description |
- | ---------- | ------------------------- | ---- | ------------ |
- | colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
+| Name | Type | Mandatory| Description |
+| ---------- | ------------------------- | ---- | ------------ |
+| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1619,9 +1615,9 @@ Obtains the color gamut mode of this window. This API uses an asynchronous callb
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ---------------------------------------------- | ---- | -------------------------- |
- | callback | AsyncCallback<[ColorSpace](#colorspace)> | Yes | Callback used to return the color gamut mode obtained.|
+| Name | Type | Mandatory| Description |
+| -------- | ---------------------------------------------- | ---- | -------------------------- |
+| callback | AsyncCallback<[ColorSpace](#colorspace)> | Yes | Callback used to return the color gamut mode obtained.|
**Example**
@@ -1645,9 +1641,9 @@ Obtains the color gamut mode of this window. This API uses a promise to return t
**Return value**
- | Type | Description |
- | ---------------------------------------- | ----------------------------------------- |
- | Promise<[ColorSpace](#colorspace)> | Promise used to return the color gamut mode obtained.|
+| Type | Description |
+| ---------------------------------------- | ----------------------------------------- |
+| Promise<[ColorSpace](#colorspace)> | Promise used to return the color gamut mode obtained.|
**Example**
@@ -1666,16 +1662,14 @@ setBackgroundColor(color: string, callback: AsyncCallback<void>): void
Sets the background color for this window. This API uses an asynchronous callback to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | ------------------------------------------------------------ |
- | color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | ------------------------------------------------------------ |
+| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1696,21 +1690,19 @@ setBackgroundColor(color: string): Promise<void>
Sets the background color for this window. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | ------------------------------------------------------------ |
- | color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ------------------------------------------------------------ |
+| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1730,16 +1722,14 @@ setBrightness(brightness: number, callback: AsyncCallback<void>): void
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**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 execution result. |
+| Name | Type | Mandatory| Description |
+| ---------- | ------------------------- | ---- | ------------------------------------ |
+| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1760,21 +1750,19 @@ setBrightness(brightness: number): Promise<void>
Sets the screen brightness for this window. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**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 used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1788,84 +1776,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
});
```
-### setDimBehind7+
-
-setDimBehind(dimBehindValue: number, callback: AsyncCallback<void>): void
-
-Sets the dimness of the window that is not on top. This API uses an asynchronous callback to return the result.
-
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
-**System capability**: SystemCapability.WindowManager.WindowManager.Core
-
-**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 execution result. |
-
-**Example**
-
- ```js
- windowClass.setDimBehind(0.5, (err, data) => {
- if (err.code) {
- console.error('Failed to set the dimness. Cause: ' + JSON.stringify(err));
- return;
- }
- console.info('Succeeded in setting the dimness. Data:' + JSON.stringify(data));
- });
- ```
-
-### setDimBehind7+
-
-setDimBehind(dimBehindValue: number): Promise<void>
-
-Sets the dimness of the window that is not on top. This API uses a promise to return the result.
-
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
-**System capability**: SystemCapability.WindowManager.WindowManager.Core
-
-**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.|
-
-**Return value**
-
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
-
-**Example**
-
- ```js
- let promise = windowClass.setDimBehind(0.5);
- promise.then((data)=> {
- console.info('Succeeded in setting the dimness. Data: ' + JSON.stringify(data))
- }).catch((err)=>{
- console.error('Failed to set the dimness. Cause: ' + JSON.stringify(err));
- });
- ```
-
### setFocusable7+
setFocusable(isFocusable: boolean, callback: AsyncCallback<void>): void
Sets whether this window can gain focus. This API uses an asynchronous callback to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ----------- | ------------------------- | ---- | ---------------------------- |
- | isFocusable | boolean | Yes | Whether the window can gain focus.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------------------------- | ---- | ---------------------------- |
+| isFocusable | boolean | Yes | Whether the window can gain focus.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1886,21 +1810,19 @@ setFocusable(isFocusable: boolean): Promise<void>
Sets whether this window can gain focus. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ----------- | ------- | ---- | ---------------------------- |
- | isFocusable | boolean | Yes | Whether the window can gain focus.|
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | ---------------------------- |
+| isFocusable | boolean | Yes | Whether the window can gain focus.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1920,16 +1842,14 @@ 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.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------------- | ------------------------- | ---- | ------------------------ |
- | isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------------- | ------------------------- | ---- | ------------------------ |
+| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1950,21 +1870,19 @@ setKeepScreenOn(isKeepScreenOn: boolean): Promise<void>
Sets whether to keep the screen always on. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------------- | ------- | ---- | ------------------------ |
- | isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
+| Name | Type | Mandatory| Description |
+| -------------- | ------- | ---- | ------------------------ |
+| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -1978,84 +1896,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
});
```
-### setOutsideTouchable7+
-
-setOutsideTouchable(touchable: boolean, callback: AsyncCallback<void>): void
-
-Sets whether the area outside the subwindow is touchable. This API uses an asynchronous callback to return the result.
-
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
-**System capability**: SystemCapability.WindowManager.WindowManager.Core
-
-**Parameters**
-
- | Name | Type | Mandatory| Description |
- | --------- | ------------------------- | ---- | ---------------- |
- | touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
-
-**Example**
-
- ```js
- windowClass.setOutsideTouchable(true, (err, data) => {
- if (err.code) {
- console.error('Failed to set the area to be touchable. Cause: ' + JSON.stringify(err));
- return;
- }
- console.info('Succeeded in setting the area to be touchable. Data: ' + JSON.stringify(data))
- })
- ```
-
-### setOutsideTouchable7+
-
-setOutsideTouchable(touchable: boolean): Promise<void>
-
-Sets whether the area outside the subwindow is touchable. This API uses a promise to return the result.
-
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
-**System capability**: SystemCapability.WindowManager.WindowManager.Core
-
-**Parameters**
-
- | Name | Type | Mandatory| Description |
- | --------- | ------- | ---- | ---------------- |
- | touchable | boolean | Yes | Whether the area outside the subwindow is touchable. The value **true** means that such an area is touchable, and **false** means the opposite.|
-
-**Return value**
-
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
-
-**Example**
-
- ```js
- let promise = windowClass.setOutsideTouchable(true);
- promise.then((data)=> {
- console.info('Succeeded in setting the area to be touchable. Data: ' + JSON.stringify(data))
- }).catch((err)=>{
- console.error('Failed to set the area to be touchable. Cause: ' + JSON.stringify(err));
- });
- ```
-
### setPrivacyMode7+
setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void
Sets whether this window is in privacy mode. This API uses an asynchronous callback to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------- | ------------------------- | ---- | -------------------- |
- | isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ------------- | ------------------------- | ---- | -------------------- |
+| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -2077,21 +1931,19 @@ setPrivacyMode(isPrivacyMode: boolean): Promise<void>
Sets whether this window is in privacy mode. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ------------- | ------- | ---- | -------------------- |
- | isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
+| Name | Type | Mandatory| Description |
+| ------------- | ------- | ---- | -------------------- |
+| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -2111,16 +1963,14 @@ setTouchable(isTouchable: boolean, callback: AsyncCallback<void>): void
Sets whether this window is touchable. This API uses an asynchronous callback to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ----------- | ------------------------- | ---- | -------------------- |
- | isTouchable | boolean | Yes | Whether the window is touchable.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| ----------- | ------------------------- | ---- | -------------------- |
+| isTouchable | boolean | Yes | Whether the window is touchable.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -2142,21 +1992,19 @@ setTouchable(isTouchable: boolean): Promise<void>
Sets whether this window is touchable. This API uses a promise to return the result.
-This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
-
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
- | Name | Type | Mandatory| Description |
- | ----------- | ------- | ---- | -------------------- |
- | isTouchable | boolean | Yes | Whether the window is touchable.|
+| Name | Type | Mandatory| Description |
+| ----------- | ------- | ---- | -------------------- |
+| isTouchable | boolean | Yes | Whether the window is touchable.|
**Return value**
- | Type | Description |
- | ------------------- | ----------------------------------------------- |
- | Promise<void> | Promise used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -2197,9 +2045,9 @@ 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.|
**Example**
@@ -2229,9 +2077,9 @@ 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.|
**Example**
@@ -2262,15 +2110,15 @@ Creates a subwindow for this window stage. This API uses a promise to return the
**Parameters**
- | Name| Type | Mandatory| Description |
- | ------ | ------ | ---- | -------------- |
- | name | String | Yes | Name of the subwindow.|
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | -------------- |
+| name | String | Yes | Name of the subwindow.|
**Return value**
- | Type | Description |
- | -------------------------------- | ------------------------------------------------- |
- | Promise<[Window](#window)> | Promise used to return the subwindow created.|
+| Type | Description |
+| -------------------------------- | ------------------------------------------------- |
+| Promise<[Window](#window)> | Promise used to return the subwindow created.|
**Example**
@@ -2300,10 +2148,10 @@ Creates a subwindow for this window stage. This API uses an asynchronous callbac
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | -------------------------------------- | ---- | ------------------------------ |
- | name | String | Yes | Name of the subwindow. |
- | callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the subwindow created.|
+| Name | Type | Mandatory| Description |
+| -------- | -------------------------------------- | ---- | ------------------------------ |
+| name | String | Yes | Name of the subwindow. |
+| callback | AsyncCallback<[Window](#window)> | Yes | Callback used to return the subwindow created.|
**Example**
@@ -2335,9 +2183,9 @@ 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.|
**Example**
@@ -2367,9 +2215,9 @@ 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.|
**Example**
@@ -2400,10 +2248,10 @@ Loads content to this window stage. This API uses an asynchronous callback to re
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------- | ---- | -------------------- |
- | path | string | Yes | Path of the page from which the content will be loaded.|
- | callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------- | ---- | -------------------- |
+| path | string | Yes | Path of the page from which the content will be loaded.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -2432,10 +2280,10 @@ Enables listening for window stage lifecycle changes.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
- | callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | Yes | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
+| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | Yes | Callback used to return the information. |
**Example**
@@ -2461,10 +2309,10 @@ Disables listening for window stage lifecycle changes.
**Parameters**
- | Name | Type | Mandatory| Description |
- | -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
- | type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
- | callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | No | Callback used to return the information. |
+| Name | Type | Mandatory| Description |
+| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
+| type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
+| callback | Callback<[WindowStageEventType](#windowstageeventtype9)> | No | Callback used to return the information. |
**Example**