diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 59e5f3dd434b51617684f17265d595a7922bdba3..a8f6e0e5c514bee1691e8509bc922d97cb2bb12b 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3430,5 +3430,13 @@ { "first_introduced": "20", "name": "OH_ArkUI_UIInputEvent_GetLatestStatus" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeUniqueId" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ee91a52970a4545a865f10554b48f23382bb78e3..a9b28a4b71771cbca68c469b699b4511e9891f53 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9725,6 +9725,32 @@ ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t */ int32_t OH_ArkUI_RunTaskInScope(ArkUI_ContextHandle uiContext, void* userData, void(*callback)(void* userData)); +/** + * @brief Get the node handle by uniqueId. + * + * @param uniqueId The uniqueId of the target node handle. + * @param node The handle of target node handle. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 20 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId(const uint32_t uniqueId, ArkUI_NodeHandle* node); + +/** + * @brief Get the uniqueId of the target node handle. + * + * @param node The ArkUI-NodeHandle pointer. + * @param uniqueId The uniqueId of the target node handle, default value is -1. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 20 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeUniqueId(ArkUI_NodeHandle node, int32_t* uniqueId); + #ifdef __cplusplus }; #endif