Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1479)

Side by Side Diff: components/arc/common/ime.mojom

Issue 2136933002: Add ime.ExtendSelectionAndDelete Mojo RPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ime.ExtendSelectionAndDelete Mojo RPC Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
79 // Deletes current selection plus the specified number of char16 values
80 // before and after selection or caret.
81 [MinVersion=4] ExtendSelectionAndDelete@5(uint64 before, uint64 after);
76 }; 82 };
OLDNEW
« no previous file with comments | « no previous file | components/arc/ime/arc_ime_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698