Chromium Code Reviews| Index: third_party/wayland-protocols/unstable/gamepads/gamepads-unstable-v1.xml |
| diff --git a/third_party/wayland-protocols/unstable/gamepads/gamepads-unstable-v1.xml b/third_party/wayland-protocols/unstable/gamepads/gamepads-unstable-v1.xml |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..454367b4519665fec8218065c99177f22a09caf6 |
| --- /dev/null |
| +++ b/third_party/wayland-protocols/unstable/gamepads/gamepads-unstable-v1.xml |
| @@ -0,0 +1,103 @@ |
| +<?xml version="1.0" encoding="UTF-8"?> |
| +<protocol name="gamepads_unstable_v1"> |
| + |
| + <copyright> |
| + Copyright 2016 The Chromium Authors. |
| + |
| + Permission is hereby granted, free of charge, to any person obtaining a |
| + copy of this software and associated documentation files (the "Software"), |
| + to deal in the Software without restriction, including without limitation |
| + the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| + and/or sell copies of the Software, and to permit persons to whom the |
| + Software is furnished to do so, subject to the following conditions: |
| + |
| + The above copyright notice and this permission notice (including the next |
| + paragraph) shall be included in all copies or substantial portions of the |
| + Software. |
| + |
| + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| + DEALINGS IN THE SOFTWARE. |
| + </copyright> |
| + |
| + <interface name="zwp_gamepads_v1" version="1"> |
|
reveman
2016/06/23 21:34:20
is this a global? it would be nice if this was con
denniskempin
2016/06/28 20:15:33
Done.
|
| + <description summary="gamepad support"> |
| + A global interface to notify the client of any gamepads connected to the |
| + server. |
| + All gamepads axes and buttons follow the W3C definition of a |
| + 'Standard Gamepad' as specified in: https://w3c.github.io/gamepad/#remapping |
| + </description> |
| + |
| + <event name="connected"> |
| + <description summary="A new gamepad connected"> |
| + Every gamepad gets an assigned an incrementing id, starting with 0. |
| + This event is called before any other event for the gamepad will be |
| + sent. |
| + </description> |
| + <arg name="id" type="int" summary="id of the gamepad"/> |
| + </event> |
| + |
| + <event name="disconnected"> |
| + <description summary="A gamepad disconnected"> |
| + Called after a gamepad is disconnected, no further events for this |
| + gamepad shall be sent by the server. |
| + </description> |
| + <arg name="id" type="int" summary="id of the gamepad"/> |
| + </event> |
| + |
| + <event name="axis"> |
| + <description summary="Gamepad analog axis changed"> |
| + Sent when a gamepad axis changed. Follows the W3C specification of |
| + gamepad axes, which has 2 analog sticks resulting in 4 axes, which |
| + are identified by the axis argument. |
| + |
| + The value is normalized and calibrated, with 0 in the resting state, |
| + -1 at the left/top corner of the stick and 1 at the right/bottom corner. |
| + |
| + This event should not cause any changes to the client until the |
| + frame event is received. |
| + </description> |
| + <arg name="id" type="int" summary="id of the gamepad"/> |
| + <arg name="axis" type="int" summary="id of axis"/> |
| + <arg name="value" type="fixed" summary="new value of axis"/> |
| + </event> |
| + |
| + <event name="button"> |
| + <description summary="Gamepad button changed"> |
| + Sent when a gamepad button state changed. Follows the W3C specification |
| + of gamepad buttons, which has 17 possible buttons. |
| + |
| + All buttons have a boolean state and an analog value. The analog value |
| + is normalized from 0 (not pressed) to 1 (fully pressed), if a button |
| + does not support an analog value, the value will be derived from the |
| + boolean state. |
| + |
| + This event should not cause any changes to the client until the |
| + frame event is received. |
| + </description> |
| + <arg name="id" type="int" summary="id of the gamepad"/> |
| + <arg name="button" type="int" summary="id of button"/> |
| + <arg name="pressed" type="int" summary="boolean state of the button"/> |
| + <arg name="value" type="fixed" summary="new analog value of button"/> |
| + </event> |
| + |
| + <event name="frame"> |
| + <description summary="Notifies end of a series of gamepad changes."> |
| + Sent after a series of axis and button events that logically belong |
| + together. |
| + </description> |
| + <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> |
| + </event> |
| + |
| + <request name="destroy" type="destructor"> |
| + <description summary="destroy gamepads object"> |
| + </description> |
| + </request> |
| + </interface> |
| + |
| + |
|
reveman
2016/06/23 21:34:19
nit: kill blank line
denniskempin
2016/06/28 20:15:33
Done.
|
| +</protocol> |