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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
7
8 #include "native_client/src/include/nacl_macros.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_macros.h"
11 #include "ppapi/c/pp_rect.h"
12 #include "ppapi/c/ppb_input_event.h"
13
14 namespace ppapi_proxy {
15
16 // The data for a single input event.
17 struct InputEventData {
18 InputEventData();
19 ~InputEventData();
20
21 PP_InputEvent_Type event_type;
22 uint32_t event_modifiers;
23 PP_TimeTicks event_time_stamp;
24
25 PP_InputEvent_MouseButton mouse_button;
26 int32_t mouse_click_count;
27 PP_Point mouse_position;
28
29 PP_FloatPoint wheel_delta;
30 PP_FloatPoint wheel_ticks;
31 PP_Bool wheel_scroll_by_page;
32
33 uint32_t key_code;
34 };
35 // Make sure that the size is consistent across platforms, so the alignment is
36 // consistent. Note the fields above are carefully ordered to make sure it is
37 // consistent. New fields may require some adjustment to keep a consistent size
38 // and alignment. TODO(dmichael): This is only required because we don't pickle
39 // the type. As a short-cut, we memcpy it instead. It would be cleaner to
40 // pickle this struct.
41 PP_COMPILE_ASSERT_SIZE_IN_BYTES(InputEventData, 56);
42
43 } // namespace ppapi_proxy
44
45 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_INPUT_EVENT_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698