diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index e650b12573a3821ca81e82374086b5cf1700bb52..cd0a1bdfa2b384ea6914ffa50cdae6d2e7db87df 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -174,5 +174,9 @@ { "first_introduced": "12", "name": "OH_ArkUI_QueryModuleInterface" + }, + { + "first_introduced": "12", + "name": "OH_NativeXComponent_GetTouchEventSourceType" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_interface_xcomponent.h b/arkui/ace_engine/native/native_interface_xcomponent.h index e3b615076b4ddd88cd835bc9d62fcbecb466ebd3..e1ae0dbeff288c32205ae801f553d2cc97994b7d 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -717,6 +717,21 @@ int32_t OH_NativeXComponent_RegisterSurfaceHideCallback( int32_t OH_NativeXComponent_RegisterOnTouchInterceptCallback( OH_NativeXComponent* component, HitTestMode (*callback)(OH_NativeXComponent* component, ArkUI_UIInputEvent* event)); +/** + * @brief Obtains the touch event's source type dispatched by the ArkUI XComponent. + * + * @param component Indicates the pointer to this OH_NativeXComponent instance. + * @param pointId Indicates the id of the touch point which triggers this touch event. + * @param sourceType Indicates the source type of this touch event. + * @return Returns OH_NATIVEXCOMPONENT_RESULT_SUCCESS if success. + * Returns OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER if a parameter exception occurs. + * Returns OH_NATIVEXCOMPONENT_RESULT_FAILED if other exceptions occur. + * @since 12 + * @version 1.0 + */ +int32_t OH_NativeXComponent_GetTouchEventSourceType( + OH_NativeXComponent* component, int32_t pointId, OH_NativeXComponent_EventSourceType* sourceType); + #ifdef __cplusplus }; #endif