From 49353e53b06e499dade1bb0895dceb324dd1a452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=A2=E4=B9=A6=E5=8C=85=E6=8C=87=E6=8C=A5=E5=AE=98?= Date: Fri, 16 May 2025 15:42:32 +0800 Subject: [PATCH] InjectTouch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 红书包指挥官 --- arkui/window_manager/oh_window.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/window_manager/oh_window.h b/arkui/window_manager/oh_window.h index 793f9a758f..dfb34d6650 100644 --- a/arkui/window_manager/oh_window.h +++ b/arkui/window_manager/oh_window.h @@ -272,6 +272,20 @@ int32_t OH_WindowManager_GetAllWindowLayoutInfoList(int64_t displayId, */ void OH_WindowManager_ReleaseAllWindowLayoutInfoList(WindowManager_Rect* windowLayoutInfoList); +/** + * @brief app can inject a touchEvent to target window without Focus and zOrder changed, just send to ArkUI. + * + * @param windowId windowId when window is created. + * @param touchEvent multimodal touchEvent. + * @return Returns the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INVALID_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL} this window state is abnormal. + * {@link WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL} the window manager service works abnormally. + * @since 20 + */ +int32_t OH_WindowManager_InjectTouchEvent(int32_t windowId, Input_TouchEvent* touchEvent); + #ifdef __cplusplus } #endif -- Gitee