# GameTextInputState

`#include <gametextinput.h>`

This struct holds the state of an editable section of text.

## Summary

The text can have a selection and a composing region defined on it. A composing region is used by IMEs that allow input using multiple steps to compose a glyph or word. Use functions GameTextInput_getState and GameTextInput_setState to read and modify the state that an IME is editing.

| ### Public attributes ||
|---|---|
| `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-state#struct_game_text_input_state_1aa1be38f4bf3263b6f7e3659551d00b62` | `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-span#struct_game_text_input_span` A composing region defined on the text. |
| `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-state#struct_game_text_input_state_1a658f4715131e56dad9a42ba3cabbe431` | `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-span#struct_game_text_input_span` A selection defined on the text. |
| `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-state#struct_game_text_input_state_1a092c8a927e349378ff4917de7f22a28f` | `const char *` Text owned by the state, as a modified UTF-8 string. |
| `https://developer.android.com/reference/games/game-text-input/struct/game-text-input-state#struct_game_text_input_state_1a9981733dff3f0cb99a7095565ca92e4b` | `int32_t` Length in bytes of text_UTF8, *not* including the null at end. |

## Public attributes

### composingRegion

```text
GameTextInputSpan GameTextInputState::composingRegion
```
A composing region defined on the text.

### selection

```text
GameTextInputSpan GameTextInputState::selection
```
A selection defined on the text.

### text_UTF8

```gdscript
const char * GameTextInputState::text_UTF8
```
Text owned by the state, as a modified UTF-8 string.

Null-terminated. <https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8>

### text_length

```scdoc
int32_t GameTextInputState::text_length
```
Length in bytes of text_UTF8, *not* including the null at end.