1*6c119a46SAndroid Build Coastguard Worker<?xml version="1.0" encoding="UTF-8"?>
2*6c119a46SAndroid Build Coastguard Worker<protocol name="xdg_output_unstable_v1">
3*6c119a46SAndroid Build Coastguard Worker
4*6c119a46SAndroid Build Coastguard Worker  <copyright>
5*6c119a46SAndroid Build Coastguard Worker    Copyright © 2017 Red Hat Inc.
6*6c119a46SAndroid Build Coastguard Worker
7*6c119a46SAndroid Build Coastguard Worker    Permission is hereby granted, free of charge, to any person obtaining a
8*6c119a46SAndroid Build Coastguard Worker    copy of this software and associated documentation files (the "Software"),
9*6c119a46SAndroid Build Coastguard Worker    to deal in the Software without restriction, including without limitation
10*6c119a46SAndroid Build Coastguard Worker    the rights to use, copy, modify, merge, publish, distribute, sublicense,
11*6c119a46SAndroid Build Coastguard Worker    and/or sell copies of the Software, and to permit persons to whom the
12*6c119a46SAndroid Build Coastguard Worker    Software is furnished to do so, subject to the following conditions:
13*6c119a46SAndroid Build Coastguard Worker
14*6c119a46SAndroid Build Coastguard Worker    The above copyright notice and this permission notice (including the next
15*6c119a46SAndroid Build Coastguard Worker    paragraph) shall be included in all copies or substantial portions of the
16*6c119a46SAndroid Build Coastguard Worker    Software.
17*6c119a46SAndroid Build Coastguard Worker
18*6c119a46SAndroid Build Coastguard Worker    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19*6c119a46SAndroid Build Coastguard Worker    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20*6c119a46SAndroid Build Coastguard Worker    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21*6c119a46SAndroid Build Coastguard Worker    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22*6c119a46SAndroid Build Coastguard Worker    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23*6c119a46SAndroid Build Coastguard Worker    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24*6c119a46SAndroid Build Coastguard Worker    DEALINGS IN THE SOFTWARE.
25*6c119a46SAndroid Build Coastguard Worker  </copyright>
26*6c119a46SAndroid Build Coastguard Worker
27*6c119a46SAndroid Build Coastguard Worker  <description summary="Protocol to describe output regions">
28*6c119a46SAndroid Build Coastguard Worker    This protocol aims at describing outputs in a way which is more in line
29*6c119a46SAndroid Build Coastguard Worker    with the concept of an output on desktop oriented systems.
30*6c119a46SAndroid Build Coastguard Worker
31*6c119a46SAndroid Build Coastguard Worker    Some information are more specific to the concept of an output for
32*6c119a46SAndroid Build Coastguard Worker    a desktop oriented system and may not make sense in other applications,
33*6c119a46SAndroid Build Coastguard Worker    such as IVI systems for example.
34*6c119a46SAndroid Build Coastguard Worker
35*6c119a46SAndroid Build Coastguard Worker    Typically, the global compositor space on a desktop system is made of
36*6c119a46SAndroid Build Coastguard Worker    a contiguous or overlapping set of rectangular regions.
37*6c119a46SAndroid Build Coastguard Worker
38*6c119a46SAndroid Build Coastguard Worker    Some of the information provided in this protocol might be identical
39*6c119a46SAndroid Build Coastguard Worker    to their counterparts already available from wl_output, in which case
40*6c119a46SAndroid Build Coastguard Worker    the information provided by this protocol should be preferred to their
41*6c119a46SAndroid Build Coastguard Worker    equivalent in wl_output. The goal is to move the desktop specific
42*6c119a46SAndroid Build Coastguard Worker    concepts (such as output location within the global compositor space,
43*6c119a46SAndroid Build Coastguard Worker    the connector name and types, etc.) out of the core wl_output protocol.
44*6c119a46SAndroid Build Coastguard Worker
45*6c119a46SAndroid Build Coastguard Worker    Warning! The protocol described in this file is experimental and
46*6c119a46SAndroid Build Coastguard Worker    backward incompatible changes may be made. Backward compatible
47*6c119a46SAndroid Build Coastguard Worker    changes may be added together with the corresponding interface
48*6c119a46SAndroid Build Coastguard Worker    version bump.
49*6c119a46SAndroid Build Coastguard Worker    Backward incompatible changes are done by bumping the version
50*6c119a46SAndroid Build Coastguard Worker    number in the protocol and interface names and resetting the
51*6c119a46SAndroid Build Coastguard Worker    interface version. Once the protocol is to be declared stable,
52*6c119a46SAndroid Build Coastguard Worker    the 'z' prefix and the version number in the protocol and
53*6c119a46SAndroid Build Coastguard Worker    interface names are removed and the interface version number is
54*6c119a46SAndroid Build Coastguard Worker    reset.
55*6c119a46SAndroid Build Coastguard Worker  </description>
56*6c119a46SAndroid Build Coastguard Worker
57*6c119a46SAndroid Build Coastguard Worker  <interface name="zxdg_output_manager_v1" version="3">
58*6c119a46SAndroid Build Coastguard Worker    <description summary="manage xdg_output objects">
59*6c119a46SAndroid Build Coastguard Worker      A global factory interface for xdg_output objects.
60*6c119a46SAndroid Build Coastguard Worker    </description>
61*6c119a46SAndroid Build Coastguard Worker
62*6c119a46SAndroid Build Coastguard Worker    <request name="destroy" type="destructor">
63*6c119a46SAndroid Build Coastguard Worker      <description summary="destroy the xdg_output_manager object">
64*6c119a46SAndroid Build Coastguard Worker	Using this request a client can tell the server that it is not
65*6c119a46SAndroid Build Coastguard Worker	going to use the xdg_output_manager object anymore.
66*6c119a46SAndroid Build Coastguard Worker
67*6c119a46SAndroid Build Coastguard Worker	Any objects already created through this instance are not affected.
68*6c119a46SAndroid Build Coastguard Worker      </description>
69*6c119a46SAndroid Build Coastguard Worker    </request>
70*6c119a46SAndroid Build Coastguard Worker
71*6c119a46SAndroid Build Coastguard Worker    <request name="get_xdg_output">
72*6c119a46SAndroid Build Coastguard Worker      <description summary="create an xdg output from a wl_output">
73*6c119a46SAndroid Build Coastguard Worker	This creates a new xdg_output object for the given wl_output.
74*6c119a46SAndroid Build Coastguard Worker      </description>
75*6c119a46SAndroid Build Coastguard Worker      <arg name="id" type="new_id" interface="zxdg_output_v1"/>
76*6c119a46SAndroid Build Coastguard Worker      <arg name="output" type="object" interface="wl_output"/>
77*6c119a46SAndroid Build Coastguard Worker    </request>
78*6c119a46SAndroid Build Coastguard Worker  </interface>
79*6c119a46SAndroid Build Coastguard Worker
80*6c119a46SAndroid Build Coastguard Worker  <interface name="zxdg_output_v1" version="3">
81*6c119a46SAndroid Build Coastguard Worker    <description summary="compositor logical output region">
82*6c119a46SAndroid Build Coastguard Worker      An xdg_output describes part of the compositor geometry.
83*6c119a46SAndroid Build Coastguard Worker
84*6c119a46SAndroid Build Coastguard Worker      This typically corresponds to a monitor that displays part of the
85*6c119a46SAndroid Build Coastguard Worker      compositor space.
86*6c119a46SAndroid Build Coastguard Worker
87*6c119a46SAndroid Build Coastguard Worker      For objects version 3 onwards, after all xdg_output properties have been
88*6c119a46SAndroid Build Coastguard Worker      sent (when the object is created and when properties are updated), a
89*6c119a46SAndroid Build Coastguard Worker      wl_output.done event is sent. This allows changes to the output
90*6c119a46SAndroid Build Coastguard Worker      properties to be seen as atomic, even if they happen via multiple events.
91*6c119a46SAndroid Build Coastguard Worker    </description>
92*6c119a46SAndroid Build Coastguard Worker
93*6c119a46SAndroid Build Coastguard Worker    <request name="destroy" type="destructor">
94*6c119a46SAndroid Build Coastguard Worker      <description summary="destroy the xdg_output object">
95*6c119a46SAndroid Build Coastguard Worker	Using this request a client can tell the server that it is not
96*6c119a46SAndroid Build Coastguard Worker	going to use the xdg_output object anymore.
97*6c119a46SAndroid Build Coastguard Worker      </description>
98*6c119a46SAndroid Build Coastguard Worker    </request>
99*6c119a46SAndroid Build Coastguard Worker
100*6c119a46SAndroid Build Coastguard Worker    <event name="logical_position">
101*6c119a46SAndroid Build Coastguard Worker      <description summary="position of the output within the global compositor space">
102*6c119a46SAndroid Build Coastguard Worker	The position event describes the location of the wl_output within
103*6c119a46SAndroid Build Coastguard Worker	the global compositor space.
104*6c119a46SAndroid Build Coastguard Worker
105*6c119a46SAndroid Build Coastguard Worker	The logical_position event is sent after creating an xdg_output
106*6c119a46SAndroid Build Coastguard Worker	(see xdg_output_manager.get_xdg_output) and whenever the location
107*6c119a46SAndroid Build Coastguard Worker	of the output changes within the global compositor space.
108*6c119a46SAndroid Build Coastguard Worker      </description>
109*6c119a46SAndroid Build Coastguard Worker      <arg name="x" type="int"
110*6c119a46SAndroid Build Coastguard Worker	   summary="x position within the global compositor space"/>
111*6c119a46SAndroid Build Coastguard Worker      <arg name="y" type="int"
112*6c119a46SAndroid Build Coastguard Worker	   summary="y position within the global compositor space"/>
113*6c119a46SAndroid Build Coastguard Worker    </event>
114*6c119a46SAndroid Build Coastguard Worker
115*6c119a46SAndroid Build Coastguard Worker    <event name="logical_size">
116*6c119a46SAndroid Build Coastguard Worker      <description summary="size of the output in the global compositor space">
117*6c119a46SAndroid Build Coastguard Worker	The logical_size event describes the size of the output in the
118*6c119a46SAndroid Build Coastguard Worker	global compositor space.
119*6c119a46SAndroid Build Coastguard Worker
120*6c119a46SAndroid Build Coastguard Worker	For example, a surface without any buffer scale, transformation
121*6c119a46SAndroid Build Coastguard Worker	nor rotation set, with the size matching the logical_size will
122*6c119a46SAndroid Build Coastguard Worker	have the same size as the corresponding output when displayed.
123*6c119a46SAndroid Build Coastguard Worker
124*6c119a46SAndroid Build Coastguard Worker	Most regular Wayland clients should not pay attention to the
125*6c119a46SAndroid Build Coastguard Worker	logical size and would rather rely on xdg_shell interfaces.
126*6c119a46SAndroid Build Coastguard Worker
127*6c119a46SAndroid Build Coastguard Worker	Some clients such as Xwayland, however, need this to configure
128*6c119a46SAndroid Build Coastguard Worker	their surfaces in the global compositor space as the compositor
129*6c119a46SAndroid Build Coastguard Worker	may apply a different scale from what is advertised by the output
130*6c119a46SAndroid Build Coastguard Worker	scaling property (to achieve fractional scaling, for example).
131*6c119a46SAndroid Build Coastguard Worker
132*6c119a46SAndroid Build Coastguard Worker	For example, for a wl_output mode 3840×2160 and a scale factor 2:
133*6c119a46SAndroid Build Coastguard Worker
134*6c119a46SAndroid Build Coastguard Worker	- A compositor not scaling the surface buffers will advertise a
135*6c119a46SAndroid Build Coastguard Worker	  logical size of 3840×2160,
136*6c119a46SAndroid Build Coastguard Worker
137*6c119a46SAndroid Build Coastguard Worker	- A compositor automatically scaling the surface buffers will
138*6c119a46SAndroid Build Coastguard Worker	  advertise a logical size of 1920×1080,
139*6c119a46SAndroid Build Coastguard Worker
140*6c119a46SAndroid Build Coastguard Worker	- A compositor using a fractional scale of 1.5 will advertise a
141*6c119a46SAndroid Build Coastguard Worker	  logical size of 2560×1440.
142*6c119a46SAndroid Build Coastguard Worker
143*6c119a46SAndroid Build Coastguard Worker	For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
144*6c119a46SAndroid Build Coastguard Worker	the compositor will advertise a logical size of 1080x1920.
145*6c119a46SAndroid Build Coastguard Worker
146*6c119a46SAndroid Build Coastguard Worker	The logical_size event is sent after creating an xdg_output
147*6c119a46SAndroid Build Coastguard Worker	(see xdg_output_manager.get_xdg_output) and whenever the logical
148*6c119a46SAndroid Build Coastguard Worker	size of the output changes, either as a result of a change in the
149*6c119a46SAndroid Build Coastguard Worker	applied scale or because of a change in the corresponding output
150*6c119a46SAndroid Build Coastguard Worker	mode(see wl_output.mode) or transform (see wl_output.transform).
151*6c119a46SAndroid Build Coastguard Worker      </description>
152*6c119a46SAndroid Build Coastguard Worker      <arg name="width" type="int"
153*6c119a46SAndroid Build Coastguard Worker	   summary="width in global compositor space"/>
154*6c119a46SAndroid Build Coastguard Worker      <arg name="height" type="int"
155*6c119a46SAndroid Build Coastguard Worker	   summary="height in global compositor space"/>
156*6c119a46SAndroid Build Coastguard Worker    </event>
157*6c119a46SAndroid Build Coastguard Worker
158*6c119a46SAndroid Build Coastguard Worker    <event name="done">
159*6c119a46SAndroid Build Coastguard Worker      <description summary="all information about the output have been sent">
160*6c119a46SAndroid Build Coastguard Worker	This event is sent after all other properties of an xdg_output
161*6c119a46SAndroid Build Coastguard Worker	have been sent.
162*6c119a46SAndroid Build Coastguard Worker
163*6c119a46SAndroid Build Coastguard Worker	This allows changes to the xdg_output properties to be seen as
164*6c119a46SAndroid Build Coastguard Worker	atomic, even if they happen via multiple events.
165*6c119a46SAndroid Build Coastguard Worker
166*6c119a46SAndroid Build Coastguard Worker	For objects version 3 onwards, this event is deprecated. Compositors
167*6c119a46SAndroid Build Coastguard Worker	are not required to send it anymore and must send wl_output.done
168*6c119a46SAndroid Build Coastguard Worker	instead.
169*6c119a46SAndroid Build Coastguard Worker      </description>
170*6c119a46SAndroid Build Coastguard Worker    </event>
171*6c119a46SAndroid Build Coastguard Worker
172*6c119a46SAndroid Build Coastguard Worker    <!-- Version 2 additions -->
173*6c119a46SAndroid Build Coastguard Worker
174*6c119a46SAndroid Build Coastguard Worker    <event name="name" since="2">
175*6c119a46SAndroid Build Coastguard Worker      <description summary="name of this output">
176*6c119a46SAndroid Build Coastguard Worker	Many compositors will assign names to their outputs, show them to the
177*6c119a46SAndroid Build Coastguard Worker	user, allow them to be configured by name, etc. The client may wish to
178*6c119a46SAndroid Build Coastguard Worker	know this name as well to offer the user similar behaviors.
179*6c119a46SAndroid Build Coastguard Worker
180*6c119a46SAndroid Build Coastguard Worker	The naming convention is compositor defined, but limited to
181*6c119a46SAndroid Build Coastguard Worker	alphanumeric characters and dashes (-). Each name is unique among all
182*6c119a46SAndroid Build Coastguard Worker	wl_output globals, but if a wl_output global is destroyed the same name
183*6c119a46SAndroid Build Coastguard Worker	may be reused later. The names will also remain consistent across
184*6c119a46SAndroid Build Coastguard Worker	sessions with the same hardware and software configuration.
185*6c119a46SAndroid Build Coastguard Worker
186*6c119a46SAndroid Build Coastguard Worker	Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
187*6c119a46SAndroid Build Coastguard Worker	not assume that the name is a reflection of an underlying DRM
188*6c119a46SAndroid Build Coastguard Worker	connector, X11 connection, etc.
189*6c119a46SAndroid Build Coastguard Worker
190*6c119a46SAndroid Build Coastguard Worker	The name event is sent after creating an xdg_output (see
191*6c119a46SAndroid Build Coastguard Worker	xdg_output_manager.get_xdg_output). This event is only sent once per
192*6c119a46SAndroid Build Coastguard Worker	xdg_output, and the name does not change over the lifetime of the
193*6c119a46SAndroid Build Coastguard Worker	wl_output global.
194*6c119a46SAndroid Build Coastguard Worker      </description>
195*6c119a46SAndroid Build Coastguard Worker      <arg name="name" type="string" summary="output name"/>
196*6c119a46SAndroid Build Coastguard Worker    </event>
197*6c119a46SAndroid Build Coastguard Worker
198*6c119a46SAndroid Build Coastguard Worker    <event name="description" since="2">
199*6c119a46SAndroid Build Coastguard Worker      <description summary="human-readable description of this output">
200*6c119a46SAndroid Build Coastguard Worker	Many compositors can produce human-readable descriptions of their
201*6c119a46SAndroid Build Coastguard Worker	outputs.  The client may wish to know this description as well, to
202*6c119a46SAndroid Build Coastguard Worker	communicate the user for various purposes.
203*6c119a46SAndroid Build Coastguard Worker
204*6c119a46SAndroid Build Coastguard Worker	The description is a UTF-8 string with no convention defined for its
205*6c119a46SAndroid Build Coastguard Worker	contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
206*6c119a46SAndroid Build Coastguard Worker	output via :1'.
207*6c119a46SAndroid Build Coastguard Worker
208*6c119a46SAndroid Build Coastguard Worker	The description event is sent after creating an xdg_output (see
209*6c119a46SAndroid Build Coastguard Worker	xdg_output_manager.get_xdg_output) and whenever the description
210*6c119a46SAndroid Build Coastguard Worker	changes. The description is optional, and may not be sent at all.
211*6c119a46SAndroid Build Coastguard Worker
212*6c119a46SAndroid Build Coastguard Worker	For objects of version 2 and lower, this event is only sent once per
213*6c119a46SAndroid Build Coastguard Worker	xdg_output, and the description does not change over the lifetime of
214*6c119a46SAndroid Build Coastguard Worker	the wl_output global.
215*6c119a46SAndroid Build Coastguard Worker      </description>
216*6c119a46SAndroid Build Coastguard Worker      <arg name="description" type="string" summary="output description"/>
217*6c119a46SAndroid Build Coastguard Worker    </event>
218*6c119a46SAndroid Build Coastguard Worker
219*6c119a46SAndroid Build Coastguard Worker  </interface>
220*6c119a46SAndroid Build Coastguard Worker</protocol>
221