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

Unified Diff: webkit/api/public/WebInputEvent.h

Issue 115330: linux: Adding events to windowless plugins on Linux (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « third_party/npapi/bindings/npapi_x11.h ('k') | webkit/api/src/gtk/WebInputEventFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/public/WebInputEvent.h
===================================================================
--- webkit/api/public/WebInputEvent.h (revision 16673)
+++ webkit/api/public/WebInputEvent.h (working copy)
@@ -49,7 +49,11 @@
class WebInputEvent {
public:
- WebInputEvent() : type(None), modifiers(0) { }
+ WebInputEvent(unsigned sizeParam = sizeof(WebInputEvent))
+ : size(sizeParam)
+ , type(Undefined)
+ , modifiers(0)
+ , timeStampSeconds(0.0) { }
// There are two schemes used for keyboard input. On Windows (and,
// interestingly enough, on Mac Carbon) there are two events for a
@@ -65,12 +69,13 @@
// indicate this.
enum Type {
- None = -1,
+ Undefined = -1,
// WebMouseEvent
MouseDown,
MouseUp,
MouseMove,
+ MouseEnter,
MouseLeave,
// WebMouseWheelEvent
@@ -85,18 +90,25 @@
enum Modifiers {
// modifiers for all events:
- ShiftKey = 1 << 0,
- ControlKey = 1 << 1,
- AltKey = 1 << 2,
- MetaKey = 1 << 3,
+ ShiftKey = 1 << 0,
+ ControlKey = 1 << 1,
+ AltKey = 1 << 2,
+ MetaKey = 1 << 3,
// modifiers for keyboard events:
- IsKeyPad = 1 << 4,
- IsAutoRepeat = 1 << 5
+ IsKeyPad = 1 << 4,
+ IsAutoRepeat = 1 << 5,
+
+ // modifiers for mouse events:
+ LeftButtonDown = 1 << 6,
+ MiddleButtonDown = 1 << 7,
+ RightButtonDown = 1 << 8,
};
+ unsigned size; // The size of this structure, for serialization.
Type type;
int modifiers;
+ double timeStampSeconds; // Seconds since epoch.
// Returns true if the WebInputEvent |type| is a keyboard event.
static bool isKeyboardEventType(int type)
@@ -151,8 +163,9 @@
// easier to leave it always false than ifdef.
bool isSystemKey;
- WebKeyboardEvent()
- : windowsKeyCode(0)
+ WebKeyboardEvent(unsigned sizeParam = sizeof(WebKeyboardEvent))
+ : WebInputEvent(sizeParam)
+ , windowsKeyCode(0)
, nativeKeyCode(0)
, isSystemKey(false)
{
@@ -181,18 +194,21 @@
Button button;
int x;
int y;
+ int windowX;
+ int windowY;
int globalX;
int globalY;
- double timeStampSeconds; // Seconds since epoch.
int clickCount;
- WebMouseEvent()
- : button(ButtonNone)
+ WebMouseEvent(unsigned sizeParam = sizeof(WebMouseEvent))
+ : WebInputEvent(sizeParam)
+ , button(ButtonNone)
, x(0)
, y(0)
+ , windowX(0)
+ , windowY(0)
, globalX(0)
, globalY(0)
- , timeStampSeconds(0.0)
, clickCount(0)
{
}
@@ -208,8 +224,9 @@
float wheelTicksY;
bool scrollByPage;
- WebMouseWheelEvent()
- : deltaX(0.0f)
+ WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent))
+ : WebMouseEvent(sizeParam)
+ , deltaX(0.0f)
, deltaY(0.0f)
, wheelTicksX(0.0f)
, wheelTicksY(0.0f)
« no previous file with comments | « third_party/npapi/bindings/npapi_x11.h ('k') | webkit/api/src/gtk/WebInputEventFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698