From 4e1144082b7b20a37587f9fb929533e54b250474 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Wed, 25 Dec 2024 16:05:46 +0800 Subject: [PATCH 1/7] Signed-off-by: ma-shaoyin Changes to be committed: --- inputmethod/BUILD.gn | 2 + .../inputmethod_inputmethod_proxy_capi.h | 44 +++++ .../inputmethod_message_handler_proxy_capi.h | 170 ++++++++++++++++++ inputmethod/include/inputmethod_types_capi.h | 12 ++ 4 files changed, 228 insertions(+) create mode 100644 inputmethod/include/inputmethod_message_handler_proxy_capi.h diff --git a/inputmethod/BUILD.gn b/inputmethod/BUILD.gn index cc1480cdb..ef0543708 100644 --- a/inputmethod/BUILD.gn +++ b/inputmethod/BUILD.gn @@ -24,6 +24,7 @@ ohos_ndk_library("libohinputmethod") { "./inputmethod/inputmethod_attach_options_capi.h", "./inputmethod/inputmethod_cursor_info_capi.h", "./inputmethod/inputmethod_inputmethod_proxy_capi.h", + "./inputmethod/inputmethod_message_handler_proxy_capi.h", "./inputmethod/inputmethod_private_command_capi.h", "./inputmethod/inputmethod_text_avoid_info_capi.h", "./inputmethod/inputmethod_text_config_capi.h", @@ -39,6 +40,7 @@ ohos_ndk_headers("libohinputmethod_header") { "./include/inputmethod_controller_capi.h", "./include/inputmethod_cursor_info_capi.h", "./include/inputmethod_inputmethod_proxy_capi.h", + "./include/inputmethod_message_handler_proxy_capi.h", "./include/inputmethod_private_command_capi.h", "./include/inputmethod_text_avoid_info_capi.h", "./include/inputmethod_text_config_capi.h", diff --git a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h index f8257c2b6..6f8bf5ce1 100644 --- a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h +++ b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h @@ -39,6 +39,7 @@ #include "inputmethod_types_capi.h" #include "inputmethod_cursor_info_capi.h" #include "inputmethod_private_command_capi.h" +#include "inputmethod_message_handler_proxy_capi.h" #ifdef __cplusplus extern "C"{ #endif /* __cplusplus */ @@ -166,6 +167,49 @@ InputMethod_ErrorCode OH_InputMethodProxy_NotifyCursorUpdate( */ InputMethod_ErrorCode OH_InputMethodProxy_SendPrivateCommand( InputMethod_InputMethodProxy *inputMethodProxy, InputMethod_PrivateCommand *privateCommand[], size_t size); + +/** + * @brief Send private command. + * + * @param inputMethodProxy Represents a pointer to an {@link OH_InputMethod_InputMethodProxy} instance. + * The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}. + * @param msgId The ArrayBuffer.msgId, which is defined in {@link InputMethod_PrivateCommand}. Max size 256B. + * @param msgIdLength The size of ArrayBuffer.msgId. Max is 256B. + * @param msgParam The private commands, which is defined in {@link InputMethod_PrivateCommand}. Max size 128KB. + * @param msgParamLength The size of ArrayBuffer.msgParam. Max is 128KB. + * @param size The size of privateCommand. Max is 5. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_PARAMCHECK} - parameter check failed. + * {@link IME_ERR_IMCLIENT} - input method client error. + * {@link IME_ERR_IMMS} - input method manager service error. + * {@link IME_ERR_DETACHED} - input method client detached. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_InputMethodProxy_SendMessage(InputMethod_InputMethodProxy *inputMethodProxy, + const char16_t *msgId, size_t msgIdLength, const uint8_t *msgParam, size_t msgParamLength); + +/** + * @brief Register message handler. + * + * @param inputMethodProxy Represents a pointer to an {@link OH_InputMethod_InputMethodProxy} instance. + * The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}. + * @param messageHandler Represents a pointer to an {@link InputMethod_MessageHandlerProxy} instance. + * The caller needs to manage the lifecycle of messageHandler. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_PARAMCHECK} - parameter check failed. + * {@link IME_ERR_IMCLIENT} - input method client error. + * {@link IME_ERR_IMMS} - input method manager service error. + * {@link IME_ERR_DETACHED} - input method client detached. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_InputMethodProxy_RecvMessage( + InputMethod_InputMethodProxy *inputMethodProxy, InputMethod_MessageHandlerProxy *messageHandler); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/inputmethod/include/inputmethod_message_handler_proxy_capi.h b/inputmethod/include/inputmethod_message_handler_proxy_capi.h new file mode 100644 index 000000000..ff73b8b7f --- /dev/null +++ b/inputmethod/include/inputmethod_message_handler_proxy_capi.h @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef OHOS_INPUTMETHOD_MESSAGE_HANDLER_PROXY_CAPI_H +#define OHOS_INPUTMETHOD_MESSAGE_HANDLER_PROXY_CAPI_H +/** + * @addtogroup InputMethod + * @{ + * + * @brief InputMethod provides functions to use input methods and develop input methods. + * + * @since 12 + */ + +/** + * @file inputmethod_text_editor_proxy_capi.h + * + * @brief Provides functions for getting requests and notifications from input method. + * + * @library libohinputmethod.so + * @kit IMEKit + * @syscap SystemCapability.MiscServices.InputMethodFramework + * @since 16 + * @version 1.0 + */ +#include + +#include "inputmethod_text_config_capi.h" +#include "inputmethod_types_capi.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +/** + * @brief Define the InputMethod_MessageHandlerProxy structure type. + * + * Provides methods for getting requests and notifications from input method.\n + * When input method sends request or notification to editor, the methods will be called.\n + * + * @since 16 + */ +typedef struct InputMethod_MessageHandlerProxy InputMethod_MessageHandlerProxy; + +/** + * @brief Called when input method sending private command. + * + * You need to implement this function, set it to {@link InputMethod_MessageHandlerProxy} through {@link + * OH_TextEditorProxy_SetOnTerminatedFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the + * registration.\n + * + * @param messageHandlerProxy Represents a pointer to an + * {@link InputMethod_MessageHandlerProxy} instance which will be set in. + * @return Returns the result of handling private command. + * @since 16 + */ +typedef int32_t (*OH_MessageHandlerProxy_OnTerminatedFunc)(InputMethod_MessageHandlerProxy *messageHandlerProxy); + +/** + * @brief Called when input method finishing preview text. + * + * You need to implement this function, set it to {@link InputMethod_MessageHandlerProxy} through {@link + * OH_TextEditorProxy_SetOnMessageFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the + * registration.\n + * + * @param messageHandlerProxy Represents a pointer to an + * {@link InputMethod_MessageHandlerProxy} instance which will be set in. + * @param msgId ArrayBuffer.msgId from input method. + * @param msgIdLength Size of ArrayBuffer.msgId. + * @param msgParam ArrayBuffer.msgParam from input method. + * @param msgParamLength Size of ArrayBuffer.msgParam. + * @since 16 + */ +typedef int32_t (*OH_MessageHandlerProxy_OnMessageFunc)(InputMethod_MessageHandlerProxy *messageHandlerProxy, + const char16_t msgId[], size_t msgIdLength, const uint8_t *msgParam, size_t msgParamLength); + +/** + * @brief Create a new {@link InputMethod_MessageHandlerProxy} instance. + * + * @return If the creation succeeds, a pointer to the newly created {@link InputMethod_MessageHandlerProxy} + * instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory. + * @since 12 + */ +InputMethod_MessageHandlerProxy *OH_MessageHandlerProxy_Create(void); + +/** + * @brief Destroy a {@link InputMethod_MessageHandlerProxy} instance. + * + * @param proxy The {@link InputMethod_MessageHandlerProxy} instance to be destroyed. + * @since 16 + */ +void OH_MessageHandlerProxy_Destroy(InputMethod_MessageHandlerProxy *proxy); + +/** + * @brief Set function {@link OH_MessageHandlerProxy_OnTerminatedFunc} into {@link InputMethod_MessageHandlerProxy}. + * + * @param proxy Represents a pointer to an + * {@link InputMethod_MessageHandlerProxy} instance which will be set function in. + * @param onTerminatedFunc Represents function {@link OH_MessageHandlerProxy_SetOnTerminatedFunc} which + * will be set. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_MessageHandlerProxy_SetOnTerminatedFunc( + InputMethod_MessageHandlerProxy *proxy, OH_MessageHandlerProxy_OnTerminatedFunc onTerminatedFunc); + +/** + * @brief Get function {@link OH_MessageHandlerProxy_OnTerminatedFunc} from {@link InputMethod_MessageHandlerProxy}. + * + * @param proxy Represents a pointer to an + * {@link InputMethod_MessageHandlerProxy} instance which will be get function from. + * @param onTerminatedFunc Represents function {@link OH_MessageHandlerProxy_GetOnTerminatedFunc} which + * will be get. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_MessageHandlerProxy_GetOnTerminatedFunc( + InputMethod_MessageHandlerProxy *proxy, OH_MessageHandlerProxy_OnTerminatedFunc *onTerminatedFunc); + +/** + * @brief Set function {@link OH_MessageHandlerProxy_OnMessageFunc} into {@link InputMethod_MessageHandlerProxy}. + * + * @param proxy Represents a pointer to an + * {@link InputMethod_MessageHandlerProxy} instance which will be set function in. + * @param onMessageFunc Represents function {@link OH_MessageHandlerProxy_SetOnMessageFunc} which + * will be set. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_MessageHandlerProxy_SetOnMessageFunc( + InputMethod_MessageHandlerProxy *proxy, OH_MessageHandlerProxy_OnMessageFunc onMessageFunc); + +/** + * @brief Get function {@link OH_MessageHandlerProxy_OnMessageFunc} from {@link InputMethod_MessageHandlerProxy}. + * + * @param proxy Represents a pointer to an {@link InputMethod_MessageHandlerProxy} instance which will be get function + * from. + * @param onMessageFunc Represents function {@link OH_MessageHandlerProxy_GetOnMessageFunc} which + * will be get. + * @return Returns a specific error code. + * {@link IME_ERR_OK} - success. + * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * Specific error codes can be referenced {@link InputMethod_ErrorCode}. + * @since 16 + */ +InputMethod_ErrorCode OH_MessageHandlerProxy_GetOnMessageFunc( + InputMethod_MessageHandlerProxy *proxy, OH_MessageHandlerProxy_OnMessageFunc *onMessageFunc); +#ifdef __cplusplus +} +#endif /* __cplusplus */ +/** @} */ +#endif // OHOS_INPUTMETHOD_MESSAGE_HANDLER_PROXY_CAPI_H \ No newline at end of file diff --git a/inputmethod/include/inputmethod_types_capi.h b/inputmethod/include/inputmethod_types_capi.h index 0fc88c455..be3eb0251 100644 --- a/inputmethod/include/inputmethod_types_capi.h +++ b/inputmethod/include/inputmethod_types_capi.h @@ -292,6 +292,18 @@ typedef enum InputMethod_ErrorCode { * @error The error code when input method client detached. */ IME_ERR_DETACHED = 12800009, + /** + * @error The error code when another size was not register message handler. + */ + IME_ERR_BASIC_MODE = 12800014, + /** + * @error The error code when current security mode is basic mode. + */ + IME_ERR_REQUEST_NOT_ACCEPT = 12800015, + /** + * @error The error code when current is not editable status. + */ + IME_ERR_EDITABLE = 12800016, /** * @error The error code when unexpected null pointer. */ -- Gitee From de12277be869238e38272a854d86308cc4f77ea5 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Fri, 3 Jan 2025 14:25:43 +0800 Subject: [PATCH 2/7] Signed-off-by: ma-shaoyin Changes to be committed: --- inputmethod/include/inputmethod_types_capi.h | 21 +++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/inputmethod/include/inputmethod_types_capi.h b/inputmethod/include/inputmethod_types_capi.h index be3eb0251..fe6ea63f4 100644 --- a/inputmethod/include/inputmethod_types_capi.h +++ b/inputmethod/include/inputmethod_types_capi.h @@ -249,67 +249,82 @@ typedef enum InputMethod_CommandValueType { typedef enum InputMethod_ErrorCode { /** * @error The error code in the correct case. + * @since 12 */ IME_ERR_OK = 0, - /** * @error The error code when error is undefined. + * @since 12 */ IME_ERR_UNDEFINED = 1, /** * @error The error code when parameter check failed. + * @since 12 */ IME_ERR_PARAMCHECK = 401, /** * @error The error code when the bundle manager error. + * @since 12 */ IME_ERR_PACKAGEMANAGER = 12800001, /** * @error The error code when input method engine error. + * @since 12 */ IME_ERR_IMENGINE = 12800002, /** * @error The error code when input method client error. + * @since 12 */ IME_ERR_IMCLIENT = 12800003, /** * @error The error code when configuration persistence error. + * @since 12 */ IME_ERR_CONFIG_PERSIST = 12800005, /** * @error The error code when input method controller error. + * @since 12 */ IME_ERR_CONTROLLER = 12800006, /** * @error The error code when input method setting error. + * @since 12 */ IME_ERR_SETTINGS = 12800007, /** * @error The error code when input method manager service error. + * @since 12 */ IME_ERR_IMMS = 12800008, /** * @error The error code when input method client detached. + * @since 12 */ IME_ERR_DETACHED = 12800009, /** - * @error The error code when another size was not register message handler. + * @error The error code when current security mode is basic mode. + * @since 16 */ IME_ERR_BASIC_MODE = 12800014, /** - * @error The error code when current security mode is basic mode. + * @error The error code when another size was not register message handler. + * @since 16 */ IME_ERR_REQUEST_NOT_ACCEPT = 12800015, /** * @error The error code when current is not editable status. + * @since 16 */ IME_ERR_EDITABLE = 12800016, /** * @error The error code when unexpected null pointer. + * @since 12 */ IME_ERR_NULL_POINTER = 12802000, /** * @error The error code when query failed. + * @since 12 */ IME_ERR_QUERY_FAILED = 12802001, } InputMethod_ErrorCode; -- Gitee From ca84bb56d451d9384270d4740c00a76465ecc224 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Fri, 3 Jan 2025 16:09:54 +0800 Subject: [PATCH 3/7] Signed-off-by: ma-shaoyin Changes to be committed: --- inputmethod/include/inputmethod_inputmethod_proxy_capi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h index 6f8bf5ce1..ab1921ef1 100644 --- a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h +++ b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h @@ -182,9 +182,11 @@ InputMethod_ErrorCode OH_InputMethodProxy_SendPrivateCommand( * {@link IME_ERR_OK} - success. * {@link IME_ERR_PARAMCHECK} - parameter check failed. * {@link IME_ERR_IMCLIENT} - input method client error. - * {@link IME_ERR_IMMS} - input method manager service error. * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. + * {@link IME_ERR_REQUEST_NOT_ACCEPT} - another side was not register. + * {@link IME_ERR_BASIC_MODE} - ime security mode is basic mode. + * {@link IME_ERR_EDITABLE} - current is not editable status. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. * @since 16 */ @@ -201,8 +203,6 @@ InputMethod_ErrorCode OH_InputMethodProxy_SendMessage(InputMethod_InputMethodPro * @return Returns a specific error code. * {@link IME_ERR_OK} - success. * {@link IME_ERR_PARAMCHECK} - parameter check failed. - * {@link IME_ERR_IMCLIENT} - input method client error. - * {@link IME_ERR_IMMS} - input method manager service error. * {@link IME_ERR_DETACHED} - input method client detached. * {@link IME_ERR_NULL_POINTER} - unexpected null pointer. * Specific error codes can be referenced {@link InputMethod_ErrorCode}. -- Gitee From 866da93b619970e0d5c1c3335adb0d814455a760 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Sat, 4 Jan 2025 14:52:23 +0800 Subject: [PATCH 4/7] Signed-off-by: ma-shaoyin Changes to be committed: --- .../inputmethod_message_handler_proxy_capi.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inputmethod/include/inputmethod_message_handler_proxy_capi.h b/inputmethod/include/inputmethod_message_handler_proxy_capi.h index ff73b8b7f..5db44ffb6 100644 --- a/inputmethod/include/inputmethod_message_handler_proxy_capi.h +++ b/inputmethod/include/inputmethod_message_handler_proxy_capi.h @@ -20,13 +20,13 @@ * * @brief InputMethod provides functions to use input methods and develop input methods. * - * @since 12 + * @since 16 */ /** - * @file inputmethod_text_editor_proxy_capi.h + * @file inputmethod_message_handler_proxy_capi.h * - * @brief Provides functions for getting requests and notifications from input method. + * @brief Provides functions for sending and receiving customize message from input method. * * @library libohinputmethod.so * @kit IMEKit @@ -44,18 +44,18 @@ extern "C" { /** * @brief Define the InputMethod_MessageHandlerProxy structure type. * - * Provides methods for getting requests and notifications from input method.\n - * When input method sends request or notification to editor, the methods will be called.\n + * Provides methods for sending and receiving customize message.\n + * When input method sends customize message or unregister message handler, the methods will be called.\n * * @since 16 */ typedef struct InputMethod_MessageHandlerProxy InputMethod_MessageHandlerProxy; /** - * @brief Called when input method sending private command. + * @brief Called when unregister messager handler. * * You need to implement this function, set it to {@link InputMethod_MessageHandlerProxy} through {@link - * OH_TextEditorProxy_SetOnTerminatedFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the + * OH_MessageHandlerProxy_SetOnTerminatedFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the * registration.\n * * @param messageHandlerProxy Represents a pointer to an @@ -66,10 +66,10 @@ typedef struct InputMethod_MessageHandlerProxy InputMethod_MessageHandlerProxy; typedef int32_t (*OH_MessageHandlerProxy_OnTerminatedFunc)(InputMethod_MessageHandlerProxy *messageHandlerProxy); /** - * @brief Called when input method finishing preview text. + * @brief Called when receiving customize message from input method. * * You need to implement this function, set it to {@link InputMethod_MessageHandlerProxy} through {@link - * OH_TextEditorProxy_SetOnMessageFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the + * OH_MessageHandlerProxy_SetOnTerminatedFunc}, and use {@link OH_InputMethodProxy_RecvMessage} to complete the * registration.\n * * @param messageHandlerProxy Represents a pointer to an -- Gitee From 8a554395d839ad7fc1d16df39a224eca99f930a8 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Sat, 4 Jan 2025 14:58:11 +0800 Subject: [PATCH 5/7] Signed-off-by: ma-shaoyin Changes to be committed: --- .../include/inputmethod_inputmethod_proxy_capi.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h index ab1921ef1..3d6dd29b1 100644 --- a/inputmethod/include/inputmethod_inputmethod_proxy_capi.h +++ b/inputmethod/include/inputmethod_inputmethod_proxy_capi.h @@ -169,15 +169,14 @@ InputMethod_ErrorCode OH_InputMethodProxy_SendPrivateCommand( InputMethod_InputMethodProxy *inputMethodProxy, InputMethod_PrivateCommand *privateCommand[], size_t size); /** - * @brief Send private command. + * @brief Send customize message. * * @param inputMethodProxy Represents a pointer to an {@link OH_InputMethod_InputMethodProxy} instance. * The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}. - * @param msgId The ArrayBuffer.msgId, which is defined in {@link InputMethod_PrivateCommand}. Max size 256B. - * @param msgIdLength The size of ArrayBuffer.msgId. Max is 256B. - * @param msgParam The private commands, which is defined in {@link InputMethod_PrivateCommand}. Max size 128KB. - * @param msgParamLength The size of ArrayBuffer.msgParam. Max is 128KB. - * @param size The size of privateCommand. Max is 5. + * @param msgId The message id. Max size 256B. + * @param msgIdLength The size of message id. Max is 256B. + * @param msgParam The message param. Max size 128KB. + * @param msgParamLength The size of message param. Max is 128KB. * @return Returns a specific error code. * {@link IME_ERR_OK} - success. * {@link IME_ERR_PARAMCHECK} - parameter check failed. -- Gitee From c58dee9d7fcbc1e22b3729b752b8798c68351f57 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Sat, 4 Jan 2025 15:02:33 +0800 Subject: [PATCH 6/7] Signed-off-by: ma-shaoyin Changes to be committed: --- inputmethod/include/inputmethod_message_handler_proxy_capi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputmethod/include/inputmethod_message_handler_proxy_capi.h b/inputmethod/include/inputmethod_message_handler_proxy_capi.h index 5db44ffb6..65c60e46d 100644 --- a/inputmethod/include/inputmethod_message_handler_proxy_capi.h +++ b/inputmethod/include/inputmethod_message_handler_proxy_capi.h @@ -88,7 +88,7 @@ typedef int32_t (*OH_MessageHandlerProxy_OnMessageFunc)(InputMethod_MessageHandl * * @return If the creation succeeds, a pointer to the newly created {@link InputMethod_MessageHandlerProxy} * instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory. - * @since 12 + * @since 16 */ InputMethod_MessageHandlerProxy *OH_MessageHandlerProxy_Create(void); -- Gitee From ac4de1b0dca135fb026e8f12d4d96858ae13bdd2 Mon Sep 17 00:00:00 2001 From: ma-shaoyin Date: Sat, 4 Jan 2025 16:32:46 +0800 Subject: [PATCH 7/7] Signed-off-by: ma-shaoyin Changes to be committed: --- inputmethod/include/inputmethod_types_capi.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/inputmethod/include/inputmethod_types_capi.h b/inputmethod/include/inputmethod_types_capi.h index fe6ea63f4..1c1ba5c1b 100644 --- a/inputmethod/include/inputmethod_types_capi.h +++ b/inputmethod/include/inputmethod_types_capi.h @@ -249,57 +249,46 @@ typedef enum InputMethod_CommandValueType { typedef enum InputMethod_ErrorCode { /** * @error The error code in the correct case. - * @since 12 */ IME_ERR_OK = 0, /** * @error The error code when error is undefined. - * @since 12 */ IME_ERR_UNDEFINED = 1, /** * @error The error code when parameter check failed. - * @since 12 */ IME_ERR_PARAMCHECK = 401, /** * @error The error code when the bundle manager error. - * @since 12 */ IME_ERR_PACKAGEMANAGER = 12800001, /** * @error The error code when input method engine error. - * @since 12 */ IME_ERR_IMENGINE = 12800002, /** * @error The error code when input method client error. - * @since 12 */ IME_ERR_IMCLIENT = 12800003, /** * @error The error code when configuration persistence error. - * @since 12 */ IME_ERR_CONFIG_PERSIST = 12800005, /** * @error The error code when input method controller error. - * @since 12 */ IME_ERR_CONTROLLER = 12800006, /** * @error The error code when input method setting error. - * @since 12 */ IME_ERR_SETTINGS = 12800007, /** * @error The error code when input method manager service error. - * @since 12 */ IME_ERR_IMMS = 12800008, /** * @error The error code when input method client detached. - * @since 12 */ IME_ERR_DETACHED = 12800009, /** @@ -319,12 +308,10 @@ typedef enum InputMethod_ErrorCode { IME_ERR_EDITABLE = 12800016, /** * @error The error code when unexpected null pointer. - * @since 12 */ IME_ERR_NULL_POINTER = 12802000, /** * @error The error code when query failed. - * @since 12 */ IME_ERR_QUERY_FAILED = 12802001, } InputMethod_ErrorCode; -- Gitee