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

Side by Side Diff: native_client_sdk/src/libraries/ppapi_main/ppapi_event.h

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright Created 7 years, 6 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 (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 #ifndef PPAPI_MAIN_PPAPI_EVENT_H_
7 #define PPAPI_MAIN_PPAPI_EVENT_H_
8
9 #include "ppapi/c/pp_input_event.h"
10 #include "ppapi/c/pp_point.h"
11 #include "ppapi/c/pp_touch_point.h"
12 #include "ppapi/c/ppb_input_event.h"
13
14 #include "utils/macros.h"
15
16 EXTERN_C_BEGIN
17
18 /*
19 * Event Structures
20 *
21 * The following event structures are based on the equivalent structs
22 * defined in ppapi/c/ppb_input_event.h.
23 *
24 */
25
26 // Generic Event
27 typedef struct {
28 PP_InputEvent_Type event_type;
29 PP_TimeTicks time_ticks;
30 uint32_t modifiers;
31 } PPAPIEvent;
32
33
34 // Key Code Up/Down
35 typedef struct {
36 PPAPIEvent event;
37
38 uint32_t key_code;
39 } PPAPIKeyEvent;
40
41
42 // Cooked Character Event
43 typedef struct {
44 PPAPIEvent event;
45
46 char text[5];
47 } PPAPICharEvent;
48
49
50 // Mouse Event
51 typedef struct {
52 PPAPIEvent event;
53
54 PP_InputEvent_MouseButton button;
55 struct PP_Point location;
56 struct PP_Point delta;
57 } PPAPIMouseEvent;
58
59
60 // Wheel Event
61 typedef struct {
62 PPAPIEvent event;
63
64 PP_InputEvent_MouseButton button;
65 struct PP_FloatPoint delta;
66 uint32_t by_page;
67 } PPAPIWheelEvent;
68
69
70 // Touch Event
71 #define MAX_TOUCH_POINTS 4
72 typedef struct {
73 PPAPIEvent event;
74
75 uint32_t point_count;
76 struct PP_TouchPoint points[MAX_TOUCH_POINTS];
77 } PPAPITouchEvent;
78
79 EXTERN_C_END
80
81 #endif // PPAPI_MAIN_PPAPI_EVENT_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_main/library.dsc ('k') | native_client_sdk/src/libraries/ppapi_main/ppapi_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698