| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/ime/input_method_gtk.h" | 5 #include "ui/views/ime/input_method_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/third_party/icu/icu_utf.h" | 16 #include "base/third_party/icu/icu_utf.h" |
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
| 18 #include "ui/base/gtk/event_synthesis_gtk.h" | 18 #include "ui/base/gtk/event_synthesis_gtk.h" |
| 19 #include "ui/base/gtk/gtk_im_context_util.h" | 19 #include "ui/base/gtk/gtk_im_context_util.h" |
| 20 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" | 20 #include "ui/base/keycodes/keyboard_code_conversion_gtk.h" |
| 21 #include "ui/base/keycodes/keyboard_codes.h" | 21 #include "ui/base/keycodes/keyboard_codes.h" |
| 22 #include "ui/views/events/event.h" | 22 #include "ui/views/events/event.h" |
| 23 #include "ui/views/widget/widget.h" | 23 #include "views/widget/widget.h" |
| 24 | 24 |
| 25 namespace views { | 25 namespace views { |
| 26 | 26 |
| 27 InputMethodGtk::InputMethodGtk(internal::InputMethodDelegate* delegate) | 27 InputMethodGtk::InputMethodGtk(internal::InputMethodDelegate* delegate) |
| 28 : context_(NULL), | 28 : context_(NULL), |
| 29 context_simple_(NULL), | 29 context_simple_(NULL), |
| 30 widget_realize_id_(0), | 30 widget_realize_id_(0), |
| 31 widget_unrealize_id_(0), | 31 widget_unrealize_id_(0), |
| 32 context_focused_(false), | 32 context_focused_(false), |
| 33 handling_key_event_(false), | 33 handling_key_event_(false), |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 gtk_im_context_set_client_window(context_simple_, widget->window); | 442 gtk_im_context_set_client_window(context_simple_, widget->window); |
| 443 } | 443 } |
| 444 } | 444 } |
| 445 | 445 |
| 446 void InputMethodGtk::OnWidgetUnrealize(GtkWidget* widget) { | 446 void InputMethodGtk::OnWidgetUnrealize(GtkWidget* widget) { |
| 447 gtk_im_context_set_client_window(context_, NULL); | 447 gtk_im_context_set_client_window(context_, NULL); |
| 448 gtk_im_context_set_client_window(context_simple_, NULL); | 448 gtk_im_context_set_client_window(context_simple_, NULL); |
| 449 } | 449 } |
| 450 | 450 |
| 451 } // namespace views | 451 } // namespace views |
| OLD | NEW |