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

Side by Side Diff: ppapi/c/dev/ppb_gamepad_dev.h

Issue 9348029: Make inline c blocks non-greedy, and use to add pragma pack to gamepad structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: temporarily disable static assert for 2 sided roll Created 8 years, 10 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
« no previous file with comments | « ppapi/api/dev/ppb_gamepad_dev.idl ('k') | ppapi/generators/idl_lexer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_gamepad_dev.idl ('k') | ppapi/generators/idl_lexer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698