1# inputmethod_text_config_capi.h 2 3 4## Overview 5 6Provides methods for creating, destroying, reading, and writing the text box configuration information objects. 7 8**Library**: libohinputmethod.so 9 10**System capability**: SystemCapability.MiscServices.InputMethodFramework 11 12**Since**: 12 13 14**Related module**: [InputMethod](_input_method.md) 15 16 17## Summary 18 19 20### Types 21 22| Name| Description| 23| -------- | -------- | 24| [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) | Text box configuration.| 25 26 27### Functions 28 29| Name| Description| 30| -------- | -------- | 31| [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \* [OH_TextConfig_Create](_input_method.md#oh_textconfig_create) () | Creates an [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) instance.| 32| void [OH_TextConfig_Destroy](_input_method.md#oh_textconfig_destroy) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config) | Destroys an [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) instance.| 33| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_SetInputType](_input_method.md#oh_textconfig_setinputtype) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_TextInputType](_input_method.md#inputmethod_textinputtype) inputType) | Sets the text box type for [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 34| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_SetEnterKeyType](_input_method.md#oh_textconfig_setenterkeytype) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_EnterKeyType](_input_method.md#inputmethod_enterkeytype) enterKeyType) | Sets the Enter function type for [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 35| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_SetPreviewTextSupport](_input_method.md#oh_textconfig_setpreviewtextsupport) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, bool supported) | Sets the text preview feature for [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 36| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_SetSelection](_input_method.md#oh_textconfig_setselection) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, int32_t start, int32_t end) | Sets the selected text area for [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 37| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_SetWindowId](_input_method.md#oh_textconfig_setwindowid) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, int32_t windowId) | Sets the ID of the window to which [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) belongs.| 38| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetInputType](_input_method.md#oh_textconfig_getinputtype) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_TextInputType](_input_method.md#inputmethod_textinputtype) \*inputType) | Obtains the text box type of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 39| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetEnterKeyType](_input_method.md#oh_textconfig_getenterkeytype) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_EnterKeyType](_input_method.md#inputmethod_enterkeytype) \*enterKeyType) | Obtains the Enter function type of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 40| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_IsPreviewTextSupported](_input_method.md#oh_textconfig_ispreviewtextsupported) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, bool \*supported) | Obtains the text preview settings of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 41| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetCursorInfo](_input_method.md#oh_textconfig_getcursorinfo) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_CursorInfo](_input_method.md#inputmethod_cursorinfo) \*\*cursorInfo) | Obtains the cursor information of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 42| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetTextAvoidInfo](_input_method.md#oh_textconfig_gettextavoidinfo) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, [InputMethod_TextAvoidInfo](_input_method.md#inputmethod_textavoidinfo) \*\*avoidInfo) | Obtains the avoidance information of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 43| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetSelection](_input_method.md#oh_textconfig_getselection) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, int32_t \*start, int32_t \*end) | Obtains the selected text area of [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig).| 44| [InputMethod_ErrorCode](_input_method.md#inputmethod_errorcode) [OH_TextConfig_GetWindowId](_input_method.md#oh_textconfig_getwindowid) ([InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) \*config, int32_t \*windowId) | Obtains the ID of the window to which [InputMethod_TextConfig](_input_method.md#inputmethod_textconfig) belongs.| 45