OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "mojo/common/text_direction.mojom"; | 7 import "mojo/common/text_direction.mojom"; |
8 import "ui/events/mojo/event.mojom"; | 8 import "ui/events/mojo/event.mojom"; |
9 import "ui/gfx/geometry/mojo/geometry.mojom"; | 9 import "ui/gfx/geometry/mojo/geometry.mojom"; |
10 import "ui/gfx/range/mojo/range.mojom"; | 10 import "ui/gfx/range/mojo/range.mojom"; |
11 | 11 |
| 12 // Specifies where to display the candidate window. |
| 13 enum CandidateWindowPosition { |
| 14 // Candidate window follows the cursor. |
| 15 kCursor, |
| 16 |
| 17 // Candidate window is locked to the beginning of the composition. |
| 18 kComposition |
| 19 }; |
| 20 |
| 21 struct CandidateWindowProperties { |
| 22 // Number of candidates to display per page. |
| 23 int32 page_size; |
| 24 |
| 25 // Should candidate window be rendered vertical or horizontal. |
| 26 bool vertical; |
| 27 |
| 28 // Text that is shown at the bottom of the candidate window. |
| 29 string auxiliary_text; |
| 30 |
| 31 // True to display auxiliary text, false to hide it. |
| 32 bool auxiliary_text_visible; |
| 33 |
| 34 // Position and visibility of cursor in the candidate window. |
| 35 int32 cursor_position; |
| 36 bool cursor_visible; |
| 37 |
| 38 // Where to display the candidate window. |
| 39 CandidateWindowPosition window_position; |
| 40 }; |
| 41 |
| 42 // Represents a candidate window entry. |
| 43 struct CandidateWindowEntry { |
| 44 // Value of the candidate. |
| 45 string value; |
| 46 |
| 47 // Short string displayed next to the candidate, often the shortcut key or |
| 48 // index. |
| 49 string label; |
| 50 |
| 51 // Additional text describing the candidate. |
| 52 string annotation; |
| 53 |
| 54 // The usage or detailed description of the candidate. |
| 55 string description_title; |
| 56 string description_body; |
| 57 }; |
| 58 |
12 // Represents an underlined segment of text currently composed by IME. | 59 // Represents an underlined segment of text currently composed by IME. |
13 // Corresponds to ui::CompositionUnderline. | 60 // Corresponds to ui::CompositionUnderline. |
14 struct CompositionUnderline { | 61 struct CompositionUnderline { |
15 uint32 start_offset; | 62 uint32 start_offset; |
16 uint32 end_offset; | 63 uint32 end_offset; |
17 bool thick; | 64 bool thick; |
18 uint32 color; | 65 uint32 color; |
19 uint32 background_color; | 66 uint32 background_color; |
20 }; | 67 }; |
21 | 68 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // the character is not processed. See ui::TextInputClient::InsertChar() | 192 // the character is not processed. See ui::TextInputClient::InsertChar() |
146 // for more details. | 193 // for more details. |
147 InsertChar(ui.mojom.Event event); | 194 InsertChar(ui.mojom.Event event); |
148 | 195 |
149 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for: | 196 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for: |
150 // - Input context information | 197 // - Input context information |
151 // - Document content operations | 198 // - Document content operations |
152 // - Miscellaneous functions | 199 // - Miscellaneous functions |
153 // crbug.com/631527. | 200 // crbug.com/631527. |
154 }; | 201 }; |
OLD | NEW |