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 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ |
6 #define CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "base/event_types.h" | 11 #include "base/event_types.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "ui/base/glib/glib_integers.h" | 14 #include "ui/base/glib/glib_integers.h" |
15 #include "ui/base/glib/glib_signal.h" | 15 #include "ui/base/glib/glib_signal.h" |
16 #include "ui/base/ime/linux/linux_input_method_context.h" | 16 #include "ui/base/ime/linux/linux_input_method_context.h" |
17 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
18 | 18 |
19 typedef union _GdkEvent GdkEvent; | 19 typedef union _GdkEvent GdkEvent; |
20 typedef struct _GtkIMContext GtkIMContext; | 20 typedef struct _GtkIMContext GtkIMContext; |
21 | 21 |
22 namespace libgtk2ui { | 22 namespace libgtkui { |
23 | 23 |
24 // An implementation of LinuxInputMethodContext which is based on X11 event loop | 24 // An implementation of LinuxInputMethodContext which is based on X11 event loop |
25 // and uses GtkIMContext(gtk-immodule) as a bridge from/to underlying IMEs. | 25 // and uses GtkIMContext(gtk-immodule) as a bridge from/to underlying IMEs. |
26 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext { | 26 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext { |
27 public: | 27 public: |
28 X11InputMethodContextImplGtk2(ui::LinuxInputMethodContextDelegate* delegate, | 28 X11InputMethodContextImplGtk2(ui::LinuxInputMethodContextDelegate* delegate, |
29 bool is_simple); | 29 bool is_simple); |
30 ~X11InputMethodContextImplGtk2() override; | 30 ~X11InputMethodContextImplGtk2() override; |
31 | 31 |
32 // Overriden from ui::LinuxInputMethodContext | 32 // Overriden from ui::LinuxInputMethodContext |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::hash_set<unsigned int> modifier_keycodes_; | 82 base::hash_set<unsigned int> modifier_keycodes_; |
83 | 83 |
84 // A list of keycodes of each modifier key. | 84 // A list of keycodes of each modifier key. |
85 std::vector<int> meta_keycodes_; | 85 std::vector<int> meta_keycodes_; |
86 std::vector<int> super_keycodes_; | 86 std::vector<int> super_keycodes_; |
87 std::vector<int> hyper_keycodes_; | 87 std::vector<int> hyper_keycodes_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2); | 89 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace libgtk2ui | 92 } // namespace libgtkui |
93 | 93 |
94 #endif // CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ | 94 #endif // CHROME_BROWSER_UI_LIBGTKUI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ |
OLD | NEW |