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 ppb_gamepad.idl modified Tue Apr 16 09:04:34 2013. */ | 6 /* From ppb_gamepad.idl modified Tue Apr 16 09:04:34 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_GAMEPAD_H_ | 8 #ifndef PPAPI_C_PPB_GAMEPAD_H_ |
9 #define PPAPI_C_PPB_GAMEPAD_H_ | 9 #define PPAPI_C_PPB_GAMEPAD_H_ |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 /** | 57 /** |
58 * Identifier for the type of device/manufacturer. | 58 * Identifier for the type of device/manufacturer. |
59 */ | 59 */ |
60 uint16_t id[128]; | 60 uint16_t id[128]; |
61 /** | 61 /** |
62 * Is there a gamepad connected at this index? If this is false, no other | 62 * Is there a gamepad connected at this index? If this is false, no other |
63 * data in this structure is valid. | 63 * data in this structure is valid. |
64 */ | 64 */ |
65 PP_Bool connected; | 65 PP_Bool connected; |
66 /* Padding to make the struct the same size between 64 and 32. */ | 66 /* Padding to make the struct the same size between 64 and 32. */ |
67 char unused_pad_[4]; | 67 int8_t unused_pad_[4]; |
68 }; | 68 }; |
69 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData, 472); | 69 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData, 472); |
70 | 70 |
71 /** | 71 /** |
72 * The data for all gamepads connected to the system. | 72 * The data for all gamepads connected to the system. |
73 */ | 73 */ |
74 struct PP_GamepadsSampleData { | 74 struct PP_GamepadsSampleData { |
75 /** | 75 /** |
76 * Number of valid elements in the |items| array. | 76 * Number of valid elements in the |items| array. |
77 */ | 77 */ |
78 uint32_t length; | 78 uint32_t length; |
79 /* Padding to make the struct the same size between 64 and 32. */ | 79 /* Padding to make the struct the same size between 64 and 32. */ |
80 char unused_pad_[4]; | 80 int8_t unused_pad_[4]; |
81 /** | 81 /** |
82 * Data for an individual gamepad device connected to the system. | 82 * Data for an individual gamepad device connected to the system. |
83 */ | 83 */ |
84 struct PP_GamepadSampleData items[4]; | 84 struct PP_GamepadSampleData items[4]; |
85 }; | 85 }; |
86 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData, 1896); | 86 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData, 1896); |
87 /** | 87 /** |
88 * @} | 88 * @} |
89 */ | 89 */ |
90 | 90 |
(...skipping 12 matching lines...) Expand all Loading... |
103 void (*Sample)(PP_Instance instance, struct PP_GamepadsSampleData* data); | 103 void (*Sample)(PP_Instance instance, struct PP_GamepadsSampleData* data); |
104 }; | 104 }; |
105 | 105 |
106 typedef struct PPB_Gamepad_1_0 PPB_Gamepad; | 106 typedef struct PPB_Gamepad_1_0 PPB_Gamepad; |
107 /** | 107 /** |
108 * @} | 108 * @} |
109 */ | 109 */ |
110 | 110 |
111 #endif /* PPAPI_C_PPB_GAMEPAD_H_ */ | 111 #endif /* PPAPI_C_PPB_GAMEPAD_H_ */ |
112 | 112 |
OLD | NEW |