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

Unified Diff: base/message_pump_glib_x.h

Issue 4186004: touchui: First pass at XInput2 message pump. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: gyp fiddling Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_pump_glib_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_glib_x.h
diff --git a/base/message_pump_glib_x.h b/base/message_pump_glib_x.h
index 2f5073137ae52ade165e4712689e64660bfa9636..c6d98e365b03bfc98a7b60b81996433f60d2273e 100644
--- a/base/message_pump_glib_x.h
+++ b/base/message_pump_glib_x.h
@@ -9,6 +9,7 @@
#include "base/message_pump_glib.h"
#include <bitset>
+#include <set>
#include <glib.h>
#include <gtk/gtk.h>
@@ -28,6 +29,11 @@ class MessagePumpGlibX : public MessagePumpForUI {
// was captured and being processed by GDK (when |false|).
bool IsDispatchingEvent(void) { return dispatching_event_; }
+#if defined(HAVE_XINPUT2)
+ // Setup an X Window for XInput2 events.
+ void SetupXInput2ForXWindow(Window xid);
+#endif
+
private:
static void EventDispatcherX(GdkEvent* event, gpointer data);
@@ -35,6 +41,22 @@ class MessagePumpGlibX : public MessagePumpForUI {
// processed so that GDK doesn't get to them.
void InitializeEventsToCapture(void);
+#if defined(HAVE_XINPUT2)
+ // Initialize X2 input.
+ void InitializeXInput2(void);
+
+ // The opcode used for checking events.
+ int xiopcode_;
+
+ // The list of master pointer devices. We maintain this list so that it is not
+ // necessary to query X for the list of devices for each GdkWindow created.
+ std::set<int> masters_;
+
+ // The list of slave (physical) pointer devices.
+ // TODO(sad): This is currently unused, and may be removed eventually.
+ std::set<int> slaves_;
+#endif
+
// The event source for GDK events.
GSource* gdksource_;
« no previous file with comments | « no previous file | base/message_pump_glib_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698