diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md index 3493f9813ba2c98d1e62dd6526511fa832c1bbb9..c3ec8f7fb3b13c935a4d3dc23f4f9cf8b96dfa12 100644 --- a/en/application-dev/reference/apis/js-apis-window.md +++ b/en/application-dev/reference/apis/js-apis-window.md @@ -1,2280 +1,2159 @@ -# Window +# Window ->![](../../public_sys-resources/icon-note.gif) **NOTE:** ->The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. -## Modules to Import +## Modules to Import ``` import window from '@ohos.window'; ``` -## System Capabilities -SystemCapability.WindowManager.WindowManager.Core +## WindowType7+ +Enumerates the window types. -## Required Permissions +**System capability**: SystemCapability.WindowManager.WindowManager.Core -ohos.permission.SYSTEM\_FLOAT\_WINDOW +| Name | Default Value| Description | +| ----------------- | ------ | ------------------ | +| TYPE_APP | 0 | Application subwindow. | +| TYPE_SYSTEM_ALERT | 1 | System alert window.| -## SystemBarProperties +## AvoidAreaType7+ + +Enumerates the types of the area where the window cannot be displayed. + +**System capability**: SystemCapability.WindowManager.WindowManager.Core + +| Name | Default Value| Description | +| ----------- | ------ | ------------------ | +| TYPE_SYSTEM | 0 | Default area of the system.| +| TYPE_CUTOUT | 1 | Notch. | + +## WindowMode7+ + +Enumerates the window modes of an application. + +This is a system API and cannot be called by third-party applications. + +**System capability**: SystemCapability.WindowManager.WindowManager.Core + +| Name | Default Value| Description | +| ---------- | ------ | ----------------------------- | +| UNDEFINED | 1 | The window mode is not defined by the application. | +| FULLSCREEN | 2 | The application is displayed in full screen. | +| PRIMARY | 3 | The application is displayed in the primary window in split-screen mode. | +| SECONDARY | 4 | The application is displayed in the secondary window in split-screen mode. | +| FLOATING | 5 | The application is displayed in a floating window.| + +## SystemBarProperties Describes the properties of the status bar and navigation bar. - -
- | -- | -- | -- | -- | -
---|---|---|---|---|
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
---|---|---|---|---|
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
---|---|---|---|---|
- | -- | -- | -- | -- | -
- | -- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -AsyncCallback<Window> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -AsyncCallback<Window> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -AsyncCallback<Window> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -AsyncCallback<WindowMode> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Screen split ratio. The default ratio is 1:1. The value 1 indicates the ratio 1:2, and the value 2 indicates the ratio 2:1. - |
-
- | -AsyncCallback<SplitScreenBoundsInfo> - |
- - | -Callback used to return a SplitScreenBoundsInfo object that contains the split-screen boundary information. - |
-
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Callback used to indicate whether the floating window is visible. - |
-
- | -- | -- | -
---|---|---|
- | -- | -Whether to display the divider. The value true means to display the divider, and false means the opposite. - |
-
- | -- | -- | -
- | -- | -- | -
---|---|---|
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
---|---|---|
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -
---|---|---|
- | -- | -- | -
- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Brightness to set, which ranges from 0 to 1. The value 1 indicates the brightest. - |
-
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Background color to set. The color is a hexadecimal value, for example, #00FF00 or #FF00FF00. - |
-
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Dimness of the window to set. The value ranges from 0 to 1. The value 1 indicates the dimmest. - |
-
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -AsyncCallback<WindowProperties> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Type of the area. TYPE_SYSTEM indicates the default area of the system. TYPE_CUTOUT indicates the notch area. - |
-
- | -AsyncCallback<AvoidArea> - |
- - | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Callback used to indicate whether the subwindow is displayed. - |
-
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Whether the area outside the subwindow is touchable. The value true means that such an area is touchable, and false means the opposite. - |
-
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Listening type. Set it to keyboardHeightChange, which indicates listening for keyboard height changes. - |
-
- | -- | -- | -- | -
- | -- | -- | -- | -
---|---|---|---|
- | -- | -- | -Listener type. Set it to keyboardHeightChange, which indicates a listener for keyboard height changes. - |
-
- | -- | -- | -- | -