Chromium Code Reviews| 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 // Next MinVersion: 4 | 5 // Next MinVersion: 5 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 import "screen_rect.mojom"; | 9 import "screen_rect.mojom"; |
| 10 | 10 |
| 11 // Represents the type of text input field currently focused. | 11 // Represents the type of text input field currently focused. |
| 12 [Extensible] | 12 [Extensible] |
| 13 enum TextInputType { | 13 enum TextInputType { |
| 14 NONE, | 14 NONE, |
| 15 TEXT, | 15 TEXT, |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 35 // Represents a single segment of text currently composed by IME. | 35 // Represents a single segment of text currently composed by IME. |
| 36 struct CompositionSegment { | 36 struct CompositionSegment { |
| 37 // Start offset of the segment in UTF-16 index. | 37 // Start offset of the segment in UTF-16 index. |
| 38 uint32 start_offset; | 38 uint32 start_offset; |
| 39 // End offset of the segment in UTF-16 index. | 39 // End offset of the segment in UTF-16 index. |
| 40 uint32 end_offset; | 40 uint32 end_offset; |
| 41 // Indicates that this segment should be emphasized. | 41 // Indicates that this segment should be emphasized. |
| 42 bool emphasized; | 42 bool emphasized; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Next method ID: 4 | |
| 45 interface ImeHost { | 46 interface ImeHost { |
| 46 // Notifies Chrome that the text input focus is changed. | 47 // Notifies Chrome that the text input focus is changed. |
| 47 OnTextInputTypeChanged@0(TextInputType type); | 48 OnTextInputTypeChanged@0(TextInputType type); |
| 48 | 49 |
| 49 // Notifies Chrome that the cursor poisition has changed. | 50 // Notifies Chrome that the cursor poisition has changed. |
| 50 OnCursorRectChanged@1(CursorRect rect); | 51 OnCursorRectChanged@1(CursorRect rect); |
| 51 | 52 |
| 52 // Notifies Chrome that the current composition is canceled. | 53 // Notifies Chrome that the current composition is canceled. |
| 53 [MinVersion=1] OnCancelComposition@2(); | 54 [MinVersion=1] OnCancelComposition@2(); |
| 54 | 55 |
| 55 // Show virtual keyboard of Chrome OS if needed. | 56 // Show virtual keyboard of Chrome OS if needed. |
| 56 [MinVersion=2] ShowImeIfNeeded@3(); | 57 [MinVersion=2] ShowImeIfNeeded@3(); |
| 57 }; | 58 }; |
| 58 | 59 |
| 60 // Next method ID: 6 | |
| 59 interface ImeInstance { | 61 interface ImeInstance { |
| 60 Init@0(ImeHost host_ptr); | 62 Init@0(ImeHost host_ptr); |
| 61 | 63 |
| 62 // Sets composition text and attributes requested by the host IME. | 64 // Sets composition text and attributes requested by the host IME. |
| 63 SetCompositionText@1(string text, array<CompositionSegment> segments); | 65 SetCompositionText@1(string text, array<CompositionSegment> segments); |
| 64 | 66 |
| 65 // Commits the last set composition text and clears the composition. | 67 // Commits the last set composition text and clears the composition. |
| 66 ConfirmCompositionText@2(); | 68 ConfirmCompositionText@2(); |
| 67 | 69 |
| 68 // Commits the specified text and clears the composition. | 70 // Commits the specified text and clears the composition. |
| 69 InsertText@3(string text); | 71 InsertText@3(string text); |
| 70 | 72 |
| 71 // Informs the virtual keyboard bounds on screen is changing. | 73 // Informs the virtual keyboard bounds on screen is changing. |
| 72 // |new_bounds| Represents a ChromeOS virtual keyboard bounds in ChromeOS | 74 // |new_bounds| Represents a ChromeOS virtual keyboard bounds in ChromeOS |
| 73 // screen coordinate, physical pixel as a unit. | 75 // screen coordinate, physical pixel as a unit. |
| 74 // When all members are zero value, virtual keyboard is being hidden. | 76 // When all members are zero value, virtual keyboard is being hidden. |
| 75 [MinVersion=3] OnKeyboardBoundsChanging@4(ScreenRect new_bounds); | 77 [MinVersion=3] OnKeyboardBoundsChanging@4(ScreenRect new_bounds); |
| 78 | |
|
kinaba
2016/07/11 07:43:56
nit: 1 blank line (not 2)
takaoka
2016/07/11 08:34:55
Done.
| |
| 79 | |
| 80 // Deletes current selection plus the specified number of characters before | |
|
kinaba
2016/07/11 07:43:56
Could you elaborate more on the "number of charact
takaoka
2016/07/11 08:34:55
Confirmed that "characters" means char16.https://c
| |
| 81 // and after selection or caret. | |
| 82 [MinVersion=4] ExtendSelectionAndDelete@5(uint32 before, uint32 after); | |
| 76 }; | 83 }; |
| OLD | NEW |