1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 // Text input type which is based on blink::WebTextInputType.
27 // Text input flag which is based on blink::WebTextInputFlags.
30 AUTO_COMPLETE_ON = 0x001,
31 AUTO_COMPLETE_OFF = 0x002,
32 AUTO_CORRECT_ON = 0x004,
33 AUTO_CORRECT_OFF = 0x008,
34 SPELL_CHECK_ON = 0x010,
35 SPELL_CHECK_OFF = 0x020,
36 AUTO_CAPITALIZE_NONE = 0x040,
37 AUTO_CAPITALIZE_CHARACTERS = 0x080,
38 AUTO_CAPITALIZE_WORDS = 0x100,
39 AUTO_CAPITALIZE_SENTENCES = 0x200,
43 // Text input info which is based on blink::WebTextInputInfo.
44 struct TextInputState {
45 // The type of input field.
48 // The flags of the input field (autocorrect, autocomplete, etc.).
51 // The value of the input field.
54 // The cursor position of the current selection start, or the caret position
55 // if nothing is selected.
56 int32 selection_start;
58 // The cursor position of the current selection end, or the caret position
59 // if nothing is selected.
62 // The start position of the current composition, or -1 if there is none.
63 int32 composition_start;
65 // The end position of the current composition, or -1 if there is none.
66 int32 composition_end;
68 // Whether or not inline composition can be performed for the current input.
69 bool can_compose_inline;