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 | 4 |
5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ |
6 #define CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ | 6 #define CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 #include "chromeos/dbus/dbus_client_implementation_type.h" | 13 #include "chromeos/dbus/dbus_client_implementation_type.h" |
14 #include "chromeos/dbus/ibus/ibus_constants.h" | 14 #include "chromeos/dbus/ibus/ibus_constants.h" |
15 #include "dbus/object_path.h" | 15 #include "dbus/object_path.h" |
16 | 16 |
17 namespace dbus { | 17 namespace dbus { |
18 class Bus; | 18 class Bus; |
19 } // namespace dbus | 19 } // namespace dbus |
20 | 20 |
21 namespace chromeos { | 21 namespace chromeos { |
22 | 22 |
23 // TODO(nona): Remove ibus namespace after complete libibus removal. | |
24 namespace ibus { | |
25 class IBusText; | 23 class IBusText; |
26 } // namespace | |
27 | 24 |
28 class CHROMEOS_EXPORT IBusInputContextHandlerInterface { | 25 class CHROMEOS_EXPORT IBusInputContextHandlerInterface { |
29 public: | 26 public: |
30 // Called when the engine commit a text. | 27 // Called when the engine commit a text. |
31 virtual void CommitText(const ibus::IBusText& text) = 0; | 28 virtual void CommitText(const IBusText& text) = 0; |
32 | 29 |
33 // Called when the engine forward a key event. | 30 // Called when the engine forward a key event. |
34 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; | 31 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; |
35 | 32 |
36 // Called when the engine update preedit stroing. | 33 // Called when the engine update preedit stroing. |
37 virtual void UpdatePreeditText(const ibus::IBusText& text, | 34 virtual void UpdatePreeditText(const IBusText& text, |
38 uint32 cursor_pos, | 35 uint32 cursor_pos, |
39 bool visible) = 0; | 36 bool visible) = 0; |
40 | 37 |
41 // Called when the engine request showing preedit string. | 38 // Called when the engine request showing preedit string. |
42 virtual void ShowPreeditText() = 0; | 39 virtual void ShowPreeditText() = 0; |
43 | 40 |
44 // Called when the engine request hiding preedit string. | 41 // Called when the engine request hiding preedit string. |
45 virtual void HidePreeditText() = 0; | 42 virtual void HidePreeditText() = 0; |
46 }; | 43 }; |
47 | 44 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Create() should be used instead. | 126 // Create() should be used instead. |
130 IBusInputContextClient(); | 127 IBusInputContextClient(); |
131 | 128 |
132 private: | 129 private: |
133 DISALLOW_COPY_AND_ASSIGN(IBusInputContextClient); | 130 DISALLOW_COPY_AND_ASSIGN(IBusInputContextClient); |
134 }; | 131 }; |
135 | 132 |
136 } // namespace chromeos | 133 } // namespace chromeos |
137 | 134 |
138 #endif // CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ | 135 #endif // CHROMEOS_DBUS_IBUS_IBUS_INPUT_CONTEXT_CLIENT_H_ |
OLD | NEW |