From 338d79e138409bcc47882d07d0db7d4fb26ffa23 Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Thu, 14 Aug 2025 15:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0modifier=201.1=E5=92=8C1.2=20?= =?UTF-8?q?Signed-off-by:guanzengkun=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@internal/component/ets/counter.d.ts | 30 +- api/@internal/component/ets/data_panel.d.ts | 87 +- api/@internal/component/ets/gauge.d.ts | 86 +- api/@internal/component/ets/pattern_lock.d.ts | 112 +-- api/@ohos.arkui.drawableDescriptor.d.ts | 791 +++++++----------- ...ohos.arkui.drawableDescriptor.static.d.ets | 170 ++++ api/arkui/CounterModifier.d.ts | 1 - api/arkui/CounterModifier.static.d.ets | 33 + api/arkui/DataPanelModifier.d.ts | 1 - api/arkui/DataPanelModifier.static.d.ets | 32 + api/arkui/GaugeModifier.d.ts | 26 +- api/arkui/GaugeModifier.static.d.ets | 32 + api/arkui/ImageAnimatorModifier.d.ts | 26 +- api/arkui/ImageAnimatorModifier.static.d.ets | 32 + api/arkui/LoadingProgressModifier.d.ts | 26 +- .../LoadingProgressModifier.static.d.ets | 32 + api/arkui/PatternLockModifier.d.ts | 26 +- api/arkui/PatternLockModifier.static.d.ets | 32 + api/arkui/ProgressModifier.d.ts | 1 - api/arkui/ProgressModifier.static.d.ets | 32 + api/arkui/QRCodeModifier.d.ts | 15 +- api/arkui/QRCodeModifier.static.d.ets | 32 + api/arkui/TextClockModifier.d.ts | 26 +- api/arkui/TextClockModifier.static.d.ets | 32 + api/arkui/TextTimerModifier.d.ts | 26 +- api/arkui/TextTimerModifier.static.d.ets | 32 + api/arkui/component/counter.static.d.ets | 71 ++ api/arkui/component/dataPanel.static.d.ets | 226 +++++ api/arkui/component/gauge.static.d.ets | 235 ++++++ api/arkui/component/patternLock.static.d.ets | 255 ++++++ 30 files changed, 1734 insertions(+), 824 deletions(-) create mode 100644 api/@ohos.arkui.drawableDescriptor.static.d.ets create mode 100644 api/arkui/CounterModifier.static.d.ets create mode 100644 api/arkui/DataPanelModifier.static.d.ets create mode 100644 api/arkui/GaugeModifier.static.d.ets create mode 100644 api/arkui/ImageAnimatorModifier.static.d.ets create mode 100644 api/arkui/LoadingProgressModifier.static.d.ets create mode 100644 api/arkui/PatternLockModifier.static.d.ets create mode 100644 api/arkui/ProgressModifier.static.d.ets create mode 100644 api/arkui/QRCodeModifier.static.d.ets create mode 100644 api/arkui/TextClockModifier.static.d.ets create mode 100644 api/arkui/TextTimerModifier.static.d.ets create mode 100644 api/arkui/component/counter.static.d.ets create mode 100644 api/arkui/component/dataPanel.static.d.ets create mode 100644 api/arkui/component/gauge.static.d.ets create mode 100644 api/arkui/component/patternLock.static.d.ets diff --git a/api/@internal/component/ets/counter.d.ts b/api/@internal/component/ets/counter.d.ts index 29b552d0b9..9fb6cf9cc9 100644 --- a/api/@internal/component/ets/counter.d.ts +++ b/api/@internal/component/ets/counter.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -import { VoidCallback } from './units' -/*** endif */ - /** * Counter component, which provides corresponding increment or decrement counting operations. * @@ -55,9 +50,7 @@ import { VoidCallback } from './units' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ interface CounterInterface { /** @@ -92,8 +85,7 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): CounterAttribute; } @@ -130,9 +122,7 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ declare class CounterAttribute extends CommonMethod { /** @@ -183,8 +173,7 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onInc(event: VoidCallback): CounterAttribute; @@ -236,8 +225,7 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDec(event: VoidCallback): CounterAttribute; @@ -258,8 +246,7 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableDec(value: boolean): CounterAttribute; @@ -280,8 +267,7 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableInc(value: boolean): CounterAttribute; } @@ -315,7 +301,6 @@ declare class CounterAttribute extends CommonMethod { * @form * @atomicservice * @since 11 - * @noninterop */ declare const CounterInstance: CounterAttribute; @@ -348,6 +333,5 @@ declare const CounterInstance: CounterAttribute; * @form * @atomicservice * @since 11 - * @noninterop */ declare const Counter: CounterInterface; diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 9783b377ad..02fa057c4e 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length } from './units' -import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common' -/*** endif */ - /** * DataPanelType enum * @@ -55,8 +50,7 @@ import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum DataPanelType { /** @@ -87,8 +81,7 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Line, @@ -120,8 +113,7 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Circle, } @@ -138,8 +130,7 @@ declare enum DataPanelType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ColorStop { /** @@ -155,8 +146,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color: ResourceColor; @@ -173,8 +163,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset: Length; } @@ -192,8 +181,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class LinearGradient { /** @@ -211,8 +199,7 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(colorStops: ColorStop[]); } @@ -234,8 +221,7 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface DataPanelShadowOptions extends MultiShadowOptions { /** @@ -255,8 +241,7 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ colors?: Array; } @@ -293,8 +278,7 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface DataPanelOptions { /** @@ -329,8 +313,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ values: number[]; @@ -366,8 +349,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ max?: number; @@ -403,8 +385,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type?: DataPanelType; } @@ -441,9 +422,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ interface DataPanelInterface { /** @@ -482,8 +461,7 @@ interface DataPanelInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options: DataPanelOptions): DataPanelAttribute; } @@ -496,8 +474,7 @@ interface DataPanelInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -507,8 +484,7 @@ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -598,8 +571,7 @@ declare class DataPanelAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closeEffect(value: boolean): DataPanelAttribute; @@ -620,8 +592,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valueColors(value: Array): DataPanelAttribute; @@ -642,8 +613,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ trackBackgroundColor(value: ResourceColor): DataPanelAttribute; @@ -664,8 +634,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth(value: Length): DataPanelAttribute; @@ -686,8 +655,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; @@ -699,8 +667,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): DataPanelAttribute; } @@ -734,7 +701,6 @@ declare class DataPanelAttribute extends CommonMethod { * @form * @atomicservice * @since 11 - * @noninterop */ declare const DataPanel: DataPanelInterface @@ -767,6 +733,5 @@ declare const DataPanel: DataPanelInterface * @form * @atomicservice * @since 11 - * @noninterop */ declare const DataPanelInstance: DataPanelAttribute; diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 2121c7bb5b..9b39da9c99 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod,CommonConfiguration,ContentModifier,MultiShadowOptions,Optional } from './common' -import { CustomBuilder } from './builder' -import { ResourceStr,Dimension,ResourceColor,Length } from './units' -import { LinearGradient } from './dataPanel' -/*** endif */ - /** * Defines Gauge constructor options. * @@ -33,8 +26,7 @@ import { LinearGradient } from './dataPanel' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface GaugeOptions { /** @@ -80,8 +72,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ value: number; @@ -128,8 +119,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ min?: number; @@ -176,8 +166,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ max?: number; } @@ -214,9 +203,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ interface GaugeInterface { /** @@ -275,8 +262,7 @@ interface GaugeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: GaugeOptions): GaugeAttribute; } @@ -298,8 +284,7 @@ interface GaugeInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeShadowOptions extends MultiShadowOptions {} @@ -318,8 +303,7 @@ declare interface GaugeShadowOptions extends MultiShadowOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeIndicatorOptions { @@ -340,8 +324,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ icon?: ResourceStr; @@ -362,8 +345,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ space?: Dimension; } @@ -376,8 +358,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -387,8 +368,7 @@ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -482,8 +458,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value(value: number): GaugeAttribute; @@ -523,8 +498,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startAngle(angle: number): GaugeAttribute; @@ -564,8 +538,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endAngle(angle: number): GaugeAttribute; @@ -605,8 +578,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute; @@ -646,8 +618,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth(length: Length): GaugeAttribute; @@ -668,8 +639,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ description(value: CustomBuilder): GaugeAttribute; @@ -690,8 +660,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ trackShadow(value: GaugeShadowOptions): GaugeAttribute; @@ -712,8 +681,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicator(value: GaugeIndicatorOptions): GaugeAttribute; @@ -726,8 +694,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ privacySensitive(isPrivacySensitiveMode: Optional): GaugeAttribute; @@ -739,8 +706,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): GaugeAttribute; } @@ -774,7 +740,6 @@ declare class GaugeAttribute extends CommonMethod { * @form * @atomicservice * @since 11 - * @noninterop */ declare const Gauge: GaugeInterface; @@ -807,7 +772,6 @@ declare const Gauge: GaugeInterface; * @form * @atomicservice * @since 11 - * @noninterop */ declare const GaugeInstance: GaugeAttribute; diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 30b8b6cb0a..9231675816 100644 --- a/api/@internal/component/ets/pattern_lock.d.ts +++ b/api/@internal/component/ets/pattern_lock.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length } from './units' -import { LengthMetrics } from '../Graphics' -import { CommonMethod, Callback, Optional } from './common' -/*** endif */ - /** * The challenge result based on input pattern for control pattern lock component. * @enum { number } @@ -37,8 +31,7 @@ import { CommonMethod, Callback, Optional } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum PatternLockChallengeResult { /** @@ -52,8 +45,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CORRECT = 1, /** @@ -67,8 +59,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ WRONG = 2 } @@ -80,8 +71,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CircleStyleOptions { /** @@ -91,8 +81,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: ResourceColor; @@ -103,8 +92,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: LengthMetrics; @@ -115,8 +103,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableWaveEffect?: boolean; @@ -127,8 +114,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enableForeground?: boolean; } @@ -152,8 +138,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class PatternLockController { /** @@ -175,8 +160,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); @@ -202,16 +186,6 @@ declare class PatternLockController { * @since 12 */ reset(); - /** - * Reset pattern lock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - reset(): void; /** * Set challenge result. @@ -226,8 +200,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setChallengeResult(result: PatternLockChallengeResult): void; } @@ -254,9 +227,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 12 */ interface PatternLockInterface { /** @@ -284,8 +255,7 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (controller?: PatternLockController): PatternLockAttribute; } @@ -312,9 +282,7 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 12 */ declare class PatternLockAttribute extends CommonMethod { /** @@ -346,8 +314,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ sideLength(value: Length): PatternLockAttribute; @@ -380,8 +347,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ circleRadius(value: Length): PatternLockAttribute; @@ -410,8 +376,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundColor(value: ResourceColor): PatternLockAttribute; @@ -440,8 +405,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ regularColor(value: ResourceColor): PatternLockAttribute; @@ -470,8 +434,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedColor(value: ResourceColor): PatternLockAttribute; @@ -500,8 +463,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ activeColor(value: ResourceColor): PatternLockAttribute; @@ -530,8 +492,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pathColor(value: ResourceColor): PatternLockAttribute; @@ -564,8 +525,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pathStrokeWidth(value: number | string): PatternLockAttribute; @@ -594,8 +554,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onPatternComplete(callback: (input: Array) => void): PatternLockAttribute; @@ -626,8 +585,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ autoReset(value: boolean): PatternLockAttribute; @@ -650,19 +608,7 @@ declare class PatternLockAttribute extends CommonMethod { * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; - - /** - * Called when connecting to a grid dot. - * @param { Callback } callback - A callback instance used when connection to a grid dot. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onDotConnect(callback: Callback): PatternLockAttribute; - + /** * Sets the background circle style for the dots in a grid when they are in the activated state. * @@ -671,8 +617,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ activateCircleStyle(options: Optional): PatternLockAttribute; @@ -685,8 +630,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ skipUnselectedPoint(skipped: boolean): PatternLockAttribute; } @@ -711,7 +655,6 @@ declare class PatternLockAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 12 - * @noninterop */ declare const PatternLock: PatternLockInterface; @@ -735,6 +678,5 @@ declare const PatternLock: PatternLockInterface; * @crossplatform * @atomicservice * @since 12 - * @noninterop */ declare const PatternLockInstance: PatternLockAttribute; diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index e57f057fc7..3cee05526e 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -18,515 +18,284 @@ * @kit ArkUI */ -import image from './@ohos.multimedia.image'; + import image from './@ohos.multimedia.image'; -/** - * Indicates the return result of the data to be fetched. - * - * @typedef DrawableDescriptorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorResult { - /** - * DrawableDescriptor width.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly width?: number; - - /** - * DrawableDescriptor height.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly height?: number; -} - -/** - * DrawableDescriptor's option which is used in constructor. - * - * @typedef DrawableDescriptorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorOptions { - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - -/** - * 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -export declare class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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; - - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getPixelMap(): image.PixelMap | undefined; - - /** - * Get original width of drawable object. - * - * @returns { number } Return the width of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalWidth(): number; - - /** - * Get original height of drawable object. - * - * @returns { number } Return the height of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalHeight(): number; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { Promise } Return the promise returned by the funciton. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetch(): Promise; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { DrawableDescriptorResult } Return the result of the DrawableDescriptor object. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchSync(): DrawableDescriptorResult; -} - -/** - * 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 foreground. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getForeground(): DrawableDescriptor | undefined; - - /** - * 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 background. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getBackground(): DrawableDescriptor | undefined; - - /** - * 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 DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getMask(): DrawableDescriptor | undefined; - - - /** - * 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(src?: image.PixelMap); - - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap | ResourceStr } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @param { DrawableDescriptorOptions } options - Indicates the option to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(src?: image.PixelMap | ResourceStr, options?: DrawableDescriptorOptions); -} - -/** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -export declare interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations?: number; - - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - -/** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); - - /** - * Creates a new AnimatedDrawableDescriptor. - * @param { Array | ResourceStr } pixelMaps - Indicates the resource to create AnimatedDrawableDescriptor. - * @param { ?AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(pixelMaps: Array | ResourceStr, options?: AnimationOptions); - - /** - * Get the running status of animation. - * - * @returns { boolean } Return the running status of animation. - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - isRunning(): boolean; - - /** - * Start the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - start(): void; - - /** - * Stop the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - stop(): void; -} + /** + * 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 diff --git a/api/@ohos.arkui.drawableDescriptor.static.d.ets b/api/@ohos.arkui.drawableDescriptor.static.d.ets new file mode 100644 index 0000000000..e9c0a538cb --- /dev/null +++ b/api/@ohos.arkui.drawableDescriptor.static.d.ets @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2023-2024 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import image from './@ohos.multimedia.image'; + +/** + * Use the DrawableDescriptor class to get drawable image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class DrawableDescriptor { + /** + * Creates a new DrawableDescriptor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi Hide this for inner system use. + * @since 20 + */ + constructor(); + + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPixelMap(): image.PixelMap | undefined; +} + +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor( + foreground?: DrawableDescriptor, + background?: DrawableDescriptor, + mask?: DrawableDescriptor + ); + + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getForeground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getBackground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getMask(): DrawableDescriptor | undefined; + + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static getMaskClipPath(): string; +} + +/** + * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor(src?: image.PixelMap); +} + +/** + * Animation control options + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface AnimationOptions { + /** + * The duration of animation playback once. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; + /** + * Animation playback times. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iterations?: number; +} + +/** + * Define the data structure for PixelMap animations. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor(pixelMaps: Array, options?: AnimationOptions); +} diff --git a/api/arkui/CounterModifier.d.ts b/api/arkui/CounterModifier.d.ts index fdf0e2d4e4..c395cd96f5 100755 --- a/api/arkui/CounterModifier.d.ts +++ b/api/arkui/CounterModifier.d.ts @@ -39,7 +39,6 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ export declare class CounterModifier extends CounterAttribute implements AttributeModifier { diff --git a/api/arkui/CounterModifier.static.d.ets b/api/arkui/CounterModifier.static.d.ets new file mode 100644 index 0000000000..6e7332acc7 --- /dev/null +++ b/api/arkui/CounterModifier.static.d.ets @@ -0,0 +1,33 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ + +import { AttributeModifier } from './component/common'; +import { CounterAttribute } from './component/counter'; + +/** + * Defines Counter Modifier + * + * @extends CounterAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class CounterModifier extends CounterAttribute implements AttributeModifier {} diff --git a/api/arkui/DataPanelModifier.d.ts b/api/arkui/DataPanelModifier.d.ts index bec3fa3e6d..84943a1dfd 100755 --- a/api/arkui/DataPanelModifier.d.ts +++ b/api/arkui/DataPanelModifier.d.ts @@ -39,7 +39,6 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ export declare class DataPanelModifier extends DataPanelAttribute implements AttributeModifier { diff --git a/api/arkui/DataPanelModifier.static.d.ets b/api/arkui/DataPanelModifier.static.d.ets new file mode 100644 index 0000000000..7c8598720e --- /dev/null +++ b/api/arkui/DataPanelModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { DataPanelAttribute } from './component/dataPanel'; + +/** + * Defines DataPanel Modifier + * + * @extends DataPanelAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class DataPanelModifier extends DataPanelAttribute implements AttributeModifier {} diff --git a/api/arkui/GaugeModifier.d.ts b/api/arkui/GaugeModifier.d.ts index c3e3233da0..ae81e8c6c0 100755 --- a/api/arkui/GaugeModifier.d.ts +++ b/api/arkui/GaugeModifier.d.ts @@ -38,18 +38,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier { + export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { GaugeAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: GaugeAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { GaugeAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: GaugeAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/GaugeModifier.static.d.ets b/api/arkui/GaugeModifier.static.d.ets new file mode 100644 index 0000000000..5cef8e49fb --- /dev/null +++ b/api/arkui/GaugeModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { GaugeAttribute } from './component/gauge'; + +/** + * Defines Gauge Modifier + * + * @extends GaugeAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class GaugeModifier extends GaugeAttribute implements AttributeModifier {} diff --git a/api/arkui/ImageAnimatorModifier.d.ts b/api/arkui/ImageAnimatorModifier.d.ts index a2be6d6106..1d218be070 100755 --- a/api/arkui/ImageAnimatorModifier.d.ts +++ b/api/arkui/ImageAnimatorModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier { + export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { ImageAnimatorAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: ImageAnimatorAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { ImageAnimatorAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: ImageAnimatorAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/ImageAnimatorModifier.static.d.ets b/api/arkui/ImageAnimatorModifier.static.d.ets new file mode 100644 index 0000000000..d529ab6b33 --- /dev/null +++ b/api/arkui/ImageAnimatorModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { ImageAnimatorAttribute } from './component/imageAnimator'; + +/** + * Defines ImageAnimator Modifier + * + * @extends ImageAnimatorAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ImageAnimatorModifier extends ImageAnimatorAttribute implements AttributeModifier {} diff --git a/api/arkui/LoadingProgressModifier.d.ts b/api/arkui/LoadingProgressModifier.d.ts index dae599ed59..aff18090c2 100755 --- a/api/arkui/LoadingProgressModifier.d.ts +++ b/api/arkui/LoadingProgressModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier { + export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { LoadingProgressAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: LoadingProgressAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { LoadingProgressAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: LoadingProgressAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/LoadingProgressModifier.static.d.ets b/api/arkui/LoadingProgressModifier.static.d.ets new file mode 100644 index 0000000000..90113fe5c9 --- /dev/null +++ b/api/arkui/LoadingProgressModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { LoadingProgressAttribute } from './component/loadingProgress'; + +/** + * Defines LoadingProgress Modifier + * + * @extends LoadingProgressAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class LoadingProgressModifier extends LoadingProgressAttribute implements AttributeModifier {} diff --git a/api/arkui/PatternLockModifier.d.ts b/api/arkui/PatternLockModifier.d.ts index 7510b65332..1a46b6dc48 100755 --- a/api/arkui/PatternLockModifier.d.ts +++ b/api/arkui/PatternLockModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier { + export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { PatternLockAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: PatternLockAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { PatternLockAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: PatternLockAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/PatternLockModifier.static.d.ets b/api/arkui/PatternLockModifier.static.d.ets new file mode 100644 index 0000000000..138b23d4c2 --- /dev/null +++ b/api/arkui/PatternLockModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { PatternLockAttribute } from './component/patternLock'; + +/** + * Defines PatternLock Modifier + * + * @extends PatternLockAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PatternLockModifier extends PatternLockAttribute implements AttributeModifier {} diff --git a/api/arkui/ProgressModifier.d.ts b/api/arkui/ProgressModifier.d.ts index ac6897282a..55c9ad0ac0 100755 --- a/api/arkui/ProgressModifier.d.ts +++ b/api/arkui/ProgressModifier.d.ts @@ -39,7 +39,6 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ export declare class ProgressModifier extends ProgressAttribute implements AttributeModifier { diff --git a/api/arkui/ProgressModifier.static.d.ets b/api/arkui/ProgressModifier.static.d.ets new file mode 100644 index 0000000000..ebaee4f49d --- /dev/null +++ b/api/arkui/ProgressModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { ProgressAttribute } from './component/progress'; + +/** + * Defines Progress Modifier + * + * @extends ProgressAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ProgressModifier extends ProgressAttribute implements AttributeModifier {} diff --git a/api/arkui/QRCodeModifier.d.ts b/api/arkui/QRCodeModifier.d.ts index 0ec51bac5f..9af7096a96 100644 --- a/api/arkui/QRCodeModifier.d.ts +++ b/api/arkui/QRCodeModifier.d.ts @@ -25,12 +25,23 @@ * Defines QRCode Modifier * * @extends QRCodeAttribute - * @implements AttributeModifier + * @implements { AttributeModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @atomicservice * @since 12 - * @noninterop */ +/** + * Defines QRCode Modifier + * + * @extends QRCodeAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @noninterop + */ export declare class QRCodeModifier extends QRCodeAttribute implements AttributeModifier { /** diff --git a/api/arkui/QRCodeModifier.static.d.ets b/api/arkui/QRCodeModifier.static.d.ets new file mode 100644 index 0000000000..10159e95ee --- /dev/null +++ b/api/arkui/QRCodeModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { QRCodeAttribute } from './component/qrcode'; + +/** + * Defines QRCode Modifier + * + * @extends QRCodeAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class QRCodeModifier extends QRCodeAttribute implements AttributeModifier {} diff --git a/api/arkui/TextClockModifier.d.ts b/api/arkui/TextClockModifier.d.ts index d53c2c4dce..6202ad05ad 100755 --- a/api/arkui/TextClockModifier.d.ts +++ b/api/arkui/TextClockModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier { + export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TextClockAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TextClockAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { TextClockAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TextClockAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/TextClockModifier.static.d.ets b/api/arkui/TextClockModifier.static.d.ets new file mode 100644 index 0000000000..298e919c3b --- /dev/null +++ b/api/arkui/TextClockModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { TextClockAttribute } from './component/textClock'; + +/** + * Defines TextClock Modifier + * + * @extends TextClockAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextClockModifier extends TextClockAttribute implements AttributeModifier {} diff --git a/api/arkui/TextTimerModifier.d.ts b/api/arkui/TextTimerModifier.d.ts index ee31eba0b9..077408c26a 100755 --- a/api/arkui/TextTimerModifier.d.ts +++ b/api/arkui/TextTimerModifier.d.ts @@ -39,18 +39,18 @@ * @crossplatform * @atomicservice * @since 20 - * @noninterop */ -export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier { + export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier { - /** - * Defines the normal update attribute function. - * - * @param { TextTimerAttribute } instance - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - applyNormalAttribute?(instance: TextTimerAttribute): void; -} + /** + * Defines the normal update attribute function. + * + * @param { TextTimerAttribute } instance + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + applyNormalAttribute?(instance: TextTimerAttribute): void; + } + \ No newline at end of file diff --git a/api/arkui/TextTimerModifier.static.d.ets b/api/arkui/TextTimerModifier.static.d.ets new file mode 100644 index 0000000000..bf0eb6339b --- /dev/null +++ b/api/arkui/TextTimerModifier.static.d.ets @@ -0,0 +1,32 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +import { AttributeModifier } from './component/common'; +import { TextTimerAttribute } from './component/textTimer'; + +/** + * Defines TextTimer Modifier + * + * @extends TextTimerAttribute + * @implements { AttributeModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextTimerModifier extends TextTimerAttribute implements AttributeModifier {} diff --git a/api/arkui/component/counter.static.d.ets b/api/arkui/component/counter.static.d.ets new file mode 100644 index 0000000000..94b299fd73 --- /dev/null +++ b/api/arkui/component/counter.static.d.ets @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021-2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use static'; + +/** + * @file + * @kit ArkUI + * @arkts static + */ +import { CommonMethod } from './common'; +import { VoidCallback } from './units'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +export declare interface CounterAttribute extends CommonMethod { + /** + * Listen to the event that the value increases. + * Anonymous Object Rectification. + * + * @param { VoidCallback } event + * @returns { CounterAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onInc(event: VoidCallback | undefined): this; + /** + * Listens to the number decrease event. + * Anonymous Object Rectification. + * + * @param { VoidCallback } event + * @returns { CounterAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDec(event: VoidCallback | undefined): this; + /** + * Indicates whether the decrease button of counter component is available or not. + * + * @param { boolean } value - If true, the decrease button is available and can respond to operations such as clicking. If false, click operations are not responded. + * @returns { CounterAttribute } The attribute of the counter. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableDec(value: boolean | undefined): this; + /** + * Indicates whether the increase button of counter component is available or not. + * + * @param { boolean } value - If true, the increase button is available and can respond to operations such as clicking. If false, click operations are not responded. + * @returns { CounterAttribute } The attribute of the counter. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableInc(value: boolean | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function Counter( +@memo +content_?: () => void): CounterAttribute; diff --git a/api/arkui/component/dataPanel.static.d.ets b/api/arkui/component/dataPanel.static.d.ets new file mode 100644 index 0000000000..41e2b7cb19 --- /dev/null +++ b/api/arkui/component/dataPanel.static.d.ets @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2021-2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use static'; + +/** + * @file + * @kit ArkUI + * @arkts static + */ +import { ResourceColor, Length } from './units'; +import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * DataPanelType enum + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum DataPanelType { + /** + * Line Type + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Line, + /** + * Line Rainbow + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Circle +} +/** + * ColorStop type + * @typedef { object } ColorStop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ColorStop { + /** + * Color property. + * @type { ResourceColor } color - the color value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color: ResourceColor; + /** + * Offset property. + * @type { Length } offset - the color offset. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset: Length; +} +/** + * LinearGradient class + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class LinearGradient { + /** + * Constructor. + * + * @param { ColorStop[] } colorStops - the LinearGradient constructor parameter. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(colorStops: ColorStop[]); +} +/** + * Defines the options of Shadow. + * + * @extends MultiShadowOptions + * @interface DataPanelShadowOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface DataPanelShadowOptions extends MultiShadowOptions { + /** + * Current shadow colors. + * + * @type { ?Array } + * @default Consistent with valueColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + colors?: Array; +} +/** + * Defines the options of DataPanel. + * + * @interface DataPanelOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface DataPanelOptions { + /** + * Current data value. the max length is 9. + * + * @type { number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + values: number[]; + /** + * Maximum value of the current data. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + max?: number; + /** + * DataPanel Type + * + * @type { ?DataPanelType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type?: DataPanelType; +} +/** + * DataPanelConfiguration used by dataPanel content modifier + * + * @extends CommonConfiguration + * @interface DataPanelConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface DataPanelConfiguration extends CommonConfiguration { + /** + * Current data value. the max length is 9. + * + * @type { number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + values: number[]; + /** + * Maximum value of the current data. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + maxValue: number; +} +export declare interface DataPanelAttribute extends CommonMethod { + /** + * Disable the special effect of the data ratio chart. + * + * @param { boolean } value + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + closeEffect(value: boolean | undefined): this; + /** + * Set the value colors of the data ratio chart. + * + * @param { Array } value - the value colors of the data ratio chart. + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + valueColors(value: Array | undefined): this; + /** + * Set track background color of the data ratio chart. + * + * @param { ResourceColor } value - track background color of the data ratio chart. + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + trackBackgroundColor(value: ResourceColor | undefined): this; + /** + * Set the stroke width of the data ratio chart. + * + * @param { Length } value - the stroke width of the data ratio chart. + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth(value: Length | undefined): this; + /** + * Set the shadow width of the data ratio chart. + * + * @param { DataPanelShadowOptions } value - the track shadow width of the data ratio chart. + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + trackShadow(value: DataPanelShadowOptions | undefined): this; + /** + * Set the content modifier of data panel. + * + * @param { ContentModifier } modifier - The content modifier of data panel. + * @returns { DataPanelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function DataPanel(options: DataPanelOptions, +@memo +content_?: () => void): DataPanelAttribute; diff --git a/api/arkui/component/gauge.static.d.ets b/api/arkui/component/gauge.static.d.ets new file mode 100644 index 0000000000..8f727eab91 --- /dev/null +++ b/api/arkui/component/gauge.static.d.ets @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2021-2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use static'; + +/** + * @file + * @kit ArkUI + * @arkts static + */ +import { CommonMethod, CommonConfiguration, ContentModifier, MultiShadowOptions, Optional } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceStr, Dimension, ResourceColor, Length } from "./units"; +import { LinearGradient } from "./dataPanel"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; +/** + * Defines Gauge constructor options. + * + * @interface GaugeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GaugeOptions { + /** + * Set current data value. + * Anonymous Object Rectification. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: number; + /** + * Set current segment minimum value. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + min?: number; + /** + * Set current segment maximum value. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + max?: number; +} +/** + * Defines the options of gauge track shadow. + * + * @extends MultiShadowOptions + * @interface GaugeShadowOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface GaugeShadowOptions extends MultiShadowOptions { +} +/** + * Defines the options of gauge indicator. + * + * @interface GaugeIndicatorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface GaugeIndicatorOptions { + /** + * Current indicator icon path. + * + * @type { ?ResourceStr } option type - the current option type. + * @default system style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ResourceStr; + /** + * Current indicator space. + * + * @type { ?Dimension } indicator space - the current indicator space. + * @default 8 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + space?: Dimension; +} +/** + * GaugeConfiguration used by content modifier + * + * @extends CommonConfiguration + * @interface GaugeConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface GaugeConfiguration extends CommonConfiguration { + /** + * Current data value. + * + * @type { number } data value - the current data value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: number; + /** + * Current Segment Minimum Value. + * + * @type { number } segment minimum value - the current segment minimum value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + min: number; + /** + * Current Segment Maximum Value. + * + * @type { number } segment maximum value - the current segment maximum value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + max: number; +} +export declare interface GaugeAttribute extends CommonMethod { + /** + * Sets the value for the current profile. + * + * @param { number } value + * @returns { GaugeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value(value: number | undefined): this; + /** + * Set the start angle. Clock 0 is 0 degrees and clockwise is positive. + * + * @param { number } angle + * @returns { GaugeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + startAngle(angle: number | undefined): this; + /** + * Sets the end angle position. Clock 0 is 0 degrees and clockwise is positive. + * + * @param { number } angle + * @returns { GaugeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + endAngle(angle: number | undefined): this; + /** + * Set the color of the chart. You can set the solid color and segmented gradient color. + * + * @param { ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]> } colors - section colors of gauge drawing. + * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + colors(colors: ResourceColor | LinearGradient | Array<[ + ResourceColor | LinearGradient, + number + ]> | undefined): this; + /** + * Sets the thickness of the ring chart. + * + * @param { Length } length + * @returns { GaugeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth(length: Length | undefined): this; + /** + * Sets description content of the ring chart. + * + * @param { CustomBuilder } value - description content builder of the gauge drawing. + * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + description(value: CustomBuilder | undefined): this; + /** + * Sets track shadow of the ring chart. + * + * @param { GaugeShadowOptions } value - track shadow options of the gauge drawing. + * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + trackShadow(value: GaugeShadowOptions | undefined): this; + /** + * Sets indicator options of the ring chart. + * + * @param { GaugeIndicatorOptions } value - indicator options of the gauge drawing. + * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + indicator(value: GaugeIndicatorOptions | undefined): this; + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive . + * @returns { GaugeAttribute } returns the instance of the GaugeAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + privacySensitive(isPrivacySensitiveMode: boolean | undefined): this; + /** + * Set the content modifier of gauge. + * + * @param { ContentModifier } modifier - The content modifier of gauge. + * @returns { GaugeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function Gauge(options: GaugeOptions, +@memo +content_?: () => void): GaugeAttribute; diff --git a/api/arkui/component/patternLock.static.d.ets b/api/arkui/component/patternLock.static.d.ets new file mode 100644 index 0000000000..b03e435b43 --- /dev/null +++ b/api/arkui/component/patternLock.static.d.ets @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2021-2023 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use static'; + +/** + * @file + * @kit ArkUI + * @arkts static + */ +import { ResourceColor, Length } from './units'; +import { LengthMetrics } from '../Graphics'; +import { CommonMethod, Callback, Optional } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * The challenge result based on input pattern for control pattern lock component. + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum PatternLockChallengeResult { + /** + * The challenge result is correct. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CORRECT = 1, + /** + * The challenge result is wrong. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + WRONG = 2 +} +/** + * Defines the options of active circle style. + * + * @interface CircleStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CircleStyleOptions { + /** + * The circle color when cell is active state. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ResourceColor; + /** + * The circle radius when cell is active state. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radius?: LengthMetrics; + /** + * Enable the wave effect when cell is active. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableWaveEffect?: boolean; + /** + * Enable the activity circle style displayed in the foreground. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableForeground?: boolean; +} +/** + * Provides methods for control pattern lock component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PatternLockController { + /** + * A constructor used to create a PatternLockController instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Reset pattern lock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + reset(): void; + /** + * Sets the authentication challenge result for the pattern password. + * @param { PatternLockChallengeResult } result - Authentication challenge result of the pattern password. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setChallengeResult(result: PatternLockChallengeResult): void; +} +export declare interface PatternLockAttribute extends CommonMethod { + /** + * Sets the width and height (same value) of the component. + * + *

NOTE: + *
If this attribute is set to 0 or a negative number, the component is not displayed. + *

+ * + * @param { Length } value - Width and height of the component, Default value is 288vp. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + sideLength(value: Length | undefined): this; + /** + * Sets the radius of the dots in a grid. + * + *

NOTE: + *
If this attribute is set to 0 or a negative value, the default value is used. + *

+ * + * @param { Length } value - Radius of the dots in a grid, Default value is 6vp. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + circleRadius(value: Length | undefined): this; + /** + * Sets the background color. + * + * @param { ResourceColor } value - Background color. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor(value: ResourceColor | undefined): this; + /** + * Sets the fill color of the grid dot in the unselected state. + * + * @param { ResourceColor } value - Fill color of the grid dot in the unselected state, Default value is '#ff182431'. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + regularColor(value: ResourceColor | undefined): this; + /** + * Sets the fill color of the grid dot in the selected state. + * + * @param { ResourceColor } value - Fill color of the grid dot in the selected state, Default value is '#ff182431'. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedColor(value: ResourceColor | undefined): this; + /** + * Sets the fill color of the grid dot in the activated state, which is when the dot is highlighted but not selected. + * + * @param { ResourceColor } value - Fill color of the grid dot in the activated state, Default value is '#ff182431'. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activeColor(value: ResourceColor | undefined): this; + /** + * Sets the path color. + * + * @param { ResourceColor } value - Path color, Default value is '#33182431'. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pathColor(value: ResourceColor | undefined): this; + /** + * Sets the width of the path stroke. + * + *

NOTE: + *
If this attribute is set to **0** or a negative value, the path stroke is not displayed. + *

+ * + * @param { number | string } value - Width of the path stroke, Default value is 12vp. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pathStrokeWidth(value: number | string | undefined): this; + /** + * Invoked when the pattern password input is complete. + * + * @param { function } callback + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onPatternComplete(callback: ((input: Array) => void) | undefined): this; + /** + * Sets whether to allow the user to reset the component status (that is, clear the input) by touching the component + * again after the input is complete. + * + * @param { boolean } value - Whether to allow the user to reset the component status (that is, clear the input) by + * touching the component again after the input is complete, Default value is true. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + autoReset(value: boolean | undefined): this; + /** + * Called when connecting to a grid dot. + * @param { Callback } callback - A callback instance used when connection to a grid dot. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDotConnect(callback: Callback | undefined): this; + /** + * Sets the background circle style for the dots in a grid when they are in the activated state. + * + * @param { Optional } options - Background circle style of the dots in the activated state. + * @returns { PatternLockAttribute } PatternLockAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activateCircleStyle(options: CircleStyleOptions | undefined): this; + /** + * Sets whether unselected dots in the grid are automatically selected when the password path passes over them. + * + * @param { boolean } skipped - Whether unselected dots in the grid are automatically selected when the password + * path passes over them, Default value is false. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + skipUnselectedPoint(skipped: boolean | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function PatternLock(controller?: PatternLockController, +@memo +content_?: () => void): PatternLockAttribute; -- Gitee