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

Unified Diff: ppapi/api/dev/ppb_gamepad_dev.idl

Issue 9405033: Revise gamepad interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/examples/gamepad/gamepad.cc ('k') | ppapi/c/dev/ppb_gamepad_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/dev/ppb_gamepad_dev.idl
diff --git a/ppapi/api/dev/ppb_gamepad_dev.idl b/ppapi/api/dev/ppb_gamepad_dev.idl
index 8e6a4a9263b85f362f43b406e37a297c183abdc2..a9b5918aaec9f72c94c3cac8ce70e306e5f80853 100644
--- a/ppapi/api/dev/ppb_gamepad_dev.idl
+++ b/ppapi/api/dev/ppb_gamepad_dev.idl
@@ -9,87 +9,87 @@
*/
label Chrome {
- M18 = 0.1
+ M19 = 0.2
noelallen_use_chromium 2012/02/29 23:09:16 You should be reving the interface, not deleting t
};
-#inline c
-#pragma pack(push, 1)
-#endinl
-
/**
* The data for one gamepad device.
*/
-struct PP_GamepadData_Dev {
+[assert_size(472)]
+struct PP_GamepadSampleData_Dev {
/**
- * Is there a gamepad connected at this index? If this is false, no other
- * data in this structure is valid.
+ * Number of valid elements in the |axes| array.
*/
- char connected;
+ uint32_t axes_length;
/**
- * String identifier for the type of device/manufacturer.
+ * Normalized values for the axes, indices valid up to |axes_length|-1. Axis
+ * values range from -1..1, and are in order of "importance".
*/
- uint16_t[128] id;
+ float_t[16] axes;
/**
- * Monotonically increasing value that is incremented when the data have
- * been updated.
+ * Number of valid elements in the |buttons| array.
*/
- uint64_t timestamp;
+ uint32_t buttons_length;
/**
- * Number of valid elements in the |axes| array.
+ * Normalized values for the buttons, indices valid up to |buttons_length|
+ * - 1. Button values range from 0..1, and are in order of importance.
*/
- uint32_t axes_length;
+ float_t[32] buttons;
/**
- * Normalized values for the axes, indices valid up to |axesLength|-1. Axis
- * values range from -1..1, and are in order of "importance".
+ * Monotonically increasing value that is incremented when the data have
+ * been updated.
*/
- float_t[16] axes;
+ double_t timestamp;
/**
- * Number of valid elements in the |buttons| array.
+ * Identifier for the type of device/manufacturer.
*/
- uint32_t buttons_length;
+ uint16_t[128] id;
/**
- * Normalized values for the buttons, indices valid up to |buttonsLength|
- * - 1. Button values range from 0..1, and are in order of importance.
+ * Is there a gamepad connected at this index? If this is false, no other
+ * data in this structure is valid.
*/
- float_t[32] buttons;
+ PP_Bool connected;
+
+ /* Padding to make the struct the same size between 64 and 32. */
+ char[4] unused_pad_;
};
/**
* The data for all gamepads connected to the system.
*/
-struct PP_GamepadsData_Dev {
+[assert_size(1896)]
+struct PP_GamepadsSampleData_Dev {
/**
* Number of valid elements in the |items| array.
*/
uint32_t length;
+ /* Padding to make the struct the same size between 64 and 32. */
+ char[4] unused_pad_;
+
/**
* Data for an individual gamepad device connected to the system.
*/
- PP_GamepadData_Dev[4] items;
+ PP_GamepadSampleData_Dev[4] items;
};
-#inline c
-#pragma pack(pop)
-#endinl
-
/**
* The <code>PPB_Gamepad_Dev</code> interface allows retrieving data from
* gamepad/joystick devices that are connected to the system.
*/
-[version=0.1, macro="PPB_GAMEPAD_DEV_INTERFACE"]
+[version=0.2, macro="PPB_GAMEPAD_DEV_INTERFACE"]
noelallen_use_chromium 2012/02/29 23:09:16 This interface started it's existance at 0.1. it
interface PPB_Gamepad_Dev {
/**
* Samples the current state of the connected gamepads.
*/
- void SampleGamepads(
noelallen_use_chromium 2012/02/29 23:09:16 Keep this but add: [deprecate=0.2] void SampleGame
+ void Sample(
[in] PP_Instance instance,
- [out] PP_GamepadsData_Dev data);
+ [out] PP_GamepadsSampleData_Dev data);
};
« no previous file with comments | « native_client_sdk/src/examples/gamepad/gamepad.cc ('k') | ppapi/c/dev/ppb_gamepad_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698