From 05f87e5d7fbf663454cb42dbbc954eeaa9045855 Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Thu, 12 Jun 2025 19:08:36 +0800 Subject: [PATCH] fix Signed-off-by: wanghao1717 --- .../kits/c/input/oh_input_manager.h | 76 +++++++++---------- multimodalinput/kits/c/ohinput.ndk.json | 8 +- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/multimodalinput/kits/c/input/oh_input_manager.h b/multimodalinput/kits/c/input/oh_input_manager.h index 3934be3b9..6d7739314 100644 --- a/multimodalinput/kits/c/input/oh_input_manager.h +++ b/multimodalinput/kits/c/input/oh_input_manager.h @@ -1634,44 +1634,6 @@ Input_Result OH_Input_AddHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyC */ Input_Result OH_Input_RemoveHotkeyMonitor(const Input_Hotkey* hotkey, Input_HotkeyCallback callback); -/** - * @brief Registers a listener for device hot swap events. - * - * @param listener Pointer to an {@Link Input_DeviceListener} object. - * - * @return OH_Input_RegisterDeviceListener status code, specifically, - * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} if listener is NULL; - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 - */ -Input_Result OH_Input_RegisterDeviceListener(Input_DeviceListener* listener); - -/** - * @brief Unregisters the listener for device hot swap events. - * - * @param listener Pointer to the listener for device hot swap events. For details, see {@Link Input_DeviceListener}. - * - * @return OH_Input_UnregisterDeviceListener status code, specifically, - * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_PARAMETER_ERROR} if listener is NULL or no listener is registered; - * {@link INPUT_SERVICE_EXCEPTION} if the service is abnormal. - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 - */ -Input_Result OH_Input_UnregisterDeviceListener(Input_DeviceListener* listener); - -/** - * @brief Unregisters the listener for all device hot swap events. - * - * @return OH_Input_UnregisterDeviceListener status code, specifically, - * {@link INPUT_SUCCESS} if the operation is successful;\n - * {@link INPUT_SERVICE_EXCEPTION} if the service is abnormal. - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 - */ -Input_Result OH_Input_UnregisterDeviceListeners(); - /** * @brief Obtains the IDs of all input devices. * @@ -1823,6 +1785,44 @@ Input_Result OH_Input_GetDeviceVendor(Input_DeviceInfo *deviceInfo, int32_t *ven */ Input_Result OH_Input_GetDeviceAddress(Input_DeviceInfo *deviceInfo, char **address); +/** + * @brief Registers a listener for device hot swap events. + * + * @param listener Pointer to an {@Link Input_DeviceListener} object. + * + * @return OH_Input_RegisterDeviceListener status code, specifically, + * {@link INPUT_SUCCESS} if the operation is successful;\n + * {@link INPUT_PARAMETER_ERROR} if listener is NULL; + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 13 + */ +Input_Result OH_Input_RegisterDeviceListener(Input_DeviceListener* listener); + +/** + * @brief Unregisters the listener for device hot swap events. + * + * @param listener Pointer to the listener for device hot swap events. For details, see {@Link Input_DeviceListener}. + * + * @return OH_Input_UnregisterDeviceListener status code, specifically, + * {@link INPUT_SUCCESS} if the operation is successful;\n + * {@link INPUT_PARAMETER_ERROR} if listener is NULL or no listener is registered; + * {@link INPUT_SERVICE_EXCEPTION} if the service is abnormal. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 13 + */ +Input_Result OH_Input_UnregisterDeviceListener(Input_DeviceListener* listener); + +/** + * @brief Unregisters the listener for all device hot swap events. + * + * @return OH_Input_UnregisterDeviceListener status code, specifically, + * {@link INPUT_SUCCESS} if the operation is successful;\n + * {@link INPUT_SERVICE_EXCEPTION} if the service is abnormal. + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 13 + */ +Input_Result OH_Input_UnregisterDeviceListeners(); + /** * @brief Obtains the function key status. * diff --git a/multimodalinput/kits/c/ohinput.ndk.json b/multimodalinput/kits/c/ohinput.ndk.json index ed19a127a..eeb515a36 100644 --- a/multimodalinput/kits/c/ohinput.ndk.json +++ b/multimodalinput/kits/c/ohinput.ndk.json @@ -315,10 +315,6 @@ "first_introduced": "12", "name": "OH_Input_RemoveInputEventInterceptor" }, - { - "first_introduced": "14", - "name": "OH_Input_GetIntervalSinceLastInput" - }, { "first_introduced": "14", "name": "OH_Input_CreateAllSystemHotkeys" @@ -371,6 +367,10 @@ "first_introduced": "14", "name": "OH_Input_GetRepeat" }, + { + "first_introduced": "14", + "name": "OH_Input_GetIntervalSinceLastInput" + }, { "first_introduced": "13", "name": "OH_Input_GetDeviceIds" -- Gitee