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

Unified Diff: src/shared/ppapi_proxy/input_event_data.h

Issue 7395005: Proxy PPB_Input_Event, PPP_Input_Event, and associated IFs. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: copyright headers Created 9 years, 5 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 | « src/shared/ppapi_proxy/build.scons ('k') | src/shared/ppapi_proxy/input_event_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/input_event_data.h
diff --git a/src/shared/ppapi_proxy/input_event_data.h b/src/shared/ppapi_proxy/input_event_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..32396e311d10c161d73752b9686b1709cfa3b726
--- /dev/null
+++ b/src/shared/ppapi_proxy/input_event_data.h
@@ -0,0 +1,45 @@
+// Copyright 2011 The Native Client Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can
+// be found in the LICENSE file.
+
+#ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
+#define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
+
+#include "native_client/src/include/nacl_macros.h"
+#include "native_client/src/third_party/ppapi/c/pp_instance.h"
+#include "native_client/src/third_party/ppapi/c/pp_macros.h"
+#include "native_client/src/third_party/ppapi/c/pp_rect.h"
+#include "native_client/src/third_party/ppapi/c/ppb_input_event.h"
+
+namespace ppapi_proxy {
+
+// The data for a single input event.
+struct InputEventData {
+ InputEventData();
+ ~InputEventData();
+
+ PP_InputEvent_Type event_type;
+ uint32_t event_modifiers;
+ PP_TimeTicks event_time_stamp;
+
+ PP_InputEvent_MouseButton mouse_button;
+ int32_t mouse_click_count;
+ PP_Point mouse_position;
+
+ PP_FloatPoint wheel_delta;
+ PP_FloatPoint wheel_ticks;
+ PP_Bool wheel_scroll_by_page;
+
+ uint32_t key_code;
+};
+// Make sure that the size is consistent across platforms, so the alignment is
+// consistent. Note the fields above are carefully ordered to make sure it is
+// consistent. New fields may require some adjustment to keep a consistent size
+// and alignment. TODO(dmichael): This is only required because we don't pickle
+// the type. As a short-cut, we memcpy it instead. It would be cleaner to
+// pickle this struct.
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(InputEventData, 56);
+
+} // namespace ppapi_proxy
+
+#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
« no previous file with comments | « src/shared/ppapi_proxy/build.scons ('k') | src/shared/ppapi_proxy/input_event_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698