OLD | NEW |
---|---|
(Empty) | |
1 <?xml version="1.0" encoding="UTF-8"?> | |
2 <protocol name="gamepads_unstable_v1"> | |
3 | |
4 <copyright> | |
5 Copyright 2016 The Chromium Authors. | |
6 | |
7 Permission is hereby granted, free of charge, to any person obtaining a | |
8 copy of this software and associated documentation files (the "Software"), | |
9 to deal in the Software without restriction, including without limitation | |
10 the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
11 and/or sell copies of the Software, and to permit persons to whom the | |
12 Software is furnished to do so, subject to the following conditions: | |
13 | |
14 The above copyright notice and this permission notice (including the next | |
15 paragraph) shall be included in all copies or substantial portions of the | |
16 Software. | |
17 | |
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
24 DEALINGS IN THE SOFTWARE. | |
25 </copyright> | |
26 | |
27 <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.
| |
28 <description summary="gamepad support"> | |
29 A global interface to notify the client of any gamepads connected to the | |
30 server. | |
31 All gamepads axes and buttons follow the W3C definition of a | |
32 'Standard Gamepad' as specified in: https://w3c.github.io/gamepad/#remappi ng | |
33 </description> | |
34 | |
35 <event name="connected"> | |
36 <description summary="A new gamepad connected"> | |
37 Every gamepad gets an assigned an incrementing id, starting with 0. | |
38 This event is called before any other event for the gamepad will be | |
39 sent. | |
40 </description> | |
41 <arg name="id" type="int" summary="id of the gamepad"/> | |
42 </event> | |
43 | |
44 <event name="disconnected"> | |
45 <description summary="A gamepad disconnected"> | |
46 Called after a gamepad is disconnected, no further events for this | |
47 gamepad shall be sent by the server. | |
48 </description> | |
49 <arg name="id" type="int" summary="id of the gamepad"/> | |
50 </event> | |
51 | |
52 <event name="axis"> | |
53 <description summary="Gamepad analog axis changed"> | |
54 Sent when a gamepad axis changed. Follows the W3C specification of | |
55 gamepad axes, which has 2 analog sticks resulting in 4 axes, which | |
56 are identified by the axis argument. | |
57 | |
58 The value is normalized and calibrated, with 0 in the resting state, | |
59 -1 at the left/top corner of the stick and 1 at the right/bottom corner. | |
60 | |
61 This event should not cause any changes to the client until the | |
62 frame event is received. | |
63 </description> | |
64 <arg name="id" type="int" summary="id of the gamepad"/> | |
65 <arg name="axis" type="int" summary="id of axis"/> | |
66 <arg name="value" type="fixed" summary="new value of axis"/> | |
67 </event> | |
68 | |
69 <event name="button"> | |
70 <description summary="Gamepad button changed"> | |
71 Sent when a gamepad button state changed. Follows the W3C specification | |
72 of gamepad buttons, which has 17 possible buttons. | |
73 | |
74 All buttons have a boolean state and an analog value. The analog value | |
75 is normalized from 0 (not pressed) to 1 (fully pressed), if a button | |
76 does not support an analog value, the value will be derived from the | |
77 boolean state. | |
78 | |
79 This event should not cause any changes to the client until the | |
80 frame event is received. | |
81 </description> | |
82 <arg name="id" type="int" summary="id of the gamepad"/> | |
83 <arg name="button" type="int" summary="id of button"/> | |
84 <arg name="pressed" type="int" summary="boolean state of the button"/> | |
85 <arg name="value" type="fixed" summary="new analog value of button"/> | |
86 </event> | |
87 | |
88 <event name="frame"> | |
89 <description summary="Notifies end of a series of gamepad changes."> | |
90 Sent after a series of axis and button events that logically belong | |
91 together. | |
92 </description> | |
93 <arg name="time" type="uint" summary="timestamp with millisecond granulari ty"/> | |
94 </event> | |
95 | |
96 <request name="destroy" type="destructor"> | |
97 <description summary="destroy gamepads object"> | |
98 </description> | |
99 </request> | |
100 </interface> | |
101 | |
102 | |
reveman
2016/06/23 21:34:19
nit: kill blank line
denniskempin
2016/06/28 20:15:33
Done.
| |
103 </protocol> | |
OLD | NEW |