diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index a005905d4ed8b86374f3855032caa701a1c69994..177bc5d1c34e3fc74016f71edc287899b8dcb5c4 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -1222,5 +1222,29 @@ { "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_node.h b/arkui/ace_engine/native/native_node.h index dc7db79731b445bd8c9d81877ca377565f7e5748..65e7eda6f8ab822581f307729ec74a791a9d6cca 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6881,6 +6881,19 @@ int32_t OH_ArkUI_NodeUtils_GetPositionWithTranslateInWindow(ArkUI_NodeHandle nod */ 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_type.h b/arkui/ace_engine/native/native_type.h index ace4a734fdf4c5ab01cbab1d993c4e974346599b..8c76fb22a38aab70ee4d99c9de5494d5880cd030 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2834,6 +2834,17 @@ float OH_ArkUI_ListItemSwipeActionItem_GetActionAreaDistance(ArkUI_ListItemSwipe */ 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. * @@ -2843,6 +2854,17 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnEnterActionArea(ArkUI_ListItemSwipeAc */ 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. * @@ -2852,6 +2874,17 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnAction(ArkUI_ListItemSwipeActionItem* */ 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. * @@ -2863,6 +2896,18 @@ void OH_ArkUI_ListItemSwipeActionItem_SetOnExitActionArea(ArkUI_ListItemSwipeAct 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. * @@ -2933,6 +2978,18 @@ int32_t OH_ArkUI_ListItemSwipeActionOption_GetEdgeEffect(ArkUI_ListItemSwipeActi 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. *