未验证 提交 d1cb1e12 编写于 作者: O openharmony_ci 提交者: Gitee

!4573 翻译完成:4196 release分支:window空接口实现删除空接口说明&快速入门DX意见修改

Merge pull request !4573 from wusongqing/TR4196
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes. The **Window** module provides basic capabilities for managing windows, including creating and destroying windows and setting serial port attributes.
> **NOTE**<br/> > **NOTE**<br/>
> 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. > 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 ## Modules to Import
...@@ -59,10 +60,10 @@ Describes the properties of the status bar and navigation bar. ...@@ -59,10 +60,10 @@ Describes the properties of the status bar and navigation bar.
| Name | Type| Readable| Writable| Description | | 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**.|
| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the status bar is highlighted. | | isStatusBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the status bar is highlighted. |
| statusBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the status bar. | | statusBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the status bar. |
| navigationBarColor | string | Yes | Yes | Background color of the navigation bar. The value is a hexadecimal RGB or aRGB color value, for example, **\#00FF00** or **\#FF00FF00**.| | 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**.|
| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | No | Whether any icon on the navigation bar is highlighted. | | isNavigationBarLightIcon<sup>7+</sup> | boolean | No | No | Whether any icon on the navigation bar is highlighted. |
| navigationBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the navigation bar. | | navigationBarContentColor<sup>8+</sup> | 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. ...@@ -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.| | 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. | | isEnable | boolean | Yes | Yes | Whether the system bar is displayed. |
| region | [Rect](#rect) | Yes | Yes | Current position and size of the system bar. | | 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. | | contentColor | string | Yes | Yes | Color of the text on the system bar. |
## SystemBarTintState<sup>8+</sup> ## SystemBarTintState<sup>8+</sup>
...@@ -138,20 +139,19 @@ Describes the window properties. ...@@ -138,20 +139,19 @@ Describes the window properties.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ------------------------------- | ------------------------- | ---- | ---- | ------------------------------------------------------------ | | ------------------------------- | ------------------------- | ---- | ---- | -------------------------------------------- |
| windowRect<sup>7+</sup> | [Rect](#rect) | Yes | Yes | Window size. | | windowRect<sup>7+</sup> | [Rect](#rect) | Yes | Yes | Window size. |
| type<sup>7+</sup> | [WindowType](#windowtype) | Yes | Yes | Window type. | | type<sup>7+</sup> | [WindowType](#windowtype) | Yes | Yes | Window type. |
| isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. | | isFullScreen | boolean | Yes | Yes | Whether the window is displayed in full screen mode. The default value is **false**. |
| isLayoutFullScreen<sup>7+</sup> | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. | | isLayoutFullScreen<sup>7+</sup> | boolean | Yes | Yes | Whether the window layout is in full-screen mode (whether the window is immersive). The default value is **false**. |
| focusable<sup>7+</sup> | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. | | focusable<sup>7+</sup> | boolean | Yes | No | Whether the window can gain focus. The default value is **true**. |
| touchable<sup>7+</sup> | boolean | Yes | No | Whether the window is touchable. The default value is **true**. | | touchable<sup>7+</sup> | boolean | Yes | No | Whether the window is touchable. The default value is **true**. |
| brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.| | brightness | number | Yes | Yes | Screen brightness. The value ranges from 0 to 1. The value **1** indicates the maximum brightness. |
| dimBehindValue<sup>7+</sup> | number | Yes | Yes | Dimness of the window that is not on top. The value ranges from 0 to 1. The value **1** indicates the maximum dimness.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.| | isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**. |
| isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.| | isPrivacyMode<sup>7+</sup> | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**. |
| isPrivacyMode<sup>7+</sup> | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.| | isRoundCorner<sup>7+</sup> | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**. |
| isRoundCorner<sup>7+</sup> | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.| | isTransparent<sup>7+</sup> | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**. |
| isTransparent<sup>7+</sup> | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
## ColorSpace<sup>8+</sup> ## ColorSpace<sup>8+</sup>
...@@ -176,11 +176,11 @@ This API is discarded since API version 8. You are advised to use [window.create ...@@ -176,11 +176,11 @@ This API is discarded since API version 8. You are advised to use [window.create
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | -------------------------- | | -------- | -------------------------------------- | ---- | -------------------------- |
| id | string | Yes | Window ID. | | id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. | | type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.| | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.|
**Example** **Example**
...@@ -209,16 +209,16 @@ This API is discarded since API version 8. You are advised to use [window.create ...@@ -209,16 +209,16 @@ This API is discarded since API version 8. You are advised to use [window.create
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ---------- | | ------ | ------------------------- | ---- | ---------- |
| id | string | Yes | Window ID. | | id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type.| | type | [WindowType](#windowtype) | Yes | Window type.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | ------------------------------------------------- | | -------------------------------- | ------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.| | Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.|
**Example** **Example**
...@@ -239,18 +239,18 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback&lt;Wi ...@@ -239,18 +239,18 @@ create(ctx: Context, id: string, type: WindowType, callback: AsyncCallback&lt;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 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).| | ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
| id | string | Yes | Window ID. | | id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. | | type | [WindowType](#windowtype) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window created. | | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window created. |
**Example** **Example**
...@@ -273,23 +273,23 @@ create(ctx: Context, id: string, type: WindowType): Promise&lt;Window&gt; ...@@ -273,23 +273,23 @@ create(ctx: Context, id: string, type: WindowType): Promise&lt;Window&gt;
Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses a promise to return the result. Creates a subwindow when the context is [Context](js-apis-Context.md). This API uses a promise to return the result.
Creates a system window when the context is [ServiceExtensionContext](js-apis-service-extension-context.md), starting from API version 9. This API uses a promise to return the result. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ------------------------------------------------------------ | | ------ | ------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).| | ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-service-extension-context.md).|
| id | string | Yes | Window ID. | | id | string | Yes | Window ID. |
| type | [WindowType](#windowtype) | Yes | Window type. | | type | [WindowType](#windowtype) | Yes | Window type. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | ----------------------------------------------- | | -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the window created.| | Promise&lt;[Window](#window)&gt; | Promise used to return the window created.|
**Example** **Example**
...@@ -314,10 +314,10 @@ Finds a window based on the ID. This API uses an asynchronous callback to return ...@@ -314,10 +314,10 @@ Finds a window based on the ID. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ---------------------------- | | -------- | -------------------------------------- | ---- | ---------------------------- |
| id | string | Yes | Window ID. | | id | string | Yes | Window ID. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window found.| | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the window found.|
**Example** **Example**
...@@ -343,15 +343,15 @@ Finds a window based on the ID. This API uses a promise to return the result. ...@@ -343,15 +343,15 @@ Finds a window based on the ID. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------- | | ------ | ------ | ---- | -------- |
| id | string | Yes | Window ID.| | id | string | Yes | Window ID.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | ----------------------------------------------- | | -------------------------------- | ----------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the window found.| | Promise&lt;[Window](#window)&gt; | Promise used to return the window found.|
**Example** **Example**
...@@ -378,9 +378,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop ...@@ -378,9 +378,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | -------------------------------------- | | -------- | -------------------------------------- | ---- | -------------------------------------- |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained.| | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained.|
**Example** **Example**
...@@ -408,9 +408,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop ...@@ -408,9 +408,9 @@ This API is discarded since API version 8. You are advised to use [window.getTop
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | --------------------------------------------------------- | | -------------------------------- | --------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.| | Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.|
**Example** **Example**
...@@ -435,10 +435,10 @@ Obtains the top window of the current application. This API uses an asynchronous ...@@ -435,10 +435,10 @@ Obtains the top window of the current application. This API uses an asynchronous
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).| | ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. | | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. |
**Example** **Example**
...@@ -464,15 +464,15 @@ Obtains the top window of the current application. This API uses a promise to re ...@@ -464,15 +464,15 @@ Obtains the top window of the current application. This API uses a promise to re
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------- | ---- | ------------------------------------------------------------ | | ------ | ------- | ---- | ------------------------------------------------------------ |
| ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).| | ctx | Context | Yes | Current application context.<br>For the definition of **Context** of API version 8, see [Context](js-apis-Context.md).<br>For the definition of **Context** of API version 9, see [Context](js-apis-ability-context.md).|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | --------------------------------------------------------- | | -------------------------------- | --------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.| | Promise&lt;[Window](#window)&gt; | Promise used to return the top window obtained.|
**Example** **Example**
...@@ -499,10 +499,10 @@ This is a system API and cannot be called by third-party applications. ...@@ -499,10 +499,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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&lt;[SystemBarTintState](#systembartintstate)&gt; | Yes | Callback used to return the information. | | callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | Yes | Callback used to return the information. |
**Example** **Example**
...@@ -525,10 +525,10 @@ This is a system API and cannot be called by third-party applications. ...@@ -525,10 +525,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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&lt;[SystemBarTintState](#systembartintstate)&gt; | No | Callback used to return the information. | | callback | Callback&lt;[SystemBarTintState](#systembartintstate)&gt; | No | Callback used to return the information. |
**Example** **Example**
...@@ -553,9 +553,9 @@ This is a system API and cannot be called by third-party applications. ...@@ -553,9 +553,9 @@ This is a system API and cannot be called by third-party applications.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- | | -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
**Example** **Example**
...@@ -581,9 +581,9 @@ This is a system API and cannot be called by third-party applications. ...@@ -581,9 +581,9 @@ This is a system API and cannot be called by third-party applications.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -606,9 +606,9 @@ Shows this window. This API uses an asynchronous callback to return the result. ...@@ -606,9 +606,9 @@ Shows this window. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- | | -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
**Example** **Example**
...@@ -632,9 +632,9 @@ Shows this window. This API uses a promise to return the result. ...@@ -632,9 +632,9 @@ Shows this window. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -657,9 +657,9 @@ Destroys this window. This API uses an asynchronous callback to return the resul ...@@ -657,9 +657,9 @@ Destroys this window. This API uses an asynchronous callback to return the resul
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- | | -------- | ------------------------- | ---- | ---------- |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
**Example** **Example**
...@@ -683,9 +683,9 @@ Destroys this window. This API uses a promise to return the result. ...@@ -683,9 +683,9 @@ Destroys this window. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -702,17 +702,17 @@ Destroys this window. This API uses a promise to return the result. ...@@ -702,17 +702,17 @@ Destroys this window. This API uses a promise to return the result.
moveTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void moveTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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. A positive value indicates that the window moves downwards.| | 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&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -731,22 +731,22 @@ Moves the position of this window. This API uses an asynchronous callback to ret ...@@ -731,22 +731,22 @@ Moves the position of this window. This API uses an asynchronous callback to ret
moveTo(x: number, y: number): Promise&lt;void&gt; moveTo(x: number, y: number): Promise&lt;void&gt;
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | 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.| | 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. A positive value indicates that the window moves downwards.| | 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** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -769,11 +769,11 @@ Changes the size of this window. This API uses an asynchronous callback to retur ...@@ -769,11 +769,11 @@ Changes the size of this window. This API uses an asynchronous callback to retur
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------------- | | -------- | ------------------------- | ---- | -------------------------- |
| width | number | Yes | New width of the window.| | width | number | Yes | New width of the window, in px.|
| height | number | Yes | New height of the window.| | height | number | Yes | New height of the window, in px.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -797,16 +797,16 @@ Changes the size of this window. This API uses a promise to return the result. ...@@ -797,16 +797,16 @@ Changes the size of this window. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------- | | ------ | ------ | ---- | -------------------------- |
| width | number | Yes | New width of the window.| | width | number | Yes | New width of the window, in px.|
| height | number | Yes | New height of the window.| | height | number | Yes | New height of the window, in px.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -831,10 +831,10 @@ This is a system API and cannot be called by third-party applications. ...@@ -831,10 +831,10 @@ This is a system API and cannot be called by third-party applications.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ---------- | | -------- | ------------------------- | ---- | ---------- |
| type | [WindowType](#windowtype) | Yes | Window type.| | type | [WindowType](#windowtype) | Yes | Window type.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result.|
**Example** **Example**
...@@ -861,15 +861,15 @@ This is a system API and cannot be called by third-party applications. ...@@ -861,15 +861,15 @@ This is a system API and cannot be called by third-party applications.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ---------- | | ------ | ------------------------- | ---- | ---------- |
| type | [WindowType](#windowtype) | Yes | Window type.| | type | [WindowType](#windowtype) | Yes | Window type.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -893,9 +893,9 @@ Obtains the properties of this window. This API uses an asynchronous callback to ...@@ -893,9 +893,9 @@ Obtains the properties of this window. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------------------- | ---- | ------------------ | | -------- | ---------------------------------------------------------- | ---- | ------------------ |
| callback | AsyncCallback&lt;[WindowProperties](#windowproperties)&gt; | Yes | Callback used to return the window properties.| | callback | AsyncCallback&lt;[WindowProperties](#windowproperties)&gt; | Yes | Callback used to return the window properties.|
**Example** **Example**
...@@ -919,9 +919,9 @@ Obtains the properties of this window. This API uses a promise to return the res ...@@ -919,9 +919,9 @@ Obtains the properties of this window. This API uses a promise to return the res
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------------------- | ------------------------------------- | | ---------------------------------------------------- | ------------------------------------- |
| Promise&lt;[WindowProperties](#windowproperties)&gt; | Promise used to return the window properties.| | Promise&lt;[WindowProperties](#windowproperties)&gt; | Promise used to return the window properties.|
**Example** **Example**
...@@ -944,10 +944,10 @@ Obtains the area where this window cannot be displayed, for example, the system ...@@ -944,10 +944,10 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
| callback | AsyncCallback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the area. | | callback | AsyncCallback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the area. |
**Example** **Example**
...@@ -972,15 +972,15 @@ Obtains the area where this window cannot be displayed, for example, the system ...@@ -972,15 +972,15 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | 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.| | type | [AvoidAreaType](#avoidareatype) | Yes | Type of the area. **TYPE_SYSTEM** indicates the default area of the system. **TYPE_CUTOUT** indicates the notch.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------------- | --------------------------------------------- | | -------------------------------------- | --------------------------------------------- |
| Promise&lt;[AvoidArea](#avoidarea)&gt; | Promise used to return the area.| | Promise&lt;[AvoidArea](#avoidarea)&gt; | Promise used to return the area.|
**Example** **Example**
...@@ -1003,10 +1003,10 @@ Sets whether to enable the full-screen mode for this window. This API uses an as ...@@ -1003,10 +1003,10 @@ Sets whether to enable the full-screen mode for this window. This API uses an as
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ------------------------- | ---- | ---------------------------------------------- | | ------------ | ------------------------- | ---- | ---------------------------------------------- |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.| | isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1031,15 +1031,15 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro ...@@ -1031,15 +1031,15 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ------- | ---- | ---------------------------------------------- | | ------------ | ------- | ---- | ---------------------------------------------- |
| isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.| | isFullScreen | boolean | Yes | Whether to enable the full-screen mode, in which the status bar and navigation bar are hidden.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1057,16 +1057,16 @@ Sets whether to enable the full-screen mode for this window. This API uses a pro ...@@ -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&lt;void&gt;): void setLayoutFullScreen(isLayoutFullScreen: boolean, callback: AsyncCallback&lt;void&gt;): 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1085,21 +1085,21 @@ Sets whether the window layout is in full-screen mode. This API uses an asynchro ...@@ -1085,21 +1085,21 @@ Sets whether the window layout is in full-screen mode. This API uses an asynchro
setLayoutFullScreen(isLayoutFullScreen: boolean): Promise&lt;void&gt; setLayoutFullScreen(isLayoutFullScreen: boolean): Promise&lt;void&gt;
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | isLayoutFullScreen | boolean | Yes | Whether the window layout is in full-screen mode, in which the status bar and navigation bar are displayed.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1123,10 +1123,10 @@ Sets whether to display the status bar and navigation bar in this window. This A ...@@ -1123,10 +1123,10 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1151,15 +1151,15 @@ Sets whether to display the status bar and navigation bar in this window. This A ...@@ -1151,15 +1151,15 @@ Sets whether to display the status bar and navigation bar in this window. This A
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | 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.| | 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** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1183,10 +1183,10 @@ Sets the properties of the status bar and navigation bar in this window. This AP ...@@ -1183,10 +1183,10 @@ Sets the properties of the status bar and navigation bar in this window. This AP
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------- | ---- | -------------------- | | ------------------- | ------------------------------------------- | ---- | -------------------- |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.| | SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1220,15 +1220,15 @@ Sets the properties of the status bar and navigation bar in this window. This AP ...@@ -1220,15 +1220,15 @@ Sets the properties of the status bar and navigation bar in this window. This AP
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------- | ---- | -------------------- | | ------------------- | ------------------------------------------- | ---- | -------------------- |
| SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.| | SystemBarProperties | [SystemBarProperties](#systembarproperties) | Yes | Properties of the status bar and navigation bar.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1261,10 +1261,10 @@ Loads content to this window. This API uses an asynchronous callback to return t ...@@ -1261,10 +1261,10 @@ Loads content to this window. This API uses an asynchronous callback to return t
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | -------------------- | | -------- | ------------------------- | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.| | path | string | Yes | Path of the page from which the content will be loaded.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1288,15 +1288,15 @@ Loads content to this window. This API uses a promise to return the result. ...@@ -1288,15 +1288,15 @@ Loads content to this window. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------------- | | ------ | ------ | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.| | path | string | Yes | Path of the page from which the content will be loaded.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1319,9 +1319,9 @@ Checks whether this window is displayed. This API uses an asynchronous callback ...@@ -1319,9 +1319,9 @@ Checks whether this window is displayed. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | -------------------------------- | | -------- | ---------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the window is displayed.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the window is displayed.|
**Example** **Example**
...@@ -1345,9 +1345,9 @@ Checks whether this window is displayed. This API uses a promise to return the r ...@@ -1345,9 +1345,9 @@ Checks whether this window is displayed. This API uses a promise to return the r
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------- | ----------------------------------------------------- | | ---------------------- | ----------------------------------------------------- |
| Promise&lt;boolean&gt; | Promise used to return whether the window is displayed.| | Promise&lt;boolean&gt; | Promise used to return whether the window is displayed.|
**Example** **Example**
...@@ -1370,10 +1370,10 @@ Enables listening for window size changes. ...@@ -1370,10 +1370,10 @@ Enables listening for window size changes.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
| callback | Callback&lt;[Size](#size)&gt; | Yes | Callback used to return the information. | | callback | Callback&lt;[Size](#size)&gt; | Yes | Callback used to return the information. |
**Example** **Example**
...@@ -1394,10 +1394,10 @@ Disables listening for window size changes. ...@@ -1394,10 +1394,10 @@ Disables listening for window size changes.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **windowSizeChange**, indicating the window size change event.|
| callback | Callback&lt;[Size](#size)&gt; | No | Callback used to return the information. | | callback | Callback&lt;[Size](#size)&gt; | No | Callback used to return the information. |
**Example** **Example**
...@@ -1416,10 +1416,10 @@ Enables listening for changes to the area where the window cannot be displayed. ...@@ -1416,10 +1416,10 @@ Enables listening for changes to the area where the window cannot be displayed.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the information. | | callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | Yes | Callback used to return the information. |
**Example** **Example**
...@@ -1440,10 +1440,10 @@ Disables listening for changes to the area where the window cannot be displayed. ...@@ -1440,10 +1440,10 @@ Disables listening for changes to the area where the window cannot be displayed.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | 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&lt;[AvoidArea](#avoidarea)&gt; | No | Callback used to return the information. | | callback | Callback&lt;[AvoidArea](#avoidarea)&gt; | No | Callback used to return the information. |
**Example** **Example**
...@@ -1458,16 +1458,14 @@ on(type: 'keyboardHeightChange', callback: Callback&lt;number&gt;): void ...@@ -1458,16 +1458,14 @@ on(type: 'keyboardHeightChange', callback: Callback&lt;number&gt;): void
Enables listening for keyboard height changes. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
| callback | Callbacknumber&gt; | Yes | Callback used to return the information. | | callback | Callbacknumber&gt; | Yes | Callback used to return the information. |
**Example** **Example**
...@@ -1484,16 +1482,14 @@ off(type: 'keyboardHeightChange', callback?: Callback&lt;number&gt;): void ...@@ -1484,16 +1482,14 @@ off(type: 'keyboardHeightChange', callback?: Callback&lt;number&gt;): void
Disables listening for keyboard height changes. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **keyboardHeightChange**, indicating the keyboard height change event.|
| callback | Callback&lt;number&gt; | No | Callback used to return the information. | | callback | Callback&lt;number&gt; | No | Callback used to return the information. |
**Example** **Example**
...@@ -1512,9 +1508,9 @@ Checks whether this window supports the wide color gamut mode. This API uses an ...@@ -1512,9 +1508,9 @@ Checks whether this window supports the wide color gamut mode. This API uses an
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------- | ---- | -------------------------------- | | -------- | ---------------------------- | ---- | -------------------------------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the wide color gamut mode is supported.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return whether the wide color gamut mode is supported.|
**Example** **Example**
...@@ -1538,9 +1534,9 @@ Checks whether this window supports the wide color gamut mode. This API uses a p ...@@ -1538,9 +1534,9 @@ Checks whether this window supports the wide color gamut mode. This API uses a p
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------- | ------------------------------------------------------------ | | ---------------------- | ------------------------------------------------------------ |
| Promise&lt;boolean&gt; | Promise used to return whether the wide color gamut mode is supported.| | Promise&lt;boolean&gt; | Promise used to return whether the wide color gamut mode is supported.|
**Example** **Example**
...@@ -1563,10 +1559,10 @@ Sets this window to the wide or default color gamut mode. This API uses an async ...@@ -1563,10 +1559,10 @@ Sets this window to the wide or default color gamut mode. This API uses an async
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------ | | ---------- | ------------------------- | ---- | ------------ |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.| | colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1590,15 +1586,15 @@ Sets this window to the wide or default color gamut mode. This API uses a promis ...@@ -1590,15 +1586,15 @@ Sets this window to the wide or default color gamut mode. This API uses a promis
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------ | | ---------- | ------------------------- | ---- | ------------ |
| colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.| | colorSpace | [ColorSpace](#colorspace) | Yes | Color gamut mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1607,7 +1603,7 @@ Sets this window to the wide or default color gamut mode. This API uses a promis ...@@ -1607,7 +1603,7 @@ Sets this window to the wide or default color gamut mode. This API uses a promis
promise.then((data)=> { promise.then((data)=> {
console.info('Succeeded in setting window colorspace. Data: ' + JSON.stringify(data)) console.info('Succeeded in setting window colorspace. Data: ' + JSON.stringify(data))
}).catch((err)=>{ }).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 ...@@ -1621,19 +1617,19 @@ Obtains the color gamut mode of this window. This API uses an asynchronous callb
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------- | ---- | -------------------------- | | -------- | ---------------------------------------------- | ---- | -------------------------- |
| callback | AsyncCallback&lt;[ColorSpace](#colorspace)&gt; | Yes | Callback used to return the color gamut mode obtained.| | callback | AsyncCallback&lt;[ColorSpace](#colorspace)&gt; | Yes | Callback used to return the color gamut mode obtained.|
**Example** **Example**
```js ```js
windowClass.getColorSpace((err, data) => { windowClass.getColorSpace((err, data) => {
if (err.code) { 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; 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 ...@@ -1647,9 +1643,9 @@ Obtains the color gamut mode of this window. This API uses a promise to return t
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ----------------------------------------- | | ---------------------------------------- | ----------------------------------------- |
| Promise&lt;[ColorSpace](#colorspace)&gt; | Promise used to return the color gamut mode obtained.| | Promise&lt;[ColorSpace](#colorspace)&gt; | Promise used to return the color gamut mode obtained.|
**Example** **Example**
...@@ -1658,7 +1654,7 @@ Obtains the color gamut mode of this window. This API uses a promise to return t ...@@ -1658,7 +1654,7 @@ Obtains the color gamut mode of this window. This API uses a promise to return t
promise.then((data)=> { promise.then((data)=> {
console.info('Succeeded in getting window color space. Cause:' + JSON.stringify(data)) console.info('Succeeded in getting window color space. Cause:' + JSON.stringify(data))
}).catch((err)=>{ }).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&lt;void&gt;): void ...@@ -1668,16 +1664,14 @@ setBackgroundColor(color: string, callback: AsyncCallback&lt;void&gt;): void
Sets the background color for this window. This API uses an asynchronous callback to return the result. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | ------------------------------------------------------------ | | -------- | ------------------------- | ---- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.| | 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&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1698,21 +1692,19 @@ setBackgroundColor(color: string): Promise&lt;void&gt; ...@@ -1698,21 +1692,19 @@ setBackgroundColor(color: string): Promise&lt;void&gt;
Sets the background color for this window. This API uses a promise to return the result. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------------------------------------------------------------ | | ------ | ------ | ---- | ------------------------------------------------------------ |
| color | string | Yes | Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00.| | 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** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1732,16 +1724,14 @@ setBrightness(brightness: number, callback: AsyncCallback&lt;void&gt;): void ...@@ -1732,16 +1724,14 @@ setBrightness(brightness: number, callback: AsyncCallback&lt;void&gt;): void
Sets the screen brightness for this window. This API uses an asynchronous callback to return the result. Sets the screen brightness for this window. This API uses an asynchronous callback to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------------------------- | ---- | ------------------------------------ | | ---------- | ------------------------- | ---- | ------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.| | brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1762,21 +1752,19 @@ setBrightness(brightness: number): Promise&lt;void&gt; ...@@ -1762,21 +1752,19 @@ setBrightness(brightness: number): Promise&lt;void&gt;
Sets the screen brightness for this window. This API uses a promise to return the result. Sets the screen brightness for this window. This API uses a promise to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ------------------------------------ | | ---------- | ------ | ---- | ------------------------------------ |
| brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.| | brightness | number | Yes | Brightness to set, which ranges from 0 to 1. The value **1** indicates the brightest.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1790,84 +1778,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a ...@@ -1790,84 +1778,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
}); });
``` ```
### setDimBehind<sup>7+</sup>
setDimBehind(dimBehindValue: number, callback: AsyncCallback&lt;void&gt;): 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&lt;void&gt; | 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));
});
```
### setDimBehind<sup>7+</sup>
setDimBehind(dimBehindValue: number): Promise&lt;void&gt;
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&lt;void&gt; | 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));
});
```
### setFocusable<sup>7+</sup> ### setFocusable<sup>7+</sup>
setFocusable(isFocusable: boolean, callback: AsyncCallback&lt;void&gt;): void setFocusable(isFocusable: boolean, callback: AsyncCallback&lt;void&gt;): void
Sets whether this window can gain focus. This API uses an asynchronous callback to return the result. Sets whether this window can gain focus. This API uses an asynchronous callback to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ------------------------- | ---- | ---------------------------- | | ----------- | ------------------------- | ---- | ---------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus.| | isFocusable | boolean | Yes | Whether the window can gain focus.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1888,21 +1812,19 @@ setFocusable(isFocusable: boolean): Promise&lt;void&gt; ...@@ -1888,21 +1812,19 @@ setFocusable(isFocusable: boolean): Promise&lt;void&gt;
Sets whether this window can gain focus. This API uses a promise to return the result. Sets whether this window can gain focus. This API uses a promise to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ------- | ---- | ---------------------------- | | ----------- | ------- | ---- | ---------------------------- |
| isFocusable | boolean | Yes | Whether the window can gain focus.| | isFocusable | boolean | Yes | Whether the window can gain focus.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1922,16 +1844,14 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback&lt;void&gt;): v ...@@ -1922,16 +1844,14 @@ setKeepScreenOn(isKeepScreenOn: boolean, callback: AsyncCallback&lt;void&gt;): v
Sets whether to keep the screen always on. This API uses an asynchronous callback to return the result. Sets whether to keep the screen always on. This API uses an asynchronous callback to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------------- | ------------------------- | ---- | ------------------------ | | -------------- | ------------------------- | ---- | ------------------------ |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.| | isKeepScreenOn | boolean | Yes | Sets whether to keep the screen always on.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -1952,21 +1872,19 @@ setKeepScreenOn(isKeepScreenOn: boolean): Promise&lt;void&gt; ...@@ -1952,21 +1872,19 @@ setKeepScreenOn(isKeepScreenOn: boolean): Promise&lt;void&gt;
Sets whether to keep the screen always on. This API uses a promise to return the result. Sets whether to keep the screen always on. This API uses a promise to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------------- | ------- | ---- | ------------------------ | | -------------- | ------- | ---- | ------------------------ |
| isKeepScreenOn | boolean | Yes | Whether to keep the screen always on.| | isKeepScreenOn | boolean | Yes | Sets whether to keep the screen always on.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -1980,84 +1898,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a ...@@ -1980,84 +1898,20 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
}); });
``` ```
### setOutsideTouchable<sup>7+</sup>
setOutsideTouchable(touchable: boolean, callback: AsyncCallback&lt;void&gt;): 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&lt;void&gt; | 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))
})
```
### setOutsideTouchable<sup>7+</sup>
setOutsideTouchable(touchable: boolean): Promise&lt;void&gt;
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&lt;void&gt; | 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));
});
```
### setPrivacyMode<sup>7+</sup> ### setPrivacyMode<sup>7+</sup>
setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback&lt;void&gt;): void setPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback&lt;void&gt;): void
Sets whether this window is in privacy mode. This API uses an asynchronous callback to return the result. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------- | ------------------------- | ---- | -------------------- | | ------------- | ------------------------- | ---- | -------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.| | isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -2079,21 +1933,19 @@ setPrivacyMode(isPrivacyMode: boolean): Promise&lt;void&gt; ...@@ -2079,21 +1933,19 @@ setPrivacyMode(isPrivacyMode: boolean): Promise&lt;void&gt;
Sets whether this window is in privacy mode. This API uses a promise to return the result. 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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------- | ------- | ---- | -------------------- | | ------------- | ------- | ---- | -------------------- |
| isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.| | isPrivacyMode | boolean | Yes | Whether the window is in privacy mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -2113,16 +1965,14 @@ setTouchable(isTouchable: boolean, callback: AsyncCallback&lt;void&gt;): void ...@@ -2113,16 +1965,14 @@ setTouchable(isTouchable: boolean, callback: AsyncCallback&lt;void&gt;): void
Sets whether this window is touchable. This API uses an asynchronous callback to return the result. Sets whether this window is touchable. This API uses an asynchronous callback to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ------------------------- | ---- | -------------------- | | ----------- | ------------------------- | ---- | -------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable.| | isTouchable | boolean | Yes | Whether the window is touchable.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -2144,21 +1994,19 @@ setTouchable(isTouchable: boolean): Promise&lt;void&gt; ...@@ -2144,21 +1994,19 @@ setTouchable(isTouchable: boolean): Promise&lt;void&gt;
Sets whether this window is touchable. This API uses a promise to return the result. Sets whether this window is touchable. This API uses a promise to return the result.
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 **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | ------- | ---- | -------------------- | | ----------- | ------- | ---- | -------------------- |
| isTouchable | boolean | Yes | Whether the window is touchable.| | isTouchable | boolean | Yes | Whether the window is touchable.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ----------------------------------------------- | | ------------------- | ----------------------------------------------- |
| Promise&lt;void&gt; | Promise used to return the execution result.| | Promise&lt;void&gt; | Promise used to return the execution result.|
**Example** **Example**
...@@ -2199,9 +2047,9 @@ Obtains the main window of this window stage. This API uses a promise to return ...@@ -2199,9 +2047,9 @@ Obtains the main window of this window stage. This API uses a promise to return
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | ---------------------------------------------------------- | | -------------------------------- | ---------------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the main window.| | Promise&lt;[Window](#window)&gt; | Promise used to return the main window.|
**Example** **Example**
...@@ -2231,9 +2079,9 @@ Obtains the main window of this window stage. This API uses an asynchronous call ...@@ -2231,9 +2079,9 @@ Obtains the main window of this window stage. This API uses an asynchronous call
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | --------------------------------------- | | -------- | -------------------------------------- | ---- | --------------------------------------- |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the main window.| | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the main window.|
**Example** **Example**
...@@ -2264,15 +2112,15 @@ Creates a subwindow for this window stage. This API uses a promise to return the ...@@ -2264,15 +2112,15 @@ Creates a subwindow for this window stage. This API uses a promise to return the
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------ | ---- | -------------- | | ------ | ------ | ---- | -------------- |
| name | String | Yes | Name of the subwindow.| | name | String | Yes | Name of the subwindow.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | ------------------------------------------------- | | -------------------------------- | ------------------------------------------------- |
| Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.| | Promise&lt;[Window](#window)&gt; | Promise used to return the subwindow created.|
**Example** **Example**
...@@ -2302,10 +2150,10 @@ Creates a subwindow for this window stage. This API uses an asynchronous callbac ...@@ -2302,10 +2150,10 @@ Creates a subwindow for this window stage. This API uses an asynchronous callbac
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------ | | -------- | -------------------------------------- | ---- | ------------------------------ |
| name | String | Yes | Name of the subwindow. | | name | String | Yes | Name of the subwindow. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.| | callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.|
**Example** **Example**
...@@ -2337,9 +2185,9 @@ Obtains all the subwindows of this window stage. This API uses a promise to retu ...@@ -2337,9 +2185,9 @@ Obtains all the subwindows of this window stage. This API uses a promise to retu
**Return value** **Return value**
| Type | Description | | Type | Description |
| --------------------------------------------- | ------------------------------------------------------------ | | --------------------------------------------- | ------------------------------------------------------------ |
| Promise&lt;Array&lt;[Window](#window)&gt;&gt; | Promise used to return all the subwindows.| | Promise&lt;Array&lt;[Window](#window)&gt;&gt; | Promise used to return all the subwindows.|
**Example** **Example**
...@@ -2369,9 +2217,9 @@ Obtains all the subwindows of this window stage. This API uses an asynchronous c ...@@ -2369,9 +2217,9 @@ Obtains all the subwindows of this window stage. This API uses an asynchronous c
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------- | ---- | ------------------------------------------- | | -------- | --------------------------------------------------- | ---- | ------------------------------------------- |
| callback | AsyncCallback&lt;Array&lt;[Window](#window)&gt;&gt; | Yes | Callback used to return all the subwindows.| | callback | AsyncCallback&lt;Array&lt;[Window](#window)&gt;&gt; | Yes | Callback used to return all the subwindows.|
**Example** **Example**
...@@ -2402,10 +2250,10 @@ Loads content to this window stage. This API uses an asynchronous callback to re ...@@ -2402,10 +2250,10 @@ Loads content to this window stage. This API uses an asynchronous callback to re
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------- | ---- | -------------------- | | -------- | ------------------------- | ---- | -------------------- |
| path | string | Yes | Path of the page from which the content will be loaded.| | path | string | Yes | Path of the page from which the content will be loaded.|
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the execution result. |
**Example** **Example**
...@@ -2434,10 +2282,10 @@ Enables listening for window stage lifecycle changes. ...@@ -2434,10 +2282,10 @@ Enables listening for window stage lifecycle changes.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | Yes | Callback used to return the information. | | callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | Yes | Callback used to return the information. |
**Example** **Example**
...@@ -2463,10 +2311,10 @@ Disables listening for window stage lifecycle changes. ...@@ -2463,10 +2311,10 @@ Disables listening for window stage lifecycle changes.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | 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.| | type | string | Yes | Type of event to listen for. The value is fixed at **windowStageEvent**, indicating the window stage lifecycle change event.|
| callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | No | Callback used to return the information. | | callback | Callback&lt;[WindowStageEventType](#windowstageeventtype9)&gt; | No | Callback used to return the information. |
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册