| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar.|
| callback | Callback<[SystemBarTintState](#systembartintstate)> | Yes | Callback used to return the listened information. |
| callback | Callback<[SystemBarTintState](#systembartintstate)> | Yes | Callback used to return the information. |
- Example
...
...
@@ -516,7 +516,7 @@ This is a system API and cannot be called by third-party applications.
| type | string | Yes | Listening type.<br>Set it to **systemBarTintChange**, which indicates listening for properties changes of the status bar and navigation bar.|
| callback | Callback<[SystemBarTintState](#systembartintstate)> | No | Callback used to return the listened information. |
| callback | Callback<[SystemBarTintState](#systembartintstate)> | No | Callback used to return the information. |
- Example
...
...
@@ -934,7 +934,7 @@ Obtains the area where this window cannot be displayed, for example, the system
| 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<[AvoidArea](#avoidarea)> | Yes | Callback used to return the area. |
- Example
...
...
@@ -962,7 +962,7 @@ Obtains the area where this window cannot be displayed, for example, the system
| 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
...
...
@@ -1251,7 +1251,7 @@ Loads content to this window. This API uses an asynchronous callback to return t
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed.|
| callback | Callback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the listened information. |
| callback | Callback<[AvoidArea](#avoidarea)> | Yes | Callback used to return the information. |
- Example
...
...
@@ -1431,7 +1431,7 @@ Disables listening for changes to the area where the window cannot be displayed.
| type | string | Yes | Listening type.<br>Set it to **systemAvoidAreaChange**, which indicates listening for changes to the area where the window cannot be displayed.|
| callback | Callback<[AvoidArea](#avoidarea)> | No | Callback used to return the listened information. |
| callback | Callback<[AvoidArea](#avoidarea)> | No | Callback used to return the information. |
- Example
...
...
@@ -1455,7 +1455,7 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
| FOREGROUND | 1 | The window stage is running in the foreground.|
| ACTIVE | 2 | The window stage gains focus.|
| INACTIVE | 3 | The window stage loses focus.|
| BACKGROUND | 4 | The window stage is running in the background.|
## WindowStage<sup>9+</sup>
Before calling any of the following APIs, you must use `[onWindowStageCreate()](js-apis-application-ability.md#abilityonwindowstagecreate)` to create a **WindowStage** instance.
### getMainWindow<sup>9+</sup>
getMainWindow(): Promise<Window>
Obtains the main window of this window stage. This API uses a promise to return the result.