| 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 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Class structure of Handler class. | 64 // Class structure of Handler class. |
| 65 struct HandlerClass { | 65 struct HandlerClass { |
| 66 GtkTextViewClass parent_class; | 66 GtkTextViewClass parent_class; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Creates a new instance of Handler class. | 69 // Creates a new instance of Handler class. |
| 70 GtkWidget* CreateNewHandler(); | 70 GtkWidget* CreateNewHandler(); |
| 71 | 71 |
| 72 // Adds an edit command to the key event. | 72 // Adds an edit command to the key event. |
| 73 void EditCommandMatched(ui::TextEditCommandAuraLinux::CommandId id, | 73 void EditCommandMatched(ui::TextEditCommand command, |
| 74 const std::string& value, | 74 const std::string& value); |
| 75 bool extend_selection); | |
| 76 | 75 |
| 77 // Builds a fake GdkEventKey from an XEvent. | 76 // Builds a fake GdkEventKey from an XEvent. |
| 78 void BuildGdkEventKeyFromXEvent(const base::NativeEvent& xevent, | 77 void BuildGdkEventKeyFromXEvent(const base::NativeEvent& xevent, |
| 79 GdkEventKey* gdk_event); | 78 GdkEventKey* gdk_event); |
| 80 | 79 |
| 81 // Initializes Handler structure. | 80 // Initializes Handler structure. |
| 82 static void HandlerInit(Handler *self); | 81 static void HandlerInit(Handler *self); |
| 83 | 82 |
| 84 // Initializes HandlerClass structure. | 83 // Initializes HandlerClass structure. |
| 85 static void HandlerClassInit(HandlerClass *klass); | 84 static void HandlerClassInit(HandlerClass *klass); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Buffer to store the match results. | 140 // Buffer to store the match results. |
| 142 std::vector<ui::TextEditCommandAuraLinux> edit_commands_; | 141 std::vector<ui::TextEditCommandAuraLinux> edit_commands_; |
| 143 | 142 |
| 144 // Whether the current X server has the XKeyboard extension. | 143 // Whether the current X server has the XKeyboard extension. |
| 145 bool has_xkb_; | 144 bool has_xkb_; |
| 146 }; | 145 }; |
| 147 | 146 |
| 148 } // namespace libgtk2ui | 147 } // namespace libgtk2ui |
| 149 | 148 |
| 150 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ | 149 #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_KEY_BINDINGS_HANDLER_H_ |
| OLD | NEW |