summaryrefslogtreecommitdiffstats
path: root/ppapi/c/pp_input_event.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/c/pp_input_event.h')
-rw-r--r--ppapi/c/pp_input_event.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ppapi/c/pp_input_event.h b/ppapi/c/pp_input_event.h
index 715c016..7f95e09 100644
--- a/ppapi/c/pp_input_event.h
+++ b/ppapi/c/pp_input_event.h
@@ -14,6 +14,7 @@
*/
#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
@@ -149,6 +150,10 @@ struct PP_InputEvent_Wheel {
PP_Bool scroll_by_page;
};
+/* Ensure the elements of the struct (especially the time_stamp) are aligned on
+ 8-byte boundaries, since some compilers align doubles on 8-byte boundaries
+ for 32-bit x86, and some align on 4-byte boundaries. */
+#pragma pack(push, 8)
struct PP_InputEvent {
/** Identifies the type of the event. */
PP_InputEvent_Type type;
@@ -173,6 +178,10 @@ struct PP_InputEvent {
char padding[64];
} u;
};
+#pragma pack(pop)
+/* TODO(dmichael): Figure out why the input event is not 80 bytes wide on Mac.
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
+ */
/**
* @}