OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // TODO(nona): Rename this file to ime_bridge.h | 4 // TODO(nona): Rename this file to ime_bridge.h |
5 | 5 |
6 #ifndef UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ | 6 #ifndef UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ |
7 #define UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ | 7 #define UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "ui/base/ime/text_input_mode.h" | 12 #include "ui/base/ime/text_input_mode.h" |
13 #include "ui/base/ime/text_input_type.h" | 13 #include "ui/base/ime/text_input_type.h" |
14 #include "ui/base/ui_base_export.h" | 14 #include "ui/base/ui_base_export.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Rect; | 17 class Rect; |
18 } // namespace gfx | 18 } // namespace gfx |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
| 21 class CandidateWindow; |
21 class KeyEvent; | 22 class KeyEvent; |
22 } // namespace ui | 23 } // namespace ui |
23 | 24 |
24 namespace chromeos { | 25 namespace chromeos { |
25 namespace input_method { | |
26 class CandidateWindow; | |
27 } // namespace input_method | |
28 | 26 |
29 class IBusText; | 27 class IBusText; |
30 | 28 |
31 class UI_BASE_EXPORT IBusInputContextHandlerInterface { | 29 class UI_BASE_EXPORT IBusInputContextHandlerInterface { |
32 public: | 30 public: |
33 // Called when the engine commit a text. | 31 // Called when the engine commit a text. |
34 virtual void CommitText(const std::string& text) = 0; | 32 virtual void CommitText(const std::string& text) = 0; |
35 | 33 |
36 // Called when the engine update preedit stroing. | 34 // Called when the engine update preedit stroing. |
37 virtual void UpdatePreeditText(const IBusText& text, | 35 virtual void UpdatePreeditText(const IBusText& text, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 protected: | 102 protected: |
105 IBusEngineHandlerInterface() {} | 103 IBusEngineHandlerInterface() {} |
106 }; | 104 }; |
107 | 105 |
108 // A interface to handle the candidate window related method call. | 106 // A interface to handle the candidate window related method call. |
109 class UI_BASE_EXPORT IBusPanelCandidateWindowHandlerInterface { | 107 class UI_BASE_EXPORT IBusPanelCandidateWindowHandlerInterface { |
110 public: | 108 public: |
111 virtual ~IBusPanelCandidateWindowHandlerInterface() {} | 109 virtual ~IBusPanelCandidateWindowHandlerInterface() {} |
112 | 110 |
113 // Called when the IME updates the lookup table. | 111 // Called when the IME updates the lookup table. |
114 virtual void UpdateLookupTable( | 112 virtual void UpdateLookupTable(const ui::CandidateWindow& candidate_window, |
115 const input_method::CandidateWindow& candidate_window, | 113 bool visible) = 0; |
116 bool visible) = 0; | |
117 | 114 |
118 // Called when the IME updates the preedit text. The |text| is given in | 115 // Called when the IME updates the preedit text. The |text| is given in |
119 // UTF-8 encoding. | 116 // UTF-8 encoding. |
120 virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos, | 117 virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos, |
121 bool visible) = 0; | 118 bool visible) = 0; |
122 | 119 |
123 // Called when the application changes its caret bounds. | 120 // Called when the application changes its caret bounds. |
124 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, | 121 virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, |
125 const gfx::Rect& composition_head) = 0; | 122 const gfx::Rect& composition_head) = 0; |
126 | 123 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 protected: | 192 protected: |
196 IBusBridge(); | 193 IBusBridge(); |
197 | 194 |
198 private: | 195 private: |
199 DISALLOW_COPY_AND_ASSIGN(IBusBridge); | 196 DISALLOW_COPY_AND_ASSIGN(IBusBridge); |
200 }; | 197 }; |
201 | 198 |
202 } // namespace chromeos | 199 } // namespace chromeos |
203 | 200 |
204 #endif // UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ | 201 #endif // UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_ |
OLD | NEW |