| 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 #ifndef BASE_MESSAGE_PUMP_GLIB_X_H | 5 #ifndef BASE_MESSAGE_PUMP_GLIB_X_H |
| 6 #define BASE_MESSAGE_PUMP_GLIB_X_H | 6 #define BASE_MESSAGE_PUMP_GLIB_X_H |
| 7 | 7 |
| 8 #include "base/message_pump.h" | 8 #include "base/message_pump.h" |
| 9 #include "base/message_pump_glib.h" | 9 #include "base/message_pump_glib.h" |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Sends the event to the observers. If an observer returns true, then it does | 51 // Sends the event to the observers. If an observer returns true, then it does |
| 52 // not send the event to any other observers and returns true. Returns false | 52 // not send the event to any other observers and returns true. Returns false |
| 53 // if no observer returns true. | 53 // if no observer returns true. |
| 54 bool WillProcessXEvent(XEvent* xevent); | 54 bool WillProcessXEvent(XEvent* xevent); |
| 55 | 55 |
| 56 // Update the lookup table and flag the events that should be captured and | 56 // Update the lookup table and flag the events that should be captured and |
| 57 // processed so that GDK doesn't get to them. | 57 // processed so that GDK doesn't get to them. |
| 58 void InitializeEventsToCapture(void); | 58 void InitializeEventsToCapture(void); |
| 59 | 59 |
| 60 #if defined(HAVE_XINPUT2) | |
| 61 // Initialize X2 input. | 60 // Initialize X2 input. |
| 62 void InitializeXInput2(void); | 61 void InitializeXInput2(void); |
| 63 | 62 |
| 64 // The opcode used for checking events. | 63 // The opcode used for checking events. |
| 65 int xiopcode_; | 64 int xiopcode_; |
| 66 #endif | |
| 67 | 65 |
| 68 // The event source for GDK events. | 66 // The event source for GDK events. |
| 69 GSource* gdksource_; | 67 GSource* gdksource_; |
| 70 | 68 |
| 71 // The default GDK event dispatcher. This is stored so that it can be restored | 69 // The default GDK event dispatcher. This is stored so that it can be restored |
| 72 // when necessary during nested event dispatching. | 70 // when necessary during nested event dispatching. |
| 73 gboolean (*gdkdispatcher_)(GSource*, GSourceFunc, void*); | 71 gboolean (*gdkdispatcher_)(GSource*, GSourceFunc, void*); |
| 74 | 72 |
| 75 // Indicates whether a GDK event was injected by chrome (when |true|) or if it | 73 // Indicates whether a GDK event was injected by chrome (when |true|) or if it |
| 76 // was captured and being processed by GDK (when |false|). | 74 // was captured and being processed by GDK (when |false|). |
| (...skipping 11 matching lines...) Expand all Loading... |
| 88 // it should be passed on to the default GDK handler. | 86 // it should be passed on to the default GDK handler. |
| 89 std::bitset<LASTEvent> capture_x_events_; | 87 std::bitset<LASTEvent> capture_x_events_; |
| 90 std::bitset<GDK_EVENT_LAST> capture_gdk_events_; | 88 std::bitset<GDK_EVENT_LAST> capture_gdk_events_; |
| 91 | 89 |
| 92 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlibX); | 90 DISALLOW_COPY_AND_ASSIGN(MessagePumpGlibX); |
| 93 }; | 91 }; |
| 94 | 92 |
| 95 } // namespace base | 93 } // namespace base |
| 96 | 94 |
| 97 #endif // BASE_MESSAGE_PUMP_GLIB_X_H | 95 #endif // BASE_MESSAGE_PUMP_GLIB_X_H |
| OLD | NEW |