OLD | NEW |
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 <protocol name="gaming_input_unstable_v1"> | 2 <protocol name="gaming_input_unstable_v1"> |
3 | 3 |
4 <copyright> | 4 <copyright> |
5 Copyright 2016 The Chromium Authors. | 5 Copyright 2016 The Chromium Authors. |
6 | 6 |
7 Permission is hereby granted, free of charge, to any person obtaining a | 7 Permission is hereby granted, free of charge, to any person obtaining a |
8 copy of this software and associated documentation files (the "Software"), | 8 copy of this software and associated documentation files (the "Software"), |
9 to deal in the Software without restriction, including without limitation | 9 to deal in the Software without restriction, including without limitation |
10 the rights to use, copy, modify, merge, publish, distribute, sublicense, | 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 | 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: | 12 Software is furnished to do so, subject to the following conditions: |
13 | 13 |
14 The above copyright notice and this permission notice (including the next | 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 | 15 paragraph) shall be included in all copies or substantial portions of the |
16 Software. | 16 Software. |
17 | 17 |
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 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, | 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 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 | 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 | 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 | 23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
24 DEALINGS IN THE SOFTWARE. | 24 DEALINGS IN THE SOFTWARE. |
25 </copyright> | 25 </copyright> |
26 | 26 |
27 <interface name="zwp_gaming_input_v1" version="1"> | 27 <interface name="zcr_gaming_input_v1" version="1"> |
28 <description summary="extends wl_seat with gaming input devices"> | 28 <description summary="extends wl_seat with gaming input devices"> |
29 A global interface to provide gaming input devices for a given seat. | 29 A global interface to provide gaming input devices for a given seat. |
30 | 30 |
31 Currently only gamepad devices are supported. | 31 Currently only gamepad devices are supported. |
32 | 32 |
33 Warning! The protocol described in this file is experimental and | 33 Warning! The protocol described in this file is experimental and |
34 backward incompatible changes may be made. Backward compatible changes | 34 backward incompatible changes may be made. Backward compatible changes |
35 may be added together with the corresponding uinterface version bump. | 35 may be added together with the corresponding uinterface version bump. |
36 Backward incompatible changes are done by bumping the version number in | 36 Backward incompatible changes are done by bumping the version number in |
37 the protocol and uinterface names and resetting the interface version. | 37 the protocol and uinterface names and resetting the interface version. |
38 Once the protocol is to be declared stable, the 'z' prefix and the | 38 Once the protocol is to be declared stable, the 'z' prefix and the |
39 version number in the protocol and interface names are removed and the | 39 version number in the protocol and interface names are removed and the |
40 interface version number is reset. | 40 interface version number is reset. |
41 </description> | 41 </description> |
42 | 42 |
43 <request name="get_gamepad"> | 43 <request name="get_gamepad"> |
44 <description summary="get gamepad device assigned to seat"> | 44 <description summary="get gamepad device assigned to seat"> |
45 Create gamepad object. See zwp_gamepad_v1 interface for details. | 45 Create gamepad object. See zwp_gamepad_v1 interface for details. |
46 </description> | 46 </description> |
| 47 <arg name="id" type="new_id" interface="zcr_gamepad_v1"/> |
| 48 <arg name="seat" type="object" interface="wl_seat"/> |
| 49 </request> |
| 50 </interface> |
| 51 |
| 52 <interface name="zcr_gamepad_v1" version="1"> |
| 53 <description summary="gamepad input device"> |
| 54 The zwp_gamepad_v1 interface represents one or more gamepad input devices, |
| 55 which are reported as a normalized 'Standard Gamepad' as it is specified |
| 56 by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping |
| 57 </description> |
| 58 |
| 59 <request name="destroy" type="destructor"> |
| 60 <description summary="destroy gamepad object"/> |
| 61 </request> |
| 62 |
| 63 <enum name="gamepad_state"> |
| 64 <description summary="connection state"/> |
| 65 <entry name="off" value="0" summary="no gamepads are connected or on."/> |
| 66 <entry name="on" value="1" summary="at least one gamepad is connected."/> |
| 67 </enum> |
| 68 |
| 69 <event name="state_change"> |
| 70 <description summary="state change event"> |
| 71 Notification that this seat's connection state has changed. |
| 72 </description> |
| 73 <arg name="state" type="uint" enum="gamepad_state" summary="new state"/> |
| 74 </event> |
| 75 |
| 76 <event name="axis"> |
| 77 <description summary="axis change event"> |
| 78 Notification of axis change. |
| 79 |
| 80 The axis id specifies which axis has changed as defined by the W3C |
| 81 'Standard Gamepad'. |
| 82 |
| 83 The value is calibrated and normalized to the -1 to 1 range. |
| 84 </description> |
| 85 <arg name="time" type="uint" summary="timestamp with millisecond granulari
ty"/> |
| 86 <arg name="axis" type="uint" summary="axis that produced this event"/> |
| 87 <arg name="value" type="fixed" summary="new value of axis"/> |
| 88 </event> |
| 89 |
| 90 <enum name="button_state"> |
| 91 <description summary="physical button state"> |
| 92 Describes the physical state of a button that produced the button |
| 93 event. |
| 94 </description> |
| 95 <entry name="released" value="0" summary="the button is not pressed"/> |
| 96 <entry name="pressed" value="1" summary="the button is pressed"/> |
| 97 </enum> |
| 98 |
| 99 <event name="button"> |
| 100 <description summary="Gamepad button changed"> |
| 101 Notification of button change. |
| 102 |
| 103 The button id specifies which button has changed as defined by the W3C |
| 104 'Standard Gamepad'. |
| 105 |
| 106 A button can have a digital and an analog value. The analog value is |
| 107 normalized to a 0 to 1 range. |
| 108 If a button does not provide an analog value, it will be derived from |
| 109 the digital state. |
| 110 </description> |
| 111 <arg name="time" type="uint" summary="timestamp with millisecond granulari
ty"/> |
| 112 <arg name="button" type="uint" summary="id of button"/> |
| 113 <arg name="state" type="uint" enum="button_state" summary="digital state o
f the button"/> |
| 114 <arg name="analog" type="fixed" summary="analog value of the button"/> |
| 115 </event> |
| 116 |
| 117 <event name="frame"> |
| 118 <description summary="Notifies end of a series of gamepad changes."> |
| 119 Indicates the end of a set of events that logically belong together. |
| 120 A client is expected to accumulate the data in all events within the |
| 121 frame before proceeding. |
| 122 </description> |
| 123 <arg name="time" type="uint" summary="timestamp with millisecond granulari
ty"/> |
| 124 </event> |
| 125 </interface> |
| 126 |
| 127 <interface name="zwp_gaming_input_v1" version="1"> |
| 128 <description summary="DEPRECATED"> |
| 129 A global interface to provide gaming input devices for a given seat. |
| 130 |
| 131 Currently only gamepad devices are supported. |
| 132 |
| 133 Warning! The protocol described in this file is experimental and |
| 134 backward incompatible changes may be made. Backward compatible changes |
| 135 may be added together with the corresponding uinterface version bump. |
| 136 Backward incompatible changes are done by bumping the version number in |
| 137 the protocol and uinterface names and resetting the interface version. |
| 138 Once the protocol is to be declared stable, the 'z' prefix and the |
| 139 version number in the protocol and interface names are removed and the |
| 140 interface version number is reset. |
| 141 </description> |
| 142 |
| 143 <request name="get_gamepad"> |
| 144 <description summary="get gamepad device assigned to seat"> |
| 145 Create gamepad object. See zwp_gamepad_v1 interface for details. |
| 146 </description> |
47 <arg name="id" type="new_id" interface="zwp_gamepad_v1"/> | 147 <arg name="id" type="new_id" interface="zwp_gamepad_v1"/> |
48 <arg name="seat" type="object" interface="wl_seat"/> | 148 <arg name="seat" type="object" interface="wl_seat"/> |
49 </request> | 149 </request> |
50 </interface> | 150 </interface> |
51 | 151 |
52 <interface name="zwp_gamepad_v1" version="1"> | 152 <interface name="zwp_gamepad_v1" version="1"> |
53 <description summary="gamepad input device"> | 153 <description summary="DEPRECATED"> |
54 The zwp_gamepad_v1 interface represents one or more gamepad input devices, | 154 The zwp_gamepad_v1 interface represents one or more gamepad input devices, |
55 which are reported as a normalized 'Standard Gamepad' as it is specified | 155 which are reported as a normalized 'Standard Gamepad' as it is specified |
56 by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping | 156 by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping |
57 </description> | 157 </description> |
58 | 158 |
59 <request name="destroy" type="destructor"> | 159 <request name="destroy" type="destructor"> |
60 <description summary="destroy gamepad object"/> | 160 <description summary="destroy gamepad object"/> |
61 </request> | 161 </request> |
62 | 162 |
63 <enum name="gamepad_state"> | 163 <enum name="gamepad_state"> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 <event name="frame"> | 217 <event name="frame"> |
118 <description summary="Notifies end of a series of gamepad changes."> | 218 <description summary="Notifies end of a series of gamepad changes."> |
119 Indicates the end of a set of events that logically belong together. | 219 Indicates the end of a set of events that logically belong together. |
120 A client is expected to accumulate the data in all events within the | 220 A client is expected to accumulate the data in all events within the |
121 frame before proceeding. | 221 frame before proceeding. |
122 </description> | 222 </description> |
123 <arg name="time" type="uint" summary="timestamp with millisecond granulari
ty"/> | 223 <arg name="time" type="uint" summary="timestamp with millisecond granulari
ty"/> |
124 </event> | 224 </event> |
125 </interface> | 225 </interface> |
126 </protocol> | 226 </protocol> |
OLD | NEW |