From 01ce6439839c191a4893e8474814e0b059e0a19a Mon Sep 17 00:00:00 2001 From: baitianyou Date: Fri, 1 Aug 2025 15:45:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=A5=E5=85=85brief=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E5=92=8C=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: baitianyou --- multimodalinput/kits/c/input/oh_input_manager.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 52b878d79..b4ebc309d 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -506,6 +506,9 @@ int32_t OH_Input_GetKeySwitch(const struct Input_KeyState* keyState); /** * @brief Inject system keys. + * since API 20, it is recommended to use OH_Input_RequestInjection + * to request authorization before using the interface. + * When the authorization status is AUTHORIZED, use the interface. * * @param keyEvent - the key event to be injected. * @return OH_Input_InjectKeyEvent function result code. @@ -638,6 +641,9 @@ int32_t OH_Input_GetKeyEventDisplayId(const struct Input_KeyEvent* keyEvent); /** * @brief Inject mouse event. + * since API 20, it is recommended to use OH_Input_RequestInjection + * to request authorization before using the interface. + * When the authorization status is AUTHORIZED, use the interface. * * @param mouseEvent - the mouse event to be injected. * @return OH_Input_InjectMouseEvent function result code. @@ -651,6 +657,9 @@ int32_t OH_Input_InjectMouseEvent(const struct Input_MouseEvent* mouseEvent); /** * @brief Inject mouse event using global coordinate. + * since API 20, it is recommended to use OH_Input_RequestInjection + * to request authorization before using the interface. + * When the authorization status is AUTHORIZED, use the interface. * * @param mouseEvent - the mouse event to be injected, set up effective globalX globalY. * @return OH_Input_InjectMouseEventGlobal function result code. @@ -899,6 +908,9 @@ int32_t OH_Input_GetMouseEventGlobalY(const struct Input_MouseEvent* mouseEvent) /** * @brief Inject touch event. + * since API 20, it is recommended to use OH_Input_RequestInjection + * to request authorization before using the interface. + * When the authorization status is AUTHORIZED, use the interface. * * @param touchEvent - the touch event to be injected. * @return OH_Input_InjectTouchEvent function result code. @@ -911,11 +923,15 @@ int32_t OH_Input_InjectTouchEvent(const struct Input_TouchEvent* touchEvent); /** * @brief Inject touch event using global coordinate. + * since API 20, it is recommended to use OH_Input_RequestInjection + * to request authorization before using the interface. + * When the authorization status is AUTHORIZED, use the interface. * * @param touchEvent - the touch event to be injected, set up effective globalX globalY. * @return OH_Input_InjectTouchEventGlobal function result code. * {@link INPUT_SUCCESS} inject touchEvent success.\n * {@link INPUT_PARAMETER_ERROR} Parameter check failed.\n + * {@link INPUT_PERMISSION_DENIED} Permission verification failed.\n * @since 20 */ int32_t OH_Input_InjectTouchEventGlobal(const struct Input_TouchEvent* touchEvent); -- Gitee From 6873c2f250c93aaecfe453766f15d4f6c53696a4 Mon Sep 17 00:00:00 2001 From: baitianyou Date: Sat, 2 Aug 2025 16:49:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0brief=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: baitianyou --- multimodalinput/kits/c/input/oh_input_manager.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index b4ebc309d..0a6ebafb0 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -507,7 +507,8 @@ int32_t OH_Input_GetKeySwitch(const struct Input_KeyState* keyState); /** * @brief Inject system keys. * since API 20, it is recommended to use OH_Input_RequestInjection - * to request authorization before using the interface. + * to request authorization before using the interface, + * and then use OH_Input_QueryAuthorizedStatus to query the authorization status. * When the authorization status is AUTHORIZED, use the interface. * * @param keyEvent - the key event to be injected. @@ -642,7 +643,8 @@ int32_t OH_Input_GetKeyEventDisplayId(const struct Input_KeyEvent* keyEvent); /** * @brief Inject mouse event. * since API 20, it is recommended to use OH_Input_RequestInjection - * to request authorization before using the interface. + * to request authorization before using the interface, + * and then use OH_Input_QueryAuthorizedStatus to query the authorization status. * When the authorization status is AUTHORIZED, use the interface. * * @param mouseEvent - the mouse event to be injected. @@ -658,7 +660,8 @@ int32_t OH_Input_InjectMouseEvent(const struct Input_MouseEvent* mouseEvent); /** * @brief Inject mouse event using global coordinate. * since API 20, it is recommended to use OH_Input_RequestInjection - * to request authorization before using the interface. + * to request authorization before using the interface, + * and then use OH_Input_QueryAuthorizedStatus to query the authorization status. * When the authorization status is AUTHORIZED, use the interface. * * @param mouseEvent - the mouse event to be injected, set up effective globalX globalY. @@ -909,7 +912,8 @@ int32_t OH_Input_GetMouseEventGlobalY(const struct Input_MouseEvent* mouseEvent) /** * @brief Inject touch event. * since API 20, it is recommended to use OH_Input_RequestInjection - * to request authorization before using the interface. + * to request authorization before using the interface, + * and then use OH_Input_QueryAuthorizedStatus to query the authorization status. * When the authorization status is AUTHORIZED, use the interface. * * @param touchEvent - the touch event to be injected. @@ -924,7 +928,8 @@ int32_t OH_Input_InjectTouchEvent(const struct Input_TouchEvent* touchEvent); /** * @brief Inject touch event using global coordinate. * since API 20, it is recommended to use OH_Input_RequestInjection - * to request authorization before using the interface. + * to request authorization before using the interface, + * and then use OH_Input_QueryAuthorizedStatus to query the authorization status. * When the authorization status is AUTHORIZED, use the interface. * * @param touchEvent - the touch event to be injected, set up effective globalX globalY. -- Gitee