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

Unified Diff: views/event.h

Issue 3801011: touchui: Directly process key and mouse events. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: nit Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/menu/nested_dispatcher_gtk.cc ('k') | views/event_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/event.h
diff --git a/views/event.h b/views/event.h
index f02bd1b2c7ea3b9673466c8247c6366a2a697b2b..9da39455c095444b75e321c0c931906a1a9e5b87 100644
--- a/views/event.h
+++ b/views/event.h
@@ -13,6 +13,9 @@
#if defined(OS_LINUX)
typedef struct _GdkEventKey GdkEventKey;
#endif
+#if defined(TOUCH_UI)
+typedef union _XEvent XEvent;
+#endif
class OSExchangeData;
@@ -222,6 +225,11 @@ class MouseEvent : public LocatedEvent {
// from 'from' coordinate system to 'to' coordinate system
MouseEvent(const MouseEvent& model, View* from, View* to);
+#if defined(TOUCH_UI)
+ // Create a mouse event from an X mouse event.
+ explicit MouseEvent(XEvent* xevent);
+#endif
+
// Conveniences to quickly test what button is down
bool IsOnlyLeftMouseButton() const {
return (GetFlags() & EF_LEFT_BUTTON_DOWN) &&
@@ -318,6 +326,11 @@ class KeyEvent : public Event {
explicit KeyEvent(GdkEventKey* event);
#endif
+#if defined(TOUCH_UI)
+ // Create a key event from an X key event.
+ explicit KeyEvent(XEvent* xevent);
+#endif
+
// This returns a VKEY_ value as defined in app/keyboard_codes.h which is
// the Windows value.
// On GTK, you can use the methods in keyboard_code_conversion_gtk.cc to
« no previous file with comments | « views/controls/menu/nested_dispatcher_gtk.cc ('k') | views/event_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698