The **EnvironmentCallback** module provides the **onConfigurationUpdated** API for the application context to listen for system environment changes.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
The **AbilityManager** module provides APIs for obtaining, adding, and modifying ability running information and state information.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module are system APIs and cannot be called by third-party applications.
The **ContinuationExtraParams** module provides the extra parameters required by the device manager in the continuation management entry.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## ContinuationExtraParams
Describes the extra parameters required by the device selection module in the continuation management entry.
The **continuationManager** module provides the continuation management entry. You can use the APIs of this module to connect to and cancel the continuation management service, subscribe to and unsubscribe from device connection events, start the device selection module, and update the device connection state.
Currently, this module provides incomplete functions, and its APIs are mainly used to start the device selection module. **The continuation capability is not available for application development.**
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Registers the continuation management service and obtains a token. This API does not involve any filter parameters and uses an asynchronous callback to return the result.
| options | [ContinuationExtraParams](js-apis-continuation-continuationExtraParams.md) | Yes| Extra parameters used to filter the list of available devices.|
| callback | AsyncCallback\<number> | Yes| Callback used to return the token generated after the continuation management service is connected.|
| options | [ContinuationExtraParams](js-apis-continuation-continuationExtraParams.md) | No| Extra parameters used to filter the list of available devices. This parameter can be null.|
| type | string | Yes| Event type. The value is fixed at **deviceConnect**.|
| token | number | Yes| Token obtained after the registration of the continuation management service.|
| callback | Callback\<Array\<[ContinuationResult](js-apis-continuation-continuationResult.md)>> | Yes| Callback invoked when a device is selected from the device list provided by the device selection module. This callback returns the device ID, type, and name.|
| type | string | Yes| Event type. The value is fixed at **deviceDisconnect**.|
| token | number | Yes| Token obtained after the registration of the continuation management service.|
| callback | Callback\<Array\<string>> | Yes| Callback invoked when a device is disconnected in the device selection module. This callback returns the device ID.|
Starts the device selection module to show the list of available devices on the network. This API does not involve any filter parameters and uses an asynchronous callback to return the result.
| token | number | Yes| Token obtained after the registration of the continuation management service.|
| options | [ContinuationExtraParams](js-apis-continuation-continuationExtraParams.md) | Yes| Extra parameters used to filter the list of available devices.|
| callback | AsyncCallback\<void> | Yes| Callback used to return the result.|
| token | number | Yes| Token obtained after the registration of the continuation management service.|
| options | [ContinuationExtraParams](js-apis-continuation-continuationExtraParams.md) | No| Extra parameters used to filter the list of available devices. This parameter can be null.|
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## ContinuationResult
Describes the device information returned by the continuation management entry.
The **EffectKit** module provides basic image processing capabilities, including brightness adjustment, blurring, grayscale adjustment, and color picker.
This module provides the following classes:
-[Filter](#filter): a class that provides the effect chain.
-[Color](#color): a class used to store the color picked.
-[ColorPicker](#colorpicker): a smart color picker.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```js
importeffectKitfrom'@ohos.effectKit';
```
## effectKit.createEffect
createEffect(source: image.PixelMap): Filter
Creates a **Filter** instance based on the pixel map.
| red | number | Yes | No | Value of the red component. |
| green | number | Yes | No | Value of the green component. |
| blue | number | Yes | No | Value of the blue component. |
| alpha | number | Yes | No | Value of the alpha component. |
## ColorPicker
A class used to obtain the main color of an image from its data. Before calling any method of **ColorPicker**, use [createColorPicker](#effectkitcreatecolorpicker) to create a **ColorPicker** instance.
### getMainColor
getMainColor(): Promise\<Color>
Obtains the main color of the image and writes the result to a **[Color](#color)** instance. This API uses a promise to return the result.
| [Color](#color) | Color value of the main color. If the operation fails, **null** is returned.|
**Example**
```js
letcolor=colorPicker.getMainColorSync();
console.log('get main color ='+color);
```
## Filter
A class used to add a specified effect to an image. Before calling any method of **Filter**, use [createEffect](#effectkitcreateeffect) to create a **Filter** instance.
### blur
blur(radius: number): Filter
Adds the blur effect to the filter linked list, and returns the head node of the linked list.
| radius | number | Yes | Blur radius, in pixels. The blur effect is proportional to the configured value. A larger value indicates a more obvious effect.|
The **Screen** module implements basic screen management. You can use the APIs of this module to obtain a **Screen** object, listen for screen changes, and create and destroy virtual screens.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
| eventType | string | Yes | Event type.<br>- **connect**: an event indicating that the screen is connected.<br>- **disconnect**: an event indicating that the screen is disconnected.<br>- **change**: an event indicating that the screen state changes.|
| callback | Callback<number> | Yes | Callback used to return the screen ID. |
**Example**
```js
varcallback=(data)=>{
console.info('Register the callback for screen changes. Data: '+JSON.stringify(data))
| eventType | string | Yes | Event type.<br>- **connect**: an event indicating that the screen is connected.<br>- **disconnect**: an event indicating that the screen is disconnected.<br>- **change**: an event indicating that the screen state changes.|
| callback | Callback<number> | No | Callback used to return the screen ID. |
**Example**
```js
varcallback=(data)=>{
console.info('Unegister the callback for screen changes. Data: '+JSON.stringify(data))
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the virtual screen is destroyed, **err** is **undefined**; otherwise, **err** is an error object.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the virtual screen surface is successfully set, **err** is **undefined**; otherwise, **err** is an error object.|
| Promise<boolean> | Promise used to return the result. If **true** is returned, auto rotate is locked. If **false** is returned, auto rotate is unlocked.|
| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. If **true** is returned, auto rotate is locked. If **false** is returned, auto rotate is unlocked.|
**Example**
```js
screen.isScreenRotationLocked((err,isLocked)=>{
if(err.code){
console.error('Failed to get screen rotation lock status. Cause:'+JSON.stringify(err));
return;
}
console.info('Succeeded in getting screen rotation lock status. isLocked:'+JSON.stringify(isLocked));
| isLocked | boolean | Yes | Whether to lock auto rotate. The value **true** means to lock auto rotate, and **false** means the opposite. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **undefined**; otherwise, **err** is an error object.|
| name | string | Yes | Yes | Name of a virtual screen. |
| width | number | Yes | Yes | Width of the virtual screen. |
| height | number | Yes | Yes | Height of the virtual screen. |
| density | number | Yes | Yes | Density of the virtual screen. |
| surfaceId | string | Yes | Yes | Surface ID of the virtual screen.|
## Screen
Implements a **Screen** instance.
Before calling any API in **Screen**, you must use **[getAllScreens()](#screengetallscreens)** or **[createVirtualScreen()](#screencreatevirtualscreen)** to obtain a **Screen** instance.
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the screen orientation is successfully set, **err** is **undefined**; otherwise, **err** is an error object.|
| modeIndex | number | Yes | Index of the mode to set. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the active mode is successfully set, **err** is **undefined**; otherwise, **err** is an error object.|
| densityDpi | number | Yes | Pixel density. The value ranges from 80 to 640. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the pixel density is successfully set, **err** is **undefined**; otherwise, **err** is an error object.|
The **uiAppearance** module provides basic capabilities for managing the system appearance. It allows for color mode configuration currently, and will introduce more features over time.
> **NOTE**
>
> The APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
> The APIs provided by this module are system APIs.
## Modules to Import
```ts
importuiAppearancefrom'@ohos.uiAppearance'
```
## DarkMode
Enumerates the color modes.
| Name| Value| Description|
| -- | -- | -- |
| ALWAYS_DARK | 0 | The system is always in dark mode. |
| ALWAYS_LIGHT | 1 | The system is always in light mode.|