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

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

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 | « native_client_sdk/src/examples/gamepad/gamepad.cc ('k') | ppapi/api/ppb_gamepad.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_Gamepad_Dev</code> interface, which
8 * provides access to gamepad devices.
9 */
10
11 label Chrome {
12 M19 = 0.2
13 };
14
15 /**
16 * The data for one gamepad device.
17 */
18 [assert_size(472)]
19 struct PP_GamepadSampleData_Dev {
20 /**
21 * Number of valid elements in the |axes| array.
22 */
23 uint32_t axes_length;
24
25 /**
26 * Normalized values for the axes, indices valid up to |axes_length|-1. Axis
27 * values range from -1..1, and are in order of "importance".
28 */
29 float_t[16] axes;
30
31 /**
32 * Number of valid elements in the |buttons| array.
33 */
34 uint32_t buttons_length;
35
36 /**
37 * Normalized values for the buttons, indices valid up to |buttons_length|
38 * - 1. Button values range from 0..1, and are in order of importance.
39 */
40 float_t[32] buttons;
41
42 /**
43 * Monotonically increasing value that is incremented when the data have
44 * been updated.
45 */
46 double_t timestamp;
47
48 /**
49 * Identifier for the type of device/manufacturer.
50 */
51 uint16_t[128] id;
52
53 /**
54 * Is there a gamepad connected at this index? If this is false, no other
55 * data in this structure is valid.
56 */
57 PP_Bool connected;
58
59 /* Padding to make the struct the same size between 64 and 32. */
60 char[4] unused_pad_;
61 };
62
63 /**
64 * The data for all gamepads connected to the system.
65 */
66 [assert_size(1896)]
67 struct PP_GamepadsSampleData_Dev {
68 /**
69 * Number of valid elements in the |items| array.
70 */
71 uint32_t length;
72
73 /* Padding to make the struct the same size between 64 and 32. */
74 char[4] unused_pad_;
75
76 /**
77 * Data for an individual gamepad device connected to the system.
78 */
79 PP_GamepadSampleData_Dev[4] items;
80 };
81
82 /**
83 * The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from
84 * gamepad/joystick devices that are connected to the system.
85 */
86 [version=0.2, macro="PPB_GAMEPAD_DEV_INTERFACE"]
87 interface PPB_Gamepad_Dev {
88 /**
89 * Samples the current state of the connected gamepads.
90 */
91 void Sample(
92 [in] PP_Instance instance,
93 [out] PP_GamepadsSampleData_Dev data);
94
95 };
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/gamepad/gamepad.cc ('k') | ppapi/api/ppb_gamepad.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698