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 #include "ui/base/ime/ibus_client_impl.h" | 5 #include "ui/base/ime/ibus_client_impl.h" |
6 | 6 |
7 #include <ibus.h> | 7 #include <ibus.h> |
8 #include <X11/X.h> | 8 #include <X11/X.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #undef FocusIn | 10 #undef FocusIn |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 IBusClient::InputMethodType IBusClientImpl::GetInputMethodType() { | 122 IBusClient::InputMethodType IBusClientImpl::GetInputMethodType() { |
123 // This object cannot know the type of the current IME, hence return NORMAL. | 123 // This object cannot know the type of the current IME, hence return NORMAL. |
124 return INPUT_METHOD_NORMAL; | 124 return INPUT_METHOD_NORMAL; |
125 } | 125 } |
126 | 126 |
127 void IBusClientImpl::SetCursorLocation(IBusInputContext* context, | 127 void IBusClientImpl::SetCursorLocation(IBusInputContext* context, |
128 int32 x, | 128 int32 x, |
129 int32 y, | 129 int32 y, |
130 int32 w, | 130 int32 w, |
131 int32 h) { | 131 int32 h, |
| 132 const gfx::Rect& composition_head) { |
132 ibus_input_context_set_cursor_location(context, x, y, w, h); | 133 ibus_input_context_set_cursor_location(context, x, y, w, h); |
133 } | 134 } |
134 | 135 |
135 void IBusClientImpl::SendKeyEvent(IBusInputContext* context, | 136 void IBusClientImpl::SendKeyEvent(IBusInputContext* context, |
136 uint32 keyval, | 137 uint32 keyval, |
137 uint32 keycode, | 138 uint32 keycode, |
138 uint32 state, | 139 uint32 state, |
139 PendingKeyEvent* pending_key) { | 140 PendingKeyEvent* pending_key) { |
140 // Note: | 141 // Note: |
141 // 1. We currently set timeout to -1, because ibus doesn't have a mechanism to | 142 // 1. We currently set timeout to -1, because ibus doesn't have a mechanism to |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 242 } |
242 | 243 |
243 string16 IBusClientImpl::ExtractCommitText(IBusText* text) { | 244 string16 IBusClientImpl::ExtractCommitText(IBusText* text) { |
244 if (!text || !text->text) | 245 if (!text || !text->text) |
245 return WideToUTF16(L""); | 246 return WideToUTF16(L""); |
246 return UTF8ToUTF16(text->text); | 247 return UTF8ToUTF16(text->text); |
247 } | 248 } |
248 | 249 |
249 } // namespace internal | 250 } // namespace internal |
250 } // namespace ui | 251 } // namespace ui |
OLD | NEW |