diff --git a/arkui/ace_engine/native/BUILD.gn b/arkui/ace_engine/native/BUILD.gn
index 024c38820107138ac373d6bccaeac3e9c1ce87fc..46ff70046e603d3ad39f46f20e6d960b1da4905e 100644
--- a/arkui/ace_engine/native/BUILD.gn
+++ b/arkui/ace_engine/native/BUILD.gn
@@ -34,6 +34,7 @@ if (!is_arkui_x) {
"native_node.h",
"native_node_napi.h",
"native_type.h",
+ "styled_string.h",
"ui_input_event.h",
]
}
diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json
index e880238e0011ec4f2d59c2b1648313421234daab..177bc5d1c34e3fc74016f71edc287899b8dcb5c4 100644
--- a/arkui/ace_engine/native/libace.ndk.json
+++ b/arkui/ace_engine/native/libace.ndk.json
@@ -615,6 +615,10 @@
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_SetMargin"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_GetSize"
+ },
{
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_GetItemCount"
@@ -635,6 +639,14 @@
"first_introduced": "12",
"name": "OH_ArkUI_WaterFlowSectionOption_GetMargin"
},
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData"
+ },
{
"first_introduced": "12",
"name": "OH_ArkUI_AnimateOption_Create"
@@ -1058,5 +1070,181 @@
{
"first_introduced": "12",
"name": "OH_ArkUI_GetDrawableDescriptorFromResourceNapiValue"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_Destroy"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_PushTextStyle"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_AddText"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_PopTextStyle"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_CreateTypography"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_StyledString_AddPlaceholder"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetContent"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnAction"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetStart"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetEnd"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_PointerEvent_SetStopPropagation"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPosition"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPositionInWindow"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetLayoutPositionInScreen"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Create"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Dispose"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Resize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_Splice"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_UpdateSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListChildrenMainSizeOption_GetMainSize"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_List_CloseAllSwipeActions"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData"
+ },
+ {
+ "first_introduced": "12",
+ "name": "OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData"
}
]
\ No newline at end of file
diff --git a/arkui/ace_engine/native/native_animate.h b/arkui/ace_engine/native/native_animate.h
index fbafc396fba73d771c4b67c49591091af895dfdd..dfef24f5e2479b71163bd58ba3a7cdb7e8764333 100644
--- a/arkui/ace_engine/native/native_animate.h
+++ b/arkui/ace_engine/native/native_animate.h
@@ -76,7 +76,9 @@ typedef struct {
* @param update Indicates the animation closure. The system automatically inserts a transition animation
* for the state change caused by the closure.
* @param complete Indicates the callback to be invoked when the animation playback is complete.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*animateTo)(ArkUI_ContextHandle context, ArkUI_AnimateOption* option, ArkUI_ContextCallback* update,
ArkUI_AnimateCompleteCallback* complete);
diff --git a/arkui/ace_engine/native/native_dialog.h b/arkui/ace_engine/native/native_dialog.h
index 73e35a6b2e9aae403790a976761567299495fd71..efa5cf998d40a96f9d8ff846d0c4d73d68115895 100644
--- a/arkui/ace_engine/native/native_dialog.h
+++ b/arkui/ace_engine/native/native_dialog.h
@@ -67,7 +67,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param content Indicates the pointer to the root node of the custom dialog box content.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setContent)(ArkUI_NativeDialogHandle handle, ArkUI_NodeHandle content);
/**
@@ -75,7 +77,9 @@ typedef struct {
*
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*removeContent)(ArkUI_NativeDialogHandle handle);
/**
@@ -86,7 +90,9 @@ typedef struct {
* @param alignment Indicates the alignment mode. The parameter type is {@link ArkUI_Alignment}.
* @param offsetX Indicates the horizontal offset of the custom dialog box. The value is a floating point number.
* @param offsetY Indicates the vertical offset of the custom dialog box. The value is a floating point number.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setContentAlignment)(ArkUI_NativeDialogHandle handle, int32_t alignment, float offsetX, float offsetY);
/**
@@ -94,7 +100,9 @@ typedef struct {
*
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*resetContentAlignment)(ArkUI_NativeDialogHandle handle);
/**
@@ -104,7 +112,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param isModal Specifies whether the custom dialog box is a modal, which has a mask applied. The value
* true means that the custom dialog box is a modal, and false means the opposite.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setModalMode)(ArkUI_NativeDialogHandle handle, bool isModal);
/**
@@ -114,7 +124,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param autoCancel Specifies whether to allow users to touch the mask to dismiss the dialog box.
* The value true means to allow users to do so, and false means the opposite.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setAutoCancel)(ArkUI_NativeDialogHandle handle, bool autoCancel);
/**
@@ -125,7 +137,9 @@ typedef struct {
* @param maskColor Indicates the mask color, in 0xARGB format.
* @param maskRect Indicates the pointer to the mask area. Events outside the mask area are transparently
* transmitted, and events within the mask area are not. The parameter type is {@link ArkUI_Rect}.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setMask)(ArkUI_NativeDialogHandle handle, uint32_t maskColor, const ArkUI_Rect* maskRect);
/**
@@ -134,7 +148,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param backgroundColor Indicates the background color of the custom dialog box, in 0xARGB format.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setBackgroundColor)(ArkUI_NativeDialogHandle handle, uint32_t backgroundColor);
/**
@@ -146,7 +162,9 @@ typedef struct {
* @param topRight Indicates the radius of the upper right corner of the custom dialog box background.
* @param bottomLeft Indicates the radius of the lower left corner of the custom dialog box background.
* @param bottomRight Indicates the radius of the lower right corner of the custom dialog box background.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setCornerRadius)(ArkUI_NativeDialogHandle handle, float topLeft, float topRight,
float bottomLeft, float bottomRight);
@@ -157,7 +175,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param gridCount Indicates the number of grid columns occupied by the dialog box. The default value is subject to
* the window size, and the maximum value is the maximum number of columns supported by the system.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setGridColumnCount)(ArkUI_NativeDialogHandle handle, int32_t gridCount);
/**
@@ -170,7 +190,9 @@ typedef struct {
* the background color is transparent.
* false: The dialog box automatically adapts its width to the grid system and its height to the child
* components; the rounded corner is 24 vp.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*enableCustomStyle)(ArkUI_NativeDialogHandle handle, bool enableCustomStyle);
/**
@@ -180,7 +202,9 @@ typedef struct {
* @param handle Indicates the pointer to the custom dialog box controller.
* @param enableCustomAnimation Specifies whether to use a custom animation. The value true means to use a
* custom animation, and false means to use the default animation.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*enableCustomAnimation)(ArkUI_NativeDialogHandle handle, bool enableCustomAnimation);
/**
@@ -190,7 +214,9 @@ typedef struct {
* @note This method must be called before the show method.
* @param handle Indicates the pointer to the custom dialog box controller.
* @param eventHandler Indicates the callback to register. The parameter type is {@link ArkUI_OnWillDismissEvent}.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*registerOnWillDismiss)(ArkUI_NativeDialogHandle handle, ArkUI_OnWillDismissEvent eventHandler);
/**
@@ -198,14 +224,18 @@ typedef struct {
*
* @param handle Indicates the pointer to the custom dialog box controller.
* @param showInSubWindow Specifies whether to show the dialog box in a sub-window.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*show)(ArkUI_NativeDialogHandle handle, bool showInSubWindow);
/**
* @brief Closes a custom dialog box. If the dialog box has been closed, this API does not take effect.
*
* @param handle Indicates the pointer to the custom dialog box controller.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*close)(ArkUI_NativeDialogHandle handle);
} ArkUI_NativeDialogAPI_1;
diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h
index c907822ec9b245f1156f6ee1d4cf65ba75beae21..bff9710350ab25633ec5ecc093f33b93417872ef 100644
--- a/arkui/ace_engine/native/native_interface_xcomponent.h
+++ b/arkui/ace_engine/native/native_interface_xcomponent.h
@@ -632,8 +632,9 @@ int32_t OH_NativeXComponent_UnregisterOnFrameCallback(OH_NativeXComponent* compo
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param root Indicates the pointer to the component instance created by the native API.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*
* @since 12
*/
@@ -644,8 +645,9 @@ int32_t OH_NativeXComponent_AttachNativeRootNode(OH_NativeXComponent* component,
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param root Indicates the pointer to the component instance created by the native API.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*
* @since 12
*/
@@ -658,8 +660,9 @@ int32_t OH_NativeXComponent_DetachNativeRootNode(OH_NativeXComponent* component,
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param callback Indicates the pointer to the UI input event callback.
* @param type Indicates the type of the current UI input event.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_NativeXComponent_RegisterUIInputEventCallback(
@@ -709,8 +712,9 @@ int32_t OH_NativeXComponent_RegisterSurfaceHideCallback(
*
* @param component Indicates the pointer to the OH_NativeXComponent instance.
* @param callback Indicates the pointer to the custom event intercept callback.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_NativeXComponent_RegisterOnTouchInterceptCallback(
diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h
index 2e089f3e4f4450068d8e54293efeabd2cc7c6fe9..9d90d3e541db3e6bf38e17a0a7bf8f734edc8742 100644
--- a/arkui/ace_engine/native/native_node.h
+++ b/arkui/ace_engine/native/native_node.h
@@ -1603,6 +1603,56 @@ typedef enum {
*/
NODE_LAYOUT_RECT,
+ /**
+ * @brief Whether the current component supports click-to-focus capability,
+ * 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].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_FOCUS_ON_TOUCH,
+
+ /**
+ * @brief Defines the border 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
+ * 1: .value[0].f32: width of the four borders, in percentage. \n
+ * 2: .value[0].f32: width of the top border, in percentage. \n
+ * .value[1].f32: width of the right border, in percentage. \n
+ * .value[2].f32: width of the bottom border, in percentage. \n
+ * .value[3].f32: width of the right border, in percentage. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: width of the top border, in percentage. \n
+ * .value[1].f32: width of the right border, in percentage. \n
+ * .value[2].f32: width of the bottom border, in percentage. \n
+ * .value[3].f32: width of the right border, in percentage. \n
+ *
+ */
+ NODE_BORDER_WIDTH_PERCENT = 85,
+ /**
+ * @brief Defines the border corner radius attribute, which can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * 1: .value[0].f32: radius of the four corners, in percentage. \n
+ * 2: .value[0].f32: radius of the upper left corner, in percentage. \n
+ * .value[1].f32: radius of the upper right corner, in percentage. \n
+ * .value[2].f32: radius of the lower left corner, in percentage. \n
+ * .value[3].f32: radius of the lower right corner, in percentage. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: radius of the upper left corner, in percentage. \n
+ * .value[1].f32: radius of the upper right corner, in percentage. \n
+ * .value[2].f32: radius of the lower left corner, in percentage. \n
+ * .value[3].f32: radius of the lower right corner, in percentage. \n
+ *
+ */
+ NODE_BORDER_RADIUS_PERCENT = 86,
+
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@@ -1952,6 +2002,18 @@ typedef enum {
*/
NODE_TEXT_SELECTED_BACKGROUND_COLOR,
+ /**
+ * @brief The text component uses a formatted string object to set text content properties,
+ * and supports property setting, property reset, and property acquisition interfaces.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object indicates ArkUI_StyledString formatted string data. The parameter type is {@link ArkUI_StyledString}. \n
+ */
+ NODE_TEXT_CONTENT_WITH_STYLED_STRING,
+
/**
* @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs.
*
@@ -1985,6 +2047,18 @@ typedef enum {
*
*/
NODE_SPAN_TEXT_BACKGROUND_STYLE,
+ /**
+ * @brief Defines the text baseline offset attribute
+ * 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: baseline offset, in fp.\n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: baseline offset, in fp. \n
+ *
+ */
+ NODE_SPAN_BASELINE_OFFSET,
/**
* @brief Defines the image source of the image span.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -2013,6 +2087,20 @@ typedef enum {
*
*/
NODE_IMAGE_SPAN_VERTICAL_ALIGNMENT,
+ /**
+ * @brief Defines the placeholder image source.
+ * This attribute can be set, reset, and obtained as required through APIs.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .string: placeholder image source. \n
+ * .object: 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: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n
+ *
+ */
+ NODE_IMAGE_SPAN_ALT,
/**
* @brief Defines the image source of the component.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -2094,9 +2182,11 @@ typedef enum {
*
* Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
* .string: placeholder image source. \n
+ * .object: 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: placeholder image source. \n
+ * .object: The parameter type is {@link ArkUI_DrawableDescriptor}.\n
*
*/
NODE_IMAGE_ALT,
@@ -4179,6 +4269,17 @@ typedef enum {
*/
NODE_LIST_ALIGN_LIST_ITEM,
+ /**
+ * @brief Set the default spindle size for the List subcomponent.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ */
+ NODE_LIST_CHILDREN_MAIN_SIZE = 1003007,
+
/**
* @brief Defines whether to enable loop playback for the swiper.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4444,6 +4545,19 @@ typedef enum {
*/
NODE_SWIPER_SWIPE_TO_INDEX,
+ /**
+ * @brief: Set the delineation component of the ListItem, supporting property settings, property resets, and
+ * property acquisition interfaces.
+ *
+ * Attribute setting method parameter {@link ArkUI_AttributeItem} format: \n
+ * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n
+ * \n
+ * The return value of the attribute acquisition method {@link ArkUI_AttributeItem} format: \n
+ * .object: Construct using the {@link ArkUI_ListitemSwipeActionOption} object. \n
+ *
+ */
+ NODE_LIST_ITEM_SWIPE_ACTION = MAX_NODE_SCOPE_NUM * ARKUI_NODE_LIST_ITEM,
+
/**
* @brief Defines the header of the list item group.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4487,6 +4601,17 @@ typedef enum {
*/
NODE_LIST_ITEM_GROUP_SET_DIVIDER,
+ /**
+ * @brief Set the default spindle size for the ListItem Group subcomponent.
+ *
+ * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .object: The parameter format is {@ ArkUI-ListChildrenMainSize} \n
+ */
+ NODE_LIST_ITEM_GROUP_CHILDREN_MAIN_SIZE = 1005003,
+
/**
* @brief Defines the horizontal alignment mode of child components in the column.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -4593,6 +4718,18 @@ typedef enum {
*
*/
NODE_REFRESH_CONTENT,
+ /**
+ * @brief Set the pull-down hand coefficient.
+ * 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:Pull-down hand coefficient, valid value between 0 and 1.
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32:Pull-down hand coefficient, valid value between 0 and 1.
+ *
+ */
+ NODE_REFRESH_PULL_DOWN_RATIO = 1009002,
/**
* @brief Defines the main axis direction of the component layout.
@@ -5438,6 +5575,32 @@ typedef enum {
*/
NODE_SWIPER_EVENT_ON_GESTURE_SWIPE,
+ /**
+ * @brief Define the ARKUI_NODE_SWIPER to listen for Swiper page slide events.
+ * Instruction: \n
+ * 1. If the {@link ArkUI_SwiperDisplayModeType} attribute is set to \n
+ * ARKUI_SWIPER_DISPLAY_MODE_AUTO_LINEAR, the interface does not take effect. \n
+ * 2, circular scenario, set prevMargin and nextMargin attributes, \n
+ * so that Swiper front and back end display the same page, the interface does not take effect. \n
+ * 3. During page sliding, the ContentDidScrollCallback callback is \n
+ * triggered frame-by-frame for all pages in the window. \n
+ * For example, when there are two pages in the window with subscripts 0 and 1, \n
+ * callbacks with index values 0 and 1 are triggered twice per frame. \n
+ * 4, set the swipeByGroup parameter of the displayCount property to \n
+ * true if at least one page in the same group is in the window, \n
+ * A callback is triggered for all pages in the group. \n
+ * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is
+ * {@link ArkUI_NodeComponentEvent}. \n
+ * {@link ArkUI_NodeComponentEvent} contains four parameters:\n
+ * ArkUI_NodeComponentEvent.data[0].i32 : indicates the index of the Swiper component, \n
+ * which is consistent with the index change in the onChange event. \n
+ * ArkUI_NodeComponentEvent.data[1].i32 : The index of a page in the window. \n
+ * ArkUI_NodeComponentEvent.data[2].f32 : The proportion of page movement relative to \n
+ * the start position of the Swiper spindle (selectedIndex corresponds to the start position of the page). \n
+ * ArkUI_NodeComponentEvent.data[3].f32 : The length of the page in the axis direction. \n
+ */
+ NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL,
+
/**
* @brief Defines the event triggered when the ARKUI_NODE_SCROLL component scrolls.
*
@@ -5637,6 +5800,16 @@ typedef enum {
*/
NODE_REFRESH_ON_REFRESH,
+ /**
+ * @brief Defines the event that is triggered when the ARKUI_NODE_REFRESH drop-down distance changes.
+ *
+ * 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].f32: Pull-down distance. \n
+ */
+ NODE_REFRESH_ON_OFFSET_CHANGE,
+
/**
* @brief Defines the event triggered when the ARKUI_NODE_SCROLL component is about to scroll.
*
@@ -5857,8 +6030,9 @@ void OH_ArkUI_NodeAdapter_Dispose(ArkUI_NodeAdapterHandle handle);
*
* @param handle Indicates the target component adapter.
* @param size Indicates the number of elements.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_SetTotalNodeCount(ArkUI_NodeAdapterHandle handle, uint32_t size);
@@ -5878,8 +6052,9 @@ uint32_t OH_ArkUI_NodeAdapter_GetTotalNodeCount(ArkUI_NodeAdapterHandle handle);
* @param handle Indicates the target component adapter.
* @param userData Indicates custom data.
* @param receiver Indicates the event receiver callback.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_RegisterEventReceiver(
@@ -5897,8 +6072,9 @@ void OH_ArkUI_NodeAdapter_UnregisterEventReceiver(ArkUI_NodeAdapterHandle handle
* @brief Instructs the specified adapter to reload all elements.
*
* @param handle Indicates the target component adapter.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle);
@@ -5909,8 +6085,9 @@ int32_t OH_ArkUI_NodeAdapter_ReloadAllItems(ArkUI_NodeAdapterHandle handle);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to reload.
* @param itemCount Indicates the number of the elements to reload.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_ReloadItem(
@@ -5922,8 +6099,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to remove.
* @param itemCount Indicates the number of the elements to remove.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_RemoveItem(
@@ -5935,8 +6113,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param startPosition Indicates the start position of the elements to insert.
* @param itemCount Indicates the number of the elements to insert.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_InsertItem(
@@ -5948,8 +6127,9 @@ ArkUI_NodeAdapterHandle handle, uint32_t startPosition, uint32_t itemCount);
* @param handle Indicates the target component adapter.
* @param from Indicates the start position of the elements to move.
* @param to Indicates the end position of the elements to move.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t from, uint32_t to);
@@ -5963,8 +6143,9 @@ int32_t OH_ArkUI_NodeAdapter_MoveItem(ArkUI_NodeAdapterHandle handle, uint32_t f
* @param handle Indicates the target component adapter.
* @param items Indicates the pointer to the array of the elements in the adapter.
* @param size Indicates the number of elements.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapter_GetAllItems(ArkUI_NodeAdapterHandle handle, ArkUI_NodeHandle** items, uint32_t* size);
@@ -6008,8 +6189,9 @@ uint32_t OH_ArkUI_NodeAdapterEvent_GetItemIndex(ArkUI_NodeAdapterEvent* event);
* @brief Obtains the scrollable container node that uses the specified adapter.
*
* @param event Indicates the target adapter event.
-* @return Returns 0 if success.
-* Returns 401 if a parameter exception occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* event);
@@ -6019,7 +6201,9 @@ ArkUI_NodeHandle OH_ArkUI_NodeAdapterEvent_GetHostNode(ArkUI_NodeAdapterEvent* e
*
* @param event Indicates the target adapter event.
* @param node Indicates the component to be added.
-* @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_NodeHandle node);
@@ -6029,7 +6213,9 @@ int32_t OH_ArkUI_NodeAdapterEvent_SetItem(ArkUI_NodeAdapterEvent* event, ArkUI_N
*
* @param event Indicates the target adapter event.
* @param id Indicates the component ID to set.
-* @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+* @return Returns the error code.
+* Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeAdapterEvent_SetNodeId(ArkUI_NodeAdapterEvent* event, int32_t id);
@@ -6066,10 +6252,12 @@ typedef struct {
*
* @param parent Indicates the pointer to the parent node.
* @param child Indicates the pointer to the child node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*addChild)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child);
@@ -6078,10 +6266,12 @@ typedef struct {
*
* @param parent Indicates the pointer to the parent node.
* @param child Indicates the pointer to the child node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*removeChild)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child);
@@ -6092,10 +6282,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param sibling Indicates the pointer to the sibling node after which the target node is to be inserted.
* If the value is null, the node is inserted at the start of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildAfter)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, ArkUI_NodeHandle sibling);
@@ -6106,10 +6298,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param sibling Indicates the pointer to the sibling node before which the target node is to be inserted.
* If the value is null, the node is inserted at the end of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildBefore)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, ArkUI_NodeHandle sibling);
@@ -6120,10 +6314,12 @@ typedef struct {
* @param child Indicates the pointer to the child node.
* @param position Indicates the position to which the target child node is to be inserted. If the value is a
* negative number or invalid, the node is inserted at the end of the parent node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*insertChildAt)(ArkUI_NodeHandle parent, ArkUI_NodeHandle child, int32_t position);
@@ -6133,11 +6329,14 @@ typedef struct {
* @param node Indicates the node whose attribute needs to be set.
* @param attribute Indicates the type of attribute to set.
* @param value Indicates the attribute value.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*setAttribute)(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute, const ArkUI_AttributeItem* item);
@@ -6158,11 +6357,14 @@ typedef struct {
*
* @param node Indicates the node whose attribute needs to be reset.
* @param attribute Indicates the type of attribute to reset.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*resetAttribute)(ArkUI_NodeHandle node, ArkUI_NodeAttributeType attribute);
@@ -6176,11 +6378,14 @@ typedef struct {
* @param targetId Indicates the custom event ID, which is passed in the callback of {@link ArkUI_NodeEvent}
* when the event is triggered.
* @param userData Indicates the custom event parameter, which is passed in the callback of {@link ArkUI_NodeEvent}
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
- * Returns 106103 if the following operations are not allowed on BuilderNode generated nodes: setting or resetting
- * attributes, setting events, or adding or editing subnodes.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
+ * Returns {@link ARKUI_ERROR_CODE_NOT_SUPPROTED_FOR_ARKTS_NODE} if the following operations are not allowed
+ * on BuilderNode generated nodes:
+ * setting or resetting attributes, setting events, or adding or editing subnodes.
*/
int32_t (*registerNodeEvent)(ArkUI_NodeHandle node, ArkUI_NodeEventType eventType,
int32_t targetId, void* userData);
@@ -6229,8 +6434,9 @@ typedef struct {
* @brief Obtains the number of subnodes.
*
* @param node Indicates the target node.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
uint32_t (*getTotalChildCount)(ArkUI_NodeHandle node);
@@ -6285,9 +6491,11 @@ typedef struct {
* when the event is triggered.
* @param userData Indicates the custom event parameter, which is passed in the callback of
* {@link ArkUI_NodeCustomEvent} when the event is triggered.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
- * Returns 106102 if the dynamic implementation library of the native API was not found.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * Returns {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} if the dynamic implementation library
+ * of the native API was not found.
*/
int32_t (*registerNodeCustomEvent)(
ArkUI_NodeHandle node, ArkUI_NodeCustomEventType eventType, int32_t targetId, void* userData);
@@ -6326,8 +6534,9 @@ typedef struct {
* @param node Indicates the target node.
* @param width Indicates the width.
* @param height Indicates the height.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setMeasuredSize)(ArkUI_NodeHandle node, int32_t width, int32_t height);
@@ -6337,8 +6546,9 @@ typedef struct {
* @param node Indicates the target node.
* @param positionX Indicates the X coordinate.
* @param positionY Indicates the Y coordinate.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setLayoutPosition)(ArkUI_NodeHandle node, int32_t positionX, int32_t positionY);
@@ -6363,8 +6573,9 @@ typedef struct {
*
* @param node Indicates the target node.
* @param Constraint Indicates the size constraint.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*measureNode)(ArkUI_NodeHandle node, ArkUI_LayoutConstraint* Constraint);
@@ -6376,8 +6587,9 @@ typedef struct {
* @param node Indicates the target node.
* @param positionX Indicates the X coordinate.
* @param positionY Indicates the Y coordinate.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*layoutNode)(ArkUI_NodeHandle node, int32_t positionX, int32_t positionY);
@@ -6394,8 +6606,9 @@ typedef struct {
*
* @param node Indicates the component for which you want to add the event callback function.
* @param eventReceiver Indicates the component event callback function to add.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*addNodeEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeEvent* event));
@@ -6404,8 +6617,9 @@ typedef struct {
*
* @param node Indicates the component from which you want to remove the event callback function.
* @param eventReceiver Indicates the component event callback function to remove.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*removeNodeEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeEvent* event));
@@ -6422,8 +6636,9 @@ typedef struct {
*
* @param node Indicates the component for which you want to add the custom event callback function.
* @param eventReceiver Indicates the custom event callback function to add.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*addNodeCustomEventReceiver)(ArkUI_NodeHandle node, void (*eventReceiver)(ArkUI_NodeCustomEvent* event));
@@ -6432,8 +6647,9 @@ typedef struct {
*
* @param node Indicates the component from which you want to remove the custom event callback function.
* @param eventReceiver Indicates the custom event callback function to remove.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*removeNodeCustomEventReceiver)(ArkUI_NodeHandle node,
void (*eventReceiver)(ArkUI_NodeCustomEvent* event));
@@ -6443,8 +6659,9 @@ typedef struct {
*
* @param node Indicates the component on which the custom data will be saved.
* @param userData Indicates the custom data to be saved.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs..
*/
int32_t (*setUserData)(ArkUI_NodeHandle node, void* userData);
@@ -6462,7 +6679,9 @@ typedef struct {
* @param node Indicates the component for which you want to set the unit.
* @param unit Indicates the unit, which is an enumerated value of {@link ArkUI_LengthMetricUnit}.
* The default value is ARKUI_LENGTH_METRIC_UNIT_DEFAULT.
- * @return Returns 0 if the operation is successful; returns 401 if a parameter error occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
*/
int32_t (*setLengthMetricUnit)(ArkUI_NodeHandle node, ArkUI_LengthMetricUnit unit);
@@ -6568,8 +6787,9 @@ typedef void (*ArkUI_NodeContentCallback)(ArkUI_NodeContentEvent* event);
*
* @param content Indicates the pointer to the node content instance.
* @param callback Indicates the callback function.
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_RegisterCallback(ArkUI_NodeContentHandle content, ArkUI_NodeContentCallback callback);
@@ -6588,8 +6808,9 @@ ArkUI_NodeContentEventType OH_ArkUI_NodeContentEvent_GetEventType(ArkUI_NodeCont
*
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node);
@@ -6599,8 +6820,9 @@ int32_t OH_ArkUI_NodeContent_AddNode(ArkUI_NodeContentHandle content, ArkUI_Node
*
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node);
@@ -6611,12 +6833,104 @@ int32_t OH_ArkUI_NodeContent_RemoveNode(ArkUI_NodeContentHandle content, ArkUI_N
* @param content Indicates the pointer to the node content instance.
* @param node Indicates the pointer to the node
* @param position Indicates the position for inserting the node
- * @return Returns 0 if success,
- * Returns 401 if parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_NodeContent_InsertNode(ArkUI_NodeContentHandle content, ArkUI_NodeHandle node, int32_t position);
+/**
+ * @brief Get the size of the component layout area.
+ * The layout area size does not include graphic variation attributes such as scaling.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param size The drawing area size of the component handle, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutSize(ArkUI_NodeHandle node, ArkUI_IntSize* size);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the parent component.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param localOffset The offset value of the component handle relative to the parent component, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPosition(ArkUI_NodeHandle node, ArkUI_IntOffset* localOffset);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the window.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param globalOffset The offset value of the component handle relative to the window, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* globalOffset);
+
+/**
+ * @brief Obtain the position of the component layout area relative to the screen.
+ * The relative position of the layout area does not include graphic variation attributes, such as translation.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param screenOffset The offset value of the component handle relative to the screen, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetLayoutPositionInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* screenOffset);
+
+/**
+ * @brief Obtain the position of the component in the window, including the properties of graphic translation changes.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param translateOffset The cumulative offset value of the component handle itself,
+ * parent components, and ancestor nodes, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset);
+
+/**
+ * @brief Obtain the position of the component on the screen, including the attributes of graphic translation changes.
+ *
+ * @param node ArkUI_NodeHandle pointer.
+ * @param translateOffset The cumulative offset value of the component handle itself,
+ * parent components, and ancestor nodes, in px.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
+ * @since 12
+ */
+int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInScreen(ArkUI_NodeHandle node, ArkUI_IntOffset* translateOffset);
+
+/**
+ * @brief Collapse the ListItem in its expanded state.
+ *
+ * @param node Node objects that need to be registered for events.
+ * @param userData Custom event parameters are carried back in the callback parameter when the event is triggered.
+ * @param onFinish The callback triggered after the completion of the folding animation.
+ * @return Error code.
+ * {@link ARKUI_ERROR_CODE_NO_ERROR} Success.
+ * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception.
+ * {@link ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED} The component does not support this event.
+ * @since 12
+ */
+int32_t OH_ArkUI_List_CloseAllSwipeActions(ArkUI_NodeHandle node, void* userData, void (*onFinish)(void* userData));
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/native_node_napi.h b/arkui/ace_engine/native/native_node_napi.h
index a1bf77b9ebed0c28d55e586adf677b2ef0ea3ead..bff253709d8dffbf0302ecb2b03e6c7fd24277e3 100644
--- a/arkui/ace_engine/native/native_node_napi.h
+++ b/arkui/ace_engine/native/native_node_napi.h
@@ -51,8 +51,9 @@ extern "C" {
* @param env Indicates the NAPI environment pointer.
* @param frameNode Indicates the FrameNode object created on the ArkTS side.
* @param handle Indicates the pointer to the ArkUI_NodeHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetNodeHandleFromNapiValue(napi_env env, napi_value frameNode, ArkUI_NodeHandle* handle);
@@ -64,8 +65,9 @@ int32_t OH_ArkUI_GetNodeHandleFromNapiValue(napi_env env, napi_value frameNode,
* @param env ndicates the NAPI environment pointer.
* @param value Indicates the UIContext object created on the ArkTS side.
* @param context Indicates the pointer to the ArkUI_ContextHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetContextFromNapiValue(napi_env env, napi_value value, ArkUI_ContextHandle* context);
@@ -78,8 +80,9 @@ int32_t OH_ArkUI_GetContextFromNapiValue(napi_env env, napi_value value, ArkUI_C
* @param env ndicates the NAPI environment pointer.
* @param value Indicates the NodeContent object created on the ArkTS side.
* @param content Indicates the pointer to the ArkUI_NodeContentHandle object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetNodeContentFromNapiValue(napi_env env, napi_value value, ArkUI_NodeContentHandle* content);
@@ -91,8 +94,9 @@ int32_t OH_ArkUI_GetNodeContentFromNapiValue(napi_env env, napi_value value, Ark
* @param env Indicates the NAPI environment pointer.
* @param value Indicates the DrawableDescriptor object created on the ArkTS side.
* @param drawableDescriptor Indicates the pointer to the ArkUI_DrawableDescriptro object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetDrawableDescriptorFromNapiValue(
@@ -105,8 +109,9 @@ int32_t OH_ArkUI_GetDrawableDescriptorFromNapiValue(
* @param env Indicates the NAPI environment pointer.
* @param value Indicates the Resource object created on the ArkTS side.
* @param drawableDescriptor Indicates the pointer to the ArkUI_DrawableDescriptro object.
- * @return Returns 0 if success.
- * Returns 401 if a parameter exception occurs.
+ * @return Returns the error code.
+ * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful.
+ * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs.
* @since 12
*/
int32_t OH_ArkUI_GetDrawableDescriptorFromResourceNapiValue(
diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h
index 71a268f5efec8b46bebb91d323d7629739860823..7dadc5a2827254db80a295117b17023befbc535d 100644
--- a/arkui/ace_engine/native/native_type.h
+++ b/arkui/ace_engine/native/native_type.h
@@ -98,6 +98,20 @@ typedef struct ArkUI_NativeDialog* ArkUI_NativeDialogHandle;
*/
typedef struct ArkUI_WaterFlowSectionOption ArkUI_WaterFlowSectionOption;
+/**
+ * @brief Define the configuration information of the Item within the ListitemSwipeActionOption method.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_ListItemSwipeActionItem ArkUI_ListItemSwipeActionItem;
+
+/**
+ * @brief Define the configuration information for the ListitemSwipeActionOption method.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_ListItemSwipeActionOption ArkUI_ListItemSwipeActionOption;
+
/**
* @brief Defines the ArkUI native context object.
*
@@ -141,6 +155,13 @@ typedef struct ArkUI_GuidelineOption ArkUI_GuidelineOption;
*/
typedef struct ArkUI_BarrierOption ArkUI_BarrierOption;
+/**
+ * @brief Define the ChildrenMainSize class information for a List.
+ *
+ * @since 12
+*/
+typedef struct ArkUI_ListChildrenMainSize ArkUI_ListChildrenMainSize;
+
/**
* @brief Defines the event callback type.
*
@@ -862,6 +883,8 @@ typedef enum {
ARKUI_SLIDER_STYLE_OUT_SET = 0,
/** The slider is in the slider track. */
ARKUI_SLIDER_STYLE_IN_SET,
+ /** No slider. */
+ ARKUI_SLIDER_STYLE_NONE,
} ArkUI_SliderStyle;
/**
@@ -1770,6 +1793,56 @@ typedef enum {
ARKUI_SWIPER_INDICATOR_TYPE_DIGIT,
} ArkUI_SwiperIndicatorType;
+/**
+ * @brief Define the pattern of element arrangement in the main axis direction of the Swiper component.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** In the folded state, when the ListItem slides in the opposite direction to the main axis,
+ * the operation item is hidden.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_COLLAPSED = 0,
+ /** In the folded state, when the ListItem slides in the opposite direction to the spindle,
+ * the operation item is displayed.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_EXPANDED,
+ /** Long distance state, the state of deleting a ListItem after it enters the long distance deletion area.*/
+ ARKUI_LIST_ITEM_SWIPE_ACTION_STATE_ACTIONING,
+} ArkUI_ListItemSwipeActionState;
+
+/**
+ * @brief Define the explicit and implicit mode of the SwipeAction method for the Listitem component.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** The ListItem can continue to be scratched after the distance exceeds the size of the scratched component.*/
+ ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_SPRING = 0,
+ /** The sliding distance of the ListItem cannot exceed the size of the scratched component.*/
+ ARKUI_LIST_ITEM_SWIPE_EDGE_EFFECT_NONE,
+} ArkUI_ListItemSwipeEdgeEffect;
+
+/**
+ * @brief Define error code enumeration values.
+ *
+ * @since 12
+ */
+typedef enum {
+ /** @error No errors. */
+ ARKUI_ERROR_CODE_NO_ERROR = 0,
+ /** @error Parameter error. */
+ ARKUI_ERROR_CODE_PARAM_INVALID = 401,
+ /** @error The component does not support specific properties or events. */
+ ARKUI_ERROR_CODE_ATTRIBUTE_OR_EVENT_NOT_SUPPORTED = 106102,
+ /** @error The corresponding operation does not support nodes created by ArkTS. */
+ ARKUI_ERROR_CODE_ARKTS_NODE_NOT_SUPPORTED = 106103,
+ /** @error The lazy loading adapter is not bound to the component. */
+ ARKUI_ERROR_CODE_ADAPTER_NOT_BOUND = 106104,
+ /** @error The adapter already exists. */
+ ARKUI_ERROR_CODE_ADAPTER_EXIST = 106105,
+ /** @error The corresponding node already has a child node and cannot add an adapter. */
+ ARKUI_ERROR_CODE_CHILD_NODE_EXIST = 106106,
+} ArkUI_ErrorCode;
+
/**
* @brief Creates a size constraint.
*
@@ -1946,6 +2019,16 @@ void OH_ArkUI_WaterFlowSectionOption_Dispose(ArkUI_WaterFlowSectionOption* optio
*/
void OH_ArkUI_WaterFlowSectionOption_SetSize(ArkUI_WaterFlowSectionOption* option, int32_t size);
+/**
+* @brief Gets the FlowItem grouping configuration information array length.
+*
+* @param option FlowItem Indicates the packet configuration.
+* @return Array size. If -1 is returned, the return fails.
+* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+int32_t OH_ArkUI_WaterFlowSectionOption_GetSize(ArkUI_WaterFlowSectionOption* option);
+
/**
* @brief Sets the number of items in a water flow section.
*
@@ -1967,6 +2050,32 @@ void OH_ArkUI_WaterFlowSectionOption_SetItemCount(ArkUI_WaterFlowSectionOption*
*/
int32_t OH_ArkUI_WaterFlowSectionOption_GetItemCount(ArkUI_WaterFlowSectionOption* option, int32_t index);
+/**
+* @brief The FlowItem grouping configuration information getsthe spindle size of
+* the specified Item based on flowItemIndex.
+*
+* @param option Indicates the pointer to a water flow section configuration.
+* @param index Indicates the index of the target water flow section.
+* @param callback Gets the spindle size of the specified Item based on index.
+* @since 12
+*/
+void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndex(ArkUI_WaterFlowSectionOption* option,
+ int32_t index, float(*callback)(int32_t itemIndex));
+
+/**
+* @brief The FlowItem grouping configuration information getsthe spindle size of
+* the specified Item based on flowItemIndex.
+*
+* @param option Indicates the pointer to a water flow section configuration.
+* @param index Indicates the index of the target water flow section.
+* @param userData FlowItem Custom data.
+* @param callback Gets the spindle size of the specified Item based on index.
+* @since 12
+*/
+void OH_ArkUI_WaterFlowSectionOption_RegisterGetItemMainSizeCallbackByIndexWithUserData(
+ ArkUI_WaterFlowSectionOption* option, int32_t index, void* userData,
+ float (*callback)(int32_t itemIndex, void* userData));
+
/**
* @brief Sets the number of columns (in a vertical layout) or rows (in a horizontal layout) of a water flow.
*
@@ -2692,6 +2801,298 @@ float OH_ArkUI_AlignmentRuleOption_GetBiasHorizontal(ArkUI_AlignmentRuleOption*
* @since 12
*/
float OH_ArkUI_AlignmentRuleOption_GetBiasVertical(ArkUI_AlignmentRuleOption* option);
+
+/**
+ * @brief Create a configuration item for the ListitemSwipeActionItem interface settings.
+ *
+ * @return List Item SwipeActionItem configuration item instance. If the object returns a null pointer,
+ * it indicates creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListItemSwipeActionItem* OH_ArkUI_ListItemSwipeActionItem_Create();
+
+/**
+* @brief Destroy the ListitemSwipeActionItem instance.
+*
+* @param option List Item SwipeActionItem instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_Dispose(ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the layout content of ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetContent(ArkUI_ListItemSwipeActionItem* item, ArkUI_NodeHandle node);
+
+/**
+* @brief Set the threshold for long-distance sliding deletion distance of components.
+*
+* @param option List Item SwipeActionItem instance.
+* @param distance Component long-distance sliding deletion distance threshold.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item, float distance);
+
+/**
+* @brief Obtain the threshold for long-distance sliding deletion distance of components.
+*
+* @param option List Item SwipeActionItem instance.
+* @return Component long-distance sliding deletion distance threshold. If -1.0f is returned, the return fails.
+* The possible cause of the failure is that the item parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the event to be called when a sliding entry enters the deletion area.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a sliding entry enters the deletion area.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event to be called when a component enters the long-range deletion area and deletes a ListItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a component enters the long-range deletion area and deletes a ListItem.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnActionWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event to be called when a sliding entry exits the deletion area.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeActionItem* item, void (*callback)());
+
+/**
+ * @brief Set the event triggered when a sliding entry exits the deletion area.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionAreaWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(void* userData));
+
+/**
+* @brief Set the event triggered when the sliding state of a list item changes.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* swipeActionState The changed state.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChange(ArkUI_ListItemSwipeActionItem* item,
+ void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState));
+
+/**
+ * @brief Set the event triggered when the sliding state of a list item changes.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * swipeActionState The changed state.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionItem_SetOnStateChangeWithUserData(ArkUI_ListItemSwipeActionItem* item,
+ void* userData, void (*callback)(ArkUI_ListItemSwipeActionState swipeActionState, void* userData));
+
+/**
+ * @brief Create a configuration item for the ListitemSwipeActionOption interface settings.
+ *
+ * @return List Item SwipeActionOption configuration item instance.If the object returns a null pointer,
+ * it indicates a creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListItemSwipeActionOption* OH_ArkUI_ListItemSwipeActionOption_Create();
+
+/**
+* @brief Destroy the ListitemSwipeActionOption instance.
+*
+* @param option List Item SwipeActionOption instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_Dispose(ArkUI_ListItemSwipeActionOption* option);
+
+/**
+* @brief Set the layout content on the left (vertical layout) or top (horizontal layout)
+* of the ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetStart(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the layout content on the right (vertical layout) or bottom (horizontal layout)
+* of the ListItem SwipeActionItem.
+*
+* @param option List Item SwipeActionItem instance.
+* @param builder Layout information.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetEnd(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeActionItem* item);
+
+/**
+* @brief Set the sliding effect.
+*
+* @param option List Item SwipeActionItem instance.
+* @param edgeEffect Sliding effect.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetEdgeEffect(ArkUI_ListItemSwipeActionOption* option,
+ ArkUI_ListItemSwipeEdgeEffect edgeEffect);
+
+/**
+* @brief Get the sliding effect.
+*
+* @param option List Item SwipeActionItem instance.
+* @return Sliding effect. The default return value is 0. If -1 is returned, the return fails.
+* The possible cause of the failure is that the option parameter is abnormal, such as a null pointer.
+* @since 12
+*/
+int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActionOption* option);
+
+/**
+* @brief The event called when the sliding operation offset changes.
+*
+* @param option List Item SwipeActionItem instance.
+* @param callback Callback Events.
+* offset Slide offset.
+* @since 12
+*/
+void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChange(ArkUI_ListItemSwipeActionOption* option,
+ void (*callback)(float offset));
+
+/**
+ * @brief Set the event triggered when the sliding operation offset changes.
+ *
+ * @param option List Item SwipeActionItem instance.
+ * @param userData User defined data.
+ * @param callback Callback Events.
+ * offset Slide offset.
+ * @since 12
+ */
+void OH_ArkUI_ListItemSwipeActionOption_SetOnOffsetChangeWithUserData(ArkUI_ListItemSwipeActionOption* option,
+ void* userData, void (*callback)(float offset, void* userData));
+
+/**
+ * @brief Create configuration items for the ListChildrenMainSize interface settings.
+ *
+ * @return ListChildrenMainSize configuration item instance.If the object returns a null pointer,
+ * it indicates a creation failure, and the reason for the failure may be that the address space is full.
+ * @since 12
+*/
+ArkUI_ListChildrenMainSize* OH_ArkUI_ListChildrenMainSizeOption_Create();
+
+/**
+* @brief Destroy the ListChildrenMainSize instance.
+*
+* @param option The ListChildrenMainSize instance to be destroyed.
+* @since 12
+*/
+void OH_ArkUI_ListChildrenMainSizeOption_Dispose(ArkUI_ListChildrenMainSize* option);
+
+/**
+ * @brief Set the default size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param defaultMainSize The default size of the ListItem under the List, measured in vp.
+ * @return 0 represents success. If defaultMainSize is less than 0 or option is a null pointer, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_SetDefaultMainSize(ArkUI_ListChildrenMainSize* option,
+ float defaultMainSize);
+
+/**
+ * @brief Get the default size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @return The default size of the ListItem under the List is 0, measured in vp.
+ * When the option is a null pointer, it returns -1.
+ * @since 12
+*/
+float OH_ArkUI_ListChildrenMainSizeOption_GetDefaultMainSize(ArkUI_ListChildrenMainSize* option);
+
+/**
+ * @brief Reset the array size of ChildrenMainSizeOption for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param totalSize Array size.
+ * @since 12
+*/
+void OH_ArkUI_ListChildrenMainSizeOption_Resize(ArkUI_ListChildrenMainSize* option, int32_t totalSize);
+
+/**
+ * @brief Resize the ChildrenMainSizeOption array operation on the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index To modify the starting position of the MainSize array.
+ * @param deleteCount The number of MainSize arrays to be deleted starting from index.
+ * @param addCount The number of MainSize arrays to be added starting from index.
+ * @return 0 represents success. If the function parameter is abnormal, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_Splice(ArkUI_ListChildrenMainSize* option, int32_t index,
+ int32_t deleteCount, int32_t addCount);
+
+/**
+ * @brief Update the value of the ChildrenMainSizeOption array in the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index To modify the starting position of the MainSize array.
+ * @param mainSize The actual modified value.
+ * @return 0 represents success. If the function parameter is abnormal, return 401.
+ * @since 12
+*/
+int32_t OH_ArkUI_ListChildrenMainSizeOption_UpdateSize(ArkUI_ListChildrenMainSize* option,
+ int32_t index, float mainSize);
+
+/**
+ * @brief Get the value of the ChildrenMainSizeOption array for the List component.
+ *
+ * @param option ListChildrenMainSize instance.
+ * @param index The index position of the value to be obtained.
+ * @return The value of the specific position of the array. If the function parameter is abnormal, return -1.
+ * @since 12
+*/
+float OH_ArkUI_ListChildrenMainSizeOption_GetMainSize(ArkUI_ListChildrenMainSize* option, int32_t index);
#ifdef __cplusplus
};
#endif
diff --git a/arkui/ace_engine/native/styled_string.h b/arkui/ace_engine/native/styled_string.h
new file mode 100644
index 0000000000000000000000000000000000000000..f67994505bbc684e13a60a4a7c4a72e17297a8d8
--- /dev/null
+++ b/arkui/ace_engine/native/styled_string.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup ArkUI_NativeModule
+ * @{
+ *
+ * @brief Provides ArkUI UI capabilities on the Native side, such as UI component creation and destruction,
+ * tree node operation, property setting, event monitoring, and so on.
+ *
+ * @since 12
+ */
+
+/**
+ * @file styled_string.h
+ *
+ * @brief Provides ArkUI with property string capabilities on the Native side.
+ *
+ * @library libace_ndk.z.so
+ * @syscap SystemCapability.ArkUI.ArkUI.Full
+ * @since 12
+ */
+
+#ifndef ARKUI_NATIVE_STYLED_STRING_H
+#define ARKUI_NATIVE_STYLED_STRING_H
+
+#include "native_drawing/drawing_text_declaration.h"
+#include "native_drawing/drawing_text_typography.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Defines formatted string data objects supported by the text component.
+ *
+ * @since 12
+ */
+typedef struct ArkUI_StyledString ArkUI_StyledString;
+
+/**
+ * @brief Creates a pointer to the ArkUI_StyledString object.
+ *
+ * @param style A pointer to OH_Drawing_TypographyStyle, obtained by {@link OH_Drawing_CreateTypographyStyle}.
+ * @param collection A pointer to OH_Drawing_FontCollection, obtained by {@link OH_Drawing_CreateFontCollection}.
+ * @return Creates a pointer to the ArkUI_StyledString object. If the object returns a null pointer,
+ * the creation failed, either because the address space was full,
+ * or because the style, collection parameter was an exception such as a null pointer.
+ * @since 12
+ */
+ArkUI_StyledString* OH_ArkUI_StyledString_Create(
+ OH_Drawing_TypographyStyle* style, OH_Drawing_FontCollection* collection);
+
+/**
+ * @brief Free the memory occupied by the ArkUI_StyledString object.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_Destroy(ArkUI_StyledString* handle);
+
+/**
+ * @brief Sets the new layout style to the top of the current format string style stack.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param style A pointer to the OH_Drawing_TextStyle object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_PushTextStyle(ArkUI_StyledString* handle, OH_Drawing_TextStyle* style);
+
+/**
+ * @brief Sets the corresponding text content based on the current format string style.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param content A pointer to the text content.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_AddText(ArkUI_StyledString* handle, const char* content);
+
+/**
+ * @brief Removes the top style from the stack in the current format string object.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_PopTextStyle(ArkUI_StyledString* handle);
+
+/**
+ * @brief Creates a pointer to an OH_Drawing_Typography object based on a format string object
+ * for advanced text estimation and typography.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @return A pointer to the OH_Drawing_Typography object. If the object returns a null pointer,
+ * the creation fails because the handle parameter is abnormal, such as a null pointer.
+ * @since 12
+ */
+OH_Drawing_Typography* OH_ArkUI_StyledString_CreateTypography(ArkUI_StyledString* handle);
+
+/**
+ * @brief Set the placeholder.
+ *
+ * @param handle A pointer to the ArkUI_StyledString object.
+ * @param placeholder A pointer to the OH_Drawing_PlaceholderSpan object.
+ * @since 12
+ */
+void OH_ArkUI_StyledString_AddPlaceholder(ArkUI_StyledString* handle, OH_Drawing_PlaceholderSpan* placeholder);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ARKUI_NATIVE_STYLED_STRING_H
+/** @} */
diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h
index 05890e33e26f9722d30b4f7a5801e93f2b1a7605..05af248bbb2cd014db9d45de54c263fed2a01b6a 100644
--- a/arkui/ace_engine/native/ui_input_event.h
+++ b/arkui/ace_engine/native/ui_input_event.h
@@ -672,7 +672,7 @@ int32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode(const ArkUI_UIInputEvent*
*
* @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.
+ * 3 is the middle button, 4 is the back button, and 5 is the forward button.
* @since 12
*/
int32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event);
@@ -687,6 +687,18 @@ int32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event);
*/
int32_t OH_ArkUI_MouseEvent_GetMouseAction(const ArkUI_UIInputEvent* event);
+/**
+ * @brief Sets whether to prevent event bubbling.
+ *
+ * @param event Indicates the pointer to the current UI input event.
+ * @param stopPropagation Indicates whether the event is prevented from bubbling.
+ * @return Returns the status code of the execution. If 0 is returned, the setting is successful.
+ * If 401 is returned, the execution fails.
+ * The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
+ * @since 12
+ */
+int32_t OH_ArkUI_PointerEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation);
+
#ifdef __cplusplus
};
#endif