summaryrefslogtreecommitdiffstats
path: root/ppapi/c/pp_input_event.h
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 16:36:02 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 16:36:02 +0000
commitd153c80959407a591a08a9deb1878295176fcb04 (patch)
treeb1ff32af2d2b7e4cc46e84d69bd39f6d65705807 /ppapi/c/pp_input_event.h
parent88a14fa437caa6df64fece3df39c8ec8bde31f84 (diff)
downloadchromium_src-d153c80959407a591a08a9deb1878295176fcb04.zip
chromium_src-d153c80959407a591a08a9deb1878295176fcb04.tar.gz
chromium_src-d153c80959407a591a08a9deb1878295176fcb04.tar.bz2
Revert 93202 - Remove HandleInputEvent from PPP_Instance and freeze to 1.0.
Note I'm leaving in temporary backwards-compatibility. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2035 TEST=ppapi tests Review URL: http://codereview.chromium.org/7452002 TBR=dmichael@chromium.org Review URL: http://codereview.chromium.org/7467002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/pp_input_event.h')
-rw-r--r--ppapi/c/pp_input_event.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/ppapi/c/pp_input_event.h b/ppapi/c/pp_input_event.h
index c3defc9..0c7854c 100644
--- a/ppapi/c/pp_input_event.h
+++ b/ppapi/c/pp_input_event.h
@@ -192,6 +192,44 @@ struct PP_InputEvent_Wheel {
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24);
/**
+ * The PP_InputEventData union represents all input event data types.
+ */
+union PP_InputEventData {
+ struct PP_InputEvent_Key key;
+ struct PP_InputEvent_Character character;
+ struct PP_InputEvent_Mouse mouse;
+ struct PP_InputEvent_Wheel wheel;
+ /**
+ * This value allows new events to be added without changing the size of
+ * this struct.
+ */
+ char padding[64];
+};
+
+/**
+ * The PP_InputEvent struct represents all input events.
+ */
+struct PP_InputEvent {
+ /** This value represents the type of the event. */
+ PP_InputEvent_Type type;
+ /** This value ensure the time_stamp is aligned on an 8-byte boundary
+ * relative to the start of the struct. Some compilers align doubles
+ * on 8-byte boundaries for 32-bit x86, and some align on 4-byte boundaries.
+ */
+ int32_t padding;
+ /**
+ * This value represents the time that this event was generated. This value
+ * is not relative to any particular epoch; the most you can do is compare
+ * time stamps.
+ */
+ PP_TimeTicks time_stamp;
+ /**
+ * This value represents the event type and its specific data.
+ */
+ union PP_InputEventData u;
+};
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
+/**
* @}
*/