diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index b70912408a191f5f36b97c2243f551004a670079..729160f93e50905c48746a2c5c2b3e889b77b258 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length, Position, Resource, ResourceStr } from './units'; -import { FontWeight } from './enums'; -import { CommonMethod } from './common'; -/*** endif */ - /** * Defines the badge position property. * @@ -56,996 +50,969 @@ import { CommonMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum BadgePosition { - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is displayed in the upper right corner of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - RightTop, - - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the right of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Right, - - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the left of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Left, -} - -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare interface BadgeStyle { - /** - * Text Color - * - * @type { ?ResourceColor } + declare enum BadgePosition { + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is displayed in the upper right corner of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + RightTop, + + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is vertically centered on the right of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Right, + + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is vertically centered on the left of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Left, + } + + /** + * BadgeStyle object + * + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Text Color + * BadgeStyle object * - * @type { ?ResourceColor } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Text Color + * BadgeStyle object * - * @type { ?ResourceColor } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Font color. + * BadgeStyle object * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - color?: ResourceColor; - - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Text size. - * - * @type { ?(number | string) } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Font size. - * For the string type, only numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: fp - * - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * - * @type { ?(number | ResourceStr) } - * @default 10 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontSize?: number | ResourceStr; - - /** - * Size of a badge. - * - * @type { ?(number | string) } + declare interface BadgeStyle { + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Font color. + * + * @type { ?ResourceColor } + * @default Color.White + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color?: ResourceColor; + + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Font size. + * For the string type, only numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: fp + * + *

NOTE: + *
This parameter cannot be set in percentage. + *

+ * + * @type { ?(number | ResourceStr) } + * @default 10 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + fontSize?: number | ResourceStr; + + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Badge size. + * For the string type, numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: vp + * + *

NOTE: + *
This parameter cannot be set in percentage. + *
If it is set to an invalid value, the default value is used. + *

+ * + * @type { ?(number | ResourceStr) } + * @default 16 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + badgeSize?: number | ResourceStr; + + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Badge color. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + badgeColor?: ResourceColor; + + /** + * Define the border color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border color of the background. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderColor?: ResourceColor; + + /** + * Define the border width of the badge. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border width of the background. + * This parameter cannot be set in percentage. + * Unit: vp + * + * @type { ?Length } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderWidth?: Length; + + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Font weight of the text. + * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 + * A larger value indicates a heavier font weight. + * For the string type, only strings that represent a number. Default value: FontWeight.Normal + * + *

NOTE: + *
This parameter cannot be set in percentage. + *

+ * + * @type { ?(number | FontWeight | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fontWeight?: number | FontWeight | ResourceStr; + } + + /** + * Defines the base param of badge. + * + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Size of a badge. + * Defines the base param of badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Size of a badge. + * Defines the base param of badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Size of a badge. + * Provides basic parameters for creating a badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Badge size. - * For the string type, numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: vp - * - *

NOTE: - *
This parameter cannot be set in percentage. - *
If it is set to an invalid value, the default value is used. - *

- * - * @type { ?(number | ResourceStr) } - * @default 16 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - badgeSize?: number | ResourceStr; - - /** - * Color of the badge. - * - * @type { ?ResourceColor } + declare interface BadgeParam { + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition | Position) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Position to display the badge relative to the parent component. + * + *

NOTE: + *
With the Position type, percentage values are not supported. + *
If an invalid value is set, the default value (0,0), + * which indicates the upper left corner of the component, will be used. + *
With the BadgePosition type, the position is mirrored based on the Direction property. + *

+ * + * @type { ?(BadgePosition | Position) } + * @default BadgePosition.RightTop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + position?: BadgePosition | Position; + + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Style of the badge, including the font color, font size, badge color, and badge size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style: BadgeStyle; + } + + /** + * Defines the badge param with count and maxCount. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Color of the badge. + * Defines the badge param with count and maxCount. * - * @type { ?ResourceColor } + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Color of the badge. + * Defines the badge param with count and maxCount. * - * @type { ?ResourceColor } + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Badge color. + * Inherits from BadgeParam and has all attributes of BadgeParam. * - * @type { ?ResourceColor } - * @default Color.Red + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - badgeColor?: ResourceColor; - - /** - * Define the border color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border color of the background. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderColor?: ResourceColor; - - /** - * Define the border width of the badge. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border width of the background. - * This parameter cannot be set in percentage. - * Unit: vp - * - * @type { ?Length } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderWidth?: Length; - - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 11 */ - /** - * Font weight of the text. - * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 - * A larger value indicates a heavier font weight. - * For the string type, only strings that represent a number. Default value: FontWeight.Normal - * - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * - * @type { ?(number | FontWeight | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontWeight?: number | FontWeight | ResourceStr; -} - -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides basic parameters for creating a badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParam { - /** - * Set the display position of the prompt point. - * - * @type { ?(BadgePosition) } + declare interface BadgeParamWithNumber extends BadgeParam { + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Number of notifications. + * + *

NOTE: + *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + count: number; + + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. + * + *

NOTE: + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { ?number } + * @default 99 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + maxCount?: number; + } + + /** + * Defines the badge param with string value. + * + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set the display position of the prompt point. + * Defines the badge param with string value. * - * @type { ?(BadgePosition) } + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Set the display position of the prompt point. + * Defines the badge param with string value. * - * @type { ?(BadgePosition | Position) } + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Position to display the badge relative to the parent component. - * - *

NOTE: - *
With the Position type, percentage values are not supported. - *
If an invalid value is set, the default value (0,0), - * which indicates the upper left corner of the component, will be used. - *
With the BadgePosition type, the position is mirrored based on the Direction property. - *

+ * Inherits from BadgeParam and has all attributes of BadgeParam. * - * @type { ?(BadgePosition | Position) } - * @default BadgePosition.RightTop + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - position?: BadgePosition | Position; - - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Style of the badge, including the font color, font size, badge color, and badge size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - style: BadgeStyle; -} - -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParamWithNumber extends BadgeParam { - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Number of notifications. - * - *

NOTE: - *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - count: number; - - /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * - * @type { ?number } + declare interface BadgeParamWithString extends BadgeParam { + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Prompt content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + value: ResourceStr; + } + + /** + * Defines Badge Component. + * + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * Defines Badge Component. * - * @type { ?number } + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * Defines Badge Component. * - * @type { ?number } + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. - * - *

NOTE: - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

+ * Defines Badge Component. * - * @type { ?number } - * @default 99 + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - maxCount?: number; -} - -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParamWithString extends BadgeParam { - /** - * Text string of the prompt content. - * - * @type { string } + interface BadgeInterface { + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (value: BadgeParamWithNumber): BadgeAttribute; + + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (value: BadgeParamWithString): BadgeAttribute; + } + + /** + * Defines Badge Component attribute. + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare class BadgeAttribute extends CommonMethod {} + /** - * Prompt content. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - value: ResourceStr; -} - -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface BadgeInterface { - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (value: BadgeParamWithNumber): BadgeAttribute; - + declare const Badge: BadgeInterface; + /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (value: BadgeParamWithString): BadgeAttribute; -} - -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class BadgeAttribute extends CommonMethod {} - -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const Badge: BadgeInterface; - -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const BadgeInstance: BadgeAttribute; + declare const BadgeInstance: BadgeAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 24d63a95eb98710398ce2f383cef75bb86a28225..3cb2eb41774ebdf233b90c78f5ad045c5b27c2ea 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -18,19 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import image from '../../@ohos.multimedia.image'; -import drawing from '../../@ohos.graphics.drawing'; -import matrix4 from '../../@ohos.matrix4' -import { BusinessError } from '../../@ohos.base'; -import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics } from './units'; -import { ImageFit, ImageRepeat, CopyOptions } from './enums'; -import { Resource } from '../../global/resource'; -import { CommonMethod, PointLightStyle, PixelMap } from './common' -/*** endif */ - /** * Use the DrawableDescriptor class to get drawable image. * @@ -58,18 +45,6 @@ declare type DrawableDescriptor = import ('../api/@ohos.arkui.drawableDescriptor */ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').default.ColorFilter; -/** - * Import the DrawingColorFilter type object for image color filter setting. - * - * @typedef { drawing.ColorFilter } DrawingColorFilter - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type DrawingColorFilter = drawing.ColorFilter; - /** * Enumerates all the levels available for the image resolution quality. * @@ -78,18 +53,7 @@ declare type DrawingColorFilter = drawing.ColorFilter; * @systemapi * @since 12 */ -declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; - -/** - * Enumerates all the levels available for the image resolution quality. - * - * @typedef { image.ResolutionQuality } ResolutionQuality - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ -declare type ResolutionQuality = image.ResolutionQuality; +declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; /** * Lattice for dividing an image into grids. @@ -100,19 +64,7 @@ declare type ResolutionQuality = image.ResolutionQuality; * @atomicservice * @since 12 */ -declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; - -/** - * Lattice for dividing an image into grids. - * - * @typedef { drawing.Lattice } DrawingLattice - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type DrawingLattice = drawing.Lattice; +declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; /** * Object matrix used for setting image transformations. @@ -125,18 +77,6 @@ declare type DrawingLattice = drawing.Lattice; */ declare type ImageMatrix = import ('../api/@ohos.matrix4').default.Matrix4Transit; -/** - * Object matrix used for setting image transformations. - * - * @typedef { matrix4.Matrix4Transit } Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type ImageMatrix = matrix4.Matrix4Transit; - /** * Business error in onError callback. * @@ -173,8 +113,7 @@ declare type BusinessError = import('../api/@ohos.base').BusinessError; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ImageRenderMode { /** @@ -205,8 +144,7 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Original, @@ -238,8 +176,7 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Template, } @@ -252,8 +189,7 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ImageContent { /** @@ -263,8 +199,7 @@ declare enum ImageContent { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMPTY = 0, } @@ -273,8 +208,7 @@ declare enum ImageContent { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum DynamicRangeMode { /** @@ -282,8 +216,7 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ HIGH = 0, @@ -292,8 +225,7 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CONSTRAINT = 1, @@ -302,8 +234,7 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ STANDARD = 2, } @@ -332,8 +263,7 @@ declare enum DynamicRangeMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ImageInterpolation { /** @@ -364,8 +294,7 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, @@ -397,8 +326,7 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Low, @@ -430,8 +358,7 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Medium, @@ -463,8 +390,7 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ High, } @@ -474,8 +400,7 @@ declare enum ImageInterpolation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare enum ImageRotateOrientation { /** @@ -484,8 +409,7 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ AUTO = 0, @@ -495,8 +419,7 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ UP = 1, @@ -506,8 +429,7 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ RIGHT = 2, @@ -517,8 +439,7 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ DOWN = 3, @@ -528,8 +449,7 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ LEFT = 4, @@ -540,7 +460,6 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ UP_MIRRORED = 5, @@ -551,7 +470,6 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ RIGHT_MIRRORED = 6, @@ -562,7 +480,6 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ DOWN_MIRRORED = 7, @@ -573,135 +490,10 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ LEFT_MIRRORED = 8, } -/** - * ImageCompleteEvent - * - * @interface ImageCompleteEvent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export interface ImageCompleteEvent { - /** - * The width of the image source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - width: number; - /** - * The height of the image source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - height: number; - /** - * The width of the component source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - componentWidth: number; - /** - * The height of the component source. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - componentHeight: number; - /** - * The value of the status of the image being loaded successfully. - * If the returned status value is 0, the image data is successfully loaded. - * If the returned status value is 1, the image is successfully decoded. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - loadingStatus: number; - /** - * The width of the picture that is actually drawn. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - contentWidth: number; - /** - * The height of the picture that is actually drawn. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - contentHeight: number; - /** - * The actual draw is offset from the x-axis of the component itself. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - contentOffsetX: number; - /** - * The actual draw is offset from the y-axis of the component itself. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - contentOffsetY: number; -} - /** * @interface ImageInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -726,9 +518,7 @@ export interface ImageCompleteEvent { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ interface ImageInterface { /** @@ -780,8 +570,7 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent): ImageAttribute; @@ -793,8 +582,7 @@ interface ImageInterface { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (src: PixelMap | ResourceStr | DrawableDescriptor, imageAIOptions: ImageAIOptions): ImageAttribute; } @@ -807,8 +595,7 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ImageSourceSize { @@ -855,8 +642,7 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ width: number; @@ -903,8 +689,7 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ height: number; } @@ -915,8 +700,7 @@ interface ImageSourceSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare class ColorContent { /** @@ -928,8 +712,7 @@ declare class ColorContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ static readonly ORIGIN: ColorContent; } @@ -958,9 +741,7 @@ declare class ColorContent { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ declare class ImageAttribute extends CommonMethod { /** @@ -1014,8 +795,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alt(value: string | Resource | PixelMap): ImageAttribute; @@ -1059,8 +839,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ matchTextDirection(value: boolean): ImageAttribute; @@ -1104,8 +883,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fitOriginalSize(value: boolean): ImageAttribute; @@ -1191,7 +969,6 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent | ColorMetrics): ImageAttribute; @@ -1231,8 +1008,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit(value: ImageFit): ImageAttribute; @@ -1244,8 +1020,7 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ imageMatrix(matrix: ImageMatrix): ImageAttribute; @@ -1290,8 +1065,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectRepeat(value: ImageRepeat): ImageAttribute; @@ -1337,8 +1111,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoResize(value: boolean): ImageAttribute; @@ -1384,8 +1157,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ renderMode(value: ImageRenderMode): ImageAttribute; @@ -1401,8 +1173,7 @@ declare class ImageAttribute extends CommonMethod { * dynamicRangeMode.Standard. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dynamicRangeMode(value: DynamicRangeMode): ImageAttribute; @@ -1458,8 +1229,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interpolation(value: ImageInterpolation): ImageAttribute; @@ -1522,8 +1292,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ sourceSize(value: ImageSourceSize): ImageAttribute; @@ -1570,8 +1339,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ syncLoad(value: boolean): ImageAttribute; @@ -1618,8 +1386,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ colorFilter(value: ColorFilter | DrawingColorFilter): ImageAttribute; @@ -1656,8 +1423,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): ImageAttribute; @@ -1692,8 +1458,7 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ draggable(value: boolean): ImageAttribute; @@ -1704,8 +1469,7 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pointLight(value: PointLightStyle): ImageAttribute; @@ -1718,8 +1482,7 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ edgeAntialiasing(value: number): ImageAttribute; @@ -2037,21 +1800,6 @@ declare class ImageAttribute extends CommonMethod { }) => void, ): ImageAttribute; - /** - * This callback is triggered when an image is successfully loaded. - * The size of the image source that is successfully loaded is returned, in pixels. - * - * @param { ImageOnCompleteCallback } callback - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onComplete(callback: ImageOnCompleteCallback): ImageAttribute; - /** * This callback is triggered when an exception occurs during image loading. * The field of "message" carries the detailed information of failed image loading. @@ -2087,8 +1835,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onError(callback: ImageErrorCallback): ImageAttribute; @@ -2137,8 +1884,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onFinish(event: () => void): ImageAttribute; @@ -2172,8 +1918,7 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): ImageAttribute; @@ -2184,8 +1929,7 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ analyzerConfig(config: ImageAnalyzerConfig): ImageAttribute; @@ -2216,11 +1960,21 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ resizable(value: ResizableOptions): ImageAttribute; + /** + * Set the quality enhancement level of image. + * + * @param { ResolutionQuality } imageQuality + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 12 + */ + enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; + /** * Sets whether to secure sensitive information on widgets. * @@ -2233,23 +1987,10 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ privacySensitive(supported: boolean): ImageAttribute; - /** - * Set the quality enhancement level of image. - * - * @param { ResolutionQuality } imageQuality - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; - /** * Sets the display orientation of the image content. * @@ -2259,8 +2000,7 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ orientation(orientation: ImageRotateOrientation) : ImageAttribute; } @@ -2304,7 +2044,6 @@ declare class ImageAttribute extends CommonMethod { * @form * @atomicservice * @since 11 - * @noninterop */ declare const Image: ImageInterface; @@ -2337,7 +2076,6 @@ declare const Image: ImageInterface; * @form * @atomicservice * @since 11 - * @noninterop */ declare const ImageInstance: ImageAttribute; @@ -2361,25 +2099,10 @@ declare const ImageInstance: ImageAttribute; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type ImageErrorCallback = (error: ImageError) => void; -/** - * ImageOnCompleteCallback - * - * @typedef { function } ImageOnCompleteCallback - * @param { ImageCompleteEvent } loadEvent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; - /** * @interface ImageError * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2399,8 +2122,7 @@ type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ImageError { /** @@ -2428,8 +2150,7 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ componentWidth: number; @@ -2458,8 +2179,7 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ componentHeight: number; @@ -2480,8 +2200,7 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ message: string @@ -2494,7 +2213,6 @@ declare interface ImageError { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ error?: BusinessError; } @@ -2514,8 +2232,7 @@ declare interface ImageError { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ResizableOptions { /** @@ -2533,8 +2250,7 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ slice?: EdgeWidths; @@ -2545,8 +2261,7 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lattice?: DrawingLattice; } diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index df829102b1c9f16e17d9387f034fa481abfd574d..85829650f83a8f38dd76547f563ea1c325bb5649 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from "../../global/resource"; -import image from '../../@ohos.multimedia.image' -import { CommonMethod, PixelMap } from './common' -import { AnimationStatus,FillMode } from './enums' -/*** endif */ - /** * Defines the ImageAnimator Interface. * @@ -49,750 +42,723 @@ import { AnimationStatus,FillMode } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface ImageAnimatorInterface { - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (): ImageAnimatorAttribute; -} - -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -interface ImageFrameInfo { - /** - * Image path - * - * @type { string } + interface ImageAnimatorInterface { + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (): ImageAnimatorAttribute; + } + + /** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Image path - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Image path + * Defines the ImageFrameInfo Interface. * - * @type { string | Resource } + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Image path + * Defines the ImageFrameInfo Interface. * - * @type { string | Resource } + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Image path - * - * @type { string | Resource | PixelMap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - src: string | Resource | PixelMap; - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - width?: number | string; - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - height?: number | string; - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - top?: number | string; - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - left?: number | string; - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; -} - -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class ImageAnimatorAttribute extends CommonMethod { - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the image frame information. - * - *

NOTE: - *
Dynamic update is not supported. - *

- * - * @param { Array } value - Image frame informatio, Default value is []. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - images(value: Array): ImageAnimatorAttribute; - - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback state of the animation. - * - * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - state(value: AnimationStatus): ImageAnimatorAttribute; - - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback duration. - * The unit is millisecond. - * - *

NOTE: - *
This attribute does not take effect when a separate duration is set for any of the image frames. - *

- * - * @param { number } value - Playback duration, Default value is 1000. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration(value: number): ImageAnimatorAttribute; - - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback direction. - * - * @param { boolean } value - Playback direction, Default value is false. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - reverse(value: boolean): ImageAnimatorAttribute; - - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets whether the image size is fixed at the component size. - * - * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fixedSize(value: boolean): ImageAnimatorAttribute; - - /** - * Sets the number of images to be pre-decoded. - * - * @param { number } value - Number of images to be pre-decoded, Default value is 0. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - */ - preDecode(value: number): ImageAnimatorAttribute; - - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the status before and after execution of the animation in the current playback direction. - * - * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, - * Default value is FillMode.Forwards. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fillMode(value: FillMode): ImageAnimatorAttribute; - - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the number of times that the animation is played. - * Played once by default - * - * @param { number } value - Number of times that the animation is played, Default value is 1. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations(value: number): ImageAnimatorAttribute; - - /** - * Sets whether the component should automatically pause or resume based on its visibility, using the system's - * onVisibleAreaChange event. - * - * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on - * its visibility, using the system's onVisibleAreaChange event, Default value is false. - * @returns { ImageAnimatorAttribute } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'17','1.2':'20'} - * @arkts 1.1&1.2 - */ - monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } + interface ImageFrameInfo { + /** + * Image path + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Image path + * + * @type { string | Resource | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + src: string | Resource | PixelMap; + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + width?: number | string; + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + height?: number | string; + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + top?: number | string; + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + left?: number | string; + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + duration?: number; + } + + /** + * inheritance CommonMethod + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation starts to play. + * inheritance CommonMethod * - * @param { function } event - * @returns { ImageAnimatorAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation starts to play. + * inheritance CommonMethod * - * @param { function } event - * @returns { ImageAnimatorAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onStart(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onPause(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onRepeat(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation is canceled. + declare class ImageAnimatorAttribute extends CommonMethod { + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the image frame information. + * + *

NOTE: + *
Dynamic update is not supported. + *

+ * + * @param { Array } value - Image frame informatio, Default value is []. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + images(value: Array): ImageAnimatorAttribute; + + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback state of the animation. + * + * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + state(value: AnimationStatus): ImageAnimatorAttribute; + + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback duration. + * The unit is millisecond. + * + *

NOTE: + *
This attribute does not take effect when a separate duration is set for any of the image frames. + *

+ * + * @param { number } value - Playback duration, Default value is 1000. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + duration(value: number): ImageAnimatorAttribute; + + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback direction. + * + * @param { boolean } value - Playback direction, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + reverse(value: boolean): ImageAnimatorAttribute; + + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets whether the image size is fixed at the component size. + * + * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fixedSize(value: boolean): ImageAnimatorAttribute; + + /** + * Sets the number of images to be pre-decoded. + * + * @param { number } value - Number of images to be pre-decoded, Default value is 0. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 9 + */ + preDecode(value: number): ImageAnimatorAttribute; + + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the status before and after execution of the animation in the current playback direction. + * + * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, + * Default value is FillMode.Forwards. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fillMode(value: FillMode): ImageAnimatorAttribute; + + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the number of times that the animation is played. + * Played once by default + * + * @param { number } value - Number of times that the animation is played, Default value is 1. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + iterations(value: number): ImageAnimatorAttribute; + + /** + * Sets whether the component should automatically pause or resume based on its visibility, using the system's + * onVisibleAreaChange event. + * + * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on + * its visibility, using the system's onVisibleAreaChange event, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 17 + */ + monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onStart(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onPause(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onRepeat(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation playback returns to the initial state. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onCancel(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation playback is complete or stopped. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onFinish(event: () => void): ImageAnimatorAttribute; + } + + /** + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation is canceled. + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation playback returns to the initial state. + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onCancel(event: () => void): ImageAnimatorAttribute; - + declare const ImageAnimator: ImageAnimatorInterface; + /** - * Status callback, which is triggered when the animation playback is complete. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation playback is complete. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation playback is complete or stopped. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onFinish(event: () => void): ImageAnimatorAttribute; -} - -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const ImageAnimator: ImageAnimatorInterface; - -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const ImageAnimatorInstance: ImageAnimatorAttribute; + declare const ImageAnimatorInstance: ImageAnimatorAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index 7415991b1a970aabdba46f343a33f201a59f309c..24962e1329561a009cb806c3940915d4890ad86c 100644 --- a/api/@internal/component/ets/image_common.d.ts +++ b/api/@internal/component/ets/image_common.d.ts @@ -24,8 +24,7 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ImageAnalyzerType { /** @@ -33,8 +32,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SUBJECT = 0, @@ -43,8 +41,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TEXT, @@ -53,8 +50,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ OBJECT_LOOKUP, } @@ -64,8 +60,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ImageAnalyzerController { /** @@ -73,19 +68,17 @@ declare class ImageAnalyzerController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); - + /** * Get image analyzer support types. * * @returns { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; } @@ -96,8 +89,7 @@ declare class ImageAnalyzerController { * @interface ImageAnalyzerConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageAnalyzerConfig { /** @@ -106,8 +98,7 @@ declare interface ImageAnalyzerConfig { * @type { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ types: ImageAnalyzerType[]; } @@ -118,8 +109,7 @@ declare interface ImageAnalyzerConfig { * @interface ImageAIOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageAIOptions { /** @@ -128,8 +118,7 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ types?: ImageAnalyzerType[]; @@ -139,8 +128,7 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aiController?: ImageAnalyzerController; -} \ No newline at end of file +} diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts index 2e7528f03e0fff48eb867751c41a1796dc4e083b..c63b21e50fa6c99ddfdf5905ffdbc8fd678db064 100644 --- a/api/@internal/component/ets/loading_progress.d.ts +++ b/api/@internal/component/ets/loading_progress.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod,ContentModifier,CommonConfiguration } from './common' -import { ResourceColor } from './units' -/*** endif */ - /** * Load style of progress bar. * @@ -55,386 +50,371 @@ import { ResourceColor } from './units' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare enum LoadingProgressStyle { + declare enum LoadingProgressStyle { + /** + * Default style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Default style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Default style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Default style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Default, + + /** + * Announcement style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Announcement style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Announcement style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Announcement style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Circular, + + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Orbital, + } + /** - * Default style. + * Provides an interface for extending the loading progress. * + * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Default style. + * Provides an interface for extending the loading progress. * + * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Default style. + * Provides an interface for extending the loading progress. * + * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Default style. + * Provides an interface for extending the loading progress. * + * @interface LoadingProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Default, - + interface LoadingProgressInterface { + /** + * Called when the progress bar progress is viewed. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the progress bar progress is viewed. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar progress is viewed. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar progress is viewed. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (): LoadingProgressAttribute; + } + /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Circular, - - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 + * @since 11 */ + declare class LoadingProgressAttribute extends CommonMethod { + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor): LoadingProgressAttribute; + + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableLoading(value: boolean): LoadingProgressAttribute; + + /** + * Set the content modifier of loadingProgress. + * + * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. + * @returns { LoadingProgressAttribute} the attribute of the loading progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): LoadingProgressAttribute; + } + /** - * The style of the track. + * LoadingProgressConfiguration used by LoadingProgress contentModifier * + * @extends CommonConfiguration + * @interface LoadingProgressConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - Orbital, -} - -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface LoadingProgressInterface { + declare interface LoadingProgressConfiguration extends CommonConfiguration { + /** + * Whether to enable the LoadingProgress content. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + enableLoading: boolean; + } + /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (): LoadingProgressAttribute; -} - -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class LoadingProgressAttribute extends CommonMethod { + declare const LoadingProgress: LoadingProgressInterface; + /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - color(value: ResourceColor): LoadingProgressAttribute; - - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableLoading(value: boolean): LoadingProgressAttribute; - - /** - * Set the content modifier of loadingProgress. - * - * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. - * @returns { LoadingProgressAttribute} the attribute of the loading progress - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): LoadingProgressAttribute; -} - -/** - * LoadingProgressConfiguration used by LoadingProgress contentModifier - * - * @extends CommonConfiguration - * @interface LoadingProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LoadingProgressConfiguration extends CommonConfiguration { - /** - * Whether to enable the LoadingProgress content. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableLoading: boolean; -} - -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const LoadingProgress: LoadingProgressInterface; - -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const LoadingProgressInstance: LoadingProgressAttribute; + declare const LoadingProgressInstance: LoadingProgressAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index ceada3464a3b1f8238df86e4c034feffe31567a5..2413ca6a2fbcca66c710a46e740a42185ec577e7 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -18,14 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor,Length, PX , VP , LPX, Font, ResourceStr } from './units' -import { Resource } from '../../global/resource'; -import { CommonMethod, Optional,ContentModifier,CommonConfiguration } from './common' -import { LinearGradient } from './dataPanel' -import { LengthMetrics } from '../Graphics' -/*** endif */ - /** * Defines the option of Progress. * @@ -60,1818 +52,1620 @@ import { LengthMetrics } from '../Graphics' * @atomicservice * @since 11 */ -declare interface ProgressOptions { - /** - * Sets the value of Progress. - * - * @type { number } + declare interface ProgressOptions { + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + total?: number; + + /** + * Sets the style of Progress. + * + * @type { ?ProgressStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 8 + * @useinstead type + */ + style?: ProgressStyle + + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + type?: Type + } + + /** + * Type of progress bar + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - value: number; - - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } + declare enum ProgressType { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Linear = 0, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Ring = 1, + + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Eclipse = 2, + + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + ScaleRing = 3, + + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Capsule = 4 + } + + /** + * Current status of progress bar. + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Sets the total of Progress. + * Current status of progress bar. * - * @type { ?number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 11 */ - total?: number; - - /** - * Sets the style of Progress. - * - * @type { ?ProgressStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 8 - * @useinstead type - */ - style?: ProgressStyle - - /** - * Sets the type of Progress. - * - * @type { ?Type } + declare enum ProgressStatus { + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + LOADING, + + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + PROGRESSING + } + + /** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - type?: Type -} - -/** - * Defines the option of Progress. - * - * @interface ProgressOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface ProgressOptions { - - /** - * Sets the value of Progress. - * - * @type { number } + declare interface ProgressStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + scaleCount?: number; + + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + scaleWidth?: Length; + } + + /** + * Progress common style options. + * + * @interface CommonProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 10 */ - value: number; - /** - * Sets the total of Progress. + * Progress common style options. * - * @type { ?number } + * @interface CommonProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 11 + */ + declare interface CommonProgressStyleOptions { + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableSmoothEffect?: boolean; + } + + /** + * Defines the enable scan effect. + * + * @interface ScanEffectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 */ - total?: number; - /** - * Sets the type of Progress. + * Defines the enable scan effect. * - * @type { ?ProgressType } + * @interface ScanEffectOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 11 */ - type?: ProgressType -} -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressType { - /** - * Linear progress bar style. - * + declare interface ScanEffectOptions { + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableScanEffect?: boolean; + } + + /** + * Defines the Eclipse style Options. + * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 10 */ /** - * Linear progress bar style. + * Defines the Eclipse style Options. * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @atomicservice + * @since 11 */ + declare interface EclipseStyleOptions extends CommonProgressStyleOptions { + + } + /** - * Linear progress bar style. + * Defines the ScaleRing style Options. * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Linear progress bar style. + * Defines the ScaleRing style Options. * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Linear = 0, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @since 11 */ - /** - * Ring progress bar. - * + declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + scaleWidth?: Length; + + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + scaleCount?: number; + } + + /** + * Defines the ring style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Ring progress bar. + * Defines the ring style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Ring = 1, - - /** - * Eclipse progress bar. - * + declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + shadow?: boolean; + + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + status?: ProgressStatus; + } + + /** + * Defines the linear style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 10 */ /** - * Eclipse progress bar. + * Defines the linear style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @crossplatform + * @atomicservice + * @since 11 */ - /** - * Eclipse progress bar. - * + declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeRadius?: PX | VP | LPX | Resource; + } + + /** + * Defines the capsule style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Eclipse progress bar. + * Defines the capsule style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Eclipse = 2, - - /** - * ScaleRing progress bar. - * + declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderColor?: ResourceColor; + + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderWidth?: Length; + + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Set the text content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + content?: ResourceStr; + + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + font?: Font; + + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + fontColor?: ResourceColor; + + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + showDefaultPercentage?: boolean; + + /** + * Set border rounded corner radius. + * + * @type { ?LengthMetrics } + * @default height / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + borderRadius?: LengthMetrics; + } + + /** + * Type of progress bar + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ScaleRing = 3, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @since 11 */ - /** - * Capsule progress bar. - * + declare enum ProgressStyle { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Linear, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Ring, + + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Eclipse, + + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + ScaleRing, + + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Capsule, + } + + /** + * Defines the map for progress type and style. + * + * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Capsule progress bar. + * Defines the map for progress type and style. * + * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Capsule = 4 -} - -/** - * Current status of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Current status of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressStatus { - /** - * Loading status. - * + declare interface ProgressStyleMap { + /** + * Defines the map for Linear progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Linear progress. + * + * @type { LinearStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Ring progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Ring progress. + * + * @type { RingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Eclipse progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Eclipse progress. + * + * @type { EclipseStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for ScaleRing progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for ScaleRing progress. + * + * @type { ScaleRingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Capsule progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Capsule progress. + * + * @type { CapsuleStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; + } + + /** + * Provides the progress bar interface. + * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 7 */ /** - * Loading status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @form + * @since 9 */ - LOADING, - /** - * Processing status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Processing status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - PROGRESSING -} - -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } + interface ProgressInterface { + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (options: ProgressOptions): ProgressAttribute; + } + + /** + * Defines the progress attribute functions. + * + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - strokeWidth?: Length; - - /** - * Defines the scaleCount property. + declare class ProgressAttribute extends CommonMethod> { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value(value: number): ProgressAttribute; + + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor | LinearGradient): ProgressAttribute; + + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style(value: Style): ProgressAttribute; + + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; + + /** + * Set the contentModifier of progress. + * + * @param { ContentModifier } modifier - The contentModifier of progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): ProgressAttribute; + } + + /** + * ProgressConfiguration used by progress contentModifier + * + * @extends CommonConfiguration + * @interface ProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + declare interface ProgressConfiguration extends CommonConfiguration { + /** + * The value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + value: number; + + /** + * The total of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + total: number; + } + + /** + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - scaleCount?: number; - + declare const Progress: ProgressInterface; + /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleWidth?: Length; -} - -/** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface CommonProgressStyleOptions { - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - enableSmoothEffect?: boolean; -} - -/** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ScanEffectOptions { - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableScanEffect?: boolean; -} - -/** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface EclipseStyleOptions extends CommonProgressStyleOptions { - -} - -/** - * Defines the ScaleRing style Options. - * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the ScaleRing style Options. - * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleWidth?: Length; - - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleCount?: number; -} - -/** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - shadow?: boolean; - - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - status?: ProgressStatus; -} - -/** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeRadius?: PX | VP | LPX | Resource; -} - -/** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderColor?: ResourceColor; - - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderWidth?: Length; - - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set the text content. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - content?: ResourceStr; - - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - font?: Font; - - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor?: ResourceColor; - - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - showDefaultPercentage?: boolean; - - /** - * Set border rounded corner radius. - * - * @type { ?LengthMetrics } - * @default height / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderRadius?: LengthMetrics; -} - -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressStyle { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Linear, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Ring, - - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Eclipse, - - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ScaleRing, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Capsule, -} - -/** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressStyleMap { - /** - * Defines the map for Linear progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Linear progress. - * - * @type { LinearStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Ring progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Ring progress. - * - * @type { RingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Eclipse progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Eclipse progress. - * - * @type { EclipseStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for ScaleRing progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for ScaleRing progress. - * - * @type { ScaleRingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Capsule progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Capsule progress. - * - * @type { CapsuleStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; -} - -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface ProgressInterface { - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - (options: ProgressOptions): ProgressAttribute; - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options: ProgressOptions): ProgressAttribute; -} - -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare class ProgressAttribute extends CommonMethod> { - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - value(value: number): ProgressAttribute; - - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - color(value: ResourceColor | LinearGradient): ProgressAttribute; - - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - style(value: Style): ProgressAttribute; - - /** - * Sets if mark to privacy sensitive. - * - * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; - - /** - * Set the contentModifier of progress. - * - * @param { ContentModifier } modifier - The contentModifier of progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): ProgressAttribute; -} - -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - * @noninterop - */ -declare class ProgressAttribute extends CommonMethod { - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - value(value: number): ProgressAttribute; - - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - color(value: ResourceColor | LinearGradient): ProgressAttribute; - - /** - * Called when the style of progress bar is set. - * - * @param { LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions): ProgressAttribute; - - /** - * Sets if mark to privacy sensitive. - * - * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; - - /** - * Set the contentModifier of progress. - * - * @param { ContentModifier } modifier - The contentModifier of progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - contentModifier(modifier: ContentModifier): ProgressAttribute; -} - -/** - * ProgressConfiguration used by progress contentModifier - * - * @extends CommonConfiguration - * @interface ProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressConfiguration extends CommonConfiguration { - /** - * The value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - value: number; - - /** - * The total of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - total: number; -} - -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const Progress: ProgressInterface; - -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const ProgressInstance: ProgressAttribute; + declare const ProgressInstance: ProgressAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts index 1c06f29312ed93a98adf39fbfe58a04fb3432e63..ef9932eecfd28f2554c376d2c714606540a5eb51 100644 --- a/api/@internal/component/ets/qrcode.d.ts +++ b/api/@internal/component/ets/qrcode.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -import { ResourceColor, ResourceStr } from './units' -import { Resource } from '../../global/resource' -/*** endif */ - /** * Provides an interface for generating QR codes. * @@ -56,266 +50,257 @@ import { Resource } from '../../global/resource' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop + * @since 11 */ -interface QRCodeInterface { + interface QRCodeInterface { + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Called when a QR code is set. + * + * @param { ResourceStr } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + (value: ResourceStr): QRCodeAttribute; + } + /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare class QRCodeAttribute extends CommonMethod { + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor): QRCodeAttribute; + + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + backgroundColor(value: ResourceColor): QRCodeAttribute; + + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentOpacity(value: number | Resource): QRCodeAttribute; + } + /** - * Called when a QR code is set. + * Defines QRCode Component. * - * @param { ResourceStr } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - (value: ResourceStr): QRCodeAttribute; -} - -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class QRCodeAttribute extends CommonMethod { - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - color(value: ResourceColor): QRCodeAttribute; - + declare const QRCode: QRCodeInterface; + /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundColor(value: ResourceColor): QRCodeAttribute; - - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentOpacity(value: number | Resource): QRCodeAttribute; -} - -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const QRCode: QRCodeInterface; - -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const QRCodeInstance: QRCodeAttribute; + declare const QRCodeInstance: QRCodeAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 8f3a3b4d9079ea57fd3f5107a8dae0ed549b2061..616157cd1d9774e5bb96ba365b2bb62e5fdcedde 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier, Optional, DateTimeOptions } from './common' -import { ResourceColor, Length, ResourceStr } from './units' -import { FontStyle, FontWeight } from './enums' -/*** endif */ - /** * Provides a way to control the textclock status. * @@ -44,749 +38,701 @@ import { FontStyle, FontWeight } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare class TextClockController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * + declare class TextClockController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + constructor(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + start(); + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + stop(); + } + + /** + * TextClockConfiguration used by text clock content modifier + * + * @extends CommonConfiguration + * @interface TextClockConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a start event for textclock. - * + * @since 12 + */ + declare interface TextClockConfiguration extends CommonConfiguration { + /** + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + timeZoneOffset: number; + + /** + * TextClock is started or not. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + started: boolean; + + /** + * The time of the TextClock. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + timeValue: number; + } + + /** + * Options to construct TextClock component. + * + * @interface TextClockOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 - */ - start(); - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - start(): void; - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - stop(); - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - stop(): void; -} - -/** - * TextClockConfiguration used by text clock content modifier - * - * @extends CommonConfiguration - * @interface TextClockConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextClockConfiguration extends CommonConfiguration { - /** - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeZoneOffset: number; - - /** - * TextClock is started or not. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - started: boolean; - - /** - * The time of the TextClock. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeValue: number; -} - -/** - * Options to construct TextClock component. - * - * @interface TextClockOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextClockOptions { - /** - * Time zone offset. - * - * @type { ?number } + * @since 18 + */ + declare interface TextClockOptions { + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Time zone offset. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + timeZoneOffset?: number; + + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * TextClock controller. + * Anonymous Object Rectification. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + controller?: TextClockController + } + + /** + * TextClock component, which provides the text clock capability. + * + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Time zone offset. + * TextClock component, which provides the text clock capability. * - * @type { ?number } + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Time zone offset. + * TextClock component, which provides the text clock capability. * - * @type { ?number } + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Time zone offset. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeZoneOffset?: number; - - /** - * TextClock controller. - * - * @type { ?TextClockController } + interface TextClockInterface { + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * Anonymous Object Rectification. + * + * @param { TextClockOptions } [options] - TextClock options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + (options?: TextClockOptions): TextClockAttribute; + } + + /** + * Provides attribute for TextClock. + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * TextClock controller. + * Provides attribute for TextClock. * - * @type { ?TextClockController } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * TextClock controller. + * Provides attribute for TextClock. * - * @type { ?TextClockController } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * TextClock controller. - * Anonymous Object Rectification. + declare class TextClockAttribute extends CommonMethod { + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + format(value: ResourceStr): TextClockAttribute; + + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event default is seconds when TextClock is not in a form. + * The minimum callback interval for this event is minutes when TextClock is in a form. + * If visibility is Hidden the callback be disabled when TextClock is in a form. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onDateChange(event: (value: number) => void): TextClockAttribute; + + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontColor(value: ResourceColor): TextClockAttribute; + + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontSize(value: Length): TextClockAttribute; + + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontStyle(value: FontStyle): TextClockAttribute; + + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontWeight(value: number | FontWeight | string): TextClockAttribute; + + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontFamily(value: ResourceStr): TextClockAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + textShadow(value: ShadowOptions | Array): TextClockAttribute; + + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + fontFeature(value: string): TextClockAttribute; + + /** + * Set the content modifier of textclock. + * + * @param { ContentModifier } modifier - The content modifier of textclock. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): TextClockAttribute; + + /** + * Set hour format + * + * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. + * @returns { TextClockAttribute } the attribute of the text clock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; + } + + /** + * Defines TextClock Component. * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - controller?: TextClockController -} - -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface TextClockInterface { - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. + * Defines TextClock Component. * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. + * Defines TextClock Component. * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare const TextClock: TextClockInterface; + /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * Anonymous Object Rectification. + * Defines TextClock Component instance. * - * @param { TextClockOptions } [options] - TextClock options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TextClockOptions): TextClockAttribute; -} - -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class TextClockAttribute extends CommonMethod { - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * Defines TextClock Component instance. * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. + * Defines TextClock Component instance. * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - format(value: ResourceStr): TextClockAttribute; - - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event default is seconds when TextClock is not in a form. - * The minimum callback interval for this event is minutes when TextClock is in a form. - * If visibility is Hidden the callback be disabled when TextClock is in a form. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateChange(event: (value: number) => void): TextClockAttribute; - - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor(value: ResourceColor): TextClockAttribute; - - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontSize(value: Length): TextClockAttribute; - - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontStyle(value: FontStyle): TextClockAttribute; - - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontWeight(value: number | FontWeight | string): TextClockAttribute; - - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFamily(value: ResourceStr): TextClockAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - textShadow(value: ShadowOptions | Array): TextClockAttribute; - - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFeature(value: string): TextClockAttribute; - - /** - * Set the content modifier of textclock. - * - * @param { ContentModifier } modifier - The content modifier of textclock. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): TextClockAttribute; - - /** - * Set hour format - * - * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. - * @returns { TextClockAttribute } the attribute of the text clock - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; -} - -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const TextClock: TextClockInterface; - -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const TextClockInstance: TextClockAttribute; + declare const TextClockInstance: TextClockAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index c37788701c806dfa654bc3aad26d055e806ef65d..c6db62f919aa7f3d932b3ed3917229d3ff274786 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonConfiguration,CommonMethod,ShadowOptions,ContentModifier } from './common' -import { ResourceColor,Length,ResourceStr } from './units' -import { FontStyle,FontWeight } from './enums' -/*** endif */ - /** * Provides a way to control the process. * @@ -44,779 +38,717 @@ import { FontStyle,FontWeight } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare class TextTimerController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ + declare class TextTimerController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * constructor. + * A constructor used to create a TextTimerController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + constructor(); + + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Starts the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + start(); + + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Pauses the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + pause(); + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Resets the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + reset(); + } + /** - * constructor. - * A constructor used to create a TextTimerController object. + * TextTimerConfiguration used by content modifier. * + * @extends CommonConfiguration + * @interface TextTimerConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - + * @since 12 + */ + declare interface TextTimerConfiguration extends CommonConfiguration { + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { number } + * @default 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + count: number; + + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isCountDown: boolean; + + /** + * Whether the timer has already started. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + started: boolean; + + /** + * Elapsed time of the timer, in the minimum unit of the format. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + elapsedTime: number; + } + /** - * Provides a start event for timer. + * Defines the options of TextTimer. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides a start event for timer. + * Defines the options of TextTimer. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Starts the timer. + * Parameters of the TextTimer component. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - start(); - - /** - * Provides a start event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - start():void; - + interface TextTimerOptions { + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { ?boolean } - Default value: false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + isCountDown?: boolean; + + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { ?number } - Default value: 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + count?: number; + + /** + * Controller of Texttimer. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Controller of Texttimer. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * TextTimer controller. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + controller?: TextTimerController; + } + /** - * Provides a pause event for timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides a pause event for timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Pauses the timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - pause(); - - /** - * Provides a pause event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pause():void; - + interface TextTimerInterface { + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * A constructor used to create a TextTimerController object. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (options?: TextTimerOptions): TextTimerAttribute; + } + /** - * Provides an event to reset timer. + * Defines the TextTimer attribute functions. * - * @syscap SystemCapability.ArkUI.ArkUI.Full + * @extends CommonMethod * @since 8 */ /** - * Provides an event to reset timer. + * Defines the TextTimer attribute functions. * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Resets the timer. + * Defines the TextTimer attribute functions. * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - reset(); - - /** - * Provides an event to reset timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - reset():void; -} - -/** - * TextTimerConfiguration used by content modifier. - * - * @extends CommonConfiguration - * @interface TextTimerConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextTimerConfiguration extends CommonConfiguration { - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { number } - * @default 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - count: number; - - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isCountDown: boolean; - - /** - * Whether the timer has already started. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - started: boolean; + declare class TextTimerAttribute extends CommonMethod { + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the custom format. + * The value must contain at least one of the following keywords: HH, mm, ss, and SS. + * + *

NOTE: + *
If the specified date format is yy, MM, or dd, the default value is used instead. + *

+ * + * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + format(value: string): TextTimerAttribute; + + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font color. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontColor(value: ResourceColor): TextTimerAttribute; + + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font size. + * + * @param { Length } value - Font size.The default font size is 16 fp. + *
If fontSize is of the number type, the unit fp is used. + *
The value cannot be a percentage. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontSize(value: Length): TextTimerAttribute; + + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font style. + * + * @param { FontStyle } value - Font style.Default value: FontStyle.Normal + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontStyle(value: FontStyle): TextTimerAttribute; + + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Sets the font weight. + * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *

+ * + * @param { number | FontWeight | ResourceStr } value - Font weight. + *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; + + /** + * Called when the fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font family. + * + * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontFamily(value: ResourceStr): TextTimerAttribute; + + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Triggered when the time text changes. + * This event is not triggered when the screen is locked or the application is running in the background. + * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Sets the text shadow. + * It supports input parameters in an array to implement multiple text shadows. + * This API does not work with the fill attribute or coloring strategy. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + textShadow(value: ShadowOptions | Array): TextTimerAttribute; + + /** + * Creates a content modifier. + * + * @param { ContentModifier } modifier - The content modifier of texttimer. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): TextTimerAttribute; + } /** - * Elapsed time of the timer, in the minimum unit of the format. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - elapsedTime: number; -} - -/** - * Defines the options of TextTimer. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the options of TextTimer. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Parameters of the TextTimer component. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TextTimerOptions { - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { ?boolean } - Default value: false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - isCountDown?: boolean; - - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { ?number } - Default value: 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - count?: number; - - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * TextTimer controller. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - controller?: TextTimerController; -} - -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -interface TextTimerInterface { - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * A constructor used to create a TextTimerController object. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TextTimerOptions): TextTimerAttribute; -} - -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @since 8 - */ -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - * @noninterop - */ -declare class TextTimerAttribute extends CommonMethod { - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the custom format. - * The value must contain at least one of the following keywords: HH, mm, ss, and SS. - * - *

NOTE: - *
If the specified date format is yy, MM, or dd, the default value is used instead. - *

- * - * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - format(value: string): TextTimerAttribute; - - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font color. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor(value: ResourceColor): TextTimerAttribute; - - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font size. - * - * @param { Length } value - Font size.The default font size is 16 fp. - *
If fontSize is of the number type, the unit fp is used. - *
The value cannot be a percentage. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontSize(value: Length): TextTimerAttribute; - - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font style. - * - * @param { FontStyle } value - Font style.Default value: FontStyle.Normal - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontStyle(value: FontStyle): TextTimerAttribute; - - /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare const TextTimer: TextTimerInterface; + /** - * Sets the font weight. - * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *

- * - * @param { number | FontWeight | ResourceStr } value - Font weight. - *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. - *
A larger value indicates a heavier font weight. - *
For the string type, only strings that represent a number. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; - - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font family. - * - * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFamily(value: ResourceStr): TextTimerAttribute; - - /** - * Called when the timer value is returned. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the timer value is returned. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Triggered when the time text changes. - * This event is not triggered when the screen is locked or the application is running in the background. - * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ - /** - * Sets the text shadow. - * It supports input parameters in an array to implement multiple text shadows. - * This API does not work with the fill attribute or coloring strategy. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - textShadow(value: ShadowOptions | Array): TextTimerAttribute; - - /** - * Creates a content modifier. - * - * @param { ContentModifier } modifier - The content modifier of texttimer. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): TextTimerAttribute; -} - -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const TextTimer: TextTimerInterface; - -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - * @noninterop - */ -declare const TextTimerInstance: TextTimerAttribute; + declare const TextTimerInstance: TextTimerAttribute; + \ No newline at end of file diff --git a/api/arkui/FrameNode.static.d.ets b/api/arkui/FrameNode.static.d.ets index 2f8717bc3a8ae6c59592de9078b3fa519acd9c67..bdc925b164de5db45fa52df4c210820fae20c421 100644 --- a/api/arkui/FrameNode.static.d.ets +++ b/api/arkui/FrameNode.static.d.ets @@ -66,6 +66,11 @@ import { ToggleAttribute, ToggleOptions } from './component/toggle'; import { CheckboxGroupAttribute, CheckboxGroupOptions } from './component/checkboxgroup'; import { RatingAttribute, RatingOptions } from './component/rating'; import { XComponentAttribute, XComponentController, XComponentOptions, XComponentParameters, NativeXComponentParameters } from './component/xcomponent'; +import image from '../@ohos.multimedia.image'; +import { ImageAIOptions } from './component/imageCommon'; +import { ResourceStr } from './component/units'; +import { LoadingProgressAttribute } from './component/loadingProgress'; + /** * Layout constraint, include the max size, the min size and the reference size for children to calculate percent. @@ -772,7 +777,14 @@ export declare namespace typeNode { createBlankNode, createXComponentNodeDefault, createXComponentNodeWithOptions, - createXComponentNodeWithNativeParameters + createXComponentNodeWithNativeParameters, + createImageNode, + createQRCodeNode, + createTextTimerNode, + createTextClockNode, + createLoadingProgressNode, + createProgressNode, + createBadgeNode, } /** @@ -1085,6 +1097,44 @@ export declare namespace typeNode { */ export function createDividerNode(context: UIContext, nodeType: 'Divider'): Divider; +/** + * Define the LoadingProgress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class LoadingProgressFrameNode extends TypedFrameNode { + /** + * Initialize LoadingProgress FrameNode. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(): LoadingProgressAttribute; + } + + /** + * Define the FrameNode type for LoadingProgress. + * + * @typedef { LoadingProgressFrameNode } LoadingProgress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type LoadingProgress = LoadingProgressFrameNode; + + /** + * Create a FrameNode of LoadingProgress type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'LoadingProgress' } nodeType - node type. + * @returns { LoadingProgress } - Return LoadingProgress type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createLoadingProgressNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; + /** * Define the Blank type of FrameNode. * @@ -1124,6 +1174,66 @@ export declare namespace typeNode { */ export function createBlankNode(context: UIContext, nodeType: 'Blank'): Blank; + /** + * Define the Image type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class ImageFrameNode extends TypedFrameNode { + /** + * Initialize Image FrameNode. + * + * @param { image.PixelMap | ResourceStr | DrawableDescriptor } src + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(src: image.PixelMap | ResourceStr | DrawableDescriptor): ImageAttribute; + + /** + * Initialize Image FrameNode. + * + * @param { image.PixelMap | ResourceStr | DrawableDescriptor | ImageContent } src + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(src: image.PixelMap | ResourceStr | DrawableDescriptor | ImageContent): ImageAttribute; + + /** + * Initialize Image FrameNode. + * + * @param { image.PixelMap | ResourceStr | DrawableDescriptor } src + * @param { ImageAIOptions } value + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(src: image.PixelMap | ResourceStr | DrawableDescriptor, value: ImageAIOptions): ImageAttribute; + } + + /** + * Define the FrameNode type for Image. + * + * @typedef { ImageFrameNode } Image + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Image = ImageFrameNode; + + /** + * Create a FrameNode of Image type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Image' } nodeType - node type. + * @returns { Image } - Return Image type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createImageNode(context: UIContext, nodeType: 'Image'): Image; + /** * Define the List type of FrameNode. * @@ -1241,6 +1351,45 @@ export declare namespace typeNode { */ export function createListItemGroupNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup; + /** + * Define the Progress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class ProgressFrameNode extends TypedFrameNode { + /** + * Initialize Progress FrameNode. + * + * @param { ProgressOptions } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value: ProgressOptions): ProgressAttribute; + } + + /** + * Define the FrameNode type for Progress. + * + * @typedef { ProgressFrameNode } Progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Progress = ProgressFrameNode; + + /** + * Create a FrameNode of Progress type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Progress' } nodeType - node type. + * @returns { Progress } - Return Progress type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createProgressNode(context: UIContext, nodeType: 'Progress'): Progress; + /** * Define the Scroll type of FrameNode. * @@ -1280,6 +1429,84 @@ export declare namespace typeNode { */ export function createScrollNode(context: UIContext, nodeType: 'Scroll'): Scroll; + /** + * Define the TextClock type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class TextClockFrameNode extends TypedFrameNode { + /** + * Initialize TextClock FrameNode. + * + * @param { TextClockOptions } [options] + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: TextClockOptions): TextClockAttribute; + } + + /** + * Define the FrameNode type for TextClock. + * + * @typedef { TextClockFrameNode } TextClock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type TextClock = TextClockFrameNode; + + /** + * Create a FrameNode of TextClock type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextClock' } nodeType - node type. + * @returns { TextClock } - Return TextClock type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createTextClockNode(context: UIContext, nodeType: 'TextClock'): TextClock; + + /** + * Define the TextTimer type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class TextTimerFrameNode extends TypedFrameNode { + /** + * Initialize TextTimer FrameNode. + * + * @param { TextTimerOptions } [options] + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: TextTimerOptions): TextTimerAttribute; + } + + /** + * Define the FrameNode type for TextTimer. + * + * @typedef { TextTimerFrameNode } TextTimer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type TextTimer = TextTimerFrameNode; + + /** + * Create a FrameNode of TextTimer type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextTimer' } nodeType - node type. + * @returns { TextTimer } - Return TextTimer type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createTextTimerNode(context: UIContext, nodeType: 'TextTimer'): TextTimer; + /** * Define the Grid type of FrameNode. * @@ -1632,6 +1859,94 @@ export declare namespace typeNode { */ export function createSymbolGlyphNode(context: UIContext, nodeType: 'SymbolGlyph'): SymbolGlyph; +/** + * Define the QRCode type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class QRCodeFrameNode extends TypedFrameNode { + /** + * Initialize QRCode FrameNode. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value: string): QRCodeAttribute; + } + + /** + * Define the FrameNode type for QRCode. + * + * @typedef { QRCodeFrameNode } QRCode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type QRCode = QRCodeFrameNode; + + /** + * Create a FrameNode of QRCode type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'QRCode' } nodeType - node type. + * @returns { QRCode } - Return QRCode type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createQRCodeNode(context: UIContext, nodeType: 'QRCode'): QRCode; + +/** + * Define the Badge type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class BadgeFrameNode extends TypedFrameNode { + /** + * Initialize Badge FrameNode. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value: BadgeParamWithNumber): BadgeAttribute; + + /** + * Initialize Badge FrameNode. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value: BadgeParamWithString): BadgeAttribute; + } + + /** + * Define the FrameNode type for Badge. + * + * @typedef { BadgeFrameNode } Badge + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Badge = BadgeFrameNode; + + /** + * Create a FrameNode of Badge type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Badge' } nodeType - node type. + * @returns { Badge } - Return Badge type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createBadgeNode(context: UIContext, nodeType: 'Badge'): Badge; + /** * Define the Marquee type of FrameNode. * diff --git a/api/arkui/component/badge.static.d.ets b/api/arkui/component/badge.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..39bf73cb95a794311555e27a34fe1f62c930da61 --- /dev/null +++ b/api/arkui/component/badge.static.d.ets @@ -0,0 +1,284 @@ +/* + * 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. + */ + +/* + * 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 + */ +'use static'; + +/** + * @file + * @kit ArkUI + * @arkts static + */ +import { ResourceColor, Length, Position, Resource, ResourceStr } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Defines the badge position property. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum BadgePosition { + /** + * The badge is displayed in the upper right corner of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + RightTop, + /** + * The badge is vertically centered on the right of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Right, + /** + * The badge is vertically centered on the left of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Left +} +/** + * BadgeStyle object + * + * @interface BadgeStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface BadgeStyle { + /** + * Font color. + * + * @type { ?ResourceColor } + * @default Color.White + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ResourceColor; + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: number | string; + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + badgeSize?: number | string; + /** + * Badge color. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + badgeColor?: ResourceColor; + /** + * Border color of the background. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderColor?: ResourceColor; + /** + * Border width of the background. + * This parameter cannot be set in percentage. + * Unit: vp + * + * @type { ?Length } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderWidth?: Length; + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight?: number | FontWeight | string; +} +/** + * Provides basic parameters for creating a badge. + * + * @interface BadgeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface BadgeParam { + /** + * Position to display the badge relative to the parent component. + * + *

NOTE: + *
With the Position type, percentage values are not supported. + *
If an invalid value is set, the default value (0,0), + * which indicates the upper left corner of the component, will be used. + *
With the BadgePosition type, the position is mirrored based on the Direction property. + *

+ * + * @type { ?(BadgePosition | Position) } + * @default BadgePosition.RightTop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + position?: BadgePosition | Position; + /** + * Style of the badge, including the font color, font size, badge color, and badge size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style: BadgeStyle; +} +/** + * Inherits from BadgeParam and has all attributes of BadgeParam. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface BadgeParamWithNumber extends BadgeParam { + /** + * Number of notifications. + * + *

NOTE: + *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + count: number; + /** + * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. + * + *

NOTE: + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { ?number } + * @default 99 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + maxCount?: number; +} +/** + * Inherits from BadgeParam and has all attributes of BadgeParam. + * + * @extends BadgeParam + * @interface BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface BadgeParamWithString extends BadgeParam { + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: string; +} +export declare interface BadgeAttribute extends CommonMethod { + /** + * Set the attribute modifier + * + * @param { AttributeModifier | AttributeModifier | undefined } modifier + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * Define BadgeParamWithString's property 'value' type + * + * @typedef { string | Resource } BadgeParamWithStringType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type BadgeParamWithStringType = string | Resource; +/** + * Define BadgeStyle's size-relative properties type + * + * @typedef { number | string | Resource } BadgeParamWithString + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type BadgeStyleSizeType = number | string | Resource; + +/** + * Defines Badge Component. + * + * @param { BadgeParamWithNumber | BadgeParamWithString } value + * @param { function } [content_] - container + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare function Badge( + value: BadgeParamWithNumber | BadgeParamWithString, + @memo + content_?: () => void +): BadgeAttribute; diff --git a/api/arkui/component/image.d.ets b/api/arkui/component/image.d.ets deleted file mode 100644 index 494fb9af4cd8593b3a735e459f5c84395d30c1a8..0000000000000000000000000000000000000000 --- a/api/arkui/component/image.d.ets +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2024-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 - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { DrawableDescriptor } from './../../../api/@ohos.arkui.drawableDescriptor' -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -import { ResolutionQuality, PixelMap, ResourceStr, VisualEffect, Filter, UniformDataType, Blender, Length, SizeOptions, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, Margin, LocalizedMargin, ResourceColor, Position, BorderOptions, EdgeStyles, EdgeWidths, LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, BorderRadiuses, LocalizedBorderRadiuses, OutlineOptions, EdgeOutlineStyles, Dimension, EdgeOutlineWidths, OutlineRadiuses, Area, Edges, LocalizedEdges, LocalizedPosition, AccessibilityOptions, ColorFilter } from './units' -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon' -import { CommonMethod, DrawModifier, Rectangle, Callback_Array_TouchTestInfo_TouchResult, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, BorderImageOption, OutlineStyle, Callback_ClickEvent_Void, ClickEvent, Callback_Boolean_HoverEvent_Void, HoverEvent, AccessibilityCallback, Callback_MouseEvent_Void, MouseEvent, Callback_TouchEvent_Void, TouchEvent, Callback_KeyEvent_Void, KeyEvent, Callback_KeyEvent_Boolean, AnimateParam, TransitionOptions, TransitionEffect, MotionBlurOptions, InvertOptions, TranslateOptions, ScaleOptions, RotateOptions, Callback_Area_Area_Void, Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs, Literal_Number_offset_span, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo, DragEvent, CustomBuilder, DragItemInfo, Callback_DragEvent_String_Void, Callback_PreDragStatus_Void, PreDragStatus, Type_CommonMethod_linearGradient_value, Tuple_ResourceColor_Number, Type_CommonMethod_sweepGradient_value, Tuple_Length_Length, Type_CommonMethod_radialGradient_value, MotionPathOptions, ShadowOptions, ShadowStyle, ProgressMask, StateStyles, PixelStretchEffectOptions, AttributeModifier, GestureModifier, BackgroundBrightnessOptions, Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult, GestureRecognizerJudgeBeginCallback, ShouldBuiltInRecognizerParallelWithCallback, Callback_TouchEvent_HitTestMode, SizeChangeCallback, SafeAreaType, SafeAreaEdge, Literal_Alignment_align, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, TransitionFinishCallback, BlurOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, VisibleAreaChangeCallback, PointLightStyle } from './common' -import { HitTestMode, ImageSize, Alignment, BorderStyle, ColoringStrategy, HoverEffect, Color, Visibility, ItemAlign, Direction, GradientDirection, ObscuredReasons, RenderFit, ImageRepeat, Axis, ResponseType, FunctionKey, ModifierKey, ImageFit, CopyOptions } from './enums' -import { Resource } from './../../../api/global/resource' - -export enum ImageRenderMode { - ORIGINAL = 0, - Original = 0, - TEMPLATE = 1, - Template = 1 -} -export enum ImageContent { - EMPTY = 0 -} -export enum DynamicRangeMode { - HIGH = 0, - CONSTRAINT = 1, - STANDARD = 2 -} -export enum ImageInterpolation { - NONE = 0, - None = 0, - LOW = 1, - Low = 1, - MEDIUM = 2, - Medium = 2, - HIGH = 3, - High = 3 -} -export interface ImageInterface { - invoke(src: PixelMap | ResourceStr | DrawableDescriptor): ImageAttribute; - - -} -export interface ImageSourceSize { - width: number; - height: number; -} -export interface Type_ImageAttribute_onComplete_callback_event { - width: number; - height: number; - componentWidth: number; - componentHeight: number; - loadingStatus: number; - contentWidth: number; - contentHeight: number; - contentOffsetX: number; - contentOffsetY: number; -} -export type Callback_Type_ImageAttribute_onComplete_callback_event_Void = (event?: Type_ImageAttribute_onComplete_callback_event) => void; -export interface ImageAttribute extends CommonMethod { - @memo - alt(value: string | Resource | PixelMap): this; - @memo - matchTextDirection(value: boolean): this; - @memo - fitOriginalSize(value: boolean): this; - @memo - fillColor(value: ResourceColor): this; - @memo - objectFit(value: ImageFit): this; - @memo - objectRepeat(value: ImageRepeat): this; - @memo - autoResize(value: boolean): this; - @memo - renderMode(value: ImageRenderMode): this; - @memo - dynamicRangeMode(value: DynamicRangeMode): this; - @memo - interpolation(value: ImageInterpolation): this; - @memo - sourceSize(value: ImageSourceSize): this; - @memo - syncLoad(value: boolean): this; - @memo - copyOption(value: CopyOptions): this; - @memo - draggable(value: boolean): this; - @memo - pointLight(value: PointLightStyle): this; - @memo - edgeAntialiasing(value: number): this; - @memo - onComplete(value: ((event?: Type_ImageAttribute_onComplete_callback_event) => void)): this; - @memo - onError(value: ImageErrorCallback): this; - @memo - onFinish(value: (() => void)): this; - @memo - enableAnalyzer(value: boolean): this; - @memo - analyzerConfig(value: ImageAnalyzerConfig): this; - @memo - resizable(value: ResizableOptions): this; - @memo - privacySensitive(value: boolean): this; - @memo - enhancedImageQuality(value: ResolutionQuality): this; -} -export type ImageErrorCallback = (error: ImageError) => void; -export interface ImageError { - componentWidth: number; - componentHeight: number; - message: string; -} -export interface ResizableOptions { - slice?: EdgeWidths; -} -@memo -@ComponentBuilder -export declare function Image( - src: PixelMap | ResourceStr | DrawableDescriptor | PixelMap | ResourceStr | DrawableDescriptor | ImageContent, imageAIOptions?: ImageAIOptions | undefined, - @memo - content_?: () => void, -): ImageAttribute diff --git a/api/arkui/component/image.static.d.ets b/api/arkui/component/image.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..dddfb7a9c24c5f4de7b8f774cdcd06bfe853803b --- /dev/null +++ b/api/arkui/component/image.static.d.ets @@ -0,0 +1,812 @@ +/* + * 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 image from '../../@ohos.multimedia.image'; +import drawing from '../../@ohos.graphics.drawing'; +import matrix4 from '../../@ohos.matrix4'; +import { BusinessError } from '../../@ohos.base'; +import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics } from './units'; +import { ImageFit, ImageRepeat, CopyOptions } from './enums'; +import { Resource } from '../../global/resource'; +import { CommonMethod, PointLightStyle, PixelMap } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Import the DrawingColorFilter type object for image color filter setting. + * + * @typedef { drawing.ColorFilter } DrawingColorFilter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type DrawingColorFilter = drawing.ColorFilter; +/** + * Enumerates all the levels available for the image resolution quality. + * + * @typedef { image.ResolutionQuality } ResolutionQuality + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ +export type ResolutionQuality = image.ResolutionQuality; +/** + * Lattice for dividing an image into grids. + * + * @typedef { drawing.Lattice } DrawingLattice + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type DrawingLattice = drawing.Lattice; +/** + * Object matrix used for setting image transformations. + * + * @typedef { matrix4.Matrix4Transit } Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type ImageMatrix = matrix4.Matrix4Transit; +/** + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 20 + */ +export declare enum ImageRenderMode { + /** + * Render according to the original image, including colors. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Original, + /** + * Render the image as a template image, ignoring the color information of the image. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Template +} +/** + * Specify image's content. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ImageContent { + /** + * Make image empty. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + EMPTY = 0 +} +/** + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum DynamicRangeMode { + /** + * Allow image content to use an unrestricted extended range. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + HIGH = 0, + /** + * Allow image content to use some extended range. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + CONSTRAINT = 1, + /** + * Restrict the image content dynamic range to the standard range. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + STANDARD = 2 +} +/** + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ImageInterpolation { + /** + * Do not use interpolated image data. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + None, + /** + * Low usage of interpolated image data. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Low, + /** + * Interpolated image data is used moderately. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Medium, + /** + * High usage of interpolated image data may affect the speed of image rendering. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + High +} +/** + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ImageRotateOrientation { + /** + * Rotate according to the image rotation + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + AUTO = 0, + /** + * Ignore the rotation of the image + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + UP = 1, + /** + * Based on image rotation, rotate clockwise 90 degrees + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + RIGHT = 2, + /** + * Based on image rotation, rotate clockwise 180 degrees + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DOWN = 3, + /** + * Based on image rotation, rotate clockwise 270 degrees + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LEFT = 4, + /** + * Flip the orignial image horizontally + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + UP_MIRRORED = 5, + /** + * Flip the orignial image horizontally and rotate clockwise 90 degrees + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + RIGHT_MIRRORED = 6, + /** + * Flip the orignial image vertically + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DOWN_MIRRORED = 7, + /** + * Flip the orignial image horizontally and rotate clockwise 270 degrees + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LEFT_MIRRORED = 8 +} +/** + * ImageCompleteEvent + * + * @interface ImageCompleteEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface ImageCompleteEvent { + /** + * The width of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + /** + * The height of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height: number; + /** + * The width of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentWidth: number; + /** + * The height of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentHeight: number; + /** + * The value of the status of the image being loaded successfully. + * If the returned status value is 0, the image data is successfully loaded. + * If the returned status value is 1, the image is successfully decoded. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + loadingStatus: number; + /** + * The width of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentWidth: number; + /** + * The height of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentHeight: number; + /** + * The actual draw is offset from the x-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentOffsetX: number; + /** + * The actual draw is offset from the y-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentOffsetY: number; +} +/** + * Defines source size of image. + * + * @interface ImageSourceSize + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface ImageSourceSize { + /** + * Set width. + * Anonymous Object Rectification. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + /** + * Set height. + * Anonymous Object Rectification. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height: number; +} +/** + * Defines the ColorContent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ColorContent { + /** + * Indicates the ColorContent to original value. + * + * @type { ColorContent } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static readonly ORIGIN: ColorContent; +} +export declare interface ImageAttribute extends CommonMethod { + /** + * Sets the placeholder image displayed during loading. + * + *

NOTE: + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { string | Resource | PixelMap } value - Placeholder image displayed during loading, Default value is null. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + alt(value: string | Resource | PixelMap | undefined): this; + /** + * Specifies whether to display the image in the system language direction. + * + *

NOTE: + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { boolean } value - Whether to display the image in the system language direction, Default value is false. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + matchTextDirection(value: boolean | undefined): this; + /** + * Sets whether the display size of the image follows the source size. + * + *

NOTE: + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { boolean } value - Whether to fit the image to the size of the image source, Default value is false. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fitOriginalSize(value: boolean | undefined): this; + /** + * Sets the fill color to be superimposed on the image. + * By default, no fill color is applied. If an invalid value is passed, the system uses the default theme color: + * black in light mode and white in dark mode. + * + *

NOTE: + *
This attribute applies only to SVG images. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ResourceColor | ColorContent | ColorMetrics } color + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fillColor(color: ResourceColor | ColorContent | ColorMetrics | undefined): this; + /** + * Sets how the image is resized to fit its container. + * + * @param { ImageFit } value - How the image is resized to fit its container, Default value is ImageFit.Cover. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + objectFit(value: ImageFit | undefined): this; + /** + * Sets the transformation matrix of the image. + * + * @param { ImageMatrix } matrix + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageMatrix(matrix: ImageMatrix | undefined): this; + /** + * Set the repeat style of the picture + * + *

NOTE: + *
This attribute is not applicable to SVG images. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ImageRepeat } value - How the image is repeated, Default value is ImageRepeat.NoRepeat. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + objectRepeat(value: ImageRepeat | undefined): this; + /** + * Specifies whether to resize the image source based on the size of the display area during image decoding. + * + *

NOTE: + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor + * or SVG. + *

+ * + * @param { boolean } value - Whether to resize the image source based on the size of the display area + * during image decoding, Default value is false. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + autoResize(value: boolean | undefined): this; + /** + * Sets the rendering mode of the image. + * + *

NOTE: + *
This attribute is not applicable to SVG images. + *
When ColorFilter is set, this attribute is not effective. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ImageRenderMode } value - Rendering mode of the image, Default value is ImageRenderMode.Original. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderMode(value: ImageRenderMode | undefined): this; + /** + * Sets the dynamic range of the image to be displayed. + * + *

NOTE: + *
This attribute is not applicable to SVG images. + *

+ * + * @param { DynamicRangeMode } value - Dynamic range of the image. + * @returns { ImageAttribute } Returns the instance of the ImageAttribute, Default value is + * dynamicRangeMode.Standard. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dynamicRangeMode(value: DynamicRangeMode | undefined): this; + /** + * Sets the interpolation effect of the image, which can alleviate aliasing that occurs when the image is zoomed. + * + *

NOTE: + *
This attribute is not applicable to SVG images. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ImageInterpolation } value - Interpolation effect of the image, Default value is ImageInterpolation.Low. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interpolation(value: ImageInterpolation | undefined): this; + /** + * Sets the decoding size of the image. + * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * Anonymous Object Rectification. + * + *

NOTE: + *
This attribute works only when the target size is smaller than the source size. + *
This attribute is not applicable to SVG images or PixelMap objects. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ImageSourceSize } value - Decoding size of the image. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + sourceSize(value: ImageSourceSize | undefined): this; + /** + * Specifies whether to load the image synchronously. + * + *

NOTE: + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { boolean } value - Whether to load the image synchronously, Default value is false. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + syncLoad(value: boolean | undefined): this; + /** + * Sets the color filter for the image. + * + *

NOTE: + *
When this attribute is set, renderMode is not effective. + *

+ * + * @param { ColorFilter | DrawingColorFilter } value - Color filter of the image. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + colorFilter(value: ColorFilter | DrawingColorFilter | undefined): this; + /** + * Whether the image can be copied. + * + * NOTE: + *
SVG images cannot be copied. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { CopyOptions } value - Specifies whether the image can be copied, Default value is CopyOptions.None. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + copyOption(value: CopyOptions | undefined): this; + /** + * Specifies whether the image is draggable. + * + *

NOTE: + *
This attribute cannot be used together with the onDragStart event. + *

+ * + * @param { boolean } value - Whether the image is draggable, Default value is true. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + draggable(value: boolean | undefined): this; + /** + * Defines the PointLight + * + * @param { PointLightStyle } value - The point light style. + * @returns { ImageAttribute } The attribute of the image. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + pointLight(value: PointLightStyle | undefined): this; + /** + * SVG anti-aliasing. + * The range of the parameter values is (0.333, 1.333]. + * Default value is 0.0. + * + * @param { number } value - The degree of anti-aliasing. + * @returns { ImageAttribute } The attribute of the image. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + edgeAntialiasing(value: number | undefined): this; + /** + * This callback is triggered when an image is successfully loaded. + * The size of the image source that is successfully loaded is returned, in pixels. + * + * @param { ImageOnCompleteCallback } callback + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onComplete(callback: ImageOnCompleteCallback | undefined): this; + /** + * Triggered when an error occurs during image loading. + * The field of "message" carries the detailed information of failed image loading. + * + *

NOTE: + *
This event is not triggered if the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { ImageErrorCallback } callback + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onError(callback: ImageErrorCallback | undefined): this; + /** + * When the loaded source file is a svg image, this callback is triggered when the playback of the svg image is complete. + * If the svg image is a wireless loop image, this callback is not triggered. + * + *

NOTE: + *
Only SVG images are supported. + *
This event is not triggered if the parameter type of the component is AnimatedDrawableDescriptor. + *

+ * + * @param { function } event + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onFinish(event: (() => void) | undefined): this; + /** + * Sets whether to enable the AI analyzer + * + *

NOTE: + *
This attribute cannot be used together with the overlay attribute. If they are set at the same time, + * the CustomBuilder attribute in overlay has no effect. This attribute depends on device capabilities. + *
Images to be analyzed must be static, non-vector images. That is, SVG and GIF images cannot be analyzed. + * Pixel maps in RGBA_8888 format can be passed in for analysis. + *
The placeholder images (specified by alt) cannot be analyzed. An image can be analyzed only when + * objectRepeat is set to ImageRepeat.NoRepeat and obscured is disabled. + *
Analysis is performed based on the complete original image. If the clip, margin, borderRadius, + * position, or objectFit attribute is set, the image is not displayed completely. + * If renderMode is used to apply a mask, analysis is still performed based on the complete original image. + * The copyOption attribute does not affect the AI analyzer. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. + *
The ohos.permission.INTERNET permission must be declared. + *

+ * + * @param { boolean} enable - Whether to enable the AI analyzer, Default value is false. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableAnalyzer(enable: boolean | undefined): this; + /** + * Set image analyzer with config. + * + * @param { ImageAnalyzerConfig } config + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + analyzerConfig(config: ImageAnalyzerConfig | undefined): this; + /** + * Sets the resizable image options. + * + *

NOTE: + *
Resizing is effective for drag previews and placeholder images. + *
When ResizableOptions is set to a valid value, the objectRepeat attribute does not take effect. + *
When the sum of the values of top and bottom is greater than the source image height, + * or the sum of the values of left and right is greater than the source image width, + * the ResizableOptions attribute does not take effect. + *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor + * or SVG. + *

+ * + * @param { ResizableOptions } value - Resizable image options. + * @returns { ImageAttribute } Returns the instance of the ImageAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + resizable(value: ResizableOptions | undefined): this; + /** + * Set the quality enhancement level of image. + * + * @param { boolean } supported - Whether to support sensitive privacy information. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + privacySensitive(supported: boolean | undefined): this; + /** + * Set the quality enhancement level of image. + * + * @param { ResolutionQuality } imageQuality + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + enhancedImageQuality(imageQuality: ResolutionQuality | undefined): this; + /** + * Sets the display orientation of the image content. + * + * @param { ImageRotateOrientation } orientation - Display orientation of the image content, Default value + * is ImageRotateOrientation.UP. + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + orientation(orientation: ImageRotateOrientation | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * @typedef { function } ImageErrorCallback + * @param { ImageError } error + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type ImageErrorCallback = (error: ImageError) => void; +/** + * ImageOnCompleteCallback + * + * @typedef { function } ImageOnCompleteCallback + * @param { ImageCompleteEvent } loadEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; +/** + * @interface ImageError + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ImageError { + /** + * Component width. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentWidth: number; + /** + * Component height. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentHeight: number; + /** + * Message. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + message: string; + /** + * Business Error. + * + * @type { ?BusinessError } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + error?: BusinessError; +} +/** + * Image resizable options + * + * @interface ResizableOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ResizableOptions { + /** + * Image slice widths. + * + * @type { ?EdgeWidths } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + slice?: EdgeWidths; + /** + * Image lattice. + * + * @type { ?DrawingLattice } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lattice?: DrawingLattice; +} +export declare function Image(src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent | PixelMap | ResourceStr | DrawableDescriptor, imageAIOptions?: ImageAIOptions, +@memo +content_?: () => void): ImageAttribute; diff --git a/api/arkui/component/imageAnimator.static.d.ets b/api/arkui/component/imageAnimator.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c0e461708ba32fc98a7d112faefd4f40bc52831 --- /dev/null +++ b/api/arkui/component/imageAnimator.static.d.ets @@ -0,0 +1,223 @@ +/* + * 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 { Resource } from '../../global/resource'; +import { CommonMethod, PixelMap } from './common'; +import { AnimationStatus, FillMode } from './enums'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface ImageFrameInfo { + /** + * Image path + * + * @type { string | Resource | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src: string | Resource | PixelMap; + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: number | string; + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: number | string; + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + top?: number | string; + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + left?: number | string; + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; +} +export declare interface ImageAnimatorAttribute extends CommonMethod { + /** + * Sets the image frame information. + * + *

NOTE: + *
Dynamic update is not supported. + *

+ * + * @param { Array } value - Image frame informatio, Default value is []. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + images(value: Array | undefined): this; + /** + * Sets the playback state of the animation. + * + * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state(value: AnimationStatus | undefined): this; + /** + * Sets the playback duration. + * The unit is millisecond. + * + *

NOTE: + *
This attribute does not take effect when a separate duration is set for any of the image frames. + *

+ * + * @param { number } value - Playback duration, Default value is 1000. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration(value: number | undefined): this; + /** + * Sets the playback direction. + * + * @param { boolean } value - Playback direction, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + reverse(value: boolean | undefined): this; + /** + * Sets whether the image size is fixed at the component size. + * + * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fixedSize(value: boolean | undefined): this; + /** + * Sets the status before and after execution of the animation in the current playback direction. + * + * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, + * Default value is FillMode.Forwards. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fillMode(value: FillMode | undefined): this; + /** + * Sets the number of times that the animation is played. + * Played once by default + * + * @param { number } value - Number of times that the animation is played, Default value is 1. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iterations(value: number | undefined): this; + /** + * Sets whether the component should automatically pause or resume based on its visibility, using the system's + * onVisibleAreaChange event. + * + * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on + * its visibility, using the system's onVisibleAreaChange event, Default value is false. + * @returns { ImageAnimatorAttribute } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + monitorInvisibleArea(monitorInvisibleArea: boolean | undefined): this; + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onStart(event: (() => void) | undefined): this; + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onPause(event: (() => void) | undefined): this; + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onRepeat(event: (() => void) | undefined): this; + /** + * Status callback, which is triggered when the animation playback returns to the initial state. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel(event: (() => void) | undefined): this; + /** + * Status callback, which is triggered when the animation playback is complete or stopped. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onFinish(event: (() => void) | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function ImageAnimator( +@memo +content_?: () => void): ImageAnimatorAttribute; diff --git a/api/arkui/component/imageCommon.d.ets b/api/arkui/component/imageCommon.d.ets deleted file mode 100644 index a6a2bae70bd3713625c89ceb5b43880e70062a9c..0000000000000000000000000000000000000000 --- a/api/arkui/component/imageCommon.d.ets +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2024-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 - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -export enum ImageAnalyzerType { - SUBJECT = 0, - TEXT = 1, - OBJECT_LOOKUP = 2 -} -export interface ImageAnalyzerController { - getImageAnalyzerSupportTypes(): Array -} -export interface ImageAnalyzerConfig { - types: Array; -} -export interface ImageAIOptions { - types?: Array; - aiController?: ImageAnalyzerController; -} diff --git a/api/arkui/component/imageCommon.static.d.ets b/api/arkui/component/imageCommon.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..04a4b5d397275bf3486dba62ca13acb7ccf45100 --- /dev/null +++ b/api/arkui/component/imageCommon.static.d.ets @@ -0,0 +1,119 @@ +'use static'; +/* + * 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 + */ + +/** + * Defines the image analyze type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ImageAnalyzerType { + /** + * Image analyze type subject. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SUBJECT = 0, + /** + * Image analyze type text. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT, + /** + * Image analyze type object lookup. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + OBJECT_LOOKUP +} +/** + * Image analyzer controller. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ImageAnalyzerController { + /** + * Constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Get image analyzer support types. + * + * @returns { ImageAnalyzerType[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; +} +/** + * Image analyzer config. + * + * @interface ImageAnalyzerConfig + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ImageAnalyzerConfig { + /** + * Image analyze types. + * + * @type { ImageAnalyzerType[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + types: ImageAnalyzerType[]; +} +/** + * Image ai options. + * + * @interface ImageAIOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ImageAIOptions { + /** + * Image analyze types. + * + * @type { ?ImageAnalyzerType[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + types?: ImageAnalyzerType[]; + /** + * Image analyze types. + * + * @type { ?ImageAnalyzerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + aiController?: ImageAnalyzerController; +} diff --git a/api/arkui/component/loadingProgress.static.d.ets b/api/arkui/component/loadingProgress.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c5bf43ad7d147d96652f3458a532c1c4c5feb3d --- /dev/null +++ b/api/arkui/component/loadingProgress.static.d.ets @@ -0,0 +1,113 @@ +/* + * 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, ContentModifier, CommonConfiguration } from './common'; +import { ResourceColor } from './units'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Load style of progress bar. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum LoadingProgressStyle { + /** + * Default style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Default, + /** + * Announcement style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Circular, + /** + * The style of the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Orbital +} +export declare interface LoadingProgressAttribute extends CommonMethod { + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color(value: ResourceColor | undefined): this; + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableLoading(value: boolean | undefined): this; + /** + * Set the content modifier of loadingProgress. + * + * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. + * @returns { LoadingProgressAttribute} the attribute of the loading progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * LoadingProgressConfiguration used by LoadingProgress contentModifier + * + * @extends CommonConfiguration + * @interface LoadingProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface LoadingProgressConfiguration extends CommonConfiguration { + /** + * Whether to enable the LoadingProgress content. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableLoading: boolean; +} +/** + * @param { () => void } content_ + * @returns { LoadingProgressAttribute } + */ +export declare function LoadingProgress( + content_?: () => void +): LoadingProgressAttribute; diff --git a/api/arkui/component/progress.d.ets b/api/arkui/component/progress.d.ets deleted file mode 100644 index e901a518f577198dfd2afd3b0dbdd9cc6fd44909..0000000000000000000000000000000000000000 --- a/api/arkui/component/progress.d.ets +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) 2024-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 - */ - - -// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION! - -import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from './../stateManagement/runtime' -import { Length, PX, VP, LPX, ResourceColor, Font, VisualEffect, Filter, UniformDataType, Blender, SizeOptions, ConstraintSizeOptions, ChainWeightOptions, Padding, LocalizedPadding, Margin, LocalizedMargin, Position, BorderOptions, EdgeStyles, EdgeWidths, LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, BorderRadiuses, LocalizedBorderRadiuses, OutlineOptions, EdgeOutlineStyles, Dimension, EdgeOutlineWidths, OutlineRadiuses, Area, Edges, LocalizedEdges, LocalizedPosition, ResourceStr, AccessibilityOptions, PixelMap } from './units' -import { Resource } from './../../../api/global/resource' -import { CommonMethod, DrawModifier, Rectangle, Callback_Array_TouchTestInfo_TouchResult, TouchTestInfo, TouchResult, PixelRoundPolicy, BackgroundEffectOptions, ForegroundEffectOptions, BorderImageOption, OutlineStyle, Callback_ClickEvent_Void, ClickEvent, Callback_Boolean_HoverEvent_Void, HoverEvent, AccessibilityCallback, Callback_MouseEvent_Void, MouseEvent, Callback_TouchEvent_Void, TouchEvent, Callback_KeyEvent_Void, KeyEvent, Callback_KeyEvent_Boolean, AnimateParam, TransitionOptions, TransitionEffect, MotionBlurOptions, InvertOptions, TranslateOptions, ScaleOptions, RotateOptions, Callback_Area_Area_Void, Literal_Union_Number_Literal_Number_offset_span_lg_md_sm_xs, Literal_Number_offset_span, AlignRuleOption, LocalizedAlignRuleOptions, ClickEffect, Callback_DragEvent_String_Union_CustomBuilder_DragItemInfo, DragEvent, CustomBuilder, DragItemInfo, Callback_DragEvent_String_Void, Callback_PreDragStatus_Void, PreDragStatus, Type_CommonMethod_linearGradient_value, Tuple_ResourceColor_Number, Type_CommonMethod_sweepGradient_value, Tuple_Length_Length, Type_CommonMethod_radialGradient_value, MotionPathOptions, ShadowOptions, ShadowStyle, ProgressMask, StateStyles, PixelStretchEffectOptions, AttributeModifier, GestureModifier, BackgroundBrightnessOptions, Callback_GestureInfo_BaseGestureEvent_GestureJudgeResult, GestureRecognizerJudgeBeginCallback, ShouldBuiltInRecognizerParallelWithCallback, Callback_TouchEvent_HitTestMode, SizeChangeCallback, SafeAreaType, SafeAreaEdge, Literal_Alignment_align, BlurStyle, BackgroundBlurStyleOptions, ForegroundBlurStyleOptions, TransitionFinishCallback, BlurOptions, LinearGradientBlurOptions, EffectType, sharedTransitionOptions, ChainStyle, DragPreviewOptions, DragInteractionOptions, OverlayOptions, BlendMode, BlendApplyType, GeometryTransitionOptions, PopupOptions, CustomPopupOptions, MenuElement, MenuOptions, ContextMenuOptions, ModalTransition, ContentCoverOptions, SheetOptions, VisibleAreaChangeCallback, ContentModifier, CommonConfiguration } from './common' - -export interface ProgressOptions { - value: number; - total?: number; - style?: ProgressStyle; - type?: ProgressType; -} -export enum ProgressType { - LINEAR = 0, - Linear = 0, - RING = 1, - Ring = 1, - ECLIPSE = 2, - Eclipse = 2, - SCALE_RING = 3, - ScaleRing = 3, - CAPSULE = 4, - Capsule = 4 -} -export enum ProgressStatus { - LOADING = 0, - PROGRESSING = 1 -} -export interface ProgressStyleOptions extends CommonProgressStyleOptions { - strokeWidth?: Length; - scaleCount?: number; - scaleWidth?: Length; -} -export interface CommonProgressStyleOptions { - enableSmoothEffect?: boolean; -} -export interface ScanEffectOptions { - enableScanEffect?: boolean; -} -export interface EclipseStyleOptions extends CommonProgressStyleOptions { -} -export interface ScaleRingStyleOptions extends CommonProgressStyleOptions { - strokeWidth?: Length; - scaleWidth?: Length; - scaleCount?: number; -} -export interface RingStyleOptions extends ScanEffectOptions { - strokeWidth?: Length; - shadow?: boolean; - status?: ProgressStatus; -} -export interface LinearStyleOptions extends ScanEffectOptions { - strokeWidth?: Length; - strokeRadius?: PX | VP | LPX | Resource; -} -export interface CapsuleStyleOptions extends ScanEffectOptions { - borderColor?: ResourceColor; - borderWidth?: Length; - content?: string; - font?: Font; - fontColor?: ResourceColor; - showDefaultPercentage?: boolean; -} -export enum ProgressStyle { - LINEAR = 0, - Linear = 0, - RING = 1, - Ring = 1, - ECLIPSE = 2, - Eclipse = 2, - SCALE_RING = 3, - ScaleRing = 3, - CAPSULE = 4, - Capsule = 4 -} -export interface ProgressStyleMap { -} -export type ProgressInterface = (options: ProgressOptions) => ProgressAttribute; -export interface ProgressAttribute extends CommonMethod { - @memo - value(value: number): this; - @memo - color(value: ResourceColor): this; - @memo - style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions): this; - @memo - privacySensitive(value: boolean | undefined): this; - @memo - contentModifier(value: ContentModifier): this; -} -export interface ProgressConfiguration extends CommonConfiguration { - value: number; - total: number; -} -@memo -@ComponentBuilder -export declare function Progress( - options: ProgressOptions, - @memo - content_?: () => void, -): ProgressAttribute diff --git a/api/arkui/component/progress.static.d.ets b/api/arkui/component/progress.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd4cecad830d316f2621131b1205a54a2254e638 --- /dev/null +++ b/api/arkui/component/progress.static.d.ets @@ -0,0 +1,505 @@ +/* + * 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, PX, VP, LPX, Font, ResourceStr } from './units'; +import { Resource } from '../../global/resource'; +import { CommonMethod, Optional, ContentModifier, CommonConfiguration } from './common'; +import { LinearGradient } from './dataPanel'; +import { LengthMetrics } from '../Graphics'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Defines the option of Progress. + * + * @interface ProgressOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ProgressOptions { + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: number; + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + total?: number; + /** + * Sets the type of Progress. + * + * @type { ?ProgressType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type?: ProgressType; +} +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ProgressType { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Linear = 0, + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Ring = 1, + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Eclipse = 2, + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ScaleRing = 3, + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Capsule = 4 +} +/** + * Current status of progress bar. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ProgressStatus { + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LOADING, + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PROGRESSING +} +/** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ProgressStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth?: Length; + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scaleCount?: number; + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scaleWidth?: Length; +} +/** + * Progress common style options. + * + * @interface CommonProgressStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CommonProgressStyleOptions { + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableSmoothEffect?: boolean; +} +/** + * Defines the enable scan effect. + * + * @interface ScanEffectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ScanEffectOptions { + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableScanEffect?: boolean; +} +/** + * Defines the Eclipse style Options. + * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface EclipseStyleOptions extends CommonProgressStyleOptions { +} +/** + * Defines the ScaleRing style Options. + * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth?: Length; + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scaleWidth?: Length; + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scaleCount?: number; +} +/** + * Defines the ring style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth?: Length; + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + shadow?: boolean; + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + status?: ProgressStatus; +} +/** + * Defines the linear style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeWidth?: Length; + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + strokeRadius?: PX | VP | LPX | Resource; +} +/** + * Defines the capsule style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderColor?: ResourceColor; + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderWidth?: Length; + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content?: string; + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + font?: Font; + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ResourceColor; + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showDefaultPercentage?: boolean; + /** + * Set border rounded corner radius. + * + * @type { ?LengthMetrics } + * @default height / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderRadius?: LengthMetrics; +} +/** + * Type of progress bar + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum ProgressStyle { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Linear, + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Ring, + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Eclipse, + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ScaleRing, + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Capsule +} +/** + * Defines the map for progress type and style. + * + * @interface ProgressStyleMap + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +export declare interface ProgressStyleMap { +} +export declare interface ProgressAttribute extends CommonMethod { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value(value: number | undefined): this; + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color(value: ResourceColor | LinearGradient | undefined): this; + /** + * Called when the style of progress bar is set. + * + * @param { LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions | undefined): this; + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + privacySensitive(isPrivacySensitiveMode: boolean | undefined): this; + /** + * Set the contentModifier of progress. + * + * @param { ContentModifier } modifier - The contentModifier of progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +/** + * ProgressConfiguration used by progress contentModifier + * + * @extends CommonConfiguration + * @interface ProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ProgressConfiguration extends CommonConfiguration { + /** + * The value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: number; + /** + * The total of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + total: number; +} +export declare function Progress(options: ProgressOptions, +@memo +content_?: () => void): ProgressAttribute; diff --git a/api/arkui/component/qrcode.static.d.ets b/api/arkui/component/qrcode.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..a599442f4713347020e61204c4f8eb407112463c --- /dev/null +++ b/api/arkui/component/qrcode.static.d.ets @@ -0,0 +1,61 @@ +/* + * 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 { ResourceColor, ResourceStr } from './units'; +import { Resource } from '../../global/resource'; +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 QRCodeAttribute extends CommonMethod { + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color(value: ResourceColor | undefined): this; + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor(value: ResourceColor | undefined): this; + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentOpacity(value: number | Resource | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function QRCode(value: string, +@memo +content_?: () => void): QRCodeAttribute; diff --git a/api/arkui/component/textClock.static.d.ets b/api/arkui/component/textClock.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..747432ddf873b788801784758cb9bc7481e8c57d --- /dev/null +++ b/api/arkui/component/textClock.static.d.ets @@ -0,0 +1,257 @@ +/* + * 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 { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier, Optional, DateTimeOptions } from './common'; +import { ResourceColor, Length, ResourceStr } from './units'; +import { FontStyle, FontWeight } from './enums'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Provides a way to control the textclock status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextClockController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start(): void; + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stop(): void; +} +/** + * TextClockConfiguration used by text clock content modifier + * + * @extends CommonConfiguration + * @interface TextClockConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextClockConfiguration extends CommonConfiguration { + /** + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + timeZoneOffset: number; + /** + * TextClock is started or not. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + started: boolean; + /** + * The time of the TextClock. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + timeValue: number; +} +/** + * Options to construct TextClock component. + * + * @interface TextClockOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextClockOptions { + /** + * Time zone offset. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + timeZoneOffset?: number; + /** + * TextClock controller. + * Anonymous Object Rectification. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: TextClockController; +} +export declare interface TextClockAttribute extends CommonMethod { + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + format(value: ResourceStr | undefined): this; + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + format(value: string | undefined): this; + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event default is seconds when TextClock is not in a form. + * The minimum callback interval for this event is minutes when TextClock is in a form. + * If visibility is Hidden the callback be disabled when TextClock is in a form. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDateChange(event: ((value: number) => void) | undefined): this; + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor(value: ResourceColor | undefined): this; + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize(value: Length | undefined): this; + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontStyle(value: FontStyle | undefined): this; + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFamily(value: ResourceStr | undefined): this; + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textShadow(value: ShadowOptions | Array | undefined): this; + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFeature(value: string | undefined): this; + /** + * Set the content modifier of textclock. + * + * @param { ContentModifier } modifier - The content modifier of textclock. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + /** + * Set hour format + * + * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. + * @returns { TextClockAttribute } the attribute of the text clock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dateTimeOptions(dateTimeOptions: DateTimeOptions | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function TextClock(options?: TextClockOptions, +@memo +content_?: () => void): TextClockAttribute; diff --git a/api/arkui/component/textTimer.static.d.ets b/api/arkui/component/textTimer.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..f401fd2d3635bc68106c462235829b834f0fefac --- /dev/null +++ b/api/arkui/component/textTimer.static.d.ets @@ -0,0 +1,274 @@ +/* + * 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 { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier } from './common'; +import { ResourceColor, Length, ResourceStr } from './units'; +import { FontStyle, FontWeight } from './enums'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +import { memo, ComponentBuilder } from './../stateManagement/runtime'; +import { AttributeModifier, CommonMethod } from './common'; +/** + * Provides a way to control the process. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextTimerController { + /** + * constructor. + * A constructor used to create a TextTimerController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start(): void; + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pause(): void; + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + reset(): void; +} +/** + * TextTimerConfiguration used by content modifier. + * + * @extends CommonConfiguration + * @interface TextTimerConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface TextTimerConfiguration extends CommonConfiguration { + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + count: number; + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isCountDown: boolean; + /** + * Whether the timer has already started. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + started: boolean; + /** + * Elapsed time of the timer, in the minimum unit of the format. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + elapsedTime: number; +} +/** + * Parameters of the TextTimer component. + * + * @interface TextTimerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface TextTimerOptions { + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { ?boolean } - Default value: false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isCountDown?: boolean; + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { ?number } - Default value: 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + count?: number; + /** + * TextTimer controller. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller?: TextTimerController; +} +export declare interface TextTimerAttribute extends CommonMethod { + /** + * Sets the custom format. + * The value must contain at least one of the following keywords: HH, mm, ss, and SS. + * + *

NOTE: + *
If the specified date format is yy, MM, or dd, the default value is used instead. + *

+ * + * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + format(value: string | undefined): this; + /** + * Sets the font color. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor(value: ResourceColor | undefined): this; + /** + * Sets the font size. + * + * @param { Length } value - Font size.The default font size is 16 fp. + *
If fontSize is of the number type, the unit fp is used. + *
The value cannot be a percentage. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize(value: Length | undefined): this; + /** + * Sets the font style. + * + * @param { FontStyle } value - Font style.Default value: FontStyle.Normal + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontStyle(value: FontStyle | undefined): this; + /** + * Sets the font weight. + * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *

+ * + * @param { number | FontWeight | ResourceStr } value - Font weight. + *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight(value: number | FontWeight | ResourceStr | undefined): this; + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight(value: number | FontWeight | string | undefined): this; + /** + * Sets the font family. + * + * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFamily(value: ResourceStr | undefined): this; + /** + * Triggered when the time text changes. + * This event is not triggered when the screen is locked or the application is running in the background. + * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onTimer(event: ((utc: number, elapsedTime: number) => void) | undefined): this; + /** + * Sets the text shadow. + * It supports input parameters in an array to implement multiple text shadows. + * This API does not work with the fill attribute or coloring strategy. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textShadow(value: ShadowOptions | Array | undefined): this; + /** + * Creates a content modifier. + * + * @param { ContentModifier } modifier - The content modifier of texttimer. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentModifier(modifier: ContentModifier | undefined): this; + attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; +} +export declare function TextTimer(options?: TextTimerOptions, +@memo +content_?: () => void): TextTimerAttribute;