Debian Codegraph @

protocols/wlr-output-management-unstable-v1.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="wlr_output_management_unstable_v1">
3 <copyright>
4 Copyright © 2019 Purism SPC
5
6 Permission to use, copy, modify, distribute, and sell this
7 software and its documentation for any purpose is hereby granted
8 without fee, provided that the above copyright notice appear in
9 all copies and that both that copyright notice and this permission
10 notice appear in supporting documentation, and that the name of
11 the copyright holders not be used in advertising or publicity
12 pertaining to distribution of the software without specific,
13 written prior permission. The copyright holders make no
14 representations about the suitability of this software for any
15 purpose. It is provided "as is" without express or implied
16 warranty.
17
18 THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
19 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
23 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
25 THIS SOFTWARE.
26 </copyright>
27
28 <description summary="protocol to configure output devices">
29 This protocol exposes interfaces to obtain and modify output device
30 configuration.
31
32 Warning! The protocol described in this file is experimental and
33 backward incompatible changes may be made. Backward compatible changes
34 may be added together with the corresponding interface version bump.
35 Backward incompatible changes are done by bumping the version number in
36 the protocol and interface names and resetting the interface version.
37 Once the protocol is to be declared stable, the 'z' prefix and the
38 version number in the protocol and interface names are removed and the
39 interface version number is reset.
40 </description>
41
42 <interface name="zwlr_output_manager_v1" version="4">
43 <description summary="output device configuration manager">
44 This interface is a manager that allows reading and writing the current
45 output device configuration.
46
47 Output devices that display pixels (e.g. a physical monitor or a virtual
48 output in a window) are represented as heads. Heads cannot be created nor
49 destroyed by the client, but they can be enabled or disabled and their
50 properties can be changed. Each head may have one or more available modes.
51
52 Whenever a head appears (e.g. a monitor is plugged in), it will be
53 advertised via the head event. Immediately after the output manager is
54 bound, all current heads are advertised.
55
56 Whenever a head's properties change, the relevant wlr_output_head events
57 will be sent. Not all head properties will be sent: only properties that
58 have changed need to.
59
60 Whenever a head disappears (e.g. a monitor is unplugged), a
61 wlr_output_head.finished event will be sent.
62
63 After one or more heads appear, change or disappear, the done event will
64 be sent. It carries a serial which can be used in a create_configuration
65 request to update heads properties.
66
67 The information obtained from this protocol should only be used for output
68 configuration purposes. This protocol is not designed to be a generic
69 output property advertisement protocol for regular clients. Instead,
70 protocols such as xdg-output should be used.
71 </description>
72
73 <event name="head">
74 <description summary="introduce a new head">
75 This event introduces a new head. This happens whenever a new head
76 appears (e.g. a monitor is plugged in) or after the output manager is
77 bound.
78 </description>
79 <arg name="head" type="new_id" interface="zwlr_output_head_v1"/>
80 </event>
81
82 <event name="done">
83 <description summary="sent all information about current configuration">
84 This event is sent after all information has been sent after binding to
85 the output manager object and after any subsequent changes. This applies
86 to child head and mode objects as well. In other words, this event is
87 sent whenever a head or mode is created or destroyed and whenever one of
88 their properties has been changed. Not all state is re-sent each time
89 the current configuration changes: only the actual changes are sent.
90
91 This allows changes to the output configuration to be seen as atomic,
92 even if they happen via multiple events.
93
94 A serial is sent to be used in a future create_configuration request.
95 </description>
96 <arg name="serial" type="uint" summary="current configuration serial"/>
97 </event>
98
99 <request name="create_configuration">
100 <description summary="create a new output configuration object">
101 Create a new output configuration object. This allows to update head
102 properties.
103 </description>
104 <arg name="id" type="new_id" interface="zwlr_output_configuration_v1"/>
105 <arg name="serial" type="uint"/>
106 </request>
107
108 <request name="stop">
109 <description summary="stop sending events">
110 Indicates the client no longer wishes to receive events for output
111 configuration changes. However the compositor may emit further events,
112 until the finished event is emitted.
113
114 The client must not send any more requests after this one.
115 </description>
116 </request>
117
118 <event name="finished" type="destructor">
119 <description summary="the compositor has finished with the manager">
120 This event indicates that the compositor is done sending manager events.
121 The compositor will destroy the object immediately after sending this
122 event, so it will become invalid and the client should release any
123 resources associated with it.
124 </description>
125 </event>
126 </interface>
127
128 <interface name="zwlr_output_head_v1" version="4">
129 <description summary="output device">
130 A head is an output device. The difference between a wl_output object and
131 a head is that heads are advertised even if they are turned off. A head
132 object only advertises properties and cannot be used directly to change
133 them.
134
135 A head has some read-only properties: modes, name, description and
136 physical_size. These cannot be changed by clients.
137
138 Other properties can be updated via a wlr_output_configuration object.
139
140 Properties sent via this interface are applied atomically via the
141 wlr_output_manager.done event. No guarantees are made regarding the order
142 in which properties are sent.
143 </description>
144
145 <event name="name">
146 <description summary="head name">
147 This event describes the head name.
148
149 The naming convention is compositor defined, but limited to alphanumeric
150 characters and dashes (-). Each name is unique among all wlr_output_head
151 objects, but if a wlr_output_head object is destroyed the same name may
152 be reused later. The names will also remain consistent across sessions
153 with the same hardware and software configuration.
154
155 Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
156 not assume that the name is a reflection of an underlying DRM
157 connector, X11 connection, etc.
158
159 If the compositor implements the xdg-output protocol and this head is
160 enabled, the xdg_output.name event must report the same name.
161
162 The name event is sent after a wlr_output_head object is created. This
163 event is only sent once per object, and the name does not change over
164 the lifetime of the wlr_output_head object.
165 </description>
166 <arg name="name" type="string"/>
167 </event>
168
169 <event name="description">
170 <description summary="head description">
171 This event describes a human-readable description of the head.
172
173 The description is a UTF-8 string with no convention defined for its
174 contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
175 output via :1'. However, do not assume that the name is a reflection of
176 the make, model, serial of the underlying DRM connector or the display
177 name of the underlying X11 connection, etc.
178
179 If the compositor implements xdg-output and this head is enabled,
180 the xdg_output.description must report the same description.
181
182 The description event is sent after a wlr_output_head object is created.
183 This event is only sent once per object, and the description does not
184 change over the lifetime of the wlr_output_head object.
185 </description>
186 <arg name="description" type="string"/>
187 </event>
188
189 <event name="physical_size">
190 <description summary="head physical size">
191 This event describes the physical size of the head. This event is only
192 sent if the head has a physical size (e.g. is not a projector or a
193 virtual device).
194 </description>
195 <arg name="width" type="int" summary="width in millimeters of the output"/>
196 <arg name="height" type="int" summary="height in millimeters of the output"/>
197 </event>
198
199 <event name="mode">
200 <description summary="introduce a mode">
201 This event introduces a mode for this head. It is sent once per
202 supported mode.
203 </description>
204 <arg name="mode" type="new_id" interface="zwlr_output_mode_v1"/>
205 </event>
206
207 <event name="enabled">
208 <description summary="head is enabled or disabled">
209 This event describes whether the head is enabled. A disabled head is not
210 mapped to a region of the global compositor space.
211
212 When a head is disabled, some properties (current_mode, position,
213 transform and scale) are irrelevant.
214 </description>
215 <arg name="enabled" type="int" summary="zero if disabled, non-zero if enabled"/>
216 </event>
217
218 <event name="current_mode">
219 <description summary="current mode">
220 This event describes the mode currently in use for this head. It is only
221 sent if the output is enabled.
222 </description>
223 <arg name="mode" type="object" interface="zwlr_output_mode_v1"/>
224 </event>
225
226 <event name="position">
227 <description summary="current position">
228 This events describes the position of the head in the global compositor
229 space. It is only sent if the output is enabled.
230 </description>
231 <arg name="x" type="int"
232 summary="x position within the global compositor space"/>
233 <arg name="y" type="int"
234 summary="y position within the global compositor space"/>
235 </event>
236
237 <event name="transform">
238 <description summary="current transformation">
239 This event describes the transformation currently applied to the head.
240 It is only sent if the output is enabled.
241 </description>
242 <arg name="transform" type="int" enum="wl_output.transform"/>
243 </event>
244
245 <event name="scale">
246 <description summary="current scale">
247 This events describes the scale of the head in the global compositor
248 space. It is only sent if the output is enabled.
249 </description>
250 <arg name="scale" type="fixed"/>
251 </event>
252
253 <event name="finished">
254 <description summary="the head has disappeared">
255 This event indicates that the head is no longer available. The head
256 object becomes inert. Clients should send a destroy request and release
257 any resources associated with it.
258 </description>
259 </event>
260
261 <!-- Version 2 additions -->
262
263 <event name="make" since="2">
264 <description summary="head manufacturer">
265 This event describes the manufacturer of the head.
266
267 This must report the same make as the wl_output interface does in its
268 geometry event.
269
270 Together with the model and serial_number events the purpose is to
271 allow clients to recognize heads from previous sessions and for example
272 load head-specific configurations back.
273
274 It is not guaranteed this event will be ever sent. A reason for that
275 can be that the compositor does not have information about the make of
276 the head or the definition of a make is not sensible in the current
277 setup, for example in a virtual session. Clients can still try to
278 identify the head by available information from other events but should
279 be aware that there is an increased risk of false positives.
280
281 It is not recommended to display the make string in UI to users. For
282 that the string provided by the description event should be preferred.
283 </description>
284 <arg name="make" type="string"/>
285 </event>
286
287 <event name="model" since="2">
288 <description summary="head model">
289 This event describes the model of the head.
290
291 This must report the same model as the wl_output interface does in its
292 geometry event.
293
294 Together with the make and serial_number events the purpose is to
295 allow clients to recognize heads from previous sessions and for example
296 load head-specific configurations back.
297
298 It is not guaranteed this event will be ever sent. A reason for that
299 can be that the compositor does not have information about the model of
300 the head or the definition of a model is not sensible in the current
301 setup, for example in a virtual session. Clients can still try to
302 identify the head by available information from other events but should
303 be aware that there is an increased risk of false positives.
304
305 It is not recommended to display the model string in UI to users. For
306 that the string provided by the description event should be preferred.
307 </description>
308 <arg name="model" type="string"/>
309 </event>
310
311 <event name="serial_number" since="2">
312 <description summary="head serial number">
313 This event describes the serial number of the head.
314
315 Together with the make and model events the purpose is to allow clients
316 to recognize heads from previous sessions and for example load head-
317 specific configurations back.
318
319 It is not guaranteed this event will be ever sent. A reason for that
320 can be that the compositor does not have information about the serial
321 number of the head or the definition of a serial number is not sensible
322 in the current setup. Clients can still try to identify the head by
323 available information from other events but should be aware that there
324 is an increased risk of false positives.
325
326 It is not recommended to display the serial_number string in UI to
327 users. For that the string provided by the description event should be
328 preferred.
329 </description>
330 <arg name="serial_number" type="string"/>
331 </event>
332
333 <!-- Version 3 additions -->
334
335 <request name="release" type="destructor" since="3">
336 <description summary="destroy the head object">
337 This request indicates that the client will no longer use this head
338 object.
339 </description>
340 </request>
341
342 <!-- Version 4 additions -->
343
344 <enum name="adaptive_sync_state" since="4">
345 <entry name="disabled" value="0" summary="adaptive sync is disabled"/>
346 <entry name="enabled" value="1" summary="adaptive sync is enabled"/>
347 </enum>
348
349 <event name="adaptive_sync" since="4">
350 <description summary="current adaptive sync state">
351 This event describes whether adaptive sync is currently enabled for
352 the head or not. Adaptive sync is also known as Variable Refresh
353 Rate or VRR.
354 </description>
355 <arg name="state" type="uint" enum="adaptive_sync_state"/>
356 </event>
357 </interface>
358
359 <interface name="zwlr_output_mode_v1" version="3">
360 <description summary="output mode">
361 This object describes an output mode.
362
363 Some heads don't support output modes, in which case modes won't be
364 advertised.
365
366 Properties sent via this interface are applied atomically via the
367 wlr_output_manager.done event. No guarantees are made regarding the order
368 in which properties are sent.
369 </description>
370
371 <event name="size">
372 <description summary="mode size">
373 This event describes the mode size. The size is given in physical
374 hardware units of the output device. This is not necessarily the same as
375 the output size in the global compositor space. For instance, the output
376 may be scaled or transformed.
377 </description>
378 <arg name="width" type="int" summary="width of the mode in hardware units"/>
379 <arg name="height" type="int" summary="height of the mode in hardware units"/>
380 </event>
381
382 <event name="refresh">
383 <description summary="mode refresh rate">
384 This event describes the mode's fixed vertical refresh rate. It is only
385 sent if the mode has a fixed refresh rate.
386 </description>
387 <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
388 </event>
389
390 <event name="preferred">
391 <description summary="mode is preferred">
392 This event advertises this mode as preferred.
393 </description>
394 </event>
395
396 <event name="finished">
397 <description summary="the mode has disappeared">
398 This event indicates that the mode is no longer available. The mode
399 object becomes inert. Clients should send a destroy request and release
400 any resources associated with it.
401 </description>
402 </event>
403
404 <!-- Version 3 additions -->
405
406 <request name="release" type="destructor" since="3">
407 <description summary="destroy the mode object">
408 This request indicates that the client will no longer use this mode
409 object.
410 </description>
411 </request>
412 </interface>
413
414 <interface name="zwlr_output_configuration_v1" version="4">
415 <description summary="output configuration">
416 This object is used by the client to describe a full output configuration.
417
418 First, the client needs to setup the output configuration. Each head can
419 be either enabled (and configured) or disabled. It is a protocol error to
420 send two enable_head or disable_head requests with the same head. It is a
421 protocol error to omit a head in a configuration.
422
423 Then, the client can apply or test the configuration. The compositor will
424 then reply with a succeeded, failed or cancelled event. Finally the client
425 should destroy the configuration object.
426 </description>
427
428 <enum name="error">
429 <entry name="already_configured_head" value="1"
430 summary="head has been configured twice"/>
431 <entry name="unconfigured_head" value="2"
432 summary="head has not been configured"/>
433 <entry name="already_used" value="3"
434 summary="request sent after configuration has been applied or tested"/>
435 </enum>
436
437 <request name="enable_head">
438 <description summary="enable and configure a head">
439 Enable a head. This request creates a head configuration object that can
440 be used to change the head's properties.
441 </description>
442 <arg name="id" type="new_id" interface="zwlr_output_configuration_head_v1"
443 summary="a new object to configure the head"/>
444 <arg name="head" type="object" interface="zwlr_output_head_v1"
445 summary="the head to be enabled"/>
446 </request>
447
448 <request name="disable_head">
449 <description summary="disable a head">
450 Disable a head.
451 </description>
452 <arg name="head" type="object" interface="zwlr_output_head_v1"
453 summary="the head to be disabled"/>
454 </request>
455
456 <request name="apply">
457 <description summary="apply the configuration">
458 Apply the new output configuration.
459
460 In case the configuration is successfully applied, there is no guarantee
461 that the new output state matches completely the requested
462 configuration. For instance, a compositor might round the scale if it
463 doesn't support fractional scaling.
464
465 After this request has been sent, the compositor must respond with an
466 succeeded, failed or cancelled event. Sending a request that isn't the
467 destructor is a protocol error.
468 </description>
469 </request>
470
471 <request name="test">
472 <description summary="test the configuration">
473 Test the new output configuration. The configuration won't be applied,
474 but will only be validated.
475
476 Even if the compositor succeeds to test a configuration, applying it may
477 fail.
478
479 After this request has been sent, the compositor must respond with an
480 succeeded, failed or cancelled event. Sending a request that isn't the
481 destructor is a protocol error.
482 </description>
483 </request>
484
485 <event name="succeeded">
486 <description summary="configuration changes succeeded">
487 Sent after the compositor has successfully applied the changes or
488 tested them.
489
490 Upon receiving this event, the client should destroy this object.
491
492 If the current configuration has changed, events to describe the changes
493 will be sent followed by a wlr_output_manager.done event.
494 </description>
495 </event>
496
497 <event name="failed">
498 <description summary="configuration changes failed">
499 Sent if the compositor rejects the changes or failed to apply them. The
500 compositor should revert any changes made by the apply request that
501 triggered this event.
502
503 Upon receiving this event, the client should destroy this object.
504 </description>
505 </event>
506
507 <event name="cancelled">
508 <description summary="configuration has been cancelled">
509 Sent if the compositor cancels the configuration because the state of an
510 output changed and the client has outdated information (e.g. after an
511 output has been hotplugged).
512
513 The client can create a new configuration with a newer serial and try
514 again.
515
516 Upon receiving this event, the client should destroy this object.
517 </description>
518 </event>
519
520 <request name="destroy" type="destructor">
521 <description summary="destroy the output configuration">
522 Using this request a client can tell the compositor that it is not going
523 to use the configuration object anymore. Any changes to the outputs
524 that have not been applied will be discarded.
525
526 This request also destroys wlr_output_configuration_head objects created
527 via this object.
528 </description>
529 </request>
530 </interface>
531
532 <interface name="zwlr_output_configuration_head_v1" version="4">
533 <description summary="head configuration">
534 This object is used by the client to update a single head's configuration.
535
536 It is a protocol error to set the same property twice.
537 </description>
538
539 <enum name="error">
540 <entry name="already_set" value="1" summary="property has already been set"/>
541 <entry name="invalid_mode" value="2" summary="mode doesn't belong to head"/>
542 <entry name="invalid_custom_mode" value="3" summary="mode is invalid"/>
543 <entry name="invalid_transform" value="4" summary="transform value outside enum"/>
544 <entry name="invalid_scale" value="5" summary="scale negative or zero"/>
545 <entry name="invalid_adaptive_sync_state" value="6" since="4"
546 summary="invalid enum value used in the set_adaptive_sync request"/>
547 </enum>
548
549 <request name="set_mode">
550 <description summary="set the mode">
551 This request sets the head's mode.
552 </description>
553 <arg name="mode" type="object" interface="zwlr_output_mode_v1"/>
554 </request>
555
556 <request name="set_custom_mode">
557 <description summary="set a custom mode">
558 This request assigns a custom mode to the head. The size is given in
559 physical hardware units of the output device. If set to zero, the
560 refresh rate is unspecified.
561
562 It is a protocol error to set both a mode and a custom mode.
563 </description>
564 <arg name="width" type="int" summary="width of the mode in hardware units"/>
565 <arg name="height" type="int" summary="height of the mode in hardware units"/>
566 <arg name="refresh" type="int" summary="vertical refresh rate in mHz or zero"/>
567 </request>
568
569 <request name="set_position">
570 <description summary="set the position">
571 This request sets the head's position in the global compositor space.
572 </description>
573 <arg name="x" type="int" summary="x position in the global compositor space"/>
574 <arg name="y" type="int" summary="y position in the global compositor space"/>
575 </request>
576
577 <request name="set_transform">
578 <description summary="set the transform">
579 This request sets the head's transform.
580 </description>
581 <arg name="transform" type="int" enum="wl_output.transform"/>
582 </request>
583
584 <request name="set_scale">
585 <description summary="set the scale">
586 This request sets the head's scale.
587 </description>
588 <arg name="scale" type="fixed"/>
589 </request>
590
591 <!-- Version 4 additions -->
592
593 <request name="set_adaptive_sync" since="4">
594 <description summary="enable/disable adaptive sync">
595 This request enables/disables adaptive sync. Adaptive sync is also
596 known as Variable Refresh Rate or VRR.
597 </description>
598 <arg name="state" type="uint" enum="zwlr_output_head_v1.adaptive_sync_state"/>
599 </request>
600 </interface>
601 </protocol>