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

Side by Side Diff: ppapi/c/ppb_gamepad.h

Issue 9566022: Rename NaCl/pepper gamepad interface from _dev to stable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/ppb_gamepad_dev.h ('k') | ppapi/examples/gamepad/gamepad.cc » ('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 Feb 27 13:23:13 2012. */ 6 /* From ppb_gamepad.idl modified Thu Mar 1 11:41:21 2012. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ 8 #ifndef PPAPI_C_PPB_GAMEPAD_H_
9 #define PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ 9 #define PPAPI_C_PPB_GAMEPAD_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 15
16 #define PPB_GAMEPAD_DEV_INTERFACE_0_2 "PPB_Gamepad(Dev);0.2" 16 #define PPB_GAMEPAD_INTERFACE_1_0 "PPB_Gamepad;1.0"
17 #define PPB_GAMEPAD_DEV_INTERFACE PPB_GAMEPAD_DEV_INTERFACE_0_2 17 #define PPB_GAMEPAD_INTERFACE PPB_GAMEPAD_INTERFACE_1_0
18 18
19 /** 19 /**
20 * @file 20 * @file
21 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which 21 * This file defines the <code>PPB_Gamepad</code> interface, which
22 * provides access to gamepad devices. 22 * provides access to gamepad devices.
23 */ 23 */
24 24
25 25
26 /** 26 /**
27 * @addtogroup Structs 27 * @addtogroup Structs
28 * @{ 28 * @{
29 */ 29 */
30 /** 30 /**
31 * The data for one gamepad device. 31 * The data for one gamepad device.
32 */ 32 */
33 struct PP_GamepadSampleData_Dev { 33 struct PP_GamepadSampleData {
34 /** 34 /**
35 * Number of valid elements in the |axes| array. 35 * Number of valid elements in the |axes| array.
36 */ 36 */
37 uint32_t axes_length; 37 uint32_t axes_length;
38 /** 38 /**
39 * Normalized values for the axes, indices valid up to |axes_length|-1. Axis 39 * Normalized values for the axes, indices valid up to |axes_length|-1. Axis
40 * values range from -1..1, and are in order of "importance". 40 * values range from -1..1, and are in order of "importance".
41 */ 41 */
42 float axes[16]; 42 float axes[16];
43 /** 43 /**
(...skipping 15 matching lines...) Expand all
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 char unused_pad_[4];
68 }; 68 };
69 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadSampleData_Dev, 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_Dev { 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 char 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_Dev items[4]; 84 struct PP_GamepadSampleData items[4];
85 }; 85 };
86 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData_Dev, 1896); 86 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_GamepadsSampleData, 1896);
87 /** 87 /**
88 * @} 88 * @}
89 */ 89 */
90 90
91 /** 91 /**
92 * @addtogroup Interfaces 92 * @addtogroup Interfaces
93 * @{ 93 * @{
94 */ 94 */
95 /** 95 /**
96 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from 96 * The <code>PPB_Gamepad</code> interface allows retrieving data from
97 * gamepad/joystick devices that are connected to the system. 97 * gamepad/joystick devices that are connected to the system.
98 */ 98 */
99 struct PPB_Gamepad_Dev_0_2 { 99 struct PPB_Gamepad_1_0 {
100 /** 100 /**
101 * Samples the current state of the connected gamepads. 101 * Samples the current state of the connected gamepads.
102 */ 102 */
103 void (*Sample)(PP_Instance instance, struct PP_GamepadsSampleData_Dev* data); 103 void (*Sample)(PP_Instance instance, struct PP_GamepadsSampleData* data);
104 }; 104 };
105 105
106 typedef struct PPB_Gamepad_Dev_0_2 PPB_Gamepad_Dev; 106 typedef struct PPB_Gamepad_1_0 PPB_Gamepad;
107 /** 107 /**
108 * @} 108 * @}
109 */ 109 */
110 110
111 #endif /* PPAPI_C_DEV_PPB_GAMEPAD_DEV_H_ */ 111 #endif /* PPAPI_C_PPB_GAMEPAD_H_ */
112 112
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_gamepad_dev.h ('k') | ppapi/examples/gamepad/gamepad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698