From 90bbb71d1573a31e577bb426c99e3f5b4c347736 Mon Sep 17 00:00:00 2001 From: yyuanche Date: Mon, 29 Apr 2024 22:38:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90NDK=E3=80=915toD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4=20Signed-off-by:=20yyuanch?= =?UTF-8?q?e=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/libace.ndk.json | 296 ++++ arkui/ace_engine/native/native_gesture.h | 10 + arkui/ace_engine/native/native_node.h | 1376 ++++++++++++++++- arkui/ace_engine/native/native_type.h | 992 +++++++++++- arkui/ace_engine/native/ui_input_event.h | 57 + .../native_window/external_window.h | 10 + .../native_window/libnative_window.ndk.json | 3 +- 7 files changed, 2675 insertions(+), 69 deletions(-) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index a7c27f13b..02d2b2818 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -211,6 +211,22 @@ "first_introduced": "12", "name": "OH_ArkUI_PinchGesture_GetCenterY" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GestureInterruptInfo_GetSystemFlag" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GestureInterruptInfo_GetRecognizer" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GestureInterruptInfo_GetGestureEvent" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType" + }, { "first_introduced": "12", "name": "OH_NativeXComponent_SetNeedSoftKeyboard" @@ -575,6 +591,10 @@ "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_Dispose" }, + { + "first_introduced": "12", + "name": "OH_ArkUI_WaterFlowSectionOption_SetSize" + }, { "first_introduced": "12", "name": "OH_ArkUI_WaterFlowSectionOption_SetItemCount" @@ -714,5 +734,281 @@ { "first_introduced": "12", "name": "OH_NativeXComponent_GetNativeXComponent" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_MouseEvent_GetMouseButton" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_MouseEvent_GetMouseAction" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_SetId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_SetDirection" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_SetPositionStart" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_SetPositionEnd" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_GetId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_GetDirection" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_GetPositionStart" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_GuidelineOption_GetPositionEnd" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_SetId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_SetDirection" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_SetReferencedId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_GetId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_GetDirection" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_GetReferencedId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_BarrierOption_GetReferencedIdSize" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetStart" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetEnd" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetMiddle" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetTop" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetBottom" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetCenter" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_SetBiasVertical" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetStartId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetStartAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetEndId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetEndAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetMiddleId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetMiddleAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetTopId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetTopAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetBottomId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetBottomAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterId" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetCenterAlign" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_AlignmentRuleOption_GetBiasVertical" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_Create" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_Dispose" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetStartPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetStartPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetTopPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetTopPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetEndPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetEndPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetBottomPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetBottomPosition" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetItemWidth" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetItemWidth" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetItemHeight" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetItemHeight" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetSelectedItemHeight" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetSelectedItemHeight" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetSelectedItemWidth" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetSelectedItemWidth" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetMask" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetMask" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetColor" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetColor" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_SetSelectedColor" + }, + { + "first_introduced": "12", + "name": "OH_ArkUI_SwiperIndicator_GetSelectedColor" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index bff895d70..aa62a0f75 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -250,6 +250,16 @@ ArkUI_GestureRecognizer* OH_ArkUI_GestureInterruptInfo_GetRecognizer(const ArkUI */ ArkUI_GestureEvent* OH_ArkUI_GestureInterruptInfo_GetGestureEvent(const ArkUI_GestureInterruptInfo* event); +/** +* @brief Obtains the type of the system gesture to trigger. +* +* @param event Indicates the pointer to the gesture interruption information. +* @return Returns the type of the system gesture to trigger. If the gesture to trigger is not a system gesture, +* -1 is returned. +* @since 12 +*/ +int32_t OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType(const ArkUI_GestureInterruptInfo* event); + /** * @brief Obtains the gesture event type. * diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c1fc53bc0..9cc986bc4 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -87,6 +87,8 @@ typedef enum { ARKUI_NODE_CALENDAR_PICKER = 16, /** Slider. */ ARKUI_NODE_SLIDER = 17, + /** Radio */ + ARKUI_NODE_RADIO = 18, /** Stack container. */ ARKUI_NODE_STACK = MAX_NODE_SCOPE_NUM, /** Swiper. */ @@ -111,6 +113,12 @@ typedef enum { ARKUI_NODE_WATER_FLOW, /** Water flow item. */ ARKUI_NODE_FLOW_ITEM, + /** Relative layout component. */ + ARKUI_NODE_RELATIVE_CONTAINER, + /** Grid. */ + ARKUI_NODE_GRID, + /** Grid item. */ + ARKUI_NODE_GRID_ITEM, } ArkUI_NodeType; /** @@ -174,11 +182,13 @@ typedef enum { * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .string: image address;\n * .value[0]?.i32: whether to repeat the image. Optional. The parameter type is {@link ArkUI_ImageRepeat}. + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n * The default value is ARKUI_IMAGE_REPEAT_NONE.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: image address;\n * .value[0].i32: whether to repeat the image. The parameter type is {@link ArkUI_ImageRepeat}.\n + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}.\n * */ NODE_BACKGROUND_IMAGE, @@ -307,7 +317,7 @@ typedef enum { * @brief Sets the saturation attribute, which can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute: \n - * .value[0].f32: saturation value. The default value is 1.0, and the recommended value range is [0, FLT_MAX]. \n + * .value[0].f32: saturation value. The default value is 1.0, and the recommended value range is [0, 50). \n * \n * Format of the return value {@link ArkUI_AttributeItem}: \n * .value[0].f32: saturation value. \n @@ -553,10 +563,10 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .data[0...15].f32: 16 floating-point numbers. \n + * .value[0...15].f32: 16 floating-point numbers. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n - * .data[0...15].f32: 16 floating-point numbers. \n + * .value[0...15].f32: 16 floating-point numbers. \n * */ NODE_TRANSFORM, @@ -1195,50 +1205,10 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0]?.i32: ID of the component that functions as the anchor point for left alignment. \n - * .value[1]?.i32: alignment mode relative to the anchor component for left alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[2]?.i32: ID of the component that functions as the anchor point for center alignment. \n - * .value[3]?.i32: alignment mode relative to the anchor component for center alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[4]?.i32: ID of the component that functions as the anchor point for right alignment. \n - * .value[5]?.i32: alignment mode relative to the anchor component for right alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[6]?.i32: ID of the component that functions as the anchor point for top alignment. \n - * .value[7]?.i32: alignment mode relative to the anchor component for top alignment. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[8]?.i32: ID of the component that functions as the anchor point for center alignment in the - * vertical direction. \n - * .value[9]?.i32: alignment mode relative to the anchor component forcenter alignment in the vertical direction. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[10]?.i32: ID of the component that functions as the anchor point for bottom alignment. \n - * .value[11]?.i32: alignment mode relative to the anchor component for bottom alignment. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[12]?.f32: bias value in the horizontal direction. \n - * .value[13]?.f32: bias value in the vertical direction. \n - * \n - * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].i32: ID of the component that functions as the anchor point for left alignment. \n - * .value[1].i32: alignment mode relative to the anchor component for left alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[2].i32: ID of the component that functions as the anchor point for center alignment. \n - * .value[3].i32: alignment mode relative to the anchor component for center alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[4].i32: ID of the component that functions as the anchor point for right alignment. \n - * .value[5].i32: alignment mode relative to the anchor component for right alignment. - * The value is an enum of {@link ArkUI_HorizontalAlignment}. \n - * .value[6].i32: ID of the component that functions as the anchor point for top alignment. \n - * .value[7].i32: alignment mode relative to the anchor component for top alignment. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[8].i32: ID of the component that functions as the anchor point for center alignment in the - * vertical direction. \n - * .value[9].i32: alignment mode relative to the anchor component forcenter alignment in the vertical direction. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[10].i32: ID of the component that functions as the anchor point for bottom alignment. \n - * .value[11].i32: alignment mode relative to the anchor component for bottom alignment. - * The value is an enum of {@link ArkUI_VerticalAlignment}. \n - * .value[12].f32: bias value in the horizontal direction. \n - * .value[13].f32: bias value in the vertical direction. \n + * .object: Use the {@link ArkUI_AlignmentRuleOption} object as the component’s alignment rule. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object: Use the {@link ArkUI_AlignmentRuleOption} object as the component’s alignment rule. \n * */ NODE_ALIGN_RULES, @@ -1247,12 +1217,12 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].f32: alignment mode of the child components along the cross axis of the parent container.\n - * The parameter type is {@link ArkUI_ItemAlign}. The default value is ARKUI_ITEM_ALIGN_AUTO. \n + * .value[0].i32: alignment mode of the child components along the cross axis of the parent container.\n + * The parameter type is {@link ArkUI_ItemAlignment}. The default value is ARKUI_ITEM_ALIGNMENT_AUTO. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].f32: alignment mode of the child components along the cross axis of the parent container.\n - * The parameter type is {@link ArkUI_ItemAlign}. The default value is ARKUI_ITEM_ALIGN_AUTO. \n + * .value[0].i32: alignment mode of the child components along the cross axis of the parent container.\n + * The parameter type is {@link ArkUI_ItemAlignment}. The default value is ARKUI_ITEM_ALIGNMENT_AUTO. \n * */ NODE_ALIGN_SELF, @@ -1369,7 +1339,251 @@ typedef enum { * */ NODE_ASPECT_RATIO, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: weight of the component along the main axis. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: weight of the component along the main axis. \n + * + */ + NODE_LAYOUT_WEIGHT, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: display priority of the component in the container. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: display priority of the component in the container. \n + * + */ + NODE_DISPLAY_PRIORITY, + /** + * @brief Sets the thickness of an element's outline. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: thickness of the left outline. \n + * .value[1].f32: thickness of the top outline. \n + * .value[2].f32: thickness of the right outline. \n + * .value[3].f32: thickness of the bottom outline. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: thickness of the left outline. \n + * .value[1].f32: thickness of the top outline. \n + * .value[2].f32: thickness of the right outline. \n + * .value[3].f32: thickness of the bottom outline. \n + * + */ + NODE_OUTLINE_WIDTH, + /** + * @brief Defines the width attribute, which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: width, in percentage.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: width, in percentage.\n + * + */ + NODE_WIDTH_PERCENT, + /** + * @brief Defines the height attribute, which can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: height, in percentage.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: height, in percentage.\n + * + */ + NODE_HEIGHT_PERCENT, + /** + * @brief Defines the padding attribute, which can be set, reset, and obtained as required through APIs. + * + * There are two formats of {@link ArkUI_AttributeItem} for setting the attribute value:\n + * 1: Specify the same padding for the four directions. \n + * .value[0].f32: padding, in percentage.\n + * 2: Specify different paddings for different directions. \n + * .value[0].f32: top padding, in percentage.\n + * .value[1].f32: right padding, in percentage.\n + * .value[2].f32: bottom padding, in percentage.\n + * .value[3].f32: left padding, in percentage.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: top padding, in percentage.\n + * .value[1].f32: right padding, in percentage.\n + * .value[2].f32: bottom padding, in percentage.\n + * .value[3].f32: left padding, in percentage.\n + * + */ + NODE_PADDING_PERCENT, + /** + * @brief Defines the margin attribute, which can be set, reset, and obtained as required through APIs. + * + * There are two formats of {@link ArkUI_AttributeItem} for setting the attribute value:\n + * 1: Specify the same margin for the four directions. \n + * .value[0].f32: margin, in percentage.\n + * 2: Specify different margins for different directions. \n + * .value[0].f32: top margin, in percentage.\n + * .value[1].f32: right margin, in percentage.\n + * .value[2].f32: bottom margin, in percentage.\n + * .value[3].f32: left margin, in percentage.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: top margin, in percentage.\n + * .value[1].f32: right margin, in percentage.\n + * .value[2].f32: bottom margin, in percentage.\n + * .value[3].f32: left margin, in percentage.\n + * + */ + NODE_MARGIN_PERCENT, + + /** + * @brief The implicit shared element transition within the component supports attribute setting, + * attribute reset, and attribute acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n + * .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. \n + * .string is used to set the binding relationship. Set the id to "" to + * clear the binding relationship to avoid participating in sharing behavior. \n + * 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. \n + *\n + * Attribute acquisition method return value {@link ArkUI_AttributeItem} format: \n + * .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. \n + * .string is used to set the binding relationship. Set the id to "" to + * clear the binding relationship to avoid participating in sharing behavior. \n + * 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. \n + */ + NODE_GEOMETRY_TRANSITION, + + /** + * @brief 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 {@link ArkUI_AttributeItem} format: \n + * .value[0].i32: The direction of the chain. Enum {@link ArkUI_Axis}. \n + * .value[1].i32: Chain style. Enum {@link ArkUI_RelativeLayoutChainStyle}. \n + *\n + * .value[0].i32: The direction of the chain. Enum {@link ArkUI_Axis}. \n + * .value[1].i32: Chain style. Enum {@link ArkUI_RelativeLayoutChainStyle}. \n + */ + NODE_RELATIVE_LAYOUT_CHAIN_MODE, + + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32 Content filling mode {@link ArkUI_RenderFit}.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32 Content filling mode {@link ArkUI_RenderFit}.\n + * + */ + NODE_RENDER_FIT, + + /** + * @brief External stroke color properties, support property setting, + * property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * 1: .value[0].u32: Set the border color of the four sides uniformly, using 0xargb, such as 0xFFFF11FF. \n + * 2: .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF. \n + * .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: Set the top border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[1].u32: Set the right border color, represented by 0xargb, such as 0xFFFF11FF. \n + * .value[2].u32: Set the lower side box color, denoted by 0xargb, such as 0xFFFF11FF. \n + * .value[3].u32: Set the left border color, denoted by 0xargb, such as 0xFFFF11FF. \n + * + */ + NODE_OUTLINE_COLOR, + /** + * @brief Set the height and width dimensions, support property setting, + * property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: Width value, unit is vp;\n + * .value[1].f32: Height value, unit is vp;\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: Width value, unit is vp;\n + * .value[1].f32: Height value, unit is vp;\n + * + */ + NODE_SIZE, + + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The parameter type is 1 or 0. + * + */ + NODE_RENDER_GROUP, + + /** + * @brief Add color overlay effect to components, support property setting, + * property reset and property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: The color of the overlay is represented by 0xargb, such as 0xFFFF11FF. \n + * + */ + NODE_COLOR_BLEND, + + /** + * @brief Provide content ambiguity capability for the current component, + * support property setting, property reset, property acquisition interface. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32 Represents the content blurring style, and uses the {@link ArkUI_BlurStyle} enumeration value.\n + * .value[1]?.i32 Represents the dark and light mode used by the content blur effect,\n + * with the {@link ArkUI_ThemeColorMode} enumeration value.\n + * .value[2]?.i32 The color extraction mode used to represent the content blur effect takes\n + * the {@link ArkUI_AdaptiveColor} enumeration value.\n + * .value[3]?.i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * .value[4]?.i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32 Represents the content blurring style, and uses the {@link ArkUI_BlurStyle} enumeration value.\n + * .value[1].i32 Represents the dark and light mode used by the content blur effect,\n + * with the {@link ArkUI_ThemeColorMode} enumeration value.\n + * .value[2].i32 The color extraction mode used to represent the content blur effect takes\n + * the {@link ArkUI_AdaptiveColor} enumeration value.\n + * .value[3].i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * .value[4].i32 It is a gray-level fuzzy parameter. The value range is [0,127].\n + * + */ + NODE_FOREGROUND_BLUR_STYLE, /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -1441,13 +1655,15 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n - * .value[0].i32: text decoration style {@link ArkUI_TextDecorationType}. + * .value[0].i32: text decoration type {@link ArkUI_TextDecorationType}. * The default value is ARKUI_TEXT_DECORATION_TYPE_NONE.\n * .value[1]?.u32: text decoration color, in 0xARGB format. For example, 0xFFFF0000 indicates red. Optional.\n + * .value[2]?.i32: text decoration style {@link ArkUI_TextDecorationStyle}. \n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n - * .value[0].i32: text decoration style {@link ArkUI_TextDecorationType}.\n + * .value[0].i32: text decoration type {@link ArkUI_TextDecorationType}.\n * .value[1].u32: text decoration color, in 0xARGB format. \n + * .value[2].i32: text decoration style {@link ArkUI_TextDecorationStyle}. \n * */ NODE_TEXT_DECORATION, @@ -1666,6 +1882,45 @@ typedef enum { * */ NODE_TEXT_LINE_SPACING, + /** + * @brief 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. \n + * The capabilities need to be supported by the fonts, \n + * Interfaces for setting, resetting, and obtaining attributes are supported. \n + * Attribute setting method parameter {@Link ArkUI_AttributeItem} format: \n + * .string: complies with the text feature format. The format is normal | \n + * is in the format of [ | on | off],\n. + * There can be multiple values separated by commas (,). \n + * For example, the input format of a number with the same width is ss01 on. \n + * \n + * Attribute obtaining method return value {@Link ArkUI_AttributeItem} format:\n + * .string indicates the content of the text feature. Multiple text features are separated by commas (,). \n + */ + NODE_FONT_FEATURE, + /** + * @brief Setting Enable Text Recognition. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:Enable text recognition, default value false.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32:Enable Text Recognition\n + * + */ + NODE_TEXT_ENABLE_DATA_DETECTOR, + /** + * @brief Set the text recognition configuration. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0...].i32: Array of entity types, parameter types{@link ArkUI_TextDataDetectorType}。\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0...].i32:Array of entity types, parameter types{@link ArkUI_TextDataDetectorType}。\n + * + */ + NODE_TEXT_ENABLE_DATA_DETECTOR_CONFIG, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -1705,9 +1960,11 @@ typedef enum { * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .string: image address of the image span.\n + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: image address of the image span.\n + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}.\n * */ NODE_IMAGE_SPAN_SRC = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE_SPAN, @@ -1731,9 +1988,11 @@ typedef enum { * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n * .string: image source.\n + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}. Either .string or .object must be set.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n * .string: image source.\n + * .objcet: The parameter type is {@link ArkUI_DrawableDescriptor}.\n * */ NODE_IMAGE_SRC = MAX_NODE_SCOPE_NUM * ARKUI_NODE_IMAGE, @@ -1787,6 +2046,23 @@ typedef enum { * */ NODE_IMAGE_COLOR_FILTER, + /** + * @brief Sets the resizable image options. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: width of the left edge. The unit is vp. \n + * .value[1].f32: width of the top edge. The unit is vp. \n + * .value[2].f32: width of the right edge. The unit is vp. \n + * .value[3].f32: width of the bottom edge. The unit is vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: width of the left edge. The unit is vp. \n + * .value[1].f32: width of the top edge. The unit is vp. \n + * .value[2].f32: width of the right edge. The unit is vp. \n + * .value[3].f32: width of the bottom edge. The unit is vp. \n + * + */ + NODE_IMAGE_RESIZABLE, /** * @brief Defines the auto resize attribute, which can be set, reset, and obtained as required through APIs. * @@ -1833,6 +2109,30 @@ typedef enum { * */ NODE_IMAGE_RENDER_MODE, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: wheter to follow, true means to follow.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: wheter to follow, true means to follow.\n + * + */ + NODE_IMAGE_FIT_ORIGINAL_SIZE, + /** + * @brief Defines the fill color of the swiper. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: fill color, in 0xARGB format. For example, 0xFFFF0000 indicates red. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: fill color, in 0xARGB format. \n + * + */ + NODE_IMAGE_FILL_COLOR, /** * @brief Defines the color of the component when it is selected. * This attribute can be set, reset, and obtained as required through APIs. @@ -1869,6 +2169,19 @@ typedef enum { */ NODE_TOGGLE_VALUE, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + *.value[0].u32: background color, in 0xARGB format. For example, 0xFFFF0000 indicates red. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: background color, in 0xARGB format. \n + * + */ + NODE_TOGGLE_UNSELECTED_COLOR, + /** * @brief Defines the foreground color of the loading progress bar. * This attribute can be set, reset, and obtained as required through APIs. @@ -2112,7 +2425,185 @@ typedef enum { * */ NODE_TEXT_INPUT_TEXT_SELECTION, - + /** + * @brief Sets the color of the text underline when it is enabled. + * + * The default underline color configured for the theme is '0x33182431'. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: color of the underline applied to the text being typed in. + * The value is in 0xARGB format. \n + * .value[1].u32: color of the underline applied to the text in the normal state. + * The value is in 0xARGB format. \n + * .value[2].u32: color of the underline applied to the text when an error is detected. + * The value is in 0xARGB format. \n + * .value[3].u32: color of the underline applied to the text when it is disabled. + * The value is in 0xARGB format. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: color of the underline applied to the text being typed in. The value is in 0xARGB format. \n + * .value[1].u32: color of the underline applied to the text in the normal state. The value is in 0xARGB format. \n + * .value[2].u32: color of the underline applied to the text when an error is detected. + * The value is in 0xARGB format. \n + * .value[3].u32: color of the underline applied to the text when it is disabled. The value is in 0xARGB format. \n + * + */ + NODE_TEXT_INPUT_UNDERLINE_COLOR, + /** + * @brief Sets whether to enable autofill. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable autofill. The default value is true. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable autofill. \n + * + */ + NODE_TEXT_INPUT_ENABLE_AUTO_FILL, + /** + * @brief Sets the autofill type. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: autofill type. The parameter type is {@link ArkUI_TextInputContentType}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: autofill type. The parameter type is {@link ArkUI_TextInputContentType}. \n + * + */ + NODE_TEXT_INPUT_CONTENT_TYPE, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: rules for generating passwords. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: rules for generating passwords. \n + * + */ + NODE_TEXT_INPUT_PASSWORD_RULES, + /** + * @brief Sets whether to select all text in the initial state. The inline mode is not supported. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to select all text in the initial state. The default value is b>false. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to select all text in the initial state. \n + * + */ + NODE_TEXT_INPUT_SELECT_ALL, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: regular expression. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: regular expression. \n + * + */ + NODE_TEXT_INPUT_INPUT_FILTER, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: text input style. The parameter type is {@link ArkUI_TextInputStyle}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: text input style. The parameter type is {@link ArkUI_TextInputStyle}. \n + * + */ + NODE_TEXT_INPUT_STYLE, + /** + * @brief Sets or obtains the caret position. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * In the case of setting the caret position: + * .value[0].i32: character count from the beginning of a string to the caret position. \n + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * 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. \n + * .value[1].f32: X coordinate of the caret relative to the text box. \n + * .value[2].f32: Y coordinate of the caret relative to the text box. \n + */ + NODE_TEXT_INPUT_CARET_OFFSET, + /** + * @brief Obtains the position of the edited text area relative to the component and its size. + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: horizontal coordinate. \n + * .value[1].f32: vertical coordinate. \n + * .value[2].f32: content width. \n + * .value[3].f32: content height. \n + * + */ + NODE_TEXT_INPUT_CONTENT_RECT, + /** + * @brief Obtains the number of lines of the edited text. + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of lines of the edited text. \n + * + */ + NODE_TEXT_INPUT_CONTENT_LINE_COUNT, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, or + * right-clicked. \n + * + */ + NODE_TEXT_INPUT_SELECTION_MENU_HIDDEN, + /** + * @brief Sets whether the text box loses focus after the Enter key is pressed to submit information. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether the text box loses focus. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether the text box loses focus. \n + * + */ + NODE_TEXT_INPUT_BLUR_ON_SUBMIT, + /** + * @brief Set up a custom keyboard. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object:custom keyboard,The parameter type is{@Link ArkUI_NodeHandle}。\n + * .value[0]?.i32:Sets whether the custom keyboard supports the avoidance feature, default value false.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .object:custom keyboard,The parameter type is{@Link ArkUI_NodeHandle}。\n + * .value[0].i32:Set whether the custom keyboard supports the avoidance function.\n + * + */ + NODE_TEXT_INPUT_CUSTOM_KEYBOARD, + /** + * @brief Defines the line break rule. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: The parameter type is {@link ArkUI_WordBreak}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The parameter type is {@link ArkUI_WordBreak}. \n + * + */ + NODE_TEXT_INPUT_WORD_BREAK, /** * @brief Defines the default placeholder text for the multi-line text box. * This attribute can be set, reset, and obtained as required through APIs. @@ -2237,7 +2728,152 @@ typedef enum { * */ NODE_TEXT_AREA_SHOW_COUNTER, - + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to hide the text selection menu when the text box is long-pressed, double-click, + * or right-clicked. \n + * + */ + NODE_TEXT_AREA_SELECTION_MENU_HIDDEN, + /** + * @brief Sets whether the multi-line text box loses focus after the Enter key is pressed to submit information. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether the text box loses focus. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether the text box loses focus. \n + * + */ + NODE_TEXT_AREA_BLUR_ON_SUBMIT, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: regular expression. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: regular expression. \n + * + */ + NODE_TEXT_AREA_INPUT_FILTER, + /** + * @brief Defines the background color of the selected text. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: color value, in 0xARGB format. For example, 0xFFFF0000 indicates red. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: color value, in 0xARGB format. \n + * + */ + NODE_TEXT_AREA_SELECTED_BACKGROUND_COLOR, + /** + * @brief Defines the type of the Enter key. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: type of the Enter key{@link ArkUI_EnterKeyType}. The default value is ARKUI_ENTER_KEY_TYPE_DONE. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: type of the Enter key{@link ArkUI_EnterKeyType}. \n + * + */ + NODE_TEXT_AREA_ENTER_KEY_TYPE, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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.\n \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The value 1 means to enable the input method when the component obtains focus, + * and 0 means the opposite. \n + * + */ + NODE_TEXT_AREA_ENABLE_KEYBOARD_ON_FOCUS, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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.\n \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The value 1 means to enable the input method when the component obtains focus, + * and 0 means the opposite. \n + * + */ + NODE_TEXT_AREA_CARET_OFFSET, + /** + * @brief Obtains the position of the edited text area relative to the component and its size. + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: horizontal coordinate. \n + * .value[1].f32: vertical coordinate. \n + * .value[2].f32: content width. \n + * .value[3].f32: content height. \n + * + */ + NODE_TEXT_AREA_CONTENT_RECT, + /** + * @brief Obtains the number of lines of the edited text. + * + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: number of lines of the edited text. \n + * + */ + NODE_TEXT_AREA_CONTENT_LINE_COUNT, + /** + * @brief Sets the text selection area, which will be highlighted. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: start position of the text selection. \n + * .value[1].i32: end position of the text selection. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: start position of the text selection. \n + * .value[1].i32: end position of the text selection. \n + * + */ + NODE_TEXT_AREA_TEXT_SELECTION, + /** + * @brief Sets whether to enable autofill. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to enable autofill. The default value is true. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to enable autofill. \n + * + */ + NODE_TEXT_AREA_ENABLE_AUTO_FILL, + /** + * @brief Sets the autofill type. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: autofill type. The parameter type is {@link ArkUI_TextInputContentType}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: autofill type. The parameter type is {@link ArkUI_TextInputContentType}. \n + * + */ + NODE_TEXT_AREA_CONTENT_TYPE, /** * @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs. * @@ -2250,6 +2886,20 @@ typedef enum { */ NODE_BUTTON_LABEL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_BUTTON, + /** + * @brief Sets the button type. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: button type. The parameter type is {@link ArkUI_ButtonType}. + * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: button type. The parameter type is {@link ArkUI_ButtonType}. + * The default value is ARKUI_BUTTON_TYPE_CAPSULE. \n + * + */ + NODE_BUTTON_TYPE, + /** * @brief Defines the current value of the progress indicator. * This attribute can be set, reset, and obtained as required through APIs. @@ -3065,7 +3715,51 @@ typedef enum { * .value[0].i32: style of the slider thumb and track. The parameter type is {@link ArkUI_SliderStyle}. * */ - NODE_SLIDER_STYLE, + NODE_SLIDER_STYLE, + + /** + * @brief Sets the track thickness of the slider. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: track thickness of the slider, in vp. \n + * + */ + NODE_SLIDER_TRACK_THICKNESS, + + /** + * @brief Set the selection status of an option button. Attribute setting, + * attribute resetting, and attribute obtaining are supported. + * Attribute setting method {@Link ArkUI_AttributeItem} Parameter format:\n + * .value[0].i32: check status of an option button. The default value is false. + * Attribute obtaining method return value {@Link ArkUI_AttributeItem} format:\n + * .value[0].i32: selection status of an option button. + */ + NODE_RADIO_CHECKED = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RADIO, + /** + * @brief 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 {@Link ArkUI_AttributeItem} Parameter format:\n + * .value[0]?. u32: color of the mother board in enabled state. \n + * The type is 0xARGB, and the default value is 0xFF007DFF. \n + * .value[1]?. u32: stroke color in the close state. The type is 0xARGB, \n + * and the default value is 0xFF182431. \n + * .value[2]?. u32: color of the internal round pie in the enabled state. \n + * The type is 0xARGB, and the default value is 0xFFFFFFFF. \n + * Attribute obtaining method return value {@Link ArkUI_AttributeItem} format:\n + * .value[0]. u32: color of the mother board in enabled state. \n + * The type is 0xARGB, and the default value is 0xFF007DFF. \n + * .value[1]. u32: stroke color in the close state. The type is 0xARGB, \n + * and the default value is 0xFF182431. \n + * .value[2]. u32: color of the internal round pie in the enabled state. \n + * The type is 0xARGB, and the default value is 0xFFFFFFF. \n + */ + NODE_RADIO_STYLE, /** * @brief Defines the alignment mode of the child components in the container. This attribute can be set, reset, @@ -3271,6 +3965,27 @@ typedef enum { */ NODE_SCROLL_ENABLE_PAGING, + /** + * @brief Scroll to the next or previous page. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32 Indicates whether to scroll to next page. Value 1 indicates scroll to next page and value 0 + * indicates scroll to previous page. \n + * .value[1]?.i32 Indicates whether to enable animation. Value 1 indicates enable and 0 indicates disable. \n + * + */ + NODE_SCROLL_PAGE, + + /** + * @brief Scroll a specified distance. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32:Horizontal scrolling distance in vp; \n + * .value[1].f32: Vertical scrolling distance in vp; \n + * + */ + NODE_SCROLL_BY, + /** * @brief Defines the direction in which the list items are arranged. This attribute can be set, reset, and * obtained as required through APIs. @@ -3329,6 +4044,36 @@ typedef enum { */ NODE_LIST_CACHED_COUNT, + /** + * @brief 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.\n + * \n + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:The index value of the target element to be slid to in the current container.\n + * .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。\n + * .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is + * {@link ArkUI_ScrollAlignment}, default value is ARKUI_SCROLL_ALIGNMENT_START. \n + * + */ + NODE_LIST_SCROLL_TO_INDEX, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: alignment mode of list items along the cross axis. + * The parameter type is {@link ArkUI_ListItemAlignment}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: alignment mode of list items along the cross axis. + * The parameter type is {@link ArkUI_ListItemAlignment}. \n + */ + NODE_LIST_ALIGN_LIST_ITEM, + /** * @brief Defines whether to enable loop playback for the swiper. * This attribute can be set, reset, and obtained as required through APIs. @@ -3532,6 +4277,68 @@ typedef enum { */ NODE_SWIPER_CACHED_COUNT, + /** + * @brief Defines the front margin of the wiper. + * The attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: the front margin. The unit is vp. The default value is 0.0\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: the front margin, the unit is vp. \n + * + */ + NODE_SWIPER_PREV_MARGIN, + + /** + * @brief Defines the back margin of the wiper. + * The attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: the back margin. The unit is vp. The default value is 0.0\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: the back margin, the unit is vp. \n + */ + NODE_SWIPER_NEXT_MARGIN, + + /** + * @brief Defines the navigation indicator type of the swiper. + * The attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n + * .object: The parameter type is {@link ArkUI_SwiperIndicator}.\n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: navigation indicator type, the parameter type is {@link ArkUI_SwiperIndicatorType}.\n + * .object: The parameter type is {@link ArkUI_SwiperIndicator}.\n + * + */ + NODE_SWIPER_INDICATOR, + /** + * @brief Set the nested scrolling mode for the Swiper component and parent component. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is + * {@link ArkUI_SwiperNestedScrollMode} \n + * The default value is ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32:Nested scrolling patterns for Swiper components and parent components. The parameter type is + * {@link ArkUI_SwiperNestedScrollMode} \n + */ + NODE_SWIPER_NESTED_SCROLL, + + /** + * @brief Set the switcher component to flip to the specified page. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:Specify the index value of the page in Swiper.\n + * .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。\n + */ + NODE_SWIPER_SWIPE_TO_INDEX, + /** * @brief Defines the header of the list item group. * This attribute can be set, reset, and obtained as required through APIs. @@ -3762,6 +4569,8 @@ typedef enum { * This attribute can be set, reset, and obtained as required through APIs. * * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .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.\n * \n * Format of the return value {@link ArkUI_AttributeItem}:\n @@ -3786,6 +4595,136 @@ typedef enum { * .value[0].i32: number of cached items in the water flowadapter. \n */ NODE_WATER_FLOW_CACHED_COUNT, + + /** + * @brief Set the custom display component at the end of the waterfall flow component. + * + * Attribute setting method {@link ArkUI_AttributeItem} parameter format: \n + * .object: Parameter type {@link ArkUI_NodeHandle}. + * + */ + NODE_WATER_FLOW_FOOTER, + + /** + * @brief 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.\n + * \n + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32:The index value of the target element to be slid to in the current container.\n + * .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。\n + * .value[2]?.i32:Specify the alignment of the sliding element with the current container,The parameter type is + * {@link ArkUI_ScrollAlignment}. Default value is ARKUI_SCROLL_ALIGNMENT_START。\n + * + */ + NODE_WATER_FLOW_SCROLL_TO_INDEX, + + /** + * @brief Set the auxiliary line in the RelativeContaine container, supporting property setting, + * property reset and property acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n + * .object: Auxiliary lines within the RelativeContaine container: \n + *\n + * Attribute acquisition method return value {@link ArkUI_AttributeItem} format: \n + * .object: Auxiliary lines within the RelativeContaine container: \n + * + */ + NODE_RELATIVE_CONTAINER_GUIDE_LINE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RELATIVE_CONTAINER, + + /** + * @brief Sets the barrier within the RelativeContaine container and supports property setting, + * property reset and property acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n + * .object: Auxiliary lines within the RelativeContaine container: \n + *\n + * Attribute acquisition method return value {@link ArkUI_AttributeItem} format: \n + * .object: Barrier within the RelativeContaine container: \n + * + */ + NODE_RELATIVE_CONTAINER_BARRIER, + + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: number of columns in the layout.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: number of columns in the layout.\n + * + */ + NODE_GRID_COLUMN_TEMPLATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_GRID, + + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .string: number of rows in the layout. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: number of rows in the layout. \n + * + */ + NODE_GRID_ROW_TEMPLATE, + + /** + * @brief Sets the gap between columns. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: gap between columns, in vp.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: gap between columns, in vp.\n + * + */ + NODE_GRID_COLUMN_GAP, + + /** + * @brief Sets the gap between rows. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: gap between lines, in vp.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: gap between lines, in vp.\n + * + */ + NODE_GRID_ROW_GAP, + + /** + * @brief Defines the grid adapter. The attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .object: {@link ArkUI_NodeAdapter} object as the adapter. \n + */ + NODE_GRID_NODE_ADAPTER, + + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: number of cached items in the grid adapter. \n + */ + NODE_GRID_CACHED_COUNT, } ArkUI_NodeAttributeType; #define MAX_COMPONENT_EVENT_ARG_NUM 12 @@ -3924,6 +4863,58 @@ typedef enum { * {@link ArkUI_UIInputEvent}. \n */ NODE_ON_TOUCH_INTERCEPT, + /** + * @brief Defines the visible area change event. + * + * This event is triggered when the ratio of the component's visible area to its total area is greater than or less + * than the threshold. \n + * The format of the input parameter {@link ArkUI_AttributeItem} is as follows:\n + * .value[0...].f32: threshold array. Each threshold represents a ratio of the component's visible area to the + * component's total area. The value range of the threshold is [0.0, 1.0]. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32: how the ratio of the component's visible area to its total area + * changes compared to the previous one. The value 1 indicates an increase, and 0 indicates a + * decrease. \n + * ArkUI_NodeComponentEvent.data[1].f32: ratio of the component's visible area to its total area when this + * callback is invoked. \n + */ + NODE_EVENT_ON_VISIBLE_AREA_CHANGE, + /** + * @brief Defines the event triggered when the mouse pointer is moved over or away from the component. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: whether the mouse pointer is hovered over the component. + * The value 1 indicates that the mouse pointer is hovered over the component, and 0 indicates that + * the mouse pointer is moved away from the component. \n + */ + NODE_ON_HOVER, + /** + * @brief Defines the click event. + * + * This event is triggered when the component is clicked by a mouse device button or when the mouse pointer moves + * within the component. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + */ + NODE_ON_MOUSE, + + /** + * @brief Triggers onDetectResultUpdate callback + * when the text is set to TextDataDetectorConfig and recognized successfully. + * + * Trigger this event when TextDataDetectorConfig is set and recognized successfully.\n + * When the event callback occurs, the event parameter{@link ArkUI_NodeEvent}The union type in the object is + * {@link ArkUI_StringAsyncEvent}.\n + * {@link ArkUI_StringAsyncEvent}contains 1 parameter\n + * ArkUI_StringAsyncEvent.pStr:Indicates the result of text recognition, in Json format.\n + * + */ + NODE_TEXT_ON_DETECT_RESULT_UPDATE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_TEXT, /** * @brief Defines the image loading success event. * @@ -4035,6 +5026,57 @@ typedef enum { * */ NODE_TEXT_INPUT_ON_TEXT_SELECTION_CHANGE, + + /** + * @brief Defines the event triggered when the input status changes. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress. \n + * + */ + NODE_TEXT_INPUT_ON_EDIT_CHANGE, + + /** + * @brief textInput This event is triggered when the input content changes. + * + * Conditions for triggering this event: When the input content changes. \n + * When the event callback occurs, the union type in the event parameter + * {@link ArkUI_NodeEvent} object is {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains 2 parameters:\n + * ArkUI_NodeComponentEvent.data[0].f32: Indicates the width of the text. \n + * ArkUI_NodeComponentEvent.data[1].f32: Indicates the height of the text. \n + * + */ + NODE_TEXT_INPUT_ON_CONTENT_SIZE_CHANGE, + + /** + * @brief Defines the event triggered when matching with the regular expression specified by + * NODE_TEXT_INPUT_INPUT_FILTER fails. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_StringAsyncEvent}. \n + * {@link ArkUI_StringAsyncEvent} contains one parameter:\n + * ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails. \n + * + */ + NODE_TEXT_INPUT_ON_INPUT_FILTER_ERROR, + /** + * @brief This callback is triggered when the text content is scrolled. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32: Indicates the horizontal offset of the text in the content area. \n + * ArkUI_NodeComponentEvent.data[1].i32: Indicates the vertical coordinate offset of \n + * the text in the content area. \n + * + */ + NODE_TEXT_INPUT_ON_CONTENT_SCROLL, /** * @brief Defines the event triggered when the input in the text box changes. * @@ -4070,6 +5112,68 @@ typedef enum { * */ NODE_TEXT_AREA_ON_TEXT_SELECTION_CHANGE, + /** + * @brief Defines the event triggered when matching with the regular expression specified by + * NODE_TEXT_AREA_INPUT_FILTER fails. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_StringAsyncEvent}. \n + * {@link ArkUI_StringAsyncEvent} contains one parameter:\n + * ArkUI_StringAsyncEvent.pStr: content that is filtered out when regular expression matching fails. \n + * + */ + NODE_TEXT_AREA_ON_INPUT_FILTER_ERROR, + /** + * @brief This callback is triggered when the text content is scrolled. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].i32: Indicates the horizontal offset of the text in the content area. \n + * ArkUI_NodeComponentEvent.data[1].i32: Indicates the vertical coordinate offset of \n + * the text in the content area. \n + * + */ + NODE_TEXT_AREA_ON_CONTENT_SCROLL, + + /** + * @brief Defines the event triggered when the input status changes. + * + \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is \n + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: true indicates that text input is in progress. \n + * + */ + NODE_TEXT_AREA_ON_EDIT_CHANGE, + + /** + * @brief Defines the event triggered when the Enter key on the keyboard is pressed for the multi-line text box. + * + * This event is not triggered when keyType is ARKUI_ENTER_KEY_TYPE_NEW_LINE. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is \n + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: type of the Enter key. + * + */ + NODE_TEXT_AREA_ON_SUBMIT, + + /** + * @brief textArea This event is triggered when the input content changes. + * + * Conditions for triggering this event: When the input content changes. \n + * When the event callback occurs, the union type in the event parameter {@link ArkUI_NodeEvent} object is \n + * {@link ArkUI_NodeComponentEvent}.\n + * {@link ArkUI_NodeComponentEvent} contains 2 parameters:\n + * ArkUI_NodeComponentEvent.data[0].f32: Indicates the width of the text. \n + * ArkUI_NodeComponentEvent.data[1].f32: Indicates the height of the text. \n + * + */ + NODE_TEXT_AREA_ON_CONTENT_SIZE_CHANGE, /** * @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes. @@ -4138,6 +5242,15 @@ typedef enum { */ NODE_SLIDER_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_SLIDER, + /** + * @brief Defines the event callback function triggered when an object is dragged or clicked by ARKUI_NODE_RADIO. + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is \n + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains one parameter:\n + * ArkUI_NodeComponentEvent.data[0].i32: option button status. \n + */ + NODE_RADIO_EVENT_ON_CHANGE = MAX_NODE_SCOPE_NUM * ARKUI_NODE_RADIO, + /** * @brief Defines the event triggered when the index of the currently displayed element of this * ARKUI_NODE_SWIPER instance changes. @@ -4223,6 +5336,46 @@ typedef enum { * needs to scroll based on the real-world situation and return the result in this parameter. \n */ NODE_SCROLL_EVENT_ON_SCROLL_FRAME_BEGIN, + + /** + * @brief Define the enumeration value of the pre sliding trigger event for the scrolling container component. + * + * The conditions that trigger this event: \n + * 1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse + * operations that trigger scrolling.\n + * 2. Called through the rolling controller API interface.\n + * 3. Cross boundary rebound.\n + * When an event callback occurs, the union type in the event parameter {@ link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains three parameters: \n + * ArkUI_NodeComponentEvent.data[0].f32: The offset for each frame of scrolling is positive when scrolling to + * the left and negative when scrolling to the right, measured in vp. \n + * ArkUI_NodeComponentEvent.data[1].f32: The offset of each frame scrolling, with a positive offset when + * scrolling up and a negative offset when scrolling down, measured in vp. \n + * ArkUI_NodeComponentEvent.data[2].i32: Current sliding state,\n + * parameter type is {@link ArkUI_ScrollState}.\n + */ + NODE_SCROLL_EVENT_ON_WILL_SCROLL, + /** + * @brief Define the event enumeration value triggered when sliding a scrolling container component. + * + * The conditions that trigger this event: \n + * 1. When the scrolling component triggers scrolling, it supports input settings such as keyboard and mouse + * operations that trigger scrolling.\n + * 2. Called through the rolling controller API interface.\n + * 3. Cross boundary rebound.\n + * When an event callback occurs, the union type in the event parameter {@ link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains three parameters: \n + * ArkUI_NodeComponentEvent.data[0].f32: The offset for each frame of scrolling is positive when scrolling to + * the left and negative when scrolling to the right, measured in vp. \n + * ArkUI_NodeComponentEvent.data[1].f32: The offset of each frame scrolling, with a positive offset when + * scrolling up and a negative offset when scrolling down, measured in vp. \n + * ArkUI_NodeComponentEvent.data[2].i32: Current sliding state, \n + parameter type is {@link ArkUI_ScrollState}. \n + */ + NODE_SCROLL_EVENT_ON_DID_SCROLL, + /** * @brief Defines the event triggered when scrolling starts in the ARKUI_NODE_SCROLL component. * @@ -4262,6 +5415,74 @@ typedef enum { * ArkUI_NodeComponentEvent.data[0].i32: edge (top, bottom, left, or right) that the scrolling reaches. \n */ NODE_SCROLL_EVENT_ON_SCROLL_EDGE, + /** + * @brief Define that a callback is triggered when the scrolling container component reaches the start position. + * Condition for triggering the event: \n + * Triggered when the component reaches the start position. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains no parameters. \n + */ + NODE_SCROLL_EVENT_ON_REACH_START, + /** + * @brief Define that a callback is triggered when the scrolling container component ends. \n + * Condition for triggering the event: \n + * Triggered when the component reaches the end. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains no parameters. \n + */ + NODE_SCROLL_EVENT_ON_REACH_END, + /** + * @brief Defines the enumerated values of the event triggered, \n + * when a subcomponent of ARKUI_NODE_LIST is moved into or out of the list display area. \n + * Condition for triggering the event: \n + * This method is triggered once during list initialization. \n + * It is triggered when the index value of the first or last subcomponent in the list display area changes. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains three parameters: \n + * ArkUI_NodeComponentEvent.data[0].i32: List Displays the index value of \n + * the first child component in the region. \n + * ArkUI_NodeComponentEvent.data[1].i32: List Displays the index value of \n + * the last child component in the region. \n + * ArkUI_NodeComponentEvent.data[2].i32: List Displays the index value of \n + * the subcomponent in the middle of the area. \n + */ + NODE_LIST_ON_SCROLL_INDEX = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST, + /** + * @brief Defines the enumerated values of the event triggered + * before the sliding of the ARKUI_NODE_LIST component. \n + * Condition for triggering the event: \n + * This event is triggered when the scrolling component triggers scrolling. \n + * Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set. \n + * Called through the scroll controller API. \n + * Out-of-bounds rebound. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is \n + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains two parameters: \n + * ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling. \n + * The offset is positive when the list content is scrolled up and \n + * is negative when the list content is scrolled down. \n + * ArkUI_NodeComponentEvent.data[1].i32: Current sliding state. \n + */ + NODE_LIST_ON_WILL_SCROLL, + /** + * @brief Define the enumerated values of the event triggered when the ARKUI_NODE_LIST component is flicked. + * Condition for triggering the event: \n + * This event is triggered when the scrolling component triggers scrolling. \n + * Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set. \n + * Called through the scroll controller API. \n + * Out-of-bounds rebound. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is \n + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling. \n + * The offset is positive when the list content is scrolled up and \n + * is negative when the list content is scrolled down. \n + * ArkUI_NodeComponentEvent.data[1].i32: Current sliding state. \n + */ + NODE_LIST_ON_DID_SCROLL, /** * @brief Defines the event triggered when the refresh state of the ARKUI_NODE_REFRESH object changes. @@ -4297,6 +5518,36 @@ typedef enum { * ArkUI_NodeComponentEvent.data[1].i32: current scroll state. \n */ NODE_ON_WILL_SCROLL = MAX_NODE_SCOPE_NUM * ARKUI_NODE_WATER_FLOW, + /** + * @brief Define the enumerated values of the event triggered when the ARKUI_NODE_WATER_FLOW component slides. + * Condition for triggering the event: \n + * This event is triggered when the scrolling component triggers scrolling. + * Other inputs that trigger scrolling, such as keyboard and mouse operations, can be set. \n + * Called through the scroll controller API. \n + * Out-of-bounds rebound. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is \n + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains two parameters:\n + * ArkUI_NodeComponentEvent.data[0].f32: offset of each frame scrolling. \n + * The offset is positive when the content is scrolled up and is negative when the content is scrolled down. \n + * ArkUI_NodeComponentEvent.data[1].i32: Current sliding state. \n + */ + NODE_WATER_FLOW_ON_DID_SCROLL, + /** + * @brief Defines the enumerated values of the event triggered, + * when the subcomponent of the start position or end position displayed in the current waterfall changes. + * Condition for triggering the event: \n + * This event is triggered when the index value of the \n + * first or last subcomponent in the waterfall display area changes. \n + * When the event callback occurs, the union type in the {@Link ArkUI_NodeEvent} object is \n + * {@Link ArkUI_NodeComponentEvent}. \n + * {@Link ArkUI_NodeComponentEvent} contains three parameters: \n + * ArkUI_NodeComponentEvent.data[0].i32: The index value of the \n + * start position of the currently displayed WaterFlow. \n + * ArkUI_NodeComponentEvent.data[1].i32: The index value of \n + * the end position of the currently displayed waterfall. \n + */ + NODE_WATER_FLOW_ON_SCROLL_INDEX, } ArkUI_NodeEventType; /** @@ -4955,7 +6206,7 @@ typedef struct { * Returns 401 if a parameter exception occurs. */ int32_t (*setLayoutPosition)(ArkUI_NodeHandle node, int32_t positionX, int32_t positionY); - + /** * @brief Obtains the width and height of a component after measurement. * @@ -5079,8 +6330,15 @@ typedef struct { * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs. */ int32_t (*setLengthMetricUnit)(ArkUI_NodeHandle node, ArkUI_LengthMetricUnit unit); -} ArkUI_NativeNodeAPI_1; + /** + * @brief Get the parent node. + * + * @param node target node object. + * @return Returns the pointer of the component, if not return NULL + */ + ArkUI_NodeHandle (*getParent)(ArkUI_NodeHandle node); +} ArkUI_NativeNodeAPI_1; /** * @brief Obtains the size constraint for measurement through a custom component event. @@ -5168,7 +6426,7 @@ typedef struct ArkUI_NodeContentEvent ArkUI_NodeContentEvent; * @brief Defines the callback function of a node content event. * @since 12 */ -typedef void(*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event); +typedef void (*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event); /** * @brief register a callback functoin to a node content. diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f9038b369..cdb051c14 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -112,6 +112,35 @@ struct ArkUI_Context; */ typedef struct ArkUI_Context* ArkUI_ContextHandle; +/** + * @brief Defines the navigation indicator style for the swiper. + * + * @since 12 + */ +typedef struct ArkUI_SwiperIndicator ArkUI_SwiperIndicator; + +/** + * @brief specifies the alignment rules for subcomponents set in relative containers. + * + * @since 12 + */ +typedef struct ArkUI_AlignmentRuleOption ArkUI_AlignmentRuleOption; + +/** + * @brief guideLine parameters, used to define the id, direction and position of the guideline. + * + * @since 12 + */ +typedef struct ArkUI_GuidelineOption ArkUI_GuidelineOption; + +/** + * @brief barrier parameter, used to define the id, + * direction and components of the barrier that it depends on when generating it. + * + * @since 12 + */ +typedef struct ArkUI_BarrierOption ArkUI_BarrierOption; + /** * @brief Defines the event callback type. * @@ -355,10 +384,10 @@ typedef enum { ARKUI_PROGRESS_TYPE_SCALE_RING, /** Capsule style. */ ARKUI_PROGRESS_TYPE_CAPSULE, -}ArkUI_ProgressType; +} ArkUI_ProgressType; /** - * @brief Enumerates the text decoration styles. + * @brief Enumerates the text decoration types. * * @since 12 */ @@ -373,6 +402,24 @@ typedef enum { ARKUI_TEXT_DECORATION_TYPE_LINE_THROUGH, } ArkUI_TextDecorationType; +/** + * @brief Enumerates the text decoration styles. + * + * @since 12 + */ +typedef enum { + /** Single solid line. */ + ARKUI_TEXT_DECORATION_STYLE_SOLID = 0, + /** Double solid line. */ + ARKUI_TEXT_DECORATION_STYLE_DOUBLE, + /** Dotted line. */ + ARKUI_TEXT_DECORATION_STYLE_DOTTED, + /** Dashed line. */ + ARKUI_TEXT_DECORATION_STYLE_DASHED, + /** Wavy line. */ + ARKUI_TEXT_DECORATION_STYLE_WAVY, +} ArkUI_TextDecorationStyle; + /** * @brief Enumerates the text cases. * @@ -545,7 +592,6 @@ typedef enum { ARKUI_STICKY_STYLE_BOTH = 3, } ArkUI_StickyStyle; - /** * @brief Enumerates the border styles. * @@ -647,6 +693,19 @@ typedef enum { ARKUI_SWIPER_ARROW_SHOW_ON_HOVER, } ArkUI_SwiperArrow; +/** + * @brief Nested scrolling mode for Swiper components and parent components. + * + * @since 12 + */ +typedef enum { + /** Swiper only scrolls on its own and is not linked to its parent component. */ + ARKUI_SWIPER_NESTED_SRCOLL_SELF_ONLY = 0, + /** The Swiper itself scrolls first, and the parent component scrolls after it reaches the edge. After the parent + * component scrolls to the edge, if the parent component has an edge effect, the parent component triggers the edge + * effect; otherwise, the Swiper triggers the edge effect. */ + ARKUI_SWIPER_NESTED_SRCOLL_SELF_FIRST, +} ArkUI_SwiperNestedScrollMode; /** * @brief Enumerates the accessibility modes. @@ -680,7 +739,6 @@ typedef enum { ARKUI_TEXT_COPY_OPTIONS_CROSS_DEVICE, } ArkUI_TextCopyOptions; - /** * @brief Defines how the adaptive height is determined for the text. * @@ -695,7 +753,6 @@ typedef enum { ARKUI_TEXT_HEIGHT_ADAPTIVE_POLICY_LAYOUT_CONSTRAINT_FIRST, } ArkUI_TextHeightAdaptivePolicy; - /** * @brief Defines nested scrolling options. * @@ -719,7 +776,6 @@ typedef enum { ARKUI_SCROLL_NESTED_MODE_PARALLEL, } ArkUI_ScrollNestedMode; - /** * @brief Defines the edge to which the component scrolls. * @@ -736,6 +792,40 @@ typedef enum { ARKUI_SCROLL_EDGE_END, } ArkUI_ScrollEdge; +/** + * @brief Alignment when scrolling to specific items. + * + * @since 12 + */ +typedef enum { + /** Align the head. Align the head of the specified item with the head of the container.*/ + ARKUI_SCROLL_ALIGNMENT_START = 0, + /** Center alignment. Align the axis direction of the specified item to the center of the container.*/ + ARKUI_SCROLL_ALIGNMENT_CENTER, + /** Tail alignment. Align the tail of the specified item with the tail of the container.*/ + ARKUI_SCROLL_ALIGNMENT_END, + /** Automatic alignment. If the specified item is completely in the display area, no adjustments will be made. + * Otherwise, according to the principle of the shortest sliding distance, align the head or tail of the specified + * item with the container, so that the specified item is completely in the display area.*/ + ARKUI_SCROLL_ALIGNMENT_AUTO, +} ArkUI_ScrollAlignment; + +/** + * @brief Define the current scrolling state. + * + * @since 12 + */ +typedef enum { + /** Idle state. Trigger when using the method provided by the controller to control scrolling, and trigger when + * dragging the scroll bar to scroll.*/ + ARKUI_SCROLL_STATE_IDLE = 0, + /** Scroll state. Triggered when dragging the container with fingers to scroll.*/ + ARKUI_SCROLL_STATE_SCROLL, + /** Inertial rolling state. Triggered when inertia rolling and bouncing back to the edge are performed after + * releasing the hand quickly.*/ + ARKUI_SCROLL_STATE_FLING, +} ArkUI_ScrollState; + /** * @brief Enumerates the types of the slider in the block direction. * @@ -979,7 +1069,6 @@ typedef enum { ARKUI_IMAGE_INTERPOLATION_HIGH, } ArkUI_ImageInterpolation; - /** * @brief Enumerates the blend modes. * @@ -1414,6 +1503,51 @@ typedef enum { ARKUI_FINISH_CALLBACK_LOGICALLY, } ArkUI_FinishCallbackType; +/** + * @brief Enumerates the alignment modes of items along the cross axis. + * + * @since 12 + */ +typedef enum { + /** The list items are packed toward the start edge of the list container along the cross axis. */ + ARKUI_LIST_ITEM_ALIGNMENT_START = 0, + /** The list items are centered in the list container along the cross axis. */ + ARKUI_LIST_ITEM_ALIGNMENT_CENTER, + /** The list items are packed toward the end edge of the list container along the cross axis. */ + ARKUI_LIST_ITEM_ALIGNMENT_END, +} ArkUI_ListItemAlignment; + +/** + * @brief defines the direction of the barrier line. + * + * @since 12 + */ +typedef enum { + /** The barrier is the leftmost of all its referencedIds. */ + ARKUI_BARRIER_DIRECTION_START = 0, + /** The barrier is on the rightmost side of all its referencedIds. */ + ARKUI_BARRIER_DIRECTION_END, + /** The barrier is at the top of all its referencedIds. */ + ARKUI_BARRIER_DIRECTION_TOP, + /** The barrier is at the bottom of all its referencedIds. */ + ARKUI_BARRIER_DIRECTION_BOTTOM +} ArkUI_BarrierDirection; + +/** + * @brief defines the style of the chain. + * + * @since 12 + */ +typedef enum { + /** Components are evenly distributed among constraint anchor points. */ + ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD = 0, + /** Except for the first and last two sub-components, + * other components are evenly distributed between the constraint anchor points. */ + ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_SPREAD_INSIDE, + /** No gaps in subcomponents within the chain. */ + ARKUI_RELATIVE_LAYOUT_CHAIN_STYLE_PACKED, +} ArkUI_RelativeLayoutChainStyle; + /** * @brief Describes the margins of a component. * @@ -1446,6 +1580,210 @@ typedef enum { ARKUI_LENGTH_METRIC_UNIT_FP } ArkUI_LengthMetricUnit; +/** + * @brief Enumerates the render fit. + * + * @since 12 + */ +typedef enum { + /** Maintains the content size of the animation's final state, + * and the content is always centered with the component.*/ + ARKUI_RENDER_FIT_CENTER = 0, + /** Maintains the content size of the animation's final state, + * and the content is always aligned with the top center of the component. */ + ARKUI_RENDER_FIT_TOP, + /** Maintains the content size of the animation's final state, + * and the content is always aligned with the bottom center of the component. */ + ARKUI_RENDER_FIT_BOTTOM, + /** Maintains the content size of the animation's final state, + * and the content is always aligned to the left of the component. */ + ARKUI_RENDER_FIT_LEFT, + /** Maintains the content size of the animation's final state, + * and the content is always right-aligned with the component. */ + ARKUI_RENDER_FIT_RIGHT, + /** Maintains the content size of the animation's final state, + * and the content is always aligned with the top left corner of the component. */ + ARKUI_RENDER_FIT_TOP_LEFT, + /** Keep the content size of the animation final state, + * and the content is always aligned with the upper right corner of the component. */ + ARKUI_RENDER_FIT_TOP_RIGHT, + /** Keep the content size of the animation final state, + * and the content always aligns with the lower-left corner of the component. */ + ARKUI_RENDER_FIT_BOTTOM_LEFT, + /** Keep the content size of the animation final state, + *and the content always aligns with the lower-right corner of the component. */ + ARKUI_RENDER_FIT_BOTTOM_RIGHT, + /** The aspect ratio of the animation's final state content is not considered, + *and the content is always scaled to the size of the component. */ + ARKUI_RENDER_FIT_RESIZE_FILL, + /** Reduce or enlarge the aspect ratio of the animation final state content, + * so that the content is fully displayed in the component, + * and keep the center aligned with the component. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN, + /** Keep the aspect ratio of the animation final state content to reduce or enlarge, + * so that the content is fully displayed in the component. + * When there is left over in the broad direction of the component, + * the content is aligned to the left of the component, + * and when there is left over in the high direction of the component, + * the content is aligned to the top of the component. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN_TOP_LEFT, + /** Keep the aspect ratio of the animation final state content to reduce or enlarge, + * so that the content is fully displayed in the component. + * When there is left in the wide direction of the component, + * the content is aligned with the component on the right. + * When there is left in the high direction of the component, + * the content is aligned with the component on the bottom. */ + ARKUI_RENDER_FIT_RESIZE_CONTAIN_BOTTOM_RIGHT, + /** Keep the aspect ratio of the animation final state content reduced or enlarged, + * so that both sides of the content are greater than or equal to both sides of the component, + * and keep the center aligned with the component to display the middle part of the content. */ + ARKUI_RENDER_FIT_RESIZE_COVER, + /** Keep the aspect ratio of the final content of the animation reduced or enlarged + * so that both sides of the content are exactly greater than or equal to both sides of the component. + * When the content width is left, the content is aligned to the left of the component, + * and the left portion of the content is displayed. When the content is left in the high direction, + * the content and the component remain top aligned, showing the top side of the content. */ + ARKUI_RENDER_FIT_RESIZE_COVER_TOP_LEFT, + /** Keep the aspect ratio of the final content of the animation reduced or enlarged so + * that both sides of the content are exactly greater than or equal to both sides of the component. + * When the content width is left, the content and the component remain right aligned, + * and the right part of the content is displayed. When the content is left in the high direction, + * the content and the component remain aligned at the bottom, + * and the bottom part of the content is displayed. */ + ARKUI_RENDER_FIT_RESIZE_COVER_BOTTOM_RIGHT +} ArkUI_RenderFit; + +/** + * @brief Enumerates the theme color. + * + * @since 12 + */ +typedef enum { + /** Follow the system dark light mode. */ + ARKUI_THEME_COLOR_MODE_SYSTEM = 0, + /** Fixed use light color mode. */ + ARKUI_THEME_COLOR_MODE_LIGHT, + /** Fixed use dark mode. */ + ARKUI_THEME_COLOR_MODE_DARK +} ArkUI_ThemeColorMode; + +/** + * @brief Enumerates the button types. + * + * @since 12 + */ +typedef enum { + /** Normal button (without rounded corners by default). */ + ARKUI_BUTTON_TYPE_NORMAL = 0, + /** Capsule-type button (the round corner is half of the height by default). */ + ARKUI_BUTTON_TYPE_CAPSULE, + /** Circle button. */ + ARKUI_BUTTON_TYPE_CIRCLE, +} ArkUI_ButtonType; + +/** + * @brief Enumerates the autofill types. + * + * @since 12 + */ +typedef enum { + /** Username. Password Vault, when enabled, can automatically save and fill in usernames. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_USER_NAME = 0, + /** Password. Password Vault, when enabled, can automatically save and fill in passwords. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PASSWORD, + /** New password. Password Vault, when enabled, can automatically generate a new password. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_NEW_PASSWORD, + /** Full street address. The scenario-based autofill feature, when enabled, can automatically save and fill in full + * street addresses. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_STREET_ADDRESS, + /** House number. The scenario-based autofill feature, when enabled, can automatically save and fill in house + * numbers. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_HOUSE_NUMBER, + /** District and county. The scenario-based autofill feature, when enabled, can automatically save and fill in + * districts and counties. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_DISTRICT_ADDRESS, + /** City. The scenario-based autofill feature, when enabled, can automatically save and fill in cities. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_CITY_ADDRESS, + /** Province. The scenario-based autofill feature, when enabled, can automatically save and fill in provinces. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PROVINCE_ADDRESS, + /** Country. The scenario-based autofill feature, when enabled, can automatically save and fill in countries. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_COUNTRY_ADDRESS, + /** Full name. The scenario-based autofill feature, when enabled, can automatically save and fill in full names. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FULL_NAME, + /** Last name. The scenario-based autofill feature, when enabled, can automatically save and fill in last names. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_LAST_NAME, + /** First name. The scenario-based autofill feature, when enabled, can automatically save and fill in first names. + */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PERSON_FIRST_NAME, + /** Phone number. The scenario-based autofill feature, when enabled, can automatically save and fill in phone + * numbers. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_NUMBER, + /** Country code. The scenario-based autofill feature, when enabled, can automatically save and fill in country + * codes. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_PHONE_COUNTRY_CODE, + /** Phone number with country code. The scenario-based autofill feature, when enabled, can automatically save and + * fill in phone numbers with country codes. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_FULL_PHONE_NUMBER, + /** Email address. The scenario-based autofill feature, when enabled, can automatically save and fill in email + * addresses. */ + ARKUI_TEXTINPUT_CONTENT_EMAIL_ADDRESS, + /** Bank card number. The scenario-based autofill feature, when enabled, can automatically save and fill in bank + * card numbers. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_BANK_CARD_NUMBER, + /** ID card number. The scenario-based autofill feature, when enabled, can automatically save and fill in ID card + * numbers. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_ID_CARD_NUMBER, + /** Nickname. The scenario-based autofill feature, when enabled, can automatically save and fill in nicknames. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_NICKNAME, + /** Address information without street address. The scenario-based autofill feature, when enabled, can automatically + * save and fill in address information without street addresses. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_DETAIL_INFO_WITHOUT_STREET, + /** Standard address. The scenario-based autofill feature, when enabled, can automatically save and fill in standard + * addresses. */ + ARKUI_TEXTINPUT_CONTENT_TYPE_FORMAT_ADDRESS, +} ArkUI_TextInputContentType; + +/** + * @brief Defines the text input style. + * + * @since 12 + */ +typedef enum { + /** Default style. The caret width is fixed at 1.5 vp, and the caret height is subject to the background height and + * font size of the selected text. */ + ARKUI_TEXTINPUT_STYLE_DEFAULT = 0, + /** Inline input style. The background height of the selected text is the same as the height of the text box. */ + ARKUI_TEXTINPUT_STYLE_INLINE +} ArkUI_TextInputStyle; + +/** + * @brief Defines the entity type for text recognition. + * + * @since 12 + */ +typedef enum { + /** Phone Number.*/ + ARKUI_TEXT_DATA_DETECTOR_TYPE_PHONE_NUMBER = 0, + /** Link. */ + ARKUI_TEXT_DATA_DETECTOR_TYPE_URL, + /** Mailbox. */ + ARKUI_TEXT_DATA_DETECTOR_TYPE_EMAIL, + /** Address. */ + ARKUI_TEXT_DATA_DETECTOR_TYPE_ADDRESS, +} ArkUI_TextDataDetectorType; + +/** + * @brief Define the navigation indicator type of the swiper. + * + * @since 12 + */ +typedef enum { + /** dot type. */ + ARKUI_SWIPER_INDICATOR_TYPE_DOT, + /** digit type. */ + ARKUI_SWIPER_INDICATOR_TYPE_DIGIT, +} ArkUI_SwiperIndicatorType; + /** * @brief Creates a size constraint. * @@ -1613,6 +1951,15 @@ ArkUI_WaterFlowSectionOption* OH_ArkUI_WaterFlowSectionOption_Create(); */ void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* option); +/** +* @brief Sets the FlowItem block configuration information array length. +* +* @param option FlowItem Indicates the packet configuration. +* @param size Array Length. +* @since 12 +*/ +void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size); + /** * @brief Sets the number of items in a water flow section. * @@ -1642,8 +1989,8 @@ int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOptio * @param crossCount Indicates the number of columns or rows, depending on the layout direction. * @since 12 */ -void OH_ArkUI_WaterFlowSectionOption_SetCrossCount(ArkUI_WaterFlowSectionOption* option, - int32_t index, int32_t crossCount); +void OH_ArkUI_WaterFlowSectionOption_SetCrossCount( + ArkUI_WaterFlowSectionOption* option, int32_t index, int32_t crossCount); /** * @brief Obtains the number of columns (in a vertical layout) or rows (in a horizontal layout) in the water flow section @@ -1731,6 +2078,633 @@ ArkUI_Margin OH_ArkUI_WaterFlowSectionOption_GetMargin(ArkUI_WaterFlowSectionOpt * @since 12 */ int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index); + +/** + * @brief Creates a navigation indicator. + * + * @param type Indicates the type of the indicator. + * @return Returns the pointer to the new indicator. + * @since 12 +*/ +ArkUI_SwiperIndicator* OH_ArkUI_SwiperIndicator_Create(ArkUI_SwiperIndicatorType type); + +/** + * @brief Destroys the pointer to the indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_Dispose(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the distance between the navigation point and the start of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the distance between the navigation point and the start of the swiper. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetStartPosition(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the distance between the navigation point and the start of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the distance between the navigation point and the start of the swiper. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetStartPosition(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the distance between the navigation point and the top of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the distance between the navigation point and the top of the swiper. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetTopPosition(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the distance between the navigation point and the top of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the distance between the navigation point and the top of the swiper. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetTopPosition(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the distance between the navigation point and the right of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the distance between the navigation point and the right of the swiper. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetEndPosition(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the distance between the navigation point and the end of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the distance between the navigation point and the end of the swiper. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetEndPosition(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the distance between the navigation point and the bottom of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the distance between the navigation point and the bottom of the swiper. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetBottomPosition(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the distance between the navigation point and the bottom of the swiper. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the distance between the navigation point and the bottom of the swiper. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetBottomPosition(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the width of the dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the width of the dot for the dot indicator. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetItemWidth(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the width of the dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the width of the dot for the dot indicator. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetItemWidth(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the height of the dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the height of the dot for the dot indicator. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetItemHeight(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the height of the dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the height of the dot for the dot indicator. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetItemHeight(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the width of the selected dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the width of the selected dot for the dot indicator. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetSelectedItemWidth(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the width of the selected dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the width of the selected dot for the dot indicator. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetSelectedItemWidth(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the height of the selected dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param value Indicates the height of the selected dot for the dot indicator. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetSelectedItemHeight(ArkUI_SwiperIndicator* indicator, float value); + +/** + * @brief Obtains the height of the selected dot for the dot indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the height of the selected dot for the dot indicator. + * @since 12 +*/ +float OH_ArkUI_SwiperIndicator_GetSelectedItemHeight(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets whether to display the mask style of the dot navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param mask Whether to display the mask style. True means to display. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetMask(ArkUI_SwiperIndicator* indicator, int32_t mask); + +/** + * @brief Obtains whether to display the mask style of the dot navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns whether to display the mask style. True means to display. + * @since 12 +*/ +int32_t OH_ArkUI_SwiperIndicator_GetMask(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the color of the dot navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param color the color of the dot navigation indicator, in 0xARGB format. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetColor(ArkUI_SwiperIndicator* indicator, uint32_t color); + +/** + * @brief Obtains the color of the dot navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the color of the dot navigation indicator, in 0xARGB format. + * @since 12 +*/ +uint32_t OH_ArkUI_SwiperIndicator_GetColor(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Sets the color of the selected dot for the navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @param color the color of the selected dot, in 0xARGB format. + * @since 12 +*/ +void OH_ArkUI_SwiperIndicator_SetSelectedColor(ArkUI_SwiperIndicator* indicator, uint32_t selectedColor); + +/** + * @brief Obtains the color of the selected dot for the dot navigation indicator. + * + * @param indicator Indicates the pointer to the indicator. + * @return Returns the color of the selected dot, in 0xARGB format. + * @since 12 +*/ +uint32_t OH_ArkUI_SwiperIndicator_GetSelectedColor(ArkUI_SwiperIndicator* indicator); + +/** + * @brief Create auxiliary line information in the RelativeContaine container. + * + * @param size The number of auxiliary lines. + * @return auxiliary line information. + * @since 12 + */ +ArkUI_GuidelineOption* OH_ArkUI_GuidelineOption_Create(int32_t size); + +/** + * @brief Destroy auxiliary line information. + * + * @param guideline auxiliary line information. + * @since 12 + */ +void OH_ArkUI_GuidelineOption_Dispose(ArkUI_GuidelineOption* guideline); + +/** + * @brief Set the Id of the auxiliary line. + * + * @param guideline auxiliary line information. + * @param value id, must be unique and cannot have the same name as the component in the container. + * @param index auxiliary line index value. + * @since 12 + */ +void OH_ArkUI_GuidelineOption_SetId(ArkUI_GuidelineOption* guideline, const char* value, int32_t index); + +/** + * @brief Set the direction of the auxiliary line. + * + * @param guideline auxiliary line information. + * @param value direction. + * @param index auxiliary line index value. + * @since 12 + */ +void OH_ArkUI_GuidelineOption_SetDirection(ArkUI_GuidelineOption* guideline, ArkUI_Axis value, int32_t index); + +/** + * @brief Set the distance from the left or top of the container. + * + * @param guideline auxiliary line information. + * @param value The distance from the left or top of the container. + * @param index auxiliary line index value. + * @since 12 + */ +void OH_ArkUI_GuidelineOption_SetPositionStart(ArkUI_GuidelineOption* guideline, float value, int32_t index); + +/** + * @brief Set the distance from the right or bottom of the container. + * + * @param guideline auxiliary line information. + * @param value The distance from the right side or bottom of the container. + * @param index auxiliary line index value. + * @since 12 + */ +void OH_ArkUI_GuidelineOption_SetPositionEnd(ArkUI_GuidelineOption* guideline, float value, int32_t index); + +/** + * @brief Get the Id of the auxiliary line. + * + * @param guideline auxiliary line information. + * @param index auxiliary line index value. + * @return Id. + * @since 12 + */ +const char* OH_ArkUI_GuidelineOption_GetId(ArkUI_GuidelineOption* guideline, int32_t index); + +/** + * @brief Get the direction of the auxiliary line. + * + * @param guideline auxiliary line information. + * @param index auxiliary line index value. + * @return direction. + * @since 12 + */ +ArkUI_Axis OH_ArkUI_GuidelineOption_GetDirection(ArkUI_GuidelineOption* guideline, int32_t index); + +/** + * @brief Get the distance from the left or top of the container. + * + * @param guideline auxiliary line information. + * @param index auxiliary line index value. + * @return The distance from the left or top of the container. + * @since 12 + */ +float OH_ArkUI_GuidelineOption_GetPositionStart(ArkUI_GuidelineOption* guideline, int32_t index); + +/** + * @brief Get the distance from the right side or bottom of the container. + * + * @param guideline auxiliary line information. + * @param index auxiliary line index value. + * @return The distance from the right side or bottom of the container. + * @since 12 + */ +float OH_ArkUI_GuidelineOption_GetPositionEnd(ArkUI_GuidelineOption* guideline, int32_t index); + +/** + * @brief creates barrier information within the RelativeContaine container. + * + * @param size Number of barriers. + * @return barrier information. + * @since 12 + */ +ArkUI_BarrierOption* OH_ArkUI_BarrierOption_Create(int32_t size); + +/** + * @brief Destroy barrier information. + * + * @param barrierStyle barrier information. + * @since 12 + */ +void OH_ArkUI_BarrierOption_Dispose(ArkUI_BarrierOption* barrierStyle); + +/** + * @brief Set the Id of the barrier. + * + * @param barrierStyle barrier information. + * @param value id, must be unique and cannot have the same name as the component in the container. + * @param index Barrier index value. + * @since 12 + */ +void OH_ArkUI_BarrierOption_SetId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index); + +/** + * @brief Set the direction of the barrier. + * + * @param barrierStyle barrier information. + * @param value direction. + * @param index Barrier index value. + * @since 12 + */ +void OH_ArkUI_BarrierOption_SetDirection( + ArkUI_BarrierOption* barrierStyle, ArkUI_BarrierDirection value, int32_t index); + +/** + * @brief Sets the dependent component of the barrier. + * + * @param barrierStyle barrier information. + * @param value The ID of the dependent component. + * @param index Barrier index value. + * @since 12 + */ +void OH_ArkUI_BarrierOption_SetReferencedId(ArkUI_BarrierOption* barrierStyle, const char* value, int32_t index); + +/** + * @brief Get the Id of the barrier. + * + * @param barrierStyle auxiliary line information. + * @param index auxiliary line index value. + * @return The Id of the barrier. + * @since 12 + */ +const char* OH_ArkUI_BarrierOption_GetId(ArkUI_BarrierOption* barrierStyle, int32_t index); + +/** + * @brief Gets the direction of the barrier. + * + * @param barrierStyle auxiliary line information. + * @param index auxiliary line index value. + * @return The direction of the barrier. + * @since 12 + */ +ArkUI_BarrierDirection OH_ArkUI_BarrierOption_GetDirection(ArkUI_BarrierOption* barrierStyle, int32_t index); + +/** + * @brief Get the dependent components of the barrier. + * + * @param barrierStyle auxiliary line information. + * @param index auxiliary line index value. + * @param referencedIndex dependent component Id index value. + * @return The barrier's dependent components. + * @since 12 + */ +const char* OH_ArkUI_BarrierOption_GetReferencedId( + ArkUI_BarrierOption* barrierStyle, int32_t index, int32_t referencedIndex); + +/** + * @brief Gets the number of dependent components of the barrier. + * + * @param barrierStyle auxiliary line information. + * @param index auxiliary line index value. + * @return The number of dependent components of the barrier. + * @since 12 + */ +int32_t OH_ArkUI_BarrierOption_GetReferencedIdSize(ArkUI_BarrierOption* barrierStyle, int32_t index); + +/** + * @brief creates alignment rule information for subcomponents in relative containers. + * + * @return Alignment rule information. + * @since 12 + */ +ArkUI_AlignmentRuleOption* OH_ArkUI_AlignmentRuleOption_Create(); + +/** + * @brief Destroys the alignment rule information of subcomponents in relative containers. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_Dispose(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Set the start alignment parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to the anchor component. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetStart( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); + +/** + * @brief Set the end alignment parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to the anchor component. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetEnd( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); + +/** + * @brief Set the parameters for horizontal center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to anchor component + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetMiddle( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_HorizontalAlignment alignment); + +/** + * @brief Set the parameters for top alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to anchor component + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetTop(ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); + +/** + * @brief Set the bottom alignment parameters. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to anchor component + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetBottom( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); + +/** + * @brief Set the parameters for vertical center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param id The id value of the anchor component. + * @param value Alignment relative to the anchor component. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetCenter( + ArkUI_AlignmentRuleOption* option, const char* id, ArkUI_VerticalAlignment alignment); + +/** + * @brief Sets the horizontal offset parameter of the component under the anchor point constraint. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param horizontal bias value in the horizontal direction. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetBiasHorizontal(ArkUI_AlignmentRuleOption* option, float horizontal); + +/** + * @brief Set the vertical offset parameter of the component under the anchor point constraint. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @param horizontal bias value in the vertical direction. + * @since 12 + */ +void OH_ArkUI_AlignmentRuleOption_SetBiasVertical(ArkUI_AlignmentRuleOption* option, float vertical); + +/** + * @brief Get the Id of the start-aligned parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The id value of the anchor component. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetStartId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Gets the alignment of the start-aligned parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the parameters. + * @since 12 + */ +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetStartAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the end alignment parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return End-aligned parameter id. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetEndId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the end alignment parameter. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the end-aligned parameter. + * @since 12 + */ +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetEndAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Gets the parameters of horizontal center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The id of the parameter of horizontal center alignment. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetMiddleId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Gets the parameters of horizontal center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the horizontally centered alignment parameter. + * @since 12 + */ +ArkUI_HorizontalAlignment OH_ArkUI_AlignmentRuleOption_GetMiddleAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the top-aligned parameters. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return Top aligned parameter id. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetTopId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the top-aligned parameters. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the top-aligned parameter. + * @since 12 + */ +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetTopAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the bottom alignment parameters. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The id of the bottom-aligned parameter. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetBottomId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the bottom alignment parameters. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the bottom-aligned parameter. + * @since 12 + */ +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetBottomAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Gets the parameters of vertical center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The id of the vertical center alignment parameter. + * @since 12 + */ +const char* OH_ArkUI_AlignmentRuleOption_GetCenterId(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Gets the parameters of vertical center alignment. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The alignment of the vertical center alignment parameter. + * @since 12 + */ +ArkUI_VerticalAlignment OH_ArkUI_AlignmentRuleOption_GetCenterAlign(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the bias value in the horizontal direction. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return The bias value in the horizontal direction. + * @since 12 + */ +float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption* option); + +/** + * @brief Get the bias value in the vertical direction. + * + * @param option Alignment rule information of subcomponents in the relative container. + * @return bias value in vertical direction. + * @since 12 +*/ +float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option); #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index afb29c8f4..720557eef 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -57,6 +57,7 @@ typedef enum { ARKUI_UIINPUTEVENT_TYPE_UNKNOWN = 0, ARKUI_UIINPUTEVENT_TYPE_TOUCH = 1, ARKUI_UIINPUTEVENT_TYPE_AXIS = 2, + ARKUI_UIINPUTEVENT_TYPE_MOUSE = 3, } ArkUI_UIInputEvent_Type; /** @@ -141,6 +142,42 @@ typedef enum { HTM_NONE, } HitTestMode; +/** + * @brief Define the Action Code for mouse events. + * + * @since 12 + */ +enum { + /** Invalid. */ + UI_MOUSE_EVENT_ACTION_UNKNOWN = 0, + /** Press. */ + UI_MOUSE_EVENT_ACTION_PRESS = 1, + /** Release. */ + UI_MOUSE_EVENT_ACTION_RELEASE = 2, + /** Move. */ + UI_MOUSE_EVENT_ACTION_MOVE = 3, +}; + +/** + * @brief Define the button type for mouse events. + * + * @since 12 + */ +enum { + /** None. */ + UI_MOUSE_EVENT_BUTTON_NONE = 0, + /** Left. */ + UI_MOUSE_EVENT_BUTTON_LEFT = 1, + /** Right. */ + UI_MOUSE_EVENT_BUTTON_RIGHT = 2, + /** Middle. */ + UI_MOUSE_EVENT_BUTTON_MIDDLE = 3, + /** Back. */ + UI_MOUSE_EVENT_BUTTON_BACK = 4, + /** Forward. */ + UI_MOUSE_EVENT_BUTTON_FORWARD = 5, +}; + /** * @brief Obtains the type of this UI input event. * @@ -629,6 +666,26 @@ double OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(const ArkUI_UIInputEvent* event */ int32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode(const ArkUI_UIInputEvent* event, HitTestMode mode); +/** + * @brief Get the value of the button type for mouse events. + * + * @param event Represents a pointer to the current UI input event. + * @return Return to the mouse button type, where 1 is the left button, 2 is the right button, + * 4 is the middle button, 8 is the back button, and 16 is the forward button. + * @since 12 + */ +int32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event); + +/** + * @brief Get the value of the mouse action type for mouse events. + * + * @param event Represents a pointer to the current UI input event. + * @return Returns the type of mouse action, where 1 represents button pressed, + * 2 represents button released, and 3 represents mouse movement. + * @since 12 + */ +int32_t OH_ArkUI_MouseEvent_GetMouseAction(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 155964f0b..64a75c166 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -593,6 +593,16 @@ int32_t OH_NativeWindow_CreateNativeWindowFromSurfaceId(uint64_t surfaceId, OHNa * @version 1.0 */ int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHScalingModeV2 scalingMode); + +/** + * @brief Set native window buffer hold. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow + * @param window Indicates the pointer to an OHNativeWindow instance. + * @since 12 + * @version 1.0 + */ +void OH_NativeWindow_SetBufferHold(OHNativeWindow *window); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json index 5d7c89278..668400ec6 100644 --- a/graphic/graphic_2d/native_window/libnative_window.ndk.json +++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json @@ -24,5 +24,6 @@ { "name": "OH_NativeWindow_GetSurfaceId"}, { "name": "OH_NativeWindow_CreateNativeWindowFromSurfaceId"}, { "name": "OH_NativeWindow_NativeWindowAttachBuffer" }, - { "name": "OH_NativeWindow_NativeWindowDetachBuffer" } + { "name": "OH_NativeWindow_NativeWindowDetachBuffer" }, + { "name": "OH_NativeWindow_SetBufferHold" } ] \ No newline at end of file -- Gitee From 222d5742cd2debc0a6e2304a4a1715fab84a5fc5 Mon Sep 17 00:00:00 2001 From: yyuanche Date: Thu, 2 May 2024 10:56:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90NDK=E3=80=915toD=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=A1=A5=E5=85=85=20Signed-off-by:=20yyuanche=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkui/ace_engine/native/native_node.h | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 9cc986bc4..964e6d177 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3760,6 +3760,30 @@ typedef enum { * The type is 0xARGB, and the default value is 0xFFFFFFF. \n */ NODE_RADIO_STYLE, + /** + * @brief Sets the value of the current radio. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Attribute setting method {@Link ArkUI_AttributeItem} Parameter format:\n + * .string: radio value.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: radio value.\n + * + */ + NODE_RADIO_VALUE, + /** + * @brief 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 {@Link ArkUI_AttributeItem} Parameter format:\n + * .string: name of the group to which the current option box belongs.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .string: name of the group to which the current option box belongs.\n + * + */ + NODE_RADIO_GROUP, /** * @brief Defines the alignment mode of the child components in the container. This attribute can be set, reset, @@ -4621,6 +4645,25 @@ typedef enum { */ NODE_WATER_FLOW_SCROLL_TO_INDEX, + /** + * @brief 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 {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: minimum width, in vp.\n + * .value[1].f32: maximum width, in vp.\n + * .value[2].f32: minimum height, in vp.\n + * .value[3].f32: maximum height, in vp.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: minimum width, in vp.\n + * .value[1].f32: maximum width, in vp.\n + * .value[2].f32: minimum height, in vp.\n + * .value[3].f32: maximum height, in vp.\n + * + */ + NODE_WATER_FLOW_ITEM_CONSTRAINT_SIZE, + /** * @brief Set the auxiliary line in the RelativeContaine container, supporting property setting, * property reset and property acquisition interfaces. -- Gitee