diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
| commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
| tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/chromium/public/WebInputEvent.h | |
| parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
| download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz | |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/chromium/public/WebInputEvent.h')
| -rw-r--r-- | Source/WebKit/chromium/public/WebInputEvent.h | 19 |
1 files changed, 18 insertions, 1 deletions
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 { |
