diff --git a/api/@ohos.WallpaperExtensionAbility.d.ts b/api/@ohos.WallpaperExtensionAbility.d.ts index 463fb536a151815cca44ae90942afa30f6705513..8e10faf64dce61dd371ee140acab7a154cf0fc06 100644 --- a/api/@ohos.WallpaperExtensionAbility.d.ts +++ b/api/@ohos.WallpaperExtensionAbility.d.ts @@ -24,7 +24,8 @@ * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WallpaperExtensionAbility { /** @@ -34,20 +35,22 @@ declare class WallpaperExtensionAbility { * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onCreate(want: object): void; /** * The onWallpaperChange callback is triggered when the user modifies the wallpaper settings. * - * @param { number } wallpaperType - Indicates the wallpaper type. + * @param { int } wallpaperType - Indicates the wallpaper type. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - onWallpaperChange(wallpaperType: number): void; + onWallpaperChange(wallpaperType: int): void; /** * Called once to destroy the extension ability. @@ -55,7 +58,8 @@ declare class WallpaperExtensionAbility { * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onDestroy(): void; } diff --git a/api/@ohos.wallpaper.d.ts b/api/@ohos.wallpaper.d.ts index 300cd16ce5fbb431fb98789f6f8d42746cffe1e6..f19d1bfee299f1faf18db54de05086a30c08a090 100644 --- a/api/@ohos.wallpaper.d.ts +++ b/api/@ohos.wallpaper.d.ts @@ -26,7 +26,8 @@ import image from './@ohos.multimedia.image'; * * @namespace wallpaper * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace wallpaper { /** @@ -34,68 +35,76 @@ declare namespace wallpaper { * * @typedef RgbaColor * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} * @deprecated since 9 + * @arkts 1.1&1.2 */ interface RgbaColor { /** * The range is 0 to 255. * - * @type { number } + * @type { long } * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} * @deprecated since 9 + * @arkts 1.1&1.2 */ - red: number; + red: long; /** * The range is 0 to 255. * - * @type { number } + * @type { long } * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} * @deprecated since 9 + * @arkts 1.1&1.2 */ - green: number; + green: long; /** * The range is 0 to 255. * - * @type { number } + * @type { long } * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} * @deprecated since 9 + * @arkts 1.1&1.2 */ - blue: number; + blue: long; /** * The range is 0 to 255. * - * @type { number } + * @type { long } * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} * @deprecated since 9 + * @arkts 1.1&1.2 */ - alpha: number; + alpha: long; } /** * Indicates wallpaper type. * - * @enum { number } WallpaperType + * @enum { int } WallpaperType * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WallpaperType { /** * Indicates the home screen wallpaper. * * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ WALLPAPER_SYSTEM, /** * Indicates the lock screen wallpaper. * * @syscap SystemCapability.MiscServices.Wallpaper - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ WALLPAPER_LOCKSCREEN } @@ -106,7 +115,8 @@ declare namespace wallpaper { * @typedef WallpaperInfo * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WallpaperInfo { /** @@ -115,7 +125,8 @@ declare namespace wallpaper { * @type { FoldState } * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ foldState: FoldState; /** @@ -124,7 +135,8 @@ declare namespace wallpaper { * @type { RotateState } * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ rotateState: RotateState; /** @@ -133,7 +145,8 @@ declare namespace wallpaper { * @type { string } * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ source: string; } @@ -141,10 +154,11 @@ declare namespace wallpaper { /** * Define the folding state of wallpaper * - * @enum { number } FoldState + * @enum { int } FoldState * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FoldState { /** @@ -152,7 +166,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, /** @@ -160,7 +175,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ UNFOLD_ONCE_STATE = 1, /** @@ -168,7 +184,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ UNFOLD_TWICE_STATE = 2 } @@ -176,10 +193,11 @@ declare namespace wallpaper { /** * Define the rotation state of wallpaper * - * @enum { number } RotateState + * @enum { int } RotateState * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ enum RotateState { /** @@ -187,7 +205,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ PORTRAIT = 0, /** @@ -195,7 +214,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ LANDSCAPE = 1 } @@ -203,10 +223,11 @@ declare namespace wallpaper { /** * Indicates the resource type of the wallpaper. * - * @enum { number } WallpaperResourceType + * @enum { int } WallpaperResourceType * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WallpaperResourceType { /** @@ -214,7 +235,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, /** @@ -222,7 +244,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PICTURE, /** @@ -230,7 +253,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO, /** @@ -238,7 +262,8 @@ declare namespace wallpaper { * * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PACKAGE } @@ -275,7 +300,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getColorsSync(wallpaperType: WallpaperType): Array; @@ -352,13 +378,14 @@ declare namespace wallpaper { /** * Obtains the minimum height of the wallpaper. in pixels. returns 0 if no wallpaper has been set. * - * @returns { number } the number returned by the function. + * @returns { int } the number returned by the function. * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getMinHeightSync(): number; + function getMinHeightSync(): int; /** * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. @@ -383,13 +410,14 @@ declare namespace wallpaper { /** * Obtains the minimum width of the wallpaper. in pixels. returns 0 if no wallpaper has been set. * - * @returns { number } the number returned by the function. + * @returns { int } the number returned by the function. * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getMinWidthSync(): number; + function getMinWidthSync(): int; /** * Checks whether to allow the application to change the wallpaper for the current user. @@ -471,7 +499,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function restore(wallpaperType: WallpaperType, callback: AsyncCallback): void; @@ -487,7 +516,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function restore(wallpaperType: WallpaperType): Promise; @@ -534,7 +564,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback: AsyncCallback): void; @@ -551,7 +582,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise; @@ -593,7 +625,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getImage(wallpaperType: WallpaperType, callback: AsyncCallback): void; @@ -609,7 +642,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getImage(wallpaperType: WallpaperType): Promise; @@ -626,7 +660,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setVideo(source: string, wallpaperType: WallpaperType, callback: AsyncCallback): void; @@ -643,7 +678,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setVideo(source: string, wallpaperType: WallpaperType): Promise; @@ -660,7 +696,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function setCustomWallpaper(source: string, wallpaperType: WallpaperType, callback: AsyncCallback): void; @@ -677,7 +714,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function setCustomWallpaper(source: string, wallpaperType: WallpaperType): Promise; @@ -704,7 +742,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function on( type: 'wallpaperChange', @@ -734,7 +773,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function off( type: 'wallpaperChange', @@ -757,7 +797,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAllWallpapers(wallpaperInfos: Array, wallpaperType: WallpaperType): Promise; @@ -778,7 +819,8 @@ declare namespace wallpaper { * @throws { BusinessError } 202 - permission verification failed, application which is not a system application uses system API. * @syscap SystemCapability.MiscServices.Wallpaper * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getWallpaperByState(wallpaperType: WallpaperType, foldState: FoldState, rotateState: RotateState): Promise; }