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

Side by Side Diff: third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml

Issue 2093803002: wayland-protocols: Add gaming-input-unstable-v1 protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migration
Patch Set: fixed wording to allow for multiple gamepads reported as one Created 4 years, 5 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
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="gaming_input_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_gaming_input_v1" version="1">
28 <description summary="extends wl_seat with gaming input devices">
29 A global uinterface to provide gaming input devices for a given seat.
30
31 Currently only gamepad devices are supported.
32
33 Warning! The protocol described in this file is experimental and
34 backward incompatible changes may be made. Backward compatible changes
35 may be added together with the corresponding uinterface version bump.
36 Backward incompatible changes are done by bumping the version number in
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
39 version number in the protocol and interface names are removed and the
40 interface version number is reset.
41 </description>
42
43 <request name="get_gamepad">
44 <description summary="get gamepad device assigned to seat">
45 Create gamepad object. See zwp_gamepad_v1 interface for details.
46 </description>
47 <arg name="id" type="new_id" interface="zwp_gamepad_v1"/>
48 <arg name="seat" type="object" interface="wl_seat"/>
49 </request>
50 </interface>
51
52 <interface name="zwp_gamepad_v1" version="1">
reveman 2016/06/29 22:37:50 do we need enter/leave events to notify the client
denniskempin 2016/07/12 20:15:23 as discussed, not with this version of the protoco
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 <enum name="gamepad_state">
60 <description summary="connection state"/>
61 <entry name="off" value="0" summary="no gamepads are connected or on."/>
62 <entry name="on" value="1" summary="at least one gamepad is connected."/>
63 </enum>
64
65 <event name="state_change">
66 <description summary="state change event">
67 Notification that this seat's connection state has changed.
68 </description>
69 <arg name="state" type="uint" enum="gamepad_state" summary="new state"/>
70 </event>
71
72 <event name="axis">
73 <description summary="axis change event">
74 Notification of axis change.
75
76 The axis id specifies which axis has changed as defined by the W3C
77 'Standard Gamepad'.
78
79 The value is calibrated and normalized to the -1 to 1 range.
80 </description>
81 <arg name="time" type="uint" summary="timestamp with millisecond granulari ty"/>
82 <arg name="axis" type="uint" summary="axis that produced this event"/>
83 <arg name="value" type="fixed" summary="new value of axis"/>
84 </event>
85
86 <enum name="button_state">
87 <description summary="physical button state">
88 Describes the physical state of a button that produced the button
89 event.
90 </description>
91 <entry name="released" value="0" summary="the button is not pressed"/>
92 <entry name="pressed" value="1" summary="the button is pressed"/>
93 </enum>
94
95 <event name="button">
96 <description summary="Gamepad button changed">
97 Notification of button change.
98
99 The button id specifies which button has changed as defined by the W3C
100 'Standard Gamepad'.
101
102 A button can have a digital and an analog value. The analog value is
103 normalized to a 0 to 1 range.
104 If a button does not provide an analog value, it will be derived from
105 the digital state.
106 </description>
107 <arg name="time" type="uint" summary="timestamp with millisecond granulari ty"/>
reveman 2016/06/29 22:37:50 should we have a serial here in case we ever want
denniskempin 2016/07/12 20:15:23 Also not exactly feasible with the current protoco
108 <arg name="button" type="uint" summary="id of button"/>
109 <arg name="state" type="uint" enum="button_state" summary="digital state o f the button"/>
110 <arg name="analog" type="fixed" summary="analog value of the button"/>
111 </event>
112
113 <event name="frame">
114 <description summary="Notifies end of a series of gamepad changes.">
115 Indicates the end of a set of events that logically belong together.
116 A client is expected to accumulate the data in all events within the
117 frame before proceeding.
118 </description>
119 <arg name="time" type="uint" summary="timestamp with millisecond granulari ty"/>
120 </event>
121
122 <request name="destroy" type="destructor">
reveman 2016/06/29 22:37:50 nit: move destructor to top for consistency with o
denniskempin 2016/07/12 20:15:23 Done.
123 <description summary="destroy gamepad object"/>
124 </request>
125 </interface>
126 </protocol>
OLDNEW
« no previous file with comments | « third_party/wayland-protocols/unstable/gaming-input/README ('k') | third_party/wayland-protocols/wayland-protocols.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698