1# InputMethod
2
3
4## Overview
5
6The InputMethod module provides methods for using and developing input methods.
7
8**Since**: 12
9
10
11## Summary
12
13
14### Files
15
16| Name| Description|
17| -------- | -------- |
18| [inputmethod_attach_options_capi.h](inputmethod__attach__options__capi_8h.md) | Provides methods for creating, destroying, reading, and writing the option object bound to the input method.|
19| [inputmethod_controller_capi.h](inputmethod__controller__capi_8h.md) | Provides methods for binding and unbinding input methods.|
20| [inputmethod_cursor_info_capi.h](inputmethod__cursor__info__capi_8h.md) | Provides methods for creating, destroying, reading, and writing cursor information objects.|
21| [inputmethod_inputmethod_proxy_capi.h](inputmethod__inputmethod__proxy__capi_8h.md) | Provides methods for using the input method, allowing requests and notifications to be sent to the input method application.|
22| [inputmethod_private_command_capi.h](inputmethod__private__command__capi_8h.md) | Provides methods for creating, destroying, reading, and writing private data objects.|
23| [inputmethod_text_avoid_info_capi.h](inputmethod__text__avoid__info__capi_8h.md) | Provides methods for creating, destroying, reading, and writing the text box avoidance information objects.|
24| [inputmethod_text_config_capi.h](inputmethod__text__config__capi_8h.md) | Provides methods for creating, destroying, reading, and writing the text box configuration information objects.|
25| [inputmethod_text_editor_proxy_capi.h](inputmethod__text__editor__proxy__capi_8h.md) | Provides a set of methods for the custom text box developed by the application to obtain notifications and requests from the input method application.|
26| [inputmethod_types_capi.h](inputmethod__types__capi_8h.md) | Defines the types related to the input method.|
27
28
29### Types
30
31| Name| Description|
32| -------- | -------- |
33| [InputMethod_AttachOptions](#inputmethod_attachoptions) | Options for binding the input method.|
34| [InputMethod_CursorInfo](#inputmethod_cursorinfo) | Cursor information.|
35| [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) | Input method proxy object.|
36| [InputMethod_PrivateCommand](#inputmethod_privatecommand) | Private data.|
37| [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) | Text box avoidance information.|
38| [InputMethod_TextConfig](#inputmethod_textconfig) | Text box configuration.|
39| [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) | Text box proxy.|
40| typedef void(\* [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_TextConfig](#inputmethod_textconfig) \*config) | Function called when the input method obtains the text box configuration.|
41| typedef void(\* [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, const char16_t \*text, size_t length) | Function called when the input method application inserts text.|
42| typedef void(\* [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, int32_t length) | Function called when the input method deletes the text on the right of the cursor.|
43| typedef void(\* [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, int32_t length) | Function called when the input method deletes the text on the left of the cursor.|
44| typedef void(\* [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_KeyboardStatus](#inputmethod_keyboardstatus) keyboardStatus) | Function called when the input method notifies the keyboard status.|
45| typedef void(\* [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_EnterKeyType](#inputmethod_enterkeytype) enterKeyType) | Function called when the Enter key is pressed in the input method.|
46| typedef void(\* [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_Direction](#inputmethod_direction) direction) | Function called when the cursor is moved in the input method.|
47| typedef void(\* [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, int32_t start, int32_t end) | Function called when the input method requests to select text.|
48| typedef void(\* [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_ExtendAction](#inputmethod_extendaction) action) | Function called when the input method sends an extended editing operation.|
49| typedef void(\* [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, int32_t number, char16_t text[], size_t \*length) | Function called when the input method obtains the text on the left of the cursor.|
50| typedef void(\* [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, int32_t number, char16_t text[], size_t \*length) | Function called when the input method obtains the text on the right of the cursor.|
51| typedef int32_t(\* [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy) | Function called when the input method obtains the index of the text where the cursor is located in the text box.|
52| typedef int32_t(\* [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_PrivateCommand](#inputmethod_privatecommand) \*privateCommand[], size_t size) | Function called when the input method application sends a private data command.|
53| typedef int32_t(\* [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, const char16_t text[], size_t length, int32_t start, int32_t end) | Function called when the input method sets the text preview feature.|
54| typedef void(\* [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc)) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy) | Function called when the input method ends the text preview feature.|
55| [InputMethod_KeyboardStatus](#inputmethod_keyboardstatus) | Keyboard status.|
56| [InputMethod_EnterKeyType](#inputmethod_enterkeytype) | Enter function type.|
57| [InputMethod_Direction](#inputmethod_direction) | Moving direction.|
58| [InputMethod_ExtendAction](#inputmethod_extendaction) | Type of the extended edit action on the text box.|
59| [InputMethod_TextInputType](#inputmethod_textinputtype) | Text input type.|
60| [InputMethod_CommandValueType](#inputmethod_commandvaluetype) | Private data type.|
61| [InputMethod_ErrorCode](#inputmethod_errorcode) | Error code of the input method.|
62
63
64### Enums
65
66| Name| Description|
67| -------- | -------- |
68| [InputMethod_KeyboardStatus](#inputmethod_keyboardstatus) {<br>IME_KEYBOARD_STATUS_NONE = 0,<br>IME_KEYBOARD_STATUS_HIDE = 1,<br>IME_KEYBOARD_STATUS_SHOW = 2<br>} | Keyboard status.|
69| [InputMethod_EnterKeyType](#inputmethod_enterkeytype) {<br>IME_ENTER_KEY_UNSPECIFIED = 0,<br>IME_ENTER_KEY_NONE = 1,<br>IME_ENTER_KEY_GO = 2,<br>IME_ENTER_KEY_SEARCH = 3,<br>IME_ENTER_KEY_SEND = 4,<br>IME_ENTER_KEY_NEXT = 5,<br>IME_ENTER_KEY_DONE = 6,<br>IME_ENTER_KEY_PREVIOUS = 7,<br>IME_ENTER_KEY_NEWLINE = 8<br>} | Enter function type.|
70| [InputMethod_Direction](#inputmethod_direction) {<br>IME_DIRECTION_NONE = 0,<br>IME_DIRECTION_UP = 1,<br>IME_DIRECTION_DOWN = 2,<br>IME_DIRECTION_LEFT = 3,<br>IME_DIRECTION_RIGHT = 4<br>} | Moving direction.|
71| [InputMethod_ExtendAction](#inputmethod_extendaction) {<br>IME_EXTEND_ACTION_SELECT_ALL = 0,<br>IME_EXTEND_ACTION_CUT = 3,<br>IME_EXTEND_ACTION_COPY = 4,<br>IME_EXTEND_ACTION_PASTE = 5<br>} | Type of the extended edit action on the text box.|
72| [InputMethod_TextInputType](#inputmethod_textinputtype) {<br>IME_TEXT_INPUT_TYPE_NONE = -1,<br>IME_TEXT_INPUT_TYPE_TEXT = 0,<br>IME_TEXT_INPUT_TYPE_MULTILINE = 1,<br>IME_TEXT_INPUT_TYPE_NUMBER = 2,<br>IME_TEXT_INPUT_TYPE_PHONE = 3,<br>IME_TEXT_INPUT_TYPE_DATETIME = 4,<br>IME_TEXT_INPUT_TYPE_EMAIL_ADDRESS = 5,<br>IME_TEXT_INPUT_TYPE_URL = 6,<br>IME_TEXT_INPUT_TYPE_VISIBLE_PASSWORD = 7,<br>IME_TEXT_INPUT_TYPE_NUMBER_PASSWORD = 8,<br>IME_TEXT_INPUT_TYPE_SCREEN_LOCK_PASSWORD = 9,<br>IME_TEXT_INPUT_TYPE_USER_NAME = 10,<br>IME_TEXT_INPUT_TYPE_NEW_PASSWORD = 11,<br>IME_TEXT_INPUT_TYPE_NUMBER_DECIMAL = 12<br>} | Text input type.|
73| [InputMethod_CommandValueType](#inputmethod_commandvaluetype) {<br>IME_COMMAND_VALUE_TYPE_NONE = 0,<br>IME_COMMAND_VALUE_TYPE_STRING = 1,<br>IME_COMMAND_VALUE_TYPE_BOOL = 2,<br>IME_COMMAND_VALUE_TYPE_INT32 = 3<br>} | Private data type.|
74| [InputMethod_ErrorCode](#inputmethod_errorcode) {<br>IME_ERR_OK = 0, IME_ERR_UNDEFINED = 1,<br>IME_ERR_PARAMCHECK = 401,<br>IME_ERR_PACKAGEMANAGER = 12800001,<br>IME_ERR_IMENGINE = 12800002,<br>IME_ERR_IMCLIENT = 12800003,<br>IME_ERR_CONFIG_PERSIST = 12800005,<br>IME_ERR_CONTROLLER = 12800006,<br>IME_ERR_SETTINGS = 12800007,<br>IME_ERR_IMMS = 12800008,<br>IME_ERR_DETACHED = 12800009,<br>IME_ERR_NULL_POINTER = 12802000,<br>IME_ERR_QUERY_FAILED = 12802001<br>} | Error code of the input method.|
75
76
77### Functions
78
79| Name| Description|
80| -------- | -------- |
81| [InputMethod_AttachOptions](#inputmethod_attachoptions) \* [OH_AttachOptions_Create](#oh_attachoptions_create) (bool showKeyboard) | Creates an [InputMethod_AttachOptions](#inputmethod_attachoptions) instance.|
82| void [OH_AttachOptions_Destroy](#oh_attachoptions_destroy) ([InputMethod_AttachOptions](#inputmethod_attachoptions) \*options) | Destroys an [InputMethod_AttachOptions](#inputmethod_attachoptions) instance.|
83| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_AttachOptions_IsShowKeyboard](#oh_attachoptions_isshowkeyboard) ([InputMethod_AttachOptions](#inputmethod_attachoptions) \*options, bool \*showKeyboard) | Obtains the configured value that indicates whether to display the keyboard from [InputMethod_AttachOptions](#inputmethod_attachoptions).|
84| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*textEditorProxy, [InputMethod_AttachOptions](#inputmethod_attachoptions) \*options, [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*\*inputMethodProxy) | Binds an application to the input method service.|
85| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodController_Detach](#oh_inputmethodcontroller_detach) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy) | Unbinds an application from the input method service.|
86| [InputMethod_CursorInfo](#inputmethod_cursorinfo) \* [OH_CursorInfo_Create](#oh_cursorinfo_create) (double left, double top, double width, double height) | Creates an [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.|
87| void [OH_CursorInfo_Destroy](#oh_cursorinfo_destroy) ([InputMethod_CursorInfo](#inputmethod_cursorinfo) \*cursorInfo) | Destroys an [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.|
88| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_CursorInfo_SetRect](#oh_cursorinfo_setrect) ([InputMethod_CursorInfo](#inputmethod_cursorinfo) \*cursorInfo, double left, double top, double width, double height) | Sets the cursor information.|
89| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_CursorInfo_GetRect](#oh_cursorinfo_getrect) ([InputMethod_CursorInfo](#inputmethod_cursorinfo) \*cursorInfo, double \*left, double \*top, double \*width, double \*height) | Obtains the cursor information.|
90| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_ShowKeyboard](#oh_inputmethodproxy_showkeyboard) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy) | Displays the keyboard.|
91| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_HideKeyboard](#oh_inputmethodproxy_hidekeyboard) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy) | Hides the keyboard.|
92| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_NotifySelectionChange](#oh_inputmethodproxy_notifyselectionchange) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy, char16_t text[], size_t length, int start, int end) | Notifies the change of the text selection area in the text box.|
93| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_NotifyConfigurationChange](#oh_inputmethodproxy_notifyconfigurationchange) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy, [InputMethod_EnterKeyType](#inputmethod_enterkeytype) enterKey, [InputMethod_TextInputType](#inputmethod_textinputtype) textType) | Notifies the change of the text box configuration.|
94| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_NotifyCursorUpdate](#oh_inputmethodproxy_notifycursorupdate) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy, [InputMethod_CursorInfo](#inputmethod_cursorinfo) \*cursorInfo) | Notifies the cursor position change.|
95| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_InputMethodProxy_SendPrivateCommand](#oh_inputmethodproxy_sendprivatecommand) ([InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) \*inputMethodProxy, [InputMethod_PrivateCommand](#inputmethod_privatecommand) \*privateCommand[], size_t size) | Sends a private data command.|
96| [InputMethod_PrivateCommand](#inputmethod_privatecommand) \* [OH_PrivateCommand_Create](#oh_privatecommand_create) (char key[], size_t keyLength) | Creates an [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance.|
97| void [OH_PrivateCommand_Destroy](#oh_privatecommand_destroy) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command) | Destroys an [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance.|
98| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_SetKey](#oh_privatecommand_setkey) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, char key[], size_t keyLength) | Sets the key value for [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
99| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_SetBoolValue](#oh_privatecommand_setboolvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, bool value) | Sets the value of the Boolean type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
100| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_SetIntValue](#oh_privatecommand_setintvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, int32_t value) | Sets the value of the integer type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
101| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_SetStrValue](#oh_privatecommand_setstrvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, char value[], size_t valueLength) | Sets the value of the character string type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
102| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_GetKey](#oh_privatecommand_getkey) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, const char \*\*key, size_t \*keyLength) | Obtains the key value from [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
103| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_GetValueType](#oh_privatecommand_getvaluetype) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, [InputMethod_CommandValueType](#inputmethod_commandvaluetype) \*type) | Obtains the data type of **value** from [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
104| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_GetBoolValue](#oh_privatecommand_getboolvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, bool \*value) | Obtains the value of the Boolean type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
105| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_GetIntValue](#oh_privatecommand_getintvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, int32_t \*value) | Obtains the value of the integer type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
106| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_PrivateCommand_GetStrValue](#oh_privatecommand_getstrvalue) ([InputMethod_PrivateCommand](#inputmethod_privatecommand) \*command, const char \*\*value, size_t \*valueLength) | Obtains the value of the character string type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).|
107| [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \* [OH_TextAvoidInfo_Create](#oh_textavoidinfo_create) (double positionY, double height) | Creates an [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance.|
108| void [OH_TextAvoidInfo_Destroy](#oh_textavoidinfo_destroy) ([InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*info) | Destroys an [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance.|
109| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextAvoidInfo_SetPositionY](#oh_textavoidinfo_setpositiony) ([InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*info, double positionY) | Sets the Y coordinate in [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).|
110| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextAvoidInfo_SetHeight](#oh_textavoidinfo_setheight) ([InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*info, double height) | Sets the height in [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).|
111| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextAvoidInfo_GetPositionY](#oh_textavoidinfo_getpositiony) ([InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*info, double \*positionY) | Obtains the Y coordinate from [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).|
112| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextAvoidInfo_GetHeight](#oh_textavoidinfo_getheight) ([InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*info, double \*height) | Obtains the height from [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).|
113| [InputMethod_TextConfig](#inputmethod_textconfig) \* [OH_TextConfig_Create](#oh_textconfig_create) () | Creates an [InputMethod_TextConfig](#inputmethod_textconfig) instance.|
114| void [OH_TextConfig_Destroy](#oh_textconfig_destroy) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config) | Destroys an [InputMethod_TextConfig](#inputmethod_textconfig) instance.|
115| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_SetInputType](#oh_textconfig_setinputtype) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_TextInputType](#inputmethod_textinputtype) inputType) | Sets the text box type for [InputMethod_TextConfig](#inputmethod_textconfig).|
116| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_SetEnterKeyType](#oh_textconfig_setenterkeytype) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_EnterKeyType](#inputmethod_enterkeytype) enterKeyType) | Sets the Enter function type for [InputMethod_TextConfig](#inputmethod_textconfig).|
117| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_SetPreviewTextSupport](#oh_textconfig_setpreviewtextsupport) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, bool supported) | Sets the text preview feature for [InputMethod_TextConfig](#inputmethod_textconfig).|
118| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_SetSelection](#oh_textconfig_setselection) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, int32_t start, int32_t end) | Sets the selected text area for [InputMethod_TextConfig](#inputmethod_textconfig).|
119| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_SetWindowId](#oh_textconfig_setwindowid) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, int32_t windowId) | Sets the ID of the window to which [InputMethod_TextConfig](#inputmethod_textconfig) belongs.|
120| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetInputType](#oh_textconfig_getinputtype) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_TextInputType](#inputmethod_textinputtype) \*inputType) | Obtains the text box type of [InputMethod_TextConfig](#inputmethod_textconfig).|
121| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetEnterKeyType](#oh_textconfig_getenterkeytype) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_EnterKeyType](#inputmethod_enterkeytype) \*enterKeyType) | Obtains the Enter function type of [InputMethod_TextConfig](#inputmethod_textconfig).|
122| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_IsPreviewTextSupported](#oh_textconfig_ispreviewtextsupported) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, bool \*supported) | Obtains the text preview settings of [InputMethod_TextConfig](#inputmethod_textconfig).|
123| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetCursorInfo](#oh_textconfig_getcursorinfo) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_CursorInfo](#inputmethod_cursorinfo) \*\*cursorInfo) | Obtains the cursor information of [InputMethod_TextConfig](#inputmethod_textconfig).|
124| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetTextAvoidInfo](#oh_textconfig_gettextavoidinfo) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) \*\*avoidInfo) | Obtains the avoidance information of [InputMethod_TextConfig](#inputmethod_textconfig).|
125| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetSelection](#oh_textconfig_getselection) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, int32_t \*start, int32_t \*end) | Obtains the selected text area of [InputMethod_TextConfig](#inputmethod_textconfig).|
126| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextConfig_GetWindowId](#oh_textconfig_getwindowid) ([InputMethod_TextConfig](#inputmethod_textconfig) \*config, int32_t \*windowId) | Obtains the ID of the window to which [InputMethod_TextConfig](#inputmethod_textconfig) belongs.|
127| [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \* [OH_TextEditorProxy_Create](#oh_texteditorproxy_create) () | Creates an [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance.|
128| void [OH_TextEditorProxy_Destroy](#oh_texteditorproxy_destroy) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy) | Destroys an [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance.|
129| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetGetTextConfigFunc](#oh_texteditorproxy_setgettextconfigfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) getTextConfigFunc) | Sets the [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
130| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetInsertTextFunc](#oh_texteditorproxy_setinserttextfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) insertTextFunc) | Sets the [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
131| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetDeleteForwardFunc](#oh_texteditorproxy_setdeleteforwardfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) deleteForwardFunc) | Sets the [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
132| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetDeleteBackwardFunc](#oh_texteditorproxy_setdeletebackwardfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) deleteBackwardFunc) | Sets the [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
133| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetSendKeyboardStatusFunc](#oh_texteditorproxy_setsendkeyboardstatusfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) sendKeyboardStatusFunc) | Sets the [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
134| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetSendEnterKeyFunc](#oh_texteditorproxy_setsendenterkeyfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) sendEnterKeyFunc) | Sets the [OH_TextEditorProxy_SetSendEnterKeyFunc](#oh_texteditorproxy_setsendenterkeyfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
135| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetMoveCursorFunc](#oh_texteditorproxy_setmovecursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) moveCursorFunc) | Sets the [OH_TextEditorProxy_SetMoveCursorFunc](#oh_texteditorproxy_setmovecursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
136| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetHandleSetSelectionFunc](#oh_texteditorproxy_sethandlesetselectionfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) handleSetSelectionFunc) | Sets the [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
137| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetHandleExtendActionFunc](#oh_texteditorproxy_sethandleextendactionfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) handleExtendActionFunc) | Sets the [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
138| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetGetLeftTextOfCursorFunc](#oh_texteditorproxy_setgetlefttextofcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) getLeftTextOfCursorFunc) | Sets the [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
139| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetGetRightTextOfCursorFunc](#oh_texteditorproxy_setgetrighttextofcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) getRightTextOfCursorFunc) | Sets the [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
140| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetGetTextIndexAtCursorFunc](#oh_texteditorproxy_setgettextindexatcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) getTextIndexAtCursorFunc) | Sets the [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
141| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetReceivePrivateCommandFunc](#oh_texteditorproxy_setreceiveprivatecommandfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) receivePrivateCommandFunc) | Sets the [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
142| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetSetPreviewTextFunc](#oh_texteditorproxy_setsetpreviewtextfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) setPreviewTextFunc) | Sets the [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
143| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_SetFinishTextPreviewFunc](#oh_texteditorproxy_setfinishtextpreviewfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) finishTextPreviewFunc) | Sets the [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
144| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetGetTextConfigFunc](#oh_texteditorproxy_getgettextconfigfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) \*getTextConfigFunc) | Obtains the [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
145| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetInsertTextFunc](#oh_texteditorproxy_getinserttextfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) \*insertTextFunc) | Obtains the [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
146| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetDeleteForwardFunc](#oh_texteditorproxy_getdeleteforwardfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) \*deleteForwardFunc) | Obtains the [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
147| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetDeleteBackwardFunc](#oh_texteditorproxy_getdeletebackwardfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) \*deleteBackwardFunc) | Obtains the [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
148| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetSendKeyboardStatusFunc](#oh_texteditorproxy_getsendkeyboardstatusfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) \*sendKeyboardStatusFunc) | Obtains the [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
149| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetSendEnterKeyFunc](#oh_texteditorproxy_getsendenterkeyfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) \*sendEnterKeyFunc) | Obtains the [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
150| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetMoveCursorFunc](#oh_texteditorproxy_getmovecursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) \*moveCursorFunc) | Obtains the [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
151| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetHandleSetSelectionFunc](#oh_texteditorproxy_gethandlesetselectionfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) \*handleSetSelectionFunc) | Obtains the [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
152| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetHandleExtendActionFunc](#oh_texteditorproxy_gethandleextendactionfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) \*handleExtendActionFunc) | Obtains the [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
153| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetGetLeftTextOfCursorFunc](#oh_texteditorproxy_getgetlefttextofcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) \*getLeftTextOfCursorFunc) | Obtains the [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
154| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetGetRightTextOfCursorFunc](#oh_texteditorproxy_getgetrighttextofcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) \*getRightTextOfCursorFunc) | Obtains the [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
155| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetGetTextIndexAtCursorFunc](#oh_texteditorproxy_getgettextindexatcursorfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) \*getTextIndexAtCursorFunc) | Obtains the [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
156| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetReceivePrivateCommandFunc](#oh_texteditorproxy_getreceiveprivatecommandfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) \*receivePrivateCommandFunc) | Obtains the [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
157| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetSetPreviewTextFunc](#oh_texteditorproxy_getsetpreviewtextfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) \*setPreviewTextFunc) | Obtains the [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
158| [InputMethod_ErrorCode](#inputmethod_errorcode) [OH_TextEditorProxy_GetFinishTextPreviewFunc](#oh_texteditorproxy_getfinishtextpreviewfunc) ([InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) \*proxy, [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) \*finishTextPreviewFunc) | Obtains the [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).|
159
160
161## Type Description
162
163
164### InputMethod_AttachOptions
165
166```
167typedef struct InputMethod_AttachOptions InputMethod_AttachOptions
168```
169
170**Description**
171
172Options carried when the input method is bound.
173
174**Since**: 12
175
176
177### InputMethod_CommandValueType
178
179```
180typedef enum InputMethod_CommandValueType InputMethod_CommandValueType
181```
182
183**Description**
184
185Private data type.
186
187**Since**: 12
188
189
190### InputMethod_CursorInfo
191
192```
193typedef struct InputMethod_CursorInfo InputMethod_CursorInfo
194```
195
196**Description**
197
198Coordinates, width, and height of the cursor.
199
200**Since**: 12
201
202
203### InputMethod_Direction
204
205```
206typedef enum InputMethod_Direction InputMethod_Direction
207```
208
209**Description**
210
211Moving direction.
212
213**Since**: 12
214
215
216### InputMethod_EnterKeyType
217
218```
219typedef enum InputMethod_EnterKeyType InputMethod_EnterKeyType
220```
221
222**Description**
223
224Enter function type.
225
226**Since**: 12
227
228
229### InputMethod_ErrorCode
230
231```
232typedef enum InputMethod_ErrorCode InputMethod_ErrorCode
233```
234
235**Description**
236
237Error code of the input method.
238
239**Since**: 12
240
241
242### InputMethod_ExtendAction
243
244```
245typedef enum InputMethod_ExtendAction InputMethod_ExtendAction
246```
247
248**Description**
249
250Type of the extended edit action on the text box.
251
252**Since**: 12
253
254
255### InputMethod_InputMethodProxy
256
257```
258typedef struct InputMethod_InputMethodProxy InputMethod_InputMethodProxy
259```
260
261**Description**
262
263Input method proxy object.
264
265This object can be used to call the method for using the input method.
266
267**Since**: 12
268
269
270### InputMethod_KeyboardStatus
271
272```
273typedef enum InputMethod_KeyboardStatus InputMethod_KeyboardStatus
274```
275
276**Description**
277
278Keyboard status.
279
280**Since**: 12
281
282
283### InputMethod_PrivateCommand
284
285```
286typedef struct InputMethod_PrivateCommand InputMethod_PrivateCommand
287```
288
289**Description**
290
291Private data.
292
293It refers to the private data exchanged between the text box and the input method application.
294
295**Since**: 12
296
297
298### InputMethod_TextAvoidInfo
299
300```
301typedef struct InputMethod_TextAvoidInfo InputMethod_TextAvoidInfo
302```
303
304**Description**
305
306Information of the text box used to avoid the keyboard.
307
308**Since**: 12
309
310
311### InputMethod_TextConfig
312
313```
314typedef struct InputMethod_TextConfig InputMethod_TextConfig
315```
316
317**Description**
318
319Text box configuration.
320
321**Since**: 12
322
323
324### InputMethod_TextEditorProxy
325
326```
327typedef struct InputMethod_TextEditorProxy InputMethod_TextEditorProxy
328```
329
330**Description**
331
332Text box proxy.
333
334It provides methods for obtaining notifications and requests from the input method application.
335
336**Since**: 12
337
338
339### InputMethod_TextInputType
340
341```
342typedef enum InputMethod_TextInputType InputMethod_TextInputType
343```
344
345**Description**
346
347Text input type.
348
349**Since**: 12
350
351
352### OH_TextEditorProxy_DeleteBackwardFunc
353
354```
355typedef void(* OH_TextEditorProxy_DeleteBackwardFunc) (InputMethod_TextEditorProxy *textEditorProxy, int32_t length)
356```
357
358**Description**
359
360Function called when the input method deletes the text on the left of the cursor.
361
362Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
363
364**Since**: 12
365
366**Parameters:**
367
368| Name| Description|
369| -------- | -------- |
370| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
371| length | Length of the characters to be deleted.|
372
373
374### OH_TextEditorProxy_DeleteForwardFunc
375
376```
377typedef void(* OH_TextEditorProxy_DeleteForwardFunc) (InputMethod_TextEditorProxy *textEditorProxy, int32_t length)
378```
379
380**Description**
381
382Function called when the input method deletes the text on the right of the cursor.
383
384Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
385
386**Since**: 12
387
388**Parameters:**
389
390| Name| Description|
391| -------- | -------- |
392| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
393| length | Length of the characters to be deleted.|
394
395
396### OH_TextEditorProxy_FinishTextPreviewFunc
397
398```
399typedef void(* OH_TextEditorProxy_FinishTextPreviewFunc) (InputMethod_TextEditorProxy *textEditorProxy)
400```
401
402**Description**
403
404Function called when the input method ends the text preview feature.
405
406Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
407
408**Since**: 12
409
410**Parameter:**
411
412| Name| Description|
413| -------- | -------- |
414| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
415
416
417### OH_TextEditorProxy_GetLeftTextOfCursorFunc
418
419```
420typedef void(* OH_TextEditorProxy_GetLeftTextOfCursorFunc) (InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length)
421```
422
423**Description**
424
425Function called when the input method obtains the text on the left of the cursor.
426
427Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
428
429**Since**: 12
430
431**Parameters:**
432
433| Name| Description|
434| -------- | -------- |
435| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
436| number | Length of the text to be obtained.|
437| text | Text content of a specified length on the left of the cursor. You need to assign a value to the text content in the function implementation.|
438
439
440### OH_TextEditorProxy_GetRightTextOfCursorFunc
441
442```
443typedef void(* OH_TextEditorProxy_GetRightTextOfCursorFunc) (InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length)
444```
445
446**Description**
447
448Function called when the input method obtains the text on the right of the cursor.
449
450Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
451
452**Since**: 12
453
454**Parameters:**
455
456| Name| Description|
457| -------- | -------- |
458| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
459| number | Length of the text to be obtained.|
460| text | Text content of a specified length on the right of the cursor. You need to assign a value to the text content in the function implementation.|
461
462
463### OH_TextEditorProxy_GetTextConfigFunc
464
465```
466typedef void(* OH_TextEditorProxy_GetTextConfigFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_TextConfig *config)
467```
468
469**Description**
470
471Function called when the input method obtains the text box configuration.
472
473Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
474
475**Since**: 12
476
477**Parameters:**
478
479| Name| Description|
480| -------- | -------- |
481| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
482| config | Text box configuration.|
483
484
485### OH_TextEditorProxy_GetTextIndexAtCursorFunc
486
487```
488typedef int32_t(* OH_TextEditorProxy_GetTextIndexAtCursorFunc) (InputMethod_TextEditorProxy *textEditorProxy)
489```
490
491**Description**
492
493Function called when the input method obtains the index of the text where the cursor is located in the text box.
494
495Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
496
497**Since**: 12
498
499**Parameter:**
500
501| Name| Description|
502| -------- | -------- |
503| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
504
505**Returns:**
506
507Index of the text where the cursor is located.
508
509
510### OH_TextEditorProxy_HandleExtendActionFunc
511
512```
513typedef void(* OH_TextEditorProxy_HandleExtendActionFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_ExtendAction action)
514```
515
516**Description**
517
518Function called when the input method sends an extended editing operation.
519
520Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
521
522**Since**: 12
523
524**Parameters:**
525
526| Name| Description|
527| -------- | -------- |
528| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
529| action | Extended editing operation. For details, see [InputMethod_ExtendAction](#inputmethod_extendaction).|
530
531
532### OH_TextEditorProxy_HandleSetSelectionFunc
533
534```
535typedef void(* OH_TextEditorProxy_HandleSetSelectionFunc) (InputMethod_TextEditorProxy *textEditorProxy, int32_t start, int32_t end)
536```
537
538**Description**
539
540Function called when the input method requests to select text.
541
542Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
543
544**Since**: 12
545
546**Parameters:**
547
548| Name| Description|
549| -------- | -------- |
550| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
551| start | Start position of the selected text.|
552| end | End position of the selected text.|
553
554
555### OH_TextEditorProxy_InsertTextFunc
556
557```
558typedef void(* OH_TextEditorProxy_InsertTextFunc) (InputMethod_TextEditorProxy *textEditorProxy, const char16_t *text, size_t length)
559```
560
561**Description**
562
563Function called when the input method application inserts text.
564
565Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
566
567**Since**: 12
568
569**Parameters:**
570
571| Name| Description|
572| -------- | -------- |
573| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
574| text | Characters to be inserted.|
575| length | Length of the characters to be inserted.|
576
577
578### OH_TextEditorProxy_MoveCursorFunc
579
580```
581typedef void(* OH_TextEditorProxy_MoveCursorFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_Direction direction)
582```
583
584**Description**
585
586Function called when the cursor is moved in the input method.
587
588Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
589
590**Since**: 12
591
592**Parameters:**
593
594| Name| Description|
595| -------- | -------- |
596| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
597| direction | Cursor moving direction. For details, see [InputMethod_Direction](#inputmethod_direction).|
598
599
600### OH_TextEditorProxy_ReceivePrivateCommandFunc
601
602```
603typedef int32_t(* OH_TextEditorProxy_ReceivePrivateCommandFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_PrivateCommand *privateCommand[], size_t size)
604```
605
606**Description**
607
608Function called when the input method application sends a private data command.
609
610Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
611
612**Since**: 12
613
614**Parameters:**
615
616| Name| Description|
617| -------- | -------- |
618| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
619| privateCommand | Private data command.|
620| size | Size of the private data.|
621
622**Returns:**
623
624Processing result of the private data command.
625
626
627### OH_TextEditorProxy_SendEnterKeyFunc
628
629```
630typedef void(* OH_TextEditorProxy_SendEnterKeyFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_EnterKeyType enterKeyType)
631```
632
633**Description**
634
635Function called when the Enter key is pressed in the input method.
636
637Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
638
639**Since**: 12
640
641**Parameters:**
642
643| Name| Description|
644| -------- | -------- |
645| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
646| enterKeyType | Enter key type. For details, see [InputMethod_EnterKeyType](#inputmethod_enterkeytype).|
647
648
649### OH_TextEditorProxy_SendKeyboardStatusFunc
650
651```
652typedef void(* OH_TextEditorProxy_SendKeyboardStatusFunc) (InputMethod_TextEditorProxy *textEditorProxy, InputMethod_KeyboardStatus keyboardStatus)
653```
654
655**Description**
656
657Function called when the input method notifies the keyboard status.
658
659Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
660
661**Since**: 12
662
663**Parameters:**
664
665| Name| Description|
666| -------- | -------- |
667| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
668| keyboardStatus | Keyboard status. For details, see [InputMethod_KeyboardStatus](#inputmethod_keyboardstatus).|
669
670
671### OH_TextEditorProxy_SetPreviewTextFunc
672
673```
674typedef int32_t(* OH_TextEditorProxy_SetPreviewTextFunc) (InputMethod_TextEditorProxy *textEditorProxy, const char16_t text[], size_t length, int32_t start, int32_t end)
675```
676
677**Description**
678
679Function called when the input method sets the text preview feature.
680
681Implement this function, set it to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy), and register it using [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach).
682
683**Since**: 12
684
685**Parameters:**
686
687| Name| Description|
688| -------- | -------- |
689| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
690| text | Text requested to be previewed.|
691| length | Length of the text to be previewed.|
692| start | Starting cursor position of the text to be previewed.|
693| end | Ending cursor position of the text to be previewed.|
694
695**Returns:**
696
697Result of setting text preview.
698
699
700## Enum Description
701
702
703### InputMethod_CommandValueType
704
705```
706enum InputMethod_CommandValueType
707```
708
709**Description**
710
711Private data type.
712
713**Since**: 12
714
715| Value| Description|
716| -------- | -------- |
717| IME_COMMAND_VALUE_TYPE_NONE | NONE.|
718| IME_COMMAND_VALUE_TYPE_STRING | String.|
719| IME_COMMAND_VALUE_TYPE_BOOL | Boolean.|
720| IME_COMMAND_VALUE_TYPE_INT32 | 32-bit signed integer.|
721
722
723### InputMethod_Direction
724
725```
726enum InputMethod_Direction
727```
728
729**Description**
730
731Moving direction.
732
733**Since**: 12
734
735| Value| Description|
736| -------- | -------- |
737| IME_DIRECTION_NONE | NONE.|
738| IME_DIRECTION_UP | Upward.|
739| IME_DIRECTION_DOWN | Downward.|
740| IME_DIRECTION_LEFT | To the left.|
741| IME_DIRECTION_RIGHT | To the right.|
742
743
744### InputMethod_EnterKeyType
745
746```
747enum InputMethod_EnterKeyType
748```
749
750**Description**
751
752Enter function type.
753
754**Since**: 12
755
756| Value| Description|
757| -------- | -------- |
758| IME_ENTER_KEY_UNSPECIFIED | Not specified.|
759| IME_ENTER_KEY_NONE | NONE.|
760| IME_ENTER_KEY_GO | Go.|
761| IME_ENTER_KEY_SEARCH | Search.|
762| IME_ENTER_KEY_SEND | Send.|
763| IME_ENTER_KEY_NEXT | Next.|
764| IME_ENTER_KEY_DONE | Done.|
765| IME_ENTER_KEY_PREVIOUS | Previous.|
766| IME_ENTER_KEY_NEWLINE | Line break.|
767
768
769### InputMethod_ErrorCode
770
771```
772enum InputMethod_ErrorCode
773```
774
775**Description**
776
777Error code of the input method.
778
779**Since**: 12
780
781| Value| Description|
782| -------- | -------- |
783| IME_ERR_OK | Successful.|
784| IME_ERR_UNDEFINED | Query failed.|
785| IME_ERR_PARAMCHECK | Parameter check failed.|
786| IME_ERR_PACKAGEMANAGER | Package management error.|
787| IME_ERR_IMENGINE | Input method application error.|
788| IME_ERR_IMCLIENT | Text box client error.|
789| IME_ERR_CONFIG_PERSIST | Configuration persistence failed. This error code is reported when the configuration fails to be saved.|
790| IME_ERR_CONTROLLER | Input method controller error.|
791| IME_ERR_SETTINGS | Input method setter error.|
792| IME_ERR_IMMS | Input method manager service error.|
793| IME_ERR_DETACHED | Text box unbound.|
794| IME_ERR_NULL_POINTER | Null pointer.|
795| IME_ERR_QUERY_FAILED | Query failed.|
796
797
798### InputMethod_ExtendAction
799
800```
801enum InputMethod_ExtendAction
802```
803
804**Description**
805
806Type of the extended edit action on the text box.
807
808**Since**: 12
809
810| Value| Description|
811| -------- | -------- |
812| IME_EXTEND_ACTION_SELECT_ALL | Select all.|
813| IME_EXTEND_ACTION_CUT | Cut.|
814| IME_EXTEND_ACTION_COPY | Copy.|
815| IME_EXTEND_ACTION_PASTE | Paste.|
816
817
818### InputMethod_KeyboardStatus
819
820```
821enum InputMethod_KeyboardStatus
822```
823
824**Description**
825
826Keyboard status.
827
828**Since**: 12
829
830| Value| Description|
831| -------- | -------- |
832| IME_KEYBOARD_STATUS_NONE | NONE.|
833| IME_KEYBOARD_STATUS_HIDE | Invisible.|
834| IME_KEYBOARD_STATUS_SHOW | Visible.|
835
836
837### InputMethod_TextInputType
838
839```
840enum InputMethod_TextInputType
841```
842
843**Description**
844
845Text input type.
846
847**Since**: 12
848
849| Value| Description|
850| -------- | -------- |
851| IME_TEXT_INPUT_TYPE_NONE | NONE.|
852| IME_TEXT_INPUT_TYPE_TEXT | Text.|
853| IME_TEXT_INPUT_TYPE_MULTILINE | Multi-line.|
854| IME_TEXT_INPUT_TYPE_NUMBER | Number.|
855| IME_TEXT_INPUT_TYPE_PHONE | Phone number.|
856| IME_TEXT_INPUT_TYPE_DATETIME | Date.|
857| IME_TEXT_INPUT_TYPE_EMAIL_ADDRESS | Email address.|
858| IME_TEXT_INPUT_TYPE_URL | URL.|
859| IME_TEXT_INPUT_TYPE_VISIBLE_PASSWORD | Password.|
860| IME_TEXT_INPUT_TYPE_NUMBER_PASSWORD | Numeric password.|
861| IME_TEXT_INPUT_TYPE_SCREEN_LOCK_PASSWORD | Lock screen password.|
862| IME_TEXT_INPUT_TYPE_USER_NAME | Username.|
863| IME_TEXT_INPUT_TYPE_NEW_PASSWORD | New password.|
864| IME_TEXT_INPUT_TYPE_NUMBER_DECIMAL | NUMBER DECIMAL. |
865
866
867## Function Description
868
869
870### OH_AttachOptions_Create()
871
872```
873InputMethod_AttachOptions* OH_AttachOptions_Create (bool showKeyboard)
874```
875
876**Description**
877
878Creates an [InputMethod_AttachOptions](#inputmethod_attachoptions) instance.
879
880**Since**: 12
881
882**Parameters:**
883
884| Name| Description|
885| -------- | -------- |
886| showKeyboard | Indicates whether to display the keyboard.|
887
888**Returns:**
889
890If the operation is successful, a pointer to the created [InputMethod_AttachOptions](#inputmethod_attachoptions) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
891
892
893### OH_AttachOptions_Destroy()
894
895```
896void OH_AttachOptions_Destroy (InputMethod_AttachOptions * options)
897```
898
899**Description**
900
901Destroys an [InputMethod_AttachOptions](#inputmethod_attachoptions) instance.
902
903**Since**: 12
904
905**Parameters:**
906
907| Name| Description|
908| -------- | -------- |
909| options | [InputMethod_AttachOptions](#inputmethod_attachoptions) instance to be destroyed.|
910
911
912### OH_AttachOptions_IsShowKeyboard()
913
914```
915InputMethod_ErrorCode OH_AttachOptions_IsShowKeyboard (InputMethod_AttachOptions * options, bool * showKeyboard )
916```
917
918**Description**
919
920Obtains the configured value that indicates whether to display the keyboard from [InputMethod_AttachOptions](#inputmethod_attachoptions).
921
922**Since**: 12
923
924**Parameters:**
925
926| Name| Description|
927| -------- | -------- |
928| options | [InputMethod_AttachOptions](#inputmethod_attachoptions) instance whose value is read.|
929| showKeyboard | Whether to display the keyboard during binding. **true**: The keyboard is displayed after the binding is complete. **false**: The keyboard is hidden after the binding is complete.|
930
931**Returns:**
932
933An error code.
934
935**IME_ERR_OK** indicates the operation is successful.
936
937**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
938
939For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
940
941
942### OH_CursorInfo_Create()
943
944```
945InputMethod_CursorInfo* OH_CursorInfo_Create (double left, double top, double width, double height )
946```
947
948**Description**
949
950Creates an [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.
951
952**Since**: 12
953
954**Parameters:**
955
956| Name| Description|
957| -------- | -------- |
958| left | Absolute value of the distance between the cursor's leftmost point and the left edge of the physical screen.|
959| top | Absolute value of the distance between the cursor's top vertex and the top edge of the physical screen.|
960| width | Width.|
961| height | Height.|
962
963**Returns:**
964
965If the operation is successful, a pointer to the created [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
966
967
968### OH_CursorInfo_Destroy()
969
970```
971void OH_CursorInfo_Destroy (InputMethod_CursorInfo * cursorInfo)
972```
973
974**Description**
975
976Destroys an [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.
977
978**Since**: 12
979
980**Parameters:**
981
982| Name| Description|
983| -------- | -------- |
984| cursorInfo | Pointer to the [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance to be destroyed.|
985
986
987### OH_CursorInfo_GetRect()
988
989```
990InputMethod_ErrorCode OH_CursorInfo_GetRect (InputMethod_CursorInfo * cursorInfo, double * left, double * top, double * width, double * height )
991```
992
993**Description**
994
995Obtains the cursor information.
996
997**Since**: 12
998
999**Parameter:**
1000
1001| Name| Description|
1002| -------- | -------- |
1003| cursorInfo | Pointer to the [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.|
1004| left | Absolute value of the distance between the cursor's leftmost point and the left edge of the physical screen.|
1005| top | Absolute value of the distance between the cursor's top vertex and the top edge of the physical screen.|
1006| width | Width.|
1007| height | Height.|
1008
1009**Returns:**
1010
1011An error code.
1012
1013**IME_ERR_OK** indicates the operation is successful.
1014
1015**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1016
1017For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1018
1019
1020### OH_CursorInfo_SetRect()
1021
1022```
1023InputMethod_ErrorCode OH_CursorInfo_SetRect (InputMethod_CursorInfo * cursorInfo, double left, double top, double width, double height )
1024```
1025
1026**Description**
1027
1028Sets the cursor information.
1029
1030**Since**: 12
1031
1032**Parameters:**
1033
1034| Name| Description|
1035| -------- | -------- |
1036| cursorInfo | Pointer to the [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance.|
1037| left | Absolute value of the distance between the cursor's leftmost point and the left edge of the physical screen.|
1038| top | Absolute value of the distance between the cursor's top vertex and the top edge of the physical screen.|
1039| width | Width.|
1040| height | Height.|
1041
1042**Returns:**
1043
1044An error code.
1045
1046**IME_ERR_OK** indicates the operation is successful.
1047
1048**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1049
1050For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1051
1052
1053### OH_InputMethodController_Attach()
1054
1055```
1056InputMethod_ErrorCode OH_InputMethodController_Attach (InputMethod_TextEditorProxy * textEditorProxy, InputMethod_AttachOptions * options, InputMethod_InputMethodProxy ** inputMethodProxy )
1057```
1058
1059**Description**
1060
1061Binds an application to the input method service.
1062
1063**Since**: 12
1064
1065**Parameters:**
1066
1067| Name| Description|
1068| -------- | -------- |
1069| textEditorProxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance. The caller needs to manage the **textEditorProxy** lifespan. If the calling is successful, the caller cannot release **textEditorProxy** before the next binding or unbinding call.|
1070| options | Pointer to the [InputMethod_AttachOptions](#inputmethod_attachoptions) instance, which is the option for binding.|
1071| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. The lifespan is maintained until the next binding or unbinding call.|
1072
1073**Returns:**
1074
1075An error code.
1076
1077**IME_ERR_OK** indicates the operation is successful.
1078
1079**IME_ERR_PARAMCHECK** indicates the parameter error.
1080
1081**IME_ERR_IMCLIENT** indicates the input method client error.
1082
1083**IME_ERR_IMMS** indicates the input method service error.
1084
1085**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1086
1087For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1088
1089
1090### OH_InputMethodController_Detach()
1091
1092```
1093InputMethod_ErrorCode OH_InputMethodController_Detach (InputMethod_InputMethodProxy * inputMethodProxy)
1094```
1095
1096**Description**
1097
1098Unbinds an application from the input method service.
1099
1100**Since**: 12
1101
1102**Parameters:**
1103
1104| Name| Description|
1105| -------- | -------- |
1106| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1107
1108**Returns:**
1109
1110An error code.
1111
1112**IME_ERR_OK** indicates the operation is successful.
1113
1114**IME_ERR_IMCLIENT** indicates the input method client error.
1115
1116**IME_ERR_IMMS** indicates the input method service error.
1117
1118**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1119
1120For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1121
1122
1123### OH_InputMethodProxy_HideKeyboard()
1124
1125```
1126InputMethod_ErrorCode OH_InputMethodProxy_HideKeyboard (InputMethod_InputMethodProxy * inputMethodProxy)
1127```
1128
1129**Description**
1130
1131Hides the keyboard.
1132
1133**Since**: 12
1134
1135**Parameters:**
1136
1137| Name| Description|
1138| -------- | -------- |
1139| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1140
1141**Returns:**
1142
1143An error code.
1144
1145**IME_ERR_OK** indicates the operation is successful.
1146
1147**IME_ERR_IMCLIENT** indicates the input method client error.
1148
1149**IME_ERR_IMMS** indicates the input method service error.
1150
1151**IME_ERR_DETACHED** indicates that no input method is bound.
1152
1153**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1154
1155For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1156
1157
1158### OH_InputMethodProxy_NotifyConfigurationChange()
1159
1160```
1161InputMethod_ErrorCode OH_InputMethodProxy_NotifyConfigurationChange (InputMethod_InputMethodProxy * inputMethodProxy, InputMethod_EnterKeyType enterKey, InputMethod_TextInputType textType )
1162```
1163
1164**Description**
1165
1166Notifies the change of the text box configuration.
1167
1168**Since**: 12
1169
1170**Parameters:**
1171
1172| Name| Description|
1173| -------- | -------- |
1174| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1175| enterKey | Enter key type.|
1176| textType | Text box type.|
1177
1178**Returns:**
1179
1180An error code.
1181
1182**IME_ERR_OK** indicates the operation is successful.
1183
1184**IME_ERR_PARAMCHECK** indicates the parameter error.
1185
1186**IME_ERR_IMCLIENT** indicates the input method client error.
1187
1188**IME_ERR_IMMS** indicates the input method service error.
1189
1190**IME_ERR_DETACHED** indicates that no input method is bound.
1191
1192**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1193
1194For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1195
1196
1197### OH_InputMethodProxy_NotifyCursorUpdate()
1198
1199```
1200InputMethod_ErrorCode OH_InputMethodProxy_NotifyCursorUpdate (InputMethod_InputMethodProxy * inputMethodProxy, InputMethod_CursorInfo * cursorInfo )
1201```
1202
1203**Description**
1204
1205Notifies the cursor position change.
1206
1207**Since**: 12
1208
1209**Parameters:**
1210
1211| Name| Description|
1212| -------- | -------- |
1213| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1214| cursorInfo | Pointer to the [InputMethod_CursorInfo](#inputmethod_cursorinfo) instance, indicating the cursor information.|
1215
1216**Returns:**
1217
1218An error code.
1219
1220**IME_ERR_OK** indicates the operation is successful.
1221
1222**IME_ERR_PARAMCHECK** indicates the parameter error.
1223
1224**IME_ERR_IMCLIENT** indicates the input method client error.
1225
1226**IME_ERR_IMMS** indicates the input method service error.
1227
1228**IME_ERR_DETACHED** indicates that no input method is bound.
1229
1230**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1231
1232For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1233
1234
1235### OH_InputMethodProxy_NotifySelectionChange()
1236
1237```
1238InputMethod_ErrorCode OH_InputMethodProxy_NotifySelectionChange (InputMethod_InputMethodProxy * inputMethodProxy, char16_t text[], size_t length, int start, int end )
1239```
1240
1241**Description**
1242
1243Notifies the change of the text selection area in the text box.
1244
1245When the text content, the cursor position, or the selected text changes, this API is used to notify the input method application of the change.
1246
1247**Since**: 12
1248
1249**Parameters:**
1250
1251| Name| Description|
1252| -------- | -------- |
1253| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1254| text | All input text.|
1255| length | Length of the **text** parameter. Maximum length: 8 KB.|
1256| start | Start position of the selected text.|
1257| end | End position of the selected text.|
1258
1259**Returns:**
1260
1261An error code.
1262
1263**IME_ERR_OK** indicates the operation is successful.
1264
1265**IME_ERR_PARAMCHECK** indicates the parameter error.
1266
1267**IME_ERR_IMCLIENT** indicates the input method client error.
1268
1269**IME_ERR_IMMS** indicates the input method service error.
1270
1271**IME_ERR_DETACHED** indicates that no input method is bound.
1272
1273**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1274
1275For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1276
1277
1278### OH_InputMethodProxy_SendPrivateCommand()
1279
1280```
1281InputMethod_ErrorCode OH_InputMethodProxy_SendPrivateCommand (InputMethod_InputMethodProxy * inputMethodProxy, InputMethod_PrivateCommand * privateCommand[], size_t size )
1282```
1283
1284**Description**
1285
1286Sends a private data command.
1287
1288**Since**: 12
1289
1290**Parameters:**
1291
1292| Name| Description|
1293| -------- | -------- |
1294| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1295| privateCommand | Private command, which is defined in [InputMethod_PrivateCommand](#inputmethod_privatecommand). The maximum size is 32 KB.|
1296| size | Size of the private command. Maximum size: 5.|
1297
1298**Returns:**
1299
1300An error code.
1301
1302**IME_ERR_OK** indicates the operation is successful.
1303
1304**IME_ERR_PARAMCHECK** indicates the parameter error.
1305
1306**IME_ERR_IMCLIENT** indicates the input method client error.
1307
1308**IME_ERR_IMMS** indicates the input method service error.
1309
1310**IME_ERR_DETACHED** indicates that no input method is bound.
1311
1312**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1313
1314For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1315
1316
1317### OH_InputMethodProxy_ShowKeyboard()
1318
1319```
1320InputMethod_ErrorCode OH_InputMethodProxy_ShowKeyboard (InputMethod_InputMethodProxy * inputMethodProxy)
1321```
1322
1323**Description**
1324
1325Displays the keyboard.
1326
1327**Since**: 12
1328
1329**Parameter:**
1330
1331| Name| Description|
1332| -------- | -------- |
1333| inputMethodProxy | Pointer to the [InputMethod_InputMethodProxy](#inputmethod_inputmethodproxy) instance. Call [OH_InputMethodController_Attach](#oh_inputmethodcontroller_attach) to obtain **inputMethodProxy**.|
1334
1335**Returns:**
1336
1337An error code.
1338
1339**IME_ERR_OK** indicates the operation is successful.
1340
1341**IME_ERR_PARAMCHECK** indicates the parameter error.
1342
1343**IME_ERR_IMCLIENT** indicates the input method client error.
1344
1345**IME_ERR_IMMS** indicates the input method service error.
1346
1347**IME_ERR_DETACHED** indicates that no input method is bound.
1348
1349**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1350
1351For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1352
1353
1354### OH_PrivateCommand_Create()
1355
1356```
1357InputMethod_PrivateCommand* OH_PrivateCommand_Create (char key[], size_t keyLength )
1358```
1359
1360**Description**
1361
1362Creates an [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance.
1363
1364**Since**: 12
1365
1366**Parameters:**
1367
1368| Name| Description|
1369| -------- | -------- |
1370| key | Key value of the private data.|
1371| keyLength | Key length.|
1372
1373**Returns:**
1374
1375If the operation is successful, a pointer to the created [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
1376
1377
1378### OH_PrivateCommand_Destroy()
1379
1380```
1381void OH_PrivateCommand_Destroy (InputMethod_PrivateCommand * command)
1382```
1383
1384**Description**
1385
1386Destroys an [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance.
1387
1388**Since**: 12
1389
1390**Parameters:**
1391
1392| Name| Description|
1393| -------- | -------- |
1394| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance to be destroyed.|
1395
1396
1397### OH_PrivateCommand_GetBoolValue()
1398
1399```
1400InputMethod_ErrorCode OH_PrivateCommand_GetBoolValue (InputMethod_PrivateCommand * command, bool * value )
1401```
1402
1403**Description**
1404
1405Obtains the value of the Boolean type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1406
1407**Since**: 12
1408
1409**Parameters:**
1410
1411| Name| Description|
1412| -------- | -------- |
1413| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance whose value is to be obtained.|
1414| value | Boolean value.|
1415
1416**Returns:**
1417
1418An error code.
1419
1420**IME_ERR_OK** indicates the operation is successful.
1421
1422**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1423
1424For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1425
1426
1427### OH_PrivateCommand_GetIntValue()
1428
1429```
1430InputMethod_ErrorCode OH_PrivateCommand_GetIntValue (InputMethod_PrivateCommand * command, int32_t * value )
1431```
1432
1433**Description**
1434
1435Obtains the value of the integer type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1436
1437**Since**: 12
1438
1439**Parameters:**
1440
1441| Name| Description|
1442| -------- | -------- |
1443| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance whose value is to be obtained.|
1444| value | Value of the integer type.|
1445
1446**Returns:**
1447
1448An error code.
1449
1450**IME_ERR_OK** indicates the operation is successful.
1451
1452**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1453
1454For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1455
1456
1457### OH_PrivateCommand_GetKey()
1458
1459```
1460InputMethod_ErrorCode OH_PrivateCommand_GetKey (InputMethod_PrivateCommand * command, const char ** key, size_t * keyLength )
1461```
1462
1463**Description**
1464
1465Obtains the key value from [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1466
1467**Since**: 12
1468
1469**Parameters:**
1470
1471| Name| Description|
1472| -------- | -------- |
1473| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance whose key value is to be obtained.|
1474| key | The lifespan of **key** is consistent with that of **command**. Do not directly save the key address or write **key**. You are advised to copy **key** and then use the copy.|
1475| keyLength | Key length.|
1476
1477**Returns:**
1478
1479An error code.
1480
1481**IME_ERR_OK** indicates the operation is successful.
1482
1483**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1484
1485For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1486
1487
1488### OH_PrivateCommand_GetStrValue()
1489
1490```
1491InputMethod_ErrorCode OH_PrivateCommand_GetStrValue (InputMethod_PrivateCommand * command, const char ** value, size_t * valueLength )
1492```
1493
1494**Description**
1495
1496Obtains the value of the character string type from [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1497
1498**Since**: 12
1499
1500**Parameters:**
1501
1502| Name| Description|
1503| -------- | -------- |
1504| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance whose value is to be obtained.|
1505| value | Value of the character string type.|
1506| valueLength | The lifespan of **value** is consistent with that of **command**. Do not directly save the value address or directly write **value**. You are advised to copy **value** and then use the copy.|
1507
1508**Returns:**
1509
1510An error code.
1511
1512**IME_ERR_OK** indicates the operation is successful.
1513
1514**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1515
1516For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1517
1518
1519### OH_PrivateCommand_GetValueType()
1520
1521```
1522InputMethod_ErrorCode OH_PrivateCommand_GetValueType (InputMethod_PrivateCommand * command, InputMethod_CommandValueType * type )
1523```
1524
1525**Description**
1526
1527Obtains the data type of **value** from [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1528
1529**Since**: 12
1530
1531**Parameters:**
1532
1533| Name| Description|
1534| -------- | -------- |
1535| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance whose value is to be obtained.|
1536| type | Data type of **value**.|
1537
1538**Returns:**
1539
1540An error code.
1541
1542**IME_ERR_OK** indicates the operation is successful.
1543
1544**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1545
1546For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1547
1548
1549### OH_PrivateCommand_SetBoolValue()
1550
1551```
1552InputMethod_ErrorCode OH_PrivateCommand_SetBoolValue (InputMethod_PrivateCommand * command, bool value )
1553```
1554
1555**Description**
1556
1557Sets the value of the Boolean type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1558
1559**Since**: 12
1560
1561**Parameters:**
1562
1563| Name| Description|
1564| -------- | -------- |
1565| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance to be set.|
1566| value | Boolean value.|
1567
1568**Returns:**
1569
1570An error code.
1571
1572**IME_ERR_OK** indicates the operation is successful.
1573
1574**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1575
1576For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1577
1578
1579### OH_PrivateCommand_SetIntValue()
1580
1581```
1582InputMethod_ErrorCode OH_PrivateCommand_SetIntValue (InputMethod_PrivateCommand * command, int32_t value )
1583```
1584
1585**Description**
1586
1587Sets the value of the integer type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1588
1589**Since**: 12
1590
1591**Parameters:**
1592
1593| Name| Description|
1594| -------- | -------- |
1595| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance to be set.|
1596| value | Integer value.|
1597
1598**Returns:**
1599
1600An error code.
1601
1602**IME_ERR_OK** indicates the operation is successful.
1603
1604**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1605
1606For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1607
1608
1609### OH_PrivateCommand_SetKey()
1610
1611```
1612InputMethod_ErrorCode OH_PrivateCommand_SetKey (InputMethod_PrivateCommand * command, char key[], size_t keyLength )
1613```
1614
1615**Description**
1616
1617Sets the key value for [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1618
1619**Since**: 12
1620
1621**Parameters:**
1622
1623| Name| Description|
1624| -------- | -------- |
1625| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance to be set.|
1626| key | Key value.|
1627| keyLength | Key length.|
1628
1629**Returns:**
1630
1631An error code.
1632
1633**IME_ERR_OK** indicates the operation is successful.
1634
1635**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1636
1637For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1638
1639
1640### OH_PrivateCommand_SetStrValue()
1641
1642```
1643InputMethod_ErrorCode OH_PrivateCommand_SetStrValue (InputMethod_PrivateCommand * command, char value[], size_t valueLength )
1644```
1645
1646**Description**
1647
1648Sets the value of the character string type for [InputMethod_PrivateCommand](#inputmethod_privatecommand).
1649
1650**Since**: 12
1651
1652**Parameters:**
1653
1654| Name| Description|
1655| -------- | -------- |
1656| command | Pointer to the [InputMethod_PrivateCommand](#inputmethod_privatecommand) instance to be set.|
1657| value | Value of the character string type.|
1658
1659**Returns:**
1660
1661An error code.
1662
1663**IME_ERR_OK** indicates the operation is successful.
1664
1665**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1666
1667For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1668
1669
1670### OH_TextAvoidInfo_Create()
1671
1672```
1673InputMethod_TextAvoidInfo* OH_TextAvoidInfo_Create (double positionY, double height )
1674```
1675
1676**Description**
1677
1678Creates an [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance.
1679
1680**Since**: 12
1681
1682**Parameters:**
1683
1684| Name| Description|
1685| -------- | -------- |
1686| positionY | Y coordinate of the text box.|
1687| height | Height of the text box.|
1688
1689**Returns:**
1690
1691If the operation is successful, a pointer to the created [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
1692
1693
1694### OH_TextAvoidInfo_Destroy()
1695
1696```
1697void OH_TextAvoidInfo_Destroy (InputMethod_TextAvoidInfo * info)
1698```
1699
1700**Description**
1701
1702Destroys an [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance.
1703
1704**Since**: 12
1705
1706**Parameters:**
1707
1708| Name| Description|
1709| -------- | -------- |
1710| options | Pointer to the [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance to be destroyed.|
1711
1712
1713### OH_TextAvoidInfo_GetHeight()
1714
1715```
1716InputMethod_ErrorCode OH_TextAvoidInfo_GetHeight (InputMethod_TextAvoidInfo * info, double * height )
1717```
1718
1719**Description**
1720
1721Obtains the height from [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).
1722
1723**Since**: 12
1724
1725**Parameters:**
1726
1727| Name| Description|
1728| -------- | -------- |
1729| info | Pointer to the [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance whose value is to be obtained.|
1730| height | Height of the text box.|
1731
1732**Returns:**
1733
1734An error code.
1735
1736**IME_ERR_OK** indicates the operation is successful.
1737
1738**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1739
1740For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1741
1742
1743### OH_TextAvoidInfo_GetPositionY()
1744
1745```
1746InputMethod_ErrorCode OH_TextAvoidInfo_GetPositionY (InputMethod_TextAvoidInfo * info, double * positionY )
1747```
1748
1749**Description**
1750
1751Obtains the Y coordinate from [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).
1752
1753**Since**: 12
1754
1755**Parameters:**
1756
1757| Name| Description|
1758| -------- | -------- |
1759| info | Pointer to the [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance whose value is to be obtained.|
1760| positionY | Absolute value of the distance between the text box's top vertex and the top edge of the physical screen.|
1761
1762**Returns:**
1763
1764An error code.
1765
1766**IME_ERR_OK** indicates the operation is successful.
1767
1768**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1769
1770For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1771
1772
1773### OH_TextAvoidInfo_SetHeight()
1774
1775```
1776InputMethod_ErrorCode OH_TextAvoidInfo_SetHeight (InputMethod_TextAvoidInfo * info, double height )
1777```
1778
1779**Description**
1780
1781Sets the height in [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).
1782
1783**Since**: 12
1784
1785**Parameters:**
1786
1787| Name| Description|
1788| -------- | -------- |
1789| info | Pointer to the [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance to be set.|
1790| height | Height.|
1791
1792**Returns:**
1793
1794An error code.
1795
1796**IME_ERR_OK** indicates the operation is successful.
1797
1798**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1799
1800For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1801
1802
1803### OH_TextAvoidInfo_SetPositionY()
1804
1805```
1806InputMethod_ErrorCode OH_TextAvoidInfo_SetPositionY (InputMethod_TextAvoidInfo * info, double positionY )
1807```
1808
1809**Description**
1810
1811Sets the Y coordinate in [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo).
1812
1813**Since**: 12
1814
1815**Parameters:**
1816
1817| Name| Description|
1818| -------- | -------- |
1819| info | Pointer to the [InputMethod_TextAvoidInfo](#inputmethod_textavoidinfo) instance to be set.|
1820| positionY | Absolute value of the distance between the text box's top vertex and the top edge of the physical screen.|
1821
1822**Returns:**
1823
1824An error code.
1825
1826**IME_ERR_OK** indicates the operation is successful.
1827
1828**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1829
1830For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1831
1832
1833### OH_TextConfig_Create()
1834
1835```
1836InputMethod_TextConfig* OH_TextConfig_Create ()
1837```
1838
1839**Description**
1840
1841Creates an [InputMethod_TextConfig](#inputmethod_textconfig) instance.
1842
1843**Since**: 12
1844
1845**Returns:**
1846
1847If the operation is successful, a pointer to the created [InputMethod_TextConfig](#inputmethod_textconfig) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
1848
1849
1850### OH_TextConfig_Destroy()
1851
1852```
1853void OH_TextConfig_Destroy (InputMethod_TextConfig * config)
1854```
1855
1856**Description**
1857
1858Destroys an [InputMethod_TextConfig](#inputmethod_textconfig) instance.
1859
1860**Since**: 12
1861
1862**Parameters:**
1863
1864| Name| Description|
1865| -------- | -------- |
1866| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be destroyed.|
1867
1868
1869### OH_TextConfig_GetCursorInfo()
1870
1871```
1872InputMethod_ErrorCode OH_TextConfig_GetCursorInfo (InputMethod_TextConfig * config, InputMethod_CursorInfo ** cursorInfo )
1873```
1874
1875**Description**
1876
1877Obtains the cursor information of [InputMethod_TextConfig](#inputmethod_textconfig).
1878
1879**Since**: 12
1880
1881**Parameters:**
1882
1883| Name| Description|
1884| -------- | -------- |
1885| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
1886| cursorInfo | Cursor information.|
1887
1888**Returns:**
1889
1890An error code.
1891
1892**IME_ERR_OK** indicates the operation is successful.
1893
1894**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1895
1896For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1897
1898
1899### OH_TextConfig_GetEnterKeyType()
1900
1901```
1902InputMethod_ErrorCode OH_TextConfig_GetEnterKeyType (InputMethod_TextConfig * config, InputMethod_EnterKeyType * enterKeyType )
1903```
1904
1905**Description**
1906
1907Obtains the Enter function type of [InputMethod_TextConfig](#inputmethod_textconfig).
1908
1909**Since**: 12
1910
1911**Parameters:**
1912
1913| Name| Description|
1914| -------- | -------- |
1915| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
1916| enterKeyType | Enter function type of the text box.|
1917
1918**Returns:**
1919
1920An error code.
1921
1922**IME_ERR_OK** indicates the operation is successful.
1923
1924**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1925
1926For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1927
1928
1929### OH_TextConfig_GetInputType()
1930
1931```
1932InputMethod_ErrorCode OH_TextConfig_GetInputType (InputMethod_TextConfig * config, InputMethod_TextInputType * inputType )
1933```
1934
1935**Description**
1936
1937Obtains the text box type of [InputMethod_TextConfig](#inputmethod_textconfig).
1938
1939**Since**: 12
1940
1941**Parameters:**
1942
1943| Name| Description|
1944| -------- | -------- |
1945| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
1946| inputType | Input type of the text box.|
1947
1948**Returns:**
1949
1950An error code.
1951
1952**IME_ERR_OK** indicates the operation is successful.
1953
1954**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1955
1956For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1957
1958
1959### OH_TextConfig_GetSelection()
1960
1961```
1962InputMethod_ErrorCode OH_TextConfig_GetSelection (InputMethod_TextConfig * config, int32_t * start, int32_t * end )
1963```
1964
1965**Description**
1966
1967Obtains the selected text area of [InputMethod_TextConfig](#inputmethod_textconfig).
1968
1969**Since**: 12
1970
1971**Parameters:**
1972
1973| Name| Description|
1974| -------- | -------- |
1975| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
1976| start | Start position of the selected text.|
1977| end | End position of the selected text.|
1978
1979**Returns:**
1980
1981An error code.
1982
1983**IME_ERR_OK** indicates the operation is successful.
1984
1985**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
1986
1987For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
1988
1989### OH_TextConfig_GetTextAvoidInfo()
1990
1991```
1992InputMethod_ErrorCode OH_TextConfig_GetTextAvoidInfo (InputMethod_TextConfig * config, InputMethod_TextAvoidInfo ** avoidInfo )
1993```
1994
1995**Description**
1996
1997Obtains the avoidance information of [InputMethod_TextConfig](#inputmethod_textconfig).
1998
1999**Since**: 12
2000
2001**Parameters:**
2002
2003| Name| Description|
2004| -------- | -------- |
2005| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
2006| avoidInfo | Text box avoidance information.|
2007
2008**Returns:**
2009
2010An error code.
2011
2012**IME_ERR_OK** indicates the operation is successful.
2013
2014**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2015
2016For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2017
2018
2019### OH_TextConfig_GetWindowId()
2020
2021```
2022InputMethod_ErrorCode OH_TextConfig_GetWindowId (InputMethod_TextConfig * config, int32_t * windowId )
2023```
2024
2025**Description**
2026
2027Obtains the ID of the window to which [InputMethod_TextConfig](#inputmethod_textconfig) belongs.
2028
2029**Since**: 12
2030
2031**Parameters:**
2032
2033| Name| Description|
2034| -------- | -------- |
2035| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
2036| windowId | Window ID of the application bound to the input method.|
2037
2038**Returns:**
2039
2040An error code.
2041
2042**IME_ERR_OK** indicates the operation is successful.
2043
2044**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2045
2046For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2047
2048
2049### OH_TextConfig_IsPreviewTextSupported()
2050
2051```
2052InputMethod_ErrorCode OH_TextConfig_IsPreviewTextSupported (InputMethod_TextConfig * config, bool * supported )
2053```
2054
2055**Description**
2056
2057Obtains the text preview settings of [InputMethod_TextConfig](#inputmethod_textconfig).
2058
2059**Since**: 12
2060
2061**Parameters:**
2062
2063| Name| Description|
2064| -------- | -------- |
2065| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance whose value is to be obtained.|
2066| supported | Whether text preview is supported.|
2067
2068**Returns:**
2069
2070An error code.
2071
2072**IME_ERR_OK** indicates the operation is successful.
2073
2074**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2075
2076For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2077
2078
2079### OH_TextConfig_SetEnterKeyType()
2080
2081```
2082InputMethod_ErrorCode OH_TextConfig_SetEnterKeyType (InputMethod_TextConfig * config, InputMethod_EnterKeyType enterKeyType )
2083```
2084
2085**Description**
2086
2087Sets the Enter function type for [InputMethod_TextConfig](#inputmethod_textconfig).
2088
2089**Since**: 12
2090
2091**Parameters:**
2092
2093| Name| Description|
2094| -------- | -------- |
2095| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be set.|
2096| enterKeyType | Enter function type.|
2097
2098**Returns:**
2099
2100An error code.
2101
2102**IME_ERR_OK** indicates the operation is successful.
2103
2104**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2105
2106For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2107
2108
2109### OH_TextConfig_SetInputType()
2110
2111```
2112InputMethod_ErrorCode OH_TextConfig_SetInputType (InputMethod_TextConfig * config, InputMethod_TextInputType inputType )
2113```
2114
2115**Description**
2116
2117Sets the text box type for [InputMethod_TextConfig](#inputmethod_textconfig).
2118
2119**Since**: 12
2120
2121**Parameters:**
2122
2123| Name| Description|
2124| -------- | -------- |
2125| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be set.|
2126| inputType | Input type of the text box.|
2127
2128**Returns:**
2129
2130An error code.
2131
2132**IME_ERR_OK** indicates the operation is successful.
2133
2134**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2135
2136For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2137
2138
2139### OH_TextConfig_SetPreviewTextSupport()
2140
2141```
2142InputMethod_ErrorCode OH_TextConfig_SetPreviewTextSupport (InputMethod_TextConfig * config, bool supported )
2143```
2144
2145**Description**
2146
2147Sets the text preview feature for [InputMethod_TextConfig](#inputmethod_textconfig).
2148
2149**Since**: 12
2150
2151**Parameters:**
2152
2153| Name| Description|
2154| -------- | -------- |
2155| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be set.|
2156| supported | Whether text preview is supported.|
2157
2158**Returns:**
2159
2160An error code.
2161
2162**IME_ERR_OK** indicates the operation is successful.
2163
2164**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2165
2166For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2167
2168
2169### OH_TextConfig_SetSelection()
2170
2171```
2172InputMethod_ErrorCode OH_TextConfig_SetSelection (InputMethod_TextConfig * config, int32_t start, int32_t end )
2173```
2174
2175**Description**
2176
2177Sets the selected text area for [InputMethod_TextConfig](#inputmethod_textconfig).
2178
2179**Since**: 12
2180
2181**Parameters:**
2182
2183| Name| Description|
2184| -------- | -------- |
2185| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be set.|
2186| start | Start position of the selected text.|
2187| end | End position of the selected text.|
2188
2189**Returns:**
2190
2191An error code.
2192
2193**IME_ERR_OK** indicates the operation is successful.
2194
2195**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2196
2197For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2198
2199
2200### OH_TextConfig_SetWindowId()
2201
2202```
2203InputMethod_ErrorCode OH_TextConfig_SetWindowId (InputMethod_TextConfig * config, int32_t windowId )
2204```
2205
2206**Description**
2207
2208Sets the ID of the window to which [InputMethod_TextConfig](#inputmethod_textconfig) belongs.
2209
2210**Since**: 12
2211
2212**Parameters:**
2213
2214| Name| Description|
2215| -------- | -------- |
2216| config | Pointer to the [InputMethod_TextConfig](#inputmethod_textconfig) instance to be set.|
2217| windowId | Window ID of the application bound to the input method.|
2218
2219**Returns:**
2220
2221An error code.
2222
2223**IME_ERR_OK** indicates the operation is successful.
2224
2225**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2226
2227For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2228
2229
2230### OH_TextEditorProxy_Create()
2231
2232```
2233InputMethod_TextEditorProxy* OH_TextEditorProxy_Create ()
2234```
2235
2236**Description**
2237
2238Creates an [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance.
2239
2240**Since**: 12
2241
2242**Returns:**
2243
2244If the operation is successful, a pointer to the created [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance is returned. If the operation failed, **NULL** is returned, which may be caused by insufficient application address space.
2245
2246
2247### OH_TextEditorProxy_Destroy()
2248
2249```
2250void OH_TextEditorProxy_Destroy (InputMethod_TextEditorProxy * proxy)
2251```
2252
2253**Description**
2254
2255Destroys an [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance.
2256
2257**Since**: 12
2258
2259**Parameters:**
2260
2261| Name| Description|
2262| -------- | -------- |
2263| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be destroyed.|
2264
2265
2266### OH_TextEditorProxy_GetDeleteBackwardFunc()
2267
2268```
2269InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteBackwardFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_DeleteBackwardFunc * deleteBackwardFunc )
2270```
2271
2272**Description**
2273
2274Obtains the [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2275
2276**Since**: 12
2277
2278**Parameters:**
2279
2280| Name| Description|
2281| -------- | -------- |
2282| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2283| deleteBackwardFunc | Function [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) obtained from the proxy.|
2284
2285**Returns:**
2286
2287An error code.
2288
2289**IME_ERR_OK** indicates the operation is successful.
2290
2291**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2292
2293For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2294
2295
2296### OH_TextEditorProxy_GetDeleteForwardFunc()
2297
2298```
2299InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteForwardFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_DeleteForwardFunc * deleteForwardFunc )
2300```
2301
2302**Description**
2303
2304Obtains the [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2305
2306**Since**: 12
2307
2308**Parameters:**
2309
2310| Name| Description|
2311| -------- | -------- |
2312| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2313| deleteForwardFunc | Function [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) obtained from the proxy.|
2314
2315**Returns:**
2316
2317An error code.
2318
2319**IME_ERR_OK** indicates the operation is successful.
2320
2321**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2322
2323For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2324
2325
2326### OH_TextEditorProxy_GetFinishTextPreviewFunc()
2327
2328```
2329InputMethod_ErrorCode OH_TextEditorProxy_GetFinishTextPreviewFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_FinishTextPreviewFunc * finishTextPreviewFunc )
2330```
2331
2332**Description**
2333
2334Obtains the [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2335
2336**Since**: 12
2337
2338**Parameters:**
2339
2340| Name| Description|
2341| -------- | -------- |
2342| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2343| finishTextPreviewFunc | Function [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) obtained from the proxy.|
2344
2345**Returns:**
2346
2347An error code.
2348
2349**IME_ERR_OK** indicates the operation is successful.
2350
2351**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2352
2353For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2354
2355
2356### OH_TextEditorProxy_GetGetLeftTextOfCursorFunc()
2357
2358```
2359InputMethod_ErrorCode OH_TextEditorProxy_GetGetLeftTextOfCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc * getLeftTextOfCursorFunc )
2360```
2361
2362**Description**
2363
2364Obtains the [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2365
2366**Since**: 12
2367
2368**Parameters:**
2369
2370| Name| Description|
2371| -------- | -------- |
2372| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2373| getLeftTextOfCursorFunc | Function [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) obtained from the proxy.|
2374
2375**Returns:**
2376
2377An error code.
2378
2379**IME_ERR_OK** indicates the operation is successful.
2380
2381**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2382
2383For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2384
2385
2386### OH_TextEditorProxy_GetGetRightTextOfCursorFunc()
2387
2388```
2389InputMethod_ErrorCode OH_TextEditorProxy_GetGetRightTextOfCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc * getRightTextOfCursorFunc )
2390```
2391
2392**Description**
2393
2394Obtains the [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2395
2396**Since**: 12
2397
2398**Parameters:**
2399
2400| Name| Description|
2401| -------- | -------- |
2402| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2403| getRightTextOfCursorFunc | Function [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) obtained from the proxy.|
2404
2405**Returns:**
2406
2407An error code.
2408
2409**IME_ERR_OK** indicates the operation is successful.
2410
2411**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2412
2413For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2414
2415
2416### OH_TextEditorProxy_GetGetTextConfigFunc()
2417
2418```
2419InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextConfigFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetTextConfigFunc * getTextConfigFunc )
2420```
2421
2422**Description**
2423
2424Obtains the [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2425
2426**Since**: 12
2427
2428**Parameters:**
2429
2430| Name| Description|
2431| -------- | -------- |
2432| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2433| getTextConfigFunc | Function [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) obtained from the proxy.|
2434
2435**Returns:**
2436
2437An error code.
2438
2439**IME_ERR_OK** indicates the operation is successful.
2440
2441**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2442
2443For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2444
2445
2446### OH_TextEditorProxy_GetGetTextIndexAtCursorFunc()
2447
2448```
2449InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextIndexAtCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc * getTextIndexAtCursorFunc )
2450```
2451
2452**Description**
2453
2454Obtains the [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2455
2456**Since**: 12
2457
2458**Parameters:**
2459
2460| Name| Description|
2461| -------- | -------- |
2462| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2463| getTextIndexAtCursorFunc | Function [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) obtained from the proxy.|
2464
2465**Returns:**
2466
2467An error code.
2468
2469**IME_ERR_OK** indicates the operation is successful.
2470
2471**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2472
2473For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2474
2475
2476### OH_TextEditorProxy_GetHandleExtendActionFunc()
2477
2478```
2479InputMethod_ErrorCode OH_TextEditorProxy_GetHandleExtendActionFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_HandleExtendActionFunc * handleExtendActionFunc )
2480```
2481
2482**Description**
2483
2484Obtains the [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2485
2486**Since**: 12
2487
2488**Parameters:**
2489
2490| Name| Description|
2491| -------- | -------- |
2492| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2493| handleExtendActionFunc | Function [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) obtained from the proxy.|
2494
2495**Returns:**
2496
2497An error code.
2498
2499**IME_ERR_OK** indicates the operation is successful.
2500
2501**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2502
2503For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2504
2505
2506### OH_TextEditorProxy_GetHandleSetSelectionFunc()
2507
2508```
2509InputMethod_ErrorCode OH_TextEditorProxy_GetHandleSetSelectionFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_HandleSetSelectionFunc * handleSetSelectionFunc )
2510```
2511
2512**Description**
2513
2514Obtains the [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2515
2516**Since**: 12
2517
2518**Parameters:**
2519
2520| Name| Description|
2521| -------- | -------- |
2522| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2523| handleSetSelectionFunc | Function [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) obtained from the proxy.|
2524
2525**Returns:**
2526
2527An error code.
2528
2529**IME_ERR_OK** indicates the operation is successful.
2530
2531**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2532
2533For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2534
2535
2536### OH_TextEditorProxy_GetInsertTextFunc()
2537
2538```
2539InputMethod_ErrorCode OH_TextEditorProxy_GetInsertTextFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_InsertTextFunc * insertTextFunc )
2540```
2541
2542**Description**
2543
2544Obtains the [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2545
2546**Since**: 12
2547
2548**Parameters:**
2549
2550| Name| Description|
2551| -------- | -------- |
2552| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2553| insertTextFunc | Function [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) obtained from the proxy.|
2554
2555**Returns:**
2556
2557An error code.
2558
2559**IME_ERR_OK** indicates the operation is successful.
2560
2561**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2562
2563For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2564
2565
2566### OH_TextEditorProxy_GetMoveCursorFunc()
2567
2568```
2569InputMethod_ErrorCode OH_TextEditorProxy_GetMoveCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_MoveCursorFunc * moveCursorFunc )
2570```
2571
2572**Description**
2573
2574Obtains the [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2575
2576**Since**: 12
2577
2578**Parameters:**
2579
2580| Name| Description|
2581| -------- | -------- |
2582| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2583| moveCursorFunc | Function [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) obtained from the proxy.|
2584
2585**Returns:**
2586
2587An error code.
2588
2589**IME_ERR_OK** indicates the operation is successful.
2590
2591**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2592
2593For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2594
2595
2596### OH_TextEditorProxy_GetReceivePrivateCommandFunc()
2597
2598```
2599InputMethod_ErrorCode OH_TextEditorProxy_GetReceivePrivateCommandFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc * receivePrivateCommandFunc )
2600```
2601
2602**Description**
2603
2604Obtains the [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2605
2606**Since**: 12
2607
2608**Parameters:**
2609
2610| Name| Description|
2611| -------- | -------- |
2612| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2613| receivePrivateCommandFunc | Function [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) obtained from the proxy.|
2614
2615**Returns:**
2616
2617An error code.
2618
2619**IME_ERR_OK** indicates the operation is successful.
2620
2621**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2622
2623For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2624
2625
2626### OH_TextEditorProxy_GetSendEnterKeyFunc()
2627
2628```
2629InputMethod_ErrorCode OH_TextEditorProxy_GetSendEnterKeyFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SendEnterKeyFunc * sendEnterKeyFunc )
2630```
2631
2632**Description**
2633
2634Obtains the [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2635
2636**Since**: 12
2637
2638**Parameters:**
2639
2640| Name| Description|
2641| -------- | -------- |
2642| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2643| sendEnterKeyFunc | Function [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) obtained from the proxy.|
2644
2645**Returns:**
2646
2647An error code.
2648
2649**IME_ERR_OK** indicates the operation is successful.
2650
2651**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2652
2653For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2654
2655
2656### OH_TextEditorProxy_GetSendKeyboardStatusFunc()
2657
2658```
2659InputMethod_ErrorCode OH_TextEditorProxy_GetSendKeyboardStatusFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SendKeyboardStatusFunc * sendKeyboardStatusFunc )
2660```
2661
2662**Description**
2663
2664Obtains the [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2665
2666**Since**: 12
2667
2668**Parameters:**
2669
2670| Name| Description|
2671| -------- | -------- |
2672| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2673| sendKeyboardStatusFunc | Function [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) obtained from the proxy.|
2674
2675**Returns:**
2676
2677An error code.
2678
2679**IME_ERR_OK** indicates the operation is successful.
2680
2681**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2682
2683For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2684
2685
2686### OH_TextEditorProxy_GetSetPreviewTextFunc()
2687
2688```
2689InputMethod_ErrorCode OH_TextEditorProxy_GetSetPreviewTextFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SetPreviewTextFunc * setPreviewTextFunc )
2690```
2691
2692**Description**
2693
2694Obtains the [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) function from [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2695
2696**Since**: 12
2697
2698**Parameters:**
2699
2700| Name| Description|
2701| -------- | -------- |
2702| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be read.|
2703| setPreviewTextFunc | Function [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) obtained from the proxy.|
2704
2705**Returns:**
2706
2707An error code.
2708
2709**IME_ERR_OK** indicates the operation is successful.
2710
2711**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2712
2713For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2714
2715
2716### OH_TextEditorProxy_SetDeleteBackwardFunc()
2717
2718```
2719InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteBackwardFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_DeleteBackwardFunc deleteBackwardFunc )
2720```
2721
2722**Description**
2723
2724Sets the [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2725
2726**Since**: 12
2727
2728**Parameters:**
2729
2730| Name| Description|
2731| -------- | -------- |
2732| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2733| deleteBackwardFunc | Function [OH_TextEditorProxy_DeleteBackwardFunc](#oh_texteditorproxy_deletebackwardfunc) set to the proxy.|
2734
2735**Returns:**
2736
2737An error code.
2738
2739**IME_ERR_OK** indicates the operation is successful.
2740
2741**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2742
2743For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2744
2745
2746### OH_TextEditorProxy_SetDeleteForwardFunc()
2747
2748```
2749InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteForwardFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_DeleteForwardFunc deleteForwardFunc )
2750```
2751
2752**Description**
2753
2754Sets the [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2755
2756**Since**: 12
2757
2758**Parameters:**
2759
2760| Name| Description|
2761| -------- | -------- |
2762| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2763| deleteForwardFunc | Function [OH_TextEditorProxy_DeleteForwardFunc](#oh_texteditorproxy_deleteforwardfunc) set to the proxy.|
2764
2765**Returns:**
2766
2767An error code.
2768
2769**IME_ERR_OK** indicates the operation is successful.
2770
2771**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2772
2773For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2774
2775
2776### OH_TextEditorProxy_SetFinishTextPreviewFunc()
2777
2778```
2779InputMethod_ErrorCode OH_TextEditorProxy_SetFinishTextPreviewFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_FinishTextPreviewFunc finishTextPreviewFunc )
2780```
2781
2782**Description**
2783
2784Sets the [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2785
2786**Since**: 12
2787
2788**Parameters:**
2789
2790| Name| Description|
2791| -------- | -------- |
2792| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2793| finishTextPreviewFunc | Function [OH_TextEditorProxy_FinishTextPreviewFunc](#oh_texteditorproxy_finishtextpreviewfunc) set to the proxy.|
2794
2795**Returns:**
2796
2797An error code.
2798
2799**IME_ERR_OK** indicates the operation is successful.
2800
2801**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2802
2803For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2804
2805
2806### OH_TextEditorProxy_SetGetLeftTextOfCursorFunc()
2807
2808```
2809InputMethod_ErrorCode OH_TextEditorProxy_SetGetLeftTextOfCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc getLeftTextOfCursorFunc )
2810```
2811
2812**Description**
2813
2814Sets the [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2815
2816**Since**: 12
2817
2818**Parameters:**
2819
2820| Name| Description|
2821| -------- | -------- |
2822| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2823| getLeftTextOfCursorFunc | Function [OH_TextEditorProxy_GetLeftTextOfCursorFunc](#oh_texteditorproxy_getlefttextofcursorfunc) set to the proxy.|
2824
2825**Returns:**
2826
2827An error code.
2828
2829**IME_ERR_OK** indicates the operation is successful.
2830
2831**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2832
2833For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2834
2835
2836### OH_TextEditorProxy_SetGetRightTextOfCursorFunc()
2837
2838```
2839InputMethod_ErrorCode OH_TextEditorProxy_SetGetRightTextOfCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc getRightTextOfCursorFunc )
2840```
2841
2842**Description**
2843
2844Sets the [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2845
2846**Since**: 12
2847
2848**Parameters:**
2849
2850| Name| Description|
2851| -------- | -------- |
2852| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2853| getRightTextOfCursorFunc | Function [OH_TextEditorProxy_GetRightTextOfCursorFunc](#oh_texteditorproxy_getrighttextofcursorfunc) set to the proxy.|
2854
2855**Returns:**
2856
2857An error code.
2858
2859**IME_ERR_OK** indicates the operation is successful.
2860
2861**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2862
2863For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2864
2865
2866### OH_TextEditorProxy_SetGetTextConfigFunc()
2867
2868```
2869InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextConfigFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetTextConfigFunc getTextConfigFunc )
2870```
2871
2872**Description**
2873
2874Sets the [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2875
2876**Since**: 12
2877
2878**Parameters:**
2879
2880| Name| Description|
2881| -------- | -------- |
2882| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2883| getTextConfigFunc | Function [OH_TextEditorProxy_GetTextConfigFunc](#oh_texteditorproxy_gettextconfigfunc) set to the proxy.|
2884
2885**Returns:**
2886
2887An error code.
2888
2889**IME_ERR_OK** indicates the operation is successful.
2890
2891**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2892
2893For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2894
2895
2896### OH_TextEditorProxy_SetGetTextIndexAtCursorFunc()
2897
2898```
2899InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextIndexAtCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc getTextIndexAtCursorFunc )
2900```
2901
2902**Description**
2903
2904Sets the [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2905
2906**Since**: 12
2907
2908**Parameters:**
2909
2910| Name| Description|
2911| -------- | -------- |
2912| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2913| getTextIndexAtCursorFunc | Function [OH_TextEditorProxy_GetTextIndexAtCursorFunc](#oh_texteditorproxy_gettextindexatcursorfunc) set to the proxy.|
2914
2915**Returns:**
2916
2917An error code.
2918
2919**IME_ERR_OK** indicates the operation is successful.
2920
2921**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2922
2923For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2924
2925
2926### OH_TextEditorProxy_SetHandleExtendActionFunc()
2927
2928```
2929InputMethod_ErrorCode OH_TextEditorProxy_SetHandleExtendActionFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_HandleExtendActionFunc handleExtendActionFunc )
2930```
2931
2932**Description**
2933
2934Sets the [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2935
2936**Since**: 12
2937
2938**Parameters:**
2939
2940| Name| Description|
2941| -------- | -------- |
2942| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2943| handleExtendActionFunc | Function [OH_TextEditorProxy_HandleExtendActionFunc](#oh_texteditorproxy_handleextendactionfunc) set to the proxy.|
2944
2945**Returns:**
2946
2947An error code.
2948
2949**IME_ERR_OK** indicates the operation is successful.
2950
2951**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2952
2953For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2954
2955
2956### OH_TextEditorProxy_SetHandleSetSelectionFunc()
2957
2958```
2959InputMethod_ErrorCode OH_TextEditorProxy_SetHandleSetSelectionFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_HandleSetSelectionFunc handleSetSelectionFunc )
2960```
2961
2962**Description**
2963
2964Sets the [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2965
2966**Since**: 12
2967
2968**Parameters:**
2969
2970| Name| Description|
2971| -------- | -------- |
2972| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
2973| handleSetSelectionFunc | Function [OH_TextEditorProxy_HandleSetSelectionFunc](#oh_texteditorproxy_handlesetselectionfunc) set to the proxy.|
2974
2975**Returns:**
2976
2977An error code.
2978
2979**IME_ERR_OK** indicates the operation is successful.
2980
2981**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
2982
2983For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
2984
2985
2986### OH_TextEditorProxy_SetInsertTextFunc()
2987
2988```
2989InputMethod_ErrorCode OH_TextEditorProxy_SetInsertTextFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_InsertTextFunc insertTextFunc )
2990```
2991
2992**Description**
2993
2994Sets the [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
2995
2996**Since**: 12
2997
2998**Parameters:**
2999
3000| Name| Description|
3001| -------- | -------- |
3002| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3003| insertTextFunc | Function [OH_TextEditorProxy_InsertTextFunc](#oh_texteditorproxy_inserttextfunc) set to the proxy.|
3004
3005**Returns:**
3006
3007An error code.
3008
3009**IME_ERR_OK** indicates the operation is successful.
3010
3011**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3012
3013For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3014
3015
3016### OH_TextEditorProxy_SetMoveCursorFunc()
3017
3018```
3019InputMethod_ErrorCode OH_TextEditorProxy_SetMoveCursorFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_MoveCursorFunc moveCursorFunc )
3020```
3021
3022**Description**
3023
3024Sets the [OH_TextEditorProxy_SetMoveCursorFunc](#oh_texteditorproxy_setmovecursorfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
3025
3026**Since**: 12
3027
3028**Parameters:**
3029
3030| Name| Description|
3031| -------- | -------- |
3032| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3033| moveCursorFunc | Function [OH_TextEditorProxy_MoveCursorFunc](#oh_texteditorproxy_movecursorfunc) set to the proxy.|
3034
3035**Returns:**
3036
3037An error code.
3038
3039**IME_ERR_OK** indicates the operation is successful.
3040
3041**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3042
3043For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3044
3045
3046### OH_TextEditorProxy_SetReceivePrivateCommandFunc()
3047
3048```
3049InputMethod_ErrorCode OH_TextEditorProxy_SetReceivePrivateCommandFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc receivePrivateCommandFunc )
3050```
3051
3052**Description**
3053
3054Sets the [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
3055
3056**Since**: 12
3057
3058**Parameters:**
3059
3060| Name| Description|
3061| -------- | -------- |
3062| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3063| receivePrivateCommandFunc | Function [OH_TextEditorProxy_ReceivePrivateCommandFunc](#oh_texteditorproxy_receiveprivatecommandfunc) set to the proxy.|
3064
3065**Returns:**
3066
3067An error code.
3068
3069**IME_ERR_OK** indicates the operation is successful.
3070
3071**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3072
3073For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3074
3075
3076### OH_TextEditorProxy_SetSendEnterKeyFunc()
3077
3078```
3079InputMethod_ErrorCode OH_TextEditorProxy_SetSendEnterKeyFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SendEnterKeyFunc sendEnterKeyFunc )
3080```
3081
3082**Description**
3083
3084Sets the [OH_TextEditorProxy_SetSendEnterKeyFunc](#oh_texteditorproxy_setsendenterkeyfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
3085
3086**Since**: 12
3087
3088**Parameters:**
3089
3090| Name| Description|
3091| -------- | -------- |
3092| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3093| sendEnterKeyFunc | Function [OH_TextEditorProxy_SendEnterKeyFunc](#oh_texteditorproxy_sendenterkeyfunc) set to the proxy.|
3094
3095**Returns:**
3096
3097An error code.
3098
3099**IME_ERR_OK** indicates the operation is successful.
3100
3101**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3102
3103For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3104
3105
3106### OH_TextEditorProxy_SetSendKeyboardStatusFunc()
3107
3108```
3109InputMethod_ErrorCode OH_TextEditorProxy_SetSendKeyboardStatusFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SendKeyboardStatusFunc sendKeyboardStatusFunc )
3110```
3111
3112**Description**
3113
3114Sets the [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
3115
3116**Since**: 12
3117
3118**Parameters:**
3119
3120| Name| Description|
3121| -------- | -------- |
3122| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3123| sendKeyboardStatusFunc | Function [OH_TextEditorProxy_SendKeyboardStatusFunc](#oh_texteditorproxy_sendkeyboardstatusfunc) set to the proxy.|
3124
3125**Returns:**
3126
3127An error code.
3128
3129**IME_ERR_OK** indicates the operation is successful.
3130
3131**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3132
3133For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3134
3135
3136### OH_TextEditorProxy_SetSetPreviewTextFunc()
3137
3138```
3139InputMethod_ErrorCode OH_TextEditorProxy_SetSetPreviewTextFunc (InputMethod_TextEditorProxy * proxy, OH_TextEditorProxy_SetPreviewTextFunc setPreviewTextFunc )
3140```
3141
3142**Description**
3143
3144Sets the [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) function to [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy).
3145
3146**Since**: 12
3147
3148**Parameters:**
3149
3150| Name| Description|
3151| -------- | -------- |
3152| proxy | Pointer to the [InputMethod_TextEditorProxy](#inputmethod_texteditorproxy) instance to be set.|
3153| setPreviewTextFunc | Function [OH_TextEditorProxy_SetPreviewTextFunc](#oh_texteditorproxy_setpreviewtextfunc) set to the proxy.|
3154
3155**Returns:**
3156
3157An error code.
3158
3159**IME_ERR_OK** indicates the operation is successful.
3160
3161**The IME_ERR_NULL_POINTER** indicates an unexpected null pointer.
3162
3163For details about the error code, see [InputMethod_ErrorCode](#inputmethod_errorcode).
3164