OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_IME_IBUS_BRIDGE_H_ | 6 #ifndef CHROMEOS_IME_IBUS_BRIDGE_H_ |
7 #define CHROMEOS_IME_IBUS_BRIDGE_H_ | 7 #define CHROMEOS_IME_IBUS_BRIDGE_H_ |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
12 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" | 12 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h" |
13 #include "chromeos/ime/ime_constants.h" | 13 #include "chromeos/ime/ime_constants.h" |
14 #include "chromeos/ime/input_method_property.h" | 14 #include "chromeos/ime/input_method_property.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
| 17 namespace input_method { |
| 18 class CandidateWindow; |
| 19 } // namespace input_method |
17 | 20 |
18 class IBusText; | 21 class IBusText; |
19 class IBusLookupTable; | |
20 | 22 |
21 class CHROMEOS_EXPORT IBusInputContextHandlerInterface { | 23 class CHROMEOS_EXPORT IBusInputContextHandlerInterface { |
22 public: | 24 public: |
23 // Called when the engine commit a text. | 25 // Called when the engine commit a text. |
24 virtual void CommitText(const std::string& text) = 0; | 26 virtual void CommitText(const std::string& text) = 0; |
25 | 27 |
26 // Called when the engine forward a key event. | 28 // Called when the engine forward a key event. |
27 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; | 29 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; |
28 | 30 |
29 // Called when the engine update preedit stroing. | 31 // Called when the engine update preedit stroing. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 protected: | 115 protected: |
114 IBusEngineHandlerInterface() {} | 116 IBusEngineHandlerInterface() {} |
115 }; | 117 }; |
116 | 118 |
117 // A interface to handle the candidate window related method call. | 119 // A interface to handle the candidate window related method call. |
118 class CHROMEOS_EXPORT IBusPanelCandidateWindowHandlerInterface { | 120 class CHROMEOS_EXPORT IBusPanelCandidateWindowHandlerInterface { |
119 public: | 121 public: |
120 virtual ~IBusPanelCandidateWindowHandlerInterface() {} | 122 virtual ~IBusPanelCandidateWindowHandlerInterface() {} |
121 | 123 |
122 // Called when the IME updates the lookup table. | 124 // Called when the IME updates the lookup table. |
123 virtual void UpdateLookupTable(const IBusLookupTable& table, | 125 virtual void UpdateLookupTable( |
124 bool visible) = 0; | 126 const input_method::CandidateWindow& candidate_window, |
| 127 bool visible) = 0; |
125 | 128 |
126 // Called when the IME hides the lookup table. | 129 // Called when the IME hides the lookup table. |
127 virtual void HideLookupTable() = 0; | 130 virtual void HideLookupTable() = 0; |
128 | 131 |
129 // Called when the IME updates the auxiliary text. The |text| is given in | 132 // Called when the IME updates the auxiliary text. The |text| is given in |
130 // UTF-8 encoding. | 133 // UTF-8 encoding. |
131 virtual void UpdateAuxiliaryText(const std::string& text, bool visible) = 0; | 134 virtual void UpdateAuxiliaryText(const std::string& text, bool visible) = 0; |
132 | 135 |
133 // Called when the IME hides the auxiliary text. | 136 // Called when the IME hides the auxiliary text. |
134 virtual void HideAuxiliaryText() = 0; | 137 virtual void HideAuxiliaryText() = 0; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 protected: | 237 protected: |
235 IBusBridge(); | 238 IBusBridge(); |
236 | 239 |
237 private: | 240 private: |
238 DISALLOW_COPY_AND_ASSIGN(IBusBridge); | 241 DISALLOW_COPY_AND_ASSIGN(IBusBridge); |
239 }; | 242 }; |
240 | 243 |
241 } // namespace chromeos | 244 } // namespace chromeos |
242 | 245 |
243 #endif // CHROMEOS_IME_IBUS_BRIDGE_H_ | 246 #endif // CHROMEOS_IME_IBUS_BRIDGE_H_ |
OLD | NEW |