diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md
index d8ab1e261b3b4f21c079cbbccc4b62782db2de3b..4f2cb43b9197f866bd9f3a9f8c03bc9125098964 100644
--- a/en/application-dev/reference/apis/js-apis-window.md
+++ b/en/application-dev/reference/apis/js-apis-window.md
@@ -2,10 +2,11 @@
The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes.
-> **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.
+> **NOTE**
>
-> API version 9 is a canary version for trial use. The APIs of this version may be unstable.
+> 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.
+>
+> API version 9 is a canary version for trial use. The APIs of this version may be unstable.
## Modules to Import
@@ -59,10 +60,10 @@ Describes the properties of the status bar and navigation bar.
| Name | Type| Readable| Writable| Description |
| -------------------------------------- | -------- | ---- | ---- | ------------------------------------------------------------ |
-| statusBarColor | string | Yes | Yes | Background color of the status bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
+| statusBarColor | string | Yes | Yes | Background color of the status bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **\#00FF00** or **\#FF00FF00**.|
| isStatusBarLightIcon7+ | boolean | No | Yes | Whether any icon on the status bar is highlighted. |
| statusBarContentColor8+ | string | No | Yes | Color of the text on the status bar. |
-| navigationBarColor | string | Yes | Yes | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
+| navigationBarColor | string | Yes | Yes | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **\#00FF00** or **\#FF00FF00**.|
| isNavigationBarLightIcon7+ | boolean | No | No | Whether any icon on the navigation bar is highlighted. |
| navigationBarContentColor8+ | string | No | Yes | Color of the text on the navigation bar. |
@@ -79,7 +80,7 @@ This is a system API and cannot be called by third-party applications.
| type | [WindowType](#windowtype) | Yes | Yes | Type of the system bar whose properties are changed. Only the navigation bar and status bar are supported.|
| isEnable | boolean | Yes | Yes | Whether the system bar is displayed. |
| region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. |
-| backgroundColor | string | Yes | Yes | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.|
+| backgroundColor | string | Yes | Yes | Background color of the system bar. The value is a hexadecimal RGB or aRGB color value and is case insensitive, for example, **\#00FF00** or **\#FF00FF00**.|
| contentColor | string | Yes | Yes | Color of the text on the system bar. |
## SystemBarTintState8+
@@ -138,20 +139,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+
@@ -176,11 +176,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**
@@ -209,16 +209,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**
@@ -239,18 +239,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**
@@ -273,23 +273,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**
@@ -314,10 +314,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**
@@ -343,15 +343,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**
@@ -378,9 +378,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**
@@ -408,9 +408,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**
@@ -435,10 +435,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**
@@ -464,15 +464,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**
@@ -499,10 +499,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**
@@ -525,10 +525,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**
@@ -553,9 +553,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**
@@ -581,9 +581,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**
@@ -606,9 +606,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**
@@ -632,9 +632,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**
@@ -657,9 +657,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**
@@ -683,9 +683,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**
@@ -702,17 +702,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, 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 execution result. |
**Example**
@@ -731,22 +731,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, 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 used to return the execution result.|
+| Type | Description |
+| ------------------- | ----------------------------------------------- |
+| Promise<void> | Promise used to return the execution result.|
**Example**
@@ -769,11 +769,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, in px.|
+| height | number | Yes | New height of the window, in px.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -797,16 +797,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, in px.|
+| height | number | Yes | New height of the window, in px.|
**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**
@@ -831,10 +831,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**
@@ -861,15 +861,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**
@@ -893,9 +893,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**
@@ -919,9 +919,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**
@@ -944,10 +944,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**
@@ -972,15 +972,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**
@@ -1003,10 +1003,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**
@@ -1031,15 +1031,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**
@@ -1057,16 +1057,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 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. |
**Example**
@@ -1085,21 +1085,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 the window layout is in full-screen mode, 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**
@@ -1123,10 +1123,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**
@@ -1151,15 +1151,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**
@@ -1183,10 +1183,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**
@@ -1220,15 +1220,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**
@@ -1261,10 +1261,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**
@@ -1288,15 +1288,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**
@@ -1319,9 +1319,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**
@@ -1345,9 +1345,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**
@@ -1370,10 +1370,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**
@@ -1394,10 +1394,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**
@@ -1416,10 +1416,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**
@@ -1440,10 +1440,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**
@@ -1458,16 +1458,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**
@@ -1484,16 +1482,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**
@@ -1512,9 +1508,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**
@@ -1538,9 +1534,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**
@@ -1563,10 +1559,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**
@@ -1590,15 +1586,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**
@@ -1607,7 +1603,7 @@ Sets this window to the wide or default color gamut mode. This API uses a promis
promise.then((data)=> {
console.info('Succeeded in setting window colorspace. Data: ' + JSON.stringify(data))
}).catch((err)=>{
- console.error('Failed to set window colorspacet. Cause: ' + JSON.stringify(err));
+ console.error('Failed to set window colorspace. Cause: ' + JSON.stringify(err));
});
```
@@ -1621,19 +1617,19 @@ 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**
```js
windowClass.getColorSpace((err, data) => {
if (err.code) {
- console.error('Failed to get window color space. Cause:' + JSON.stringify(err));
+ console.error('Failed to get window colorspace. Cause:' + JSON.stringify(err));
return;
}
- console.info('Succeeded in getting window color space. Cause:' + JSON.stringify(data))
+ console.info('Succeeded in getting window colorspace. Cause:' + JSON.stringify(data))
})
```
@@ -1647,9 +1643,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**
@@ -1658,7 +1654,7 @@ Obtains the color gamut mode of this window. This API uses a promise to return t
promise.then((data)=> {
console.info('Succeeded in getting window color space. Cause:' + JSON.stringify(data))
}).catch((err)=>{
- console.error('Failed to set window colorspacet. Cause: ' + JSON.stringify(err));
+ console.error('Failed to get window colorspace. Cause: ' + JSON.stringify(err));
});
```
@@ -1668,16 +1664,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 value is a hexadecimal color value and is case insensitive, for example, **#00FF00** or **#FF00FF00**.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1698,21 +1692,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 value is a hexadecimal color value and is case insensitive, 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**
@@ -1732,16 +1724,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**
@@ -1762,21 +1752,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**
@@ -1790,84 +1778,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**
@@ -1888,21 +1812,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**
@@ -1922,16 +1844,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 | Sets whether to keep the screen always on.|
+| callback | AsyncCallback<void> | Yes | Callback used to return the execution result. |
**Example**
@@ -1952,21 +1872,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 | Sets 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**
@@ -1980,84 +1898,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**
@@ -2079,21 +1933,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**
@@ -2113,16 +1965,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**
@@ -2144,21 +1994,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**
@@ -2199,9 +2047,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**
@@ -2231,9 +2079,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**
@@ -2264,15 +2112,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**
@@ -2302,10 +2150,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**
@@ -2337,9 +2185,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**
@@ -2369,9 +2217,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**
@@ -2402,10 +2250,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**
@@ -2434,10 +2282,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**
@@ -2463,10 +2311,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**