Chromium Code Reviews| 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 UI_BASE_IME_IBUS_CLIENT_H_ | 5 #ifndef UI_BASE_IME_IBUS_CLIENT_H_ |
| 6 #define UI_BASE_IME_IBUS_CLIENT_H_ | 6 #define UI_BASE_IME_IBUS_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <glib/gtypes.h> | 9 #include <glib/gtypes.h> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/event_types.h" | 12 #include "base/event_types.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "ui/base/events.h" | 14 #include "ui/base/events.h" |
| 15 #include "ui/base/ui_export.h" | 15 #include "ui/base/ui_export.h" |
| 16 #include "ui/gfx/rect.h" | |
|
Yusuke Sato
2012/06/13 14:31:26
forward decl.
Seigo Nonaka
2012/06/13 15:07:18
Done.
| |
| 16 | 17 |
| 17 typedef struct _IBusBus IBusBus; | 18 typedef struct _IBusBus IBusBus; |
| 18 typedef struct _IBusInputContext IBusInputContext; | 19 typedef struct _IBusInputContext IBusInputContext; |
| 19 typedef struct _IBusText IBusText; | 20 typedef struct _IBusText IBusText; |
| 20 | 21 |
| 21 namespace ui { | 22 namespace ui { |
| 22 | 23 |
| 23 struct CompositionText; | 24 struct CompositionText; |
| 24 | 25 |
| 25 namespace internal { | 26 namespace internal { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // Blurs the |context| asynchronously. | 91 // Blurs the |context| asynchronously. |
| 91 virtual void FocusOut(IBusInputContext* context) = 0; | 92 virtual void FocusOut(IBusInputContext* context) = 0; |
| 92 // Resets the |context| asynchronously. | 93 // Resets the |context| asynchronously. |
| 93 virtual void Reset(IBusInputContext* context) = 0; | 94 virtual void Reset(IBusInputContext* context) = 0; |
| 94 | 95 |
| 95 // Returns the current input method type. | 96 // Returns the current input method type. |
| 96 virtual InputMethodType GetInputMethodType() = 0; | 97 virtual InputMethodType GetInputMethodType() = 0; |
| 97 | 98 |
| 98 // Resets the cursor location asynchronously. | 99 // Resets the cursor location asynchronously. |
| 99 virtual void SetCursorLocation(IBusInputContext* context, | 100 virtual void SetCursorLocation(IBusInputContext* context, |
| 100 int32 x, | 101 int32 x, |
|
Yusuke Sato
2012/06/13 14:31:26
line 101-104: const gfx::Rect&
Seigo Nonaka
2012/06/13 15:07:18
Done.
| |
| 101 int32 y, | 102 int32 y, |
| 102 int32 w, | 103 int32 w, |
| 103 int32 h) = 0; | 104 int32 h, |
| 105 const gfx::Rect& composition_head) = 0; | |
| 104 | 106 |
| 105 // Sends the key to ibus-daemon asynchronously. | 107 // Sends the key to ibus-daemon asynchronously. |
| 106 virtual void SendKeyEvent(IBusInputContext* context, | 108 virtual void SendKeyEvent(IBusInputContext* context, |
| 107 uint32 keyval, | 109 uint32 keyval, |
| 108 uint32 keycode, | 110 uint32 keycode, |
| 109 uint32 state, | 111 uint32 state, |
| 110 PendingKeyEvent* pending_key) = 0; | 112 PendingKeyEvent* pending_key) = 0; |
| 111 | 113 |
| 112 // Called by InputMethodIBus::OnUpdatePreeditText to convert |text| into a | 114 // Called by InputMethodIBus::OnUpdatePreeditText to convert |text| into a |
| 113 // CompositionText. | 115 // CompositionText. |
| 114 virtual void ExtractCompositionText(IBusText* text, | 116 virtual void ExtractCompositionText(IBusText* text, |
| 115 guint cursor_position, | 117 guint cursor_position, |
| 116 CompositionText* out_composition) = 0; | 118 CompositionText* out_composition) = 0; |
| 117 | 119 |
| 118 // Called by InputMethodIBus::OnCommitText to convert |text| into a Unicode | 120 // Called by InputMethodIBus::OnCommitText to convert |text| into a Unicode |
| 119 // string. | 121 // string. |
| 120 virtual string16 ExtractCommitText(IBusText* text) = 0; | 122 virtual string16 ExtractCommitText(IBusText* text) = 0; |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace internal | 125 } // namespace internal |
| 124 } // namespace ui | 126 } // namespace ui |
| 125 | 127 |
| 126 #endif // UI_BASE_IME_IBUS_CLIENT_H_ | 128 #endif // UI_BASE_IME_IBUS_CLIENT_H_ |
| OLD | NEW |