| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the wallpaper is reset, **err** is **undefined**. Otherwise, **err** is an error object.|
**Example**
...
...
@@ -166,7 +168,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the wallpaper is set, **err** is **undefined**. Otherwise, **err** is an error object.|
**Example**
...
...
@@ -256,7 +258,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| source | string \|[image.PixelMap](js-apis-image.md#pixelmap7) | Yes| URI of a JPEG or PNG file, or pixel map of a PNG file.|
| callback | AsyncCallback<[image.PixelMap](js-apis-image.md#pixelmap7)> | Yes| Callback used to return the result. If the operation is successful, the pixel map of the wallpaper is returned. Otherwise, error information is returned.|
**Example**
...
...
@@ -343,7 +345,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses a p
@@ -378,7 +380,7 @@ Subscribes to the wallpaper color change event.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to subscribe to. The value **'colorChange'** indicates subscribing to the wallpaper color change event.|
| callback | function | Yes| Callback triggered when the wallpaper color changes. The wallpaper type and main colors are returned.<br>- colors<br> Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolor).<br>- wallpaperType<br> Wallpaper type.|
| callback | function | Yes| Callback triggered when the wallpaper color changes. The wallpaper type and main colors are returned.<br>- colors<br> Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolordeprecated).<br>- wallpaperType<br> Wallpaper type.|
**Example**
...
...
@@ -410,7 +412,7 @@ Unsubscribes from the wallpaper color change event.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to unsubscribe from. The value **'colorChange'** indicates unsubscribing from the wallpaper color change event.|
| callback | function | No| Callback for the wallpaper color change event. If this parameter is not set, this API unsubscribes from all callbacks corresponding to **type**.<br>- colors<br> Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolor).<br>- wallpaperType<br> Wallpaper type.|
| callback | function | No| Callback for the wallpaper color change event. If this parameter is not set, this API unsubscribes from all callbacks corresponding to **type**.<br>- colors<br> Main color information of the wallpaper. For details, see [RgbaColor](#rgbacolordeprecated).<br>- wallpaperType<br> Wallpaper type.|
**Example**
...
...
@@ -455,8 +457,8 @@ Obtains the main color information of the wallpaper of the specified type. This
| callback | AsyncCallback<Array<[RgbaColor](#rgbacolordeprecated)>> | Yes| Callback used to return the main color information of the wallpaper.|
**Example**
...
...
@@ -486,13 +488,13 @@ Obtains the main color information of the wallpaper of the specified type. This
| callback | AsyncCallback<number> | Yes| Callback used to return the wallpaper ID. If the wallpaper of the specified type is configured, a number greater than or equal to **0** is returned. Otherwise, **-1** is returned. The value ranges from -1 to (2^31-1).|
**Example**
...
...
@@ -551,7 +553,7 @@ Obtains the ID of the wallpaper of the specified type. This API uses a promise t
| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the wallpaper is reset, **err** is **undefined**. Otherwise, **err** is an error object.|
**Example**
...
...
@@ -852,7 +854,7 @@ Resets the wallpaper of the specified type to the default wallpaper. This API us
| callback | AsyncCallback<void> | Yes| Callback used to return the result. If the wallpaper is set, **err** is **undefined**. Otherwise, **err** is an error object.|
**Example**
...
...
@@ -946,7 +948,7 @@ Sets a specified source as the wallpaper of a specified type. This API uses a pr
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| source | string \|[image.PixelMap](js-apis-image.md#pixelmap7) | Yes| URI of a JPEG or PNG file, or pixel map of a PNG file.|
| callback | AsyncCallback<number> | Yes| Callback used to return the result. If the operation is successful, the file descriptor ID to the wallpaper is returned. Otherwise, error information is returned.|
**Example**
...
...
@@ -1037,7 +1039,7 @@ Obtains the wallpaper of the specified type. This API uses a promise to return t
| callback | AsyncCallback<image.PixelMap> | Yes| Callback used to return the result. If the operation is successful, the pixel map of the wallpaper is returned. Otherwise, error information is returned.|
**Example**
...
...
@@ -1110,7 +1112,7 @@ Obtains the pixel map for the wallpaper of the specified type. This API uses a p