From b885931f32ff7659c5fca1a1344f59b79ca7368b Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Fri, 16 May 2025 16:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=80=9A=E7=94=A8=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E3=80=91=E6=94=AF=E6=8C=81=E5=BA=94=E7=94=A8=E5=9C=A8=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E4=BA=8B=E4=BB=B6=E4=B8=AD=E8=8E=B7=E5=8F=96=E6=8B=96?= =?UTF-8?q?=E8=B5=B7=E6=96=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan Change-Id: I86b00a385db3760fda26d7f38b1e9bb62c3c2448 --- arkui/ace_engine/native/drag_and_drop.h | 29 +++++++++++++++++++++++++ arkui/ace_engine/native/libace.ndk.json | 8 +++++++ 2 files changed, 37 insertions(+) diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index 10137f670..fe2bb2f75 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -886,6 +886,35 @@ int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult resu */ int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify); +/** + * @brief Use this method to obtain the application bundle name of the drag-and-drop initiator, you need + * to pass a character array for receiving the string and explicitly specify the array length. It is + * recommended that the array length be no less than 128 characters. If the length cannot accommodate + * the actual bundle name length, the ERROR result will be returned. + * + * @param event Indicates the pointer to an ArkUI_DragEvent object. + * @param bundleName A string array used to receive the source application's bundle name. + * @param length Use this to explicitly specify the length of the incoming string array. + * It is recommended to be bigger than 128. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDragSource(ArkUI_DragEvent* event, char *bundleName, int32_t length); + +/** + * @brief Call this method to determine whether the current drag and drop operation is cross-device. + * + * @param event Indicates the pointer to an ArkUI_DragEvent object. + * @param isRemote Boolean pointer to receive the result. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_DragEvent_IsRemote(ArkUI_DragEvent* event, bool* isRemote); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 58c78e45c..bbb084234 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3342,5 +3342,13 @@ { "first_introduced": "20", "name": "OH_ArkUI_RemoveSupportedUIStates" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_DragEvent_GetDragSource" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_DragEvent_IsRemote" } ] \ No newline at end of file -- Gitee