diff --git a/arkui/ace_engine/native/drag_and_drop.h b/arkui/ace_engine/native/drag_and_drop.h index 10137f670abd4f1a9360a9008a203cc4e14657d4..e47439eca2648dbdd13334f3189565bff30be959 100644 --- a/arkui/ace_engine/native/drag_and_drop.h +++ b/arkui/ace_engine/native/drag_and_drop.h @@ -886,6 +886,31 @@ int32_t OH_ArkUI_NotifyDragResult(int32_t requestIdentify, ArkUI_DragResult resu */ int32_t OH_ArkUI_NotifyDragEndPendingDone(int32_t requestIdentify); +/** + * @brief Obtains the bundle name of the drag source application. + * The caller must provide a character array with a minimum length of 128 characters to store the bundle name. + * + * @param event Pointer to the ArkUI_DragEvent object. + * @param bundleName Character array to store the bundle name string, with a length of at least 128 characters. + * @param length Length of the character array to store the bundle name string. The minimum length is 128 characters. + * @return Result code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} is returned if the operation is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} is returned if a parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_DragEvent_GetDragSource(ArkUI_DragEvent* event, char *bundleName, int32_t length); + +/** + * @brief Checks whether the current drag operation is a cross-device drag. + * + * @param event Pointer to the ArkUI_DragEvent object. + * @param isRemote Pointer to a boolean variable to store the result. + * @return Result code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} is returned if the operation is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} is returned if a parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_DragEvent_IsRemote(ArkUI_DragEvent* event, bool* isRemote); #ifdef __cplusplus }; #endif