ArkUI_NodeAttributeType

Struct ArkUI_NodeAttributeType 

Source
#[repr(transparent)]
pub struct ArkUI_NodeAttributeType(pub c_uint);
Available on crate feature api-12 only.
Expand description

Defines the ArkUI style attributes that can be set on the native side.

Available since API-level: 12

Tuple Fields§

§0: c_uint

Implementations§

Source§

impl ArkUI_NodeAttributeType

Source

pub const NODE_WIDTH: ArkUI_NodeAttributeType

Defines the width attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width, in vp.

Source

pub const NODE_HEIGHT: ArkUI_NodeAttributeType

Defines the height attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: height, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: height, in vp.

Source

pub const NODE_BACKGROUND_COLOR: ArkUI_NodeAttributeType

Defines the background color attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color. The value is in 0xARGB format. For example, 0xFFFF0000 indicates red.

Source

pub const NODE_BACKGROUND_IMAGE: ArkUI_NodeAttributeType

Defines the background image attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: image address;

.value[0]?.i32: whether to repeat the image. Optional. The parameter type is ArkUI_ImageRepeat. .object: The parameter type is [ArkUI_DrawableDescriptor]. Either .string or .object must be set.

The default value is ARKUI_IMAGE_REPEAT_NONE.

Format of the return value ArkUI_AttributeItem:

.string: image address;

.value[0].i32: whether to repeat the image. The parameter type is ArkUI_ImageRepeat.

.object: The parameter type is [ArkUI_DrawableDescriptor].

Source

pub const NODE_PADDING: ArkUI_NodeAttributeType

Defines the padding attribute, which can be set, reset, and obtained as required through APIs.

There are two formats of ArkUI_AttributeItem for setting the attribute value:

1: Specify the same padding for the four directions.

.value[0].f32: padding, in vp.

2: Specify different paddings for different directions.

.value[0].f32: top padding, in vp.

.value[1].f32: right padding, in vp.

.value[2].f32: bottom padding, in vp.

.value[3].f32: left padding, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: top padding, in vp.

.value[1].f32: right padding, in vp.

.value[2].f32: bottom padding, in vp.

.value[3].f32: left padding, in vp.

Source

pub const NODE_ID: ArkUI_NodeAttributeType

Defines the component ID attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: component ID.

Format of the return value ArkUI_AttributeItem:

.string: component ID.

Source

pub const NODE_ENABLED: ArkUI_NodeAttributeType

Defines the interactivity attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The value true means that the component can interact with users, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means that the component can interact with users, and 0 means the opposite.

Source

pub const NODE_MARGIN: ArkUI_NodeAttributeType

Defines the margin attribute, which can be set, reset, and obtained as required through APIs.

There are two formats of ArkUI_AttributeItem for setting the attribute value:

1: Specify the same margin for the four directions.

.value[0].f32: margin, in vp.

2: Specify different margins for different directions.

.value[0].f32: top margin, in vp.

.value[1].f32: right margin, in vp.

.value[2].f32: bottom margin, in vp.

.value[3].f32: left margin, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: top margin, in vp.

.value[1].f32: right margin, in vp.

.value[2].f32: bottom margin, in vp.

.value[3].f32: left margin, in vp.

Source

pub const NODE_TRANSLATE: ArkUI_NodeAttributeType

Defines the translate attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: distance to translate along the x-axis, in vp. The default value is 0.

.value[1].f32: distance to translate along the y-axis, in vp. The default value is 0.

.value[2].f32: distance to translate along the z-axis, in vp. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: distance to translate along the x-axis, in vp.

.value[1].f32: distance to translate along the y-axis, in vp.

.value[2].f32: distance to translate along the z-axis, in vp.

Source

pub const NODE_SCALE: ArkUI_NodeAttributeType

Defines the scale attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: scale factor along the x-axis. The default value is 1.

.value[1].f32: scale factor along the y-axis. The default value is 1.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: scale factor along the x-axis.

.value[1].f32: scale factor along the y-axis.

Source

pub const NODE_ROTATE: ArkUI_NodeAttributeType

Defines the rotate attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: X coordinate of the rotation axis vector. The default value is 0.

.value[1].f32: Y coordinate of the rotation axis vector. The default value is 0.

.value[2].f32: Z coordinate of the rotation axis vector. The default value is 0.

.value[3].f32: rotation angle. The default value is 0.

.value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate of the rotation axis vector.

.value[1].f32: Y coordinate of the rotation axis vector.

.value[2].f32: Z coordinate of the rotation axis vector.

.value[3].f32: rotation angle.

.value[4].f32: line of sight, that is, the distance from the viewpoint to the z=0 plane, in vp.

Source

pub const NODE_BRIGHTNESS: ArkUI_NodeAttributeType

Sets the brightness attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: brightness value. The default value is 1.0, and the recommended value range is [0, 2].

Format of the return value ArkUI_AttributeItem:

.value[0].f32: brightness value.

Source

pub const NODE_SATURATION: ArkUI_NodeAttributeType

Sets the saturation attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: saturation value. The default value is 1.0, and the recommended value range is [0, 50).

Format of the return value ArkUI_AttributeItem:

.value[0].f32: saturation value.

Source

pub const NODE_BLUR: ArkUI_NodeAttributeType

Sets the blur attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: blur radius. A larger value indicates a higher blur degree. If the value is 0, the component is not blurred. The unit is vp. The default value is 0.0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: blur radius. The larger the fuzzy radius, the more blurred the image. If the value is 0, the image is not blurred. The unit is vp.

Source

pub const NODE_LINEAR_GRADIENT: ArkUI_NodeAttributeType

Sets the gradient attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: start angle of the linear gradient. This attribute takes effect only when ArkUI_LinearGradientDirection is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM. A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is 180.

.value[1].i32: direction of the linear gradient. When it is set, the angle attribute does not take effect. The parameter type is ArkUI_LinearGradientDirection:

.value[2].i32: whether the colors are repeated. The default value is false.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: start angle of the linear gradient.

.value[1].i32: direction of the linear gradient. It does not take effect when angle is set.

.value[2].i32: whether the colors are repeated.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Source

pub const NODE_ALIGNMENT: ArkUI_NodeAttributeType

Sets the alignment attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode. The data type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_CENTER.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode. The data type is ArkUI_Alignment.

Source

pub const NODE_OPACITY: ArkUI_NodeAttributeType

Defines the opacity attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: opacity value. The value ranges from 0 to 1.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: opacity value. The value ranges from 0 to 1.

Source

pub const NODE_BORDER_WIDTH: ArkUI_NodeAttributeType

Defines the border width attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].f32: width of the four borders.

2: .value[0].f32: width of the top border.

.value[1].f32: width of the right border.

.value[2].f32: width of the bottom border.

.value[3].f32: width of the left border.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the top border.

.value[1].f32: width of the right border.

.value[2].f32: width of the bottom border.

.value[3].f32: width of the left border.

Source

pub const NODE_BORDER_RADIUS: ArkUI_NodeAttributeType

Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].f32: radius of the four corners.

2: .value[0].f32: radius of the upper left corner.

.value[1].f32: radius of the upper right corner.

.value[2].f32: radius of the lower left corner.

.value[3].f32: radius of the lower right corner.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: radius of the upper left corner.

.value[1].f32: radius of the upper right corner.

.value[2].f32: radius of the lower left corner.

.value[3].f32: radius of the lower right corner.

Source

pub const NODE_BORDER_COLOR: ArkUI_NodeAttributeType

Defines the border color attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].u32: color of the four borders, in 0xARGB format, for example, 0xFFFF11FF.

2: .value[0].u32: color of the top border, in 0xARGB format, for example, 0xFFFF11FF.

.value[1].u32: color of the right border, in 0xARGB format, for example, 0xFFFF11FF.

.value[2].u32: color of the lower border, in 0xARGB format, for example, 0xFFFF11FF.

.value[3].u32: color of the left border, in 0xARGB format, for example, 0xFFFF11FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the top border, in 0xARGB format, for example, 0xFFFF11FF.

.value[1].u32: color of the right border, in 0xARGB format, for example, 0xFFFF11FF.

.value[2].u32: color of the lower border, in 0xARGB format, for example, 0xFFFF11FF.

.value[3].u32: color of the left border, in 0xARGB format, for example, 0xFFFF11FF.

Source

pub const NODE_BORDER_STYLE: ArkUI_NodeAttributeType

Defines the border line style attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].i32: line style of the four borders. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.

2: .value[0].i32: line style of the top border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.

.value[1].i32: line style of the right border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.

.value[2].i32: line style of the bottom border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.

.value[3].i32: line style of the left border. The parameter type is ArkUI_BorderStyle. The default value is ARKUI_BORDER_STYLE_SOLID.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: line style of the top border.

.value[1].i32: line style of the right border.

.value[2].i32: line style of the bottom border.

.value[3].i32: line style of the left border.

Source

pub const NODE_Z_INDEX: ArkUI_NodeAttributeType

Defines the z-index attribute for the stack sequence. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: z-index value.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: z-index value.

Source

pub const NODE_VISIBILITY: ArkUI_NodeAttributeType

Defines the visibility attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to show or hide the component. The parameter type is ArkUI_Visibility. The default value is ARKUI_VISIBILITY_VISIBLE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to show or hide the component. The parameter type is ArkUI_Visibility. The default value is ARKUI_VISIBILITY_VISIBLE.

Source

pub const NODE_CLIP: ArkUI_NodeAttributeType

Defines the clipping and masking attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to clip the component based on the parent container bounds. The value 1 means to clip the component, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to clip the component based on the parent container bounds. The value 1 means to clip the component, and 0 means the opposite.

Source

pub const NODE_CLIP_SHAPE: ArkUI_NodeAttributeType

Defines the clipping region on the component. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute, which supports five types of shapes:

  1. Rectangle:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_RECTANGLE for the rectangle shape.

.value[1].f32: width of the rectangle.

.value[2].f32: height of rectangle.

.value[3].f32: width of the rounded corner of the rectangle.

.value[4].f32: height of the rounded corner of the rectangle.

.value[5]?.f32: radius of the top left corner of the rectangular shape.

.value[6]?.f32: radius of the bottom left corner of the rectangular shape.

.value[7]?.f32: radius of the top right corner of the rectangular shape.

.value[8]?.f32: radius of the bottom right corner of the rectangular shape.

  1. Circle:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_CIRCLE for the circle shape.

.value[1].f32: width of the circle.

.value[2].f32: height of the circle.

3.Ellipse:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_ELLIPSE for the ellipse shape.

.value[1].f32: width of the ellipse.

.value[2].f32: height of the ellipse.

  1. Path:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_PATH for the path shape.

.value[1].f32: width of the path.

.value[2].f32: height of the path.

.string: command for drawing the path.

Format of the return value ArkUI_AttributeItem, which supports five types of shapes:

  1. Rectangle:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_RECTANGLE for the rectangle shape.

.value[1].f32: width of the rectangle.

.value[2].f32: height of rectangle.

.value[3].f32: width of the rounded corner of the rectangle.

.value[4].f32: height of the rounded corner of the rectangle.

.value[5].f32: radius of the top left corner of the rectangular shape;

.value[6].f32: radius of the bottom left corner of the rectangular shape;

.value[7].f32: radius of the top right corner of the rectangular shape;

.value[8].f32: radius of the bottom right corner of the rectangular shape;

  1. Circle:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_CIRCLE for the circle shape.

.value[1].f32: width of the circle.

.value[2].f32: height of the circle.

3.Ellipse:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_ELLIPSE for the ellipse shape.

.value[1].f32: width of the ellipse.

.value[2].f32: height of the ellipse.

  1. Path:

.value[0].i32: type of shape. The parameter type is ArkUI_ClipType. The value is ARKUI_CLIP_TYPE_PATH for the path shape.

.value[1].f32: width of the path.

.value[2].f32: height of the path.

.string: command for drawing the path.

Source

pub const NODE_TRANSFORM: ArkUI_NodeAttributeType

Defines the transform attribute, which can be used to translate, rotate, and scale images. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0…15].f32: 16 floating-point numbers.

Format of the return value ArkUI_AttributeItem:

.value[0…15].f32: 16 floating-point numbers.

Source

pub const NODE_HIT_TEST_BEHAVIOR: ArkUI_NodeAttributeType

Defines the hit test behavior attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: hit test mode. The parameter type is ArkUI_HitTestMode. The default value is ARKUI_HIT_TEST_MODE_DEFAULT.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: hit test mode. The parameter type is ArkUI_HitTestMode. The default value is ARKUI_HIT_TEST_MODE_DEFAULT.

Source

pub const NODE_POSITION: ArkUI_NodeAttributeType

Defines the offset attribute, which specifies the offset of the component’s upper left corner relative to the parent container’s. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: X coordinate.

.value[1].f32: Y coordinate.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate.

.value[1].f32: Y coordinate.

Source

pub const NODE_SHADOW: ArkUI_NodeAttributeType

Defines the shadow attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: shadow effect. The parameter type is ArkUI_ShadowStyle.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: shadow effect. The parameter type is ArkUI_ShadowStyle.

Source

pub const NODE_CUSTOM_SHADOW: ArkUI_NodeAttributeType

Defines the custom shadow effect. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: blur radius of the shadow, in vp.

.value[1]?.i32: whether to enable the coloring strategy. The value 1 means to enable the coloring strategy, and 0 (default value) means the opposite.

.value[2]?.f32: offset of the shadow along the x-axis, in px.

.value[3]?.f32: offset of the shadow along the y-axis, in px.

.value[4]?.i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.

.value[5]?.u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

.value[6]?.u32: whether to fill the shadow. The value 1 means to fill the shadow, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: blur radius of the shadow, in vp.

.value[1].i32: whether to enable the coloring strategy.

.value[2].f32: offset of the shadow along the x-axis, in px.

.value[3].f32: offset of the shadow along the y-axis, in px.

.value[4].i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.

.value[5].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

.value[6].u32: whether to fill the shadow. The value 1 means to fill the shadow, and 0 means the opposite.

Source

pub const NODE_BACKGROUND_IMAGE_SIZE: ArkUI_NodeAttributeType

Defines the background image width and height. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width of the image. The value range is [0, +∞), and the unit is vp.

.value[1].f32: height of the image. The value range is [0, +∞), and the unit is vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the image, in vp.

.value[1].f32: height of the image, in vp.

Source

pub const NODE_BACKGROUND_IMAGE_SIZE_WITH_STYLE: ArkUI_NodeAttributeType

Defines the background image size. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: size of the background image. The value is an enum of ArkUI_ImageSize.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: size of the background image. The value is an enum of ArkUI_ImageSize.

Source

pub const NODE_BACKGROUND_BLUR_STYLE: ArkUI_NodeAttributeType

Defines the background blur attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: blue type. The value is an enum of ArkUI_BlurStyle.

.value[1]?.i32: color mode. The value is an enum of ArkUI_ColorMode.

.value[2]?.i32: adaptive color mode. The value is an enum of ArkUI_AdaptiveColor.

.value[3]?.f32: blur degree. The value range is [0.0, 1.0].

.value[4]?.f32: start boundary of grayscale blur.

.value[5]?.f32: end boundary of grayscale blur.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: blue type. The value is an enum of ArkUI_BlurStyle.

.value[1].i32: color mode. The value is an enum of ArkUI_ColorMode.

.value[2].i32: adaptive color mode. The value is an enum of ArkUI_AdaptiveColor.

.value[3].f32: blur degree. The value range is [0.0, 1.0].

.value[4].f32: start boundary of grayscale blur.

.value[5].f32: end boundary of grayscale blur.

Source

pub const NODE_TRANSFORM_CENTER: ArkUI_NodeAttributeType

Defines the transform center attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: X coordinate of the center point, in vp.

.value[1]?.f32: Y coordinate of the center point, in vp.

.value[2]?.f32: Z coordinate of the center point, in vp.

.value[3]?.f32 : X coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[0].f32. The default value is 0.5f.

.value[4]?.f32 : Y coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[1].f32. The default value is 0.5f.

.value[5]?.f32 : Z coordinate of the center point, expressed in a number that represents a percentage. For example, 0.2 indicates 20%. This attribute overwrites value[2].f32. The default value is 0.0f.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate of the center point, in vp.

.value[1].f32: Y coordinate of the center point, in vp.

.value[2].f32: Z coordinate of the center point, in vp.

Note: If the coordinate is expressed in a number that represents a percentage, the attribute obtaining API returns the calculated value in vp.

Source

pub const NODE_OPACITY_TRANSITION: ArkUI_NodeAttributeType

Defines the transition opacity attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: opacity values of the start and end points.

.value[1].i32: animation duration, in milliseconds.

.value[2].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[3]?.i32: animation delay duration, in milliseconds.

.value[4]?.i32: number of times that the animation is played.

.value[5]?.i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[6]?.f32: animation playback speed.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: opacity values of the start and end points.

.value[1].i32: animation duration, in milliseconds.

.value[2].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[3].i32: animation delay duration, in milliseconds.

.value[4].i32: number of times that the animation is played.

.value[5].i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[6].f32: animation playback speed.

Source

pub const NODE_ROTATE_TRANSITION: ArkUI_NodeAttributeType

Defines the transition rotation attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: X-component of the rotation vector.

.value[1].f32: Y-component of the rotation vector.

.value[2].f32: Z-component of the rotation vector

.value[3].f32: angle.

.value[4].f32: line of sight. The default value is 0.0f.

.value[5].i32: animation duration, in milliseconds.

.value[6].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[7]?.i32: animation delay duration, in milliseconds.

.value[8]?.i32: number of times that the animation is played.

.value[9]?.i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[10]?.f32: animation playback speed.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X-component of the rotation vector.

.value[1].f32: Y-component of the rotation vector.

.value[2].f32: Z-component of the rotation vector

.value[3].f32: angle.

.value[4].f32: line of sight.

.value[5].i32: animation duration, in milliseconds.

.value[6].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[7].i32: animation delay duration, in milliseconds.

.value[8].i32: number of times that the animation is played.

.value[9].i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[10].f32: animation playback speed.

Source

pub const NODE_SCALE_TRANSITION: ArkUI_NodeAttributeType

Defines the transition scaling attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: scale factor along the x-axis.

.value[1].f32: scale factor along the y-axis.

.value[2].f32: scale factor along the z-axis.

.value[3].i32: animation duration, in milliseconds.

.value[4].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[5]?.i32: animation delay duration, in milliseconds.

.value[6]?.i32: number of times that the animation is played.

.value[7]?.i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[8]?.f32: animation playback speed.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: scale factor along the x-axis.

.value[1].f32: scale factor along the y-axis.

.value[2].f32: scale factor along the z-axis.

.value[3].i32: animation duration, in milliseconds.

.value[4].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[5].i32: animation delay duration, in milliseconds.

.value[6].i32: number of times that the animation is played.

.value[7].i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[8].f32: animation playback speed.

Source

pub const NODE_TRANSLATE_TRANSITION: ArkUI_NodeAttributeType

Defines the transition translation attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].f32: translation distance along the x-axis, in vp.

value[1].f32: translation distance along the y-axis, in vp.

value[2].f32: translation distance along the z-axis, in vp.

value[3].i32: animation duration, in milliseconds.

value[4].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

value[5]?.i32: animation delay duration, in milliseconds.

value[6]?.i32: number of times that the animation is played.

value[7]?.i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

value[8]?.f32: animation playback speed.

Format of the return value ArkUI_AttributeItem:

value[0].f32: translation distance along the x-axis, in vp.

value[1].f32: translation distance along the y-axis, in vp.

value[2].f32: translation distance along the z-axis, in vp.

value[3].i32: animation duration, in milliseconds.

value[4].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

value[5].i32: animation delay duration, in milliseconds.

value[6].i32: number of times that the animation is played.

value[7].i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

value[8].f32: animation playback speed.

Source

pub const NODE_MOVE_TRANSITION: ArkUI_NodeAttributeType

Defines the slide-in and slide-out of the component from the screen edge during transition. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is ArkUI_TransitionEdge.

.value[1].i32: animation duration, in milliseconds.

.value[2].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[3]?.i32: animation delay duration, in milliseconds.

.value[4]?.i32: number of times that the animation is played.

.value[5]?.i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[6]?.f32: animation playback speed.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is ArkUI_TransitionEdge.

.value[1].i32: animation duration, in milliseconds.

.value[2].i32: animation curve type. The value is an enum of ArkUI_AnimationCurve.

.value[3].i32: animation delay duration, in milliseconds.

.value[4].i32: number of times that the animation is played.

.value[5].i32: animation playback mode. The value is an enum of ArkUI_AnimationPlayMode.

.value[6].f32: animation playback speed.

Source

pub const NODE_FOCUSABLE: ArkUI_NodeAttributeType

Defines the focus attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_DEFAULT_FOCUS: ArkUI_NodeAttributeType

Defines the default focus attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_RESPONSE_REGION: ArkUI_NodeAttributeType

Defines the touch target attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.

.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.

.data[2].f32: width of the touch target, in %.

.data[3].f32: height of the touch target, in %.

.data[4…].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.

Format of the return value ArkUI_AttributeItem:

.data[0].f32: X coordinate of the touch point relative to the upper left corner of the component, in vp.

.data[1].f32: Y coordinate of the touch point relative to the upper left corner of the component, in vp.

.data[2].f32: width of the touch target, in %.

.data[3].f32: height of the touch target, in %.

.data[4…].f32: Multiple touch targets can be set. The sequence of the parameters is the same as the preceding.

Source

pub const NODE_OVERLAY: ArkUI_NodeAttributeType

Defines the overlay attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: mask text.

.value[0]?.i32: position of the overlay relative to the component. Optional. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional.

.value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional.

Format of the return value ArkUI_AttributeItem:

.string: mask text.

.value[0].i32: position of the overlay relative to the component. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.

.value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp.

Available since API-level: 12 Defines the overlay attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: mask text.

.value[0]?.i32: position of the overlay relative to the component. Optional. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[1]?.f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp. Optional.

.value[2]?.f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. Optional.

.value[3]?.i32: the layout direction. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_LTR.

In most cases, this parameter should be set to Auto, this allowing the system to handle the layout direction automatically. If you need to keep a specific direction in any situation, set it to either LTR (Left-to-Right) or RTL (Right-to-Left). Optional.

.object: the node tree used as the overlay. The parameter type is ArkUI_NodeHandle. The default value is nullptr.

this parameter is conflict with .string, and it has lower priority than .string. Optional.

Format of the return value ArkUI_AttributeItem:

.string: mask text.

.value[0].i32: position of the overlay relative to the component. The parameter type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[1].f32: offset of the overlay relative to the upper left corner of itself on the x-axis, in vp.

.value[2].f32: offset of the overlay relative to the upper left corner of itself on the y-axis, in vp. .value[3].i32: the layout direction. The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_LTR.

.object: the overlay node handle.

Available since API-level: 21

Source

pub const NODE_SWEEP_GRADIENT: ArkUI_NodeAttributeType

Defines the sweep gradient effect. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: X coordinate of the sweep gradient center relative to the upper left corner of the component.

.value[1]?.f32: Y coordinate of the sweep gradient center relative to the upper left corner of the component.

.value[2]?.f32: start point of the sweep gradient. The default value is 0.

.value[3]?.f32: end point of the sweep gradient. The default value is 0.

.value[4]?.f32: rotation angle of the sweep gradient. The default value is 0.

.value[5]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate of the sweep gradient center relative to the upper left corner of the component.

.value[1].f32: Y coordinate of the sweep gradient center relative to the upper left corner of the component.

.value[2].f32: start point of the sweep gradient. The default value is 0.

.value[3].f32: end point of the sweep gradient. The default value is 0.

.value[4].f32: rotation angle of the sweep gradient. The default value is 0.

.value[5].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Source

pub const NODE_RADIAL_GRADIENT: ArkUI_NodeAttributeType

Defines the radial gradient effect. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: X coordinate of the radial gradient center relative to the upper left corner of the component.

.value[1]?.f32: Y coordinate of the radial gradient center relative to the upper left corner of the component.

.value[2]?.f32: radius of the radial gradient. The default value is 0.

.value[3]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate of the radial gradient center relative to the upper left corner of the component.

.value[1].f32: Y coordinate of the radial gradient center relative to the upper left corner of the component.

.value[2].f32: radius of the radial gradient. The default value is 0.

.value[3].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Source

pub const NODE_MASK: ArkUI_NodeAttributeType

Adds a mask of the specified shape to the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute, which supports five types of shapes:

  1. Rectangle:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_RECTANGLE for the rectangle shape.

.value[4].f32: width of the rectangle.

.value[5].f32: height of the rectangle.

.value[6].f32: width of the rounded corner of the rectangle.

.value[7].f32: height of the rounded corner of the rectangle.

.value[8]?.f32: radius of the top left corner of the rectangular shape.

.value[9]?.f32: radius of the bottom left corner of the rectangular shape.

.value[10]?.f32: radius of the top right corner of the rectangular shape.

.value[11]?.f32: radius of the bottom right corner of the rectangular shape.

  1. Circle:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_CIRCLE for the circle shape.

.value[4].f32: width of the circle.

.value[5].f32: height of the circle.

  1. Ellipse:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_ELLIPSE for the ellipse shape.

.value[4].f32: width of the ellipse.

.value[5].f32: height of the ellipse.

  1. Path:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_PATH for the path shape.

.value[4].f32: width of the path.

.value[5].f32: height of the path.

.string: command for drawing the path.

  1. Progress:

.value[0].i32: mask type. The parameter type is ArkUI_MaskType. The value is ARKUI_MASK_TYPE_PROGRESS for the progress shape.

.value[1].f32: current value of the progress indicator.

.value[2].f32: maximum value of the progress indicator.

.value[3].u32: color of the progress indicator, in 0xARGB format.

Format of the return value ArkUI_AttributeItem, which supports five types of shapes:

  1. Rectangle:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type.

.value[4].f32: width of the rectangle.

.value[5].f32: height of the rectangle.

.value[6].f32: width of the rounded corner of the rectangle.

.value[7].f32: height of the rounded corner of the rectangle.

.value[8].f32: radius of the top left corner of the rectangular shape.

.value[9].f32: radius of the bottom left corner of the rectangular shape.

.value[10].f32: radius of the top right corner of the rectangular shape.

.value[11].f32: radius of the bottom right corner of the rectangular shape.

  1. Circle:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type.

.value[4].f32: width of the circle.

.value[5].f32: height of the circle.

  1. Ellipse:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type.

.value[4].f32: width of the ellipse.

.value[5].f32: height of the ellipse.

  1. Path:

.value[0].u32 fill color, in 0xARGB format.

.value[1].u32: stroke color, in 0xARGB format.

.value[2].f32: stroke width, in vp.

.value[3].i32: mask type.

.value[4].f32: width of the path.

.value[5].f32: height of the path.

.string: command for drawing the path.

  1. Progress:

.value[0].i32: mask type.

.value[1].f32: current value of the progress indicator.

.value[2].f32: maximum value of the progress indicator.

.value[3].u32: color of the progress indicator.

Source

pub const NODE_BLEND_MODE: ArkUI_NodeAttributeType

Blends the component’s background with the content of the component’s child node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: blend mode. The parameter type is ArkUI_BlendMode. The default value is ARKUI_BLEND_MODE_NONE.

.value[1].?i32: how the specified blend mode is applied. The parameter type is ArkUI_BlendApplyType. The default value is BLEND_APPLY_TYPE_FAST.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: blend mode. The parameter type is ArkUI_BlendMode. The default value is ARKUI_BLEND_MODE_NONE.

.value[1].i32: how the specified blend mode is applied. The parameter type is ArkUI_BlendApplyType. The default value is BLEND_APPLY_TYPE_FAST.

Source

pub const NODE_DIRECTION: ArkUI_NodeAttributeType

Sets the direction of the main axis. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: direction of the main axis.

The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: direction of the main axis.

The parameter type is ArkUI_Direction. The default value is ARKUI_DIRECTION_AUTO.

Source

pub const NODE_CONSTRAINT_SIZE: ArkUI_NodeAttributeType

Defines the size constraints. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum width, in vp.

.value[1].f32: maximum width, in vp.

.value[2].f32: minimum height, in vp.

.value[3].f32: maximum height, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum width, in vp.

.value[1].f32: maximum width, in vp.

.value[2].f32: minimum height, in vp.

.value[3].f32: maximum height, in vp.

Source

pub const NODE_GRAY_SCALE: ArkUI_NodeAttributeType

Defines the grayscale effect. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1. For example, 0.5 indicates a 50% grayscale conversion ratio.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: grayscale conversion ratio. The value ranges from 0 to 1.

Source

pub const NODE_INVERT: ArkUI_NodeAttributeType

Inverts the image. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: image inversion ratio. The value ranges from 0 to 1. For example, 0.5 indicates a 50% image inversion ratio.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: image inversion ratio. The value ranges from 0 to 1.

Source

pub const NODE_SEPIA: ArkUI_NodeAttributeType

Defines the sepia conversion ratio. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: sepia conversion ratio. The value ranges from 0 to 1. For example, 0.5 indicates that a 50% sepia conversion ratio.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: sepia conversion ratio. The value ranges from 0 to 1.

Source

pub const NODE_CONTRAST: ArkUI_NodeAttributeType

Defines the contrast attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: contrast. If the value is 1, the source image is displayed. A larger value indicates a higher contrast. Value range: [0, 10).

Format of the return value ArkUI_AttributeItem:

.value[0].f32: contrast. Value range: [0, 10).

Source

pub const NODE_FOREGROUND_COLOR: ArkUI_NodeAttributeType

Defines the foreground color attribute, which can be set, reset, and obtained as required through APIs.

There are two formats of ArkUI_AttributeItem for setting the attribute value:

1: .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

2: .value[0].i32: color enum [ArkUI_ColoringStrategy].

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_OFFSET: ArkUI_NodeAttributeType

Defines the offset of the component’s child relative to the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32 : offset along the x-axis, in vp.

.value[1].f32 : offset along the y-axis, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32 : offset along the x-axis, in vp.

.value[1].f32 : offset along the y-axis, in vp.

Source

pub const NODE_MARK_ANCHOR: ArkUI_NodeAttributeType

Sets the anchor for locating the component’s child. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: X coordinate of the anchor, in vp.

.value[1].f32: Y coordinate of the anchor, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X coordinate of the anchor, in vp.

.value[1].f32: Y coordinate of the anchor, in vp.

Source

pub const NODE_BACKGROUND_IMAGE_POSITION: ArkUI_NodeAttributeType

Defines the position of the background image in the component, that is, the coordinates relative to the upper left corner of the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: position along the x-axis, in px.

.value[1].f32: position along the y-axis, in px.

.value[2].?i32: the alignment mode. The data type is ArkUI_Alignment, and supported since API 21. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[3].?i32: the direction. The type is ArkUI_Direction, and supported since API 21. The default value is ARKUI_DIRECTION_AUTO.

In most cases, this parameter should be set to Auto, this allowing the system to handle the layout direction automatically. If you need to keep a specific direction in any situation, set it to either LTR (Left-to-Right) or RTL (Right-to-Left). Optional. Format of the return value ArkUI_AttributeItem:

.value[0].f32: position along the x-axis, in px.

.value[1].f32: position along the y-axis, in px.

.value[2].i32: the alignment mode. The data type is ArkUI_Alignment, and supported since API 21. The default value is ARKUI_ALIGNMENT_TOP_START.

.value[3].i32: the direction. The type is ArkUI_Direction, and supported since API 21. The default value is ARKUI_DIRECTION_AUTO.

Source

pub const NODE_ALIGN_RULES: ArkUI_NodeAttributeType

Sets the alignment rules in the relative container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: Use the ArkUI_AlignmentRuleOption object as the component’s alignment rule.

Format of the return value ArkUI_AttributeItem:

.object: Use the ArkUI_AlignmentRuleOption object as the component’s alignment rule.

Source

pub const NODE_ALIGN_SELF: ArkUI_NodeAttributeType

Sets the alignment mode of the child components along the cross axis of the parent container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode of the child components along the cross axis of the parent container.

The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_AUTO.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode of the child components along the cross axis of the parent container.

The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_AUTO.

Source

pub const NODE_FLEX_GROW: ArkUI_NodeAttributeType

Sets the percentage of the parent container’s remaining space that is allocated to the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: percentage of the parent container’s remaining space that is allocated to the component.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: percentage of the parent container’s remaining space that is allocated to the component.

Source

pub const NODE_FLEX_SHRINK: ArkUI_NodeAttributeType

Sets the percentage of the parent container’s shrink size that is allocated to the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: percentage of the parent container’s shrink size that is allocated to the component.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: percentage of the parent container’s shrink size that is allocated to the component.

Source

pub const NODE_FLEX_BASIS: ArkUI_NodeAttributeType

Sets the base size of the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: percentage of the parent container’s remaining space that is allocated to the component.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: percentage of the parent container’s remaining space that is allocated to the component.

Source

pub const NODE_ACCESSIBILITY_GROUP: ArkUI_NodeAttributeType

Sets the accessibility group. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: Accessibility group. The value 1 means that the component and all its child components form an entire selectable component. In this case, the accessibility service will no longer be available for the content of its child components. The value is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: Accessibility group. The value 1 means that the component and all its child components form an entire selectable component. In this case, the accessibility service will no longer be available for the content of its child components. The value is 1 or 0.

Source

pub const NODE_ACCESSIBILITY_TEXT: ArkUI_NodeAttributeType

Sets the accessibility text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: accessibility text.

Format of the return value ArkUI_AttributeItem:

.string: accessibility text.

Source

pub const NODE_ACCESSIBILITY_MODE: ArkUI_NodeAttributeType

Sets the accessibility service model. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: accessibility service model. The parameter type is ArkUI_AccessibilityMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: accessibility service model. The parameter type is ArkUI_AccessibilityMode.

Source

pub const NODE_ACCESSIBILITY_DESCRIPTION: ArkUI_NodeAttributeType

Sets the accessibility description. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: accessibility description.

Format of the return value ArkUI_AttributeItem:

.string: accessibility description.

Source

pub const NODE_FOCUS_STATUS: ArkUI_NodeAttributeType

Defines the focused state. This attribute can be set and obtained as required through APIs.

Note: Setting the parameter to 0 shifts focus from the currently focused component on the current level of the page to the root container.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_ASPECT_RATIO: ArkUI_NodeAttributeType

Defines the aspect ratio attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: aspect ratio of the component, in width/height format.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: aspect ratio of the component, in width/height format.

Source

pub const NODE_LAYOUT_WEIGHT: ArkUI_NodeAttributeType

Defines the weight of the component within its row, column, or flex container for proportional distribution of available space within the container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: weight of the component along the main axis.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: weight of the component along the main axis.

Source

pub const NODE_DISPLAY_PRIORITY: ArkUI_NodeAttributeType

Sets the display priority for the component in the row, column, or flex (single-line) container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: display priority of the component in the container.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: display priority of the component in the container.

Source

pub const NODE_OUTLINE_WIDTH: ArkUI_NodeAttributeType

Sets the thickness of an element’s outline.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: thickness of the left outline.

.value[1].f32: thickness of the top outline.

.value[2].f32: thickness of the right outline.

.value[3].f32: thickness of the bottom outline.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: thickness of the left outline.

.value[1].f32: thickness of the top outline.

.value[2].f32: thickness of the right outline.

.value[3].f32: thickness of the bottom outline.

Source

pub const NODE_WIDTH_PERCENT: ArkUI_NodeAttributeType

Defines the width attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width, in percentage.

Source

pub const NODE_HEIGHT_PERCENT: ArkUI_NodeAttributeType

Defines the height attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: height, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: height, in percentage.

Source

pub const NODE_PADDING_PERCENT: ArkUI_NodeAttributeType

Defines the padding attribute, which can be set, reset, and obtained as required through APIs.

There are two formats of ArkUI_AttributeItem for setting the attribute value:

1: Specify the same padding for the four directions.

.value[0].f32: padding, in percentage.

2: Specify different paddings for different directions.

.value[0].f32: top padding, in percentage.

.value[1].f32: right padding, in percentage.

.value[2].f32: bottom padding, in percentage.

.value[3].f32: left padding, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: top padding, in percentage.

.value[1].f32: right padding, in percentage.

.value[2].f32: bottom padding, in percentage.

.value[3].f32: left padding, in percentage.

Source

pub const NODE_MARGIN_PERCENT: ArkUI_NodeAttributeType

Defines the margin attribute, which can be set, reset, and obtained as required through APIs.

There are two formats of ArkUI_AttributeItem for setting the attribute value:

1: Specify the same margin for the four directions.

.value[0].f32: margin, in percentage.

2: Specify different margins for different directions.

.value[0].f32: top margin, in percentage.

.value[1].f32: right margin, in percentage.

.value[2].f32: bottom margin, in percentage.

.value[3].f32: left margin, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: top margin, in percentage.

.value[1].f32: right margin, in percentage.

.value[2].f32: bottom margin, in percentage.

.value[3].f32: left margin, in percentage.

Source

pub const NODE_GEOMETRY_TRANSITION: ArkUI_NodeAttributeType

The implicit shared element transition within the component supports attribute setting, attribute reset, and attribute acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.value[0]?.i32: The parameter type is 1 or 0. 2 components that share element bindings, Whether to continue to participate in the shared element animation when the appearance element is not deleted, the default is false, and the original position will remain unchanged if not involved.

.string is used to set the binding relationship. Set the id to “” to clear the binding relationship to avoid participating in sharing behavior.

The id can be changed and the binding relationship re-established. The same ID can only be bound to two components and they are in/out roles of different types. Multiple components cannot be bound to the same id.

Attribute acquisition method return value ArkUI_AttributeItem format:

.value[0].i32: The parameter type is 1 or 0. 2 components that share element bindings, Whether to continue to participate in the shared element animation when the appearance element is not deleted, the default is not false, if not involved, the original position will remain unchanged.

.string is used to set the binding relationship. Set the id to “” to clear the binding relationship to avoid participating in sharing behavior.

The id can be changed and the binding relationship re-established. The same ID can only be bound to two components and they are in/out roles of different types. Multiple components cannot be bound to the same id.

Source

pub const NODE_RELATIVE_LAYOUT_CHAIN_MODE: ArkUI_NodeAttributeType

specifies the parameters of the chain formed by this component as the chain head, and supports attribute setting, attribute reset and attribute acquisition interfaces.

Only takes effect when the parent container is RelativeContainer

Attribute setting method parameter ArkUI_AttributeItem format:

.value[0].i32: The direction of the chain. Enum ArkUI_Axis.

.value[1].i32: Chain style. Enum ArkUI_RelativeLayoutChainStyle.

.value[0].i32: The direction of the chain. Enum ArkUI_Axis.

.value[1].i32: Chain style. Enum ArkUI_RelativeLayoutChainStyle.

Source

pub const NODE_RENDER_FIT: ArkUI_NodeAttributeType

Set the component content filling method in the process of width and height animation, support property setting, property reset, property acquisition interface.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32 Content filling mode ArkUI_RenderFit.

Format of the return value ArkUI_AttributeItem:

.value[0].i32 Content filling mode ArkUI_RenderFit.

Source

pub const NODE_OUTLINE_COLOR: ArkUI_NodeAttributeType

External stroke color properties, support property setting, property reset and property acquisition interface.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].u32: Set the border color of the four sides uniformly, using 0xargb, such as 0xFFFF11FF.

2: .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF.

.value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF.

.value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF.

.value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF.

.value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF.

.value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF.

.value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF.

Source

pub const NODE_SIZE: ArkUI_NodeAttributeType

Set the height and width dimensions, support property setting, property reset and property acquisition interface.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: Width value, unit is vp;

.value[1].f32: Height value, unit is vp;

Format of the return value ArkUI_AttributeItem:

.value[0].f32: Width value, unit is vp;

.value[1].f32: Height value, unit is vp;

Source

pub const NODE_RENDER_GROUP: ArkUI_NodeAttributeType

Set whether the current component and child component are rendered off the screen first and then fused with the parent control, supporting property setting, property reset and property acquisition.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_COLOR_BLEND: ArkUI_NodeAttributeType

Add color overlay effect to components, support property setting, property reset and property acquisition interface.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF.

Source

pub const NODE_FOREGROUND_BLUR_STYLE: ArkUI_NodeAttributeType

Provide content ambiguity capability for the current component, support property setting, property reset, property acquisition interface.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32 Represents the content blurring style, and uses the ArkUI_BlurStyle enumeration value.

.value[1]?.i32 Represents the dark and light mode used by the content blur effect,

with the [ArkUI_ThemeColorMode] enumeration value.

.value[2]?.i32 The color extraction mode used to represent the content blur effect takes

the ArkUI_AdaptiveColor enumeration value.

.value[3]?.f32: blur degree. The value range is [0.0, 1.0].

.value[4]?.f32 It is a gray-level fuzzy parameter. The value range is [0,127].

.value[5]?.f32 It is a gray-level fuzzy parameter. The value range is [0,127].

Format of the return value ArkUI_AttributeItem:

.value[0].i32 Represents the content blurring style, and uses the ArkUI_BlurStyle enumeration value.

.value[1].i32 Represents the dark and light mode used by the content blur effect,

with the [ArkUI_ThemeColorMode] enumeration value.

.value[2].i32 The color extraction mode used to represent the content blur effect takes

the ArkUI_AdaptiveColor enumeration value.

.value[3].f32: blur degree. The value range is [0.0, 1.0].

.value[4].f32 It is a gray-level fuzzy parameter. The value range is [0,127].

.value[5].f32 It is a gray-level fuzzy parameter. The value range is [0,127].

Source

pub const NODE_LAYOUT_RECT: ArkUI_NodeAttributeType

Defines the component size and position for layout. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: X coordinate of the component, in px.

.value[1].i32: Y coordinate of the component, in px.

.value[2].i32: width of the component, in px.

.value[3].i32: height of the component, in px.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: X coordinate of the component, in px.

.value[1].i32: Y coordinate of the component, in px.

.value[2].i32: width of the component, in px.

.value[3].i32: height of the component, in px.

Source

pub const NODE_FOCUS_ON_TOUCH: ArkUI_NodeAttributeType

Whether the current component supports click-to-focus capability, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_BORDER_WIDTH_PERCENT: ArkUI_NodeAttributeType

Defines the border width attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].f32: width of the four borders, in percentage.

2: .value[0].f32: width of the top border, in percentage.

.value[1].f32: width of the right border, in percentage.

.value[2].f32: width of the bottom border, in percentage.

.value[3].f32: width of the left border, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the top border, in percentage.

.value[1].f32: width of the right border, in percentage.

.value[2].f32: width of the bottom border, in percentage.

.value[3].f32: width of the left border, in percentage.

Source

pub const NODE_BORDER_RADIUS_PERCENT: ArkUI_NodeAttributeType

Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

1: .value[0].f32: radius of the four corners, in percentage.

2: .value[0].f32: radius of the upper left corner, in percentage.

.value[1].f32: radius of the upper right corner, in percentage.

.value[2].f32: radius of the lower left corner, in percentage.

.value[3].f32: radius of the lower right corner, in percentage.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: radius of the upper left corner, in percentage.

.value[1].f32: radius of the upper right corner, in percentage.

.value[2].f32: radius of the lower left corner, in percentage.

.value[3].f32: radius of the lower right corner, in percentage.

Source

pub const NODE_ACCESSIBILITY_ID: ArkUI_NodeAttributeType

Accessible ID, which can be obtained as required through APIs.

Format of the return value ArkUI_AttributeItem:

.value[0].i32:Accessible ID。

Source

pub const NODE_ACCESSIBILITY_ACTIONS: ArkUI_NodeAttributeType

Define accessible actions, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32:accessible action types,and uses the ArkUI_AccessibilityActionType enumeration value.

Format of the return value ArkUI_AttributeItem:

.value[0].u32:accessible action types,and uses the ArkUI_AccessibilityActionType enumeration value.

Source

pub const NODE_ACCESSIBILITY_ROLE: ArkUI_NodeAttributeType

Define accessible role, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32:accessible role type,and uses the ArkUI_NodeType enumeration value.

Format of the return value ArkUI_AttributeItem:

.value[0].u32:accessible role type,and uses the ArkUI_NodeType enumeration value.

Source

pub const NODE_ACCESSIBILITY_STATE: ArkUI_NodeAttributeType

Define accessible state, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object:the parameter type is ArkUI_AccessibilityState.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object:the parameter type is ArkUI_AccessibilityState.

Source

pub const NODE_ACCESSIBILITY_VALUE: ArkUI_NodeAttributeType

Define accessible value, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object:the parameter type is ArkUI_AccessibilityValue.

Format of the return value ArkUI_AttributeItem:

.object:the parameter type is ArkUI_AccessibilityValue.

Source

pub const NODE_EXPAND_SAFE_AREA: ArkUI_NodeAttributeType

defines control components to extend their security zones, supporting property setting, property reset, and property fetching.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0]? .u32: Set of extended security zone enumerated values ArkUI_SafeAreaType, For example, ARKUI_SAFE_AREA_TYPE_SYSTEM | ARKUI_SAFE_AREA_TYPE_CUTOUT;

.value[1]? .u32: set of directional enum values for extended security zones ArkUI_SafeAreaEdge;

For example: ARKUI_SAFE_AREA_EDGE_TOP | ARKUI_SAFE_AREA_EDGE_BOTTOM;

Attribute fetch method return value ArkUI_AttributeItem format:

.value[0].u32: extends the security zone. .

.value[1].u32: indicates the direction to extend the security zone. .

Source

pub const NODE_VISIBLE_AREA_CHANGE_RATIO: ArkUI_NodeAttributeType

Defines the visible area ratio (visible area/total area of the component) threshold for invoking the visible area change event of the component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[…].f32: threshold array. The value range is 0 to 1.

Format of the return value ArkUI_AttributeItem:

.value[…].f32: threshold array.

Source

pub const NODE_TRANSITION: ArkUI_NodeAttributeType

Sets the transition effect when the component is inserted or deleted. This attribute can be set, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: transition effect. The parameter type is [ArkUI_TransitionEffect].

Format of the return value ArkUI_AttributeItem:

.object: transition effect. The parameter type is [ArkUI_TransitionEffect].

Source

pub const NODE_UNIQUE_ID: ArkUI_NodeAttributeType

👎Deprecated since 20

Defines the component ID. This attribute can be obtained through APIs.

Format of the ArkUI_AttributeItem parameter for obtaining the attribute:

.value[0].i32: component ID.

Deprecated since 20 OH_ArkUI_NodeUtils_GetNodeUniqueId

Source

pub const NODE_FOCUS_BOX: ArkUI_NodeAttributeType

Set the current component system focus box style.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: The distance between the focus box and the edge of the component.

Positive numbers represent the outer side, negative numbers represent the inner side.

Percentage is not supported.

.value[1].f32: Focus box width. Negative numbers and percentages are not supported.

.value[2].u32: Focus box color.

Source

pub const NODE_CLICK_DISTANCE: ArkUI_NodeAttributeType

Defines the moving distance limit for the component-bound tap gesture. This attribute can be set as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: allowed moving distance of a finger, in vp.

Source

pub const NODE_TAB_STOP: ArkUI_NodeAttributeType

Available on crate feature api-14 only.

Sets whether the focus can be placed on this component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the focus can be placed on the current component. The parameter type is 1 or 0.

Available since API-level: 14

Source

pub const NODE_BACKDROP_BLUR: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the backdrop blur attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32:backdrop blur radius, in px. The value range is [0, +∞).

.value[1]?.f32:grayscale blur settings that control the brightness of the black color.

The value range is [0, 127].

.value[2]?.f32:grayscale blur settings that control the darkness of the white color.

The value range is [0, 127].

Format of the return value ArkUI_AttributeItem:

.value[0].f32:backdrop blur radius, in px. The value range is [0, +∞).

.value[1].f32:grayscale blur settings that control the brightness of the black color.

The value range is [0, 127].

.value[2].f32:grayscale blur settings that control the darkness of the white color.

The value range is [0, 127].

Available since API-level: 15

Source

pub const NODE_BACKGROUND_IMAGE_RESIZABLE_WITH_SLICE: ArkUI_NodeAttributeType

Available on crate feature api-19 only.

Defines the background image resizable attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width of the left edge. The unit is vp.

.value[1].f32: width of the top edge. The unit is vp.

.value[2].f32: width of the right edge. The unit is vp.

.value[3].f32: width of the bottom edge. The unit is vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the left edge. The unit is vp.

.value[1].f32: width of the top edge. The unit is vp.

.value[2].f32: width of the right edge. The unit is vp.

.value[3].f32: width of the bottom edge. The unit is vp.

Available since API-level: 19

Source

pub const NODE_NEXT_FOCUS: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Sets the next focus node.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: focus movement direction, as defined in ArkUI_FocusMove. .object: next focus node. The parameter type is ArkUI_NodeHandle.

Available since API-level: 18

Source

pub const NODE_VISIBLE_AREA_APPROXIMATE_CHANGE_RATIO: ArkUI_NodeAttributeType

Available on crate feature api-17 only.

Sets the parameters for visible area change events.

Note: The visible area change callback is not a real-time callback. The actual callback interval may differ from the expected interval due to system load and other factors. The interval between two visible area change callbacks will not be less than the expected update interval. If the provided expected interval is too short, the actual callback interval will be determined by the system load. By default, the interval threshold of the visible area change callback includes 0. This means that, if the provided threshold is [0.5], the effective threshold will be [0.0, 0.5].

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: parameters for visible area change events. The parameter type is ArkUI_VisibleAreaEventOptions.

Format of the return value ArkUI_AttributeItem:

.object: parameters for visible area change events. The parameter type is ArkUI_VisibleAreaEventOptions.

Available since API-level: 17

Source

pub const NODE_TRANSLATE_WITH_PERCENT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the translate attribute, which supports for percentile translation input, and can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: distance to translate along the x-axis. The default unit is percentage. The unit is vp only if value[3] exists and value[3] is 0. The default value of value[0] is 0.

.value[1].f32: distance to translate along the y-axis. The default unit is percentage. The unit is vp only if value[4] exists and value[4] is 0. The default value of value[1] is 0.

.value[2].f32: distance to translate along the z-axis, in vp. The default value is 0.

.value[3]?.i32: Whether the translation distance along the x-axis is specified as a percentage. The value can be 0 or 1. When the value is 1, it is specified as a percentage. For example, value[0].f32=0.1 and value[3].i32=1 indicates a 10% shift in the x direction. The default value is 1.

.value[4]?.i32: Whether the translation distance along the y-axis is specified as a percentage. The value can be 0 or 1. When the value is 1, it is specified as a percentage. For example, value[1].f32=0.1 and value[4].i32=1 indicates a 10% shift in the y direction. The default value is 1.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: distance to translate along the x-axis. The unit depends on value[3].

.value[1].f32: distance to translate along the y-axis. The unit depends on value[4].

.value[2].f32: distance to translate along the z-axis. The unit is vp.

.value[3].i32: Whether the unit of the X-axis translation distance is in percentage. When value[3].i32 is 0, the unit of the X-axis translation distance is vp; when value[3].i32 is 1, the unit of the X-axis translation distance is percentage;

.value[4].i32: Whether the unit of the Y-axis translation distance is in percentage. When value[4].i32 is 0, the unit of the Y-axis translation distance is vp; when value[4].i32 is 1, the unit of the Y-axis translation distance is percentage;

Available since API-level: 20

Source

pub const NODE_ROTATE_ANGLE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets component rotation with multi-axis angle control. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: x-axis rotation angle. The default value is 0.

.value[1].f32: y-axis rotation angle. The default value is 0.

.value[2].f32: z-axis rotation angle. The default value is 0.

.value[3].f32: perspective distance from the viewpoint to the z=0 plane, in px. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: x-axis rotation angle. The default value is 0. .value[1].f32: y-axis rotation angle. The default value is 0.

.value[2].f32: z-axis rotation angle. The default value is 0.

.value[3].f32: perspective distance from the viewpoint to the z=0 plane, in px. The default value is 0.

Available since API-level: 20

Source

pub const NODE_WIDTH_LAYOUTPOLICY: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the width attribute with param type LayoutPolicy, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: the LayoutPolicy that the width of the component follows.

The parameter type is ArkUI_LayoutPolicy.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: the LayoutPolicy that the width of the component follows.

The parameter type is ArkUI_LayoutPolicy.

Available since API-level: 21

Source

pub const NODE_HEIGHT_LAYOUTPOLICY: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the height attribute with param type LayoutPolicy, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: the LayoutPolicy that the height of the component follows.

The parameter type is ArkUI_LayoutPolicy.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: the LayoutPolicy that the height of the component follows.

The parameter type is ArkUI_LayoutPolicy.

Available since API-level: 21

Source

pub const NODE_POSITION_EDGES: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the position attribute in param type Edges, which specifies the position of the component by the distance relative to the parent container’s four edges. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object indicates struct of edges for position. The parameter type is ArkUI_PositionEdges.

Format of the return value ArkUI_AttributeItem:

.object indicates struct of edges for position. The parameter type is ArkUI_PositionEdges.

Available since API-level: 21

Source

pub const NODE_ALLOW_FORCE_DARK: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Set whether the component enables the ability to invert colors. This attribute can be set , and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Available since API-level: 21

Source

pub const NODE_PIXEL_ROUND: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the pixelRound attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object indicates struct of policy for pixelRound. The parameter type is ArkUI_PixelRoundPolicy.

Format of the return value ArkUI_AttributeItem:

.object indicates struct of policy for pixelRound. The parameter type is ArkUI_PixelRoundPolicy.

Available since API-level: 21

Source

pub const NODE_TEXT_CONTENT: ArkUI_NodeAttributeType

Defines the text content attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: text content.

Format of the return value ArkUI_AttributeItem:

.string: text content.

Source

pub const NODE_FONT_COLOR: ArkUI_NodeAttributeType

Defines the font color attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: font color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: font color value, in 0xARGB format.

Source

pub const NODE_FONT_SIZE: ArkUI_NodeAttributeType

Defines the font size attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: font size, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: font size, in fp.

Source

pub const NODE_FONT_STYLE: ArkUI_NodeAttributeType

Defines the font style attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: font style ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: font style ArkUI_FontStyle.

Source

pub const NODE_FONT_WEIGHT: ArkUI_NodeAttributeType

Defines the font weight attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: font weight ArkUI_FontWeight.

Source

pub const NODE_TEXT_LINE_HEIGHT: ArkUI_NodeAttributeType

Defines the text line height attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: line height, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: line height, in fp.

Source

pub const NODE_TEXT_DECORATION: ArkUI_NodeAttributeType

Defines the text decoration style and color. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: text decoration type ArkUI_TextDecorationType. The default value is ARKUI_TEXT_DECORATION_TYPE_NONE.

.value[1]?.u32: text decoration color, in 0xARGB format. For example, 0xFFFF0000 indicates red. Optional.

.value[2]?.i32: text decoration style ArkUI_TextDecorationStyle.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: text decoration type ArkUI_TextDecorationType.

.value[1].u32: text decoration color, in 0xARGB format.

.value[2].i32: text decoration style ArkUI_TextDecorationStyle.

Source

pub const NODE_TEXT_CASE: ArkUI_NodeAttributeType

Defines the text case attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: text case.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: text case.

Source

pub const NODE_TEXT_LETTER_SPACING: ArkUI_NodeAttributeType

Defines the letter spacing attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: letter spacing, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: letter spacing, in fp.

Source

pub const NODE_TEXT_MAX_LINES: ArkUI_NodeAttributeType

Sets the maximum number of lines in the text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: maximum number of lines in the text.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: maximum number of lines in the text.

Source

pub const NODE_TEXT_ALIGN: ArkUI_NodeAttributeType

Horizontal alignment mode of the text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: horizontal alignment mode of the text. The value is an enum of ArkUI_TextAlignment.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: horizontal alignment mode of the text. The value is an enum of ArkUI_TextAlignment.

Source

pub const NODE_TEXT_OVERFLOW: ArkUI_NodeAttributeType

Defines the text overflow attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: display mode when the text is too long. ArkUI_TextOverflow

Format of the return value ArkUI_AttributeItem:

.value[0].i32: display mode when the text is too long. ArkUI_TextOverflow

Source

pub const NODE_FONT_FAMILY: ArkUI_NodeAttributeType

Defines the font family attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: fonts, separated by commas (,).

Format of the return value ArkUI_AttributeItem:

.string: fonts, separated by commas (,).

Source

pub const NODE_TEXT_COPY_OPTION: ArkUI_NodeAttributeType

Defines the copy option attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: copy option ArkUI_CopyOptions. The default value is ARKUI_COPY_OPTIONS_NONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: copy option [ArkUI_CopyOptions.]

Source

pub const NODE_TEXT_BASELINE_OFFSET: ArkUI_NodeAttributeType

Defines the text baseline offset attribute This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: baseline offset, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: baseline offset, in fp.

Source

pub const NODE_TEXT_TEXT_SHADOW: ArkUI_NodeAttributeType

Defines the text shadow attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: blur radius of the shadow, in vp.

.value[1].i32: shadow type ArkUI_ShadowType. The default value is ARKUI_SHADOW_TYPE_COLOR.

.value[2].u32: shadow color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

.value[3].f32: offset of the shadow along the x-axis, in vp.

.value[4].f32: offset of the shadow along the y-axis, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: blur radius of the shadow, in vp.

.value[1].i32: shadow type ArkUI_ShadowType.

.value[2].u32: shadow color, in 0xARGB format.

.value[3].f32: offset of the shadow along the x-axis, in vp.

.value[4].f32: offset of the shadow along the y-axis, in vp.

Source

pub const NODE_TEXT_MIN_FONT_SIZE: ArkUI_NodeAttributeType

Defines the minimum font size attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum font size, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum font size, in fp.

Source

pub const NODE_TEXT_MAX_FONT_SIZE: ArkUI_NodeAttributeType

Defines the maximum font size attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum font size, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: maximum font size, in fp.

Source

pub const NODE_TEXT_FONT: ArkUI_NodeAttributeType

Defines the text style attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string?: font family. Optional. Use commas (,) to separate multiple fonts.

.value[0].f32: font size, in fp.

.value[1]?.i32: font weight. Optional. The parameter type is ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.

.value[2]?.i32: font style. Optional. The parameter type is ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.

Format of the return value ArkUI_AttributeItem:

.string: font family. Use commas (,) to separate multiple fonts.

.value[0].f32: font size, in fp.

.value[1].i32: font weight. The parameter type is ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.

.value[2].i32: font style. The parameter type is ArkUI_FontStyle. The default value is ARKUI_FONT_STYLE_NORMAL.

Source

pub const NODE_TEXT_HEIGHT_ADAPTIVE_POLICY: ArkUI_NodeAttributeType

Defines how the adaptive height is determined for the text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: how the adaptive height is determined for the text. The parameter type is ArkUI_TextHeightAdaptivePolicy.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: how the adaptive height is determined for the text. The parameter type is ArkUI_TextHeightAdaptivePolicy

Source

pub const NODE_TEXT_INDENT: ArkUI_NodeAttributeType

Defines the indentation of the first line. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: indentation of the first line.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: indentation of the first line.

Source

pub const NODE_TEXT_WORD_BREAK: ArkUI_NodeAttributeType

Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is ArkUI_WordBreak.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is ArkUI_WordBreak.

Source

pub const NODE_TEXT_ELLIPSIS_MODE: ArkUI_NodeAttributeType

Defines the ellipsis position. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is ArkUI_EllipsisMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is ArkUI_EllipsisMode.

Source

pub const NODE_TEXT_LINE_SPACING: ArkUI_NodeAttributeType

Defines the text line spacing attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: line spacing, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: line spacing, in fp.

Source

pub const NODE_FONT_FEATURE: ArkUI_NodeAttributeType

Set the text feature effect and the NODE_FONT_FEATURE attribute, NODE_FONT_FEATURE is the advanced typesetting capability of OpenType Features such as ligatures and equal-width digits are generally used in customized fonts.

The capabilities need to be supported by the fonts,

Interfaces for setting, resetting, and obtaining attributes are supported.

Attribute setting method parameter ArkUI_AttributeItem format:

.string: complies with the text feature format. The format is normal |

is in the format of [ | on | off], . There can be multiple values separated by commas (,).

For example, the input format of a number with the same width is ss01 on.

Attribute obtaining method return value ArkUI_AttributeItem format:

.string indicates the content of the text feature. Multiple text features are separated by commas (,).

Source

pub const NODE_TEXT_ENABLE_DATA_DETECTOR: ArkUI_NodeAttributeType

Setting Enable Text Recognition.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:Enable text recognition, default value false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32:Enable Text Recognition

Source

pub const NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG: ArkUI_NodeAttributeType

Set the text recognition configuration.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0…].i32: Array of entity types, parameter typesArkUI_TextDataDetectorType

Format of the return value ArkUI_AttributeItem:

.value[0…].i32:Array of entity types, parameter typesArkUI_TextDataDetectorType

Source

pub const NODE_TEXT_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType

Defines the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_TEXT_CONTENT_WITH_STYLED_STRING: ArkUI_NodeAttributeType

The text component uses a formatted string object to set text content properties, and supports property setting, property reset, and property acquisition interfaces.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object indicates ArkUI_StyledString formatted string data. The parameter type is [ArkUI_StyledString].

Format of the return value ArkUI_AttributeItem:

.object indicates ArkUI_StyledString formatted string data. The parameter type is [ArkUI_StyledString].

Source

pub const NODE_TEXT_HALF_LEADING: ArkUI_NodeAttributeType

Sets whether to center text vertically in the text component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to center text vertically. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to center text vertically.

Source

pub const NODE_IMMUTABLE_FONT_WEIGHT: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the font weight attribute, which can be set, reset, and obtained as required through APIs. The font weight specified by this API is not affected by any changes in the system font weight settings.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: font weight ArkUI_FontWeight. The default value is ARKUI_FONT_WEIGHT_NORMAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: font weight ArkUI_FontWeight.

Available since API-level: 15

Source

pub const NODE_TEXT_OPTIMIZE_TRAILING_SPACE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets whether to optimize the trailing spaces at the end of each line during text layout. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32: whether to optimize trailing spaces at the end of each line during text layout. The default value is false.

Format of the return value ArkUI_AttributeItem:

value[0].i32: whether to optimize trailing spaces at the end of each line during text layout.

Available since API-level: 20

Source

pub const NODE_TEXT_LINE_COUNT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the text line count attribute, which can only be obtained as required through APIs.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: line count of the node.

Available since API-level: 20

Source

pub const NODE_TEXT_LINEAR_GRADIENT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets a linear gradient effect for text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: start angle of the linear gradient. The setting takes effect only when direction is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM. A positive value indicates a clockwise rotation from the origin, (0, 0). The default value is 180.

.value[1].i32: direction of the linear gradient. When a direction other than ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM is set, the angle property is ignored. The parameter type is ArkUI_LinearGradientDirection.

.value[2].i32: whether the colors are repeated. The default value is false. .object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: start angle of the linear gradient. When direction is set to ARKUI_LINEAR_GRADIENT_DIRECTION_CUSTOM, angle at the set value; otherwise, it is at default value.

.value[1].i32: direction of the linear gradient.

.value[2].i32: whether the colors are repeated.

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Available since API-level: 20

Source

pub const NODE_TEXT_RADIAL_GRADIENT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets a radial gradient effect for text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: X-coordinate of the radial gradient center relative to the upper left corner of the text.

.value[1]?.f32: Y-coordinate of the radial gradient center relative to the upper left corner of the text.

.value[2]?.f32: radius of the radial gradient. The default value is 0.

.value[3]?.i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: X-coordinate of the radial gradient center relative to the upper left corner of the text.

.value[1].f32: Y-coordinate of the radial gradient center relative to the upper left corner of the text.

.value[2].f32: radius of the radial gradient. The default value is 0.

.value[3].i32: whether the colors are repeated. The value 1 means that the colors are repeated, and 0 means the opposite.

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Available since API-level: 20

Source

pub const NODE_TEXT_VERTICAL_ALIGN: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets the vertical alignment of the text content. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: vertical alignment of the text content, specified using the ArkUI_TextVerticalAlignment enum. The default value is ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: vertical alignment of the text content, specified using the ArkUI_TextVerticalAlignment enum.

Available since API-level: 20

Source

pub const NODE_TEXT_CONTENT_ALIGN: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Sets the content align of the text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: content align of the text, specified using the ArkUI_TextContentAlign enum. The default value is ARKUI_TEXT_CONTENT_ALIGN_CENTER.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: content align of the text, specified using the ArkUI_TextContentAlign enum.

Available since API-level: 21

Source

pub const NODE_SPAN_CONTENT: ArkUI_NodeAttributeType

Defines the text content attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: content of the text span.

Format of the return value ArkUI_AttributeItem:

.string: content of the text span.

Source

pub const NODE_SPAN_TEXT_BACKGROUND_STYLE: ArkUI_NodeAttributeType

Defines the text background style. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the text background, in 0xARGB format, for example, 0xFFFF0000 indicating red.

The second parameter indicates the rounded corners of the text background. Two setting modes are available:

1: .value[1].f32: radius of the four corners, in vp.

2: .value[1].f32: radius of the upper left corner, in vp.

.value[2].f32: radius of the upper right corner, in vp.

.value[3].f32: radius of the lower left corner, in vp.

.value[4].f32: radius of the lower right corner, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the text background, in 0xARGB format.

.value[1].f32: radius of the upper left corner, in vp.

.value[2].f32: radius of the upper right corner, in vp.

.value[3].f32: radius of the lower left corner, in vp.

.value[4].f32: radius of the lower right corner, in vp.

Source

pub const NODE_SPAN_BASELINE_OFFSET: ArkUI_NodeAttributeType

Defines the text baseline offset attribute This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: baseline offset, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: baseline offset, in fp.

Source

pub const NODE_IMAGE_SPAN_SRC: ArkUI_NodeAttributeType

Defines the image source of the image span. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: image address of the image span.

.object: The parameter type is [ArkUI_DrawableDescriptor]. Either .string or .object must be set.

Format of the return value ArkUI_AttributeItem:

.string: image address of the image span.

.object: The parameter type is [ArkUI_DrawableDescriptor].

Source

pub const NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT: ArkUI_NodeAttributeType

Defines the alignment mode of the image with the text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode of the image with the text. The value is an enum of ArkUI_ImageSpanAlignment.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode of the image with the text. The value is an enum of ArkUI_ImageSpanAlignment.

Source

pub const NODE_IMAGE_SPAN_ALT: ArkUI_NodeAttributeType

Defines the placeholder image source. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: placeholder image source.

.object: The parameter type is [ArkUI_DrawableDescriptor]. Either .string or .object must be set.

Format of the return value ArkUI_AttributeItem:

.string: placeholder image source.

.object: The parameter type is [ArkUI_DrawableDescriptor].

Source

pub const NODE_IMAGE_SPAN_BASELINE_OFFSET: ArkUI_NodeAttributeType

Available on crate feature api-13 only.

Defines the baseline offset attribute of the ImageSpan component. This attribute can be set, reset, and obtained as required through APIs. A positive value means an upward offset, while a negative value means a downward offset. The default value is 0, and the unit is fp.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: baseline offset, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: baseline offset, in fp.

Available since API-level: 13

Source

pub const NODE_IMAGE_SRC: ArkUI_NodeAttributeType

Defines the image source of the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: image source.

.object: The parameter type is [ArkUI_DrawableDescriptor]. Either .string or .object must be set.

Format of the return value ArkUI_AttributeItem:

.string: image source.

.object: The parameter type is [ArkUI_DrawableDescriptor].

Source

pub const NODE_IMAGE_OBJECT_FIT: ArkUI_NodeAttributeType

Defines how the image is resized to fit its container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: how the image is resized to fit its container. The value is an enum of ArkUI_ObjectFit.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: how the image is resized to fit its container. The value is an enum of ArkUI_ObjectFit.

Source

pub const NODE_IMAGE_INTERPOLATION: ArkUI_NodeAttributeType

Defines the interpolation effect of the image. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: interpolation effect of the image. The value is an enum of ArkUI_ImageInterpolation.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: interpolation effect of the image. The value is an enum of ArkUI_ImageInterpolation.

Source

pub const NODE_IMAGE_OBJECT_REPEAT: ArkUI_NodeAttributeType

Defines how the image is repeated. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: how the image is repeated. The value is an enum of ArkUI_ImageRepeat.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: how the image is repeated. The value is an enum of ArkUI_ImageRepeat.

Source

pub const NODE_IMAGE_COLOR_FILTER: ArkUI_NodeAttributeType

Defines the color filter of the image. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32 to .value[19].f32: filter matrix array.

.size: 5 x 4 filter array size.

.object: the pointer to OH_Drawing_ColorFilter. Either .value or .object is set.

Format of the return value ArkUI_AttributeItem:

.value[0].f32 to .value[19].f32: filter matrix array.

.size: 5 x 4 filter array size.

.object: the pointer to OH_Drawing_ColorFilter.

Source

pub const NODE_IMAGE_AUTO_RESIZE: ArkUI_NodeAttributeType

Defines the auto resize attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32 : whether to resize the image source.

Format of the return value ArkUI_AttributeItem:

.value[0].i32 : whether to resize the image source.

Source

pub const NODE_IMAGE_ALT: ArkUI_NodeAttributeType

Defines the placeholder image source. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: placeholder image source.

.object: The parameter type is [ArkUI_DrawableDescriptor]. Either .string or .object must be set.

Format of the return value ArkUI_AttributeItem:

.string: placeholder image source.

.object: The parameter type is [ArkUI_DrawableDescriptor].

Source

pub const NODE_IMAGE_DRAGGABLE: ArkUI_NodeAttributeType

Defines whether the image is draggable. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the image is draggable. The value true means that the image is draggable.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the image is draggable.

Source

pub const NODE_IMAGE_RENDER_MODE: ArkUI_NodeAttributeType

Defines the image rendering mode. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is ArkUI_ImageRenderMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is ArkUI_ImageRenderMode.

Source

pub const NODE_IMAGE_FIT_ORIGINAL_SIZE: ArkUI_NodeAttributeType

Defines whether the image display size follows the image source size. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: wheter to follow, true means to follow.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: wheter to follow, true means to follow.

Source

pub const NODE_IMAGE_FILL_COLOR: ArkUI_NodeAttributeType

Defines the fill color of the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: fill color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: fill color, in 0xARGB format.

Source

pub const NODE_IMAGE_RESIZABLE: ArkUI_NodeAttributeType

Sets the resizable image options.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width of the left edge. The unit is vp.

.value[1].f32: width of the top edge. The unit is vp.

.value[2].f32: width of the right edge. The unit is vp.

.value[3].f32: width of the bottom edge. The unit is vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the left edge. The unit is vp.

.value[1].f32: width of the top edge. The unit is vp.

.value[2].f32: width of the right edge. The unit is vp.

.value[3].f32: width of the bottom edge. The unit is vp.

Source

pub const NODE_IMAGE_SYNC_LOAD: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the synchronous image loading attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to load the image synchronously.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to load the image synchronously.

Available since API-level: 20

Source

pub const NODE_IMAGE_SOURCE_SIZE: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image decoding size attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: width of the image decoding, in px.

.value[1].i32: height of the image decoding, in px.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: width of the image decoding, in px.

.value[1].i32: height of the image decoding, in px.

Available since API-level: 21

Source

pub const NODE_IMAGE_IMAGE_MATRIX: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the display tranformation matrix for an image. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0…15].f32: 16 floating-point numbers.

Format of the return value ArkUI_AttributeItem:

.value[0…15].f32: 16 floating-point numbers.

Available since API-level: 21

Source

pub const NODE_IMAGE_MATCH_TEXT_DIRECTION: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image follow text direction attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to follows the text direction.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to follows the text direction.

Available since API-level: 21

Source

pub const NODE_IMAGE_COPY_OPTION: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image copy attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: copy option ArkUI_CopyOptions. The default value is ARKUI_COPY_OPTIONS_NONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: copy option [ArkUI_CopyOptions.]

Source

pub const NODE_IMAGE_ENABLE_ANALYZER: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image AI analysis enable attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable AI analysis for the image.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable AI analysis for the image.

Available since API-level: 21

Source

pub const NODE_IMAGE_DYNAMIC_RANGE_MODE: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image dynamic display range attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: dynamic range mode ArkUI_DynamicRangeMode. The default value is ARKUI_DYNAMIC_RANGE_MODE_STANDARD.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: dynamic range mode [ArkUI_DynamicRangeMode.]

Source

pub const NODE_IMAGE_HDR_BRIGHTNESS: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image dynamic display brightness attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: hdr brightness. value range [0, 1]

Format of the return value ArkUI_AttributeItem:

.value[0].f32: hdr brightness. value range [0, 1]

Available since API-level: 21

Source

pub const NODE_IMAGE_ORIENTATION: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the image display direction attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: orientation [ArkUI_Orientation]. The default value is ARKUI_ORIENTATION_UP.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: orientation [ArkUI_Orientation.]

Source

pub const NODE_IMAGE_SUPPORT_SVG2: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Set the range of SVG parsing capabilities supported through enable switch. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: enable switch.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: enable switch.

Available since API-level: 21

Source

pub const NODE_IMAGE_CONTENT_TRANSITION: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Set the animation effect for the image content transformation. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The parameter type is ArkUI_ContentTransitionEffect.

Format of the return value ArkUI_AttributeItem:

.object: The parameter type is ArkUI_ContentTransitionEffect.

Available since API-level: 21

Source

pub const NODE_TOGGLE_SELECTED_COLOR: ArkUI_NodeAttributeType

Defines the color of the component when it is selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color, in 0xARGB format.

Source

pub const NODE_TOGGLE_SWITCH_POINT_COLOR: ArkUI_NodeAttributeType

Defines the color of the circular slider for the component of the switch type. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the circular slider, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the circular slider, in 0xARGB format.

Source

pub const NODE_TOGGLE_VALUE: ArkUI_NodeAttributeType

Defines the toggle switch value. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the toggle. The value true means to enable the toggle.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable the toggle.

Source

pub const NODE_TOGGLE_UNSELECTED_COLOR: ArkUI_NodeAttributeType

Defines the color of the component when it is deselected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color, in 0xARGB format.

Source

pub const NODE_LOADING_PROGRESS_COLOR: ArkUI_NodeAttributeType

Defines the foreground color of the loading progress bar. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: foreground color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: foreground color, in 0xARGB format.

Source

pub const NODE_LOADING_PROGRESS_ENABLE_LOADING: ArkUI_NodeAttributeType

Defines whether to show the loading animation for the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to show the loading animation. The value true means to show the loading animation, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to show the loading animation, and 0 means the opposite.

Source

pub const NODE_TEXT_INPUT_PLACEHOLDER: ArkUI_NodeAttributeType

Defines the default placeholder text of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: default placeholder text.

Format of the return value ArkUI_AttributeItem:

.string: default placeholder text.

Source

pub const NODE_TEXT_INPUT_TEXT: ArkUI_NodeAttributeType

Defines the default text content of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: default text content.

Format of the return value ArkUI_AttributeItem:

.string: default text content.

Source

pub const NODE_TEXT_INPUT_CARET_COLOR: ArkUI_NodeAttributeType

Defines the caret color attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: caret color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: caret color, in 0xARGB format.

Source

pub const NODE_TEXT_INPUT_CARET_STYLE: ArkUI_NodeAttributeType

Defines the caret style attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: caret width, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: caret width, in vp.

Source

pub const NODE_TEXT_INPUT_SHOW_UNDERLINE: ArkUI_NodeAttributeType

Defines the underline attribute of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to show an underline. The value true means to show an underline, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to show an underline, and 0 means the opposite.

Source

pub const NODE_TEXT_INPUT_MAX_LENGTH: ArkUI_NodeAttributeType

Defines the maximum number of characters in the text input. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: maximum number of characters in the text input, without a unit.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: maximum number of characters in the text input.

Source

pub const NODE_TEXT_INPUT_ENTER_KEY_TYPE: ArkUI_NodeAttributeType

Defines the type of the Enter key. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: type of the Enter keyArkUI_EnterKeyType. The default value is ARKUI_ENTER_KEY_TYPE_DONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: type of the Enter keyArkUI_EnterKeyType.

Source

pub const NODE_TEXT_INPUT_PLACEHOLDER_COLOR: ArkUI_NodeAttributeType

Defines the placeholder text color. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_TEXT_INPUT_PLACEHOLDER_FONT: ArkUI_NodeAttributeType

Defines the placeholder text font. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: font size, in fp. Optional. The default value is 16.0.

.value[1]?.i32: font style ArkUI_FontStyle. Optional. The default value is ARKUI_FONT_STYLE_NORMAL.

.value[2]?.i32: font weight ArkUI_FontWeight. Optional. The default value is ARKUI_FONT_WEIGHT_NORMAL.

?.string: font family. Multiple font families are separated by commas (,). Example: “font weight; font family 1, font family 2”.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: font size, in fp.

.value[1].i32: font style ArkUI_FontStyle.

.value[2].i32: font weight ArkUI_FontWeight.

.string: font family. Multiple font families are separated by commas (,).

Source

pub const NODE_TEXT_INPUT_ENABLE_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType

Defines whether to enable the input method when the component obtains focus. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the input method when the component obtains focus. The value true means to enable the input method, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to enable the input method when the component obtains focus, and 0 means the opposite.

Source

pub const NODE_TEXT_INPUT_TYPE: ArkUI_NodeAttributeType

Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: text box type ArkUI_TextInputType. The default value is ARKUI_TEXTINPUT_TYPE_NORMAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: text box type ArkUI_TextInputType.

Source

pub const NODE_TEXT_INPUT_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType

Defines the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_TEXT_INPUT_SHOW_PASSWORD_ICON: ArkUI_NodeAttributeType

Defines whether to display the password icon at the end of the password text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to display the password icon at the end of the password text box. The value true means to display the password icon, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to display the password icon at the end of the password text box, and 0 means the opposite.

Source

pub const NODE_TEXT_INPUT_EDITING: ArkUI_NodeAttributeType

Defines the editable state for the single-line text box. This attribute can be set as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.

Format of the ArkUI_AttributeItem parameter for obtaining the attribute: .value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.

Source

pub const NODE_TEXT_INPUT_CANCEL_BUTTON: ArkUI_NodeAttributeType

Defines the style of the cancel button on the right of the single-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: button style ArkUI_CancelButtonStyle. The default value is ARKUI_CANCELBUTTON_STYLE_INPUT.

.value[1]?.f32: button icon size, in vp.

.value[2]?.u32: button icon color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

?.string: button icon image source. The value is the local address of the image, for example, /pages/icon.png.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: button style ArkUI_CancelButtonStyle.

.value[1].f32: icon size, in vp.

.value[2].u32: button icon color, in 0xARGB format.

.string: button icon image source.

Source

pub const NODE_TEXT_INPUT_TEXT_SELECTION: ArkUI_NodeAttributeType

Sets the text selection area, which will be highlighted. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: start position of the text selection.

.value[1].i32: end position of the text selection.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: start position of the text selection.

.value[1].i32: end position of the text selection.

Source

pub const NODE_TEXT_INPUT_UNDERLINE_COLOR: ArkUI_NodeAttributeType

Sets the color of the text underline when it is enabled.

The default underline color configured for the theme is ‘0x33182431’.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the underline applied to the text being typed in. The value is in 0xARGB format.

.value[1].u32: color of the underline applied to the text in the normal state. The value is in 0xARGB format.

.value[2].u32: color of the underline applied to the text when an error is detected. The value is in 0xARGB format.

.value[3].u32: color of the underline applied to the text when it is disabled. The value is in 0xARGB format.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the underline applied to the text being typed in. The value is in 0xARGB format.

.value[1].u32: color of the underline applied to the text in the normal state. The value is in 0xARGB format.

.value[2].u32: color of the underline applied to the text when an error is detected. The value is in 0xARGB format.

.value[3].u32: color of the underline applied to the text when it is disabled. The value is in 0xARGB format.

Source

pub const NODE_TEXT_INPUT_ENABLE_AUTO_FILL: ArkUI_NodeAttributeType

Sets whether to enable autofill.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable autofill. The default value is true.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable autofill.

Source

pub const NODE_TEXT_INPUT_CONTENT_TYPE: ArkUI_NodeAttributeType

Sets the autofill type.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.

Source

pub const NODE_TEXT_INPUT_PASSWORD_RULES: ArkUI_NodeAttributeType

Defines the rules for generating passwords. When autofill is used, these rules are transparently transmitted to Password Vault for generating a new password.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: rules for generating passwords.

Format of the return value ArkUI_AttributeItem:

.string: rules for generating passwords.

Source

pub const NODE_TEXT_INPUT_SELECT_ALL: ArkUI_NodeAttributeType

Sets whether to select all text in the initial state. The inline mode is not supported.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to select all text in the initial state. The default value is b>false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to select all text in the initial state.

Source

pub const NODE_TEXT_INPUT_INPUT_FILTER: ArkUI_NodeAttributeType

Sets the regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are filtered out. The specified regular expression can match single characters, but not strings.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: regular expression.

Format of the return value ArkUI_AttributeItem:

.string: regular expression.

Source

pub const NODE_TEXT_INPUT_STYLE: ArkUI_NodeAttributeType

Sets the text box to the default style or inline input style.

For the inline input style, only InputType.Normal is supported.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: text input style. The parameter type is ArkUI_TextInputStyle.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: text input style. The parameter type is ArkUI_TextInputStyle.

Source

pub const NODE_TEXT_INPUT_CARET_OFFSET: ArkUI_NodeAttributeType

Sets or obtains the caret position.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

In the case of setting the caret position: .value[0].i32: character count from the beginning of a string to the caret position.

Format of the return value ArkUI_AttributeItem:

In the case of obtaining the caret position: If this API is called when the caret position is updated in the current frame, it will not take effect. .value[0].i32: index of the caret position.

.value[1].f32: X coordinate of the caret relative to the text box.

.value[2].f32: Y coordinate of the caret relative to the text box.

Source

pub const NODE_TEXT_INPUT_CONTENT_RECT: ArkUI_NodeAttributeType

Obtains the position of the edited text area relative to the component and its size.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: horizontal coordinate.

.value[1].f32: vertical coordinate.

.value[2].f32: content width.

.value[3].f32: content height.

Source

pub const NODE_TEXT_INPUT_CONTENT_LINE_COUNT: ArkUI_NodeAttributeType

Obtains the number of lines of the edited text.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of lines of the edited text.

Source

pub const NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN: ArkUI_NodeAttributeType

Sets whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked.

Source

pub const NODE_TEXT_INPUT_BLUR_ON_SUBMIT: ArkUI_NodeAttributeType

Sets whether the text box loses focus after the Enter key is pressed to submit information.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the text box loses focus.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the text box loses focus.

Source

pub const NODE_TEXT_INPUT_CUSTOM_KEYBOARD: ArkUI_NodeAttributeType

Set up a custom keyboard.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object:custom keyboard,The parameter type isArkUI_NodeHandle

.value[0]?.i32:Sets whether the custom keyboard supports the avoidance feature, default value false.

Format of the return value ArkUI_AttributeItem:

.object:custom keyboard,The parameter type isArkUI_NodeHandle

.value[0].i32:Set whether the custom keyboard supports the avoidance function.

Source

pub const NODE_TEXT_INPUT_WORD_BREAK: ArkUI_NodeAttributeType

Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is ArkUI_WordBreak.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is ArkUI_WordBreak.

Source

pub const NODE_TEXT_INPUT_SHOW_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType

Sets whether the keyboard pops up when the input box gains focus. It supports property setting, property reset and property acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.value[0].i32: Whether to pop up the keyboard.

Attribute acquisition method return value ArkUI_AttributeItem format:

.value[0].i32: Whether to pop up the keyboard.

Source

pub const NODE_TEXT_INPUT_NUMBER_OF_LINES: ArkUI_NodeAttributeType

When this property is set, the height of the textInput component is calculated using this property.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: set the value of numberOfLines.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: the value of numberOfLines.

Source

pub const NODE_TEXT_INPUT_LETTER_SPACING: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the letter spacing of the TextInput component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: letter spacing. The default unit is fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: letter spacing. The default unit is fp.

Available since API-level: 15

Source

pub const NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets whether to enable preview text for the TextInput component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable preview tex.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable preview tex.

Available since API-level: 15

Source

pub const NODE_TEXT_INPUT_HALF_LEADING: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Sets whether to center text vertically in the textInput component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to center text vertically. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to center text vertically.

Available since API-level: 18

Source

pub const NODE_TEXT_INPUT_KEYBOARD_APPEARANCE: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Set the keyboard style of textInput

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:keyboard style,the parameter type is [ArkUI_KeyboardAppearanceType]。

Format of the return value ArkUI_AttributeItem

.value[0].i32:keyboard style,the parameter type is [ArkUI_KeyboardAppearanceType]。

Available since API-level: 15

Source

pub const NODE_TEXT_INPUT_ENABLE_FILL_ANIMATION: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set whether to enable the auto fill animation or not.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: Whether to enable the auto fill animation.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: Get the flag of whether the auto fill animation is enabled.

Available since API-level: 20

Source

pub const NODE_TEXT_INPUT_LINE_HEIGHT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set the line height of the input node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: line height value.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: line height value

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_PLACEHOLDER: ArkUI_NodeAttributeType

Defines the default placeholder text for the multi-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: default placeholder text.

Format of the return value ArkUI_AttributeItem:

.string: default placeholder text.

Source

pub const NODE_TEXT_AREA_TEXT: ArkUI_NodeAttributeType

Defines the default text content for the multi-line text box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: default text content.

Format of the return value ArkUI_AttributeItem:

.string: default text content.

Source

pub const NODE_TEXT_AREA_MAX_LENGTH: ArkUI_NodeAttributeType

Defines the maximum number of characters in the text input. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: maximum number of characters in the text input.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: maximum number of characters in the text input.

Source

pub const NODE_TEXT_AREA_PLACEHOLDER_COLOR: ArkUI_NodeAttributeType

Defines the placeholder text color. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_TEXT_AREA_PLACEHOLDER_FONT: ArkUI_NodeAttributeType

Defines the placeholder text font. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.f32: font size, in fp. Optional. The default value is 16.0.

.value[1]?.i32: font style ArkUI_FontStyle. Optional. The default value is ARKUI_FONT_STYLE_NORMAL.

.value[2]?.i32: font weight ArkUI_FontWeight. Optional. The default value is ARKUI_FONT_WEIGHT_NORMAL.

?.string: font family. Multiple font families are separated by commas (,). For example, “font weight; font family 1, font family 2”.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: font size, in fp.

.value[1].i32: font style ArkUI_FontStyle.

.value[2].i32: font weight ArkUI_FontWeight.

.string: font family. Multiple font families are separated by commas (,).

Source

pub const NODE_TEXT_AREA_CARET_COLOR: ArkUI_NodeAttributeType

Defines the caret color attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color, in 0xARGB format.

Source

pub const NODE_TEXT_AREA_EDITING: ArkUI_NodeAttributeType

Defines the editable state for the multi-line text box. This attribute can be set as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.

Format of the ArkUI_AttributeItem parameter for obtaining the attribute: .value[0].i32: whether to remain in the editable state. The value true means to remain in the editable state, and false means to exit the editable state.

Source

pub const NODE_TEXT_AREA_TYPE: ArkUI_NodeAttributeType

Defines the text box type. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: text box type ArkUI_TextAreaType. The default value is ARKUI_TEXTAREA_TYPE_NORMAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: text box type ArkUI_TextAreaType.

Source

pub const NODE_TEXT_AREA_SHOW_COUNTER: ArkUI_NodeAttributeType

Defines the counter settings. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to show a character counter. The value true means to show a character counter.

.value[1]?.f32: threshold percentage for displaying the character counter. The character counter is displayed when the number of characters that have been entered is greater than the maximum number of characters multiplied by the threshold percentage value. The value range is 1 to 100. If the value is a decimal, it is rounded down.

.value[2]?.i32: whether to highlight the border when the number of entered characters reaches the maximum.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to show a character counter.

.value[1].f32: threshold percentage for displaying the character counter. The character counter is displayed when the number of characters that have been entered is greater than the maximum number of characters multiplied by the threshold percentage value. The value range is 1 to 100.

.value[2].i32: whether to highlight the border when the number of entered characters reaches the maximum. The default value is true.

Source

pub const NODE_TEXT_AREA_SELECTION_MENU_HIDDEN: ArkUI_NodeAttributeType

Sets whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or right-clicked.

Source

pub const NODE_TEXT_AREA_BLUR_ON_SUBMIT: ArkUI_NodeAttributeType

Sets whether the multi-line text box loses focus after the Enter key is pressed to submit information.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the text box loses focus.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the text box loses focus.

Source

pub const NODE_TEXT_AREA_INPUT_FILTER: ArkUI_NodeAttributeType

Sets the regular expression for input filtering. Only inputs that comply with the regular expression can be displayed. Other inputs are filtered out. The specified regular expression can match single characters, but not strings.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: regular expression.

Format of the return value ArkUI_AttributeItem:

.string: regular expression.

Source

pub const NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR: ArkUI_NodeAttributeType

Defines the background color of the selected text. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_TEXT_AREA_ENTER_KEY_TYPE: ArkUI_NodeAttributeType

Defines the type of the Enter key. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: type of the Enter keyArkUI_EnterKeyType. The default value is ARKUI_ENTER_KEY_TYPE_DONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: type of the Enter keyArkUI_EnterKeyType.

Source

pub const NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType

Defines whether to enable the input method when the component obtains focus. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the input method when the component obtains focus. The value true means to enable the input method, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to enable the input method when the component obtains focus, and 0 means the opposite.

Source

pub const NODE_TEXT_AREA_CARET_OFFSET: ArkUI_NodeAttributeType

Defines whether to enable the input method when the component obtains focus. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the input method when the component obtains focus. The value true means to enable the input method, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means to enable the input method when the component obtains focus, and 0 means the opposite.

Source

pub const NODE_TEXT_AREA_CONTENT_RECT: ArkUI_NodeAttributeType

Obtains the position of the edited text area relative to the component and its size.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: horizontal coordinate.

.value[1].f32: vertical coordinate.

.value[2].f32: content width.

.value[3].f32: content height.

Source

pub const NODE_TEXT_AREA_CONTENT_LINE_COUNT: ArkUI_NodeAttributeType

Obtains the number of lines of the edited text.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of lines of the edited text.

Source

pub const NODE_TEXT_AREA_TEXT_SELECTION: ArkUI_NodeAttributeType

Sets the text selection area, which will be highlighted. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: start position of the text selection.

.value[1].i32: end position of the text selection.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: start position of the text selection.

.value[1].i32: end position of the text selection.

Source

pub const NODE_TEXT_AREA_ENABLE_AUTO_FILL: ArkUI_NodeAttributeType

Sets whether to enable autofill.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable autofill. The default value is true.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable autofill.

Source

pub const NODE_TEXT_AREA_CONTENT_TYPE: ArkUI_NodeAttributeType

Sets the autofill type.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: autofill type. The parameter type is ArkUI_TextInputContentType.

Source

pub const NODE_TEXT_AREA_SHOW_KEYBOARD_ON_FOCUS: ArkUI_NodeAttributeType

Sets whether the keyboard pops up when the input box gains focus. It supports property setting, property reset and property acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.value[0].i32: Whether to pop up the keyboard.

Attribute acquisition method return value ArkUI_AttributeItem format:

.value[0].i32: Whether to pop up the keyboard.

Source

pub const NODE_TEXT_AREA_NUMBER_OF_LINES: ArkUI_NodeAttributeType

When this property is set, the height of the textArea component is calculated using this property.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: set the value of numberOfLines.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: Set the value of numberOfLines

Source

pub const NODE_TEXT_AREA_LETTER_SPACING: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the letter spacing of the TextArea component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: letter spacing. The default unit is fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: letter spacing. The default unit is fp.

Available since API-level: 15

Source

pub const NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets whether to enable preview text for the TextArea component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable preview tex.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable preview tex.

Available since API-level: 15

Source

pub const NODE_TEXT_AREA_HALF_LEADING: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Sets whether to center text vertically in the textArea component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to center text vertically. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to center text vertically.

Available since API-level: 18

Source

pub const NODE_TEXT_AREA_KEYBOARD_APPEARANCE: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Set the keyboard style of textArea

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:keyboard style,the parameter type is [ArkUI_KeyboardAppearanceType]。

Format of the return value ArkUI_AttributeItem

.value[0].i32:keyboard style,the parameter type is [ArkUI_KeyboardAppearanceType]。

Available since API-level: 15

Source

pub const NODE_TEXT_AREA_MAX_LINES: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set the max lines of the node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: max lines count.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: max lines count.

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_LINE_SPACING: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set line spacing of the node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: line spacing value.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: line spacing value.

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_MIN_LINES: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set the min lines of the node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: min lines count.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: min line count.

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_MAX_LINES_WITH_SCROLL: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set the max lines of the node with scroll. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: max lines count with scroll.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: max line count with scroll.

Available since API-level: 20

Source

pub const NODE_TEXT_AREA_LINE_HEIGHT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set the line height of the node. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: line height value.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: line height value

Available since API-level: 20

Source

pub const NODE_BUTTON_LABEL: ArkUI_NodeAttributeType

Defines the button text content. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: default text content.

Format of the return value ArkUI_AttributeItem:

.string: default text content.

Source

pub const NODE_BUTTON_TYPE: ArkUI_NodeAttributeType

Sets the button type. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: button type. The parameter type is ArkUI_ButtonType. The default value is ARKUI_BUTTON_TYPE_CAPSULE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: button type. The parameter type is ArkUI_ButtonType. The default value is ARKUI_BUTTON_TYPE_CAPSULE.

Source

pub const NODE_BUTTON_MIN_FONT_SCALE: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the minimum font scale attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum font scale, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum font scale, in fp.

Available since API-level: 18

Source

pub const NODE_BUTTON_MAX_FONT_SCALE: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the maximum font scale attribute, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum font scale, in fp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: maximum font scale, in fp.

Available since API-level: 18

Source

pub const NODE_PROGRESS_VALUE: ArkUI_NodeAttributeType

Defines the current value of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: current value of the progress indicator.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: current value of the progress indicator.

Source

pub const NODE_PROGRESS_TOTAL: ArkUI_NodeAttributeType

Defines the total value of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: total value of the progress indicator.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: total value of the progress indicator.

Source

pub const NODE_PROGRESS_COLOR: ArkUI_NodeAttributeType

Defines the color for the progress value on the progress indicator. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color value, in 0xARGB format.

Source

pub const NODE_PROGRESS_TYPE: ArkUI_NodeAttributeType

Defines the type of the progress indicator. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: type of the progress indicator ArkUI_ProgressType. The default value is ARKUI_PROGRESS_TYPE_LINEAR.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: type of the progress indicator ArkUI_ProgressType.

Source

pub const NODE_PROGRESS_LINEAR_STYLE: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the style of the linear progress indicator. This attribute can be set, reset, and obtained as required through APIs. If the progress indicator type is not linear, it will not take effect.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: Use the ArkUI_ProgressLinearStyleOption object to set the style.

Format of the return value ArkUI_AttributeItem:

.object: Use the ArkUI_ProgressLinearStyleOption object to get the style.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_SELECT: ArkUI_NodeAttributeType

Defines whether the check box is selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the check box is selected. The value 1 means that the check box is selected, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means that the check box is selected, and 0 means the opposite.

Source

pub const NODE_CHECKBOX_SELECT_COLOR: ArkUI_NodeAttributeType

Defines the color of the check box when it is selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the check box when it is selected, in 0xARGB format, for example, 0xFF1122FF.

Source

pub const NODE_CHECKBOX_UNSELECT_COLOR: ArkUI_NodeAttributeType

Defines the border color of the check box when it is not selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

Source

pub const NODE_CHECKBOX_MARK: ArkUI_NodeAttributeType

Defines the internal icon style of the check box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

.value[1]?.f32: size of the internal mark, in vp. Optional.

.value[2]?.f32: stroke width of the internal mark, in vp. Optional. The default value is 2.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

.value[1].f32: size of the internal mark, in vp.

.value[2].f32: stroke width of the internal mark, in vp. The default value is 2.

Source

pub const NODE_CHECKBOX_SHAPE: ArkUI_NodeAttributeType

Defines the shape of the check box. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.

Source

pub const NODE_CHECKBOX_NAME: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the name of the checkbox. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: component name.

Format of the return value ArkUI_AttributeItem:

.string: component name.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the name of the checkbox. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: component name.

Format of the return value ArkUI_AttributeItem:

.string: component name.

Available since API-level: 15

Source

pub const NODE_XCOMPONENT_ID: ArkUI_NodeAttributeType

Defines the ID of the component. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: component ID.

Format of the return value ArkUI_AttributeItem:

.string: component ID.

Source

pub const NODE_XCOMPONENT_TYPE: ArkUI_NodeAttributeType

Specifies the type of the XComponent component. This attribute is read-only.

The type of the XComponent component must be explicitly set during creation using [ARKUI_NODE_XCOMPONENT] or [ARKUI_NODE_XCOMPONENT_TEXTURE], and cannot be modified afterward.

Attempting to change the type through [setAttribute] will cause rendering exceptions.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: type ArkUI_XComponentType.

Source

pub const NODE_XCOMPONENT_SURFACE_SIZE: ArkUI_NodeAttributeType

Specifies the size of the XComponent component. This attribute is read-only.

Attempting to modify the size through [setAttribute] will have no effect.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: width, in px.

.value[1].u32: height, in px.

Source

pub const NODE_XCOMPONENT_SURFACE_RECT: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the rectangle information of surface created by the component. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The horizontal offset of the surface relative to XComponent, in pixels.

.value[1].i32: The vertical offset of the surface relative to XComponent, in pixels.

.value[2].i32: The width of the surface created by XComponent, in pixels.

.value[3].i32: The height of the surface created by XComponent, in pixels.

Format of the return value ArkUI_AttributeItem:

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The horizontal offset of the surface relative to XComponent, in pixels.

.value[1].i32: The vertical offset of the surface relative to XComponent, in pixels.

.value[2].i32: The width of the surface created by XComponent, in pixels.

.value[3].i32: The height of the surface created by XComponent, in pixels.

Available since API-level: 18

Source

pub const NODE_XCOMPONENT_ENABLE_ANALYZER: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines whether to enable the AI analyzer for the component. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

value[0].i32: The parameter type is 1 or 0.

Available since API-level: 18

Source

pub const NODE_DATE_PICKER_LUNAR: ArkUI_NodeAttributeType

Defines whether to display the lunar calendar in the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to display the lunar calendar in the date picker. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to display the lunar calendar in the date picker.

Source

pub const NODE_DATE_PICKER_START: ArkUI_NodeAttributeType

Defines the start date of the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: date. The default value is “1970-1-1”.

Format of the return value ArkUI_AttributeItem:

.string: date.

Source

pub const NODE_DATE_PICKER_END: ArkUI_NodeAttributeType

Defines the end date of the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: date. The default value is “2100-12-31”.

Format of the return value ArkUI_AttributeItem:

.string: date.

Source

pub const NODE_DATE_PICKER_SELECTED: ArkUI_NodeAttributeType

Defines the selected date of the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: date. The default value is “2024-01-22”.

Format of the return value ArkUI_AttributeItem:

.string: date.

Source

pub const NODE_DATE_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight for the top and bottom items in the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_DATE_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight of all items except the top, bottom, and selected items in the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_DATE_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight of the selected item in the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_DATE_PICKER_MODE: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the mode of the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32: the mode. The value is and enum of ArkUI_DatePickerMode. .

Format of the return value ArkUI_AttributeItem:

value[0].i32: the mode. The value is and enum of ArkUI_DatePickerMode. .

Available since API-level: 18

Source

pub const NODE_DATE_PICKER_ENABLE_HAPTIC_FEEDBACK: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines whether haptic feedback. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to feedback. The value true means to feedback, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

value[0].i32: whether to feedback.

Available since API-level: 18

Source

pub const NODE_DATE_PICKER_CAN_LOOP: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines whether to support scroll looping for the date picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to support scroll looping. The value true means to support scroll looping, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

value[0].i32: The value 1 means to support scroll looping, and 0 means the opposite.

Available since API-level: 20

Source

pub const NODE_TIME_PICKER_SELECTED: ArkUI_NodeAttributeType

Defines the time of the selected item. in the timer picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: time. The default value is the current system time.

Format of the return value ArkUI_AttributeItem:

.string: time.

Source

pub const NODE_TIME_PICKER_USE_MILITARY_TIME: ArkUI_NodeAttributeType

Defines whether the display time is in 24-hour format. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the display time is in 24-hour format. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the display time is in 24-hour format.

Source

pub const NODE_TIME_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight for the top and bottom items in the time picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TIME_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight of all items except the top, bottom, and selected items in the time picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TIME_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight of the selected item in the time picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TIME_PICKER_START: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the start time of the time picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: time. The default value is “00:00:00”.

Format of the return value ArkUI_AttributeItem:

.string: time. The default value is “00:00:00”.

Available since API-level: 18

Source

pub const NODE_TIME_PICKER_END: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the end time of the time picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: time. The default value is “23:59:59”.

Format of the return value ArkUI_AttributeItem:

.string: time. The default value is “23:59:59”.

Available since API-level: 18

Source

pub const NODE_TIME_PICKER_ENABLE_CASCADE: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines whether the AM/PM option is cascaded with the time in 12-hour mode. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable cascade. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable cascade.

Available since API-level: 18

Source

pub const NODE_TEXT_PICKER_OPTION_RANGE: ArkUI_NodeAttributeType

Defines the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: type of the text picker ArkUI_TextPickerRangeType. The default value is ARKUI_TEXTPICKER_RANGETYPE_SINGLE.

?.string: string input, whose format varies by picker type.

1: single-column picker. The input format is a group of strings separated by semicolons (;).

2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by semicolons (;), and strings within each pair are separated by commas (,).

?.object: Object input, whose format varies by picker type.

1: single-column picker with image support. The input structure is ARKUI_TextPickerRangeContent.

2: multi-column interconnected picker. The input structure is ARKUI_TextPickerCascadeRangeContent.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: type of the text picker ArkUI_TextPickerRangeType.

?.string: string output, whose format varies by picker type.

1: single-column picker. The output format is a group of strings separated by semicolons (;).

2: multi-column picker. Multiple pairs of plain text strings are supported. The pairs are separated by semicolons (;), and strings within each pair are separated by commas (,).

?.string: Object output, whose format varies by picker type.

1: single-column picker with image support. The output structure is ARKUI_TextPickerRangeContent.

2: multi-column interconnected picker. The output structure is ARKUI_TextPickerCascadeRangeContent.

Source

pub const NODE_TEXT_PICKER_OPTION_SELECTED: ArkUI_NodeAttributeType

Defines the index of the default selected item in the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: index. If there are multiple index values, add them one by one.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: index. If there are multiple index values, add them one by one.

Source

pub const NODE_TEXT_PICKER_OPTION_VALUE: ArkUI_NodeAttributeType

Defines the value of the default selected item in the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: value of the selected item. If there are multiple values, add them one by one and separate them with semicolons (;).

Format of the return value ArkUI_AttributeItem:

.string: value of the selected item. If there are multiple values, add them one by one and separate them with semicolons (;).

Source

pub const NODE_TEXT_PICKER_DISAPPEAR_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight for the top and bottom items in the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TEXT_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight for all items except the top, bottom, and selected items in the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TEXT_PICKER_SELECTED_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight for the selected item in the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Format of the return value ArkUI_AttributeItem:

.string: array of five parameters of the string type, separated by semicolons (;).

Parameter 1: font color, in #ARGB format.

Parameter 2: font size, in fp. The value is a number.

Parameter 3: font weight. Available options are (“bold”, “normal”, “bolder”, “lighter”, “medium”, “regular”). . Parameter 4: fonts, separated by commas (,).

Parameter 5: font style. Available options are (“normal”, “italic”).

Example: “#ff182431;14;normal;Arial,HarmonyOS Sans;normal”.

Source

pub const NODE_TEXT_PICKER_SELECTED_INDEX: ArkUI_NodeAttributeType

Defines the index of the default selected item in the data selection range of the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0…].i32: index of the default item in the data selection range.

Source

pub const NODE_TEXT_PICKER_CAN_LOOP: ArkUI_NodeAttributeType

Defines whether to support scroll looping for the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to support scroll looping. The value true means to support scroll looping, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

value[0].i32: The value 1 means to support scroll looping, and 0 means the opposite.

Source

pub const NODE_TEXT_PICKER_DEFAULT_PICKER_ITEM_HEIGHT: ArkUI_NodeAttributeType

Defines the height of each item in the picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: item height, in vp.

Format of the return value ArkUI_AttributeItem:

value[0].f32: item height, in vp.

Source

pub const NODE_TEXT_PICKER_ENABLE_HAPTIC_FEEDBACK: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines whether haptic feedback. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to feedback. The value true means to feedback, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

value[0].i32: whether to feedback.

Available since API-level: 18

Source

pub const NODE_TEXT_PICKER_SELECTED_BACKGROUND_STYLE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the background color and border radius of the selected items. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.

1: .value[1].f32: radius of the four corners.

2: .value[1].f32: radius of the upper left corner.

.value[2].f32: radius of the upper right corner.

.value[3].f32: radius of the lower left corner.

.value[4].f32: radius of the lower right corner.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF. * .value[1].f32: radius of the upper left corner.

.value[2].f32: radius of the upper right corner.

.value[3].f32: radius of the lower left corner.

.value[4].f32: radius of the lower right corner.

Available since API-level: 20

Source

pub const NODE_CALENDAR_PICKER_HINT_RADIUS: ArkUI_NodeAttributeType

Defines the style of the background in the selected state of the calendar picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: style of the background in the selected state of the calendar picker. The value range is [0, +∞). If the value is 0, the background is a rectangle with square corners. If the value is in the 0–16 range, the background is a rectangle with rounded corners. If the value is equal to or greater than 16, the background is a circle.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: style of the background in the selected state of the calendar picker. The value range is [0, +∞). If the value is 0, the background is a rectangle with square corners. If the value is in the 0–16 range, the background is a rectangle with rounded corners. If the value is equal to or greater than 16, the background is a circle.

Source

pub const NODE_CALENDAR_PICKER_SELECTED_DATE: ArkUI_NodeAttributeType

Defines the date of the selected item in the calendar picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: year of the selected date.

.value[1].u32: month of the selected date.

.value[2].u32: day of the selected date.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: year of the selected date.

.value[1].u32: month of the selected date.

.value[2].u32: day of the selected date.

Source

pub const NODE_CALENDAR_PICKER_EDGE_ALIGNMENT: ArkUI_NodeAttributeType

Defines how the calendar picker is aligned with the entry component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode. The parameter type is ArkUI_CalendarAlignment.

.value[1]?.f32: offset of the picker relative to the entry component along the x-axis after alignment based on the specified alignment mode.

.value[2]?.f32: offset of the picker relative to the entry component along the y-axis after alignment based on the specified alignment mode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode. The parameter type is ArkUI_CalendarAlignment.

.value[1]?.f32: offset of the picker relative to the entry component along the x-axis after alignment based on the specified alignment mode.

.value[2]?.f32: offset of the picker relative to the entry component along the y-axis after alignment based on the specified alignment mode.

Source

pub const NODE_CALENDAR_PICKER_TEXT_STYLE: ArkUI_NodeAttributeType

Defines the font color, font size, and font weight in the entry area of the calendar picker.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.u32: font color of the entry area.

.value[1]?.f32: font size of the entry area, in fp.

.value[2]?.i32: font weight of the entry area. The parameter type is ArkUI_FontWeight.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: font color of the entry area.

.value[1].f32: font size of the entry area, in fp.

.value[2].i32: font weight of the entry area. The parameter type is ArkUI_FontWeight.

Source

pub const NODE_CALENDAR_PICKER_START: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the start date of the calendar picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: date. The value like “1970-1-1”.

Format of the return value ArkUI_AttributeItem:

.string: date.

Available since API-level: 18

Source

pub const NODE_CALENDAR_PICKER_END: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the end date of the calendar picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: date. The value like “2100-12-31”.

Format of the return value ArkUI_AttributeItem:

.string: date.

Available since API-level: 18

Source

pub const NODE_SLIDER_BLOCK_COLOR: ArkUI_NodeAttributeType

Defines the color of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the slider, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the slider, in 0xARGB format, for example, 0xFF1122FF.

Source

pub const NODE_SLIDER_TRACK_COLOR: ArkUI_NodeAttributeType

Defines the background color of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: background color, in 0xARGB format, for example, 0xFF1122FF.

Source

pub const NODE_SLIDER_SELECTED_COLOR: ArkUI_NodeAttributeType

Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the selected part of the slider track, in 0xARGB format, for example, 0xFF1122FF.

Source

pub const NODE_SLIDER_SHOW_STEPS: ArkUI_NodeAttributeType

Sets whether to display the stepping value. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to display the stepping value. The value 1 means to display the stepping value, and 0 (default value) means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to display the stepping value. The value 1 means to display the stepping value, and 0 (default value) means the opposite.

Source

pub const NODE_SLIDER_BLOCK_STYLE: ArkUI_NodeAttributeType

Defines the slider shape, which can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: shape. The parameter type is ArkUI_SliderBlockStyle.

.string?: depending on the shape. Optional.

ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider. Example: /pages/common/icon.png.

ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider.

There are five types:

  1. Rectangle:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_RECTANGLE for the rectangle shape.

.value[2].f32: width of the rectangle.

.value[3].f32: height of the rectangle.

.value[4].f32: width of the rounded corner of the rectangle.

.value[5].f32: height of the rounded corner of the rectangle.

  1. Circle:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_CIRCLE for the circle shape.

.value[2].f32: width of the circle.

.value[3].f32: height of the circle.

3.Ellipse:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_ELLIPSE for the ellipse shape.

.value[2].f32: width of the ellipse.

.value[3].f32: height of the ellipse;

  1. Path:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_PATH for the path shape.

.value[2].f32: width of the path.

.value[3].f32: height of the path.

.string: command for drawing the path.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: shape. The parameter type is ArkUI_SliderBlockStyle.

.string?: depending on the shape. Optional.

ARKUI_SLIDER_BLOCK_STYLE_IMAGE: image resource of the slider. Example: /pages/common/icon.png.

ARKUI_SLIDER_BLOCK_STYLE_SHAPE: custom shape of the slider.

There are five types:

  1. Rectangle:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_RECTANGLE for the rectangle shape.

.value[2].f32: width of the rectangle.

.value[3].f32: height of the rectangle.

.value[4].f32: width of the rounded corner of the rectangle.

.value[5].f32: height of the rounded corner of the rectangle.

  1. Circle:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_CIRCLE for the circle shape.

.value[2].f32: width of the circle.

.value[3].f32: height of the circle.

3.Ellipse:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_ELLIPSE for the ellipse shape.

.value[2].f32: width of the ellipse.

.value[3].f32: height of the ellipse;

  1. Path:

.value[1].i32: type of shape. The parameter type is ArkUI_ShapeType. The value is ARKUI_SHAPE_TYPE_PATH for the path shape.

.value[2].f32: width of the path.

.value[3].f32: height of the path.

.string: command for drawing the path.

Source

pub const NODE_SLIDER_VALUE: ArkUI_NodeAttributeType

Defines the current value of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: current value.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: current value.

Source

pub const NODE_SLIDER_MIN_VALUE: ArkUI_NodeAttributeType

Defines the minimum value of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum value.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum value.

Source

pub const NODE_SLIDER_MAX_VALUE: ArkUI_NodeAttributeType

Defines the maximum value of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum value.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: maximum value.

Source

pub const NODE_SLIDER_STEP: ArkUI_NodeAttributeType

Defines the step of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: step. The value range is [0.01, 100].

Format of the return value ArkUI_AttributeItem:

.value[0].f32: step. The value range is [0.01, 100].

Source

pub const NODE_SLIDER_DIRECTION: ArkUI_NodeAttributeType

Defines whether the slider moves horizontally or vertically. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the slider moves horizontally or vertically. The parameter type is ArkUI_SliderDirection.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the slider moves horizontally or vertically.

Source

pub const NODE_SLIDER_REVERSE: ArkUI_NodeAttributeType

Defines whether the slider values are reversed. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the slider values are reversed. The value 1 means that the slider values are reversed, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the slider values are reversed. The value 1 means that the slider values are reversed, and 0 means the opposite.

Source

pub const NODE_SLIDER_STYLE: ArkUI_NodeAttributeType

Defines the style of the slider thumb and track. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: style of the slider thumb and track. The parameter type is ArkUI_SliderStyle.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: style of the slider thumb and track. The parameter type is ArkUI_SliderStyle.

Source

pub const NODE_SLIDER_TRACK_THICKNESS: ArkUI_NodeAttributeType

Sets the track thickness of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: track thickness of the slider, in vp. The default value is 4.0 vp when NODE_SLIDER_STYLE is set to ARKUI_SLIDER_STYLE_OUT_SET and 20.0 vp when NODE_SLIDER_STYLE is set to ARKUI_SLIDER_STYLE_IN_SET.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: track thickness of the slider, in vp.

Source

pub const NODE_SLIDER_ENABLE_HAPTIC_FEEDBACK: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines whether haptic feedback. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to feedback. The value true means to feedback, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

value[0].i32: whether to feedback.

When enabling haptic feedback, you need to add “ohos.permission.VIBRATE” in the requestPermissions field of the module.json5 file to enable vibration permission.

Available since API-level: 18

Source

pub const NODE_SLIDER_PREFIX: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets a custom component on the leading side of the Slider component.

Attribute setting method ArkUI_AttributeItem parameter format:

.object: Parameter type ArkUI_NodeHandle.

The prefix component will be placed at the start position of the Slider, typically on the left side in LTR layouts.

Available since API-level: 20

Source

pub const NODE_SLIDER_SUFFIX: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets a custom component on the trailing side of the Slider component.

Attribute setting method [link] parameter format:

.object: Parameter type ArkUI_NodeHandle.

The suffix component will be placed at the end position of the Slider, typically on the right side in LTR layouts.

Available since API-level: 20

Source

pub const NODE_SLIDER_BLOCK_LINEAR_GRADIENT_COLOR: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the color of the slider block. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Available since API-level: 21

Source

pub const NODE_SLIDER_TRACK_LINEAR_GRADIENT_COLOR: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the background color of the slider. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Available since API-level: 21

Source

pub const NODE_SLIDER_SELECTED_LINEAR_GRADIENT_COLOR: ArkUI_NodeAttributeType

Available on crate feature api-21 only.

Defines the color of the selected part of the slider track. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Format of the return value ArkUI_AttributeItem:

.object: array of color stops, each of which consists of a color and its stop position. The parameter type is ArkUI_ColorStop. Invalid colors are automatically skipped.

colors: colors of the color stops.

stops: stop positions of the color stops.

size: number of colors.

Available since API-level: 21

Source

pub const NODE_RADIO_CHECKED: ArkUI_NodeAttributeType

Set the selection status of an option button. Attribute setting, attribute resetting, and attribute obtaining are supported. Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: check status of an option button. The default value is false. Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: selection status of an option button.

Source

pub const NODE_RADIO_STYLE: ArkUI_NodeAttributeType

Set the styles of the selected and deselected states of the option button. The attribute setting, attribute resetting, and attribute obtaining are supported. Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0]?. u32: color of the mother board in enabled state.

The type is 0xARGB, and the default value is 0xFF007DFF.

.value[1]?. u32: stroke color in the close state. The type is 0xARGB,

and the default value is 0xFF182431.

.value[2]?. u32: color of the internal round pie in the enabled state.

The type is 0xARGB, and the default value is 0xFFFFFFFF.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0]. u32: color of the mother board in enabled state.

The type is 0xARGB, and the default value is 0xFF007DFF.

.value[1]. u32: stroke color in the close state. The type is 0xARGB,

and the default value is 0xFF182431.

.value[2]. u32: color of the internal round pie in the enabled state.

The type is 0xARGB, and the default value is 0xFFFFFFF.

Source

pub const NODE_RADIO_VALUE: ArkUI_NodeAttributeType

Sets the value of the current radio. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.string: radio value.

Format of the return value ArkUI_AttributeItem:

.string: radio value.

Source

pub const NODE_RADIO_GROUP: ArkUI_NodeAttributeType

Set the group name of the current Radio group, only one radio of the same group can be selected. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.string: name of the group to which the current option box belongs.

Format of the return value ArkUI_AttributeItem:

.string: name of the group to which the current option box belongs.

Source

pub const NODE_IMAGE_ANIMATOR_IMAGES: ArkUI_NodeAttributeType

Set the image frames for the image animator. Dynamic updates is not supported. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.size: number of the images.

.object: array of the images, the type is ArkUI_ImageAnimatorFrameInfo array.

Attribute obtaining method return value ArkUI_AttributeItem format:

.size: number of the images.

.object: array of the images, the type is ArkUI_ImageAnimatorFrameInfo array.

Source

pub const NODE_IMAGE_ANIMATOR_STATE: ArkUI_NodeAttributeType

Set the playback status of the animation for the image animator. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the playback status of the animation, the type is ArkUI_AnimationStatus, and the default value is ARKUI_ANIMATION_STATUS_INITIAL.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: the playback status of the animation, the type is ArkUI_AnimationStatus.

Source

pub const NODE_IMAGE_ANIMATOR_DURATION: ArkUI_NodeAttributeType

Set the playback duration for the image animator. When the duration is 0, no image is played. The value change takes effect only at the beginning of the next cycle. When a separate duration is set in images, the setting of this attribute is invalid. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the playback duration, the unit is ms and the default value is 1000.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: the playback duration, the unit is ms.

Source

pub const NODE_IMAGE_ANIMATOR_REVERSE: ArkUI_NodeAttributeType

Set the playback direction for the image animator. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the playback direction. 0 indicates that images are played from the first one to the last one, and 1 indicates that images are played from the last one to the first one.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: the playback direction. 0 indicates that images are played from the first one to the last one, and 1 indicates that images are played from the last one to the first one.

Source

pub const NODE_IMAGE_ANIMATOR_FIXED_SIZE: ArkUI_NodeAttributeType

Set whether the image size is the same as the component size. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: whether the image size is the same as the component size. 1 indicates the image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid. 0 indicates the image size is customized. The width, height, top, and left attributes of each image must be set separately.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: whether the image size is the same as the component size. 1 indicates the image size is the same as the component size. 0 indicates the image size is customized.

Source

pub const NODE_IMAGE_ANIMATOR_FILL_MODE: ArkUI_NodeAttributeType

Set the status before and after execution of the animation in the current playback direction. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the status before and after execution of the animation in the current playback direction, the type is {ArkUI_AnimationFillMode} and the default value is ARKUI_ANIMATION_FILL_MODE_FORWARDS.

Attribute obtaining method return value ArkUI_AttributeItem format:

.value[0].i32: the status before and after execution of the animation in the current playback direction, the type is {ArkUI_AnimationFillMode}.

Source

pub const NODE_IMAGE_ANIMATOR_ITERATION: ArkUI_NodeAttributeType

Set the number of times that the animation is played. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the number of times that the animation is played.

Attribute setting method ArkUI_AttributeItem Parameter format:

.value[0].i32: the number of times that the animation is played.

Source

pub const NODE_CHECKBOX_GROUP_NAME: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the name of the checkboxgroup. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: component name.

Format of the return value ArkUI_AttributeItem:

.string: component name.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP_SELECT_ALL: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines whether the checkboxgroup is selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the checkboxgroup is selected. The value 1 means that the checkboxgroup is selected, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The value 1 means that the checkboxgroup is selected, and 0 means the opposite.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP_SELECTED_COLOR: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the color of the checkboxgroup when it is selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the checkboxgroup when it is selected, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the checkboxgroup when it is selected, in 0xARGB format, for example, 0xFF1122FF.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP_UNSELECTED_COLOR: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the border color of the checkboxgroup when it is not selected. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP_MARK: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the internal icon style of the checkboxgroup. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

.value[1]?.f32: size of the internal mark, in vp. Optional.

.value[2]?.f32: stroke width of the internal mark, in vp. Optional. The default value is 2.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: border color, in 0xARGB format, for example, 0xFF1122FF.

.value[1].f32: size of the internal mark, in vp.

.value[2].f32: stroke width of the internal mark, in vp. The default value is 2.

Available since API-level: 15

Source

pub const NODE_CHECKBOX_GROUP_SHAPE: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the shape of the checkboxgroup. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: component shape. The parameter type is ArkUI_CheckboxShape.

Available since API-level: 15

Source

pub const NODE_STACK_ALIGN_CONTENT: ArkUI_NodeAttributeType

Defines the alignment mode of the child components in the container. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode. The data type is ArkUI_Alignment. The default value is ARKUI_ALIGNMENT_CENTER.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode. The data type is ArkUI_Alignment.

Source

pub const NODE_SCROLL_BAR_DISPLAY_MODE: ArkUI_NodeAttributeType

Defines the scrollbar status. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: scrollbar status. The parameter type is ArkUI_ScrollBarDisplayMode. The default value is ARKUI_SCROLL_BAR_DISPLAY_MODE_AUTO.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: scrollbar status. The parameter type is ArkUI_ScrollBarDisplayMode.

Source

pub const NODE_SCROLL_BAR_WIDTH: ArkUI_NodeAttributeType

Defines the width of the scrollbar. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: width of the scrollbar, in vp. The default value is 4.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: width of the scrollbar, in vp.

Source

pub const NODE_SCROLL_BAR_COLOR: ArkUI_NodeAttributeType

Defines the color of the scrollbar. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.data[0].u32: color of the scrollbar, in 0xARGB format.

Format of the return value ArkUI_AttributeItem:

.data[0].u32: color of the scrollbar, in 0xARGB format.

Source

pub const NODE_SCROLL_SCROLL_DIRECTION: ArkUI_NodeAttributeType

Defines the scroll direction. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: scroll direction. The parameter type is ArkUI_ScrollDirection. The default value is ARKUI_SCROLL_DIRECTION_VERTICAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: scroll direction. The parameter type is ArkUI_ScrollDirection.

Source

pub const NODE_SCROLL_EDGE_EFFECT: ArkUI_NodeAttributeType

Defines the effect used at the edges of the component when the boundary of the scrollable content is reached. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect. The default value is ARKUI_EDGE_EFFECT_NONE.

.value[1]?.i32: whether to enable the scroll effect when the component content size is smaller than the component itself. Optional. The value 1 means to enable the scroll effect, and 0 means the opposite. The default value for the List/Grid/WaterFlow component is 0, and the default value for the Scroll component is 1.

.value[2]?.i32: direction in which the effect takes effect. The parameter type is ArkUI_EffectEdge. The default value is ARKUI_EFFECT_EDGE_START | ARKUI_EFFECT_EDGE_END. This parameter is supported since API version 16.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: effect used at the edges of the component when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.

.value[1].i32: whether to enable the scroll effect when the component content size is smaller than the component itself. Optional. The value 1 means to enable the scroll effect, and 0 means the opposite.

.value[2].i32: edge for which the effect takes effect when the boundary of the scrollable content is reached. The parameter type is ArkUI_EffectEdge. This parameter is supported since API version 16.

Source

pub const NODE_SCROLL_ENABLE_SCROLL_INTERACTION: ArkUI_NodeAttributeType

Defines whether to support scroll gestures. When this attribute is set to false, scrolling by finger or mouse is not supported, but the scroll controller API is not affected.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to support scroll gestures. The default value is true.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to support scroll gestures.

Source

pub const NODE_SCROLL_FRICTION: ArkUI_NodeAttributeType

Defines the friction coefficient. It applies only to gestures in the scrolling area, and it affects only indirectly the scroll chaining during the inertial scrolling process.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: friction coefficient. The default value is 0.6 for non-wearable devices and 0.9 for wearable devices.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: friction coefficient.

Source

pub const NODE_SCROLL_SNAP: ArkUI_NodeAttributeType

Defines the scroll snapping mode. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode for the scroll snap position. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.

.value[1].i32: whether to enable the snap to start feature. When scroll snapping is defined for the component, setting this attribute to false enables the component to scroll between the start edge and the first snap point. The default value is true. It is valid only when there are multiple snap points.

.value[2].i32: Whether to enable the snap to end feature. When scroll snapping is defined for the component, setting this attribute to false enables the component to scroll between the end edge and the last snap point. The default value is true. It is valid only when there are multiple snap points.

.value[3…].f32: snap points for the component. Each snap point defines the offset from an edge to which the component can scroll.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode for the scroll snap position. The parameter type is ArkUI_ScrollSnapAlign.

.value[1].i32: whether to enable the snap to start feature. When scroll snapping is defined for the component, setting this attribute to false enables the component to scroll between the start edge and the first snap point.

.value[2].i32: Whether to enable the snap to end feature. When scroll snapping is defined for the component, setting this attribute to false enables the component to scroll between the end edge and the last snap point.

.value[3…].f32: snap points for the component. Each snap point defines the offset from an edge to which the component can scroll.

Source

pub const NODE_SCROLL_NESTED_SCROLL: ArkUI_NodeAttributeType

Defines the nested scrolling options. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: nested scrolling option when the component scrolls forward. The parameter type is ArkUI_ScrollNestedMode.

.value[1].i32: nested scrolling option when the component scrolls backward. The parameter type is ArkUI_ScrollNestedMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: nested scrolling option when the component scrolls forward. The parameter type is ArkUI_ScrollNestedMode.

.value[1].i32: nested scrolling option when the component scrolls backward. The parameter type is ArkUI_ScrollNestedMode.

Source

pub const NODE_SCROLL_OFFSET: ArkUI_NodeAttributeType

Defines the specified position to scroll to. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: horizontal scrolling offset, in vp.

.value[1].f32: vertical scrolling offset, in vp.

.value[2]?.i32: scrolling duration, in milliseconds. Optional.

.value[3]?.i32: scrolling curve. Optional. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_EASE.

.value[4]?.i32: whether to enable the default spring animation. Optional. The default value 0 means not to enable the default spring animation.

.value[5]?.i32: whether to convert the scroll animation to an overshoot animation when the boundary is reached. Optional.

.value[6]?.i32: whether the component can stop at an overscrolled position. This parameter is supported since API version 20.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: horizontal scrolling offset, in vp.

.value[1].f32: vertical scrolling offset, in vp.

Source

pub const NODE_SCROLL_EDGE: ArkUI_NodeAttributeType

Defines the edge position to scroll to. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: edge position to scroll to. The parameter type is ArkUI_ScrollEdge.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the container at the edge position. The value -1 means that the container is not at the edge position. If the container is at the edge position, the parameter type is ArkUI_ScrollEdge.

Source

pub const NODE_SCROLL_ENABLE_PAGING: ArkUI_NodeAttributeType

Defines whether to enable the swipe-to-turn-pages feature. This attribute can be set, reset, and obtained as required through APIs.

If both enablePaging and scrollSnap are set, scrollSnap takes effect, but enablePaging does not.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the swipe-to-turn-pages feature. The default value is false.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable the swipe-to-turn-pages feature.

Source

pub const NODE_SCROLL_PAGE: ArkUI_NodeAttributeType

Scroll to the next or previous page.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32 Indicates whether to scroll to next page. Value 0 indicates scroll to next page and value 1 indicates scroll to previous page.

.value[1]?.i32 Indicates whether to enable animation. Value 1 indicates enable and 0 indicates disable.

Source

pub const NODE_SCROLL_BY: ArkUI_NodeAttributeType

Scroll a specified distance.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32:Horizontal scrolling distance in vp;

.value[1].f32: Vertical scrolling distance in vp;

Source

pub const NODE_SCROLL_FLING: ArkUI_NodeAttributeType

Available on crate feature api-13 only.

Performs inertial scrolling based on the initial velocity passed in.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: Initial velocity of inertial scrolling. Unit: vp/s. If the value specified is 0, it is considered as invalid, and the scrolling for this instance will not take effect. If the value is positive, the scroll will move downward; if the value is negative, the scroll will move upward.

Available since API-level: 13

Source

pub const NODE_SCROLL_FADING_EDGE: ArkUI_NodeAttributeType

Available on crate feature api-14 only.

Sets the fading effect for the edges of scrollable components.

Format of the ArkUI_AttributeItem parameter for setting the attribute: .value[0].i32: whether to enable the fading effect on edges. The value 0 means to disable the fading effect, and 1 means to enable it. .value[1]?.f32: length of the fading effect on edges, in vp. Default value: 32.

Format of the return value ArkUI_AttributeItem: .value[0].i32: whether the fading effect on edges is enabled. The value 0 means that the fading effect is disabled, and 1 means that it is enabled. .value[1].f32: length of the fading effect on edges, in vp.

Available since API-level: 14

Source

pub const NODE_SCROLL_SIZE: ArkUI_NodeAttributeType

Available on crate feature api-14 only.

Obtains the total size of all child components when fully expanded in the scrollable component.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: total width of all child components when fully expanded in the scrollable component. The default unit is vp.

.value[1].f32: total height of all child components when fully expanded in the scrollable component. The default unit is vp.

When NODE_PADDING, NODE_MARGIN, or NODE_BORDER_WIDTH is set, the values are rounded to the nearest pixel when being converted from vp to px. The returned values are calculated based on these rounded pixel values.

Available since API-level: 14

Source

pub const NODE_SCROLL_CONTENT_START_OFFSET: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the offset from the start of the scrollable components content.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: offset from the start of the content, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: offset from the start of the content, in vp.

Available since API-level: 15

Source

pub const NODE_SCROLL_CONTENT_END_OFFSET: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the offset from the end of the scrollable components content.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: offset from the end of the content, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: offset from the end of the content, in vp.

Available since API-level: 15

Source

pub const NODE_SCROLL_FLING_SPEED_LIMIT: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the maximum starting fling speed of the scrollable when the fling animation starts. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum starting fling speed, Unit: vp/s

Format of the return value ArkUI_AttributeItem:

.value[0].f32: maximum starting fling speed, Unit: vp/s

Available since API-level: 18

Source

pub const NODE_SCROLL_CLIP_CONTENT: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the clip mode of the scrollable. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: clip content mode, The parameter type is ArkUI_ContentClipMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: clip content mode, The parameter type is ArkUI_ContentClipMode.

Available since API-level: 18

Source

pub const NODE_SCROLL_BACK_TO_TOP: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines whether the scrollable scrolls back to top when status bar is clicked. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the scrollable scrolls back to top when status bar is clicked. The value 1 means to scroll back to top, and 0 means the opposite. The default value is 0/b>.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the scrollable scrolls back to top when status bar is clicked.

Available since API-level: 15

Source

pub const NODE_SCROLL_BAR_MARGIN: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the margin of the scrollbar. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: start margin of the scrollbar, in vp. The default value is 0.

.value[1].f32: end margin of the scrollbar, in vp. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: start margin of the scrollbar, in vp.

.value[1].f32: end margin of the scrollbar, in vp.

Available since API-level: 20

Source

pub const NODE_SCROLL_MAX_ZOOM_SCALE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets the maximum zoom scale for scrollable content.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum zoom scale to set.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: current maximum zoom scale.

Available since API-level: 20

Source

pub const NODE_SCROLL_MIN_ZOOM_SCALE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets the minimum zoom scale for scrollable content.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum zoom scale to set.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: current minimum zoom scale.

Available since API-level: 20

Source

pub const NODE_SCROLL_ZOOM_SCALE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets the zoom scale for scrollable content.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: zoom scale to set.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: current zoom scale.

Available since API-level: 20

Source

pub const NODE_SCROLL_ENABLE_BOUNCES_ZOOM: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets whether to enable the zoom bounce effect when the scaling exceeds the limits.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the zoom bounce effect when the scaling exceeds the limits. The value 1 means to enable the effect, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable the zoom bounce effect when the scaling exceeds the limits. The value 1 means to enable the effect, and 0 means the opposite.

Available since API-level: 20

Source

pub const NODE_LIST_DIRECTION: ArkUI_NodeAttributeType

Sets the direction in which the list items are arranged. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: direction in which the list items are arranged. The parameter type is ArkUI_Axis. The default value is ARKUI_AXIS_VERTICAL.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: direction in which the list items are arranged. The parameter type is ArkUI_Axis.

Source

pub const NODE_LIST_STICKY: ArkUI_NodeAttributeType

Defines whether to pin the header to the top or the footer to the bottom in the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to pin the header to the top or the footer to the bottom in the component. It is used together with the component. The parameter type is ArkUI_StickyStyle. The default value is ARKUI_STICKY_STYLE_NONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to pin the header to the top or the footer to the bottom in the component. It is used together with the component. The parameter type is ArkUI_StickyStyle.

Source

pub const NODE_LIST_SPACE: ArkUI_NodeAttributeType

Defines the spacing between list items. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: spacing between list items along the main axis. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: spacing between list items along the main axis.

Source

pub const NODE_LIST_NODE_ADAPTER: ArkUI_NodeAttributeType

Defines the list adapter. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeAdapter object as the adapter.

Source

pub const NODE_LIST_CACHED_COUNT: ArkUI_NodeAttributeType

Sets the number of cached items in the list adapter. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: number of cached items in the list adapter.

.value[1]?.i32: whether to show cached items. The value 0 means to hide cached items, and 0 means to show cached items. The default value is 0. This parameter is supported since API version 15.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of cached items in the list adapter.

.value[1].i32: whether to show cached items. The value 0 means to hide cached items, and 0 means to show cached items. This parameter is supported since API version 15.

Source

pub const NODE_LIST_SCROLL_TO_INDEX: ArkUI_NodeAttributeType

Scroll to the specified index.

When activating the smooth animation, all items passed through will be loaded and layout calculated, which can lead to performance issues when loading a large number of items.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:The index value of the target element to be slid to in the current container.

.value[1]?.i32:Set whether there is an action when sliding to the index value of a list item in the list, where 1 indicates an action and 0 indicates no action. Default value: 0。

.value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is ArkUI_ScrollAlignment, default value is ARKUI_SCROLL_ALIGNMENT_START.

.value[3]?.f32: extra offset, in vp. The default value is 0. This parameter is supported since API version 15.

Source

pub const NODE_LIST_ALIGN_LIST_ITEM: ArkUI_NodeAttributeType

Sets the alignment mode of list items along the cross axis when the cross-axis width of the list is greater than the cross-axis width of list items multiplied by the value of lanes. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlignment.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode of list items along the cross axis. The parameter type is ArkUI_ListItemAlignment.

Source

pub const NODE_LIST_CHILDREN_MAIN_SIZE: ArkUI_NodeAttributeType

Set the default spindle size for the List subcomponent.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The parameter format is [ArkUI-ListChildrenMainSize]

Format of the return value ArkUI_AttributeItem:

.object: The parameter format is [ArkUI-ListChildrenMainSize]

Source

pub const NODE_LIST_INITIAL_INDEX: ArkUI_NodeAttributeType

Set the index value of the item displayed at the start of the viewport when the current List is first loaded.This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: index value of the item displayed at the start of the viewport when the current List is loaded for the first time. Default value: 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: index value of the item displayed at the start of the viewport when the current List is loaded for the first time. Default value: 0.

Source

pub const NODE_LIST_DIVIDER: ArkUI_NodeAttributeType

sets the ListItem splitter style. By default, there is no splitter. This attribute can be set, reset, and obtained as required through APIs.

Attribute setting method parameter ArkUI_AttributeItem Format:

.value[0].u32: divider color, type 0xargb;

.value[1].f32: dividing line width;

.value[2].f32: the distance between the divider and the beginning of the side of the list, unit vp;

.value[3].f32: the distance between the divider and the end of the side of the list (unit: vp).

Attribute fetch method return value ArkUI_AttributeItem format:

.value[0].u32: divider color, type 0xargb;

.value[1].f32: dividing line width;

.value[2].f32: the distance between the divider and the beginning of the side of the list, unit vp;

.value[3].f32: the distance between the divider and the end of the side of the list (unit: vp).

Source

pub const NODE_LIST_SCROLL_TO_INDEX_IN_GROUP: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Scrolls to the item with the specified index in the specified list item group.

When smooth is set to true, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: index of the target list item group in the current list.

.value[1].i32: index of the target list item in the list item group.

.value[2]?.i32: whether to enable the smooth animation for scrolling to the item with the specified index. The value 1 means to enable the animation, and 0 means the opposite. The default value is 0.

.value[3]?.i32: how the item to scroll to is aligned with the container. The parameter type is ArkUI_ScrollAlignment. The default value is ARKUI_SCROLL_ALIGNMENT_START.

Available since API-level: 15

Source

pub const NODE_LIST_LANES: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the number of lanes in the list. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: number of lanes in the list. If the maximum and minimum lane widths are set, setting the number of lanes will not take effect.

.value[1]?.f32: minimum lane width, in vp.

.value[2]?.f32: maximum column width, in vp.

.value[3]?.f32: lane spacing, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: number of lanes in the list.

.value[1].f32: minimum lane width, in vp.

.value[2].f32: maximum column width, in vp.

.value[3].f32: lane spacing, in vp.

Available since API-level: 15

Source

pub const NODE_LIST_SCROLL_SNAP_ALIGN: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the list snap alignment mode.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: alignment mode for the list snap position. The parameter type is ArkUI_ScrollSnapAlign. The default value is ARKUI_SCROLL_SNAP_ALIGN_NONE.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: alignment mode for the list snap position. The parameter type is ArkUI_ScrollSnapAlign.

Available since API-level: 15

Source

pub const NODE_LIST_MAINTAIN_VISIBLE_CONTENT_POSITION: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the List component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the List component. The value 0 means not to maintain the visible content’s position, and 1 means the opposite. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the List component. The value 0 means not to maintain the visible content’s position, and 1 means the opposite. The default value is 0.

Available since API-level: 15

Source

pub const NODE_LIST_STACK_FROM_END: ArkUI_NodeAttributeType

Available on crate feature api-19 only.

Sets whether the List component starts layout from the end.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the List component starts layout from the end. The value 0 means layout starts from the top, and 1 means layout starts from the end. The default value is 0.

Available since API-level: 19

Source

pub const NODE_LIST_FOCUS_WRAP_MODE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the focus wrap mode for the List component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: focus wrap mode of the List component. The parameter type is ArkUI_FocusWrapMode.

Available since API-level: 20

Source

pub const NODE_LIST_SYNC_LOAD: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines whether the List component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the List component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the List component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Available since API-level: 20

Source

pub const NODE_SWIPER_LOOP: ArkUI_NodeAttributeType

Defines whether to enable loop playback for the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable loop playback. The value 1 means to enable loop playback, and 0 means the opposite. The default value is 1/b>.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable loop playback. The value 1 means to enable loop playback, and 0 means the opposite. The default value is 1.

Source

pub const NODE_SWIPER_AUTO_PLAY: ArkUI_NodeAttributeType

Defines whether to enable automatic playback for child component switching in the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable automatic playback for child component switching. The value 1 means to enable automatic playback, and 0 means the opposite. The default value is 0.

.value[1]?.i32: whether to stop automatic playback when the user touches the screen. The value 1 means to stop automatic playback, and 0 means the opposite. The default value is 1. This parameter is supported since API version 16.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable automatic playback for child component switching. The value 1 means to enable automatic playback, and 0 means the opposite. The default value is 0.

.value[1].i32: whether to stop automatic playback when the user touches the screen. The value 1 means to stop automatic playback, and 0 means the opposite. This parameter is supported since API version 16.

Source

pub const NODE_SWIPER_SHOW_INDICATOR: ArkUI_NodeAttributeType

Defines whether to enable the navigation point indicator for the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to enable the navigation point indicator. The value 1 means to enable the navigation point indicator, and 0 means the opposite. The default value is 1.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to enable the navigation point indicator. The value 1 means to enable the navigation point indicator, and 0 means the opposite. The default value is 1.

Source

pub const NODE_SWIPER_INTERVAL: ArkUI_NodeAttributeType

Defines the interval for automatic playback. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: interval for automatic playback, in milliseconds.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: interval for automatic playback, in milliseconds.

Source

pub const NODE_SWIPER_VERTICAL: ArkUI_NodeAttributeType

Defines whether vertical swiping is used for the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether vertical swiping is used. The value 1 means that vertical swiping is used, and 0 means the opposite. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether vertical swiping is used. The value 1 means that vertical swiping is used, and 0 means the opposite. The default value is 0.

Source

pub const NODE_SWIPER_DURATION: ArkUI_NodeAttributeType

Defines the duration of the animation for switching child components. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: duration of the animation for switching child components, in milliseconds. The default value is 400.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: duration of the animation for switching child components, in milliseconds. The default value is 400.

Source

pub const NODE_SWIPER_CURVE: ArkUI_NodeAttributeType

Defines the animation curve for the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: animation curve. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_LINEAR.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: animation curve. The parameter type is ArkUI_AnimationCurve. The default value is ARKUI_CURVE_LINEAR.

Source

pub const NODE_SWIPER_ITEM_SPACE: ArkUI_NodeAttributeType

Defines the spacing between child components in the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: spacing between child components.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: spacing between child components.

Source

pub const NODE_SWIPER_INDEX: ArkUI_NodeAttributeType

Defines the index of the child component currently displayed in the swiper. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: index value of the child component.

.value[1]?.i32: animation mode, the parameter type is ArkUI_SwiperAnimationMode.

The default value is ARKUI_SWIPER_NO_ANIMATION. This parameter is valid only for the current call.

This parameter is supported since API version 15.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: index value of the child component.

Source

pub const NODE_SWIPER_DISPLAY_COUNT: ArkUI_NodeAttributeType

Defines the number of elements to display per page. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: number of elements to display per page.

.value[1]?.i32: whether to turn pages by group. The value 0 means to turn pages by child element, and 1 means to turn pages by group. This parameter is supported since API version 19.

.string?: this parameter can only be set to ‘auto’. When ‘auto’ is set, the value[] parameters are ignored. This parameter is supported since API version 19.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of elements to display per page.

.value[1].i32: whether to turn pages by group. This parameter is supported since API version 19.

.string: ‘auto’ or empty string.

Source

pub const NODE_SWIPER_DISABLE_SWIPE: ArkUI_NodeAttributeType

Defines whether to disable the swipe feature. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to disable the swipe feature. The value 1 means to disable the swipe feature, and 0 means the opposite. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to disable the swipe feature. The value 1 means to disable the swipe feature, and 0 means the opposite. The default value is 0.

Source

pub const NODE_SWIPER_SHOW_DISPLAY_ARROW: ArkUI_NodeAttributeType

Defines whether to show the arrow when the mouse pointer hovers over the navigation point indicator. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. The parameter type is ArkUI_SwiperArrow.

The default value is ARKUI_SWIPER_ARROW_HIDE.

.?object: arrow style. The parameter type is ArkUI_SwiperArrowStyle.

This parameter is supported since API version 19.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to show the arrow when the mouse pointer hovers over the navigation point indicator. The parameter type is ArkUI_SwiperArrow.

The default value is ARKUI_SWIPER_ARROW_HIDE.

.object: arrow style. The parameter type is ArkUI_SwiperArrowStyle.

This parameter is supported since API version 19.

Source

pub const NODE_SWIPER_EDGE_EFFECT_MODE: ArkUI_NodeAttributeType

Defines the effect used at the edges of the swiper when the boundary of the scrollable content is reached. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: effect used at the edges of the swiper when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.

The default value is ARKUI_EDGE_EFFECT_SPRING.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: effect used at the edges of the swiper when the boundary of the scrollable content is reached. The parameter type is ArkUI_EdgeEffect.

Source

pub const NODE_SWIPER_NODE_ADAPTER: ArkUI_NodeAttributeType

Defines the swiper adapter. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeAdapter object as the adapter.

Source

pub const NODE_SWIPER_CACHED_COUNT: ArkUI_NodeAttributeType

Sets the number of cached items in the swiper adapter. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: number of cached items in the swiper adapter.

.value[1]?.i32: whether the cached items will be displayed.

The value 0 indicates that cached items will not be displayed,

and 1 indicates that cached nodes will be displayed. The default value is 0.

This parameter is supported from API version 19.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of cached items in the swiper adapter.

.value[1].i32: whether the cached items will be displayed. This parameter is supported from API version 19.

Source

pub const NODE_SWIPER_PREV_MARGIN: ArkUI_NodeAttributeType

Defines the front margin of the wiper. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: the front margin. The unit is vp. The default value is 0.0

.value[1]?.i32: whether to ignore blanks, the default value is 0. The value 1 means to ignore blank areas, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: the front margin, the unit is vp.

.value[1].i32: whether to ignore blank areas. The value 1 means to ignore blank areas, and 0 means the opposite.

Source

pub const NODE_SWIPER_NEXT_MARGIN: ArkUI_NodeAttributeType

Defines the back margin of the wiper. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: the back margin. The unit is vp. The default value is 0.0

.value[1]?.i32: whether to ignore blanks, the default value is 0. The value 1 means to ignore blank areas, and 0 means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: the back margin, the unit is vp.

.value[1].i32: whether to ignore blank areas. The value 1 means to ignore blank areas, and 0 means the opposite.

Source

pub const NODE_SWIPER_INDICATOR: ArkUI_NodeAttributeType

Defines the navigation indicator type of the swiper. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: navigation indicator type, the parameter type is ArkUI_SwiperIndicatorType.

.object: The parameter type is ArkUI_SwiperIndicator when the indicator type

is ARKUI_SWIPER_INDICATOR_TYPE_DOT. The parameter type is ArkUI_SwiperDigitIndicator when the indicator type is ARKUI_SWIPER_INDICATOR_TYPE_DIGIT.

ArkUI_SwiperDigitIndicator is supported since API version 19.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: navigation indicator type, the parameter type is ArkUI_SwiperIndicatorType.

.object: The parameter type is ArkUI_SwiperIndicator when the indicator type

is ARKUI_SWIPER_INDICATOR_TYPE_DOT. The parameter type is ArkUI_SwiperDigitIndicator when the indicator type is ARKUI_SWIPER_INDICATOR_TYPE_DIGIT.

ArkUI_SwiperDigitIndicator is supported since API version 19.

Source

pub const NODE_SWIPER_NESTED_SCROLL: ArkUI_NodeAttributeType

Set the nested scrolling mode for the Swiper component and parent component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is ArkUI_SwiperNestedScrollMode

The default value is ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY

Format of the return value ArkUI_AttributeItem:

.value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is ArkUI_SwiperNestedScrollMode

Source

pub const NODE_SWIPER_SWIPE_TO_INDEX: ArkUI_NodeAttributeType

Set the switcher component to flip to the specified page.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:Specify the index value of the page in Swiper.

.value[1]?.i32:Set whether there is an animation effect when flipping to the specified page. 1 indicates active effect, 0 indicates no active effect, default value is 0。

Source

pub const NODE_SWIPER_INDICATOR_INTERACTIVE: ArkUI_NodeAttributeType

Set to disable component navigation point interaction function。

Property setting method parameter [ArkUI-AttributeItem] format:

.value[0].i32:Set to disable the interaction function of component navigation points. When set to true, it indicates that the navigation points are interactive. The default value is true.

The return value of the attribute acquisition method is in the format of [ArkUI-AttributeItem]:

.value[0].i32:Set to disable component navigation point interaction.

Source

pub const NODE_SWIPER_PAGE_FLIP_MODE: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Sets the page flipping mode using the mouse wheel.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: page flipping mode using the mouse wheel. The parameter type is ArkUI_PageFlipMode.

Format of the return value ArkUI_PageFlipMode:

.value[0].i32: page flipping mode using the mouse wheel.

Available since API-level: 15

Source

pub const NODE_SWIPER_AUTO_FILL: ArkUI_NodeAttributeType

Available on crate feature api-19 only.

Defines the minimum main axis size of child element for swiper to works out the display count. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum main axis size of the child element, Unit: vp.

.value[1]?.i32: whether to turn pages by group. The value 0 means to turn pages by child element, and 1 means to turn pages by group. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum main axis size of the child element, Unit: vp.

.value[1].i32: whether to turn pages by group.

Available since API-level: 19

Source

pub const NODE_SWIPER_MAINTAIN_VISIBLE_CONTENT_POSITION: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the Swiper component.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the Swiper component. The value 0 means not to maintain the visible content’s position, and 1 means the opposite. The default value is 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to maintain the visible content’s position when data is inserted or deleted outside the display area of the Swiper component. The value 0 means not to maintain the visible content’s position, and 1 means the opposite. The default value is 0.

Available since API-level: 20

Source

pub const NODE_LIST_ITEM_SWIPE_ACTION: ArkUI_NodeAttributeType

Set the delineation component of the ListItem, supporting property settings, property resets, and property acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.object: Construct using the [ArkUI_ListitemSwipeActionOption] object.

The return value of the attribute acquisition method ArkUI_AttributeItem format:

.object: Construct using the [ArkUI_ListitemSwipeActionOption] object.

Source

pub const NODE_LIST_ITEM_GROUP_SET_HEADER: ArkUI_NodeAttributeType

Defines the header of the list item group. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeHandle object to be used as the header of the list item group.

Format of the return value ArkUI_AttributeItem:

.object: ArkUI_NodeHandle object to be used as the header of the list item group.

Defines the footer of the list item group. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeHandle object to be used as the footer of the list item group.

Format of the return value ArkUI_AttributeItem:

.object: ArkUI_NodeHandle object to be used as the footer of the list item group.

Source

pub const NODE_LIST_ITEM_GROUP_SET_DIVIDER: ArkUI_NodeAttributeType

Defines the style of the divider for the list items. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].u32: color of the divider, in 0xARGB format.

.value[1].f32: stroke width of the divider, in vp.

.value[2].f32: distance between the divider and the start of the list, in vp.

.value[3].f32: distance between the divider and the end of the list, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].u32: color of the divider, in 0xARGB format.

.value[1].f32: stroke width of the divider, in vp.

.value[2].f32: distance between the divider and the start of the list, in vp.

.value[3].f32: distance between the divider and the end of the list, in vp.

Source

pub const NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE: ArkUI_NodeAttributeType

Set the default spindle size for the ListItem Group subcomponent.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The parameter format is [ArkUI-ListChildrenMainSize]

Format of the return value ArkUI_AttributeItem:

.object: The parameter format is [ArkUI-ListChildrenMainSize]

Source

pub const NODE_LIST_ITEM_GROUP_NODE_ADAPTER: ArkUI_NodeAttributeType

Available on crate feature api-15 only.

Defines the list item group adapter. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeAdapter object as the adapter.

Format of the return value ArkUI_AttributeItem:

.object: ArkUI_NodeAdapter object.

Available since API-level: 15

Source

pub const NODE_COLUMN_ALIGN_ITEMS: ArkUI_NodeAttributeType

Defines the horizontal alignment mode of child components in the column. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_HorizontalAlignment.

Default value: ARKUI_HORIZONTAL_ALIGNMENT_CENTER.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_HorizontalAlignment.

Source

pub const NODE_COLUMN_JUSTIFY_CONTENT: ArkUI_NodeAttributeType

Defines the vertical alignment mode of child components in the column. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_FlexAlignment.

Default value: ARKUI_FLEX_ALIGNMENT_START.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_FlexAlignment.

Source

pub const NODE_ROW_ALIGN_ITEMS: ArkUI_NodeAttributeType

Defines the vertical alignment mode of child components in the row. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_VerticalAlignment.

Default value: ARKUI_VERTICAL_ALIGNMENT_CENTER.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: vertical alignment mode of child components. The parameter type is ArkUI_VerticalAlignment.

Source

pub const NODE_ROW_JUSTIFY_CONTENT: ArkUI_NodeAttributeType

Defines the horizontal alignment mode of child components in the row. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_FlexAlignment.

Default value: ARKUI_FLEX_ALIGNMENT_START.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: horizontal alignment mode of child components. The parameter type is ArkUI_FlexAlignment.

Source

pub const NODE_FLEX_OPTION: ArkUI_NodeAttributeType

Defines the flex attribute. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0]?.i32: direction in which flex items are arranged. The parameter type is ArkUI_FlexDirection. The default value is ARKUI_FLEX_DIRECTION_ROW.

.value[1]?.i32: how the flex items are wrapped. The parameter type is ArkUI_FlexWrap. The default value is ARKUI_FLEX_WRAP_NO_WRAP.

.value[2]?.i32: alignment mode along the main axis. The parameter type is ArkUI_FlexAlignment. The default value is ARKUI_FLEX_ALIGNMENT_START.

.value[3]?.i32: alignment mode along the cross axis. The parameter type is ArkUI_ItemAlignment. The default value is ARKUI_ITEM_ALIGNMENT_START.

.value[4]?.i32: alignment mode along the cross axis for multi-line content. The parameter type is ArkUI_FlexAlignment. The default value is ARKUI_FLEX_ALIGNMENT_START.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: direction in which flex items are arranged.

.value[1].i32: how the flex items are wrapped.

.value[2].i32: alignment mode along the main axis.

.value[3].i32: alignment mode along the cross axis.

.value[4].i32: alignment mode along the cross axis for multi-line content.

Source

pub const NODE_REFRESH_REFRESHING: ArkUI_NodeAttributeType

Sets whether the component is being refreshed. This attribute can be set and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: The parameter type is 1 or 0.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: The parameter type is 1 or 0.

Source

pub const NODE_REFRESH_CONTENT: ArkUI_NodeAttributeType

Sets the custom content in the pull-down area. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The parameter type is ArkUI_NodeHandle.

Source

pub const NODE_REFRESH_PULL_DOWN_RATIO: ArkUI_NodeAttributeType

Set the pull-down hand coefficient. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.

Format of the return value ArkUI_AttributeItem:

.value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.

Source

pub const NODE_REFRESH_OFFSET: ArkUI_NodeAttributeType

Sets the pull-down offset that initiates a refresh. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: pull-down offset, in vp. The default value is 64vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: pull-down offset, in vp. The default value is 64vp.

Source

pub const NODE_REFRESH_PULL_TO_REFRESH: ArkUI_NodeAttributeType

Sets whether to initiate a refresh when the pull-down distance exceeds the value of refreshOffset. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether to initiate a refresh. The value true means to initiate a refresh, and false means the opposite.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether to initiate a refresh. The value 1 means to initiate a refresh, and 0 means the opposite.

Source

pub const NODE_REFRESH_MAX_PULL_DOWN_DISTANCE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Sets the maximum pull-down distance for refreshing. This attribute can be set, reset, and obtained through the API as required.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: maximum pull-down distance, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: maximum pull-down distance, in vp.

Available since API-level: 20

Source

pub const NODE_WATER_FLOW_LAYOUT_DIRECTION: ArkUI_NodeAttributeType

Defines the main axis direction of the component layout. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: main axis direction. The parameter type is ArkUI_FlexDirection.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: main axis direction. The parameter type is ArkUI_FlexDirection.

Source

pub const NODE_WATER_FLOW_COLUMN_TEMPLATE: ArkUI_NodeAttributeType

Sets the number of columns in the water flow layout. If this parameter is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, ‘1fr 1fr 2fr’ indicates three columns, with the first column taking up 1/4 of the parent component’s full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate(‘repeat(auto-fill,track-size)’) to automatically calculate the number of columns based on the specified column width track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: number of columns in the layout.

Format of the return value ArkUI_AttributeItem:

.string: number of columns in the layout.

Source

pub const NODE_WATER_FLOW_ROW_TEMPLATE: ArkUI_NodeAttributeType

Sets the number of rows in the water flow layout. If this parameter is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, ‘1fr 1fr 2fr’ indicates three rows, with the first row taking up 1/4 of the parent component’s full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate(‘repeat(auto-fill,track-size)’) to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: number of rows in the layout.

Format of the return value ArkUI_AttributeItem:

.string: number of rows in the layout.

Source

pub const NODE_WATER_FLOW_COLUMN_GAP: ArkUI_NodeAttributeType

Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: gap between columns, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: gap between columns, in vp.

Source

pub const NODE_WATER_FLOW_ROW_GAP: ArkUI_NodeAttributeType

Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: gap between lines, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: gap between lines, in vp.

Source

pub const NODE_WATER_FLOW_SECTION_OPTION: ArkUI_NodeAttributeType

Defines the water flow section configuration. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: An index calculated from 0 is converted to an integer, indicating that you want to start changing the position of the group. .object: ArkUI_WaterFlowSectionOption object.

Format of the return value ArkUI_AttributeItem:

.object: ArkUI_WaterFlowSectionOption object.

Source

pub const NODE_WATER_FLOW_NODE_ADAPTER: ArkUI_NodeAttributeType

Defines the water flow adapter. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeAdapter object as the adapter.

Source

pub const NODE_WATER_FLOW_CACHED_COUNT: ArkUI_NodeAttributeType

Sets the number of cached items in the water flow adapter. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32:number of cached items in the water flow adapter.

.value[1]?.i32:whether to the cached items will be displayed, 0: not displayed, 1: displayed, default value: 0. This parameter is supported since API version 16.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: number of cached items in the water flow adapter.

.value[1].i32: whether to the cached items will be displayed, 0: not displayed, 1: displayed, default value: 0. This parameter is supported since API version 16.

Set the custom display component at the end of the waterfall flow component.

Attribute setting method ArkUI_AttributeItem parameter format:

.object: Parameter type ArkUI_NodeHandle.

Source

pub const NODE_WATER_FLOW_SCROLL_TO_INDEX: ArkUI_NodeAttributeType

Scroll to the specified index.

When activating the smooth animation, all items passed through will be loaded and layout calculated, which can lead to performance issues when loading a large number of items.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32:The index value of the target element to be slid to in the current container.

.value[1]?.i32:Set whether there is an action when sliding to the index value of a list item in the list, where 1 indicates an action and 0 indicates no action. Default value is 0。

.value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is ArkUI_ScrollAlignment. Default value is ARKUI_SCROLL_ALIGNMENT_START

Source

pub const NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE: ArkUI_NodeAttributeType

Defines the size constraints to apply to water flow items. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: minimum width, in vp.

.value[1].f32: maximum width, in vp.

.value[2].f32: minimum height, in vp.

.value[3].f32: maximum height, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: minimum width, in vp.

.value[1].f32: maximum width, in vp.

.value[2].f32: minimum height, in vp.

.value[3].f32: maximum height, in vp.

Source

pub const NODE_WATER_FLOW_LAYOUT_MODE: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the layout mode of the component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: waterflow layout mode. The parameter type is ArkUI_WaterFlowLayoutMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: waterflow layout mode. The parameter type is ArkUI_WaterFlowLayoutMode.

Available since API-level: 18

Source

pub const NODE_WATER_FLOW_SYNC_LOAD: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines whether the WaterFlow component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the WaterFlow component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the WaterFlow component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Available since API-level: 20

Source

pub const NODE_RELATIVE_CONTAINER_GUIDE_LINE: ArkUI_NodeAttributeType

Set the auxiliary line in the RelativeContaine container, supporting property setting, property reset and property acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.object: Auxiliary lines within the RelativeContaine container:

Attribute acquisition method return value ArkUI_AttributeItem format:

.object: Auxiliary lines within the RelativeContaine container:

Source

pub const NODE_RELATIVE_CONTAINER_BARRIER: ArkUI_NodeAttributeType

Sets the barrier within the RelativeContaine container and supports property setting, property reset and property acquisition interfaces.

Attribute setting method parameter ArkUI_AttributeItem format:

.object: Auxiliary lines within the RelativeContaine container:

Attribute acquisition method return value ArkUI_AttributeItem format:

.object: Barrier within the RelativeContaine container:

Source

pub const NODE_GRID_COLUMN_TEMPLATE: ArkUI_NodeAttributeType

Sets the number of columns in the grid layout. If this parameter is not set, one column is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, ‘1fr 1fr 2fr’ indicates three columns, with the first column taking up 1/4 of the parent component’s full width, the second column 1/4, and the third column 2/4. You can use columnsTemplate(‘repeat(auto-fill,track-size)’) to automatically calculate the number of columns based on the specified column width track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: number of columns in the layout.

Format of the return value ArkUI_AttributeItem:

.string: number of columns in the layout.

Source

pub const NODE_GRID_ROW_TEMPLATE: ArkUI_NodeAttributeType

Sets the number of rows in the grid layout. If this parameter is not set, one row is used by default. This attribute can be set, reset, and obtained as required through APIs. For example, ‘1fr 1fr 2fr’ indicates three rows, with the first row taking up 1/4 of the parent component’s full height, the second row 1/4, and the third row 2/4. You can use rowsTemplate(‘repeat(auto-fill,track-size)’) to automatically calculate the number of rows based on the specified row height track-size. repeat and auto-fill are keywords. The units for track-size can be px, vp (default), %, or a valid number.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: number of rows in the layout.

Format of the return value ArkUI_AttributeItem:

.string: number of rows in the layout.

Source

pub const NODE_GRID_COLUMN_GAP: ArkUI_NodeAttributeType

Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: gap between columns, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: gap between columns, in vp.

Source

pub const NODE_GRID_ROW_GAP: ArkUI_NodeAttributeType

Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: gap between lines, in vp.

Format of the return value ArkUI_AttributeItem:

.value[0].f32: gap between lines, in vp.

Source

pub const NODE_GRID_NODE_ADAPTER: ArkUI_NodeAttributeType

Defines the grid adapter. The attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: ArkUI_NodeAdapter object as the adapter.

Source

pub const NODE_GRID_CACHED_COUNT: ArkUI_NodeAttributeType

Sets the number of cached items in the grid adapter. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: number of cached items in the grid adapter.

Source

pub const NODE_GRID_FOCUS_WRAP_MODE: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the focus wrap mode for the Grid component. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: focus wrap mode of the Grid component. The parameter type is ArkUI_FocusWrapMode.

Available since API-level: 20

Source

pub const NODE_GRID_SYNC_LOAD: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines whether the Grid component loads child nodes synchronously. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].i32: whether the Grid component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Format of the return value ArkUI_AttributeItem:

.value[0].i32: whether the Grid component synchronously loads child nodes. The value 0 means loading by frames, and 1 means synchronous loading.

Available since API-level: 20

Source

pub const NODE_TEXT_PICKER_COLUMN_WIDTHS: ArkUI_NodeAttributeType

Available on crate feature api-18 only.

Defines the column width of the text picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.value[0].f32: percentage of total width. The default value is that all colulmns are equal width.

.value[1]?.f32: percentage of total width. The default value is that all colulmns are equal width.

.value[2]?.f32: percentage of total width. The default value is that all colulmns are equal width.

.value[n]?.f32: percentage of total width. The default value is that all colulmns are equal width.

Format of the return value ArkUI_AttributeItem:

value[0].f32: percentage of total width.

value[1].f32: percentage of total width.

value[2].f32: percentage of total width.

value[n].f32: percentage of total width.

Available since API-level: 18

Source

pub const NODE_CALENDAR_PICKER_DISABLED_DATE_RANGE: ArkUI_NodeAttributeType

Available on crate feature api-19 only.

Defines the disabled date range of the calendar picker. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.string: A string of dates. The 1st start date,1st end date,2nd start date,2nd end date, …,nth start date,nth end date of the disabled date range.

Example: 1910-01-01,1910-12-31,2020-01-01,2020-12-31

Format of the return value ArkUI_AttributeItem:

.string: A string of dates.

Available since API-level: 19

Source

pub const NODE_CALENDAR_PICKER_MARK_TODAY: ArkUI_NodeAttributeType

Available on crate feature api-19 only.

Defines whether the calendar picker marks today. This attribute can be set, reset, and obtained as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

value[0].i32: whether the calendar picker marks today. The default value is false.

Format of the return value ArkUI_AttributeItem:

value[0].i32: whether the calendar picker marks today.

Available since API-level: 19

Source

pub const NODE_EMBEDDED_COMPONENT_WANT: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Defines the want used to start EmbeddedAbility. This attribute can be set as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The want of EmbeddedComponent, with parameter type AbilityBase_Want. The default value is nullptr.

Available since API-level: 20

Source

pub const NODE_EMBEDDED_COMPONENT_OPTION: ArkUI_NodeAttributeType

Available on crate feature api-20 only.

Set onError and onTerminated callbacks for EMBEDDED_COMPONENT. This attribute can be set as required through APIs.

Format of the ArkUI_AttributeItem parameter for setting the attribute:

.object: The option for EmbeddedComponent, with parameter type ArkUI_EmbeddedComponentOption.

Available since API-level: 20

Trait Implementations§

Source§

impl Clone for ArkUI_NodeAttributeType

Source§

fn clone(&self) -> ArkUI_NodeAttributeType

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ArkUI_NodeAttributeType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ArkUI_NodeAttributeType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ArkUI_NodeAttributeType

Source§

fn eq(&self, other: &ArkUI_NodeAttributeType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ArkUI_NodeAttributeType

Source§

impl Eq for ArkUI_NodeAttributeType

Source§

impl StructuralPartialEq for ArkUI_NodeAttributeType

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.