1# Interfaces (Others) 2<!--Kit: ArkUI--> 3<!--Subsystem: Window--> 4<!--Owner: @waterwin--> 5<!--Designer: @nyankomiya--> 6<!--Tester: @qinliwen0417--> 7<!--Adviser: @ge-yafang--> 8 9> **NOTE** 10> 11> 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. 12 13## Configuration<sup>9+</sup> 14 15Describes the parameters for creating a child window or system window. 16 17**Atomic service API**: This API can be used in atomic services since API version 12. 18 19| Name| Type| Read-Only| Optional| Description | 20| ---------- | -------------------------- | -- | -- |-----------------------------------------------------------------------------| 21| name | string | No| No| Name of the window.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core | 22| windowType | [WindowType](arkts-apis-window-e.md#windowtype7) | No| No| Window type.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core | 23| ctx | [BaseContext](../apis-ability-kit/js-apis-inner-application-baseContext.md) | No| Yes| Current application context. If no value is passed, no context is used.<br>In the FA model, do not pass in this parameter when creating a child window. Otherwise, an error is reported.<br>In the stage model, you must pass in this parameter when creating a floating window, modal window, or system window.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 24| displayId | number | No| Yes| ID of the current physical screen. If no value is passed, the default value **-1** is used. The value must be an integer.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core | 25| parentId | number | No| Yes| ID of the parent window. If no value is passed, the default value **-1** is used. The value must be an integer.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core | 26| decorEnabled<sup>12+</sup> | boolean | No| Yes| Whether the window decoration is enabled. This parameter is valid only when **windowType** is set to **TYPE_DIALOG**. **true** if enabled, **false** otherwise. The default value is **false**.<br>**System capability**: SystemCapability.Window.SessionManager| 27| title<sup>12+</sup> | string| No| Yes| Title of the window when **decorEnabled** is set to **true**. The title display area should not go past the left side of the three-button area of the system. Any part that goes beyond will show as an ellipsis. If this parameter is not set, an empty string is used.<br>**System capability**: SystemCapability.Window.SessionManager| 28 29## SystemBarProperties 30 31Describes the properties of the status bar<!--Del--> and three-button navigation bar<!--DelEnd-->. It is used to set the window-level status bar<!--Del--> and three-button navigation bar<!--DelEnd--> properties. 32 33**Atomic service API**: This API can be used in atomic services since API version 12. 34 35| Name | Type| Read-Only| Optional| Description | 36| -------------------------------------- | -------- | ---- | ---- | ------------------------------------------------------------ | 37| statusBarColor | string | No | Yes | Background color of the status bar. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **'#00FF00'** or **'#FF00FF00'**. The default value is **'#66000000'**.<br> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 38| isStatusBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the status bar is highlighted. **true** if highlighted, **false** otherwise. The default value is **false**.<br> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 39| statusBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the status bar. After this property is set, the setting of **isStatusBarLightIcon** is invalid. The default value is **'#E5FFFFFF'**.<br> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 40| navigationBarColor | string | No | Yes | Background color of the three-button navigation bar. The value is a hexadecimal RGB or ARGB color code and is case insensitive, for example, **'#00FF00'** or **'#FF00FF00'**. The default value is **'#66000000'**.<br><!--RP13--><!--RP13End--> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 41| isNavigationBarLightIcon<sup>7+</sup> | boolean | No | Yes | Whether any icon on the three-button navigation bar is highlighted. **true** if highlighted, **false** otherwise. The default value is **false**.<br><!--RP13--><!--RP13End--> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 42| navigationBarContentColor<sup>8+</sup> | string | No | Yes | Color of the text on the three-button navigation bar. After this property is set, the setting of **isNavigationBarLightIcon** is invalid. The default value is **'#E5FFFFFF'**.<br><!--RP13--><!--RP13End--> **System capability**: SystemCapability.WindowManager.WindowManager.Core| 43| enableStatusBarAnimation<sup>12+</sup> | boolean | No | Yes | Whether to enable animation for a status bar property change. **true** to enable, **false** otherwise. The default value is **false**.<br> **System capability**: SystemCapability.Window.SessionManager| 44| enableNavigationBarAnimation<sup>12+</sup> | boolean | No | Yes | Whether to enable animation for a three-button navigation bar property change. **true** to enable, **false** otherwise. The default value is **false**.<br><!--RP13--><!--RP13End--> **System capability**: SystemCapability.Window.SessionManager| 45 46## StatusBarProperty<sup>18+</sup> 47 48Describes the properties of the status bar. These properties are returned when you query the status bar's configuration details. 49 50**Atomic service API**: This API can be used in atomic services since API version 18. 51 52| Name | Type| Read-Only| Optional | Description| 53| ------------------------------------- | -------- | ---- | ---- | ------- | 54| contentColor | string | No | No | Color of the text on the status bar. The value is in ARGB format, for example, **#E5FFFFFF**.<br> **System capability**: SystemCapability.Window.SessionManager| 55 56## SystemBarStyle<sup>12+</sup> 57 58Describes the properties of the status bar. These properties are valid for the page-level status bar. 59 60**Atomic service API**: This API can be used in atomic services since API version 12. 61 62**System capability**: SystemCapability.WindowManager.WindowManager.Core 63 64| Name | Type| Read-Only| Optional| Description | 65| ------ | -------- | ---- | ---- | ------------------ | 66| statusBarContentColor | string | No | Yes | Color of the text on the status bar. The default value is **'#E5FFFFFF'**.| 67 68## Rect<sup>7+</sup> 69 70Describes the rectangular area of the window. 71 72**System capability**: SystemCapability.WindowManager.WindowManager.Core 73 74**Atomic service API**: This API can be used in atomic services since API version 11. 75 76| Name | Type| Read-Only| Optional| Description | 77| ------ | -------- | ---- | ---- | ------------------ | 78| left | number | No | No | Left boundary of the rectangle, in px. The value must be an integer.| 79| top | number | No | No | Top boundary of the rectangle, in px. The value must be an integer.| 80| width | number | No | No | Width of the rectangle, in px. The value must be an integer.| 81| height | number | No | No | Height of the rectangle, in px. The value must be an integer.| 82 83## AvoidArea<sup>7+</sup> 84 85Describes the area where the window cannot be displayed, for example, the system bar area, notch, gesture area, and soft keyboard area. Touch events will not be responded in this area. 86 87Pay attention to the following restrictions on this area: 88 89- The bottom gesture area, apart from the bottom navigation bar area, supports transparent transmission of touch events, and touch and hold events, but not drag events. 90 91- The gesture area on the left and right sides supports transparent transmission of touch events, touch and hold events, and swipe up and down events, but not drag events. 92 93- The bottom navigation bar area supports responding to touch events, touch and hold events, and drag events. However, it does not support transparent transmission of events. 94 95**System capability**: SystemCapability.WindowManager.WindowManager.Core 96 97**Atomic service API**: This API can be used in atomic services since API version 11. 98 99| Name | Type | Read-Only| Optional| Description | 100| ---------- | ------------- | ---- | ---- | ------------------ | 101| visible<sup>9+</sup> | boolean | No | No | Whether the window can be displayed in the area. **true** if the window can be displayed in the area, **false** otherwise.| 102| leftRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Rectangle on the left of the screen.| 103| topRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Rectangle at the top of the screen.| 104| rightRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Rectangle on the right of the screen.| 105| bottomRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Rectangle at the bottom of the screen.| 106 107## Size<sup>7+</sup> 108 109Describes the window size. 110 111**System capability**: SystemCapability.WindowManager.WindowManager.Core 112 113**Atomic service API**: This API can be used in atomic services since API version 11. 114 115| Name | Type| Read-Only| Optional| Description | 116| ------ | -------- | ---- | ---- | ---------- | 117| width | number | No | No | Window width, in px. The value must be an integer.| 118| height | number | No | No | Window height, in px. The value must be an integer.| 119 120## Position<sup>20+</sup> 121 122Describes the position of the window or component. 123 124**System capability**: SystemCapability.Window.SessionManager 125 126| Name | Type| Read-Only| Optional| Description | 127| ------ | -------- | ---- | ---- | ---------- | 128| x | number | No | No | X coordinate, in px. The value must be an integer.| 129| y | number | No | No | Y coordinate, in px. The value must be an integer.| 130 131## RectChangeOptions<sup>12+</sup> 132 133Describes the value and reason returned upon a window rectangle (position and size) change. 134 135**System capability**: SystemCapability.Window.SessionManager 136 137**Atomic service API**: This API can be used in atomic services since API version 12. 138 139| Name | Type | Read-Only| Optional| Description | 140| ---------- | ------------- | ---- | ---- | ------------------ | 141| rect | [Rect](arkts-apis-window-i.md#rect7) | No | No | New value of the window rectangle.| 142| reason | [RectChangeReason](arkts-apis-window-e.md#rectchangereason12) | No | No | Reason for the window rectangle change.| 143 144## AvoidAreaOptions<sup>12+</sup> 145 146Describes the new area where the window cannot be displayed. The new area is returned when the corresponding event is triggered. 147 148**System capability**: SystemCapability.WindowManager.WindowManager.Core 149 150**Atomic service API**: This API can be used in atomic services since API version 12. 151 152| Name | Type | Read-Only| Optional| Description | 153| ---------- | ------------- | ---- | ---- | ------------------ | 154| type | [AvoidAreaType](arkts-apis-window-e.md#avoidareatype7) | No | No | Type of the new area returned.| 155| area | [AvoidArea](arkts-apis-window-i.md#avoidarea7) | No | No | New area returned.| 156 157## WindowProperties 158 159Describes the window properties. 160 161| Name | Type | Read-Only| Optional| Description | 162| ------------------------------------- | ------------------------- | ---- | ---- |--------------------------------------------------------------------------------------------------------| 163| windowRect<sup>7+</sup> | [Rect](arkts-apis-window-i.md#rect7) | No | No | Window size, which can be obtained from the page lifecycle [onPageShow](./arkui-ts/ts-custom-component-lifecycle.md#onpageshow) or the application lifecycle [onForeground](../apis-ability-kit/js-apis-app-ability-uiAbility.md#onforeground).<br> **Atomic service API**: This API can be used in atomic services since API version 11.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 164| drawableRect<sup>11+</sup> | [Rect](arkts-apis-window-i.md#rect7) | No | No | Size of the rectangle that can be drawn in the window. The upper boundary and left boundary are calculated relative to the window. In the stage model, this API must be used after [loadContent()](arkts-apis-window-Window.md#loadcontent9) or [setUIContent()](arkts-apis-window-Window.md#setuicontent9) is called to load the page content.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 165| type<sup>7+</sup> | [WindowType](arkts-apis-window-e.md#windowtype7) | No | No | Window type.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 166| isFullScreen | boolean | No | No | Whether the window is displayed in full-screen mode. The default value is **false**. **true** if displayed in full-screen mode, **false** otherwise.<br> **Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 167| isLayoutFullScreen<sup>7+</sup> | boolean | No | No | Whether the window is immersive and in full-screen mode (not in floating window or split-screen scenarios). The default value is **false**. **true** if the window is immersive and in full-screen mode, **false** otherwise.<br> **Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 168| focusable<sup>7+</sup> | boolean | No | No | Whether the window can gain focus. The default value is **true**. **true** if the window can gain focus, **false** otherwise.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 169| touchable<sup>7+</sup> | boolean | No | No | Whether the window is touchable. The default value is **true**. **true** if touchable, **false** otherwise.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 170| brightness | number | No | No | Screen brightness. The value is a floating-point number in the range [0.0, 1.0], and the value **1.0** means the brightest. If no value is passed, the brightness follows the system. In this case, the obtained brightness value is **-1**.<br> **Atomic service API**: This API can be used in atomic services since API version 11.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 171| dimBehindValue<sup>(deprecated)</sup> | number | No | No | Dimness of the window that is not on top. The value is a floating-point number in the range [0.0, 1.0], and the value **1.0** means the dimmest.<br>Note: This property is supported since API version 7 and deprecated since API version 9.<br> Currently, no substitute is available.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 172| isKeepScreenOn | boolean | No | No | Whether the screen is always on. The default value is **false**. **true** if always on, **false** otherwise.<br> **Atomic service API**: This API can be used in atomic services since API version 11.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 173| isPrivacyMode<sup>7+</sup> | boolean | No | No | Whether the window is in privacy mode. The default value is **false**. **true** if in privacy mode, **false** otherwise.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 174| isRoundCorner<sup>(deprecated)</sup> | boolean | No | No | Whether the window has rounded corners. The default value is **false**. **true** if the window has rounded corners, **false** otherwise.<br>Note: This property is supported since API version 7 and deprecated since API version 9.<br> Currently, no substitute is available.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 175| isTransparent<sup>7+</sup> | boolean | No | No | Whether the window background is transparent. The default value is **false**. **true** if transparent, **false** otherwise.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 176| id<sup>9+</sup> | number | No | No | Window ID. The default value is **0**. The value must be an integer.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 177| displayId<sup>12+</sup> | number | No | Yes | ID of the screen where the window is located. By default, the ID of the main screen is returned. The value must be an integer.<br>**Atomic service API**: This API can be used in atomic services since API version 12.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 178| name<sup>18+</sup> | string | No | Yes | Window name. The default value is an empty string.<br>**Atomic service API**: This API can be used in atomic services since API version 18.<br>**System capability**: SystemCapability.WindowManager.WindowManager.Core| 179| globalDisplayRect<sup>20+</sup> | [Rect](arkts-apis-window-i.md#rect7) | No | Yes | Window size in the global coordinate system. In extended screen scenarios, the upper-left corner of the primary screen is used as the coordinate origin. In virtual screen scenarios, the upper-left corner of the primary screen within the screen group is used as the coordinate origin. The default value is [0, 0, 0, 0].<br>**System capability**: SystemCapability.Window.SessionManager| 180 181## DecorButtonStyle<sup>14+</sup> 182 183Describes the button style of the system decoration bar. 184 185**System capability**: SystemCapability.Window.SessionManager 186 187| Name | Type | Read-Only| Optional| Description | 188| ---------- | ------------- | ---- | ---- | ------------------ | 189| colorMode | [ConfigurationConstant.ColorMode](../apis-ability-kit/js-apis-app-ability-configurationConstant.md#colormode) | No | Yes | Color mode. Buttons automatically adapt to light colors in dark mode and to dark colors in light mode. If this parameter is not set, they will automatically match the system color mode.<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 190| buttonBackgroundSize | number | No | Yes | Size of the button when it is highlighted. The value ranges from 20 vp to 40 vp. The default value is 28 vp.<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 191| spacingBetweenButtons | number | No | Yes | Spacing between buttons. The value ranges from 8 vp to 24 vp. The default value is 12 vp.<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 192| closeButtonRightMargin | number | No | Yes | Margin between the rightmost edge of the close button and the window. The value ranges from 6 vp to 22 vp. The default value is 20 vp.<br>**Atomic service API**: This API can be used in atomic services since API version 14.| 193| buttonIconSize<sup>20+</sup> | number | No | Yes | Size of the button icon. The value ranges from 16 vp to 24 vp. The default value is 20 vp.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 194| buttonBackgroundCornerRadius<sup>20+</sup> | number | No | Yes | Radius of the button background rounded corner. The value ranges from 4 vp to 8 vp. The default value is 4 vp.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 195 196## WindowLimits<sup>11+</sup> 197 198Describes the parameters for window size limits. Windows have default system-imposed size limits. Applications can adjust these limits using [setWindowLimits](arkts-apis-window-Window.md#setwindowlimits11) or by configuring the [abilities field in the module.json5 file](../../quick-start/module-configuration-file.md#abilities). The actual limits applied are determined by the intersection of the default system limits and the application's settings. 199 200Applications can obtain the current window size limits via [getWindowLimits](arkts-apis-window-Window.md#getwindowlimits11). 201 202**Atomic service API**: This API can be used in atomic services since API version 12. 203 204**System capability**: SystemCapability.Window.SessionManager 205 206| Name | Type | Read-Only| Optional| Description | 207| :-------- | :----- | :--- | :--- | :----------------------------------------------------------- | 208| maxWidth | number | No | Yes | Maximum window width, in px. The value must be an integer. The default value is **0**, indicating that the property does not change. The lower limit is **0**, and the upper limit is the maximum width specified by the system. | 209| maxHeight | number | No | Yes | Maximum window height, in px. The value must be an integer. The default value is **0**, indicating that the property does not change. The lower limit is **0**, and the upper limit is the maximum height specified by the system. | 210| minWidth | number | No | Yes | Minimum window width, in px. The value must be an integer. The default value is **0**, indicating that the property does not change. The lower limit is **0**, and the upper limit is the minimum width specified by the system. | 211| minHeight | number | No | Yes | Minimum window height, in px. The value must be an integer. The default value is **0**, indicating that the property does not change. The lower limit is **0**, and the upper limit is the minimum height specified by the system. | 212 213## TitleButtonRect<sup>11+</sup> 214 215Describes the rectangle used to hold the minimize, maximize, and close buttons on the title bar. This rectangle is located in the upper-right corner of the window. 216 217**Atomic service API**: This API can be used in atomic services since API version 12. 218 219**System capability**: SystemCapability.Window.SessionManager 220 221| Name | Type | Read-Only| Optional| Description | 222| ------ | ------ | ---- | ---- | ------------------------------------------ | 223| right | number | No | No | Right boundary of the rectangle, in vp. The value must be an integer.| 224| top | number | No | No | Top boundary of the rectangle, in vp. The value must be an integer.| 225| width | number | No | No | Width of the rectangle, in vp. The value must be an integer. | 226| height | number | No | No | Height of the rectangle, in vp. The value must be an integer. | 227 228## MoveConfiguration<sup>15+</sup> 229 230Describes the window movement configuration. 231 232**Atomic service API**: This API can be used in atomic services since API version 15. 233 234**System capability**: SystemCapability.Window.SessionManager 235 236| Name | Type | Read-Only| Optional| Description | 237| ------ | ------ | ---- | ---- | ------------------------------------------ | 238| displayId | number | No| Yes|Target display ID. The value must be an integer. If a non-integer is passed in, the value is rounded down. If this parameter is passed in, the window is positioned relative to the upper-left corner of the target display. If this parameter is left empty or the target display ID does not exist, the window is positioned relative to the upper-left corner of the current display.| 239 240## WindowDensityInfo<sup>15+</sup> 241 242Describes the information about the display density of the screen where the window is located and the window's custom display density. It is a scale factor independent of pixel units, that is, a factor for scaling display size. 243 244**Atomic service API**: This API can be used in atomic services since API version 15. 245 246**System capability**: SystemCapability.Window.SessionManager 247 248| Name | Type| Read-Only| Optional| Description | 249| ------ | -------- | ---- | ---- | ---------- | 250| systemDensity | number | No | No | System's display size scale factor for the screen where the window is located. The value ranges from 0.5 to 4.0 and varies according to user settings.| 251| defaultDensity | number | No | No | Default display size scale factor for the screen where the window is located. The value ranges from 0.5 to 4.0 and varies with the screen.| 252| customDensity | number | No | No | Custom display size scale factor of the window. The value ranges from 0.5 to 4.0. If this parameter is left unspecified, the system's display size scale factor is used. This parameter takes effect only for the main window. For the child window or system window, it is equivalent to the system's display size scale factor (**systemDensity**).| 253 254## WindowLayoutInfo<sup>15+</sup> 255 256Describes the information about the window layout. 257 258**Atomic service API**: This API can be used in atomic services since API version 15. 259 260**System capability**: SystemCapability.Window.SessionManager 261 262| Name | Type | Read-Only| Optional| Description | 263| ------ | ------ | ---- | ---- |------------------------------------------ | 264| windowRect | [Rect](arkts-apis-window-i.md#rect7) | No| No| Window rectangle, that is, the position and size of the window on the display.| 265 266## KeyboardInfo<sup>18+</sup> 267 268Describes the information about the soft keyboard window. 269 270**System capability**: SystemCapability.Window.SessionManager 271 272| Name | Type | Read-Only| Optional| Description | 273| ------ | ------ | ---- | ---- | ------------------------------------------ | 274| beginRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Position and size of the soft keyboard before the animation starts.<br> **Atomic service API**: This API can be used in atomic services since API version 18.| 275| endRect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Position and size of the soft keyboard before the animation ends.<br> **Atomic service API**: This API can be used in atomic services since API version 18.| 276| animated<sup>20+</sup> | boolean | No | Yes | Whether there is a show/hide animation. **true** if there is a show/hide animation, **false** otherwise.<br> **Atomic service API**: This API can be used in atomic services since API version 20.| 277| config<sup>20+</sup> | [WindowAnimationConfig](arkts-apis-window-i.md#windowanimationconfig20) | No | Yes | Animation configuration.<br> **Atomic service API**: This API can be used in atomic services since API version 20.| 278 279## ShowWindowOptions<sup>20+</sup> 280 281Describes the parameters for displaying a child window or system window. 282 283**System capability**: SystemCapability.Window.SessionManager 284 285**Atomic service API**: This API can be used in atomic services since API version 20. 286 287| Name | Type | Read-Only| Optional| Description | 288| ------ | ------ | ---- | ---- |------------------------------------------ | 289| focusOnShow | boolean | No | Yes | Whether the window automatically gains focus when [showWindow()](arkts-apis-window-Window.md#showwindow20) is called. The default value is **true**. This parameter does not take effect for the main window, modal window, and dialog boxes.| 290 291## WindowAnimationConfig<sup>20+</sup> 292 293Describes the configuration for window animation. 294 295**Atomic service API**: This API can be used in atomic services since API version 20. 296 297**System capability**: SystemCapability.Window.SessionManager 298 299| Name | Type | Read-Only| Optional| Description | 300| -------- | --------------------------------------------------------- | ---- | ---- |------------------------------------------------------------ | 301| curve | [WindowAnimationCurve](arkts-apis-window-e.md#windowanimationcurve20) | No | No | Type of animation curve. | 302| duration | number | No | Yes | Duration for playing the animation, in milliseconds (ms).<br>The default value is 0, and the maximum value is 3000.<br>Whether it is required depends on the animation curve type.| 303| param | [WindowAnimationCurveParam](arkts-apis-window-t.md#windowanimationcurveparam20) | No | Yes | Parameters for the animation curve. Whether it is required depends on the animation curve type. | 304 305## WindowInfo<sup>18+</sup> 306 307Describes the window information. 308 309**System capability**: SystemCapability.Window.SessionManager 310 311| Name | Type | Read-Only| Optional| Description | 312| ------ | ------ | ---- | ---- | ------------------------------------------ | 313| rect | [Rect](arkts-apis-window-i.md#rect7) | No | No | Window size.| 314| bundleName | string | No | No | Bundle name of the application. | 315| abilityName | string | No | No | Ability name. | 316| windowId | number | No | No | Window ID. | 317| windowStatusType | [WindowStatusType](arkts-apis-window-e.md#windowstatustype11) | No | No | Window mode. | 318| isFocused | boolean | No | Yes | Whether the window gains focus. **true** if the window gains focus, **false** otherwise. | 319| globalDisplayRect<sup>20+</sup> | [Rect](arkts-apis-window-i.md#rect7) | No | Yes | Window size in the global coordinate system. In extended screen scenarios, the upper-left corner of the primary screen is used as the coordinate origin. In virtual screen scenarios, the upper-left corner of the primary screen within the screen group is used as the coordinate origin. The default value is [0, 0, 0, 0].| 320 321## TransitionAnimation<sup>20+</sup> 322 323Describes the window transition animation. 324 325**Atomic service API**: This API can be used in atomic services since API version 20. 326 327**System capability**: SystemCapability.Window.SessionManager 328 329| Name | Type | Read-Only| Optional| Description | 330| ------- | ------------------------------------------------- | ---- | ---- |------------------------------------------------------------ | 331| config | [WindowAnimationConfig](arkts-apis-window-i.md#windowanimationconfig20) | No | No | Transition animation configuration. | 332| opacity | number | No | Yes | Opacity of the window during the transition animation. If this parameter is set to **0**, the window is completely transparent. When the animation type is **WindowTransitionType.DESTROY**, this represents the opacity at the end of the animation. The value ranges from 0 to 1. The value is reset to **1** when the animation ends.| 333 334## StartAnimationParams<sup>20+</sup> 335 336Describes the parameters for the startup animation. 337 338The configuration is valid only for transitions between different abilities within the same application. 339 340The configuration is valid only for phones or tablets not in free windows mode. 341 342The configuration is valid only full-screen applications. 343 344**System capability**: SystemCapability.Window.SessionManager 345| Name | Type | Read-Only| Optional| Description | 346| ---------------- | ----------------------------------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | 347| type | [AnimationType](arkts-apis-window-e.md#animationtype20) | No | No | Type of the window animation.| 348 349## WindowCreateParams<sup>20+</sup> 350 351Describes the window parameters during application startup. 352 353**System capability**: SystemCapability.Window.SessionManager 354| Name | Type | Read-Only| Optional| Description | 355| ---------------- | ----------------------------------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | 356| animationParams | [StartAnimationParams](arkts-apis-window-i.md#startanimationparams20) | No | Yes | Parameters for the startup animation. The default value is **undefined**. If this parameter is not set, the default animation of the system is used.| 357 358## Callback<sup>15+</sup> 359 360### (data: T)<sup>15+</sup> 361 362(data: T): V 363 364Describes a generic callback function. 365 366You can set **data** to customize the parameter type of the information returned by the callback. 367 368**Atomic service API**: This API can be used in atomic services since API version 15. 369 370**System capability**: SystemCapability.Window.SessionManager 371 372**Parameters** 373 374| Name| Type| Mandatory| Description| 375| ---- | ---- | ---- | -------------------------- | 376| data | T | Yes | Parameter of type T that needs to be passed when the callback function is called.| 377 378**Return value** 379 380| Type| Description| 381| -------------------------------- | ------------------------------------ | 382| V | Value of type V.| 383 384## RotationChangeInfo<sup>19+</sup> 385 386Describes the window information obtained during window rotation changes. 387 388**Atomic service API**: This API can be used in atomic services since API version 19. 389 390**System capability**: SystemCapability.Window.SessionManager 391 392| Name | Type| Read-Only | Optional| Description | 393| ------ | ---- | ----- | ---- | ----------------------- | 394| type | [RotationChangeType](arkts-apis-window-e.md#rotationchangetype19) | No| No| Type of window rotation event.| 395| orientation | number | No| No| Display orientation of the window.<br>- **0**: portrait.<br>- **1**: reverse landscape.<br>- **2**: reverse portrait.<br>- **3**: landscape.<br>Note that the orientation here is different from the orientation property of the display object.| 396| displayId | number | No| No| ID of the screen where the window is located.| 397| displayRect | [Rect](arkts-apis-window-i.md#rect7) | No| No| Size of the rectangle after the screen where the window is located is rotated.| 398 399## RotationChangeResult<sup>19+</sup> 400 401Describes the information returned by the application during window rotation changes. 402 403The system uses the information to adjust the size of the current window rectangle. If the returned information is about the rotation change of the main window, the system does not change the size of the main window. 404 405There are limitations on the size of application windows and system windows. For details about specific restrictions and rules, see [resize](arkts-apis-window-Window.md#resize9). 406 407**Atomic service API**: This API can be used in atomic services since API version 19. 408 409**System capability**: SystemCapability.Window.SessionManager 410 411| Name | Type| Read-Only | Optional| Description | 412| ------ | ---- | ----- | ---- | ----------------------- | 413| rectType | [RectType](arkts-apis-window-e.md#recttype19) | No| No| Type of window rectangle coordinate system.| 414| windowRect | [Rect](arkts-apis-window-i.md#rect7) | No| No| Information about the window's rectangle relative to the screen or parent window coordinate system.| 415 416## RotationChangeCallback<sup>19+</sup> 417 418### (info: T)<sup>19+</sup> 419 420(info: T): U; 421 422Describes a generic callback function for rotation event notifications. 423 424In this callback function, the parameter type is [RotationChangeInfo](arkts-apis-window-i.md#rotationchangeinfo19), and the return value type is [RotationChangeResult](arkts-apis-window-i.md#rotationchangeresult19)\|void. 425 426**Atomic service API**: This API can be used in atomic services since API version 19. 427 428**System capability**: SystemCapability.Window.SessionManager 429 430**Parameters** 431 432| Name| Type| Mandatory| Description| 433| ---- | ---- | ---- | -------------------------- | 434| info | T | Yes | Parameter of type [RotationChangeInfo](arkts-apis-window-i.md#rotationchangeinfo19) passed by the system when the callback function is called.| 435 436**Return value** 437 438| Type| Description| 439| -------------------------------- | ------------------------------------ | 440| U | Value of type [RotationChangeResult](arkts-apis-window-i.md#rotationchangeresult19)\|void.| | 441 442## SubWindowOptions<sup>11+</sup> 443 444Describes the parameters used for creating a child window. 445 446**System capability**: SystemCapability.Window.SessionManager 447 448| Name | Type | Read-Only| Optional| Description | 449| ---------- | ---- | ---- | ---- | ----------- | 450| title<sup>11+</sup> | string | No| No| Title of the child window. The title display area should not go past the left side of the three-button area of the system. Any part that goes beyond will show as an ellipsis.<br>**Atomic service API**: This API can be used in atomic services since API version 12. | 451| decorEnabled<sup>11+</sup> | boolean | No| No| Whether decorations are displayed in the child window. **true** if displayed, **false** otherwise.<br>**Atomic service API**: This API can be used in atomic services since API version 12. | 452| isModal<sup>12+</sup> | boolean | No| Yes| Whether the modal property is enabled for the child window. **true** if enabled, **false** otherwise. The default value is **false**.<br>**Atomic service API**: This API can be used in atomic services since API version 12. | 453| modalityType<sup>14+</sup> | [ModalityType](arkts-apis-window-e.md#modalitytype14) | No| Yes| Modality type of the child window. This parameter takes effect only when the modal property is enabled for the child window. **WINDOW_MODALITY** means window-modal, and **APPLICATION_MODALITY** means application-modal. The default value is **WINDOW_MODALITY**.<br>**Atomic service API**: This API can be used in atomic services since API version 14. | 454| windowRect<sup>18+</sup> | [Rect](arkts-apis-window-i.md#rect7) | No| Yes| Rectangle of the child window, and the size of the child window is limited. For details, see [resize()](arkts-apis-window-Window.md#resize9). If this parameter is not set and [showWindow()](arkts-apis-window-Window.md#showwindow9) is not called, the default value {left: 0, top: 0, width: 0, height: 0} is used. For details, see [Setting a Child Window of an Application](../../windowmanager/application-window-stage.md#setting-a-child-window-of-an-application).<br>**Atomic service API**: This API can be used in atomic services since API version 18.| 455| zLevel<sup>18+</sup> | number | No| Yes| Z-level of the child window. This parameter is valid only when the modal property is not enabled for the child window, that is, **isModal** is not set. The value is an integer in the range [-10000, 10000]. Floating-point numbers will be rounded down. The default value is **0**.<br>**Atomic service API**: This API can be used in atomic services since API version 18.| 456| maximizeSupported<sup>19+</sup> | boolean | No| Yes| Whether the child window supports maximization. <!--RP6-->This API can be used only on 2-in-1 devices. <!--RP6End-->**true** if supported, **false** otherwise. The default value is **false**.<br>**Atomic service API**: This API can be used in atomic services since API version 19.| 457| outlineEnabled<sup>20+</sup> | boolean | No| Yes| Whether the child window displays an outline. This API can be used only on 2-in-1 devices. **true** if displayed, **false** otherwise. The default value is **false**.<br>**Atomic service API**: This API can be used in atomic services since API version 20.| 458 459## KeyFramePolicy<sup>20+</sup> 460 461Describes the configuration for keyframe policies. 462 463**System capability**: SystemCapability.Window.SessionManager 464 465| Name | Type| Read-Only | Optional| Description | 466| ------ | ---- | ----- | ---- | ----------------------- | 467| enable | boolean | No| No| Whether to enable keyframes. **true** to enable, **false** otherwise.| 468| interval | number | No| Yes| Time interval for triggering keyframe layout changes via dragging, in ms. The default value is **1000**. The value is a positive integer. Floating-point values are rounded down. It works with **distance** using an OR condition. If either of them is met, the layout change starts.| 469| distance | number | No| Yes| Distance interval for triggering keyframe layout changes via dragging, in px. The default value is **1000**. The value is **0** or a positive integer. Floating-point values are rounded down. If the value is 0, the drag distance is ignored. It works with **interval** using an OR condition. If either of them is met, the layout change starts.| 470| animationDuration | number | No| Yes| Duration of the animation for keyframe layout changes, in ms. The default value is **100**. The value is **0** or a positive integer. Floating-point values are rounded down.| 471| animationDelay | number | No| Yes| Delay before the animation for keyframe layout changes starts, in ms. The default value is **100**. The value is **0** or a positive integer. Floating-point values are rounded down.| 472