| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module ui.mojom; |
| |
| import "ui/base/ime/mojo/ime_types.mojom"; |
| |
| // Text input info which is based on blink::WebTextInputInfo. |
| struct TextInputState { |
| // The type of input field. |
| TextInputType type; |
| |
| // The flags of the input field (autocorrect, autocomplete, etc.). |
| int32 flags; |
| |
| // The value of the input field. |
| string? text; |
| |
| // The cursor position of the current selection start, or the caret position |
| // if nothing is selected. |
| int32 selection_start; |
| |
| // The cursor position of the current selection end, or the caret position |
| // if nothing is selected. |
| int32 selection_end; |
| |
| // The start position of the current composition, or -1 if there is none. |
| int32 composition_start; |
| |
| // The end position of the current composition, or -1 if there is none. |
| int32 composition_end; |
| |
| // Whether or not inline composition can be performed for the current input. |
| bool can_compose_inline; |
| }; |