diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index 1c03c3746bbd8127f4a569001b3cac877454fb23..1af886331e42c80d986ab1c9e5bbc718fd214930 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -277,6 +277,26 @@ typedef struct ArkUI_GestureEventTargetInfo ArkUI_GestureEventTargetInfo; */ typedef struct ArkUI_ParallelInnerGestureEvent ArkUI_ParallelInnerGestureEvent; +/** + * @brief Defines a Touch recognizer. + * + * @since 16 + */ +typedef struct ArkUI_TouchRecognizer ArkUI_TouchRecognizer; +/** + * @brief Defines the Touch recognizer handle. + * + * @since 16 + */ +typedef ArkUI_TouchRecognizer* ArkUI_TouchRecognizerHandle; + +/** + * @brief Defines the Touch recognizer handle array. + * + * @since 16 + */ +typedef ArkUI_TouchRecognizerHandle* ArkUI_TouchRecognizerHandleArray; + /** * @brief Defines a callback function for notifying gesture recognizer destruction. * @since 12 @@ -666,6 +686,51 @@ int32_t OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers(ArkUI_Parallel int32_t OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify(ArkUI_GestureRecognizer* recognizer, ArkUI_GestureRecognizerDisposeNotifyCallback callback, void* userData); +/** +* @brief Obtains the NodeType of the touchEvent bind to +* +* @param event Indicates the pointer to the TouchRecognizer. +* @param event Indicates the NodeType . +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 16 +*/ +int32_t OH_ArkUI_Touch_GetNodeType(const ArkUI_TouchRecognizer* recognizer,int32_t* nodeType); +/** +* @brief Obtains the ID of the component linked to a TouchRecognizer. +* +* @param recognizer Indicates the pointer to a TouchRecognizer. +* @param nodeId Indicates the component ID. +* @param size Indicates the buffer size. +* @param result Indicates the length of the string to be written to the buffer. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* Returns {@link ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH} if the buffer is not large enough. +* @since 16 +*/ +int32_t OH_ArkUI_GetTouchBindNodeId(ArkUI_TouchRecognizer* recognizer, char* nodeId, int32_t size, + int32_t* result); +/** +* @brief cancel the TouchRecognizer. +* +* @param recognizer Indicates the pointer to a TouchRecognizer. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 16 +*/ +int32_t OH_ArkUI_CancelTouch(ArkUI_TouchRecognizer* recognizer,ArkUI_GestureInterruptInfo* event); +/** +* @brief Obtains the TouchRecognizers me and sub of . +* +* @param event Indicates the pointer to a InterruptInfo event. +* @param array Indicates the pointer to the array of TouchRecognizerss. +* @param size Indicates the size of the TouchRecognizers. +* @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. +* Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. +* @since 16 +*/ +int32_t OH_ArkUI_GetResponseTouchRecognizersFromInterruptInfo(const ArkUI_GestureInterruptInfo* event, + ArkUI_TouchRecognizerHandleArray* fromMe,int32_t* count); /** * @brief Defines the gesture APIs. *