OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ | 5 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ |
6 #define PPAPI_C_PP_INPUT_EVENT_H_ | 6 #define PPAPI_C_PP_INPUT_EVENT_H_ |
7 | 7 |
8 /** | 8 /** |
9 * @file | 9 * @file |
10 * Defines the API ... | 10 * Defines the API ... |
11 * | 11 * |
12 * @addtogroup PP | 12 * @addtogroup PP |
13 * @{ | 13 * @{ |
14 */ | 14 */ |
15 | 15 |
| 16 #include "ppapi/c/pp_bool.h" |
16 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
17 #include "ppapi/c/pp_time.h" | 18 #include "ppapi/c/pp_time.h" |
18 | 19 |
19 typedef enum { | 20 typedef enum { |
20 PP_INPUTEVENT_MOUSEBUTTON_NONE = -1, | 21 PP_INPUTEVENT_MOUSEBUTTON_NONE = -1, |
21 PP_INPUTEVENT_MOUSEBUTTON_LEFT = 0, | 22 PP_INPUTEVENT_MOUSEBUTTON_LEFT = 0, |
22 PP_INPUTEVENT_MOUSEBUTTON_MIDDLE = 1, | 23 PP_INPUTEVENT_MOUSEBUTTON_MIDDLE = 1, |
23 PP_INPUTEVENT_MOUSEBUTTON_RIGHT = 2 | 24 PP_INPUTEVENT_MOUSEBUTTON_RIGHT = 2 |
24 } PP_InputEvent_MouseButton; | 25 } PP_InputEvent_MouseButton; |
25 | 26 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 139 |
139 struct PP_InputEvent_Wheel { | 140 struct PP_InputEvent_Wheel { |
140 /** A combination of the EVENT_MODIFIER flags. */ | 141 /** A combination of the EVENT_MODIFIER flags. */ |
141 uint32_t modifier; | 142 uint32_t modifier; |
142 | 143 |
143 float delta_x; | 144 float delta_x; |
144 float delta_y; | 145 float delta_y; |
145 float wheel_ticks_x; | 146 float wheel_ticks_x; |
146 float wheel_ticks_y; | 147 float wheel_ticks_y; |
147 | 148 |
148 bool scroll_by_page; | 149 PP_Bool scroll_by_page; |
149 }; | 150 }; |
150 | 151 |
151 struct PP_InputEvent { | 152 struct PP_InputEvent { |
152 /** Identifies the type of the event. */ | 153 /** Identifies the type of the event. */ |
153 PP_InputEvent_Type type; | 154 PP_InputEvent_Type type; |
154 | 155 |
155 /** | 156 /** |
156 * When this event was generated. This is not relative to any particular | 157 * When this event was generated. This is not relative to any particular |
157 * epoch, the most you can do is compare time stamps. | 158 * epoch, the most you can do is compare time stamps. |
158 */ | 159 */ |
(...skipping 13 matching lines...) Expand all Loading... |
172 char padding[64]; | 173 char padding[64]; |
173 } u; | 174 } u; |
174 }; | 175 }; |
175 | 176 |
176 /** | 177 /** |
177 * @} | 178 * @} |
178 * End of addtogroup PP | 179 * End of addtogroup PP |
179 */ | 180 */ |
180 | 181 |
181 #endif // PPAPI_C_PP_INPUT_EVENT_H_ | 182 #endif // PPAPI_C_PP_INPUT_EVENT_H_ |
OLD | NEW |