diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 4a896d6404f7eddd28bb31e6377d17f8828491a0..e194af85503d06cac1433554b06e88f9697a55ec 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -4066,5 +4066,13 @@ { "first_introduced": "20", "name": "OH_ArkUI_PostUITaskAndWait" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_ListItemSwipeAction_Expand" + }, + { + "first_introduced": "21", + "name": "OH_ArkUI_ListItemSwipeAction_Collapse" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 7cef398b2d6b7cbab8dec555464d44799d0898fa..371a4779238daef18b3ce92f34572221c1e7f3c4 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2410,6 +2410,11 @@ typedef enum { * @since 19 */ ARKUI_ERROR_CODE_DRAG_DROP_OPERATION_NOT_ALLOWED = 190004, + /** + * @error Parameter error. + * @since 21 + */ + ARKUI_ERROR_CODE_PARAM_ERROR = 100023, } ArkUI_ErrorCode; /** @@ -2807,6 +2812,24 @@ typedef enum { ARKUI_CORNER_DIRECTION_BOTTOM_RIGHT, } ArkUI_CornerDirection; +/** + * @brief Define the direction to expand the swipe action. + * + * @since 21 + */ +typedef enum { + /** + * When the List direction is vertical, it indicates the left in LTR mode and right in RTL mode. + * When the List direction is horizontal, it indicates the top. + */ + ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_START = 0, + /** + * When the List direction is vertical, it indicates the right in LTR mode and left in RTL mode. + * When the List direction is horizontal, it indicates the bottom. + */ + ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_END = 1, +} ArkUI_ListItemSwipeActionDirection; + /** * @brief Defines parameter used by the system font style callback event. * @@ -5383,6 +5406,31 @@ void OH_ArkUI_EmbeddedComponentOption_SetOnError( */ void OH_ArkUI_EmbeddedComponentOption_SetOnTerminated( ArkUI_EmbeddedComponentOption* option, void (*callback)(int32_t code, AbilityBase_Want* want)); + +/** + * @brief Expand the swipe action. + * + * @param node List Item node. + * @param direction expand direction of swipeAction. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_ERROR} The component type of the node is incorrect. + * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node not mounted to component tree. + * @since 21 + */ +int32_t OH_ArkUI_ListItemSwipeAction_Expand(ArkUI_NodeHandle node, ArkUI_ListItemSwipeActionDirection direction); + +/** + * @brief Collapse the swipe action. + * + * @param node List Item node. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_ERROR} The component type of the node is incorrect. + * {@link ARKUI_ERROR_CODE_NODE_NOT_ON_MAIN_TREE} The node not mounted to component tree. + * @since 21 + */ +int32_t OH_ArkUI_ListItemSwipeAction_Collapse(ArkUI_NodeHandle node); #ifdef __cplusplus }; #endif