| 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 "ui/events/mojo/event.mojom"; | 7 import "ui/events/mojo/event.mojom"; |
| 8 import "ui/gfx/geometry/mojo/geometry.mojom"; | 8 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 9 import "ui/gfx/range/mojo/range.mojom"; | 9 import "ui/gfx/range/mojo/range.mojom"; |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // An IME driver register should register itself to Mus using the IMERegistrar | 86 // An IME driver register should register itself to Mus using the IMERegistrar |
| 87 // interface. | 87 // interface. |
| 88 interface IMERegistrar { | 88 interface IMERegistrar { |
| 89 RegisterDriver(IMEDriver driver); | 89 RegisterDriver(IMEDriver driver); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 // A client sends updates to the IME driver using the InputMethod interface. | 92 // A client sends updates to the IME driver using the InputMethod interface. |
| 93 // This interface is provided by IME drivers, and also by Mus as a lightweight | 93 // This interface is provided by IME drivers, and also by Mus as a lightweight |
| 94 // proxy between IME drivers and clients. | 94 // proxy between IME drivers and clients. |
| 95 interface InputMethod { | 95 interface InputMethod { |
| 96 OnTextInputModeChanged(TextInputMode text_input_mode); | |
| 97 OnTextInputTypeChanged(TextInputType text_input_type); | 96 OnTextInputTypeChanged(TextInputType text_input_type); |
| 98 | 97 |
| 99 // Client sends |caret_bounds| in focused window coordinates, | 98 // Client sends |caret_bounds| in focused window coordinates, |
| 100 // Mus translates it to global coordinates and sends it to IME app. | 99 // Mus translates it to global coordinates and sends it to IME app. |
| 101 OnCaretBoundsChanged(gfx.mojom.Rect caret_bounds); | 100 OnCaretBoundsChanged(gfx.mojom.Rect caret_bounds); |
| 102 | 101 |
| 103 // Called to process a key event. The callback function will be called to | 102 // Called to process a key event. The callback function will be called to |
| 104 // notify the client if the event was handled or not. A handled event may | 103 // notify the client if the event was handled or not. A handled event may |
| 105 // generate zero or more composition events which will be sent to the client | 104 // generate zero or more composition events which will be sent to the client |
| 106 // using the "input method result" functions of TextInputClient interface. | 105 // using the "input method result" functions of TextInputClient interface. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 134 // the character is not processed. See ui::TextInputClient::InsertChar() | 133 // the character is not processed. See ui::TextInputClient::InsertChar() |
| 135 // for more details. | 134 // for more details. |
| 136 InsertChar(ui.mojom.Event event); | 135 InsertChar(ui.mojom.Event event); |
| 137 | 136 |
| 138 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for: | 137 // TODO(moshayedi): Add functions corresponding to ui::TextInputClient for: |
| 139 // - Input context information | 138 // - Input context information |
| 140 // - Document content operations | 139 // - Document content operations |
| 141 // - Miscellaneous functions | 140 // - Miscellaneous functions |
| 142 // crbug.com/631527. | 141 // crbug.com/631527. |
| 143 }; | 142 }; |
| OLD | NEW |