OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 dev/ppb_gamepad_dev.idl modified Mon Jan 9 13:16:43 2012. */ | 6 /* From dev/ppb_gamepad_dev.idl modified Tue Feb 7 12:49:02 2012. */ |
7 | 7 |
8 #ifndef PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ |
9 #define PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ |
10 | 10 |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
14 | 14 |
15 #define PPB_GAMEPAD_DEV_INTERFACE_0_1 "PPB_Gamepad(Dev);0.1" | 15 #define PPB_GAMEPAD_DEV_INTERFACE_0_1 "PPB_Gamepad(Dev);0.1" |
16 #define PPB_GAMEPAD_DEV_INTERFACE PPB_GAMEPAD_DEV_INTERFACE_0_1 | 16 #define PPB_GAMEPAD_DEV_INTERFACE PPB_GAMEPAD_DEV_INTERFACE_0_1 |
17 | 17 |
18 /** | 18 /** |
19 * @file | 19 * @file |
20 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which | 20 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which |
21 * provides access to gamepad devices. | 21 * provides access to gamepad devices. |
22 */ | 22 */ |
23 | 23 |
24 | 24 |
| 25 #pragma pack(push, 1) |
| 26 |
25 /** | 27 /** |
26 * @addtogroup Structs | 28 * @addtogroup Structs |
27 * @{ | 29 * @{ |
28 */ | 30 */ |
29 /** | 31 /** |
30 * The data for one gamepad device. | 32 * The data for one gamepad device. |
31 */ | 33 */ |
32 struct PP_GamepadData_Dev { | 34 struct PP_GamepadData_Dev { |
33 /** | 35 /** |
34 * Is there a gamepad connected at this index? If this is false, no other | 36 * Is there a gamepad connected at this index? If this is false, no other |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 uint32_t length; | 76 uint32_t length; |
75 /** | 77 /** |
76 * Data for an individual gamepad device connected to the system. | 78 * Data for an individual gamepad device connected to the system. |
77 */ | 79 */ |
78 struct PP_GamepadData_Dev items[4]; | 80 struct PP_GamepadData_Dev items[4]; |
79 }; | 81 }; |
80 /** | 82 /** |
81 * @} | 83 * @} |
82 */ | 84 */ |
83 | 85 |
| 86 #pragma pack(pop) |
| 87 |
84 /** | 88 /** |
85 * @addtogroup Interfaces | 89 * @addtogroup Interfaces |
86 * @{ | 90 * @{ |
87 */ | 91 */ |
88 /** | 92 /** |
89 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from | 93 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from |
90 * gamepad/joystick devices that are connected to the system. | 94 * gamepad/joystick devices that are connected to the system. |
91 */ | 95 */ |
92 struct PPB_Gamepad_Dev_0_1 { | 96 struct PPB_Gamepad_Dev_0_1 { |
93 /** | 97 /** |
94 * Samples the current state of the connected gamepads. | 98 * Samples the current state of the connected gamepads. |
95 */ | 99 */ |
96 void (*SampleGamepads)(PP_Instance instance, | 100 void (*SampleGamepads)(PP_Instance instance, |
97 struct PP_GamepadsData_Dev* data); | 101 struct PP_GamepadsData_Dev* data); |
98 }; | 102 }; |
99 | 103 |
100 typedef struct PPB_Gamepad_Dev_0_1 PPB_Gamepad_Dev; | 104 typedef struct PPB_Gamepad_Dev_0_1 PPB_Gamepad_Dev; |
101 /** | 105 /** |
102 * @} | 106 * @} |
103 */ | 107 */ |
104 | 108 |
105 #endif /* PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ */ | 109 #endif /* PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ */ |
106 | 110 |
OLD | NEW |