diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 85a18bde24ef6b5f70fd35d12bcb9386a7c1da3f..fe6b9176f74608f5cb53e2cb54c152bcde4f740d 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9094,6 +9094,32 @@ float OH_ArkUI_SystemFontStyleEvent_GetFontWeightScale(const ArkUI_SystemFontSty */ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeHandle* node); +/** + * @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 17 + */ +int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleByUniqueId(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 17 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeUniqueId(ArkUI_NodeHandle* node, int32_t* uniqueId); + /** * @brief Move the node handle to target parent node as child. *