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

Side by Side Diff: ppapi/api/dev/ppb_gamepad_dev.idl

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 | « no previous file | ppapi/c/dev/ppb_gamepad_dev.h » ('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 /** 6 /**
7 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which 7 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which
8 * provides access to gamepad devices. 8 * provides access to gamepad devices.
9 */ 9 */
10 10
11 label Chrome { 11 label Chrome {
12 M18 = 0.1 12 M18 = 0.1
13 }; 13 };
14 14
15 #inline c
16 #pragma pack(push, 1)
17 #endinl
18
15 /** 19 /**
16 * The data for one gamepad device. 20 * The data for one gamepad device.
17 */ 21 */
18 struct PP_GamepadData_Dev { 22 struct PP_GamepadData_Dev {
19 /** 23 /**
20 * Is there a gamepad connected at this index? If this is false, no other 24 * Is there a gamepad connected at this index? If this is false, no other
21 * data in this structure is valid. 25 * data in this structure is valid.
22 */ 26 */
23 char connected; 27 char connected;
24 28
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * Number of valid elements in the |items| array. 68 * Number of valid elements in the |items| array.
65 */ 69 */
66 uint32_t length; 70 uint32_t length;
67 71
68 /** 72 /**
69 * Data for an individual gamepad device connected to the system. 73 * Data for an individual gamepad device connected to the system.
70 */ 74 */
71 PP_GamepadData_Dev[4] items; 75 PP_GamepadData_Dev[4] items;
72 }; 76 };
73 77
78 #inline c
79 #pragma pack(pop)
80 #endinl
81
74 /** 82 /**
75 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from 83 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from
76 * gamepad/joystick devices that are connected to the system. 84 * gamepad/joystick devices that are connected to the system.
77 */ 85 */
78 [version=0.1, macro="PPB_GAMEPAD_DEV_INTERFACE"] 86 [version=0.1, macro="PPB_GAMEPAD_DEV_INTERFACE"]
79 interface PPB_Gamepad_Dev { 87 interface PPB_Gamepad_Dev {
80 /** 88 /**
81 * Samples the current state of the connected gamepads. 89 * Samples the current state of the connected gamepads.
82 */ 90 */
83 void SampleGamepads( 91 void SampleGamepads(
84 [in] PP_Instance instance, 92 [in] PP_Instance instance,
85 [out] PP_GamepadsData_Dev data); 93 [out] PP_GamepadsData_Dev data);
86 94
87 }; 95 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_gamepad_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698