From 8053552120a2901ef87d81d8c30410641c70737f Mon Sep 17 00:00:00 2001 From: zoulinken Date: Fri, 28 Feb 2025 15:59:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4C-API=E9=80=9A=E8=BF=87un?= =?UTF-8?q?iqueId=E8=8E=B7=E5=8F=96=E8=8A=82=E7=82=B9=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zoulinken --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 85a18bde24..aff57d67c3 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 id 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 component. + * + * @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. * -- Gitee From 5e18ed2417d7736784de2db45b51895960515a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=9E=97=E8=82=AF?= <735001321@qq.com> Date: Sat, 1 Mar 2025 10:19:20 +0000 Subject: [PATCH 2/2] update arkui/ace_engine/native/native_node.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邹林肯 <735001321@qq.com> --- arkui/ace_engine/native/native_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index aff57d67c3..fe6b9176f7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9097,7 +9097,7 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH /** * @brief Get the node handle by uniqueId. * - * @param uniqueId The id of the target node handle. + * @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. @@ -9108,7 +9108,7 @@ int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleById(const char* id, ArkUI_NodeH int32_t OH_ArkUI_NodeUtils_GetAttachedNodeHandleByUniqueId(const uint32_t uniqueId, ArkUI_NodeHandle* node); /** - * @brief Get the uniqueID of the component. + * @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. -- Gitee