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 | 4 |
5 #include "chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h" | 5 #include "chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk2.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
9 #include <gdk/gdkx.h> | 9 #include <gdk/gdkx.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 | 11 |
12 #include <gtk/gtk.h> | 12 #include <gtk/gtk.h> |
13 | 13 |
14 #include <X11/X.h> | 14 #include <X11/X.h> |
15 #include <X11/Xlib.h> | 15 #include <X11/Xlib.h> |
16 | 16 |
17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "ui/base/ime/composition_text.h" | 19 #include "ui/base/ime/composition_text.h" |
20 #include "ui/base/ime/composition_text_util_pango.h" | 20 #include "ui/base/ime/composition_text_util_pango.h" |
21 #include "ui/base/ime/text_input_client.h" | 21 #include "ui/base/ime/text_input_client.h" |
22 #include "ui/events/event.h" | 22 #include "ui/events/event.h" |
23 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 23 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
24 #include "ui/gfx/x/x11_types.h" | 24 #include "ui/gfx/x/x11_types.h" |
25 | 25 |
26 namespace libgtk2ui { | 26 namespace libgtkui { |
27 | 27 |
28 X11InputMethodContextImplGtk2::X11InputMethodContextImplGtk2( | 28 X11InputMethodContextImplGtk2::X11InputMethodContextImplGtk2( |
29 ui::LinuxInputMethodContextDelegate* delegate, | 29 ui::LinuxInputMethodContextDelegate* delegate, |
30 bool is_simple) | 30 bool is_simple) |
31 : delegate_(delegate), | 31 : delegate_(delegate), |
32 gtk_context_(NULL), | 32 gtk_context_(NULL), |
33 gdk_last_set_client_window_(NULL) { | 33 gdk_last_set_client_window_(NULL) { |
34 CHECK(delegate_); | 34 CHECK(delegate_); |
35 | 35 |
36 ResetXModifierKeycodesCache(); | 36 ResetXModifierKeycodesCache(); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 delegate_->OnPreeditEnd(); | 306 delegate_->OnPreeditEnd(); |
307 } | 307 } |
308 | 308 |
309 void X11InputMethodContextImplGtk2::OnPreeditStart(GtkIMContext* context) { | 309 void X11InputMethodContextImplGtk2::OnPreeditStart(GtkIMContext* context) { |
310 if (context != gtk_context_) | 310 if (context != gtk_context_) |
311 return; | 311 return; |
312 | 312 |
313 delegate_->OnPreeditStart(); | 313 delegate_->OnPreeditStart(); |
314 } | 314 } |
315 | 315 |
316 } // namespace libgtk2ui | 316 } // namespace libgtkui |
OLD | NEW |