From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- Source/WebKit/chromium/public/WebInputEvent.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Source/WebKit/chromium/public/WebInputEvent.h') diff --git a/Source/WebKit/chromium/public/WebInputEvent.h b/Source/WebKit/chromium/public/WebInputEvent.h index d1f5173e9..63ce7131c 100644 --- a/Source/WebKit/chromium/public/WebInputEvent.h +++ b/Source/WebKit/chromium/public/WebInputEvent.h @@ -151,6 +151,10 @@ public: // event and back will not preserve these flags. CapsLockOn = 1 << 9, NumLockOn = 1 << 10, + + // Left/right modifiers for keyboard events. + IsLeft = 1 << 11, + IsRight = 1 << 12, }; static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; @@ -237,7 +241,11 @@ public: // |windowsKeyCode| is the Windows key code associated with this key // event. Sometimes it's direct from the event (i.e. on Windows), // sometimes it's via a mapping function. If you want a list, see - // WebCore/platform/chromium/KeyboardCodes* . + // WebCore/platform/chromium/KeyboardCodes* . Note that this should + // ALWAYS store the non-locational version of a keycode as this is + // what is returned by the Windows API. For example, it should + // store VK_SHIFT instead of VK_RSHIFT. The location information + // should be stored in |modifiers|. int windowsKeyCode; // The actual key code genenerated by the platform. The DOM spec runs @@ -279,6 +287,9 @@ public: // Sets keyIdentifier based on the value of windowsKeyCode. This is // handy for generating synthetic keyboard events. WEBKIT_EXPORT void setKeyIdentifierFromWindowsKeyCode(); + + static int windowsKeyCodeWithoutLocation(int keycode); + static int locationModifiersFromWindowsKeyCode(int keycode); }; // WebMouseEvent -------------------------------------------------------------- @@ -365,6 +376,11 @@ public: class WebGestureEvent : public WebInputEvent { public: + enum SourceDevice { + Touchpad, + Touchscreen, + }; + int x; int y; int globalX; @@ -398,6 +414,7 @@ public: struct { float velocityX; float velocityY; + SourceDevice sourceDevice; } flingStart; struct { -- cgit v1.2.1