From b21a7641624265dc606d12b06057644242b0e80e Mon Sep 17 00:00:00 2001 From: liyi0309 Date: Wed, 24 Apr 2024 20:24:22 +0800 Subject: [PATCH] add C-API xcomponent convert Signed-off-by: liyi0309 --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_interface_xcomponent.h | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index d44314bea..a7c27f13b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -710,5 +710,9 @@ { "first_introduced": "12", "name": "OH_ArkUI_GetNodeContentFromNapiValue" + }, + { + "first_introduced": "12", + "name": "OH_NativeXComponent_GetNativeXComponent" } ] \ 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 d988ff6ff..c907822ec 100644 --- a/arkui/ace_engine/native/native_interface_xcomponent.h +++ b/arkui/ace_engine/native/native_interface_xcomponent.h @@ -731,6 +731,17 @@ int32_t OH_NativeXComponent_RegisterOnTouchInterceptCallback( int32_t OH_NativeXComponent_GetTouchEventSourceType( OH_NativeXComponent* component, int32_t pointId, OH_NativeXComponent_EventSourceType* sourceType); +/** + * @brief Obtains the pointer to an OH_NativeXComponent instance based on the specified component + * instance created by the native API. + * + * @param node Indicates the pointer to the component instance created by the native API. + * @return Returns the pointer to the OH_NativeXComponent instance. + * @since 12 + * @version 1.0 + */ +OH_NativeXComponent* OH_NativeXComponent_GetNativeXComponent(ArkUI_NodeHandle node); + #ifdef __cplusplus }; #endif -- Gitee