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