From cfc5285ac56c241e5aba48cdfa38a66f12426225 Mon Sep 17 00:00:00 2001 From: zhengqiyi Date: Fri, 6 Dec 2024 11:24:46 +0800 Subject: [PATCH] setGestureInterrupterToNode Signed-off-by: zhengqiyi --- arkui/ace_engine/native/native_gesture.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 42b37aa9c..72eba9a44 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -912,6 +912,29 @@ typedef struct { int32_t countNum, int32_t fingersNum, double distanceThreshold); } ArkUI_NativeGestureAPI_1; +/** + * @brief Defines the gesture APIs. + * + * @since 16 + */ +typedef struct { + ArkUI_NativeGestureAPI_1* gestureApi1; + + /** + * @brief Sets the callback function for gesture interrupt event. + * + * @param node Indicates the ArkUI node for which the callback of gesture interrupt event is to be set. + * @param userData Indicates the custom data. + * @param interrupter Indicates gesture interrupt event. info returns the data of the + * gesture interrupt event; interrupter returns the pointer to the interrupter + * that requires interrupt. + * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. + */ + int32_t (*setGestureInterrupterToNode)(ArkUI_NodeHandle node, void* userData, + ArkUI_GestureInterruptResult (*interrupter)(ArkUI_GestureInterruptInfo* info)); +} ArkUI_NativeGestureAPI_2; + #ifdef __cplusplus }; #endif -- Gitee