| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 | 5 |
| 6 /* From pp_input_event.idl modified Sat Jul 16 16:50:26 2011. */ | 6 /* From pp_input_event.idl modified Sat Jul 16 16:50:26 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ |
| 9 #define PPAPI_C_PP_INPUT_EVENT_H_ | 9 #define PPAPI_C_PP_INPUT_EVENT_H_ |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 /** | 185 /** |
| 186 * Indicates if the scroll <code>delta_x</code>/<code>delta_y</code> | 186 * Indicates if the scroll <code>delta_x</code>/<code>delta_y</code> |
| 187 * indicates pages or lines to scroll by. When true, the user is requesting | 187 * indicates pages or lines to scroll by. When true, the user is requesting |
| 188 * to scroll by pages. | 188 * to scroll by pages. |
| 189 */ | 189 */ |
| 190 PP_Bool scroll_by_page; | 190 PP_Bool scroll_by_page; |
| 191 }; | 191 }; |
| 192 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); | 192 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); |
| 193 | 193 |
| 194 /** | 194 /** |
| 195 * The PP_InputEventData union represents all input event data types. | |
| 196 */ | |
| 197 union PP_InputEventData { | |
| 198 struct PP_InputEvent_Key key; | |
| 199 struct PP_InputEvent_Character character; | |
| 200 struct PP_InputEvent_Mouse mouse; | |
| 201 struct PP_InputEvent_Wheel wheel; | |
| 202 /** | |
| 203 * This value allows new events to be added without changing the size of | |
| 204 * this struct. | |
| 205 */ | |
| 206 char padding[64]; | |
| 207 }; | |
| 208 | |
| 209 /** | |
| 210 * The PP_InputEvent struct represents all input events. | |
| 211 */ | |
| 212 struct PP_InputEvent { | |
| 213 /** This value represents the type of the event. */ | |
| 214 PP_InputEvent_Type type; | |
| 215 /** This value ensure the time_stamp is aligned on an 8-byte boundary | |
| 216 * relative to the start of the struct. Some compilers align doubles | |
| 217 * on 8-byte boundaries for 32-bit x86, and some align on 4-byte boundaries. | |
| 218 */ | |
| 219 int32_t padding; | |
| 220 /** | |
| 221 * This value represents the time that this event was generated. This value | |
| 222 * is not relative to any particular epoch; the most you can do is compare | |
| 223 * time stamps. | |
| 224 */ | |
| 225 PP_TimeTicks time_stamp; | |
| 226 /** | |
| 227 * This value represents the event type and its specific data. | |
| 228 */ | |
| 229 union PP_InputEventData u; | |
| 230 }; | |
| 231 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80); | |
| 232 /** | |
| 233 * @} | 195 * @} |
| 234 */ | 196 */ |
| 235 | 197 |
| 236 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ | 198 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ |
| 237 | 199 |
| OLD | NEW |