From cce26c78fcc119b7cda4d3031ce40ac49d27ba34 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Thu, 26 Dec 2024 16:13:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I1a0062d0adce33c5a345dc45d08d3acb7a37240a --- .../kits/c/input/oh_input_manager.h | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 38470f93dc2..439f75748d8 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -249,6 +249,8 @@ typedef enum Input_Result { INPUT_NOT_SYSTEM_APPLICATION = 202, /** @error Parameter check failed */ INPUT_PARAMETER_ERROR = 401, + /** @error Device not support */ + INPUT_DEVICE_NOT_SUPPORT = 801, /** @error Service error */ INPUT_SERVICE_EXCEPTION = 3800001, /** @error Interceptor repeatedly created for an application */ @@ -1284,6 +1286,7 @@ Input_Result OH_Input_RemoveInputEventInterceptor(void); * {@Link INPUT_SUCCESS} if the Operation is successful.\n * {@Link INPUT_SERVICE_EXCEPTION} Failed to get the interval because the service is exception.\n * {@Link INPUT_PARAMETER_ERROR} The timeInterval is NULL.\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1293,7 +1296,8 @@ Input_Result OH_Input_GetIntervalSinceLastInput(int64_t *timeInterval); * @brief Creates a hot key object. * * @return Returns an {@Link Input_Hotkey} pointer object if the operation is successful. Otherwise, a null pointer is - * returned. The possible cause is memory allocation failure. + * returned. The possible cause is memory allocation failure, + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1328,7 +1332,8 @@ void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); * @return OH_Input_GetPreKeys status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount - * is NULL.\n + * is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1351,7 +1356,8 @@ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); * @param finalKeyCode Returns the key value of the decorated key. * @return OH_Input_GetfinalKey status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL.\n + * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1364,7 +1370,8 @@ Input_Result OH_Input_GetFinalKey(const Input_Hotkey *hotkey, int32_t *finalKeyC * system shortcut keys. * @return Returns a pointer to an array of {@Link Input_Hotkey} instances if the operation is successful. If the * operation fails, a null pointer is returned. The possible cause is memory allocation failure or count is not equal - * to the number of system hotkeys. + * to the number of system hotkeys, + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1390,7 +1397,8 @@ void OH_Input_DestroyAllSystemHotkeys(Input_Hotkey **hotkeys, int32_t count); * @return OH_Input_GetAllSystemHotkeys status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey or count is NULL, or the value of count does not match the number - * of system shortcut keys supported by the system. + * of system shortcut keys supported by the system; + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1414,7 +1422,8 @@ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); * @param isRepeat Whether a key event is repeated. * @return OH_Input_GetIsRepeat status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} otherwise.\n + * {@link INPUT_PARAMETER_ERROR} otherwise;\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1428,6 +1437,7 @@ Input_Result OH_Input_GetRepeat(const Input_Hotkey* hotkey, bool *isRepeat); * @return OH_Input_AddHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported;\n * {@Link INPUT_OCCUPIED_BY_SYSTEM} The hotkey has been used by the system. You can call the {@Link * GetAllSystemHotkeys} interface to query all system shortcut keys.\n * {@Link INPUT_OCCUPIED_BY_OTHER} The hotkey has been subscribed to by another.\n @@ -1444,6 +1454,7 @@ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyC * @return OH_Input_RemoveHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n + * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ -- Gitee From 627c776a8b6b2cca711b447ac4ad0e52a273b40f Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Thu, 26 Dec 2024 21:16:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I0ca5af93606f45bc220147c94d8e2fca0651ddd9 --- .../kits/c/input/oh_input_manager.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 439f75748d8..20045864919 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -250,7 +250,7 @@ typedef enum Input_Result { /** @error Parameter check failed */ INPUT_PARAMETER_ERROR = 401, /** @error Device not support */ - INPUT_DEVICE_NOT_SUPPORT = 801, + INPUT_DEVICE_NOT_SUPPORTED = 801, /** @error Service error */ INPUT_SERVICE_EXCEPTION = 3800001, /** @error Interceptor repeatedly created for an application */ @@ -1286,7 +1286,6 @@ Input_Result OH_Input_RemoveInputEventInterceptor(void); * {@Link INPUT_SUCCESS} if the Operation is successful.\n * {@Link INPUT_SERVICE_EXCEPTION} Failed to get the interval because the service is exception.\n * {@Link INPUT_PARAMETER_ERROR} The timeInterval is NULL.\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1297,7 +1296,6 @@ Input_Result OH_Input_GetIntervalSinceLastInput(int64_t *timeInterval); * * @return Returns an {@Link Input_Hotkey} pointer object if the operation is successful. Otherwise, a null pointer is * returned. The possible cause is memory allocation failure, - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1333,7 +1331,7 @@ void OH_Input_SetPreKeys(Input_Hotkey *hotkey, int32_t *preKeys, int32_t size); * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount * is NULL;\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1357,7 +1355,7 @@ void OH_Input_SetFinalKey(Input_Hotkey *hotkey, int32_t finalKey); * @return OH_Input_GetfinalKey status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey is NULL or the finalKeyCode is NULL;\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1370,8 +1368,7 @@ Input_Result OH_Input_GetFinalKey(const Input_Hotkey *hotkey, int32_t *finalKeyC * system shortcut keys. * @return Returns a pointer to an array of {@Link Input_Hotkey} instances if the operation is successful. If the * operation fails, a null pointer is returned. The possible cause is memory allocation failure or count is not equal - * to the number of system hotkeys, - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * to the number of system hotkeys. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1398,7 +1395,7 @@ void OH_Input_DestroyAllSystemHotkeys(Input_Hotkey **hotkeys, int32_t count); * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} The hotkey or count is NULL, or the value of count does not match the number * of system shortcut keys supported by the system; - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1423,7 +1420,7 @@ void OH_Input_SetRepeat(Input_Hotkey* hotkey, bool isRepeat); * @return OH_Input_GetIsRepeat status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} otherwise;\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ @@ -1437,7 +1434,7 @@ Input_Result OH_Input_GetRepeat(const Input_Hotkey* hotkey, bool *isRepeat); * @return OH_Input_AddHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported;\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported;\n * {@Link INPUT_OCCUPIED_BY_SYSTEM} The hotkey has been used by the system. You can call the {@Link * GetAllSystemHotkeys} interface to query all system shortcut keys.\n * {@Link INPUT_OCCUPIED_BY_OTHER} The hotkey has been subscribed to by another.\n @@ -1454,7 +1451,7 @@ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyC * @return OH_Input_RemoveHotkeyMonitor status code, specifically, * {@link INPUT_SUCCESS} if the operation is successful;\n * {@link INPUT_PARAMETER_ERROR} if hotkey or callback is NULL;\n - * {@Link INPUT_DEVICE_NOT_SUPPORT} Capability not supported.\n + * {@Link INPUT_DEVICE_NOT_SUPPORTED} Capability not supported.\n * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ -- Gitee From f60bdfbd2062dd547f7e38be232708cb82ebd972 Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Thu, 26 Dec 2024 21:18:57 +0800 Subject: [PATCH 3/3] Signed-off-by: mayunteng_1 Change-Id: I1d2be16055876862c2103215991cb97f792d7b3f --- multimodalinput/kits/c/input/oh_input_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 20045864919..0969d87e1c2 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -1295,7 +1295,7 @@ Input_Result OH_Input_GetIntervalSinceLastInput(int64_t *timeInterval); * @brief Creates a hot key object. * * @return Returns an {@Link Input_Hotkey} pointer object if the operation is successful. Otherwise, a null pointer is - * returned. The possible cause is memory allocation failure, + * returned. The possible cause is memory allocation failure. * @syscap SystemCapability.MultimodalInput.Input.Core * @since 14 */ -- Gitee