From 2cdc6b48f927df232eb9712a515d558e949b1d94 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: Wed, 2 Apr 2025 16:52:25 +0800 Subject: [PATCH] add window ndk interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 红书包指挥官 --- zh-cn/native_sdk/window_manager/oh_window.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zh-cn/native_sdk/window_manager/oh_window.h b/zh-cn/native_sdk/window_manager/oh_window.h index 10a67908..c51c17b1 100644 --- a/zh-cn/native_sdk/window_manager/oh_window.h +++ b/zh-cn/native_sdk/window_manager/oh_window.h @@ -40,6 +40,7 @@ #include #include "oh_window_comm.h" +#include "multimodalinput/oh_input_manager.h" #ifdef __cplusplus extern "C" { @@ -274,6 +275,20 @@ int32_t OH_WindowManager_GetAllWindowLayoutInfoList(int64_t displayId, */ void OH_WindowManager_ReleaseAllWindowLayoutInfoList(WindowManager_Rect* windowLayoutInfoList); +/** + * @brief 将多模触摸事件注入给目标窗口,该注入不会触发窗口焦点和层级变化,直接发送给ArkUI。 + * + * @param windowId 创建窗口时的窗口id。默认值为0。该参数为整数。 + * @param touchEvent 多模触摸事件,具体可见{@link Input_TouchEvent},事件定义在oh_input_manager.h中。 + * @return 返回结果代码。\n + * 返回OK,表示函数调用成功。\n + * 返回WINDOW_MANAGER_ERRORCODE_INVALID_PARAM,表示参数错误。\n + * 返回WINDOW_MANAGER_ERRORCODE_STATE_ABNORMAL,表示窗口状态异常。\n + * 返回WINDOW_MANAGER_ERRORCODE_SYSTEM_ABNORMAL,表示窗口管理器服务异常。 + * @since 20 + */ +int32_t OH_WindowManager_InjectTouchEvent(int32_t windowId, Input_TouchEvent* touchEvent); + #ifdef __cplusplus } #endif -- Gitee