Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Silence gtk memory leak Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_LIBGTK2UI_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_LIBGTK2UI_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/gtest_prod_util.h" 12 #include "base/gtest_prod_util.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 _GdkDrawable GdkWindow;
21 typedef struct _GtkIMContext GtkIMContext; 20 typedef struct _GtkIMContext GtkIMContext;
22 21
23 namespace libgtk2ui { 22 namespace libgtk2ui {
24 23
25 // An implementation of LinuxInputMethodContext which is based on X11 event loop 24 // An implementation of LinuxInputMethodContext which is based on X11 event loop
26 // 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.
27 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext { 26 class X11InputMethodContextImplGtk2 : public ui::LinuxInputMethodContext {
28 public: 27 public:
29 X11InputMethodContextImplGtk2(ui::LinuxInputMethodContextDelegate* delegate, 28 X11InputMethodContextImplGtk2(ui::LinuxInputMethodContextDelegate* delegate,
30 bool is_simple); 29 bool is_simple);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 GtkIMContext*); 66 GtkIMContext*);
68 CHROMEG_CALLBACK_0(X11InputMethodContextImplGtk2, void, OnPreeditStart, 67 CHROMEG_CALLBACK_0(X11InputMethodContextImplGtk2, void, OnPreeditStart,
69 GtkIMContext*); 68 GtkIMContext*);
70 69
71 // A set of callback functions. Must not be NULL. 70 // A set of callback functions. Must not be NULL.
72 ui::LinuxInputMethodContextDelegate* delegate_; 71 ui::LinuxInputMethodContextDelegate* delegate_;
73 72
74 // IME's input GTK context. 73 // IME's input GTK context.
75 GtkIMContext* gtk_context_; 74 GtkIMContext* gtk_context_;
76 75
77 GdkWindow* gdk_last_set_client_window_; 76 gpointer gdk_last_set_client_window_;
78 77
79 // Last known caret bounds relative to the screen coordinates. 78 // Last known caret bounds relative to the screen coordinates.
80 gfx::Rect last_caret_bounds_; 79 gfx::Rect last_caret_bounds_;
81 80
82 // A set of hardware keycodes of modifier keys. 81 // A set of hardware keycodes of modifier keys.
83 base::hash_set<unsigned int> modifier_keycodes_; 82 base::hash_set<unsigned int> modifier_keycodes_;
84 83
85 // A list of keycodes of each modifier key. 84 // A list of keycodes of each modifier key.
86 std::vector<int> meta_keycodes_; 85 std::vector<int> meta_keycodes_;
87 std::vector<int> super_keycodes_; 86 std::vector<int> super_keycodes_;
88 std::vector<int> hyper_keycodes_; 87 std::vector<int> hyper_keycodes_;
89 88
90 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2); 89 DISALLOW_COPY_AND_ASSIGN(X11InputMethodContextImplGtk2);
91 }; 90 };
92 91
93 } // namespace libgtk2ui 92 } // namespace libgtk2ui
94 93
95 #endif // CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_ 94 #endif // CHROME_BROWSER_UI_LIBGTK2UI_X11_INPUT_METHOD_CONTEXT_IMPL_GTK2_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698