From 34614d6674446f80c8ac6511122a749b7359dfd2 Mon Sep 17 00:00:00 2001 From: liyujie Date: Tue, 19 Aug 2025 15:55:03 +0800 Subject: [PATCH] adjust the codes of design repo to align with the code repo. Signed-off-by: liyujie Change-Id: Ifba4e84cf998bf6f2ae6c56b81ca3708d46078dd --- api/@ohos.arkui.drawableDescriptor.d.ts | 560 +++++++++--------- ...ohos.arkui.drawableDescriptor.static.d.ets | 6 +- 2 files changed, 283 insertions(+), 283 deletions(-) diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index 3cee05526e..5e39e59acf 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,284 +18,282 @@ * @kit ArkUI */ - import image from './@ohos.multimedia.image'; +import image from './@ohos.multimedia.image'; - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since 10 - */ - constructor(); - - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getPixelMap(): image.PixelMap; - } - - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class LayeredDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new LayeredDrawableDescriptor. - * - * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor( - foreground?: DrawableDescriptor, - background?: DrawableDescriptor, - mask?: DrawableDescriptor - ); - - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getForeground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getBackground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getMask(): DrawableDescriptor; - - - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static getMaskClipPath(): string; - } - - /** - * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export class PixelMapDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor(src?: image.PixelMap); - } - - /** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iterations?: number; - } - - /** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class AnimatedDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new AnimatedDrawableDescriptor. - * - * @param { Array } pixelMaps - PixelMap List. - * @param { AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); - } - \ No newline at end of file +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +export declare class DrawableDescriptor { + /** + * Creates a new DrawableDescriptor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi Hide this for inner system use. + * @since 10 + */ + constructor(); + + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getPixelMap(): image.PixelMap; +} + +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +export declare class LayeredDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new LayeredDrawableDescriptor. + * + * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. + * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. + * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + constructor( + foreground?: DrawableDescriptor, + background?: DrawableDescriptor, + mask?: DrawableDescriptor + ); + + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getForeground(): DrawableDescriptor; + + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getBackground(): DrawableDescriptor; + + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + getMask(): DrawableDescriptor; + + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + static getMaskClipPath(): string; +} + +/** + * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ +export declare class PixelMapDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new PixelMapDrawableDescriptor. + * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + constructor(src?: image.PixelMap); +} + +/** + * Animation control options + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +export declare interface AnimationOptions { + /** + * The duration of animation playback once. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + duration?: number; + /** + * Animation playback times. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + iterations?: number; +} + +/** + * Define the data structure for PixelMap animations. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { + /** + * Creates a new AnimatedDrawableDescriptor. + * + * @param { Array } pixelMaps - PixelMap List. + * @param { AnimationOptions } [options] - Animation control options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(pixelMaps: Array, options?: AnimationOptions); +} diff --git a/api/@ohos.arkui.drawableDescriptor.static.d.ets b/api/@ohos.arkui.drawableDescriptor.static.d.ets index e9c0a538cb..8dbd5fd207 100644 --- a/api/@ohos.arkui.drawableDescriptor.static.d.ets +++ b/api/@ohos.arkui.drawableDescriptor.static.d.ets @@ -1,5 +1,6 @@ +'use static'; /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,6 +17,7 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ import image from './@ohos.multimedia.image'; @@ -56,7 +58,7 @@ export declare class DrawableDescriptor { export declare class LayeredDrawableDescriptor extends DrawableDescriptor { /** * Creates a new LayeredDrawableDescriptor. - * + * * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. -- Gitee