From 3d1ec9933693805bc348dc886637de27562d8b47 Mon Sep 17 00:00:00 2001 From: w00416770 Date: Wed, 15 Jan 2025 11:33:06 +0800 Subject: [PATCH] =?UTF-8?q?Input=5FMouseEvent=E5=92=8CInput=5FTouchEvent?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=BA=94=E7=9A=84windowId=E5=92=8Cd?= =?UTF-8?q?isplayId=E5=B1=9E=E6=80=A7=E7=9A=84set=E3=80=81get=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: w00416770 --- .../kits/c/input/oh_input_manager.h | 80 +++++++++++++++++++ multimodalinput/kits/c/ohinput.ndk.json | 32 ++++++++ 2 files changed, 112 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 0969d87e1..b990664b0 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -713,6 +713,46 @@ void OH_Input_SetMouseEventActionTime(struct Input_MouseEvent* mouseEvent, int64 */ int64_t OH_Input_GetMouseEventActionTime(const struct Input_MouseEvent* mouseEvent); +/** + * @brief Sets the windowId for a mouse event. + * + * @param mouseEvent Mouse event object. + * @param windowId The windowId for a mouse event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +void OH_Input_SetMouseEventWindowId(struct Input_MouseEvent* mouseEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of a mouse event. + * + * @param mouseEvent Mouse event object. + * @return windowId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +int32_t OH_Input_GetMouseEventWindowId(const struct Input_MouseEvent* mouseEvent); + +/** + * @brief Sets the displayId for a mouse event. + * + * @param mouseEvent Mouse event object. + * @param displayId The displayId for a mouse event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +void OH_Input_SetMouseEventDisplayId(struct Input_MouseEvent* mouseEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of a mouse event. + * + * @param mouseEvent Mouse event object. + * @return displayId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +int32_t OH_Input_GetMouseEventDisplayId(const struct Input_MouseEvent* mouseEvent); + /** * @brief Inject touch event. * @@ -844,6 +884,46 @@ void OH_Input_SetTouchEventActionTime(struct Input_TouchEvent* touchEvent, int64 */ int64_t OH_Input_GetTouchEventActionTime(const struct Input_TouchEvent* touchEvent); +/** + * @brief Sets the windowId for a touch event. + * + * @param touchEvent Touch event object. + * @param windowId The windowId for a touch event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +void OH_Input_SetTouchEventWindowId(struct Input_TouchEvent* touchEvent, int32_t windowId); + +/** + * @brief Obtains the windowId of a touch event. + * + * @param touchEvent Touch event object. + * @return windowId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 +*/ +int32_t OH_Input_GetTouchEventWindowId(const struct Input_TouchEvent* touchEvent); + +/** + * @brief Sets the displayId for a touch event. + * + * @param touchEvent Touch event object. + * @param displayId The displayId for a touch event. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 + */ +void OH_Input_SetTouchEventDisplayId(struct Input_TouchEvent* touchEvent, int32_t displayId); + +/** + * @brief Obtains the displayId of a touch event. + * + * @param touchEvent Touch event object. + * @return displayId. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 16 +*/ +int32_t OH_Input_GetTouchEventDisplayId(const struct Input_TouchEvent* touchEvent); + /** * @brief Cancels event injection and revokes authorization. * diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index 35791ebb5..36a6921ca 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -430,5 +430,37 @@ { "first_introduced": "13", "name": "OH_Input_UnregisterDeviceListeners" + }, + { + "first_introduced": "16", + "name": "OH_Input_SetMouseEventWindowId" + }, + { + "first_introduced": "16", + "name": "OH_Input_GetMouseEventWindowId" + }, + { + "first_introduced": "16", + "name": "OH_Input_SetMouseEventDisplayId" + }, + { + "first_introduced": "16", + "name": "OH_Input_GetMouseEventDisplayId" + }, + { + "first_introduced": "16", + "name": "OH_Input_SetTouchEventWindowId" + }, + { + "first_introduced": "16", + "name": "OH_Input_GetTouchEventWindowId" + }, + { + "first_introduced": "16", + "name": "OH_Input_SetTouchEventDisplayId" + }, + { + "first_introduced": "16", + "name": "OH_Input_GetTouchEventDisplayId" } ] \ No newline at end of file -- Gitee