summaryrefslogtreecommitdiff
path: root/src/contrib/SDL-3.2.20/wayland-protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/contrib/SDL-3.2.20/wayland-protocols')
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/alpha-modifier-v1.xml103
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/color-management-v1.xml1631
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/cursor-shape-v1.xml147
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/fractional-scale-v1.xml102
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/frog-color-management-v1.xml356
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/idle-inhibit-unstable-v1.xml83
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/input-timestamps-unstable-v1.xml145
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/keyboard-shortcuts-inhibit-unstable-v1.xml143
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/pointer-constraints-unstable-v1.xml339
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/primary-selection-unstable-v1.xml225
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/relative-pointer-unstable-v1.xml136
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/tablet-v2.xml1178
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/text-input-unstable-v3.xml452
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/viewporter.xml186
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/wayland.xml3151
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-activation-v1.xml186
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-decoration-unstable-v1.xml156
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-dialog-v1.xml110
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-foreign-unstable-v2.xml200
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-output-unstable-v1.xml220
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-shell.xml1370
-rw-r--r--src/contrib/SDL-3.2.20/wayland-protocols/xdg-toplevel-icon-v1.xml203
22 files changed, 10822 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/alpha-modifier-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/alpha-modifier-v1.xml
new file mode 100644
index 0000000..932fa6f
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/alpha-modifier-v1.xml
@@ -0,0 +1,103 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="alpha_modifier_v1">
3 <copyright>
4 Copyright © 2024 Xaver Hugl
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <interface name="wp_alpha_modifier_v1" version="1">
27 <description summary="surface alpha modifier manager">
28 This interface allows a client to set a factor for the alpha values on a
29 surface, which can be used to offload such operations to the compositor,
30 which can in turn for example offload them to KMS.
31
32 Warning! The protocol described in this file is currently in the testing
33 phase. Backward compatible changes may be added together with the
34 corresponding interface version bump. Backward incompatible changes can
35 only be done by creating a new major version of the extension.
36 </description>
37
38 <request name="destroy" type="destructor">
39 <description summary="destroy the alpha modifier manager object">
40 Destroy the alpha modifier manager. This doesn't destroy objects
41 created with the manager.
42 </description>
43 </request>
44
45 <enum name="error">
46 <entry name="already_constructed" value="0"
47 summary="wl_surface already has a alpha modifier object"/>
48 </enum>
49
50 <request name="get_surface">
51 <description summary="create a new toplevel decoration object">
52 Create a new alpha modifier surface object associated with the
53 given wl_surface. If there is already such an object associated with
54 the wl_surface, the already_constructed error will be raised.
55 </description>
56 <arg name="id" type="new_id" interface="wp_alpha_modifier_surface_v1"/>
57 <arg name="surface" type="object" interface="wl_surface"/>
58 </request>
59 </interface>
60
61 <interface name="wp_alpha_modifier_surface_v1" version="1">
62 <description summary="alpha modifier object for a surface">
63 This interface allows the client to set a factor for the alpha values on
64 a surface, which can be used to offload such operations to the compositor.
65 The default factor is UINT32_MAX.
66
67 This object has to be destroyed before the associated wl_surface. Once the
68 wl_surface is destroyed, all request on this object will raise the
69 no_surface error.
70 </description>
71
72 <enum name="error">
73 <entry name="no_surface" value="0" summary="wl_surface was destroyed"/>
74 </enum>
75
76 <request name="destroy" type="destructor">
77 <description summary="destroy the alpha modifier object">
78 This destroys the object, and is equivalent to set_multiplier with
79 a value of UINT32_MAX, with the same double-buffered semantics as
80 set_multiplier.
81 </description>
82 </request>
83
84 <request name="set_multiplier">
85 <description summary="specify the alpha multiplier">
86 Sets the alpha multiplier for the surface. The alpha multiplier is
87 double-buffered state, see wl_surface.commit for details.
88
89 This factor is applied in the compositor's blending space, as an
90 additional step after the processing of per-pixel alpha values for the
91 wl_surface. The exact meaning of the factor is thus undefined, unless
92 the blending space is specified in a different extension.
93
94 This multiplier is applied even if the buffer attached to the
95 wl_surface doesn't have an alpha channel; in that case an alpha value
96 of one is used instead.
97
98 Zero means completely transparent, UINT32_MAX means completely opaque.
99 </description>
100 <arg name="factor" type="uint"/>
101 </request>
102 </interface>
103</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/color-management-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/color-management-v1.xml
new file mode 100644
index 0000000..7f8da78
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/color-management-v1.xml
@@ -0,0 +1,1631 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="color_management_v1">
3 <copyright>
4 Copyright 2019 Sebastian Wick
5 Copyright 2019 Erwin Burema
6 Copyright 2020 AMD
7 Copyright 2020-2024 Collabora, Ltd.
8 Copyright 2024 Xaver Hugl
9 Copyright 2022-2025 Red Hat, Inc.
10
11 Permission is hereby granted, free of charge, to any person obtaining a
12 copy of this software and associated documentation files (the "Software"),
13 to deal in the Software without restriction, including without limitation
14 the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 and/or sell copies of the Software, and to permit persons to whom the
16 Software is furnished to do so, subject to the following conditions:
17
18 The above copyright notice and this permission notice (including the next
19 paragraph) shall be included in all copies or substantial portions of the
20 Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 DEALINGS IN THE SOFTWARE.
29 </copyright>
30
31 <description summary="color management protocol">
32 The aim of the color management extension is to allow clients to know
33 the color properties of outputs, and to tell the compositor about the color
34 properties of their content on surfaces. Doing this enables a compositor
35 to perform automatic color management of content for different outputs
36 according to how content is intended to look like.
37
38 The color properties are represented as an image description object which
39 is immutable after it has been created. A wl_output always has an
40 associated image description that clients can observe. A wl_surface
41 always has an associated preferred image description as a hint chosen by
42 the compositor that clients can also observe. Clients can set an image
43 description on a wl_surface to denote the color characteristics of the
44 surface contents.
45
46 An image description includes SDR and HDR colorimetry and encoding, HDR
47 metadata, and viewing environment parameters. An image description does
48 not include the properties set through color-representation extension.
49 It is expected that the color-representation extension is used in
50 conjunction with the color management extension when necessary,
51 particularly with the YUV family of pixel formats.
52
53 Recommendation ITU-T H.273
54 "Coding-independent code points for video signal type identification"
55 shall be referred to as simply H.273 here.
56
57 The color-and-hdr repository
58 (https://gitlab.freedesktop.org/pq/color-and-hdr) contains
59 background information on the protocol design and legacy color management.
60 It also contains a glossary, learning resources for digital color, tools,
61 samples and more.
62
63 The terminology used in this protocol is based on common color science and
64 color encoding terminology where possible. The glossary in the color-and-hdr
65 repository shall be the authority on the definition of terms in this
66 protocol.
67
68 Warning! The protocol described in this file is currently in the testing
69 phase. Backward compatible changes may be added together with the
70 corresponding interface version bump. Backward incompatible changes can
71 only be done by creating a new major version of the extension.
72 </description>
73
74 <interface name="wp_color_manager_v1" version="1">
75 <description summary="color manager singleton">
76 A singleton global interface used for getting color management extensions
77 for wl_surface and wl_output objects, and for creating client defined
78 image description objects. The extension interfaces allow
79 getting the image description of outputs and setting the image
80 description of surfaces.
81
82 Compositors should never remove this global.
83 </description>
84
85 <request name="destroy" type="destructor">
86 <description summary="destroy the color manager">
87 Destroy the wp_color_manager_v1 object. This does not affect any other
88 objects in any way.
89 </description>
90 </request>
91
92 <enum name="error">
93 <entry name="unsupported_feature" value="0"
94 summary="request not supported"/>
95 <entry name="surface_exists" value="1"
96 summary="color management surface exists already"/>
97 </enum>
98
99 <enum name="render_intent">
100 <description summary="rendering intents">
101 See the ICC.1:2022 specification from the International Color Consortium
102 for more details about rendering intents.
103
104 The principles of ICC defined rendering intents apply with all types of
105 image descriptions, not only those with ICC file profiles.
106
107 Compositors must support the perceptual rendering intent. Other
108 rendering intents are optional.
109 </description>
110
111 <entry name="perceptual" value="0"
112 summary="perceptual"/>
113 <entry name="relative" value="1"
114 summary="media-relative colorimetric"/>
115 <entry name="saturation" value="2"
116 summary="saturation"/>
117 <entry name="absolute" value="3"
118 summary="ICC-absolute colorimetric"/>
119 <entry name="relative_bpc" value="4"
120 summary="media-relative colorimetric + black point compensation"/>
121 </enum>
122
123 <enum name="feature">
124 <description summary="compositor supported features"/>
125
126 <entry name="icc_v2_v4" value="0"
127 summary="create_icc_creator request"/>
128 <entry name="parametric" value="1"
129 summary="create_parametric_creator request"/>
130 <entry name="set_primaries" value="2"
131 summary="parametric set_primaries request"/>
132 <entry name="set_tf_power" value="3"
133 summary="parametric set_tf_power request"/>
134 <entry name="set_luminances" value="4"
135 summary="parametric set_luminances request"/>
136 <entry name="set_mastering_display_primaries" value="5">
137 <description summary="parametric set_mastering_display_primaries request">
138 The compositor supports set_mastering_display_primaries request with a
139 target color volume fully contained inside the primary color volume.
140 </description>
141 </entry>
142 <entry name="extended_target_volume" value="6">
143 <description summary="parametric target exceeds primary color volume">
144 The compositor additionally supports target color volumes that
145 extend outside of the primary color volume.
146
147 This can only be advertised if feature set_mastering_display_primaries
148 is supported as well.
149 </description>
150 </entry>
151 <entry name="windows_scrgb" value="7"
152 summary="get_windows_scrgb request"/>
153 </enum>
154
155 <enum name="primaries">
156 <description summary="named color primaries">
157 Named color primaries used to encode well-known sets of primaries. H.273
158 is the authority, when it comes to the exact values of primaries and
159 authoritative specifications, where an equivalent code point exists.
160
161 A value of 0 is invalid and will never be present in the list of enums.
162
163 Descriptions do list the specifications for convenience.
164 </description>
165
166 <entry name="srgb" value="1">
167 <description summary="Color primaries for the sRGB color space as defined by the BT.709 standard">
168 Color primaries as defined by
169 - Rec. ITU-R BT.709-6
170 - Rec. ITU-R BT.1361-0 conventional colour gamut system and extended
171 colour gamut system (historical)
172 - IEC 61966-2-1 sRGB or sYCC
173 - IEC 61966-2-4
174 - Society of Motion Picture and Television Engineers (SMPTE) RP 177
175 (1993) Annex B
176 Equivalent to H.273 ColourPrimaries code point 1.
177 </description>
178 </entry>
179 <entry name="pal_m" value="2">
180 <description summary="Color primaries for PAL-M as defined by the BT.470 standard">
181 Color primaries as defined by
182 - Rec. ITU-R BT.470-6 System M (historical)
183 - United States National Television System Committee 1953
184 Recommendation for transmission standards for color television
185 - United States Federal Communications Commission (2003) Title 47 Code
186 of Federal Regulations 73.682 (a)(20)
187 Equivalent to H.273 ColourPrimaries code point 4.
188 </description>
189 </entry>
190 <entry name="pal" value="3">
191 <description summary="Color primaries for PAL as defined by the BT.601 standard">
192 Color primaries as defined by
193 - Rec. ITU-R BT.470-6 System B, G (historical)
194 - Rec. ITU-R BT.601-7 625
195 - Rec. ITU-R BT.1358-0 625 (historical)
196 - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
197 Equivalent to H.273 ColourPrimaries code point 5.
198 </description>
199 </entry>
200 <entry name="ntsc" value="4">
201 <description summary="Color primaries for NTSC as defined by the BT.601 standard">
202 Color primaries as defined by
203 - Rec. ITU-R BT.601-7 525
204 - Rec. ITU-R BT.1358-1 525 or 625 (historical)
205 - Rec. ITU-R BT.1700-0 NTSC
206 - SMPTE 170M (2004)
207 - SMPTE 240M (1999) (historical)
208 Equivalent to H.273 ColourPrimaries code point 6 and 7.
209 </description>
210 </entry>
211 <entry name="generic_film" value="5">
212 <description summary="Generic film with colour filters using Illuminant C">
213 Color primaries as defined by H.273 for generic film.
214 Equivalent to H.273 ColourPrimaries code point 8.
215 </description>
216 </entry>
217 <entry name="bt2020" value="6">
218 <description summary="Color primaries as defined by the BT.2020 and BT.2100 standard">
219 Color primaries as defined by
220 - Rec. ITU-R BT.2020-2
221 - Rec. ITU-R BT.2100-0
222 Equivalent to H.273 ColourPrimaries code point 9.
223 </description>
224 </entry>
225 <entry name="cie1931_xyz" value="7">
226 <description summary="Color primaries of the full CIE 1931 XYZ color space">
227 Color primaries as defined as the maximum of the CIE 1931 XYZ color
228 space by
229 - SMPTE ST 428-1
230 - (CIE 1931 XYZ as in ISO 11664-1)
231 Equivalent to H.273 ColourPrimaries code point 10.
232 </description>
233 </entry>
234 <entry name="dci_p3" value="8">
235 <description summary="Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard">
236 Color primaries as defined by Digital Cinema System and published in
237 SMPTE RP 431-2 (2011). Equivalent to H.273 ColourPrimaries code point
238 11.
239 </description>
240 </entry>
241 <entry name="display_p3" value="9">
242 <description summary="Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard">
243 Color primaries as defined by Digital Cinema System and published in
244 SMPTE EG 432-1 (2010).
245 Equivalent to H.273 ColourPrimaries code point 12.
246 </description>
247 </entry>
248 <entry name="adobe_rgb" value="10">
249 <description summary="Color primaries of the Adobe RGB color space as defined by the ISO 12640 standard">
250 Color primaries as defined by Adobe as "Adobe RGB" and later published
251 by ISO 12640-4 (2011).
252 </description>
253 </entry>
254 </enum>
255
256 <enum name="transfer_function">
257 <description summary="named transfer functions">
258 Named transfer functions used to represent well-known transfer
259 characteristics. H.273 is the authority, when it comes to the exact
260 formulas and authoritative specifications, where an equivalent code
261 point exists.
262
263 A value of 0 is invalid and will never be present in the list of enums.
264
265 Descriptions do list the specifications for convenience.
266 </description>
267
268 <entry name="bt1886" value="1">
269 <description summary="BT.1886 display transfer characteristic">
270 Rec. ITU-R BT.1886 is the display transfer characteristic assumed by
271 - Rec. ITU-R BT.601-7 525 and 625
272 - Rec. ITU-R BT.709-6
273 - Rec. ITU-R BT.2020-2
274 These recommendations are referred to by H.273 TransferCharacteristics
275 code points 1, 6, 14, and 15, which are all equivalent.
276
277 This TF implies these default luminances from Rec. ITU-R BT.2035:
278 - primary color volume minimum: 0.01 cd/m²
279 - primary color volume maximum: 100 cd/m²
280 - reference white: 100 cd/m²
281 </description>
282 </entry>
283 <entry name="gamma22" value="2">
284 <description summary="Assumed display gamma 2.2 transfer function">
285 Transfer characteristics as defined by
286 - Rec. ITU-R BT.470-6 System M (historical)
287 - United States National Television System Committee 1953
288 Recommendation for transmission standards for color television
289 - United States Federal Communications Commission (2003) Title 47 Code
290 of Federal Regulations 73.682 (a) (20)
291 - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
292 Equivalent to H.273 TransferCharacteristics code point 4.
293 </description>
294 </entry>
295 <entry name="gamma28" value="3">
296 <description summary="Assumed display gamma 2.8 transfer function">
297 Transfer characteristics as defined by
298 - Rec. ITU-R BT.470-6 System B, G (historical)
299 Equivalent to H.273 TransferCharacteristics code point 5.
300 </description>
301 </entry>
302 <entry name="st240" value="4">
303 <description summary="SMPTE ST 240 transfer function">
304 Transfer characteristics as defined by
305 - SMPTE ST 240 (1999)
306 Equivalent to H.273 TransferCharacteristics code point 7.
307 </description>
308 </entry>
309 <entry name="ext_linear" value="5">
310 <description summary="extended linear transfer function">
311 Linear transfer function defined over all real numbers.
312 Normalised electrical values are equal the normalised optical values.
313
314 The differences to H.273 TransferCharacteristics code point 8 are
315 the definition over all real numbers.
316 </description>
317 </entry>
318 <entry name="log_100" value="6">
319 <description summary="logarithmic 100:1 transfer function">
320 Logarithmic transfer characteristic (100:1 range).
321 Equivalent to H.273 TransferCharacteristics code point 9.
322 </description>
323 </entry>
324 <entry name="log_316" value="7">
325 <description summary="logarithmic (100*Sqrt(10) : 1) transfer function">
326 Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
327 Equivalent to H.273 TransferCharacteristics code point 10.
328 </description>
329 </entry>
330 <entry name="xvycc" value="8">
331 <description summary="IEC 61966-2-4 transfer function">
332 Transfer characteristics as defined by
333 - IEC 61966-2-4
334 Equivalent to H.273 TransferCharacteristics code point 11.
335 </description>
336 </entry>
337 <entry name="srgb" value="9">
338 <description summary="sRGB piece-wise transfer function">
339 Transfer characteristics as defined by
340 - IEC 61966-2-1 sRGB
341 Equivalent to H.273 TransferCharacteristics code point 13 with
342 MatrixCoefficients set to 0.
343 </description>
344 </entry>
345 <entry name="ext_srgb" value="10">
346 <description summary="Extended sRGB piece-wise transfer function">
347 Transfer characteristics as defined by
348 - IEC 61966-2-1 sYCC
349 Equivalent to H.273 TransferCharacteristics code point 13 with
350 MatrixCoefficients set to anything but 0.
351 </description>
352 </entry>
353 <entry name="st2084_pq" value="11">
354 <description summary="perceptual quantizer transfer function">
355 Transfer characteristics as defined by
356 - SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems
357 - Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
358 Equivalent to H.273 TransferCharacteristics code point 16.
359
360 This TF implies these default luminances
361 - primary color volume minimum: 0.005 cd/m²
362 - primary color volume maximum: 10000 cd/m²
363 - reference white: 203 cd/m²
364
365 The difference between the primary color volume minimum and maximum
366 must be approximately 10000 cd/m² as that is the swing of the EOTF
367 defined by ST 2084 and BT.2100. The default value for the
368 reference white is a protocol addition: it is suggested by
369 Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100.
370 </description>
371 </entry>
372 <entry name="st428" value="12">
373 <description summary="SMPTE ST 428 transfer function">
374 Transfer characteristics as defined by
375 - SMPTE ST 428-1 (2019)
376 Equivalent to H.273 TransferCharacteristics code point 17.
377 </description>
378 </entry>
379 <entry name="hlg" value="13">
380 <description summary="hybrid log-gamma transfer function">
381 Transfer characteristics as defined by
382 - ARIB STD-B67 (2015)
383 - Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system
384 Equivalent to H.273 TransferCharacteristics code point 18.
385
386 This TF implies these default luminances
387 - primary color volume minimum: 0.005 cd/m²
388 - primary color volume maximum: 1000 cd/m²
389 - reference white: 203 cd/m²
390
391 HLG is a relative display-referred signal with a specified
392 non-linear mapping to the display peak luminance (the HLG OOTF).
393 All absolute luminance values used here for HLG assume a 1000 cd/m²
394 peak display.
395
396 The default value for the reference white is a protocol addition:
397 it is suggested by Report ITU-R BT.2408-7 and is not part of
398 ARIB STD-B67 or BT.2100.
399 </description>
400 </entry>
401 </enum>
402
403 <request name="get_output">
404 <description summary="create a color management interface for a wl_output">
405 This creates a new wp_color_management_output_v1 object for the
406 given wl_output.
407
408 See the wp_color_management_output_v1 interface for more details.
409 </description>
410
411 <arg name="id" type="new_id" interface="wp_color_management_output_v1"/>
412 <arg name="output" type="object" interface="wl_output"/>
413 </request>
414
415 <request name="get_surface">
416 <description summary="create a color management interface for a wl_surface">
417 If a wp_color_management_surface_v1 object already exists for the given
418 wl_surface, the protocol error surface_exists is raised.
419
420 This creates a new color wp_color_management_surface_v1 object for the
421 given wl_surface.
422
423 See the wp_color_management_surface_v1 interface for more details.
424 </description>
425
426 <arg name="id" type="new_id" interface="wp_color_management_surface_v1"/>
427 <arg name="surface" type="object" interface="wl_surface"/>
428 </request>
429
430 <request name="get_surface_feedback">
431 <description summary="create a color management feedback interface">
432 This creates a new color wp_color_management_surface_feedback_v1 object
433 for the given wl_surface.
434
435 See the wp_color_management_surface_feedback_v1 interface for more
436 details.
437 </description>
438
439 <arg name="id" type="new_id"
440 interface="wp_color_management_surface_feedback_v1"/>
441 <arg name="surface" type="object" interface="wl_surface"/>
442 </request>
443
444 <request name="create_icc_creator">
445 <description summary="make a new ICC-based image description creator object">
446 Makes a new ICC-based image description creator object with all
447 properties initially unset. The client can then use the object's
448 interface to define all the required properties for an image description
449 and finally create a wp_image_description_v1 object.
450
451 This request can be used when the compositor advertises
452 wp_color_manager_v1.feature.icc_v2_v4.
453 Otherwise this request raises the protocol error unsupported_feature.
454 </description>
455
456 <arg name="obj"
457 type="new_id" interface="wp_image_description_creator_icc_v1"
458 summary="the new creator object"/>
459 </request>
460
461 <request name="create_parametric_creator">
462 <description summary="make a new parametric image description creator object">
463 Makes a new parametric image description creator object with all
464 properties initially unset. The client can then use the object's
465 interface to define all the required properties for an image description
466 and finally create a wp_image_description_v1 object.
467
468 This request can be used when the compositor advertises
469 wp_color_manager_v1.feature.parametric.
470 Otherwise this request raises the protocol error unsupported_feature.
471 </description>
472
473 <arg name="obj"
474 type="new_id" interface="wp_image_description_creator_params_v1"
475 summary="the new creator object"/>
476 </request>
477
478 <request name="create_windows_scrgb">
479 <description summary="create Windows-scRGB image description object">
480 This creates a pre-defined image description for the so-called
481 Windows-scRGB stimulus encoding. This comes from the Windows 10 handling
482 of its own definition of an scRGB color space for an HDR screen
483 driven in BT.2100/PQ signalling mode.
484
485 Windows-scRGB uses sRGB (BT.709) color primaries and white point.
486 The transfer characteristic is extended linear.
487
488 The nominal color channel value range is extended, meaning it includes
489 negative and greater than 1.0 values. Negative values are used to
490 escape the sRGB color gamut boundaries. To make use of the extended
491 range, the client needs to use a pixel format that can represent those
492 values, e.g. floating-point 16 bits per channel.
493
494 Nominal color value R=G=B=0.0 corresponds to BT.2100/PQ system
495 0 cd/m², and R=G=B=1.0 corresponds to BT.2100/PQ system 80 cd/m².
496 The maximum is R=G=B=125.0 corresponding to 10k cd/m².
497
498 Windows-scRGB is displayed by Windows 10 by converting it to
499 BT.2100/PQ, maintaining the CIE 1931 chromaticity and mapping the
500 luminance as above. No adjustment is made to the signal to account
501 for the viewing conditions.
502
503 The reference white level of Windows-scRGB is unknown. If a
504 reference white level must be assumed for compositor processing, it
505 should be R=G=B=2.5375 corresponding to 203 cd/m² of Report ITU-R
506 BT.2408-7.
507
508 The target color volume of Windows-scRGB is unknown. The color gamut
509 may be anything between sRGB and BT.2100.
510
511 Note: EGL_EXT_gl_colorspace_scrgb_linear definition differs from
512 Windows-scRGB by using R=G=B=1.0 as the reference white level, while
513 Windows-scRGB reference white level is unknown or varies. However,
514 it seems probable that Windows implements both
515 EGL_EXT_gl_colorspace_scrgb_linear and Vulkan
516 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT as Windows-scRGB.
517
518 This request can be used when the compositor advertises
519 wp_color_manager_v1.feature.windows_scrgb.
520 Otherwise this request raises the protocol error unsupported_feature.
521
522 The resulting image description object does not allow get_information
523 request. The wp_image_description_v1.ready event shall be sent.
524 </description>
525
526 <arg name="image_description"
527 type="new_id" interface="wp_image_description_v1"/>
528 </request>
529
530 <event name="supported_intent">
531 <description summary="supported rendering intent">
532 When this object is created, it shall immediately send this event once
533 for each rendering intent the compositor supports.
534 </description>
535
536 <arg name="render_intent" type="uint" enum="render_intent"
537 summary="rendering intent"/>
538 </event>
539
540 <event name="supported_feature">
541 <description summary="supported features">
542 When this object is created, it shall immediately send this event once
543 for each compositor supported feature listed in the enumeration.
544 </description>
545
546 <arg name="feature" type="uint" enum="feature"
547 summary="supported feature"/>
548 </event>
549
550 <event name="supported_tf_named">
551 <description summary="supported named transfer characteristic">
552 When this object is created, it shall immediately send this event once
553 for each named transfer function the compositor supports with the
554 parametric image description creator.
555 </description>
556
557 <arg name="tf" type="uint" enum="transfer_function"
558 summary="Named transfer function"/>
559 </event>
560
561 <event name="supported_primaries_named">
562 <description summary="supported named primaries">
563 When this object is created, it shall immediately send this event once
564 for each named set of primaries the compositor supports with the
565 parametric image description creator.
566 </description>
567
568 <arg name="primaries" type="uint" enum="primaries"
569 summary="Named color primaries"/>
570 </event>
571
572 <event name="done">
573 <description summary="all features have been sent">
574 This event is sent when all supported rendering intents, features,
575 transfer functions and named primaries have been sent.
576 </description>
577 </event>
578 </interface>
579
580 <interface name="wp_color_management_output_v1" version="1">
581 <description summary="output color properties">
582 A wp_color_management_output_v1 describes the color properties of an
583 output.
584
585 The wp_color_management_output_v1 is associated with the wl_output global
586 underlying the wl_output object. Therefore the client destroying the
587 wl_output object has no impact, but the compositor removing the output
588 global makes the wp_color_management_output_v1 object inert.
589 </description>
590
591 <request name="destroy" type="destructor">
592 <description summary="destroy the color management output">
593 Destroy the color wp_color_management_output_v1 object. This does not
594 affect any remaining protocol objects.
595 </description>
596 </request>
597
598 <event name="image_description_changed">
599 <description summary="image description changed">
600 This event is sent whenever the image description of the output changed,
601 followed by one wl_output.done event common to output events across all
602 extensions.
603
604 If the client wants to use the updated image description, it needs to do
605 get_image_description again, because image description objects are
606 immutable.
607 </description>
608 </event>
609
610 <request name="get_image_description">
611 <description summary="get the image description of the output">
612 This creates a new wp_image_description_v1 object for the current image
613 description of the output. There always is exactly one image description
614 active for an output so the client should destroy the image description
615 created by earlier invocations of this request. This request is usually
616 sent as a reaction to the image_description_changed event or when
617 creating a wp_color_management_output_v1 object.
618
619 The image description of an output represents the color encoding the
620 output expects. There might be performance and power advantages, as well
621 as improved color reproduction, if a content update matches the image
622 description of the output it is being shown on. If a content update is
623 shown on any other output than the one it matches the image description
624 of, then the color reproduction on those outputs might be considerably
625 worse.
626
627 The created wp_image_description_v1 object preserves the image
628 description of the output from the time the object was created.
629
630 The resulting image description object allows get_information request.
631
632 If this protocol object is inert, the resulting image description object
633 shall immediately deliver the wp_image_description_v1.failed event with
634 the no_output cause.
635
636 If the interface version is inadequate for the output's image
637 description, meaning that the client does not support all the events
638 needed to deliver the crucial information, the resulting image
639 description object shall immediately deliver the
640 wp_image_description_v1.failed event with the low_version cause.
641
642 Otherwise the object shall immediately deliver the ready event.
643 </description>
644
645 <arg name="image_description"
646 type="new_id" interface="wp_image_description_v1"/>
647 </request>
648 </interface>
649
650 <interface name="wp_color_management_surface_v1" version="1">
651 <description summary="color management extension to a surface">
652 A wp_color_management_surface_v1 allows the client to set the color
653 space and HDR properties of a surface.
654
655 If the wl_surface associated with the wp_color_management_surface_v1 is
656 destroyed, the wp_color_management_surface_v1 object becomes inert.
657 </description>
658
659 <request name="destroy" type="destructor">
660 <description summary="destroy the color management interface for a surface">
661 Destroy the wp_color_management_surface_v1 object and do the same as
662 unset_image_description.
663 </description>
664 </request>
665
666 <enum name="error">
667 <description summary="protocol errors"/>
668 <entry name="render_intent" value="0"
669 summary="unsupported rendering intent"/>
670 <entry name="image_description" value="1"
671 summary="invalid image description"/>
672 <entry name="inert" value="2"
673 summary="forbidden request on inert object"/>
674 </enum>
675
676 <request name="set_image_description">
677 <description summary="set the surface image description">
678 If this protocol object is inert, the protocol error inert is raised.
679
680 Set the image description of the underlying surface. The image
681 description and rendering intent are double-buffered state, see
682 wl_surface.commit.
683
684 It is the client's responsibility to understand the image description
685 it sets on a surface, and to provide content that matches that image
686 description. Compositors might convert images to match their own or any
687 other image descriptions.
688
689 Image descriptions which are not ready (see wp_image_description_v1)
690 are forbidden in this request, and in such case the protocol error
691 image_description is raised.
692
693 All image descriptions which are ready (see wp_image_description_v1)
694 are allowed and must always be accepted by the compositor.
695
696 A rendering intent provides the client's preference on how content
697 colors should be mapped to each output. The render_intent value must
698 be one advertised by the compositor with
699 wp_color_manager_v1.render_intent event, otherwise the protocol error
700 render_intent is raised.
701
702 When an image description is set on a surface, the Transfer
703 Characteristics of the image description defines the valid range of
704 the nominal (real-valued) color channel values. The processing of
705 out-of-range color channel values is undefined, but compositors are
706 recommended to clamp the values to the valid range when possible.
707
708 By default, a surface does not have an associated image description
709 nor a rendering intent. The handling of color on such surfaces is
710 compositor implementation defined. Compositors should handle such
711 surfaces as sRGB, but may handle them differently if they have specific
712 requirements.
713
714 Setting the image description has copy semantics; after this request,
715 the image description can be immediately destroyed without affecting
716 the pending state of the surface.
717 </description>
718
719 <arg name="image_description"
720 type="object" interface="wp_image_description_v1"/>
721 <arg name="render_intent"
722 type="uint" enum="wp_color_manager_v1.render_intent"
723 summary="rendering intent"/>
724 </request>
725
726 <request name="unset_image_description">
727 <description summary="remove the surface image description">
728 If this protocol object is inert, the protocol error inert is raised.
729
730 This request removes any image description from the surface. See
731 set_image_description for how a compositor handles a surface without
732 an image description. This is double-buffered state, see
733 wl_surface.commit.
734 </description>
735 </request>
736 </interface>
737
738 <interface name="wp_color_management_surface_feedback_v1" version="1">
739 <description summary="color management extension to a surface">
740 A wp_color_management_surface_feedback_v1 allows the client to get the
741 preferred image description of a surface.
742
743 If the wl_surface associated with this object is destroyed, the
744 wp_color_management_surface_feedback_v1 object becomes inert.
745 </description>
746
747 <request name="destroy" type="destructor">
748 <description summary="destroy the color management interface for a surface">
749 Destroy the wp_color_management_surface_feedback_v1 object.
750 </description>
751 </request>
752
753 <enum name="error">
754 <description summary="protocol errors"/>
755 <entry name="inert" value="0"
756 summary="forbidden request on inert object"/>
757 <entry name="unsupported_feature" value="1"
758 summary="attempted to use an unsupported feature"/>
759 </enum>
760
761 <event name="preferred_changed">
762 <description summary="the preferred image description changed">
763 The preferred image description is the one which likely has the most
764 performance and/or quality benefits for the compositor if used by the
765 client for its wl_surface contents. This event is sent whenever the
766 compositor changes the wl_surface's preferred image description.
767
768 This event sends the identity of the new preferred state as the argument,
769 so clients who are aware of the image description already can reuse it.
770 Otherwise, if the client client wants to know what the preferred image
771 description is, it shall use the get_preferred request.
772
773 The preferred image description is not automatically used for anything.
774 It is only a hint, and clients may set any valid image description with
775 set_image_description, but there might be performance and color accuracy
776 improvements by providing the wl_surface contents in the preferred
777 image description. Therefore clients that can, should render according
778 to the preferred image description
779 </description>
780
781 <arg name="identity" type="uint" summary="image description id number"/>
782 </event>
783
784 <request name="get_preferred">
785 <description summary="get the preferred image description">
786 If this protocol object is inert, the protocol error inert is raised.
787
788 The preferred image description represents the compositor's preferred
789 color encoding for this wl_surface at the current time. There might be
790 performance and power advantages, as well as improved color
791 reproduction, if the image description of a content update matches the
792 preferred image description.
793
794 This creates a new wp_image_description_v1 object for the currently
795 preferred image description for the wl_surface. The client should
796 stop using and destroy the image descriptions created by earlier
797 invocations of this request for the associated wl_surface.
798 This request is usually sent as a reaction to the preferred_changed
799 event or when creating a wp_color_management_surface_feedback_v1 object
800 if the client is capable of adapting to image descriptions.
801
802 The created wp_image_description_v1 object preserves the preferred image
803 description of the wl_surface from the time the object was created.
804
805 The resulting image description object allows get_information request.
806
807 If the image description is parametric, the client should set it on its
808 wl_surface only if the image description is an exact match with the
809 client content. Particularly if everything else matches, but the target
810 color volume is greater than what the client needs, the client should
811 create its own parameric image description with its exact parameters.
812
813 If the interface version is inadequate for the preferred image
814 description, meaning that the client does not support all the
815 events needed to deliver the crucial information, the resulting image
816 description object shall immediately deliver the
817 wp_image_description_v1.failed event with the low_version cause,
818 otherwise the object shall immediately deliver the ready event.
819 </description>
820
821 <arg name="image_description"
822 type="new_id" interface="wp_image_description_v1"/>
823 </request>
824
825 <request name="get_preferred_parametric">
826 <description summary="get the preferred image description">
827 The same description as for get_preferred applies, except the returned
828 image description is guaranteed to be parametric. This is meant for
829 clients that can only deal with parametric image descriptions.
830
831 If the compositor doesn't support parametric image descriptions, the
832 unsupported_feature error is emitted.
833 </description>
834
835 <arg name="image_description"
836 type="new_id" interface="wp_image_description_v1"/>
837 </request>
838 </interface>
839
840 <interface name="wp_image_description_creator_icc_v1" version="1">
841 <description summary="holder of image description ICC information">
842 This type of object is used for collecting all the information required
843 to create a wp_image_description_v1 object from an ICC file. A complete
844 set of required parameters consists of these properties:
845 - ICC file
846
847 Each required property must be set exactly once if the client is to create
848 an image description. The set requests verify that a property was not
849 already set. The create request verifies that all required properties are
850 set. There may be several alternative requests for setting each property,
851 and in that case the client must choose one of them.
852
853 Once all properties have been set, the create request must be used to
854 create the image description object, destroying the creator in the
855 process.
856 </description>
857
858 <enum name="error">
859 <description summary="protocol errors"/>
860
861 <entry name="incomplete_set" value="0"
862 summary="incomplete parameter set"/>
863 <entry name="already_set" value="1"
864 summary="property already set"/>
865 <entry name="bad_fd" value="2"
866 summary="fd not seekable and readable"/>
867 <entry name="bad_size" value="3"
868 summary="no or too much data"/>
869 <entry name="out_of_file" value="4"
870 summary="offset + length exceeds file size"/>
871 </enum>
872
873 <request name="create" type="destructor">
874 <description summary="Create the image description object from ICC data">
875 Create an image description object based on the ICC information
876 previously set on this object. A compositor must parse the ICC data in
877 some undefined but finite amount of time.
878
879 The completeness of the parameter set is verified. If the set is not
880 complete, the protocol error incomplete_set is raised. For the
881 definition of a complete set, see the description of this interface.
882
883 If the particular combination of the information is not supported
884 by the compositor, the resulting image description object shall
885 immediately deliver the wp_image_description_v1.failed event with the
886 'unsupported' cause. If a valid image description was created from the
887 information, the wp_image_description_v1.ready event will eventually
888 be sent instead.
889
890 This request destroys the wp_image_description_creator_icc_v1 object.
891
892 The resulting image description object does not allow get_information
893 request.
894 </description>
895
896 <arg name="image_description"
897 type="new_id" interface="wp_image_description_v1"/>
898 </request>
899
900 <request name="set_icc_file">
901 <description summary="set the ICC profile file">
902 Sets the ICC profile file to be used as the basis of the image
903 description.
904
905 The data shall be found through the given fd at the given offset, having
906 the given length. The fd must be seekable and readable. Violating these
907 requirements raises the bad_fd protocol error.
908
909 If reading the data fails due to an error independent of the client, the
910 compositor shall send the wp_image_description_v1.failed event on the
911 created wp_image_description_v1 with the 'operating_system' cause.
912
913 The maximum size of the ICC profile is 32 MB. If length is greater than
914 that or zero, the protocol error bad_size is raised. If offset + length
915 exceeds the file size, the protocol error out_of_file is raised.
916
917 A compositor may read the file at any time starting from this request
918 and only until whichever happens first:
919 - If create request was issued, the wp_image_description_v1 object
920 delivers either failed or ready event; or
921 - if create request was not issued, this
922 wp_image_description_creator_icc_v1 object is destroyed.
923
924 A compositor shall not modify the contents of the file, and the fd may
925 be sealed for writes and size changes. The client must ensure to its
926 best ability that the data does not change while the compositor is
927 reading it.
928
929 The data must represent a valid ICC profile. The ICC profile version
930 must be 2 or 4, it must be a 3 channel profile and the class must be
931 Display or ColorSpace. Violating these requirements will not result in a
932 protocol error, but will eventually send the
933 wp_image_description_v1.failed event on the created
934 wp_image_description_v1 with the 'unsupported' cause.
935
936 See the International Color Consortium specification ICC.1:2022 for more
937 details about ICC profiles.
938
939 If ICC file has already been set on this object, the protocol error
940 already_set is raised.
941 </description>
942
943 <arg name="icc_profile" type="fd"
944 summary="ICC profile"/>
945 <arg name="offset" type="uint"
946 summary="byte offset in fd to start of ICC data"/>
947 <arg name="length" type="uint"
948 summary="length of ICC data in bytes"/>
949 </request>
950 </interface>
951
952 <interface name="wp_image_description_creator_params_v1" version="1">
953 <description summary="holder of image description parameters">
954 This type of object is used for collecting all the parameters required
955 to create a wp_image_description_v1 object. A complete set of required
956 parameters consists of these properties:
957 - transfer characteristic function (tf)
958 - chromaticities of primaries and white point (primary color volume)
959
960 The following properties are optional and have a well-defined default
961 if not explicitly set:
962 - primary color volume luminance range
963 - reference white luminance level
964 - mastering display primaries and white point (target color volume)
965 - mastering luminance range
966
967 The following properties are optional and will be ignored
968 if not explicitly set:
969 - maximum content light level
970 - maximum frame-average light level
971
972 Each required property must be set exactly once if the client is to create
973 an image description. The set requests verify that a property was not
974 already set. The create request verifies that all required properties are
975 set. There may be several alternative requests for setting each property,
976 and in that case the client must choose one of them.
977
978 Once all properties have been set, the create request must be used to
979 create the image description object, destroying the creator in the
980 process.
981 </description>
982
983 <enum name="error">
984 <description summary="protocol errors"/>
985
986 <entry name="incomplete_set" value="0"
987 summary="incomplete parameter set"/>
988 <entry name="already_set" value="1"
989 summary="property already set"/>
990 <entry name="unsupported_feature" value="2"
991 summary="request not supported"/>
992 <entry name="invalid_tf" value="3"
993 summary="invalid transfer characteristic"/>
994 <entry name="invalid_primaries_named" value="4"
995 summary="invalid primaries named"/>
996 <entry name="invalid_luminance" value="5"
997 summary="invalid luminance value or range"/>
998 </enum>
999
1000 <request name="create" type="destructor">
1001 <description summary="Create the image description object using params">
1002 Create an image description object based on the parameters previously
1003 set on this object.
1004
1005 The completeness of the parameter set is verified. If the set is not
1006 complete, the protocol error incomplete_set is raised. For the
1007 definition of a complete set, see the description of this interface.
1008
1009 The protocol error invalid_luminance is raised if any of the following
1010 requirements is not met:
1011 - When max_cll is set, it must be greater than min L and less or equal
1012 to max L of the mastering luminance range.
1013 - When max_fall is set, it must be greater than min L and less or equal
1014 to max L of the mastering luminance range.
1015 - When both max_cll and max_fall are set, max_fall must be less or equal
1016 to max_cll.
1017
1018 If the particular combination of the parameter set is not supported
1019 by the compositor, the resulting image description object shall
1020 immediately deliver the wp_image_description_v1.failed event with the
1021 'unsupported' cause. If a valid image description was created from the
1022 parameter set, the wp_image_description_v1.ready event will eventually
1023 be sent instead.
1024
1025 This request destroys the wp_image_description_creator_params_v1
1026 object.
1027
1028 The resulting image description object does not allow get_information
1029 request.
1030 </description>
1031
1032 <arg name="image_description"
1033 type="new_id" interface="wp_image_description_v1"/>
1034 </request>
1035
1036 <request name="set_tf_named">
1037 <description summary="named transfer characteristic">
1038 Sets the transfer characteristic using explicitly enumerated named
1039 functions.
1040
1041 When the resulting image description is attached to an image, the
1042 content should be encoded and decoded according to the industry standard
1043 practices for the transfer characteristic.
1044
1045 Only names advertised with wp_color_manager_v1 event supported_tf_named
1046 are allowed. Other values shall raise the protocol error invalid_tf.
1047
1048 If transfer characteristic has already been set on this object, the
1049 protocol error already_set is raised.
1050 </description>
1051
1052 <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
1053 summary="named transfer function"/>
1054 </request>
1055
1056 <request name="set_tf_power">
1057 <description summary="transfer characteristic as a power curve">
1058 Sets the color component transfer characteristic to a power curve with
1059 the given exponent. Negative values are handled by mirroring the
1060 positive half of the curve through the origin. The valid domain and
1061 range of the curve are all finite real numbers. This curve represents
1062 the conversion from electrical to optical color channel values.
1063
1064 When the resulting image description is attached to an image, the
1065 content should be encoded with the inverse of the power curve.
1066
1067 The curve exponent shall be multiplied by 10000 to get the argument eexp
1068 value to carry the precision of 4 decimals.
1069
1070 The curve exponent must be at least 1.0 and at most 10.0. Otherwise the
1071 protocol error invalid_tf is raised.
1072
1073 If transfer characteristic has already been set on this object, the
1074 protocol error already_set is raised.
1075
1076 This request can be used when the compositor advertises
1077 wp_color_manager_v1.feature.set_tf_power. Otherwise this request raises
1078 the protocol error unsupported_feature.
1079 </description>
1080
1081 <arg name="eexp" type="uint" summary="the exponent * 10000"/>
1082 </request>
1083
1084 <request name="set_primaries_named">
1085 <description summary="named primaries">
1086 Sets the color primaries and white point using explicitly named sets.
1087 This describes the primary color volume which is the basis for color
1088 value encoding.
1089
1090 Only names advertised with wp_color_manager_v1 event
1091 supported_primaries_named are allowed. Other values shall raise the
1092 protocol error invalid_primaries_named.
1093
1094 If primaries have already been set on this object, the protocol error
1095 already_set is raised.
1096 </description>
1097
1098 <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
1099 summary="named primaries"/>
1100 </request>
1101
1102 <request name="set_primaries">
1103 <description summary="primaries as chromaticity coordinates">
1104 Sets the color primaries and white point using CIE 1931 xy chromaticity
1105 coordinates. This describes the primary color volume which is the basis
1106 for color value encoding.
1107
1108 Each coordinate value is multiplied by 1 million to get the argument
1109 value to carry precision of 6 decimals.
1110
1111 If primaries have already been set on this object, the protocol error
1112 already_set is raised.
1113
1114 This request can be used if the compositor advertises
1115 wp_color_manager_v1.feature.set_primaries. Otherwise this request raises
1116 the protocol error unsupported_feature.
1117 </description>
1118
1119 <arg name="r_x" type="int" summary="Red x * 1M"/>
1120 <arg name="r_y" type="int" summary="Red y * 1M"/>
1121 <arg name="g_x" type="int" summary="Green x * 1M"/>
1122 <arg name="g_y" type="int" summary="Green y * 1M"/>
1123 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1124 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1125 <arg name="w_x" type="int" summary="White x * 1M"/>
1126 <arg name="w_y" type="int" summary="White y * 1M"/>
1127 </request>
1128
1129 <request name="set_luminances">
1130 <description summary="primary color volume luminance range and reference white">
1131 Sets the primary color volume luminance range and the reference white
1132 luminance level. These values include the minimum display emission
1133 and ambient flare luminances, assumed to be optically additive and have
1134 the chromaticity of the primary color volume white point.
1135
1136 The default luminances from
1137 https://www.color.org/chardata/rgb/srgb.xalter are
1138 - primary color volume minimum: 0.2 cd/m²
1139 - primary color volume maximum: 80 cd/m²
1140 - reference white: 80 cd/m²
1141
1142 Setting a named transfer characteristic can imply other default
1143 luminances.
1144
1145 The default luminances get overwritten when this request is used.
1146 With transfer_function.st2084_pq the given 'max_lum' value is ignored,
1147 and 'max_lum' is taken as 'min_lum' + 10000 cd/m².
1148
1149 'min_lum' and 'max_lum' specify the minimum and maximum luminances of
1150 the primary color volume as reproduced by the targeted display.
1151
1152 'reference_lum' specifies the luminance of the reference white as
1153 reproduced by the targeted display, and reflects the targeted viewing
1154 environment.
1155
1156 Compositors should make sure that all content is anchored, meaning that
1157 an input signal level of 'reference_lum' on one image description and
1158 another input signal level of 'reference_lum' on another image
1159 description should produce the same output level, even though the
1160 'reference_lum' on both image representations can be different.
1161
1162 'reference_lum' may be higher than 'max_lum'. In that case reaching
1163 the reference white output level in image content requires the
1164 'extended_target_volume' feature support.
1165
1166 If 'max_lum' or 'reference_lum' are less than or equal to 'min_lum',
1167 the protocol error invalid_luminance is raised.
1168
1169 The minimum luminance is multiplied by 10000 to get the argument
1170 'min_lum' value and carries precision of 4 decimals. The maximum
1171 luminance and reference white luminance values are unscaled.
1172
1173 If the primary color volume luminance range and the reference white
1174 luminance level have already been set on this object, the protocol error
1175 already_set is raised.
1176
1177 This request can be used if the compositor advertises
1178 wp_color_manager_v1.feature.set_luminances. Otherwise this request
1179 raises the protocol error unsupported_feature.
1180 </description>
1181
1182 <arg name="min_lum" type="uint"
1183 summary="minimum luminance (cd/m²) * 10000"/>
1184 <arg name="max_lum" type="uint"
1185 summary="maximum luminance (cd/m²)"/>
1186 <arg name="reference_lum" type="uint"
1187 summary="reference white luminance (cd/m²)"/>
1188 </request>
1189
1190 <request name="set_mastering_display_primaries">
1191 <description summary="mastering display primaries as chromaticity coordinates">
1192 Provides the color primaries and white point of the mastering display
1193 using CIE 1931 xy chromaticity coordinates. This is compatible with the
1194 SMPTE ST 2086 definition of HDR static metadata.
1195
1196 The mastering display primaries and mastering display luminances define
1197 the target color volume.
1198
1199 If mastering display primaries are not explicitly set, the target color
1200 volume is assumed to have the same primaries as the primary color volume.
1201
1202 The target color volume is defined by all tristimulus values between 0.0
1203 and 1.0 (inclusive) of the color space defined by the given mastering
1204 display primaries and white point. The colorimetry is identical between
1205 the container color space and the mastering display color space,
1206 including that no chromatic adaptation is applied even if the white
1207 points differ.
1208
1209 The target color volume can exceed the primary color volume to allow for
1210 a greater color volume with an existing color space definition (for
1211 example scRGB). It can be smaller than the primary color volume to
1212 minimize gamut and tone mapping distances for big color spaces (HDR
1213 metadata).
1214
1215 To make use of the entire target color volume a suitable pixel format
1216 has to be chosen (e.g. floating point to exceed the primary color
1217 volume, or abusing limited quantization range as with xvYCC).
1218
1219 Each coordinate value is multiplied by 1 million to get the argument
1220 value to carry precision of 6 decimals.
1221
1222 If mastering display primaries have already been set on this object, the
1223 protocol error already_set is raised.
1224
1225 This request can be used if the compositor advertises
1226 wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
1227 this request raises the protocol error unsupported_feature. The
1228 advertisement implies support only for target color volumes fully
1229 contained within the primary color volume.
1230
1231 If a compositor additionally supports target color volume exceeding the
1232 primary color volume, it must advertise
1233 wp_color_manager_v1.feature.extended_target_volume. If a client uses
1234 target color volume exceeding the primary color volume and the
1235 compositor does not support it, the result is implementation defined.
1236 Compositors are recommended to detect this case and fail the image
1237 description gracefully, but it may as well result in color artifacts.
1238 </description>
1239
1240 <arg name="r_x" type="int" summary="Red x * 1M"/>
1241 <arg name="r_y" type="int" summary="Red y * 1M"/>
1242 <arg name="g_x" type="int" summary="Green x * 1M"/>
1243 <arg name="g_y" type="int" summary="Green y * 1M"/>
1244 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1245 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1246 <arg name="w_x" type="int" summary="White x * 1M"/>
1247 <arg name="w_y" type="int" summary="White y * 1M"/>
1248 </request>
1249
1250 <request name="set_mastering_luminance">
1251 <description summary="display mastering luminance range">
1252 Sets the luminance range that was used during the content mastering
1253 process as the minimum and maximum absolute luminance L. These values
1254 include the minimum display emission and ambient flare luminances,
1255 assumed to be optically additive and have the chromaticity of the
1256 primary color volume white point. This should be
1257 compatible with the SMPTE ST 2086 definition of HDR static metadata.
1258
1259 The mastering display primaries and mastering display luminances define
1260 the target color volume.
1261
1262 If mastering luminances are not explicitly set, the target color volume
1263 is assumed to have the same min and max luminances as the primary color
1264 volume.
1265
1266 If max L is less than or equal to min L, the protocol error
1267 invalid_luminance is raised.
1268
1269 Min L value is multiplied by 10000 to get the argument min_lum value
1270 and carry precision of 4 decimals. Max L value is unscaled for max_lum.
1271
1272 This request can be used if the compositor advertises
1273 wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
1274 this request raises the protocol error unsupported_feature. The
1275 advertisement implies support only for target color volumes fully
1276 contained within the primary color volume.
1277
1278 If a compositor additionally supports target color volume exceeding the
1279 primary color volume, it must advertise
1280 wp_color_manager_v1.feature.extended_target_volume. If a client uses
1281 target color volume exceeding the primary color volume and the
1282 compositor does not support it, the result is implementation defined.
1283 Compositors are recommended to detect this case and fail the image
1284 description gracefully, but it may as well result in color artifacts.
1285 </description>
1286
1287 <arg name="min_lum" type="uint" summary="min L (cd/m²) * 10000"/>
1288 <arg name="max_lum" type="uint" summary="max L (cd/m²)"/>
1289 </request>
1290
1291 <request name="set_max_cll">
1292 <description summary="maximum content light level">
1293 Sets the maximum content light level (max_cll) as defined by CTA-861-H.
1294
1295 max_cll is undefined by default.
1296 </description>
1297
1298 <arg name="max_cll" type="uint" summary="Maximum content light level (cd/m²)"/>
1299 </request>
1300
1301 <request name="set_max_fall">
1302 <description summary="maximum frame-average light level">
1303 Sets the maximum frame-average light level (max_fall) as defined by
1304 CTA-861-H.
1305
1306 max_fall is undefined by default.
1307 </description>
1308
1309 <arg name="max_fall" type="uint" summary="Maximum frame-average light level (cd/m²)"/>
1310 </request>
1311 </interface>
1312
1313 <interface name="wp_image_description_v1" version="1">
1314 <description summary="Colorimetric image description">
1315 An image description carries information about the color encoding used on
1316 a surface when attached to a wl_surface via
1317 wp_color_management_surface_v1.set_image_description. A compositor can use
1318 this information to decode pixel values into colorimetrically meaningful
1319 quantities.
1320
1321 Note, that the wp_image_description_v1 object is not ready to be used
1322 immediately after creation. The object eventually delivers either the
1323 'ready' or the 'failed' event, specified in all requests creating it. The
1324 object is deemed "ready" after receiving the 'ready' event.
1325
1326 An object which is not ready is illegal to use, it can only be destroyed.
1327 Any other request in this interface shall result in the 'not_ready'
1328 protocol error. Attempts to use an object which is not ready through other
1329 interfaces shall raise protocol errors defined there.
1330
1331 Once created and regardless of how it was created, a
1332 wp_image_description_v1 object always refers to one fixed image
1333 description. It cannot change after creation.
1334 </description>
1335
1336 <request name="destroy" type="destructor">
1337 <description summary="destroy the image description">
1338 Destroy this object. It is safe to destroy an object which is not ready.
1339
1340 Destroying a wp_image_description_v1 object has no side-effects, not
1341 even if a wp_color_management_surface_v1.set_image_description has not
1342 yet been followed by a wl_surface.commit.
1343 </description>
1344 </request>
1345
1346 <enum name="error">
1347 <description summary="protocol errors"/>
1348
1349 <entry name="not_ready" value="0"
1350 summary="attempted to use an object which is not ready"/>
1351 <entry name="no_information" value="1"
1352 summary="get_information not allowed"/>
1353 </enum>
1354
1355 <enum name="cause">
1356 <description summary="generic reason for failure"/>
1357
1358 <entry name="low_version" value="0"
1359 summary="interface version too low"/>
1360 <entry name="unsupported" value="1"
1361 summary="unsupported image description data"/>
1362 <entry name="operating_system" value="2"
1363 summary="error independent of the client"/>
1364 <entry name="no_output" value="3"
1365 summary="the relevant output no longer exists"/>
1366 </enum>
1367
1368 <event name="failed">
1369 <description summary="graceful error on creating the image description">
1370 If creating a wp_image_description_v1 object fails for a reason that is
1371 not defined as a protocol error, this event is sent.
1372
1373 The requests that create image description objects define whether and
1374 when this can occur. Only such creation requests can trigger this event.
1375 This event cannot be triggered after the image description was
1376 successfully formed.
1377
1378 Once this event has been sent, the wp_image_description_v1 object will
1379 never become ready and it can only be destroyed.
1380 </description>
1381
1382 <arg name="cause" type="uint" enum="cause"
1383 summary="generic reason"/>
1384 <arg name="msg" type="string"
1385 summary="ad hoc human-readable explanation"/>
1386 </event>
1387
1388 <event name="ready">
1389 <description summary="indication that the object is ready to be used">
1390 Once this event has been sent, the wp_image_description_v1 object is
1391 deemed "ready". Ready objects can be used to send requests and can be
1392 used through other interfaces.
1393
1394 Every ready wp_image_description_v1 protocol object refers to an
1395 underlying image description record in the compositor. Multiple protocol
1396 objects may end up referring to the same record. Clients may identify
1397 these "copies" by comparing their id numbers: if the numbers from two
1398 protocol objects are identical, the protocol objects refer to the same
1399 image description record. Two different image description records
1400 cannot have the same id number simultaneously. The id number does not
1401 change during the lifetime of the image description record.
1402
1403 The id number is valid only as long as the protocol object is alive. If
1404 all protocol objects referring to the same image description record are
1405 destroyed, the id number may be recycled for a different image
1406 description record.
1407
1408 Image description id number is not a protocol object id. Zero is
1409 reserved as an invalid id number. It shall not be possible for a client
1410 to refer to an image description by its id number in protocol. The id
1411 numbers might not be portable between Wayland connections. A compositor
1412 shall not send an invalid id number.
1413
1414 This identity allows clients to de-duplicate image description records
1415 and avoid get_information request if they already have the image
1416 description information.
1417 </description>
1418
1419 <arg name="identity" type="uint" summary="image description id number"/>
1420 </event>
1421
1422 <request name="get_information">
1423 <description summary="get information about the image description">
1424 Creates a wp_image_description_info_v1 object which delivers the
1425 information that makes up the image description.
1426
1427 Not all image description protocol objects allow get_information
1428 request. Whether it is allowed or not is defined by the request that
1429 created the object. If get_information is not allowed, the protocol
1430 error no_information is raised.
1431 </description>
1432
1433 <arg name="information"
1434 type="new_id" interface="wp_image_description_info_v1"/>
1435 </request>
1436 </interface>
1437
1438 <interface name="wp_image_description_info_v1" version="1">
1439 <description summary="Colorimetric image description information">
1440 Sends all matching events describing an image description object exactly
1441 once and finally sends the 'done' event.
1442
1443 This means
1444 - if the image description is parametric, it must send
1445 - primaries
1446 - named_primaries, if applicable
1447 - at least one of tf_power and tf_named, as applicable
1448 - luminances
1449 - target_primaries
1450 - target_luminance
1451 - if the image description is parametric, it may send, if applicable,
1452 - target_max_cll
1453 - target_max_fall
1454 - if the image description contains an ICC profile, it must send the
1455 icc_file event
1456
1457 Once a wp_image_description_info_v1 object has delivered a 'done' event it
1458 is automatically destroyed.
1459
1460 Every wp_image_description_info_v1 created from the same
1461 wp_image_description_v1 shall always return the exact same data.
1462 </description>
1463
1464 <event name="done" type="destructor">
1465 <description summary="end of information">
1466 Signals the end of information events and destroys the object.
1467 </description>
1468 </event>
1469
1470 <event name="icc_file">
1471 <description summary="ICC profile matching the image description">
1472 The icc argument provides a file descriptor to the client which may be
1473 memory-mapped to provide the ICC profile matching the image description.
1474 The fd is read-only, and if mapped then it must be mapped with
1475 MAP_PRIVATE by the client.
1476
1477 The ICC profile version and other details are determined by the
1478 compositor. There is no provision for a client to ask for a specific
1479 kind of a profile.
1480 </description>
1481
1482 <arg name="icc" type="fd" summary="ICC profile file descriptor"/>
1483 <arg name="icc_size" type="uint" summary="ICC profile size, in bytes"/>
1484 <!-- Offset always 0, compositor must not expose unnecessary data. -->
1485 </event>
1486
1487 <event name="primaries">
1488 <description summary="primaries as chromaticity coordinates">
1489 Delivers the primary color volume primaries and white point using CIE
1490 1931 xy chromaticity coordinates.
1491
1492 Each coordinate value is multiplied by 1 million to get the argument
1493 value to carry precision of 6 decimals.
1494 </description>
1495
1496 <arg name="r_x" type="int" summary="Red x * 1M"/>
1497 <arg name="r_y" type="int" summary="Red y * 1M"/>
1498 <arg name="g_x" type="int" summary="Green x * 1M"/>
1499 <arg name="g_y" type="int" summary="Green y * 1M"/>
1500 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1501 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1502 <arg name="w_x" type="int" summary="White x * 1M"/>
1503 <arg name="w_y" type="int" summary="White y * 1M"/>
1504 </event>
1505
1506 <event name="primaries_named">
1507 <description summary="named primaries">
1508 Delivers the primary color volume primaries and white point using an
1509 explicitly enumerated named set.
1510 </description>
1511
1512 <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
1513 summary="named primaries"/>
1514 </event>
1515
1516 <event name="tf_power">
1517 <description summary="transfer characteristic as a power curve">
1518 The color component transfer characteristic of this image description is
1519 a pure power curve. This event provides the exponent of the power
1520 function. This curve represents the conversion from electrical to
1521 optical pixel or color values.
1522
1523 The curve exponent has been multiplied by 10000 to get the argument eexp
1524 value to carry the precision of 4 decimals.
1525 </description>
1526
1527 <arg name="eexp" type="uint" summary="the exponent * 10000"/>
1528 </event>
1529
1530 <event name="tf_named">
1531 <description summary="named transfer characteristic">
1532 Delivers the transfer characteristic using an explicitly enumerated
1533 named function.
1534 </description>
1535
1536 <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
1537 summary="named transfer function"/>
1538 </event>
1539
1540 <event name="luminances">
1541 <description summary="primary color volume luminance range and reference white">
1542 Delivers the primary color volume luminance range and the reference
1543 white luminance level. These values include the minimum display emission
1544 and ambient flare luminances, assumed to be optically additive and have
1545 the chromaticity of the primary color volume white point.
1546
1547 The minimum luminance is multiplied by 10000 to get the argument
1548 'min_lum' value and carries precision of 4 decimals. The maximum
1549 luminance and reference white luminance values are unscaled.
1550 </description>
1551
1552 <arg name="min_lum" type="uint"
1553 summary="minimum luminance (cd/m²) * 10000"/>
1554 <arg name="max_lum" type="uint"
1555 summary="maximum luminance (cd/m²)"/>
1556 <arg name="reference_lum" type="uint"
1557 summary="reference white luminance (cd/m²)"/>
1558 </event>
1559
1560 <event name="target_primaries">
1561 <description summary="target primaries as chromaticity coordinates">
1562 Provides the color primaries and white point of the target color volume
1563 using CIE 1931 xy chromaticity coordinates. This is compatible with the
1564 SMPTE ST 2086 definition of HDR static metadata for mastering displays.
1565
1566 While primary color volume is about how color is encoded, the target
1567 color volume is the actually displayable color volume. If target color
1568 volume is equal to the primary color volume, then this event is not
1569 sent.
1570
1571 Each coordinate value is multiplied by 1 million to get the argument
1572 value to carry precision of 6 decimals.
1573 </description>
1574
1575 <arg name="r_x" type="int" summary="Red x * 1M"/>
1576 <arg name="r_y" type="int" summary="Red y * 1M"/>
1577 <arg name="g_x" type="int" summary="Green x * 1M"/>
1578 <arg name="g_y" type="int" summary="Green y * 1M"/>
1579 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1580 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1581 <arg name="w_x" type="int" summary="White x * 1M"/>
1582 <arg name="w_y" type="int" summary="White y * 1M"/>
1583 </event>
1584
1585 <event name="target_luminance">
1586 <description summary="target luminance range">
1587 Provides the luminance range that the image description is targeting as
1588 the minimum and maximum absolute luminance L. These values include the
1589 minimum display emission and ambient flare luminances, assumed to be
1590 optically additive and have the chromaticity of the primary color
1591 volume white point. This should be compatible with the SMPTE ST 2086
1592 definition of HDR static metadata.
1593
1594 This luminance range is only theoretical and may not correspond to the
1595 luminance of light emitted on an actual display.
1596
1597 Min L value is multiplied by 10000 to get the argument min_lum value and
1598 carry precision of 4 decimals. Max L value is unscaled for max_lum.
1599 </description>
1600
1601 <arg name="min_lum" type="uint" summary="min L (cd/m²) * 10000"/>
1602 <arg name="max_lum" type="uint" summary="max L (cd/m²)"/>
1603 </event>
1604
1605 <event name="target_max_cll">
1606 <description summary="target maximum content light level">
1607 Provides the targeted max_cll of the image description. max_cll is
1608 defined by CTA-861-H.
1609
1610 This luminance is only theoretical and may not correspond to the
1611 luminance of light emitted on an actual display.
1612 </description>
1613
1614 <arg name="max_cll" type="uint"
1615 summary="Maximum content light-level (cd/m²)"/>
1616 </event>
1617
1618 <event name="target_max_fall">
1619 <description summary="target maximum frame-average light level">
1620 Provides the targeted max_fall of the image description. max_fall is
1621 defined by CTA-861-H.
1622
1623 This luminance is only theoretical and may not correspond to the
1624 luminance of light emitted on an actual display.
1625 </description>
1626
1627 <arg name="max_fall" type="uint"
1628 summary="Maximum frame-average light level (cd/m²)"/>
1629 </event>
1630 </interface>
1631</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/cursor-shape-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/cursor-shape-v1.xml
new file mode 100644
index 0000000..56f6a1a
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/cursor-shape-v1.xml
@@ -0,0 +1,147 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="cursor_shape_v1">
3 <copyright>
4 Copyright 2018 The Chromium Authors
5 Copyright 2023 Simon Ser
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 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 </copyright>
24
25 <interface name="wp_cursor_shape_manager_v1" version="1">
26 <description summary="cursor shape manager">
27 This global offers an alternative, optional way to set cursor images. This
28 new way uses enumerated cursors instead of a wl_surface like
29 wl_pointer.set_cursor does.
30
31 Warning! The protocol described in this file is currently in the testing
32 phase. Backward compatible changes may be added together with the
33 corresponding interface version bump. Backward incompatible changes can
34 only be done by creating a new major version of the extension.
35 </description>
36
37 <request name="destroy" type="destructor">
38 <description summary="destroy the manager">
39 Destroy the cursor shape manager.
40 </description>
41 </request>
42
43 <request name="get_pointer">
44 <description summary="manage the cursor shape of a pointer device">
45 Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
46 </description>
47 <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
48 <arg name="pointer" type="object" interface="wl_pointer"/>
49 </request>
50
51 <request name="get_tablet_tool_v2">
52 <description summary="manage the cursor shape of a tablet tool device">
53 Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
54 </description>
55 <arg name="cursor_shape_device" type="new_id" interface="wp_cursor_shape_device_v1"/>
56 <arg name="tablet_tool" type="object" interface="zwp_tablet_tool_v2"/>
57 </request>
58 </interface>
59
60 <interface name="wp_cursor_shape_device_v1" version="1">
61 <description summary="cursor shape for a device">
62 This interface advertises the list of supported cursor shapes for a
63 device, and allows clients to set the cursor shape.
64 </description>
65
66 <enum name="shape">
67 <description summary="cursor shapes">
68 This enum describes cursor shapes.
69
70 The names are taken from the CSS W3C specification:
71 https://w3c.github.io/csswg-drafts/css-ui/#cursor
72 </description>
73 <entry name="default" value="1" summary="default cursor"/>
74 <entry name="context_menu" value="2" summary="a context menu is available for the object under the cursor"/>
75 <entry name="help" value="3" summary="help is available for the object under the cursor"/>
76 <entry name="pointer" value="4" summary="pointer that indicates a link or another interactive element"/>
77 <entry name="progress" value="5" summary="progress indicator"/>
78 <entry name="wait" value="6" summary="program is busy, user should wait"/>
79 <entry name="cell" value="7" summary="a cell or set of cells may be selected"/>
80 <entry name="crosshair" value="8" summary="simple crosshair"/>
81 <entry name="text" value="9" summary="text may be selected"/>
82 <entry name="vertical_text" value="10" summary="vertical text may be selected"/>
83 <entry name="alias" value="11" summary="drag-and-drop: alias of/shortcut to something is to be created"/>
84 <entry name="copy" value="12" summary="drag-and-drop: something is to be copied"/>
85 <entry name="move" value="13" summary="drag-and-drop: something is to be moved"/>
86 <entry name="no_drop" value="14" summary="drag-and-drop: the dragged item cannot be dropped at the current cursor location"/>
87 <entry name="not_allowed" value="15" summary="drag-and-drop: the requested action will not be carried out"/>
88 <entry name="grab" value="16" summary="drag-and-drop: something can be grabbed"/>
89 <entry name="grabbing" value="17" summary="drag-and-drop: something is being grabbed"/>
90 <entry name="e_resize" value="18" summary="resizing: the east border is to be moved"/>
91 <entry name="n_resize" value="19" summary="resizing: the north border is to be moved"/>
92 <entry name="ne_resize" value="20" summary="resizing: the north-east corner is to be moved"/>
93 <entry name="nw_resize" value="21" summary="resizing: the north-west corner is to be moved"/>
94 <entry name="s_resize" value="22" summary="resizing: the south border is to be moved"/>
95 <entry name="se_resize" value="23" summary="resizing: the south-east corner is to be moved"/>
96 <entry name="sw_resize" value="24" summary="resizing: the south-west corner is to be moved"/>
97 <entry name="w_resize" value="25" summary="resizing: the west border is to be moved"/>
98 <entry name="ew_resize" value="26" summary="resizing: the east and west borders are to be moved"/>
99 <entry name="ns_resize" value="27" summary="resizing: the north and south borders are to be moved"/>
100 <entry name="nesw_resize" value="28" summary="resizing: the north-east and south-west corners are to be moved"/>
101 <entry name="nwse_resize" value="29" summary="resizing: the north-west and south-east corners are to be moved"/>
102 <entry name="col_resize" value="30" summary="resizing: that the item/column can be resized horizontally"/>
103 <entry name="row_resize" value="31" summary="resizing: that the item/row can be resized vertically"/>
104 <entry name="all_scroll" value="32" summary="something can be scrolled in any direction"/>
105 <entry name="zoom_in" value="33" summary="something can be zoomed in"/>
106 <entry name="zoom_out" value="34" summary="something can be zoomed out"/>
107 </enum>
108
109 <enum name="error">
110 <entry name="invalid_shape" value="1"
111 summary="the specified shape value is invalid"/>
112 </enum>
113
114 <request name="destroy" type="destructor">
115 <description summary="destroy the cursor shape device">
116 Destroy the cursor shape device.
117
118 The device cursor shape remains unchanged.
119 </description>
120 </request>
121
122 <request name="set_shape">
123 <description summary="set device cursor to the shape">
124 Sets the device cursor to the specified shape. The compositor will
125 change the cursor image based on the specified shape.
126
127 The cursor actually changes only if the input device focus is one of
128 the requesting client's surfaces. If any, the previous cursor image
129 (surface or shape) is replaced.
130
131 The "shape" argument must be a valid enum entry, otherwise the
132 invalid_shape protocol error is raised.
133
134 This is similar to the wl_pointer.set_cursor and
135 zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
136 shape instead of contents in the form of a surface. Clients can mix
137 set_cursor and set_shape requests.
138
139 The serial parameter must match the latest wl_pointer.enter or
140 zwp_tablet_tool_v2.proximity_in serial number sent to the client.
141 Otherwise the request will be ignored.
142 </description>
143 <arg name="serial" type="uint" summary="serial number of the enter event"/>
144 <arg name="shape" type="uint" enum="shape"/>
145 </request>
146 </interface>
147</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/fractional-scale-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/fractional-scale-v1.xml
new file mode 100644
index 0000000..350bfc0
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/fractional-scale-v1.xml
@@ -0,0 +1,102 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="fractional_scale_v1">
3 <copyright>
4 Copyright © 2022 Kenny Levinsen
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <description summary="Protocol for requesting fractional surface scales">
27 This protocol allows a compositor to suggest for surfaces to render at
28 fractional scales.
29
30 A client can submit scaled content by utilizing wp_viewport. This is done by
31 creating a wp_viewport object for the surface and setting the destination
32 rectangle to the surface size before the scale factor is applied.
33
34 The buffer size is calculated by multiplying the surface size by the
35 intended scale.
36
37 The wl_surface buffer scale should remain set to 1.
38
39 If a surface has a surface-local size of 100 px by 50 px and wishes to
40 submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
41 be used and the wp_viewport destination rectangle should be 100 px by 50 px.
42
43 For toplevel surfaces, the size is rounded halfway away from zero. The
44 rounding algorithm for subsurface position and size is not defined.
45 </description>
46
47 <interface name="wp_fractional_scale_manager_v1" version="1">
48 <description summary="fractional surface scale information">
49 A global interface for requesting surfaces to use fractional scales.
50 </description>
51
52 <request name="destroy" type="destructor">
53 <description summary="unbind the fractional surface scale interface">
54 Informs the server that the client will not be using this protocol
55 object anymore. This does not affect any other objects,
56 wp_fractional_scale_v1 objects included.
57 </description>
58 </request>
59
60 <enum name="error">
61 <entry name="fractional_scale_exists" value="0"
62 summary="the surface already has a fractional_scale object associated"/>
63 </enum>
64
65 <request name="get_fractional_scale">
66 <description summary="extend surface interface for scale information">
67 Create an add-on object for the the wl_surface to let the compositor
68 request fractional scales. If the given wl_surface already has a
69 wp_fractional_scale_v1 object associated, the fractional_scale_exists
70 protocol error is raised.
71 </description>
72 <arg name="id" type="new_id" interface="wp_fractional_scale_v1"
73 summary="the new surface scale info interface id"/>
74 <arg name="surface" type="object" interface="wl_surface"
75 summary="the surface"/>
76 </request>
77 </interface>
78
79 <interface name="wp_fractional_scale_v1" version="1">
80 <description summary="fractional scale interface to a wl_surface">
81 An additional interface to a wl_surface object which allows the compositor
82 to inform the client of the preferred scale.
83 </description>
84
85 <request name="destroy" type="destructor">
86 <description summary="remove surface scale information for surface">
87 Destroy the fractional scale object. When this object is destroyed,
88 preferred_scale events will no longer be sent.
89 </description>
90 </request>
91
92 <event name="preferred_scale">
93 <description summary="notify of new preferred scale">
94 Notification of a new preferred scale for this surface that the
95 compositor suggests that the client should use.
96
97 The sent scale is the numerator of a fraction with a denominator of 120.
98 </description>
99 <arg name="scale" type="uint" summary="the new preferred scale"/>
100 </event>
101 </interface>
102</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/frog-color-management-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/frog-color-management-v1.xml
new file mode 100644
index 0000000..3d6c2f5
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/frog-color-management-v1.xml
@@ -0,0 +1,356 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="frog_color_management_v1">
3
4 <copyright>
5 Copyright © 2023 Joshua Ashton for Valve Software
6 Copyright © 2023 Xaver Hugl
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 </copyright>
27
28 <description summary="experimental color management protocol">
29 The aim of this color management extension is to get HDR games working quickly,
30 and have an easy way to test implementations in the wild before the upstream
31 protocol is ready to be merged.
32 For that purpose it's intentionally limited and cut down and does not serve
33 all uses cases.
34 </description>
35
36 <interface name="frog_color_management_factory_v1" version="1">
37 <description summary="color management factory">
38 The color management factory singleton creates color managed surface objects.
39 </description>
40
41 <request name="destroy" type="destructor"></request>
42
43 <request name="get_color_managed_surface">
44 <description summary="create color management interface for surface">
45 </description>
46
47 <arg name="surface" type="object" interface="wl_surface"
48 summary="target surface"/>
49 <arg name="callback" type="new_id" interface="frog_color_managed_surface"
50 summary="new color managed surface object"/>
51 </request>
52 </interface>
53
54 <interface name="frog_color_managed_surface" version="1">
55 <description summary="color managed surface">
56 Interface for changing surface color management and HDR state.
57
58 An implementation must: support every part of the version
59 of the frog_color_managed_surface interface it exposes.
60 Including all known enums associated with a given version.
61 </description>
62
63 <request name="destroy" type="destructor">
64 <description summary="destroy color managed surface">
65 Destroying the color managed surface resets all known color
66 state for the surface back to 'undefined' implementation-specific
67 values.
68 </description>
69 </request>
70
71 <enum name="transfer_function">
72 <description summary="known transfer functions">
73 Extended information on the transfer functions described
74 here can be found in the Khronos Data Format specification:
75
76 https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html
77 </description>
78 <entry name="undefined" value="0" summary="specifies undefined, implementation-specific handling of the surface's transfer function."/>
79 <entry name="srgb" value="1" summary="specifies the sRGB non-linear EOTF. An implementation may: display this as Gamma 2.2 for the purposes of being consistent with content rendering across displays, rendering_intent and user expectations."/>
80 <entry name="gamma_22" value="2" summary="specifies gamma 2.2 power curve as the EOTF"/>
81 <entry name="st2084_pq" value="3" summary="specifies the SMPTE ST2084 Perceptual Quantizer (PQ) EOTF"/>
82 <entry name="scrgb_linear" value="4" summary="specifies the scRGB (extended sRGB) linear EOTF. Note: Primaries outside the gamut triangle specified can be expressed with negative values for this transfer function."/>
83 </enum>
84
85 <request name="set_known_transfer_function">
86 <description summary="sets a known transfer function for a surface"/>
87 <arg name="transfer_function" type="uint" enum="transfer_function" summary="transfer function for the surface"/>
88 </request>
89
90 <enum name="primaries">
91 <description summary="known primaries"/>
92 <entry name="undefined" value="0" summary="specifies undefined, implementation-specific handling"/>
93 <entry name="rec709" value="1" summary="specifies Rec.709/sRGB primaries with D65 white point"/>
94 <entry name="rec2020" value="2" summary="specifies Rec.2020/HDR10 primaries with D65 white point"/>
95 </enum>
96
97 <request name="set_known_container_color_volume">
98 <description summary="sets the container color volume (primaries) for a surface"/>
99 <arg name="primaries" type="uint" enum="primaries" summary="primaries for the surface"/>
100 </request>
101
102 <enum name="render_intent">
103 <description summary="known render intents">
104 Extended information on render intents described
105 here can be found in ICC.1:2022:
106
107 https://www.color.org/specification/ICC.1-2022-05.pdf
108 </description>
109 <entry name="perceptual" value="0" summary="perceptual"/>
110 </enum>
111
112 <request name="set_render_intent">
113 <description summary="sets the render intent for a surface">
114 NOTE: On a surface with "perceptual" (default) render intent, handling of the container's color volume
115 is implementation-specific, and may differ between different transfer functions it is paired with:
116 ie. sRGB + 709 rendering may have it's primaries widened to more of the available display's gamut
117 to be be more pleasing for the viewer.
118 Compared to scRGB Linear + 709 being treated faithfully as 709
119 (including utilizing negatives out of the 709 gamut triangle)
120 </description>
121 <arg name="render_intent" type="uint" enum="render_intent" summary="render intent for the surface"/>
122 </request>
123
124 <request name="set_hdr_metadata">
125 <description summary="set HDR metadata for a surface">
126 Forwards HDR metadata from the client to the compositor.
127
128 HDR Metadata Infoframe as per CTA 861.G spec.
129
130 Usage of this HDR metadata is implementation specific and
131 outside of the scope of this protocol.
132 </description>
133 <arg name="mastering_display_primary_red_x" type="uint">
134 <description summary="red primary x coordinate">
135 Mastering Red Color Primary X Coordinate of the Data.
136
137 Coded as unsigned 16-bit values in units of
138 0.00002, where 0x0000 represents zero and 0xC350
139 represents 1.0000.
140 </description>
141 </arg>
142 <arg name="mastering_display_primary_red_y" type="uint">
143 <description summary="red primary y coordinate">
144 Mastering Red Color Primary Y Coordinate of the Data.
145
146 Coded as unsigned 16-bit values in units of
147 0.00002, where 0x0000 represents zero and 0xC350
148 represents 1.0000.
149 </description>
150 </arg>
151 <arg name="mastering_display_primary_green_x" type="uint">
152 <description summary="green primary x coordinate">
153 Mastering Green Color Primary X Coordinate of the Data.
154
155 Coded as unsigned 16-bit values in units of
156 0.00002, where 0x0000 represents zero and 0xC350
157 represents 1.0000.
158 </description>
159 </arg>
160 <arg name="mastering_display_primary_green_y" type="uint">
161 <description summary="green primary y coordinate">
162 Mastering Green Color Primary Y Coordinate of the Data.
163
164 Coded as unsigned 16-bit values in units of
165 0.00002, where 0x0000 represents zero and 0xC350
166 represents 1.0000.
167 </description>
168 </arg>
169 <arg name="mastering_display_primary_blue_x" type="uint">
170 <description summary="blue primary x coordinate">
171 Mastering Blue Color Primary X Coordinate of the Data.
172
173 Coded as unsigned 16-bit values in units of
174 0.00002, where 0x0000 represents zero and 0xC350
175 represents 1.0000.
176 </description>
177 </arg>
178 <arg name="mastering_display_primary_blue_y" type="uint">
179 <description summary="blue primary y coordinate">
180 Mastering Blue Color Primary Y Coordinate of the Data.
181
182 Coded as unsigned 16-bit values in units of
183 0.00002, where 0x0000 represents zero and 0xC350
184 represents 1.0000.
185 </description>
186 </arg>
187 <arg name="mastering_white_point_x" type="uint">
188 <description summary="white point x coordinate">
189 Mastering White Point X Coordinate of the Data.
190
191 These are coded as unsigned 16-bit values in units of
192 0.00002, where 0x0000 represents zero and 0xC350
193 represents 1.0000.
194 </description>
195 </arg>
196 <arg name="mastering_white_point_y" type="uint">
197 <description summary="white point y coordinate">
198 Mastering White Point Y Coordinate of the Data.
199
200 These are coded as unsigned 16-bit values in units of
201 0.00002, where 0x0000 represents zero and 0xC350
202 represents 1.0000.
203 </description>
204 </arg>
205 <arg name="max_display_mastering_luminance" type="uint">
206 <description summary="max display mastering luminance">
207 Max Mastering Display Luminance.
208 This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
209 where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
210 </description>
211 </arg>
212 <arg name="min_display_mastering_luminance" type="uint">
213 <description summary="min display mastering luminance">
214 Min Mastering Display Luminance.
215 This value is coded as an unsigned 16-bit value in units of
216 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF
217 represents 6.5535 cd/m2.
218 </description>
219 </arg>
220 <arg name="max_cll" type="uint">
221 <description summary="max content light level">
222 Max Content Light Level.
223 This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
224 where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
225 </description>
226 </arg>
227 <arg name="max_fall" type="uint">
228 <description summary="max frame average light level">
229 Max Frame Average Light Level.
230 This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
231 where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
232 </description>
233 </arg>
234 </request>
235
236 <event name="preferred_metadata">
237 <description summary="preferred metadata for a surface">
238 Current preferred metadata for a surface.
239 The application should use this information to tone-map its buffers
240 to this target before committing.
241
242 This metadata does not necessarily correspond to any physical output, but
243 rather what the compositor thinks would be best for a given surface.
244 </description>
245 <arg name="transfer_function" type="uint" enum="transfer_function">
246 <description summary="output's current transfer function">
247 Specifies a known transfer function that corresponds to the
248 output the surface is targeting.
249 </description>
250 </arg>
251 <arg name="output_display_primary_red_x" type="uint">
252 <description summary="red primary x coordinate">
253 Output Red Color Primary X Coordinate of the Data.
254
255 Coded as unsigned 16-bit values in units of
256 0.00002, where 0x0000 represents zero and 0xC350
257 represents 1.0000.
258 </description>
259 </arg>
260 <arg name="output_display_primary_red_y" type="uint">
261 <description summary="red primary y coordinate">
262 Output Red Color Primary Y Coordinate of the Data.
263
264 Coded as unsigned 16-bit values in units of
265 0.00002, where 0x0000 represents zero and 0xC350
266 represents 1.0000.
267 </description>
268 </arg>
269 <arg name="output_display_primary_green_x" type="uint">
270 <description summary="green primary x coordinate">
271 Output Green Color Primary X Coordinate of the Data.
272
273 Coded as unsigned 16-bit values in units of
274 0.00002, where 0x0000 represents zero and 0xC350
275 represents 1.0000.
276 </description>
277 </arg>
278 <arg name="output_display_primary_green_y" type="uint">
279 <description summary="green primary y coordinate">
280 Output Green Color Primary Y Coordinate of the Data.
281
282 Coded as unsigned 16-bit values in units of
283 0.00002, where 0x0000 represents zero and 0xC350
284 represents 1.0000.
285 </description>
286 </arg>
287 <arg name="output_display_primary_blue_x" type="uint">
288 <description summary="blue primary x coordinate">
289 Output Blue Color Primary X Coordinate of the Data.
290
291 Coded as unsigned 16-bit values in units of
292 0.00002, where 0x0000 represents zero and 0xC350
293 represents 1.0000.
294 </description>
295 </arg>
296 <arg name="output_display_primary_blue_y" type="uint">
297 <description summary="blue primary y coordinate">
298 Output Blue Color Primary Y Coordinate of the Data.
299
300 Coded as unsigned 16-bit values in units of
301 0.00002, where 0x0000 represents zero and 0xC350
302 represents 1.0000.
303 </description>
304 </arg>
305 <arg name="output_white_point_x" type="uint">
306 <description summary="white point x coordinate">
307 Output White Point X Coordinate of the Data.
308
309 These are coded as unsigned 16-bit values in units of
310 0.00002, where 0x0000 represents zero and 0xC350
311 represents 1.0000.
312 </description>
313 </arg>
314 <arg name="output_white_point_y" type="uint">
315 <description summary="white point y coordinate">
316 Output White Point Y Coordinate of the Data.
317
318 These are coded as unsigned 16-bit values in units of
319 0.00002, where 0x0000 represents zero and 0xC350
320 represents 1.0000.
321 </description>
322 </arg>
323 <arg name="max_luminance" type="uint">
324 <description summary="maximum luminance">
325 Max Output Luminance
326 The max luminance in nits that the output is capable of rendering in small areas.
327 Content should: not exceed this value to avoid clipping.
328
329 This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
330 where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
331 </description>
332 </arg>
333 <arg name="min_luminance" type="uint">
334 <description summary="minimum luminance">
335 Min Output Luminance
336 The min luminance that the output is capable of rendering.
337 Content should: not exceed this value to avoid clipping.
338
339 This value is coded as an unsigned 16-bit value in units of
340 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF
341 represents 6.5535 cd/m2.
342 </description>
343 </arg>
344 <arg name="max_full_frame_luminance" type="uint">
345 <description summary="maximum full frame luminance">
346 Max Full Frame Luminance
347 The max luminance in nits that the output is capable of rendering for the
348 full frame sustained.
349
350 This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
351 where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
352 </description>
353 </arg>
354 </event>
355 </interface>
356</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/idle-inhibit-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/idle-inhibit-unstable-v1.xml
new file mode 100644
index 0000000..9c06cdc
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/idle-inhibit-unstable-v1.xml
@@ -0,0 +1,83 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="idle_inhibit_unstable_v1">
3
4 <copyright>
5 Copyright © 2015 Samsung Electronics Co., Ltd
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_idle_inhibit_manager_v1" version="1">
28 <description summary="control behavior when display idles">
29 This interface permits inhibiting the idle behavior such as screen
30 blanking, locking, and screensaving. The client binds the idle manager
31 globally, then creates idle-inhibitor objects for each surface.
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 interface version bump.
36 Backward incompatible changes are done by bumping the version number in
37 the protocol and interface 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="destroy" type="destructor">
44 <description summary="destroy the idle inhibitor object">
45 Destroy the inhibit manager.
46 </description>
47 </request>
48
49 <request name="create_inhibitor">
50 <description summary="create a new inhibitor object">
51 Create a new inhibitor object associated with the given surface.
52 </description>
53 <arg name="id" type="new_id" interface="zwp_idle_inhibitor_v1"/>
54 <arg name="surface" type="object" interface="wl_surface"
55 summary="the surface that inhibits the idle behavior"/>
56 </request>
57
58 </interface>
59
60 <interface name="zwp_idle_inhibitor_v1" version="1">
61 <description summary="context object for inhibiting idle behavior">
62 An idle inhibitor prevents the output that the associated surface is
63 visible on from being set to a state where it is not visually usable due
64 to lack of user interaction (e.g. blanked, dimmed, locked, set to power
65 save, etc.) Any screensaver processes are also blocked from displaying.
66
67 If the surface is destroyed, unmapped, becomes occluded, loses
68 visibility, or otherwise becomes not visually relevant for the user, the
69 idle inhibitor will not be honored by the compositor; if the surface
70 subsequently regains visibility the inhibitor takes effect once again.
71 Likewise, the inhibitor isn't honored if the system was already idled at
72 the time the inhibitor was established, although if the system later
73 de-idles and re-idles the inhibitor will take effect.
74 </description>
75
76 <request name="destroy" type="destructor">
77 <description summary="destroy the idle inhibitor object">
78 Remove the inhibitor effect from the associated wl_surface.
79 </description>
80 </request>
81
82 </interface>
83</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/input-timestamps-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/input-timestamps-unstable-v1.xml
new file mode 100644
index 0000000..7c5e082
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/input-timestamps-unstable-v1.xml
@@ -0,0 +1,145 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="input_timestamps_unstable_v1">
3
4 <copyright>
5 Copyright © 2017 Collabora, Ltd.
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 <description summary="High-resolution timestamps for input events">
28 This protocol specifies a way for a client to request and receive
29 high-resolution timestamps for input events.
30
31 Warning! The protocol described in this file is experimental and
32 backward incompatible changes may be made. Backward compatible changes
33 may be added together with the corresponding interface version bump.
34 Backward incompatible changes are done by bumping the version number in
35 the protocol and interface names and resetting the interface version.
36 Once the protocol is to be declared stable, the 'z' prefix and the
37 version number in the protocol and interface names are removed and the
38 interface version number is reset.
39 </description>
40
41 <interface name="zwp_input_timestamps_manager_v1" version="1">
42 <description summary="context object for high-resolution input timestamps">
43 A global interface used for requesting high-resolution timestamps
44 for input events.
45 </description>
46
47 <request name="destroy" type="destructor">
48 <description summary="destroy the input timestamps manager object">
49 Informs the server that the client will no longer be using this
50 protocol object. Existing objects created by this object are not
51 affected.
52 </description>
53 </request>
54
55 <request name="get_keyboard_timestamps">
56 <description summary="subscribe to high-resolution keyboard timestamp events">
57 Creates a new input timestamps object that represents a subscription
58 to high-resolution timestamp events for all wl_keyboard events that
59 carry a timestamp.
60
61 If the associated wl_keyboard object is invalidated, either through
62 client action (e.g. release) or server-side changes, the input
63 timestamps object becomes inert and the client should destroy it
64 by calling zwp_input_timestamps_v1.destroy.
65 </description>
66 <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/>
67 <arg name="keyboard" type="object" interface="wl_keyboard"
68 summary="the wl_keyboard object for which to get timestamp events"/>
69 </request>
70
71 <request name="get_pointer_timestamps">
72 <description summary="subscribe to high-resolution pointer timestamp events">
73 Creates a new input timestamps object that represents a subscription
74 to high-resolution timestamp events for all wl_pointer events that
75 carry a timestamp.
76
77 If the associated wl_pointer object is invalidated, either through
78 client action (e.g. release) or server-side changes, the input
79 timestamps object becomes inert and the client should destroy it
80 by calling zwp_input_timestamps_v1.destroy.
81 </description>
82 <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/>
83 <arg name="pointer" type="object" interface="wl_pointer"
84 summary="the wl_pointer object for which to get timestamp events"/>
85 </request>
86
87 <request name="get_touch_timestamps">
88 <description summary="subscribe to high-resolution touch timestamp events">
89 Creates a new input timestamps object that represents a subscription
90 to high-resolution timestamp events for all wl_touch events that
91 carry a timestamp.
92
93 If the associated wl_touch object becomes invalid, either through
94 client action (e.g. release) or server-side changes, the input
95 timestamps object becomes inert and the client should destroy it
96 by calling zwp_input_timestamps_v1.destroy.
97 </description>
98 <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/>
99 <arg name="touch" type="object" interface="wl_touch"
100 summary="the wl_touch object for which to get timestamp events"/>
101 </request>
102 </interface>
103
104 <interface name="zwp_input_timestamps_v1" version="1">
105 <description summary="context object for input timestamps">
106 Provides high-resolution timestamp events for a set of subscribed input
107 events. The set of subscribed input events is determined by the
108 zwp_input_timestamps_manager_v1 request used to create this object.
109 </description>
110
111 <request name="destroy" type="destructor">
112 <description summary="destroy the input timestamps object">
113 Informs the server that the client will no longer be using this
114 protocol object. After the server processes the request, no more
115 timestamp events will be emitted.
116 </description>
117 </request>
118
119 <event name="timestamp">
120 <description summary="high-resolution timestamp event">
121 The timestamp event is associated with the first subsequent input event
122 carrying a timestamp which belongs to the set of input events this
123 object is subscribed to.
124
125 The timestamp provided by this event is a high-resolution version of
126 the timestamp argument of the associated input event. The provided
127 timestamp is in the same clock domain and is at least as accurate as
128 the associated input event timestamp.
129
130 The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
131 each component being an unsigned 32-bit value. Whole seconds are in
132 tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
133 and the additional fractional part in tv_nsec as nanoseconds. Hence,
134 for valid timestamps tv_nsec must be in [0, 999999999].
135 </description>
136 <arg name="tv_sec_hi" type="uint"
137 summary="high 32 bits of the seconds part of the timestamp"/>
138 <arg name="tv_sec_lo" type="uint"
139 summary="low 32 bits of the seconds part of the timestamp"/>
140 <arg name="tv_nsec" type="uint"
141 summary="nanoseconds part of the timestamp"/>
142 </event>
143 </interface>
144
145</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/keyboard-shortcuts-inhibit-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/keyboard-shortcuts-inhibit-unstable-v1.xml
new file mode 100644
index 0000000..2774876
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/keyboard-shortcuts-inhibit-unstable-v1.xml
@@ -0,0 +1,143 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="keyboard_shortcuts_inhibit_unstable_v1">
3
4 <copyright>
5 Copyright © 2017 Red Hat Inc.
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 <description summary="Protocol for inhibiting the compositor keyboard shortcuts">
28 This protocol specifies a way for a client to request the compositor
29 to ignore its own keyboard shortcuts for a given seat, so that all
30 key events from that seat get forwarded to a surface.
31
32 Warning! The protocol described in this file is experimental and
33 backward incompatible changes may be made. Backward compatible
34 changes may be added together with the corresponding interface
35 version bump.
36 Backward incompatible changes are done by bumping the version
37 number in the protocol and interface names and resetting the
38 interface version. Once the protocol is to be declared stable,
39 the 'z' prefix and the version number in the protocol and
40 interface names are removed and the interface version number is
41 reset.
42 </description>
43
44 <interface name="zwp_keyboard_shortcuts_inhibit_manager_v1" version="1">
45 <description summary="context object for keyboard grab_manager">
46 A global interface used for inhibiting the compositor keyboard shortcuts.
47 </description>
48
49 <request name="destroy" type="destructor">
50 <description summary="destroy the keyboard shortcuts inhibitor object">
51 Destroy the keyboard shortcuts inhibitor manager.
52 </description>
53 </request>
54
55 <request name="inhibit_shortcuts">
56 <description summary="create a new keyboard shortcuts inhibitor object">
57 Create a new keyboard shortcuts inhibitor object associated with
58 the given surface for the given seat.
59
60 If shortcuts are already inhibited for the specified seat and surface,
61 a protocol error "already_inhibited" is raised by the compositor.
62 </description>
63 <arg name="id" type="new_id" interface="zwp_keyboard_shortcuts_inhibitor_v1"/>
64 <arg name="surface" type="object" interface="wl_surface"
65 summary="the surface that inhibits the keyboard shortcuts behavior"/>
66 <arg name="seat" type="object" interface="wl_seat"
67 summary="the wl_seat for which keyboard shortcuts should be disabled"/>
68 </request>
69
70 <enum name="error">
71 <entry name="already_inhibited"
72 value="0"
73 summary="the shortcuts are already inhibited for this surface"/>
74 </enum>
75 </interface>
76
77 <interface name="zwp_keyboard_shortcuts_inhibitor_v1" version="1">
78 <description summary="context object for keyboard shortcuts inhibitor">
79 A keyboard shortcuts inhibitor instructs the compositor to ignore
80 its own keyboard shortcuts when the associated surface has keyboard
81 focus. As a result, when the surface has keyboard focus on the given
82 seat, it will receive all key events originating from the specified
83 seat, even those which would normally be caught by the compositor for
84 its own shortcuts.
85
86 The Wayland compositor is however under no obligation to disable
87 all of its shortcuts, and may keep some special key combo for its own
88 use, including but not limited to one allowing the user to forcibly
89 restore normal keyboard events routing in the case of an unwilling
90 client. The compositor may also use the same key combo to reactivate
91 an existing shortcut inhibitor that was previously deactivated on
92 user request.
93
94 When the compositor restores its own keyboard shortcuts, an
95 "inactive" event is emitted to notify the client that the keyboard
96 shortcuts inhibitor is not effectively active for the surface and
97 seat any more, and the client should not expect to receive all
98 keyboard events.
99
100 When the keyboard shortcuts inhibitor is inactive, the client has
101 no way to forcibly reactivate the keyboard shortcuts inhibitor.
102
103 The user can chose to re-enable a previously deactivated keyboard
104 shortcuts inhibitor using any mechanism the compositor may offer,
105 in which case the compositor will send an "active" event to notify
106 the client.
107
108 If the surface is destroyed, unmapped, or loses the seat's keyboard
109 focus, the keyboard shortcuts inhibitor becomes irrelevant and the
110 compositor will restore its own keyboard shortcuts but no "inactive"
111 event is emitted in this case.
112 </description>
113
114 <request name="destroy" type="destructor">
115 <description summary="destroy the keyboard shortcuts inhibitor object">
116 Remove the keyboard shortcuts inhibitor from the associated wl_surface.
117 </description>
118 </request>
119
120 <event name="active">
121 <description summary="shortcuts are inhibited">
122 This event indicates that the shortcut inhibitor is active.
123
124 The compositor sends this event every time compositor shortcuts
125 are inhibited on behalf of the surface. When active, the client
126 may receive input events normally reserved by the compositor
127 (see zwp_keyboard_shortcuts_inhibitor_v1).
128
129 This occurs typically when the initial request "inhibit_shortcuts"
130 first becomes active or when the user instructs the compositor to
131 re-enable and existing shortcuts inhibitor using any mechanism
132 offered by the compositor.
133 </description>
134 </event>
135
136 <event name="inactive">
137 <description summary="shortcuts are restored">
138 This event indicates that the shortcuts inhibitor is inactive,
139 normal shortcuts processing is restored by the compositor.
140 </description>
141 </event>
142 </interface>
143</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/pointer-constraints-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/pointer-constraints-unstable-v1.xml
new file mode 100644
index 0000000..4e67a13
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/pointer-constraints-unstable-v1.xml
@@ -0,0 +1,339 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="pointer_constraints_unstable_v1">
3
4 <copyright>
5 Copyright © 2014 Jonas Ådahl
6 Copyright © 2015 Red Hat Inc.
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 </copyright>
27
28 <description summary="protocol for constraining pointer motions">
29 This protocol specifies a set of interfaces used for adding constraints to
30 the motion of a pointer. Possible constraints include confining pointer
31 motions to a given region, or locking it to its current position.
32
33 In order to constrain the pointer, a client must first bind the global
34 interface "wp_pointer_constraints" which, if a compositor supports pointer
35 constraints, is exposed by the registry. Using the bound global object, the
36 client uses the request that corresponds to the type of constraint it wants
37 to make. See wp_pointer_constraints for more details.
38
39 Warning! The protocol described in this file is experimental and backward
40 incompatible changes may be made. Backward compatible changes may be added
41 together with the corresponding interface version bump. Backward
42 incompatible changes are done by bumping the version number in the protocol
43 and interface names and resetting the interface version. Once the protocol
44 is to be declared stable, the 'z' prefix and the version number in the
45 protocol and interface names are removed and the interface version number is
46 reset.
47 </description>
48
49 <interface name="zwp_pointer_constraints_v1" version="1">
50 <description summary="constrain the movement of a pointer">
51 The global interface exposing pointer constraining functionality. It
52 exposes two requests: lock_pointer for locking the pointer to its
53 position, and confine_pointer for locking the pointer to a region.
54
55 The lock_pointer and confine_pointer requests create the objects
56 wp_locked_pointer and wp_confined_pointer respectively, and the client can
57 use these objects to interact with the lock.
58
59 For any surface, only one lock or confinement may be active across all
60 wl_pointer objects of the same seat. If a lock or confinement is requested
61 when another lock or confinement is active or requested on the same surface
62 and with any of the wl_pointer objects of the same seat, an
63 'already_constrained' error will be raised.
64 </description>
65
66 <enum name="error">
67 <description summary="wp_pointer_constraints error values">
68 These errors can be emitted in response to wp_pointer_constraints
69 requests.
70 </description>
71 <entry name="already_constrained" value="1"
72 summary="pointer constraint already requested on that surface"/>
73 </enum>
74
75 <enum name="lifetime">
76 <description summary="constraint lifetime">
77 These values represent different lifetime semantics. They are passed
78 as arguments to the factory requests to specify how the constraint
79 lifetimes should be managed.
80 </description>
81 <entry name="oneshot" value="1">
82 <description summary="the pointer constraint is defunct once deactivated">
83 A oneshot pointer constraint will never reactivate once it has been
84 deactivated. See the corresponding deactivation event
85 (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
86 details.
87 </description>
88 </entry>
89 <entry name="persistent" value="2">
90 <description summary="the pointer constraint may reactivate">
91 A persistent pointer constraint may again reactivate once it has
92 been deactivated. See the corresponding deactivation event
93 (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
94 details.
95 </description>
96 </entry>
97 </enum>
98
99 <request name="destroy" type="destructor">
100 <description summary="destroy the pointer constraints manager object">
101 Used by the client to notify the server that it will no longer use this
102 pointer constraints object.
103 </description>
104 </request>
105
106 <request name="lock_pointer">
107 <description summary="lock pointer to a position">
108 The lock_pointer request lets the client request to disable movements of
109 the virtual pointer (i.e. the cursor), effectively locking the pointer
110 to a position. This request may not take effect immediately; in the
111 future, when the compositor deems implementation-specific constraints
112 are satisfied, the pointer lock will be activated and the compositor
113 sends a locked event.
114
115 The protocol provides no guarantee that the constraints are ever
116 satisfied, and does not require the compositor to send an error if the
117 constraints cannot ever be satisfied. It is thus possible to request a
118 lock that will never activate.
119
120 There may not be another pointer constraint of any kind requested or
121 active on the surface for any of the wl_pointer objects of the seat of
122 the passed pointer when requesting a lock. If there is, an error will be
123 raised. See general pointer lock documentation for more details.
124
125 The intersection of the region passed with this request and the input
126 region of the surface is used to determine where the pointer must be
127 in order for the lock to activate. It is up to the compositor whether to
128 warp the pointer or require some kind of user interaction for the lock
129 to activate. If the region is null the surface input region is used.
130
131 A surface may receive pointer focus without the lock being activated.
132
133 The request creates a new object wp_locked_pointer which is used to
134 interact with the lock as well as receive updates about its state. See
135 the the description of wp_locked_pointer for further information.
136
137 Note that while a pointer is locked, the wl_pointer objects of the
138 corresponding seat will not emit any wl_pointer.motion events, but
139 relative motion events will still be emitted via wp_relative_pointer
140 objects of the same seat. wl_pointer.axis and wl_pointer.button events
141 are unaffected.
142 </description>
143 <arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
144 <arg name="surface" type="object" interface="wl_surface"
145 summary="surface to lock pointer to"/>
146 <arg name="pointer" type="object" interface="wl_pointer"
147 summary="the pointer that should be locked"/>
148 <arg name="region" type="object" interface="wl_region" allow-null="true"
149 summary="region of surface"/>
150 <arg name="lifetime" type="uint" summary="lock lifetime"/>
151 </request>
152
153 <request name="confine_pointer">
154 <description summary="confine pointer to a region">
155 The confine_pointer request lets the client request to confine the
156 pointer cursor to a given region. This request may not take effect
157 immediately; in the future, when the compositor deems implementation-
158 specific constraints are satisfied, the pointer confinement will be
159 activated and the compositor sends a confined event.
160
161 The intersection of the region passed with this request and the input
162 region of the surface is used to determine where the pointer must be
163 in order for the confinement to activate. It is up to the compositor
164 whether to warp the pointer or require some kind of user interaction for
165 the confinement to activate. If the region is null the surface input
166 region is used.
167
168 The request will create a new object wp_confined_pointer which is used
169 to interact with the confinement as well as receive updates about its
170 state. See the the description of wp_confined_pointer for further
171 information.
172 </description>
173 <arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
174 <arg name="surface" type="object" interface="wl_surface"
175 summary="surface to lock pointer to"/>
176 <arg name="pointer" type="object" interface="wl_pointer"
177 summary="the pointer that should be confined"/>
178 <arg name="region" type="object" interface="wl_region" allow-null="true"
179 summary="region of surface"/>
180 <arg name="lifetime" type="uint" summary="confinement lifetime"/>
181 </request>
182 </interface>
183
184 <interface name="zwp_locked_pointer_v1" version="1">
185 <description summary="receive relative pointer motion events">
186 The wp_locked_pointer interface represents a locked pointer state.
187
188 While the lock of this object is active, the wl_pointer objects of the
189 associated seat will not emit any wl_pointer.motion events.
190
191 This object will send the event 'locked' when the lock is activated.
192 Whenever the lock is activated, it is guaranteed that the locked surface
193 will already have received pointer focus and that the pointer will be
194 within the region passed to the request creating this object.
195
196 To unlock the pointer, send the destroy request. This will also destroy
197 the wp_locked_pointer object.
198
199 If the compositor decides to unlock the pointer the unlocked event is
200 sent. See wp_locked_pointer.unlock for details.
201
202 When unlocking, the compositor may warp the cursor position to the set
203 cursor position hint. If it does, it will not result in any relative
204 motion events emitted via wp_relative_pointer.
205
206 If the surface the lock was requested on is destroyed and the lock is not
207 yet activated, the wp_locked_pointer object is now defunct and must be
208 destroyed.
209 </description>
210
211 <request name="destroy" type="destructor">
212 <description summary="destroy the locked pointer object">
213 Destroy the locked pointer object. If applicable, the compositor will
214 unlock the pointer.
215 </description>
216 </request>
217
218 <request name="set_cursor_position_hint">
219 <description summary="set the pointer cursor position hint">
220 Set the cursor position hint relative to the top left corner of the
221 surface.
222
223 If the client is drawing its own cursor, it should update the position
224 hint to the position of its own cursor. A compositor may use this
225 information to warp the pointer upon unlock in order to avoid pointer
226 jumps.
227
228 The cursor position hint is double buffered. The new hint will only take
229 effect when the associated surface gets it pending state applied. See
230 wl_surface.commit for details.
231 </description>
232 <arg name="surface_x" type="fixed"
233 summary="surface-local x coordinate"/>
234 <arg name="surface_y" type="fixed"
235 summary="surface-local y coordinate"/>
236 </request>
237
238 <request name="set_region">
239 <description summary="set a new lock region">
240 Set a new region used to lock the pointer.
241
242 The new lock region is double-buffered. The new lock region will
243 only take effect when the associated surface gets its pending state
244 applied. See wl_surface.commit for details.
245
246 For details about the lock region, see wp_locked_pointer.
247 </description>
248 <arg name="region" type="object" interface="wl_region" allow-null="true"
249 summary="region of surface"/>
250 </request>
251
252 <event name="locked">
253 <description summary="lock activation event">
254 Notification that the pointer lock of the seat's pointer is activated.
255 </description>
256 </event>
257
258 <event name="unlocked">
259 <description summary="lock deactivation event">
260 Notification that the pointer lock of the seat's pointer is no longer
261 active. If this is a oneshot pointer lock (see
262 wp_pointer_constraints.lifetime) this object is now defunct and should
263 be destroyed. If this is a persistent pointer lock (see
264 wp_pointer_constraints.lifetime) this pointer lock may again
265 reactivate in the future.
266 </description>
267 </event>
268 </interface>
269
270 <interface name="zwp_confined_pointer_v1" version="1">
271 <description summary="confined pointer object">
272 The wp_confined_pointer interface represents a confined pointer state.
273
274 This object will send the event 'confined' when the confinement is
275 activated. Whenever the confinement is activated, it is guaranteed that
276 the surface the pointer is confined to will already have received pointer
277 focus and that the pointer will be within the region passed to the request
278 creating this object. It is up to the compositor to decide whether this
279 requires some user interaction and if the pointer will warp to within the
280 passed region if outside.
281
282 To unconfine the pointer, send the destroy request. This will also destroy
283 the wp_confined_pointer object.
284
285 If the compositor decides to unconfine the pointer the unconfined event is
286 sent. The wp_confined_pointer object is at this point defunct and should
287 be destroyed.
288 </description>
289
290 <request name="destroy" type="destructor">
291 <description summary="destroy the confined pointer object">
292 Destroy the confined pointer object. If applicable, the compositor will
293 unconfine the pointer.
294 </description>
295 </request>
296
297 <request name="set_region">
298 <description summary="set a new confine region">
299 Set a new region used to confine the pointer.
300
301 The new confine region is double-buffered. The new confine region will
302 only take effect when the associated surface gets its pending state
303 applied. See wl_surface.commit for details.
304
305 If the confinement is active when the new confinement region is applied
306 and the pointer ends up outside of newly applied region, the pointer may
307 warped to a position within the new confinement region. If warped, a
308 wl_pointer.motion event will be emitted, but no
309 wp_relative_pointer.relative_motion event.
310
311 The compositor may also, instead of using the new region, unconfine the
312 pointer.
313
314 For details about the confine region, see wp_confined_pointer.
315 </description>
316 <arg name="region" type="object" interface="wl_region" allow-null="true"
317 summary="region of surface"/>
318 </request>
319
320 <event name="confined">
321 <description summary="pointer confined">
322 Notification that the pointer confinement of the seat's pointer is
323 activated.
324 </description>
325 </event>
326
327 <event name="unconfined">
328 <description summary="pointer unconfined">
329 Notification that the pointer confinement of the seat's pointer is no
330 longer active. If this is a oneshot pointer confinement (see
331 wp_pointer_constraints.lifetime) this object is now defunct and should
332 be destroyed. If this is a persistent pointer confinement (see
333 wp_pointer_constraints.lifetime) this pointer confinement may again
334 reactivate in the future.
335 </description>
336 </event>
337 </interface>
338
339</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/primary-selection-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/primary-selection-unstable-v1.xml
new file mode 100644
index 0000000..e5a39e3
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/primary-selection-unstable-v1.xml
@@ -0,0 +1,225 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="wp_primary_selection_unstable_v1">
3 <copyright>
4 Copyright © 2015, 2016 Red Hat
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <description summary="Primary selection protocol">
27 This protocol provides the ability to have a primary selection device to
28 match that of the X server. This primary selection is a shortcut to the
29 common clipboard selection, where text just needs to be selected in order
30 to allow copying it elsewhere. The de facto way to perform this action
31 is the middle mouse button, although it is not limited to this one.
32
33 Clients wishing to honor primary selection should create a primary
34 selection source and set it as the selection through
35 wp_primary_selection_device.set_selection whenever the text selection
36 changes. In order to minimize calls in pointer-driven text selection,
37 it should happen only once after the operation finished. Similarly,
38 a NULL source should be set when text is unselected.
39
40 wp_primary_selection_offer objects are first announced through the
41 wp_primary_selection_device.data_offer event. Immediately after this event,
42 the primary data offer will emit wp_primary_selection_offer.offer events
43 to let know of the mime types being offered.
44
45 When the primary selection changes, the client with the keyboard focus
46 will receive wp_primary_selection_device.selection events. Only the client
47 with the keyboard focus will receive such events with a non-NULL
48 wp_primary_selection_offer. Across keyboard focus changes, previously
49 focused clients will receive wp_primary_selection_device.events with a
50 NULL wp_primary_selection_offer.
51
52 In order to request the primary selection data, the client must pass
53 a recent serial pertaining to the press event that is triggering the
54 operation, if the compositor deems the serial valid and recent, the
55 wp_primary_selection_source.send event will happen in the other end
56 to let the transfer begin. The client owning the primary selection
57 should write the requested data, and close the file descriptor
58 immediately.
59
60 If the primary selection owner client disappeared during the transfer,
61 the client reading the data will receive a
62 wp_primary_selection_device.selection event with a NULL
63 wp_primary_selection_offer, the client should take this as a hint
64 to finish the reads related to the no longer existing offer.
65
66 The primary selection owner should be checking for errors during
67 writes, merely cancelling the ongoing transfer if any happened.
68 </description>
69
70 <interface name="zwp_primary_selection_device_manager_v1" version="1">
71 <description summary="X primary selection emulation">
72 The primary selection device manager is a singleton global object that
73 provides access to the primary selection. It allows to create
74 wp_primary_selection_source objects, as well as retrieving the per-seat
75 wp_primary_selection_device objects.
76 </description>
77
78 <request name="create_source">
79 <description summary="create a new primary selection source">
80 Create a new primary selection source.
81 </description>
82 <arg name="id" type="new_id" interface="zwp_primary_selection_source_v1"/>
83 </request>
84
85 <request name="get_device">
86 <description summary="create a new primary selection device">
87 Create a new data device for a given seat.
88 </description>
89 <arg name="id" type="new_id" interface="zwp_primary_selection_device_v1"/>
90 <arg name="seat" type="object" interface="wl_seat"/>
91 </request>
92
93 <request name="destroy" type="destructor">
94 <description summary="destroy the primary selection device manager">
95 Destroy the primary selection device manager.
96 </description>
97 </request>
98 </interface>
99
100 <interface name="zwp_primary_selection_device_v1" version="1">
101 <request name="set_selection">
102 <description summary="set the primary selection">
103 Replaces the current selection. The previous owner of the primary
104 selection will receive a wp_primary_selection_source.cancelled event.
105
106 To unset the selection, set the source to NULL.
107 </description>
108 <arg name="source" type="object" interface="zwp_primary_selection_source_v1" allow-null="true"/>
109 <arg name="serial" type="uint" summary="serial of the event that triggered this request"/>
110 </request>
111
112 <event name="data_offer">
113 <description summary="introduce a new wp_primary_selection_offer">
114 Introduces a new wp_primary_selection_offer object that may be used
115 to receive the current primary selection. Immediately following this
116 event, the new wp_primary_selection_offer object will send
117 wp_primary_selection_offer.offer events to describe the offered mime
118 types.
119 </description>
120 <arg name="offer" type="new_id" interface="zwp_primary_selection_offer_v1"/>
121 </event>
122
123 <event name="selection">
124 <description summary="advertise a new primary selection">
125 The wp_primary_selection_device.selection event is sent to notify the
126 client of a new primary selection. This event is sent after the
127 wp_primary_selection.data_offer event introducing this object, and after
128 the offer has announced its mimetypes through
129 wp_primary_selection_offer.offer.
130
131 The data_offer is valid until a new offer or NULL is received
132 or until the client loses keyboard focus. The client must destroy the
133 previous selection data_offer, if any, upon receiving this event.
134 </description>
135 <arg name="id" type="object" interface="zwp_primary_selection_offer_v1" allow-null="true"/>
136 </event>
137
138 <request name="destroy" type="destructor">
139 <description summary="destroy the primary selection device">
140 Destroy the primary selection device.
141 </description>
142 </request>
143 </interface>
144
145 <interface name="zwp_primary_selection_offer_v1" version="1">
146 <description summary="offer to transfer primary selection contents">
147 A wp_primary_selection_offer represents an offer to transfer the contents
148 of the primary selection clipboard to the client. Similar to
149 wl_data_offer, the offer also describes the mime types that the data can
150 be converted to and provides the mechanisms for transferring the data
151 directly to the client.
152 </description>
153
154 <request name="receive">
155 <description summary="request that the data is transferred">
156 To transfer the contents of the primary selection clipboard, the client
157 issues this request and indicates the mime type that it wants to
158 receive. The transfer happens through the passed file descriptor
159 (typically created with the pipe system call). The source client writes
160 the data in the mime type representation requested and then closes the
161 file descriptor.
162
163 The receiving client reads from the read end of the pipe until EOF and
164 closes its end, at which point the transfer is complete.
165 </description>
166 <arg name="mime_type" type="string"/>
167 <arg name="fd" type="fd"/>
168 </request>
169
170 <request name="destroy" type="destructor">
171 <description summary="destroy the primary selection offer">
172 Destroy the primary selection offer.
173 </description>
174 </request>
175
176 <event name="offer">
177 <description summary="advertise offered mime type">
178 Sent immediately after creating announcing the
179 wp_primary_selection_offer through
180 wp_primary_selection_device.data_offer. One event is sent per offered
181 mime type.
182 </description>
183 <arg name="mime_type" type="string"/>
184 </event>
185 </interface>
186
187 <interface name="zwp_primary_selection_source_v1" version="1">
188 <description summary="offer to replace the contents of the primary selection">
189 The source side of a wp_primary_selection_offer, it provides a way to
190 describe the offered data and respond to requests to transfer the
191 requested contents of the primary selection clipboard.
192 </description>
193
194 <request name="offer">
195 <description summary="add an offered mime type">
196 This request adds a mime type to the set of mime types advertised to
197 targets. Can be called several times to offer multiple types.
198 </description>
199 <arg name="mime_type" type="string"/>
200 </request>
201
202 <request name="destroy" type="destructor">
203 <description summary="destroy the primary selection source">
204 Destroy the primary selection source.
205 </description>
206 </request>
207
208 <event name="send">
209 <description summary="send the primary selection contents">
210 Request for the current primary selection contents from the client.
211 Send the specified mime type over the passed file descriptor, then
212 close it.
213 </description>
214 <arg name="mime_type" type="string"/>
215 <arg name="fd" type="fd"/>
216 </event>
217
218 <event name="cancelled">
219 <description summary="request for primary selection contents was canceled">
220 This primary selection source is no longer valid. The client should
221 clean up and destroy this primary selection source.
222 </description>
223 </event>
224 </interface>
225</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/relative-pointer-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/relative-pointer-unstable-v1.xml
new file mode 100644
index 0000000..ca6f81d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/relative-pointer-unstable-v1.xml
@@ -0,0 +1,136 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="relative_pointer_unstable_v1">
3
4 <copyright>
5 Copyright © 2014 Jonas Ådahl
6 Copyright © 2015 Red Hat Inc.
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 </copyright>
27
28 <description summary="protocol for relative pointer motion events">
29 This protocol specifies a set of interfaces used for making clients able to
30 receive relative pointer events not obstructed by barriers (such as the
31 monitor edge or other pointer barriers).
32
33 To start receiving relative pointer events, a client must first bind the
34 global interface "wp_relative_pointer_manager" which, if a compositor
35 supports relative pointer motion events, is exposed by the registry. After
36 having created the relative pointer manager proxy object, the client uses
37 it to create the actual relative pointer object using the
38 "get_relative_pointer" request given a wl_pointer. The relative pointer
39 motion events will then, when applicable, be transmitted via the proxy of
40 the newly created relative pointer object. See the documentation of the
41 relative pointer interface for more details.
42
43 Warning! The protocol described in this file is experimental and backward
44 incompatible changes may be made. Backward compatible changes may be added
45 together with the corresponding interface version bump. Backward
46 incompatible changes are done by bumping the version number in the protocol
47 and interface names and resetting the interface version. Once the protocol
48 is to be declared stable, the 'z' prefix and the version number in the
49 protocol and interface names are removed and the interface version number is
50 reset.
51 </description>
52
53 <interface name="zwp_relative_pointer_manager_v1" version="1">
54 <description summary="get relative pointer objects">
55 A global interface used for getting the relative pointer object for a
56 given pointer.
57 </description>
58
59 <request name="destroy" type="destructor">
60 <description summary="destroy the relative pointer manager object">
61 Used by the client to notify the server that it will no longer use this
62 relative pointer manager object.
63 </description>
64 </request>
65
66 <request name="get_relative_pointer">
67 <description summary="get a relative pointer object">
68 Create a relative pointer interface given a wl_pointer object. See the
69 wp_relative_pointer interface for more details.
70 </description>
71 <arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/>
72 <arg name="pointer" type="object" interface="wl_pointer"/>
73 </request>
74 </interface>
75
76 <interface name="zwp_relative_pointer_v1" version="1">
77 <description summary="relative pointer object">
78 A wp_relative_pointer object is an extension to the wl_pointer interface
79 used for emitting relative pointer events. It shares the same focus as
80 wl_pointer objects of the same seat and will only emit events when it has
81 focus.
82 </description>
83
84 <request name="destroy" type="destructor">
85 <description summary="release the relative pointer object"/>
86 </request>
87
88 <event name="relative_motion">
89 <description summary="relative pointer motion">
90 Relative x/y pointer motion from the pointer of the seat associated with
91 this object.
92
93 A relative motion is in the same dimension as regular wl_pointer motion
94 events, except they do not represent an absolute position. For example,
95 moving a pointer from (x, y) to (x', y') would have the equivalent
96 relative motion (x' - x, y' - y). If a pointer motion caused the
97 absolute pointer position to be clipped by for example the edge of the
98 monitor, the relative motion is unaffected by the clipping and will
99 represent the unclipped motion.
100
101 This event also contains non-accelerated motion deltas. The
102 non-accelerated delta is, when applicable, the regular pointer motion
103 delta as it was before having applied motion acceleration and other
104 transformations such as normalization.
105
106 Note that the non-accelerated delta does not represent 'raw' events as
107 they were read from some device. Pointer motion acceleration is device-
108 and configuration-specific and non-accelerated deltas and accelerated
109 deltas may have the same value on some devices.
110
111 Relative motions are not coupled to wl_pointer.motion events, and can be
112 sent in combination with such events, but also independently. There may
113 also be scenarios where wl_pointer.motion is sent, but there is no
114 relative motion. The order of an absolute and relative motion event
115 originating from the same physical motion is not guaranteed.
116
117 If the client needs button events or focus state, it can receive them
118 from a wl_pointer object of the same seat that the wp_relative_pointer
119 object is associated with.
120 </description>
121 <arg name="utime_hi" type="uint"
122 summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/>
123 <arg name="utime_lo" type="uint"
124 summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/>
125 <arg name="dx" type="fixed"
126 summary="the x component of the motion vector"/>
127 <arg name="dy" type="fixed"
128 summary="the y component of the motion vector"/>
129 <arg name="dx_unaccel" type="fixed"
130 summary="the x component of the unaccelerated motion vector"/>
131 <arg name="dy_unaccel" type="fixed"
132 summary="the y component of the unaccelerated motion vector"/>
133 </event>
134 </interface>
135
136</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/tablet-v2.xml b/src/contrib/SDL-3.2.20/wayland-protocols/tablet-v2.xml
new file mode 100644
index 0000000..55cd78e
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/tablet-v2.xml
@@ -0,0 +1,1178 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="tablet_v2">
3
4 <copyright>
5 Copyright 2014 © Stephen "Lyude" Chandler Paul
6 Copyright 2015-2016 © Red Hat, Inc.
7
8 Permission is hereby granted, free of charge, to any person
9 obtaining a copy of this software and associated documentation files
10 (the "Software"), to deal in the Software without restriction,
11 including without limitation the rights to use, copy, modify, merge,
12 publish, distribute, sublicense, and/or sell copies of the Software,
13 and to permit persons to whom the Software is furnished to do so,
14 subject to the following conditions:
15
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial
18 portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
24 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 SOFTWARE.
28 </copyright>
29
30 <description summary="Wayland protocol for graphics tablets">
31 This description provides a high-level overview of the interplay between
32 the interfaces defined this protocol. For details, see the protocol
33 specification.
34
35 More than one tablet may exist, and device-specifics matter. Tablets are
36 not represented by a single virtual device like wl_pointer. A client
37 binds to the tablet manager object which is just a proxy object. From
38 that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat)
39 and that returns the actual interface that has all the tablets. With
40 this indirection, we can avoid merging wp_tablet into the actual Wayland
41 protocol, a long-term benefit.
42
43 The wp_tablet_seat sends a "tablet added" event for each tablet
44 connected. That event is followed by descriptive events about the
45 hardware; currently that includes events for name, vid/pid and
46 a wp_tablet.path event that describes a local path. This path can be
47 used to uniquely identify a tablet or get more information through
48 libwacom. Emulated or nested tablets can skip any of those, e.g. a
49 virtual tablet may not have a vid/pid. The sequence of descriptive
50 events is terminated by a wp_tablet.done event to signal that a client
51 may now finalize any initialization for that tablet.
52
53 Events from tablets require a tool in proximity. Tools are also managed
54 by the tablet seat; a "tool added" event is sent whenever a tool is new
55 to the compositor. That event is followed by a number of descriptive
56 events about the hardware; currently that includes capabilities,
57 hardware id and serial number, and tool type. Similar to the tablet
58 interface, a wp_tablet_tool.done event is sent to terminate that initial
59 sequence.
60
61 Any event from a tool happens on the wp_tablet_tool interface. When the
62 tool gets into proximity of the tablet, a proximity_in event is sent on
63 the wp_tablet_tool interface, listing the tablet and the surface. That
64 event is followed by a motion event with the coordinates. After that,
65 it's the usual motion, axis, button, etc. events. The protocol's
66 serialisation means events are grouped by wp_tablet_tool.frame events.
67
68 Two special events (that don't exist in X) are down and up. They signal
69 "tip touching the surface". For tablets without real proximity
70 detection, the sequence is: proximity_in, motion, down, frame.
71
72 When the tool leaves proximity, a proximity_out event is sent. If any
73 button is still down, a button release event is sent before this
74 proximity event. These button events are sent in the same frame as the
75 proximity event to signal to the client that the buttons were held when
76 the tool left proximity.
77
78 If the tool moves out of the surface but stays in proximity (i.e.
79 between windows), compositor-specific grab policies apply. This usually
80 means that the proximity-out is delayed until all buttons are released.
81
82 Moving a tool physically from one tablet to the other has no real effect
83 on the protocol, since we already have the tool object from the "tool
84 added" event. All the information is already there and the proximity
85 events on both tablets are all a client needs to reconstruct what
86 happened.
87
88 Some extra axes are normalized, i.e. the client knows the range as
89 specified in the protocol (e.g. [0, 65535]), the granularity however is
90 unknown. The current normalized axes are pressure, distance, and slider.
91
92 Other extra axes are in physical units as specified in the protocol.
93 The current extra axes with physical units are tilt, rotation and
94 wheel rotation.
95
96 Since tablets work independently of the pointer controlled by the mouse,
97 the focus handling is independent too and controlled by proximity.
98 The wp_tablet_tool.set_cursor request sets a tool-specific cursor.
99 This cursor surface may be the same as the mouse cursor, and it may be
100 the same across tools but it is possible to be more fine-grained. For
101 example, a client may set different cursors for the pen and eraser.
102
103 Tools are generally independent of tablets and it is
104 compositor-specific policy when a tool can be removed. Common approaches
105 will likely include some form of removing a tool when all tablets the
106 tool was used on are removed.
107 </description>
108
109 <interface name="zwp_tablet_manager_v2" version="1">
110 <description summary="controller object for graphic tablet devices">
111 An object that provides access to the graphics tablets available on this
112 system. All tablets are associated with a seat, to get access to the
113 actual tablets, use wp_tablet_manager.get_tablet_seat.
114 </description>
115
116 <request name="get_tablet_seat">
117 <description summary="get the tablet seat">
118 Get the wp_tablet_seat object for the given seat. This object
119 provides access to all graphics tablets in this seat.
120 </description>
121 <arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/>
122 <arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" />
123 </request>
124
125 <request name="destroy" type="destructor">
126 <description summary="release the memory for the tablet manager object">
127 Destroy the wp_tablet_manager object. Objects created from this
128 object are unaffected and should be destroyed separately.
129 </description>
130 </request>
131 </interface>
132
133 <interface name="zwp_tablet_seat_v2" version="1">
134 <description summary="controller object for graphic tablet devices of a seat">
135 An object that provides access to the graphics tablets available on this
136 seat. After binding to this interface, the compositor sends a set of
137 wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events.
138 </description>
139
140 <request name="destroy" type="destructor">
141 <description summary="release the memory for the tablet seat object">
142 Destroy the wp_tablet_seat object. Objects created from this
143 object are unaffected and should be destroyed separately.
144 </description>
145 </request>
146
147 <event name="tablet_added">
148 <description summary="new device notification">
149 This event is sent whenever a new tablet becomes available on this
150 seat. This event only provides the object id of the tablet, any
151 static information about the tablet (device name, vid/pid, etc.) is
152 sent through the wp_tablet interface.
153 </description>
154 <arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/>
155 </event>
156
157 <event name="tool_added">
158 <description summary="a new tool has been used with a tablet">
159 This event is sent whenever a tool that has not previously been used
160 with a tablet comes into use. This event only provides the object id
161 of the tool; any static information about the tool (capabilities,
162 type, etc.) is sent through the wp_tablet_tool interface.
163 </description>
164 <arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/>
165 </event>
166
167 <event name="pad_added">
168 <description summary="new pad notification">
169 This event is sent whenever a new pad is known to the system. Typically,
170 pads are physically attached to tablets and a pad_added event is
171 sent immediately after the wp_tablet_seat.tablet_added.
172 However, some standalone pad devices logically attach to tablets at
173 runtime, and the client must wait for wp_tablet_pad.enter to know
174 the tablet a pad is attached to.
175
176 This event only provides the object id of the pad. All further
177 features (buttons, strips, rings) are sent through the wp_tablet_pad
178 interface.
179 </description>
180 <arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/>
181 </event>
182 </interface>
183
184 <interface name="zwp_tablet_tool_v2" version="1">
185 <description summary="a physical tablet tool">
186 An object that represents a physical tool that has been, or is
187 currently in use with a tablet in this seat. Each wp_tablet_tool
188 object stays valid until the client destroys it; the compositor
189 reuses the wp_tablet_tool object to indicate that the object's
190 respective physical tool has come into proximity of a tablet again.
191
192 A wp_tablet_tool object's relation to a physical tool depends on the
193 tablet's ability to report serial numbers. If the tablet supports
194 this capability, then the object represents a specific physical tool
195 and can be identified even when used on multiple tablets.
196
197 A tablet tool has a number of static characteristics, e.g. tool type,
198 hardware_serial and capabilities. These capabilities are sent in an
199 event sequence after the wp_tablet_seat.tool_added event before any
200 actual events from this tool. This initial event sequence is
201 terminated by a wp_tablet_tool.done event.
202
203 Tablet tool events are grouped by wp_tablet_tool.frame events.
204 Any events received before a wp_tablet_tool.frame event should be
205 considered part of the same hardware state change.
206 </description>
207
208 <request name="set_cursor">
209 <description summary="set the tablet tool's surface">
210 Sets the surface of the cursor used for this tool on the given
211 tablet. This request only takes effect if the tool is in proximity
212 of one of the requesting client's surfaces or the surface parameter
213 is the current pointer surface. If there was a previous surface set
214 with this request it is replaced. If surface is NULL, the cursor
215 image is hidden.
216
217 The parameters hotspot_x and hotspot_y define the position of the
218 pointer surface relative to the pointer location. Its top-left corner
219 is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the
220 coordinates of the pointer location, in surface-local coordinates.
221
222 On surface.attach requests to the pointer surface, hotspot_x and
223 hotspot_y are decremented by the x and y parameters passed to the
224 request. Attach must be confirmed by wl_surface.commit as usual.
225
226 The hotspot can also be updated by passing the currently set pointer
227 surface to this request with new values for hotspot_x and hotspot_y.
228
229 The current and pending input regions of the wl_surface are cleared,
230 and wl_surface.set_input_region is ignored until the wl_surface is no
231 longer used as the cursor. When the use as a cursor ends, the current
232 and pending input regions become undefined, and the wl_surface is
233 unmapped.
234
235 This request gives the surface the role of a wp_tablet_tool cursor. A
236 surface may only ever be used as the cursor surface for one
237 wp_tablet_tool. If the surface already has another role or has
238 previously been used as cursor surface for a different tool, a
239 protocol error is raised.
240 </description>
241 <arg name="serial" type="uint" summary="serial of the proximity_in event"/>
242 <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
243 <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>
244 <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>
245 </request>
246
247 <request name="destroy" type="destructor">
248 <description summary="destroy the tool object">
249 This destroys the client's resource for this tool object.
250 </description>
251 </request>
252
253 <enum name="type">
254 <description summary="a physical tool type">
255 Describes the physical type of a tool. The physical type of a tool
256 generally defines its base usage.
257
258 The mouse tool represents a mouse-shaped tool that is not a relative
259 device but bound to the tablet's surface, providing absolute
260 coordinates.
261
262 The lens tool is a mouse-shaped tool with an attached lens to
263 provide precision focus.
264 </description>
265 <entry name="pen" value="0x140" summary="Pen"/>
266 <entry name="eraser" value="0x141" summary="Eraser"/>
267 <entry name="brush" value="0x142" summary="Brush"/>
268 <entry name="pencil" value="0x143" summary="Pencil"/>
269 <entry name="airbrush" value="0x144" summary="Airbrush"/>
270 <entry name="finger" value="0x145" summary="Finger"/>
271 <entry name="mouse" value="0x146" summary="Mouse"/>
272 <entry name="lens" value="0x147" summary="Lens"/>
273 </enum>
274
275 <event name="type">
276 <description summary="tool type">
277 The tool type is the high-level type of the tool and usually decides
278 the interaction expected from this tool.
279
280 This event is sent in the initial burst of events before the
281 wp_tablet_tool.done event.
282 </description>
283 <arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/>
284 </event>
285
286 <event name="hardware_serial">
287 <description summary="unique hardware serial number of the tool">
288 If the physical tool can be identified by a unique 64-bit serial
289 number, this event notifies the client of this serial number.
290
291 If multiple tablets are available in the same seat and the tool is
292 uniquely identifiable by the serial number, that tool may move
293 between tablets.
294
295 Otherwise, if the tool has no serial number and this event is
296 missing, the tool is tied to the tablet it first comes into
297 proximity with. Even if the physical tool is used on multiple
298 tablets, separate wp_tablet_tool objects will be created, one per
299 tablet.
300
301 This event is sent in the initial burst of events before the
302 wp_tablet_tool.done event.
303 </description>
304 <arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/>
305 <arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/>
306 </event>
307
308 <event name="hardware_id_wacom">
309 <description summary="hardware id notification in Wacom's format">
310 This event notifies the client of a hardware id available on this tool.
311
312 The hardware id is a device-specific 64-bit id that provides extra
313 information about the tool in use, beyond the wl_tool.type
314 enumeration. The format of the id is specific to tablets made by
315 Wacom Inc. For example, the hardware id of a Wacom Grip
316 Pen (a stylus) is 0x802.
317
318 This event is sent in the initial burst of events before the
319 wp_tablet_tool.done event.
320 </description>
321 <arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/>
322 <arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/>
323 </event>
324
325 <enum name="capability">
326 <description summary="capability flags for a tool">
327 Describes extra capabilities on a tablet.
328
329 Any tool must provide x and y values, extra axes are
330 device-specific.
331 </description>
332 <entry name="tilt" value="1" summary="Tilt axes"/>
333 <entry name="pressure" value="2" summary="Pressure axis"/>
334 <entry name="distance" value="3" summary="Distance axis"/>
335 <entry name="rotation" value="4" summary="Z-rotation axis"/>
336 <entry name="slider" value="5" summary="Slider axis"/>
337 <entry name="wheel" value="6" summary="Wheel axis"/>
338 </enum>
339
340 <event name="capability">
341 <description summary="tool capability notification">
342 This event notifies the client of any capabilities of this tool,
343 beyond the main set of x/y axes and tip up/down detection.
344
345 One event is sent for each extra capability available on this tool.
346
347 This event is sent in the initial burst of events before the
348 wp_tablet_tool.done event.
349 </description>
350 <arg name="capability" type="uint" enum="capability" summary="the capability"/>
351 </event>
352
353 <event name="done">
354 <description summary="tool description events sequence complete">
355 This event signals the end of the initial burst of descriptive
356 events. A client may consider the static description of the tool to
357 be complete and finalize initialization of the tool.
358 </description>
359 </event>
360
361 <event name="removed">
362 <description summary="tool removed">
363 This event is sent when the tool is removed from the system and will
364 send no further events. Should the physical tool come back into
365 proximity later, a new wp_tablet_tool object will be created.
366
367 It is compositor-dependent when a tool is removed. A compositor may
368 remove a tool on proximity out, tablet removal or any other reason.
369 A compositor may also keep a tool alive until shutdown.
370
371 If the tool is currently in proximity, a proximity_out event will be
372 sent before the removed event. See wp_tablet_tool.proximity_out for
373 the handling of any buttons logically down.
374
375 When this event is received, the client must wp_tablet_tool.destroy
376 the object.
377 </description>
378 </event>
379
380 <event name="proximity_in">
381 <description summary="proximity in event">
382 Notification that this tool is focused on a certain surface.
383
384 This event can be received when the tool has moved from one surface to
385 another, or when the tool has come back into proximity above the
386 surface.
387
388 If any button is logically down when the tool comes into proximity,
389 the respective button event is sent after the proximity_in event but
390 within the same frame as the proximity_in event.
391 </description>
392 <arg name="serial" type="uint"/>
393 <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="The tablet the tool is in proximity of"/>
394 <arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/>
395 </event>
396
397 <event name="proximity_out">
398 <description summary="proximity out event">
399 Notification that this tool has either left proximity, or is no
400 longer focused on a certain surface.
401
402 When the tablet tool leaves proximity of the tablet, button release
403 events are sent for each button that was held down at the time of
404 leaving proximity. These events are sent before the proximity_out
405 event but within the same wp_tablet.frame.
406
407 If the tool stays within proximity of the tablet, but the focus
408 changes from one surface to another, a button release event may not
409 be sent until the button is actually released or the tool leaves the
410 proximity of the tablet.
411 </description>
412 </event>
413
414 <event name="down">
415 <description summary="tablet tool is making contact">
416 Sent whenever the tablet tool comes in contact with the surface of the
417 tablet.
418
419 If the tool is already in contact with the tablet when entering the
420 input region, the client owning said region will receive a
421 wp_tablet.proximity_in event, followed by a wp_tablet.down
422 event and a wp_tablet.frame event.
423
424 Note that this event describes logical contact, not physical
425 contact. On some devices, a compositor may not consider a tool in
426 logical contact until a minimum physical pressure threshold is
427 exceeded.
428 </description>
429 <arg name="serial" type="uint"/>
430 </event>
431
432 <event name="up">
433 <description summary="tablet tool is no longer making contact">
434 Sent whenever the tablet tool stops making contact with the surface of
435 the tablet, or when the tablet tool moves out of the input region
436 and the compositor grab (if any) is dismissed.
437
438 If the tablet tool moves out of the input region while in contact
439 with the surface of the tablet and the compositor does not have an
440 ongoing grab on the surface, the client owning said region will
441 receive a wp_tablet.up event, followed by a wp_tablet.proximity_out
442 event and a wp_tablet.frame event. If the compositor has an ongoing
443 grab on this device, this event sequence is sent whenever the grab
444 is dismissed in the future.
445
446 Note that this event describes logical contact, not physical
447 contact. On some devices, a compositor may not consider a tool out
448 of logical contact until physical pressure falls below a specific
449 threshold.
450 </description>
451 </event>
452
453 <event name="motion">
454 <description summary="motion event">
455 Sent whenever a tablet tool moves.
456 </description>
457 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
458 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
459 </event>
460
461 <event name="pressure">
462 <description summary="pressure change event">
463 Sent whenever the pressure axis on a tool changes. The value of this
464 event is normalized to a value between 0 and 65535.
465
466 Note that pressure may be nonzero even when a tool is not in logical
467 contact. See the down and up events for more details.
468 </description>
469 <arg name="pressure" type="uint" summary="The current pressure value"/>
470 </event>
471
472 <event name="distance">
473 <description summary="distance change event">
474 Sent whenever the distance axis on a tool changes. The value of this
475 event is normalized to a value between 0 and 65535.
476
477 Note that distance may be nonzero even when a tool is not in logical
478 contact. See the down and up events for more details.
479 </description>
480 <arg name="distance" type="uint" summary="The current distance value"/>
481 </event>
482
483 <event name="tilt">
484 <description summary="tilt change event">
485 Sent whenever one or both of the tilt axes on a tool change. Each tilt
486 value is in degrees, relative to the z-axis of the tablet.
487 The angle is positive when the top of a tool tilts along the
488 positive x or y axis.
489 </description>
490 <arg name="tilt_x" type="fixed" summary="The current value of the X tilt axis"/>
491 <arg name="tilt_y" type="fixed" summary="The current value of the Y tilt axis"/>
492 </event>
493
494 <event name="rotation">
495 <description summary="z-rotation change event">
496 Sent whenever the z-rotation axis on the tool changes. The
497 rotation value is in degrees clockwise from the tool's
498 logical neutral position.
499 </description>
500 <arg name="degrees" type="fixed" summary="The current rotation of the Z axis"/>
501 </event>
502
503 <event name="slider">
504 <description summary="Slider position change event">
505 Sent whenever the slider position on the tool changes. The
506 value is normalized between -65535 and 65535, with 0 as the logical
507 neutral position of the slider.
508
509 The slider is available on e.g. the Wacom Airbrush tool.
510 </description>
511 <arg name="position" type="int" summary="The current position of slider"/>
512 </event>
513
514 <event name="wheel">
515 <description summary="Wheel delta event">
516 Sent whenever the wheel on the tool emits an event. This event
517 contains two values for the same axis change. The degrees value is
518 in the same orientation as the wl_pointer.vertical_scroll axis. The
519 clicks value is in discrete logical clicks of the mouse wheel. This
520 value may be zero if the movement of the wheel was less
521 than one logical click.
522
523 Clients should choose either value and avoid mixing degrees and
524 clicks. The compositor may accumulate values smaller than a logical
525 click and emulate click events when a certain threshold is met.
526 Thus, wl_tablet_tool.wheel events with non-zero clicks values may
527 have different degrees values.
528 </description>
529 <arg name="degrees" type="fixed" summary="The wheel delta in degrees"/>
530 <arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/>
531 </event>
532
533 <enum name="button_state">
534 <description summary="physical button state">
535 Describes the physical state of a button that produced the button event.
536 </description>
537 <entry name="released" value="0" summary="button is not pressed"/>
538 <entry name="pressed" value="1" summary="button is pressed"/>
539 </enum>
540
541 <event name="button">
542 <description summary="button event">
543 Sent whenever a button on the tool is pressed or released.
544
545 If a button is held down when the tool moves in or out of proximity,
546 button events are generated by the compositor. See
547 wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for
548 details.
549 </description>
550 <arg name="serial" type="uint"/>
551 <arg name="button" type="uint" summary="The button whose state has changed"/>
552 <arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/>
553 </event>
554
555 <event name="frame">
556 <description summary="frame event">
557 Marks the end of a series of axis and/or button updates from the
558 tablet. The Wayland protocol requires axis updates to be sent
559 sequentially, however all events within a frame should be considered
560 one hardware event.
561 </description>
562 <arg name="time" type="uint" summary="The time of the event with millisecond granularity"/>
563 </event>
564
565 <enum name="error">
566 <entry name="role" value="0" summary="given wl_surface has another role"/>
567 </enum>
568 </interface>
569
570 <interface name="zwp_tablet_v2" version="1">
571 <description summary="graphics tablet device">
572 The wp_tablet interface represents one graphics tablet device. The
573 tablet interface itself does not generate events; all events are
574 generated by wp_tablet_tool objects when in proximity above a tablet.
575
576 A tablet has a number of static characteristics, e.g. device name and
577 pid/vid. These capabilities are sent in an event sequence after the
578 wp_tablet_seat.tablet_added event. This initial event sequence is
579 terminated by a wp_tablet.done event.
580 </description>
581
582 <request name="destroy" type="destructor">
583 <description summary="destroy the tablet object">
584 This destroys the client's resource for this tablet object.
585 </description>
586 </request>
587
588 <event name="name">
589 <description summary="tablet device name">
590 A descriptive name for the tablet device.
591
592 If the device has no descriptive name, this event is not sent.
593
594 This event is sent in the initial burst of events before the
595 wp_tablet.done event.
596 </description>
597 <arg name="name" type="string" summary="the device name"/>
598 </event>
599
600 <event name="id">
601 <description summary="tablet device USB vendor/product id">
602 The USB vendor and product IDs for the tablet device.
603
604 If the device has no USB vendor/product ID, this event is not sent.
605 This can happen for virtual devices or non-USB devices, for instance.
606
607 This event is sent in the initial burst of events before the
608 wp_tablet.done event.
609 </description>
610 <arg name="vid" type="uint" summary="USB vendor id"/>
611 <arg name="pid" type="uint" summary="USB product id"/>
612 </event>
613
614 <event name="path">
615 <description summary="path to the device">
616 A system-specific device path that indicates which device is behind
617 this wp_tablet. This information may be used to gather additional
618 information about the device, e.g. through libwacom.
619
620 A device may have more than one device path. If so, multiple
621 wp_tablet.path events are sent. A device may be emulated and not
622 have a device path, and in that case this event will not be sent.
623
624 The format of the path is unspecified, it may be a device node, a
625 sysfs path, or some other identifier. It is up to the client to
626 identify the string provided.
627
628 This event is sent in the initial burst of events before the
629 wp_tablet.done event.
630 </description>
631 <arg name="path" type="string" summary="path to local device"/>
632 </event>
633
634 <event name="done">
635 <description summary="tablet description events sequence complete">
636 This event is sent immediately to signal the end of the initial
637 burst of descriptive events. A client may consider the static
638 description of the tablet to be complete and finalize initialization
639 of the tablet.
640 </description>
641 </event>
642
643 <event name="removed">
644 <description summary="tablet removed event">
645 Sent when the tablet has been removed from the system. When a tablet
646 is removed, some tools may be removed.
647
648 When this event is received, the client must wp_tablet.destroy
649 the object.
650 </description>
651 </event>
652 </interface>
653
654 <interface name="zwp_tablet_pad_ring_v2" version="1">
655 <description summary="pad ring">
656 A circular interaction area, such as the touch ring on the Wacom Intuos
657 Pro series tablets.
658
659 Events on a ring are logically grouped by the wl_tablet_pad_ring.frame
660 event.
661 </description>
662
663 <request name="set_feedback">
664 <description summary="set compositor feedback">
665 Request that the compositor use the provided feedback string
666 associated with this ring. This request should be issued immediately
667 after a wp_tablet_pad_group.mode_switch event from the corresponding
668 group is received, or whenever the ring is mapped to a different
669 action. See wp_tablet_pad_group.mode_switch for more details.
670
671 Clients are encouraged to provide context-aware descriptions for
672 the actions associated with the ring; compositors may use this
673 information to offer visual feedback about the button layout
674 (eg. on-screen displays).
675
676 The provided string 'description' is a UTF-8 encoded string to be
677 associated with this ring, and is considered user-visible; general
678 internationalization rules apply.
679
680 The serial argument will be that of the last
681 wp_tablet_pad_group.mode_switch event received for the group of this
682 ring. Requests providing other serials than the most recent one will be
683 ignored.
684 </description>
685 <arg name="description" type="string" summary="ring description"/>
686 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
687 </request>
688
689 <request name="destroy" type="destructor">
690 <description summary="destroy the ring object">
691 This destroys the client's resource for this ring object.
692 </description>
693 </request>
694
695 <enum name="source">
696 <description summary="ring axis source">
697 Describes the source types for ring events. This indicates to the
698 client how a ring event was physically generated; a client may
699 adjust the user interface accordingly. For example, events
700 from a "finger" source may trigger kinetic scrolling.
701 </description>
702 <entry name="finger" value="1" summary="finger"/>
703 </enum>
704
705 <event name="source">
706 <description summary="ring event source">
707 Source information for ring events.
708
709 This event does not occur on its own. It is sent before a
710 wp_tablet_pad_ring.frame event and carries the source information
711 for all events within that frame.
712
713 The source specifies how this event was generated. If the source is
714 wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event
715 will be sent when the user lifts the finger off the device.
716
717 This event is optional. If the source is unknown for an interaction,
718 no event is sent.
719 </description>
720 <arg name="source" type="uint" enum="source" summary="the event source"/>
721 </event>
722
723 <event name="angle">
724 <description summary="angle changed">
725 Sent whenever the angle on a ring changes.
726
727 The angle is provided in degrees clockwise from the logical
728 north of the ring in the pad's current rotation.
729 </description>
730 <arg name="degrees" type="fixed" summary="the current angle in degrees"/>
731 </event>
732
733 <event name="stop">
734 <description summary="interaction stopped">
735 Stop notification for ring events.
736
737 For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop
738 event is sent to notify a client that the interaction with the ring
739 has terminated. This enables the client to implement kinetic scrolling.
740 See the wp_tablet_pad_ring.source documentation for information on
741 when this event may be generated.
742
743 Any wp_tablet_pad_ring.angle events with the same source after this
744 event should be considered as the start of a new interaction.
745 </description>
746 </event>
747
748 <event name="frame">
749 <description summary="end of a ring event sequence">
750 Indicates the end of a set of ring events that logically belong
751 together. A client is expected to accumulate the data in all events
752 within the frame before proceeding.
753
754 All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong
755 logically together. For example, on termination of a finger interaction
756 on a ring the compositor will send a wp_tablet_pad_ring.source event,
757 a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.
758
759 A wp_tablet_pad_ring.frame event is sent for every logical event
760 group, even if the group only contains a single wp_tablet_pad_ring
761 event. Specifically, a client may get a sequence: angle, frame,
762 angle, frame, etc.
763 </description>
764 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
765 </event>
766 </interface>
767
768 <interface name="zwp_tablet_pad_strip_v2" version="1">
769 <description summary="pad strip">
770 A linear interaction area, such as the strips found in Wacom Cintiq
771 models.
772
773 Events on a strip are logically grouped by the wl_tablet_pad_strip.frame
774 event.
775 </description>
776
777 <request name="set_feedback">
778 <description summary="set compositor feedback">
779 Requests the compositor to use the provided feedback string
780 associated with this strip. This request should be issued immediately
781 after a wp_tablet_pad_group.mode_switch event from the corresponding
782 group is received, or whenever the strip is mapped to a different
783 action. See wp_tablet_pad_group.mode_switch for more details.
784
785 Clients are encouraged to provide context-aware descriptions for
786 the actions associated with the strip, and compositors may use this
787 information to offer visual feedback about the button layout
788 (eg. on-screen displays).
789
790 The provided string 'description' is a UTF-8 encoded string to be
791 associated with this ring, and is considered user-visible; general
792 internationalization rules apply.
793
794 The serial argument will be that of the last
795 wp_tablet_pad_group.mode_switch event received for the group of this
796 strip. Requests providing other serials than the most recent one will be
797 ignored.
798 </description>
799 <arg name="description" type="string" summary="strip description"/>
800 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
801 </request>
802
803 <request name="destroy" type="destructor">
804 <description summary="destroy the strip object">
805 This destroys the client's resource for this strip object.
806 </description>
807 </request>
808
809 <enum name="source">
810 <description summary="strip axis source">
811 Describes the source types for strip events. This indicates to the
812 client how a strip event was physically generated; a client may
813 adjust the user interface accordingly. For example, events
814 from a "finger" source may trigger kinetic scrolling.
815 </description>
816 <entry name="finger" value="1" summary="finger"/>
817 </enum>
818
819 <event name="source">
820 <description summary="strip event source">
821 Source information for strip events.
822
823 This event does not occur on its own. It is sent before a
824 wp_tablet_pad_strip.frame event and carries the source information
825 for all events within that frame.
826
827 The source specifies how this event was generated. If the source is
828 wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event
829 will be sent when the user lifts their finger off the device.
830
831 This event is optional. If the source is unknown for an interaction,
832 no event is sent.
833 </description>
834 <arg name="source" type="uint" enum="source" summary="the event source"/>
835 </event>
836
837 <event name="position">
838 <description summary="position changed">
839 Sent whenever the position on a strip changes.
840
841 The position is normalized to a range of [0, 65535], the 0-value
842 represents the top-most and/or left-most position of the strip in
843 the pad's current rotation.
844 </description>
845 <arg name="position" type="uint" summary="the current position"/>
846 </event>
847
848 <event name="stop">
849 <description summary="interaction stopped">
850 Stop notification for strip events.
851
852 For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop
853 event is sent to notify a client that the interaction with the strip
854 has terminated. This enables the client to implement kinetic
855 scrolling. See the wp_tablet_pad_strip.source documentation for
856 information on when this event may be generated.
857
858 Any wp_tablet_pad_strip.position events with the same source after this
859 event should be considered as the start of a new interaction.
860 </description>
861 </event>
862
863 <event name="frame">
864 <description summary="end of a strip event sequence">
865 Indicates the end of a set of events that represent one logical
866 hardware strip event. A client is expected to accumulate the data
867 in all events within the frame before proceeding.
868
869 All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong
870 logically together. For example, on termination of a finger interaction
871 on a strip the compositor will send a wp_tablet_pad_strip.source event,
872 a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame
873 event.
874
875 A wp_tablet_pad_strip.frame event is sent for every logical event
876 group, even if the group only contains a single wp_tablet_pad_strip
877 event. Specifically, a client may get a sequence: position, frame,
878 position, frame, etc.
879 </description>
880 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
881 </event>
882 </interface>
883
884 <interface name="zwp_tablet_pad_group_v2" version="1">
885 <description summary="a set of buttons, rings and strips">
886 A pad group describes a distinct (sub)set of buttons, rings and strips
887 present in the tablet. The criteria of this grouping is usually positional,
888 eg. if a tablet has buttons on the left and right side, 2 groups will be
889 presented. The physical arrangement of groups is undisclosed and may
890 change on the fly.
891
892 Pad groups will announce their features during pad initialization. Between
893 the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the
894 pad group will announce the buttons, rings and strips contained in it,
895 plus the number of supported modes.
896
897 Modes are a mechanism to allow multiple groups of actions for every element
898 in the pad group. The number of groups and available modes in each is
899 persistent across device plugs. The current mode is user-switchable, it
900 will be announced through the wp_tablet_pad_group.mode_switch event both
901 whenever it is switched, and after wp_tablet_pad.enter.
902
903 The current mode logically applies to all elements in the pad group,
904 although it is at clients' discretion whether to actually perform different
905 actions, and/or issue the respective .set_feedback requests to notify the
906 compositor. See the wp_tablet_pad_group.mode_switch event for more details.
907 </description>
908
909 <request name="destroy" type="destructor">
910 <description summary="destroy the pad object">
911 Destroy the wp_tablet_pad_group object. Objects created from this object
912 are unaffected and should be destroyed separately.
913 </description>
914 </request>
915
916 <event name="buttons">
917 <description summary="buttons announced">
918 Sent on wp_tablet_pad_group initialization to announce the available
919 buttons in the group. Button indices start at 0, a button may only be
920 in one group at a time.
921
922 This event is first sent in the initial burst of events before the
923 wp_tablet_pad_group.done event.
924
925 Some buttons are reserved by the compositor. These buttons may not be
926 assigned to any wp_tablet_pad_group. Compositors may broadcast this
927 event in the case of changes to the mapping of these reserved buttons.
928 If the compositor happens to reserve all buttons in a group, this event
929 will be sent with an empty array.
930 </description>
931 <arg name="buttons" type="array" summary="buttons in this group"/>
932 </event>
933
934 <event name="ring">
935 <description summary="ring announced">
936 Sent on wp_tablet_pad_group initialization to announce available rings.
937 One event is sent for each ring available on this pad group.
938
939 This event is sent in the initial burst of events before the
940 wp_tablet_pad_group.done event.
941 </description>
942 <arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/>
943 </event>
944
945 <event name="strip">
946 <description summary="strip announced">
947 Sent on wp_tablet_pad initialization to announce available strips.
948 One event is sent for each strip available on this pad group.
949
950 This event is sent in the initial burst of events before the
951 wp_tablet_pad_group.done event.
952 </description>
953 <arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/>
954 </event>
955
956 <event name="modes">
957 <description summary="mode-switch ability announced">
958 Sent on wp_tablet_pad_group initialization to announce that the pad
959 group may switch between modes. A client may use a mode to store a
960 specific configuration for buttons, rings and strips and use the
961 wl_tablet_pad_group.mode_switch event to toggle between these
962 configurations. Mode indices start at 0.
963
964 Switching modes is compositor-dependent. See the
965 wp_tablet_pad_group.mode_switch event for more details.
966
967 This event is sent in the initial burst of events before the
968 wp_tablet_pad_group.done event. This event is only sent when more than
969 more than one mode is available.
970 </description>
971 <arg name="modes" type="uint" summary="the number of modes"/>
972 </event>
973
974 <event name="done">
975 <description summary="tablet group description events sequence complete">
976 This event is sent immediately to signal the end of the initial
977 burst of descriptive events. A client may consider the static
978 description of the tablet to be complete and finalize initialization
979 of the tablet group.
980 </description>
981 </event>
982
983 <event name="mode_switch">
984 <description summary="mode switch event">
985 Notification that the mode was switched.
986
987 A mode applies to all buttons, rings and strips in a group
988 simultaneously, but a client is not required to assign different actions
989 for each mode. For example, a client may have mode-specific button
990 mappings but map the ring to vertical scrolling in all modes. Mode
991 indices start at 0.
992
993 Switching modes is compositor-dependent. The compositor may provide
994 visual cues to the client about the mode, e.g. by toggling LEDs on
995 the tablet device. Mode-switching may be software-controlled or
996 controlled by one or more physical buttons. For example, on a Wacom
997 Intuos Pro, the button inside the ring may be assigned to switch
998 between modes.
999
1000 The compositor will also send this event after wp_tablet_pad.enter on
1001 each group in order to notify of the current mode. Groups that only
1002 feature one mode will use mode=0 when emitting this event.
1003
1004 If a button action in the new mode differs from the action in the
1005 previous mode, the client should immediately issue a
1006 wp_tablet_pad.set_feedback request for each changed button.
1007
1008 If a ring or strip action in the new mode differs from the action
1009 in the previous mode, the client should immediately issue a
1010 wp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request
1011 for each changed ring or strip.
1012 </description>
1013 <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>
1014 <arg name="serial" type="uint"/>
1015 <arg name="mode" type="uint" summary="the new mode of the pad"/>
1016 </event>
1017 </interface>
1018
1019 <interface name="zwp_tablet_pad_v2" version="1">
1020 <description summary="a set of buttons, rings and strips">
1021 A pad device is a set of buttons, rings and strips
1022 usually physically present on the tablet device itself. Some
1023 exceptions exist where the pad device is physically detached, e.g. the
1024 Wacom ExpressKey Remote.
1025
1026 Pad devices have no axes that control the cursor and are generally
1027 auxiliary devices to the tool devices used on the tablet surface.
1028
1029 A pad device has a number of static characteristics, e.g. the number
1030 of rings. These capabilities are sent in an event sequence after the
1031 wp_tablet_seat.pad_added event before any actual events from this pad.
1032 This initial event sequence is terminated by a wp_tablet_pad.done
1033 event.
1034
1035 All pad features (buttons, rings and strips) are logically divided into
1036 groups and all pads have at least one group. The available groups are
1037 notified through the wp_tablet_pad.group event; the compositor will
1038 emit one event per group before emitting wp_tablet_pad.done.
1039
1040 Groups may have multiple modes. Modes allow clients to map multiple
1041 actions to a single pad feature. Only one mode can be active per group,
1042 although different groups may have different active modes.
1043 </description>
1044
1045 <request name="set_feedback">
1046 <description summary="set compositor feedback">
1047 Requests the compositor to use the provided feedback string
1048 associated with this button. This request should be issued immediately
1049 after a wp_tablet_pad_group.mode_switch event from the corresponding
1050 group is received, or whenever a button is mapped to a different
1051 action. See wp_tablet_pad_group.mode_switch for more details.
1052
1053 Clients are encouraged to provide context-aware descriptions for
1054 the actions associated with each button, and compositors may use
1055 this information to offer visual feedback on the button layout
1056 (e.g. on-screen displays).
1057
1058 Button indices start at 0. Setting the feedback string on a button
1059 that is reserved by the compositor (i.e. not belonging to any
1060 wp_tablet_pad_group) does not generate an error but the compositor
1061 is free to ignore the request.
1062
1063 The provided string 'description' is a UTF-8 encoded string to be
1064 associated with this ring, and is considered user-visible; general
1065 internationalization rules apply.
1066
1067 The serial argument will be that of the last
1068 wp_tablet_pad_group.mode_switch event received for the group of this
1069 button. Requests providing other serials than the most recent one will
1070 be ignored.
1071 </description>
1072 <arg name="button" type="uint" summary="button index"/>
1073 <arg name="description" type="string" summary="button description"/>
1074 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
1075 </request>
1076
1077 <request name="destroy" type="destructor">
1078 <description summary="destroy the pad object">
1079 Destroy the wp_tablet_pad object. Objects created from this object
1080 are unaffected and should be destroyed separately.
1081 </description>
1082 </request>
1083
1084 <event name="group">
1085 <description summary="group announced">
1086 Sent on wp_tablet_pad initialization to announce available groups.
1087 One event is sent for each pad group available.
1088
1089 This event is sent in the initial burst of events before the
1090 wp_tablet_pad.done event. At least one group will be announced.
1091 </description>
1092 <arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/>
1093 </event>
1094
1095 <event name="path">
1096 <description summary="path to the device">
1097 A system-specific device path that indicates which device is behind
1098 this wp_tablet_pad. This information may be used to gather additional
1099 information about the device, e.g. through libwacom.
1100
1101 The format of the path is unspecified, it may be a device node, a
1102 sysfs path, or some other identifier. It is up to the client to
1103 identify the string provided.
1104
1105 This event is sent in the initial burst of events before the
1106 wp_tablet_pad.done event.
1107 </description>
1108 <arg name="path" type="string" summary="path to local device"/>
1109 </event>
1110
1111 <event name="buttons">
1112 <description summary="buttons announced">
1113 Sent on wp_tablet_pad initialization to announce the available
1114 buttons.
1115
1116 This event is sent in the initial burst of events before the
1117 wp_tablet_pad.done event. This event is only sent when at least one
1118 button is available.
1119 </description>
1120 <arg name="buttons" type="uint" summary="the number of buttons"/>
1121 </event>
1122
1123 <event name="done">
1124 <description summary="pad description event sequence complete">
1125 This event signals the end of the initial burst of descriptive
1126 events. A client may consider the static description of the pad to
1127 be complete and finalize initialization of the pad.
1128 </description>
1129 </event>
1130
1131 <enum name="button_state">
1132 <description summary="physical button state">
1133 Describes the physical state of a button that caused the button
1134 event.
1135 </description>
1136 <entry name="released" value="0" summary="the button is not pressed"/>
1137 <entry name="pressed" value="1" summary="the button is pressed"/>
1138 </enum>
1139
1140 <event name="button">
1141 <description summary="physical button state">
1142 Sent whenever the physical state of a button changes.
1143 </description>
1144 <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>
1145 <arg name="button" type="uint" summary="the index of the button that changed state"/>
1146 <arg name="state" type="uint" enum="button_state"/>
1147 </event>
1148
1149 <event name="enter">
1150 <description summary="enter event">
1151 Notification that this pad is focused on the specified surface.
1152 </description>
1153 <arg name="serial" type="uint" summary="serial number of the enter event"/>
1154 <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="the tablet the pad is attached to"/>
1155 <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is focused on"/>
1156 </event>
1157
1158 <event name="leave">
1159 <description summary="leave event">
1160 Notification that this pad is no longer focused on the specified
1161 surface.
1162 </description>
1163 <arg name="serial" type="uint" summary="serial number of the leave event"/>
1164 <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is no longer focused on"/>
1165 </event>
1166
1167 <event name="removed">
1168 <description summary="pad removed event">
1169 Sent when the pad has been removed from the system. When a tablet
1170 is removed its pad(s) will be removed too.
1171
1172 When this event is received, the client must destroy all rings, strips
1173 and groups that were offered by this pad, and issue wp_tablet_pad.destroy
1174 the pad itself.
1175 </description>
1176 </event>
1177 </interface>
1178</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/text-input-unstable-v3.xml b/src/contrib/SDL-3.2.20/wayland-protocols/text-input-unstable-v3.xml
new file mode 100644
index 0000000..d5f6322
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/text-input-unstable-v3.xml
@@ -0,0 +1,452 @@
1<?xml version="1.0" encoding="UTF-8"?>
2
3<protocol name="text_input_unstable_v3">
4 <copyright>
5 Copyright © 2012, 2013 Intel Corporation
6 Copyright © 2015, 2016 Jan Arne Petersen
7 Copyright © 2017, 2018 Red Hat, Inc.
8 Copyright © 2018 Purism SPC
9
10 Permission to use, copy, modify, distribute, and sell this
11 software and its documentation for any purpose is hereby granted
12 without fee, provided that the above copyright notice appear in
13 all copies and that both that copyright notice and this permission
14 notice appear in supporting documentation, and that the name of
15 the copyright holders not be used in advertising or publicity
16 pertaining to distribution of the software without specific,
17 written prior permission. The copyright holders make no
18 representations about the suitability of this software for any
19 purpose. It is provided "as is" without express or implied
20 warranty.
21
22 THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
23 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
24 FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
26 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
28 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
29 THIS SOFTWARE.
30 </copyright>
31
32 <description summary="Protocol for composing text">
33 This protocol allows compositors to act as input methods and to send text
34 to applications. A text input object is used to manage state of what are
35 typically text entry fields in the application.
36
37 This document adheres to the RFC 2119 when using words like "must",
38 "should", "may", etc.
39
40 Warning! The protocol described in this file is experimental and
41 backward incompatible changes may be made. Backward compatible changes
42 may be added together with the corresponding interface version bump.
43 Backward incompatible changes are done by bumping the version number in
44 the protocol and interface names and resetting the interface version.
45 Once the protocol is to be declared stable, the 'z' prefix and the
46 version number in the protocol and interface names are removed and the
47 interface version number is reset.
48 </description>
49
50 <interface name="zwp_text_input_v3" version="1">
51 <description summary="text input">
52 The zwp_text_input_v3 interface represents text input and input methods
53 associated with a seat. It provides enter/leave events to follow the
54 text input focus for a seat.
55
56 Requests are used to enable/disable the text-input object and set
57 state information like surrounding and selected text or the content type.
58 The information about the entered text is sent to the text-input object
59 via the preedit_string and commit_string events.
60
61 Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices
62 must not point to middle bytes inside a code point: they must either
63 point to the first byte of a code point or to the end of the buffer.
64 Lengths must be measured between two valid indices.
65
66 Focus moving throughout surfaces will result in the emission of
67 zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused
68 surface must commit zwp_text_input_v3.enable and
69 zwp_text_input_v3.disable requests as the keyboard focus moves across
70 editable and non-editable elements of the UI. Those two requests are not
71 expected to be paired with each other, the compositor must be able to
72 handle consecutive series of the same request.
73
74 State is sent by the state requests (set_surrounding_text,
75 set_content_type and set_cursor_rectangle) and a commit request. After an
76 enter event or disable request all state information is invalidated and
77 needs to be resent by the client.
78 </description>
79
80 <request name="destroy" type="destructor">
81 <description summary="Destroy the wp_text_input">
82 Destroy the wp_text_input object. Also disables all surfaces enabled
83 through this wp_text_input object.
84 </description>
85 </request>
86
87 <request name="enable">
88 <description summary="Request text input to be enabled">
89 Requests text input on the surface previously obtained from the enter
90 event.
91
92 This request must be issued every time the active text input changes
93 to a new one, including within the current surface. Use
94 zwp_text_input_v3.disable when there is no longer any input focus on
95 the current surface.
96
97 Clients must not enable more than one text input on the single seat
98 and should disable the current text input before enabling the new one.
99 At most one instance of text input may be in enabled state per instance,
100 Requests to enable the another text input when some text input is active
101 must be ignored by compositor.
102
103 This request resets all state associated with previous enable, disable,
104 set_surrounding_text, set_text_change_cause, set_content_type, and
105 set_cursor_rectangle requests, as well as the state associated with
106 preedit_string, commit_string, and delete_surrounding_text events.
107
108 The set_surrounding_text, set_content_type and set_cursor_rectangle
109 requests must follow if the text input supports the necessary
110 functionality.
111
112 State set with this request is double-buffered. It will get applied on
113 the next zwp_text_input_v3.commit request, and stay valid until the
114 next committed enable or disable request.
115
116 The changes must be applied by the compositor after issuing a
117 zwp_text_input_v3.commit request.
118 </description>
119 </request>
120
121 <request name="disable">
122 <description summary="Disable text input on a surface">
123 Explicitly disable text input on the current surface (typically when
124 there is no focus on any text entry inside the surface).
125
126 State set with this request is double-buffered. It will get applied on
127 the next zwp_text_input_v3.commit request.
128 </description>
129 </request>
130
131 <request name="set_surrounding_text">
132 <description summary="sets the surrounding text">
133 Sets the surrounding plain text around the input, excluding the preedit
134 text.
135
136 The client should notify the compositor of any changes in any of the
137 values carried with this request, including changes caused by handling
138 incoming text-input events as well as changes caused by other
139 mechanisms like keyboard typing.
140
141 If the client is unaware of the text around the cursor, it should not
142 issue this request, to signify lack of support to the compositor.
143
144 Text is UTF-8 encoded, and should include the cursor position, the
145 complete selection and additional characters before and after them.
146 There is a maximum length of wayland messages, so text can not be
147 longer than 4000 bytes.
148
149 Cursor is the byte offset of the cursor within text buffer.
150
151 Anchor is the byte offset of the selection anchor within text buffer.
152 If there is no selected text, anchor is the same as cursor.
153
154 If any preedit text is present, it is replaced with a cursor for the
155 purpose of this event.
156
157 Values set with this request are double-buffered. They will get applied
158 on the next zwp_text_input_v3.commit request, and stay valid until the
159 next committed enable or disable request.
160
161 The initial state for affected fields is empty, meaning that the text
162 input does not support sending surrounding text. If the empty values
163 get applied, subsequent attempts to change them may have no effect.
164 </description>
165 <arg name="text" type="string"/>
166 <arg name="cursor" type="int"/>
167 <arg name="anchor" type="int"/>
168 </request>
169
170 <enum name="change_cause">
171 <description summary="text change reason">
172 Reason for the change of surrounding text or cursor posision.
173 </description>
174 <entry name="input_method" value="0" summary="input method caused the change"/>
175 <entry name="other" value="1" summary="something else than the input method caused the change"/>
176 </enum>
177
178 <request name="set_text_change_cause">
179 <description summary="indicates the cause of surrounding text change">
180 Tells the compositor why the text surrounding the cursor changed.
181
182 Whenever the client detects an external change in text, cursor, or
183 anchor posision, it must issue this request to the compositor. This
184 request is intended to give the input method a chance to update the
185 preedit text in an appropriate way, e.g. by removing it when the user
186 starts typing with a keyboard.
187
188 cause describes the source of the change.
189
190 The value set with this request is double-buffered. It must be applied
191 and reset to initial at the next zwp_text_input_v3.commit request.
192
193 The initial value of cause is input_method.
194 </description>
195 <arg name="cause" type="uint" enum="change_cause"/>
196 </request>
197
198 <enum name="content_hint" bitfield="true">
199 <description summary="content hint">
200 Content hint is a bitmask to allow to modify the behavior of the text
201 input.
202 </description>
203 <entry name="none" value="0x0" summary="no special behavior"/>
204 <entry name="completion" value="0x1" summary="suggest word completions"/>
205 <entry name="spellcheck" value="0x2" summary="suggest word corrections"/>
206 <entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/>
207 <entry name="lowercase" value="0x8" summary="prefer lowercase letters"/>
208 <entry name="uppercase" value="0x10" summary="prefer uppercase letters"/>
209 <entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/>
210 <entry name="hidden_text" value="0x40" summary="characters should be hidden"/>
211 <entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/>
212 <entry name="latin" value="0x100" summary="just Latin characters should be entered"/>
213 <entry name="multiline" value="0x200" summary="the text input is multiline"/>
214 </enum>
215
216 <enum name="content_purpose">
217 <description summary="content purpose">
218 The content purpose allows to specify the primary purpose of a text
219 input.
220
221 This allows an input method to show special purpose input panels with
222 extra characters or to disallow some characters.
223 </description>
224 <entry name="normal" value="0" summary="default input, allowing all characters"/>
225 <entry name="alpha" value="1" summary="allow only alphabetic characters"/>
226 <entry name="digits" value="2" summary="allow only digits"/>
227 <entry name="number" value="3" summary="input a number (including decimal separator and sign)"/>
228 <entry name="phone" value="4" summary="input a phone number"/>
229 <entry name="url" value="5" summary="input an URL"/>
230 <entry name="email" value="6" summary="input an email address"/>
231 <entry name="name" value="7" summary="input a name of a person"/>
232 <entry name="password" value="8" summary="input a password (combine with sensitive_data hint)"/>
233 <entry name="pin" value="9" summary="input is a numeric password (combine with sensitive_data hint)"/>
234 <entry name="date" value="10" summary="input a date"/>
235 <entry name="time" value="11" summary="input a time"/>
236 <entry name="datetime" value="12" summary="input a date and time"/>
237 <entry name="terminal" value="13" summary="input for a terminal"/>
238 </enum>
239
240 <request name="set_content_type">
241 <description summary="set content purpose and hint">
242 Sets the content purpose and content hint. While the purpose is the
243 basic purpose of an input field, the hint flags allow to modify some of
244 the behavior.
245
246 Values set with this request are double-buffered. They will get applied
247 on the next zwp_text_input_v3.commit request.
248 Subsequent attempts to update them may have no effect. The values
249 remain valid until the next committed enable or disable request.
250
251 The initial value for hint is none, and the initial value for purpose
252 is normal.
253 </description>
254 <arg name="hint" type="uint" enum="content_hint"/>
255 <arg name="purpose" type="uint" enum="content_purpose"/>
256 </request>
257
258 <request name="set_cursor_rectangle">
259 <description summary="set cursor position">
260 Marks an area around the cursor as a x, y, width, height rectangle in
261 surface local coordinates.
262
263 Allows the compositor to put a window with word suggestions near the
264 cursor, without obstructing the text being input.
265
266 If the client is unaware of the position of edited text, it should not
267 issue this request, to signify lack of support to the compositor.
268
269 Values set with this request are double-buffered. They will get applied
270 on the next zwp_text_input_v3.commit request, and stay valid until the
271 next committed enable or disable request.
272
273 The initial values describing a cursor rectangle are empty. That means
274 the text input does not support describing the cursor area. If the
275 empty values get applied, subsequent attempts to change them may have
276 no effect.
277 </description>
278 <arg name="x" type="int"/>
279 <arg name="y" type="int"/>
280 <arg name="width" type="int"/>
281 <arg name="height" type="int"/>
282 </request>
283
284 <request name="commit">
285 <description summary="commit state">
286 Atomically applies state changes recently sent to the compositor.
287
288 The commit request establishes and updates the state of the client, and
289 must be issued after any changes to apply them.
290
291 Text input state (enabled status, content purpose, content hint,
292 surrounding text and change cause, cursor rectangle) is conceptually
293 double-buffered within the context of a text input, i.e. between a
294 committed enable request and the following committed enable or disable
295 request.
296
297 Protocol requests modify the pending state, as opposed to the current
298 state in use by the input method. A commit request atomically applies
299 all pending state, replacing the current state. After commit, the new
300 pending state is as documented for each related request.
301
302 Requests are applied in the order of arrival.
303
304 Neither current nor pending state are modified unless noted otherwise.
305
306 The compositor must count the number of commit requests coming from
307 each zwp_text_input_v3 object and use the count as the serial in done
308 events.
309 </description>
310 </request>
311
312 <event name="enter">
313 <description summary="enter event">
314 Notification that this seat's text-input focus is on a certain surface.
315
316 If client has created multiple text input objects, compositor must send
317 this event to all of them.
318
319 When the seat has the keyboard capability the text-input focus follows
320 the keyboard focus. This event sets the current surface for the
321 text-input object.
322 </description>
323 <arg name="surface" type="object" interface="wl_surface"/>
324 </event>
325
326 <event name="leave">
327 <description summary="leave event">
328 Notification that this seat's text-input focus is no longer on a
329 certain surface. The client should reset any preedit string previously
330 set.
331
332 The leave notification clears the current surface. It is sent before
333 the enter notification for the new focus. After leave event, compositor
334 must ignore requests from any text input instances until next enter
335 event.
336
337 When the seat has the keyboard capability the text-input focus follows
338 the keyboard focus.
339 </description>
340 <arg name="surface" type="object" interface="wl_surface"/>
341 </event>
342
343 <event name="preedit_string">
344 <description summary="pre-edit">
345 Notify when a new composing text (pre-edit) should be set at the
346 current cursor position. Any previously set composing text must be
347 removed. Any previously existing selected text must be removed.
348
349 The argument text contains the pre-edit string buffer.
350
351 The parameters cursor_begin and cursor_end are counted in bytes
352 relative to the beginning of the submitted text buffer. Cursor should
353 be hidden when both are equal to -1.
354
355 They could be represented by the client as a line if both values are
356 the same, or as a text highlight otherwise.
357
358 Values set with this event are double-buffered. They must be applied
359 and reset to initial on the next zwp_text_input_v3.done event.
360
361 The initial value of text is an empty string, and cursor_begin,
362 cursor_end and cursor_hidden are all 0.
363 </description>
364 <arg name="text" type="string" allow-null="true"/>
365 <arg name="cursor_begin" type="int"/>
366 <arg name="cursor_end" type="int"/>
367 </event>
368
369 <event name="commit_string">
370 <description summary="text commit">
371 Notify when text should be inserted into the editor widget. The text to
372 commit could be either just a single character after a key press or the
373 result of some composing (pre-edit).
374
375 Values set with this event are double-buffered. They must be applied
376 and reset to initial on the next zwp_text_input_v3.done event.
377
378 The initial value of text is an empty string.
379 </description>
380 <arg name="text" type="string" allow-null="true"/>
381 </event>
382
383 <event name="delete_surrounding_text">
384 <description summary="delete surrounding text">
385 Notify when the text around the current cursor position should be
386 deleted.
387
388 Before_length and after_length are the number of bytes before and after
389 the current cursor index (excluding the selection) to delete.
390
391 If a preedit text is present, in effect before_length is counted from
392 the beginning of it, and after_length from its end (see done event
393 sequence).
394
395 Values set with this event are double-buffered. They must be applied
396 and reset to initial on the next zwp_text_input_v3.done event.
397
398 The initial values of both before_length and after_length are 0.
399 </description>
400 <arg name="before_length" type="uint" summary="length of text before current cursor position"/>
401 <arg name="after_length" type="uint" summary="length of text after current cursor position"/>
402 </event>
403
404 <event name="done">
405 <description summary="apply changes">
406 Instruct the application to apply changes to state requested by the
407 preedit_string, commit_string and delete_surrounding_text events. The
408 state relating to these events is double-buffered, and each one
409 modifies the pending state. This event replaces the current state with
410 the pending state.
411
412 The application must proceed by evaluating the changes in the following
413 order:
414
415 1. Replace existing preedit string with the cursor.
416 2. Delete requested surrounding text.
417 3. Insert commit string with the cursor at its end.
418 4. Calculate surrounding text to send.
419 5. Insert new preedit text in cursor position.
420 6. Place cursor inside preedit text.
421
422 The serial number reflects the last state of the zwp_text_input_v3
423 object known to the compositor. The value of the serial argument must
424 be equal to the number of commit requests already issued on that object.
425 When the client receives a done event with a serial different than the
426 number of past commit requests, it must proceed as normal, except it
427 should not change the current state of the zwp_text_input_v3 object.
428 </description>
429 <arg name="serial" type="uint"/>
430 </event>
431 </interface>
432
433 <interface name="zwp_text_input_manager_v3" version="1">
434 <description summary="text input manager">
435 A factory for text-input objects. This object is a global singleton.
436 </description>
437
438 <request name="destroy" type="destructor">
439 <description summary="Destroy the wp_text_input_manager">
440 Destroy the wp_text_input_manager object.
441 </description>
442 </request>
443
444 <request name="get_text_input">
445 <description summary="create a new text input object">
446 Creates a new text-input object for a given seat.
447 </description>
448 <arg name="id" type="new_id" interface="zwp_text_input_v3"/>
449 <arg name="seat" type="object" interface="wl_seat"/>
450 </request>
451 </interface>
452</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/viewporter.xml b/src/contrib/SDL-3.2.20/wayland-protocols/viewporter.xml
new file mode 100644
index 0000000..c732d8c
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/viewporter.xml
@@ -0,0 +1,186 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="viewporter">
3
4 <copyright>
5 Copyright © 2013-2016 Collabora, Ltd.
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="wp_viewporter" version="1">
28 <description summary="surface cropping and scaling">
29 The global interface exposing surface cropping and scaling
30 capabilities is used to instantiate an interface extension for a
31 wl_surface object. This extended interface will then allow
32 cropping and scaling the surface contents, effectively
33 disconnecting the direct relationship between the buffer and the
34 surface size.
35 </description>
36
37 <request name="destroy" type="destructor">
38 <description summary="unbind from the cropping and scaling interface">
39 Informs the server that the client will not be using this
40 protocol object anymore. This does not affect any other objects,
41 wp_viewport objects included.
42 </description>
43 </request>
44
45 <enum name="error">
46 <entry name="viewport_exists" value="0"
47 summary="the surface already has a viewport object associated"/>
48 </enum>
49
50 <request name="get_viewport">
51 <description summary="extend surface interface for crop and scale">
52 Instantiate an interface extension for the given wl_surface to
53 crop and scale its content. If the given wl_surface already has
54 a wp_viewport object associated, the viewport_exists
55 protocol error is raised.
56 </description>
57 <arg name="id" type="new_id" interface="wp_viewport"
58 summary="the new viewport interface id"/>
59 <arg name="surface" type="object" interface="wl_surface"
60 summary="the surface"/>
61 </request>
62 </interface>
63
64 <interface name="wp_viewport" version="1">
65 <description summary="crop and scale interface to a wl_surface">
66 An additional interface to a wl_surface object, which allows the
67 client to specify the cropping and scaling of the surface
68 contents.
69
70 This interface works with two concepts: the source rectangle (src_x,
71 src_y, src_width, src_height), and the destination size (dst_width,
72 dst_height). The contents of the source rectangle are scaled to the
73 destination size, and content outside the source rectangle is ignored.
74 This state is double-buffered, and is applied on the next
75 wl_surface.commit.
76
77 The two parts of crop and scale state are independent: the source
78 rectangle, and the destination size. Initially both are unset, that
79 is, no scaling is applied. The whole of the current wl_buffer is
80 used as the source, and the surface size is as defined in
81 wl_surface.attach.
82
83 If the destination size is set, it causes the surface size to become
84 dst_width, dst_height. The source (rectangle) is scaled to exactly
85 this size. This overrides whatever the attached wl_buffer size is,
86 unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
87 has no content and therefore no size. Otherwise, the size is always
88 at least 1x1 in surface local coordinates.
89
90 If the source rectangle is set, it defines what area of the wl_buffer is
91 taken as the source. If the source rectangle is set and the destination
92 size is not set, then src_width and src_height must be integers, and the
93 surface size becomes the source rectangle size. This results in cropping
94 without scaling. If src_width or src_height are not integers and
95 destination size is not set, the bad_size protocol error is raised when
96 the surface state is applied.
97
98 The coordinate transformations from buffer pixel coordinates up to
99 the surface-local coordinates happen in the following order:
100 1. buffer_transform (wl_surface.set_buffer_transform)
101 2. buffer_scale (wl_surface.set_buffer_scale)
102 3. crop and scale (wp_viewport.set*)
103 This means, that the source rectangle coordinates of crop and scale
104 are given in the coordinates after the buffer transform and scale,
105 i.e. in the coordinates that would be the surface-local coordinates
106 if the crop and scale was not applied.
107
108 If src_x or src_y are negative, the bad_value protocol error is raised.
109 Otherwise, if the source rectangle is partially or completely outside of
110 the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
111 when the surface state is applied. A NULL wl_buffer does not raise the
112 out_of_buffer error.
113
114 The x, y arguments of wl_surface.attach are applied as normal to
115 the surface. They indicate how many pixels to remove from the
116 surface size from the left and the top. In other words, they are
117 still in the surface-local coordinate system, just like dst_width
118 and dst_height are.
119
120 If the wl_surface associated with the wp_viewport is destroyed,
121 all wp_viewport requests except 'destroy' raise the protocol error
122 no_surface.
123
124 If the wp_viewport object is destroyed, the crop and scale
125 state is removed from the wl_surface. The change will be applied
126 on the next wl_surface.commit.
127 </description>
128
129 <request name="destroy" type="destructor">
130 <description summary="remove scaling and cropping from the surface">
131 The associated wl_surface's crop and scale state is removed.
132 The change is applied on the next wl_surface.commit.
133 </description>
134 </request>
135
136 <enum name="error">
137 <entry name="bad_value" value="0"
138 summary="negative or zero values in width or height"/>
139 <entry name="bad_size" value="1"
140 summary="destination size is not integer"/>
141 <entry name="out_of_buffer" value="2"
142 summary="source rectangle extends outside of the content area"/>
143 <entry name="no_surface" value="3"
144 summary="the wl_surface was destroyed"/>
145 </enum>
146
147 <request name="set_source">
148 <description summary="set the source rectangle for cropping">
149 Set the source rectangle of the associated wl_surface. See
150 wp_viewport for the description, and relation to the wl_buffer
151 size.
152
153 If all of x, y, width and height are -1.0, the source rectangle is
154 unset instead. Any other set of values where width or height are zero
155 or negative, or x or y are negative, raise the bad_value protocol
156 error.
157
158 The crop and scale state is double-buffered state, and will be
159 applied on the next wl_surface.commit.
160 </description>
161 <arg name="x" type="fixed" summary="source rectangle x"/>
162 <arg name="y" type="fixed" summary="source rectangle y"/>
163 <arg name="width" type="fixed" summary="source rectangle width"/>
164 <arg name="height" type="fixed" summary="source rectangle height"/>
165 </request>
166
167 <request name="set_destination">
168 <description summary="set the surface size for scaling">
169 Set the destination size of the associated wl_surface. See
170 wp_viewport for the description, and relation to the wl_buffer
171 size.
172
173 If width is -1 and height is -1, the destination size is unset
174 instead. Any other pair of values for width and height that
175 contains zero or negative values raises the bad_value protocol
176 error.
177
178 The crop and scale state is double-buffered state, and will be
179 applied on the next wl_surface.commit.
180 </description>
181 <arg name="width" type="int" summary="surface width"/>
182 <arg name="height" type="int" summary="surface height"/>
183 </request>
184 </interface>
185
186</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/wayland.xml b/src/contrib/SDL-3.2.20/wayland-protocols/wayland.xml
new file mode 100644
index 0000000..10e039d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/wayland.xml
@@ -0,0 +1,3151 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="wayland">
3
4 <copyright>
5 Copyright © 2008-2011 Kristian Høgsberg
6 Copyright © 2010-2011 Intel Corporation
7 Copyright © 2012-2013 Collabora, Ltd.
8
9 Permission is hereby granted, free of charge, to any person
10 obtaining a copy of this software and associated documentation files
11 (the "Software"), to deal in the Software without restriction,
12 including without limitation the rights to use, copy, modify, merge,
13 publish, distribute, sublicense, and/or sell copies of the Software,
14 and to permit persons to whom the Software is furnished to do so,
15 subject to the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial
19 portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
25 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
26 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 SOFTWARE.
29 </copyright>
30
31 <interface name="wl_display" version="1">
32 <description summary="core global object">
33 The core global object. This is a special singleton object. It
34 is used for internal Wayland protocol features.
35 </description>
36
37 <request name="sync">
38 <description summary="asynchronous roundtrip">
39 The sync request asks the server to emit the 'done' event
40 on the returned wl_callback object. Since requests are
41 handled in-order and events are delivered in-order, this can
42 be used as a barrier to ensure all previous requests and the
43 resulting events have been handled.
44
45 The object returned by this request will be destroyed by the
46 compositor after the callback is fired and as such the client must not
47 attempt to use it after that point.
48
49 The callback_data passed in the callback is the event serial.
50 </description>
51 <arg name="callback" type="new_id" interface="wl_callback"
52 summary="callback object for the sync request"/>
53 </request>
54
55 <request name="get_registry">
56 <description summary="get global registry object">
57 This request creates a registry object that allows the client
58 to list and bind the global objects available from the
59 compositor.
60
61 It should be noted that the server side resources consumed in
62 response to a get_registry request can only be released when the
63 client disconnects, not when the client side proxy is destroyed.
64 Therefore, clients should invoke get_registry as infrequently as
65 possible to avoid wasting memory.
66 </description>
67 <arg name="registry" type="new_id" interface="wl_registry"
68 summary="global registry object"/>
69 </request>
70
71 <event name="error">
72 <description summary="fatal error event">
73 The error event is sent out when a fatal (non-recoverable)
74 error has occurred. The object_id argument is the object
75 where the error occurred, most often in response to a request
76 to that object. The code identifies the error and is defined
77 by the object interface. As such, each interface defines its
78 own set of error codes. The message is a brief description
79 of the error, for (debugging) convenience.
80 </description>
81 <arg name="object_id" type="object" summary="object where the error occurred"/>
82 <arg name="code" type="uint" summary="error code"/>
83 <arg name="message" type="string" summary="error description"/>
84 </event>
85
86 <enum name="error">
87 <description summary="global error values">
88 These errors are global and can be emitted in response to any
89 server request.
90 </description>
91 <entry name="invalid_object" value="0"
92 summary="server couldn't find object"/>
93 <entry name="invalid_method" value="1"
94 summary="method doesn't exist on the specified interface or malformed request"/>
95 <entry name="no_memory" value="2"
96 summary="server is out of memory"/>
97 <entry name="implementation" value="3"
98 summary="implementation error in compositor"/>
99 </enum>
100
101 <event name="delete_id">
102 <description summary="acknowledge object ID deletion">
103 This event is used internally by the object ID management
104 logic. When a client deletes an object that it had created,
105 the server will send this event to acknowledge that it has
106 seen the delete request. When the client receives this event,
107 it will know that it can safely reuse the object ID.
108 </description>
109 <arg name="id" type="uint" summary="deleted object ID"/>
110 </event>
111 </interface>
112
113 <interface name="wl_registry" version="1">
114 <description summary="global registry object">
115 The singleton global registry object. The server has a number of
116 global objects that are available to all clients. These objects
117 typically represent an actual object in the server (for example,
118 an input device) or they are singleton objects that provide
119 extension functionality.
120
121 When a client creates a registry object, the registry object
122 will emit a global event for each global currently in the
123 registry. Globals come and go as a result of device or
124 monitor hotplugs, reconfiguration or other events, and the
125 registry will send out global and global_remove events to
126 keep the client up to date with the changes. To mark the end
127 of the initial burst of events, the client can use the
128 wl_display.sync request immediately after calling
129 wl_display.get_registry.
130
131 A client can bind to a global object by using the bind
132 request. This creates a client-side handle that lets the object
133 emit events to the client and lets the client invoke requests on
134 the object.
135 </description>
136
137 <request name="bind">
138 <description summary="bind an object to the display">
139 Binds a new, client-created object to the server using the
140 specified name as the identifier.
141 </description>
142 <arg name="name" type="uint" summary="unique numeric name of the object"/>
143 <arg name="id" type="new_id" summary="bounded object"/>
144 </request>
145
146 <event name="global">
147 <description summary="announce global object">
148 Notify the client of global objects.
149
150 The event notifies the client that a global object with
151 the given name is now available, and it implements the
152 given version of the given interface.
153 </description>
154 <arg name="name" type="uint" summary="numeric name of the global object"/>
155 <arg name="interface" type="string" summary="interface implemented by the object"/>
156 <arg name="version" type="uint" summary="interface version"/>
157 </event>
158
159 <event name="global_remove">
160 <description summary="announce removal of global object">
161 Notify the client of removed global objects.
162
163 This event notifies the client that the global identified
164 by name is no longer available. If the client bound to
165 the global using the bind request, the client should now
166 destroy that object.
167
168 The object remains valid and requests to the object will be
169 ignored until the client destroys it, to avoid races between
170 the global going away and a client sending a request to it.
171 </description>
172 <arg name="name" type="uint" summary="numeric name of the global object"/>
173 </event>
174 </interface>
175
176 <interface name="wl_callback" version="1">
177 <description summary="callback object">
178 Clients can handle the 'done' event to get notified when
179 the related request is done.
180
181 Note, because wl_callback objects are created from multiple independent
182 factory interfaces, the wl_callback interface is frozen at version 1.
183 </description>
184
185 <event name="done" type="destructor">
186 <description summary="done event">
187 Notify the client when the related request is done.
188 </description>
189 <arg name="callback_data" type="uint" summary="request-specific data for the callback"/>
190 </event>
191 </interface>
192
193 <interface name="wl_compositor" version="6">
194 <description summary="the compositor singleton">
195 A compositor. This object is a singleton global. The
196 compositor is in charge of combining the contents of multiple
197 surfaces into one displayable output.
198 </description>
199
200 <request name="create_surface">
201 <description summary="create new surface">
202 Ask the compositor to create a new surface.
203 </description>
204 <arg name="id" type="new_id" interface="wl_surface" summary="the new surface"/>
205 </request>
206
207 <request name="create_region">
208 <description summary="create new region">
209 Ask the compositor to create a new region.
210 </description>
211 <arg name="id" type="new_id" interface="wl_region" summary="the new region"/>
212 </request>
213 </interface>
214
215 <interface name="wl_shm_pool" version="1">
216 <description summary="a shared memory pool">
217 The wl_shm_pool object encapsulates a piece of memory shared
218 between the compositor and client. Through the wl_shm_pool
219 object, the client can allocate shared memory wl_buffer objects.
220 All objects created through the same pool share the same
221 underlying mapped memory. Reusing the mapped memory avoids the
222 setup/teardown overhead and is useful when interactively resizing
223 a surface or for many small buffers.
224 </description>
225
226 <request name="create_buffer">
227 <description summary="create a buffer from the pool">
228 Create a wl_buffer object from the pool.
229
230 The buffer is created offset bytes into the pool and has
231 width and height as specified. The stride argument specifies
232 the number of bytes from the beginning of one row to the beginning
233 of the next. The format is the pixel format of the buffer and
234 must be one of those advertised through the wl_shm.format event.
235
236 A buffer will keep a reference to the pool it was created from
237 so it is valid to destroy the pool immediately after creating
238 a buffer from it.
239 </description>
240 <arg name="id" type="new_id" interface="wl_buffer" summary="buffer to create"/>
241 <arg name="offset" type="int" summary="buffer byte offset within the pool"/>
242 <arg name="width" type="int" summary="buffer width, in pixels"/>
243 <arg name="height" type="int" summary="buffer height, in pixels"/>
244 <arg name="stride" type="int" summary="number of bytes from the beginning of one row to the beginning of the next row"/>
245 <arg name="format" type="uint" enum="wl_shm.format" summary="buffer pixel format"/>
246 </request>
247
248 <request name="destroy" type="destructor">
249 <description summary="destroy the pool">
250 Destroy the shared memory pool.
251
252 The mmapped memory will be released when all
253 buffers that have been created from this pool
254 are gone.
255 </description>
256 </request>
257
258 <request name="resize">
259 <description summary="change the size of the pool mapping">
260 This request will cause the server to remap the backing memory
261 for the pool from the file descriptor passed when the pool was
262 created, but using the new size. This request can only be
263 used to make the pool bigger.
264
265 This request only changes the amount of bytes that are mmapped
266 by the server and does not touch the file corresponding to the
267 file descriptor passed at creation time. It is the client's
268 responsibility to ensure that the file is at least as big as
269 the new pool size.
270 </description>
271 <arg name="size" type="int" summary="new size of the pool, in bytes"/>
272 </request>
273 </interface>
274
275 <interface name="wl_shm" version="1">
276 <description summary="shared memory support">
277 A singleton global object that provides support for shared
278 memory.
279
280 Clients can create wl_shm_pool objects using the create_pool
281 request.
282
283 On binding the wl_shm object one or more format events
284 are emitted to inform clients about the valid pixel formats
285 that can be used for buffers.
286 </description>
287
288 <enum name="error">
289 <description summary="wl_shm error values">
290 These errors can be emitted in response to wl_shm requests.
291 </description>
292 <entry name="invalid_format" value="0" summary="buffer format is not known"/>
293 <entry name="invalid_stride" value="1" summary="invalid size or stride during pool or buffer creation"/>
294 <entry name="invalid_fd" value="2" summary="mmapping the file descriptor failed"/>
295 </enum>
296
297 <enum name="format">
298 <description summary="pixel formats">
299 This describes the memory layout of an individual pixel.
300
301 All renderers should support argb8888 and xrgb8888 but any other
302 formats are optional and may not be supported by the particular
303 renderer in use.
304
305 The drm format codes match the macros defined in drm_fourcc.h, except
306 argb8888 and xrgb8888. The formats actually supported by the compositor
307 will be reported by the format event.
308
309 For all wl_shm formats and unless specified in another protocol
310 extension, pre-multiplied alpha is used for pixel values.
311 </description>
312 <!-- Note to protocol writers: don't update this list manually, instead
313 run the automated script that keeps it in sync with drm_fourcc.h. -->
314 <entry name="argb8888" value="0" summary="32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian"/>
315 <entry name="xrgb8888" value="1" summary="32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian"/>
316 <entry name="c8" value="0x20203843" summary="8-bit color index format, [7:0] C"/>
317 <entry name="rgb332" value="0x38424752" summary="8-bit RGB format, [7:0] R:G:B 3:3:2"/>
318 <entry name="bgr233" value="0x38524742" summary="8-bit BGR format, [7:0] B:G:R 2:3:3"/>
319 <entry name="xrgb4444" value="0x32315258" summary="16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian"/>
320 <entry name="xbgr4444" value="0x32314258" summary="16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian"/>
321 <entry name="rgbx4444" value="0x32315852" summary="16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian"/>
322 <entry name="bgrx4444" value="0x32315842" summary="16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian"/>
323 <entry name="argb4444" value="0x32315241" summary="16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian"/>
324 <entry name="abgr4444" value="0x32314241" summary="16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian"/>
325 <entry name="rgba4444" value="0x32314152" summary="16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian"/>
326 <entry name="bgra4444" value="0x32314142" summary="16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian"/>
327 <entry name="xrgb1555" value="0x35315258" summary="16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian"/>
328 <entry name="xbgr1555" value="0x35314258" summary="16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian"/>
329 <entry name="rgbx5551" value="0x35315852" summary="16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian"/>
330 <entry name="bgrx5551" value="0x35315842" summary="16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian"/>
331 <entry name="argb1555" value="0x35315241" summary="16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian"/>
332 <entry name="abgr1555" value="0x35314241" summary="16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian"/>
333 <entry name="rgba5551" value="0x35314152" summary="16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian"/>
334 <entry name="bgra5551" value="0x35314142" summary="16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian"/>
335 <entry name="rgb565" value="0x36314752" summary="16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian"/>
336 <entry name="bgr565" value="0x36314742" summary="16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian"/>
337 <entry name="rgb888" value="0x34324752" summary="24-bit RGB format, [23:0] R:G:B little endian"/>
338 <entry name="bgr888" value="0x34324742" summary="24-bit BGR format, [23:0] B:G:R little endian"/>
339 <entry name="xbgr8888" value="0x34324258" summary="32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian"/>
340 <entry name="rgbx8888" value="0x34325852" summary="32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian"/>
341 <entry name="bgrx8888" value="0x34325842" summary="32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian"/>
342 <entry name="abgr8888" value="0x34324241" summary="32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian"/>
343 <entry name="rgba8888" value="0x34324152" summary="32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian"/>
344 <entry name="bgra8888" value="0x34324142" summary="32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian"/>
345 <entry name="xrgb2101010" value="0x30335258" summary="32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian"/>
346 <entry name="xbgr2101010" value="0x30334258" summary="32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian"/>
347 <entry name="rgbx1010102" value="0x30335852" summary="32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian"/>
348 <entry name="bgrx1010102" value="0x30335842" summary="32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian"/>
349 <entry name="argb2101010" value="0x30335241" summary="32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian"/>
350 <entry name="abgr2101010" value="0x30334241" summary="32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian"/>
351 <entry name="rgba1010102" value="0x30334152" summary="32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian"/>
352 <entry name="bgra1010102" value="0x30334142" summary="32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian"/>
353 <entry name="yuyv" value="0x56595559" summary="packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian"/>
354 <entry name="yvyu" value="0x55595659" summary="packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian"/>
355 <entry name="uyvy" value="0x59565955" summary="packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian"/>
356 <entry name="vyuy" value="0x59555956" summary="packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian"/>
357 <entry name="ayuv" value="0x56555941" summary="packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian"/>
358 <entry name="nv12" value="0x3231564e" summary="2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane"/>
359 <entry name="nv21" value="0x3132564e" summary="2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane"/>
360 <entry name="nv16" value="0x3631564e" summary="2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane"/>
361 <entry name="nv61" value="0x3136564e" summary="2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane"/>
362 <entry name="yuv410" value="0x39565559" summary="3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes"/>
363 <entry name="yvu410" value="0x39555659" summary="3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes"/>
364 <entry name="yuv411" value="0x31315559" summary="3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes"/>
365 <entry name="yvu411" value="0x31315659" summary="3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes"/>
366 <entry name="yuv420" value="0x32315559" summary="3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes"/>
367 <entry name="yvu420" value="0x32315659" summary="3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes"/>
368 <entry name="yuv422" value="0x36315559" summary="3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes"/>
369 <entry name="yvu422" value="0x36315659" summary="3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes"/>
370 <entry name="yuv444" value="0x34325559" summary="3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes"/>
371 <entry name="yvu444" value="0x34325659" summary="3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes"/>
372 <entry name="r8" value="0x20203852" summary="[7:0] R"/>
373 <entry name="r16" value="0x20363152" summary="[15:0] R little endian"/>
374 <entry name="rg88" value="0x38384752" summary="[15:0] R:G 8:8 little endian"/>
375 <entry name="gr88" value="0x38385247" summary="[15:0] G:R 8:8 little endian"/>
376 <entry name="rg1616" value="0x32334752" summary="[31:0] R:G 16:16 little endian"/>
377 <entry name="gr1616" value="0x32335247" summary="[31:0] G:R 16:16 little endian"/>
378 <entry name="xrgb16161616f" value="0x48345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
379 <entry name="xbgr16161616f" value="0x48344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
380 <entry name="argb16161616f" value="0x48345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
381 <entry name="abgr16161616f" value="0x48344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
382 <entry name="xyuv8888" value="0x56555958" summary="[31:0] X:Y:Cb:Cr 8:8:8:8 little endian"/>
383 <entry name="vuy888" value="0x34325556" summary="[23:0] Cr:Cb:Y 8:8:8 little endian"/>
384 <entry name="vuy101010" value="0x30335556" summary="Y followed by U then V, 10:10:10. Non-linear modifier only"/>
385 <entry name="y210" value="0x30313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels"/>
386 <entry name="y212" value="0x32313259" summary="[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels"/>
387 <entry name="y216" value="0x36313259" summary="[63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels"/>
388 <entry name="y410" value="0x30313459" summary="[31:0] A:Cr:Y:Cb 2:10:10:10 little endian"/>
389 <entry name="y412" value="0x32313459" summary="[63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
390 <entry name="y416" value="0x36313459" summary="[63:0] A:Cr:Y:Cb 16:16:16:16 little endian"/>
391 <entry name="xvyu2101010" value="0x30335658" summary="[31:0] X:Cr:Y:Cb 2:10:10:10 little endian"/>
392 <entry name="xvyu12_16161616" value="0x36335658" summary="[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian"/>
393 <entry name="xvyu16161616" value="0x38345658" summary="[63:0] X:Cr:Y:Cb 16:16:16:16 little endian"/>
394 <entry name="y0l0" value="0x304c3059" summary="[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
395 <entry name="x0l0" value="0x304c3058" summary="[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian"/>
396 <entry name="y0l2" value="0x324c3059" summary="[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
397 <entry name="x0l2" value="0x324c3058" summary="[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian"/>
398 <entry name="yuv420_8bit" value="0x38305559"/>
399 <entry name="yuv420_10bit" value="0x30315559"/>
400 <entry name="xrgb8888_a8" value="0x38415258"/>
401 <entry name="xbgr8888_a8" value="0x38414258"/>
402 <entry name="rgbx8888_a8" value="0x38415852"/>
403 <entry name="bgrx8888_a8" value="0x38415842"/>
404 <entry name="rgb888_a8" value="0x38413852"/>
405 <entry name="bgr888_a8" value="0x38413842"/>
406 <entry name="rgb565_a8" value="0x38413552"/>
407 <entry name="bgr565_a8" value="0x38413542"/>
408 <entry name="nv24" value="0x3432564e" summary="non-subsampled Cr:Cb plane"/>
409 <entry name="nv42" value="0x3234564e" summary="non-subsampled Cb:Cr plane"/>
410 <entry name="p210" value="0x30313250" summary="2x1 subsampled Cr:Cb plane, 10 bit per channel"/>
411 <entry name="p010" value="0x30313050" summary="2x2 subsampled Cr:Cb plane 10 bits per channel"/>
412 <entry name="p012" value="0x32313050" summary="2x2 subsampled Cr:Cb plane 12 bits per channel"/>
413 <entry name="p016" value="0x36313050" summary="2x2 subsampled Cr:Cb plane 16 bits per channel"/>
414 <entry name="axbxgxrx106106106106" value="0x30314241" summary="[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian"/>
415 <entry name="nv15" value="0x3531564e" summary="2x2 subsampled Cr:Cb plane"/>
416 <entry name="q410" value="0x30313451"/>
417 <entry name="q401" value="0x31303451"/>
418 <entry name="xrgb16161616" value="0x38345258" summary="[63:0] x:R:G:B 16:16:16:16 little endian"/>
419 <entry name="xbgr16161616" value="0x38344258" summary="[63:0] x:B:G:R 16:16:16:16 little endian"/>
420 <entry name="argb16161616" value="0x38345241" summary="[63:0] A:R:G:B 16:16:16:16 little endian"/>
421 <entry name="abgr16161616" value="0x38344241" summary="[63:0] A:B:G:R 16:16:16:16 little endian"/>
422 </enum>
423
424 <request name="create_pool">
425 <description summary="create a shm pool">
426 Create a new wl_shm_pool object.
427
428 The pool can be used to create shared memory based buffer
429 objects. The server will mmap size bytes of the passed file
430 descriptor, to use as backing memory for the pool.
431 </description>
432 <arg name="id" type="new_id" interface="wl_shm_pool" summary="pool to create"/>
433 <arg name="fd" type="fd" summary="file descriptor for the pool"/>
434 <arg name="size" type="int" summary="pool size, in bytes"/>
435 </request>
436
437 <event name="format">
438 <description summary="pixel format description">
439 Informs the client about a valid pixel format that
440 can be used for buffers. Known formats include
441 argb8888 and xrgb8888.
442 </description>
443 <arg name="format" type="uint" enum="format" summary="buffer pixel format"/>
444 </event>
445 </interface>
446
447 <interface name="wl_buffer" version="1">
448 <description summary="content for a wl_surface">
449 A buffer provides the content for a wl_surface. Buffers are
450 created through factory interfaces such as wl_shm, wp_linux_buffer_params
451 (from the linux-dmabuf protocol extension) or similar. It has a width and
452 a height and can be attached to a wl_surface, but the mechanism by which a
453 client provides and updates the contents is defined by the buffer factory
454 interface.
455
456 If the buffer uses a format that has an alpha channel, the alpha channel
457 is assumed to be premultiplied in the color channels unless otherwise
458 specified.
459
460 Note, because wl_buffer objects are created from multiple independent
461 factory interfaces, the wl_buffer interface is frozen at version 1.
462 </description>
463
464 <request name="destroy" type="destructor">
465 <description summary="destroy a buffer">
466 Destroy a buffer. If and how you need to release the backing
467 storage is defined by the buffer factory interface.
468
469 For possible side-effects to a surface, see wl_surface.attach.
470 </description>
471 </request>
472
473 <event name="release">
474 <description summary="compositor releases buffer">
475 Sent when this wl_buffer is no longer used by the compositor.
476 The client is now free to reuse or destroy this buffer and its
477 backing storage.
478
479 If a client receives a release event before the frame callback
480 requested in the same wl_surface.commit that attaches this
481 wl_buffer to a surface, then the client is immediately free to
482 reuse the buffer and its backing storage, and does not need a
483 second buffer for the next surface content update. Typically
484 this is possible, when the compositor maintains a copy of the
485 wl_surface contents, e.g. as a GL texture. This is an important
486 optimization for GL(ES) compositors with wl_shm clients.
487 </description>
488 </event>
489 </interface>
490
491 <interface name="wl_data_offer" version="3">
492 <description summary="offer to transfer data">
493 A wl_data_offer represents a piece of data offered for transfer
494 by another client (the source client). It is used by the
495 copy-and-paste and drag-and-drop mechanisms. The offer
496 describes the different mime types that the data can be
497 converted to and provides the mechanism for transferring the
498 data directly from the source client.
499 </description>
500
501 <enum name="error">
502 <entry name="invalid_finish" value="0"
503 summary="finish request was called untimely"/>
504 <entry name="invalid_action_mask" value="1"
505 summary="action mask contains invalid values"/>
506 <entry name="invalid_action" value="2"
507 summary="action argument has an invalid value"/>
508 <entry name="invalid_offer" value="3"
509 summary="offer doesn't accept this request"/>
510 </enum>
511
512 <request name="accept">
513 <description summary="accept one of the offered mime types">
514 Indicate that the client can accept the given mime type, or
515 NULL for not accepted.
516
517 For objects of version 2 or older, this request is used by the
518 client to give feedback whether the client can receive the given
519 mime type, or NULL if none is accepted; the feedback does not
520 determine whether the drag-and-drop operation succeeds or not.
521
522 For objects of version 3 or newer, this request determines the
523 final result of the drag-and-drop operation. If the end result
524 is that no mime types were accepted, the drag-and-drop operation
525 will be cancelled and the corresponding drag source will receive
526 wl_data_source.cancelled. Clients may still use this event in
527 conjunction with wl_data_source.action for feedback.
528 </description>
529 <arg name="serial" type="uint" summary="serial number of the accept request"/>
530 <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the client"/>
531 </request>
532
533 <request name="receive">
534 <description summary="request that the data is transferred">
535 To transfer the offered data, the client issues this request
536 and indicates the mime type it wants to receive. The transfer
537 happens through the passed file descriptor (typically created
538 with the pipe system call). The source client writes the data
539 in the mime type representation requested and then closes the
540 file descriptor.
541
542 The receiving client reads from the read end of the pipe until
543 EOF and then closes its end, at which point the transfer is
544 complete.
545
546 This request may happen multiple times for different mime types,
547 both before and after wl_data_device.drop. Drag-and-drop destination
548 clients may preemptively fetch data or examine it more closely to
549 determine acceptance.
550 </description>
551 <arg name="mime_type" type="string" summary="mime type desired by receiver"/>
552 <arg name="fd" type="fd" summary="file descriptor for data transfer"/>
553 </request>
554
555 <request name="destroy" type="destructor">
556 <description summary="destroy data offer">
557 Destroy the data offer.
558 </description>
559 </request>
560
561 <event name="offer">
562 <description summary="advertise offered mime type">
563 Sent immediately after creating the wl_data_offer object. One
564 event per offered mime type.
565 </description>
566 <arg name="mime_type" type="string" summary="offered mime type"/>
567 </event>
568
569 <!-- Version 3 additions -->
570
571 <request name="finish" since="3">
572 <description summary="the offer will no longer be used">
573 Notifies the compositor that the drag destination successfully
574 finished the drag-and-drop operation.
575
576 Upon receiving this request, the compositor will emit
577 wl_data_source.dnd_finished on the drag source client.
578
579 It is a client error to perform other requests than
580 wl_data_offer.destroy after this one. It is also an error to perform
581 this request after a NULL mime type has been set in
582 wl_data_offer.accept or no action was received through
583 wl_data_offer.action.
584
585 If wl_data_offer.finish request is received for a non drag and drop
586 operation, the invalid_finish protocol error is raised.
587 </description>
588 </request>
589
590 <request name="set_actions" since="3">
591 <description summary="set the available/preferred drag-and-drop actions">
592 Sets the actions that the destination side client supports for
593 this operation. This request may trigger the emission of
594 wl_data_source.action and wl_data_offer.action events if the compositor
595 needs to change the selected action.
596
597 This request can be called multiple times throughout the
598 drag-and-drop operation, typically in response to wl_data_device.enter
599 or wl_data_device.motion events.
600
601 This request determines the final result of the drag-and-drop
602 operation. If the end result is that no action is accepted,
603 the drag source will receive wl_data_source.cancelled.
604
605 The dnd_actions argument must contain only values expressed in the
606 wl_data_device_manager.dnd_actions enum, and the preferred_action
607 argument must only contain one of those values set, otherwise it
608 will result in a protocol error.
609
610 While managing an "ask" action, the destination drag-and-drop client
611 may perform further wl_data_offer.receive requests, and is expected
612 to perform one last wl_data_offer.set_actions request with a preferred
613 action other than "ask" (and optionally wl_data_offer.accept) before
614 requesting wl_data_offer.finish, in order to convey the action selected
615 by the user. If the preferred action is not in the
616 wl_data_offer.source_actions mask, an error will be raised.
617
618 If the "ask" action is dismissed (e.g. user cancellation), the client
619 is expected to perform wl_data_offer.destroy right away.
620
621 This request can only be made on drag-and-drop offers, a protocol error
622 will be raised otherwise.
623 </description>
624 <arg name="dnd_actions" type="uint" summary="actions supported by the destination client"
625 enum="wl_data_device_manager.dnd_action"/>
626 <arg name="preferred_action" type="uint" summary="action preferred by the destination client"
627 enum="wl_data_device_manager.dnd_action"/>
628 </request>
629
630 <event name="source_actions" since="3">
631 <description summary="notify the source-side available actions">
632 This event indicates the actions offered by the data source. It
633 will be sent immediately after creating the wl_data_offer object,
634 or anytime the source side changes its offered actions through
635 wl_data_source.set_actions.
636 </description>
637 <arg name="source_actions" type="uint" summary="actions offered by the data source"
638 enum="wl_data_device_manager.dnd_action"/>
639 </event>
640
641 <event name="action" since="3">
642 <description summary="notify the selected action">
643 This event indicates the action selected by the compositor after
644 matching the source/destination side actions. Only one action (or
645 none) will be offered here.
646
647 This event can be emitted multiple times during the drag-and-drop
648 operation in response to destination side action changes through
649 wl_data_offer.set_actions.
650
651 This event will no longer be emitted after wl_data_device.drop
652 happened on the drag-and-drop destination, the client must
653 honor the last action received, or the last preferred one set
654 through wl_data_offer.set_actions when handling an "ask" action.
655
656 Compositors may also change the selected action on the fly, mainly
657 in response to keyboard modifier changes during the drag-and-drop
658 operation.
659
660 The most recent action received is always the valid one. Prior to
661 receiving wl_data_device.drop, the chosen action may change (e.g.
662 due to keyboard modifiers being pressed). At the time of receiving
663 wl_data_device.drop the drag-and-drop destination must honor the
664 last action received.
665
666 Action changes may still happen after wl_data_device.drop,
667 especially on "ask" actions, where the drag-and-drop destination
668 may choose another action afterwards. Action changes happening
669 at this stage are always the result of inter-client negotiation, the
670 compositor shall no longer be able to induce a different action.
671
672 Upon "ask" actions, it is expected that the drag-and-drop destination
673 may potentially choose a different action and/or mime type,
674 based on wl_data_offer.source_actions and finally chosen by the
675 user (e.g. popping up a menu with the available options). The
676 final wl_data_offer.set_actions and wl_data_offer.accept requests
677 must happen before the call to wl_data_offer.finish.
678 </description>
679 <arg name="dnd_action" type="uint" summary="action selected by the compositor"
680 enum="wl_data_device_manager.dnd_action"/>
681 </event>
682 </interface>
683
684 <interface name="wl_data_source" version="3">
685 <description summary="offer to transfer data">
686 The wl_data_source object is the source side of a wl_data_offer.
687 It is created by the source client in a data transfer and
688 provides a way to describe the offered data and a way to respond
689 to requests to transfer the data.
690 </description>
691
692 <enum name="error">
693 <entry name="invalid_action_mask" value="0"
694 summary="action mask contains invalid values"/>
695 <entry name="invalid_source" value="1"
696 summary="source doesn't accept this request"/>
697 </enum>
698
699 <request name="offer">
700 <description summary="add an offered mime type">
701 This request adds a mime type to the set of mime types
702 advertised to targets. Can be called several times to offer
703 multiple types.
704 </description>
705 <arg name="mime_type" type="string" summary="mime type offered by the data source"/>
706 </request>
707
708 <request name="destroy" type="destructor">
709 <description summary="destroy the data source">
710 Destroy the data source.
711 </description>
712 </request>
713
714 <event name="target">
715 <description summary="a target accepts an offered mime type">
716 Sent when a target accepts pointer_focus or motion events. If
717 a target does not accept any of the offered types, type is NULL.
718
719 Used for feedback during drag-and-drop.
720 </description>
721 <arg name="mime_type" type="string" allow-null="true" summary="mime type accepted by the target"/>
722 </event>
723
724 <event name="send">
725 <description summary="send the data">
726 Request for data from the client. Send the data as the
727 specified mime type over the passed file descriptor, then
728 close it.
729 </description>
730 <arg name="mime_type" type="string" summary="mime type for the data"/>
731 <arg name="fd" type="fd" summary="file descriptor for the data"/>
732 </event>
733
734 <event name="cancelled">
735 <description summary="selection was cancelled">
736 This data source is no longer valid. There are several reasons why
737 this could happen:
738
739 - The data source has been replaced by another data source.
740 - The drag-and-drop operation was performed, but the drop destination
741 did not accept any of the mime types offered through
742 wl_data_source.target.
743 - The drag-and-drop operation was performed, but the drop destination
744 did not select any of the actions present in the mask offered through
745 wl_data_source.action.
746 - The drag-and-drop operation was performed but didn't happen over a
747 surface.
748 - The compositor cancelled the drag-and-drop operation (e.g. compositor
749 dependent timeouts to avoid stale drag-and-drop transfers).
750
751 The client should clean up and destroy this data source.
752
753 For objects of version 2 or older, wl_data_source.cancelled will
754 only be emitted if the data source was replaced by another data
755 source.
756 </description>
757 </event>
758
759 <!-- Version 3 additions -->
760
761 <request name="set_actions" since="3">
762 <description summary="set the available drag-and-drop actions">
763 Sets the actions that the source side client supports for this
764 operation. This request may trigger wl_data_source.action and
765 wl_data_offer.action events if the compositor needs to change the
766 selected action.
767
768 The dnd_actions argument must contain only values expressed in the
769 wl_data_device_manager.dnd_actions enum, otherwise it will result
770 in a protocol error.
771
772 This request must be made once only, and can only be made on sources
773 used in drag-and-drop, so it must be performed before
774 wl_data_device.start_drag. Attempting to use the source other than
775 for drag-and-drop will raise a protocol error.
776 </description>
777 <arg name="dnd_actions" type="uint" summary="actions supported by the data source"
778 enum="wl_data_device_manager.dnd_action"/>
779 </request>
780
781 <event name="dnd_drop_performed" since="3">
782 <description summary="the drag-and-drop operation physically finished">
783 The user performed the drop action. This event does not indicate
784 acceptance, wl_data_source.cancelled may still be emitted afterwards
785 if the drop destination does not accept any mime type.
786
787 However, this event might however not be received if the compositor
788 cancelled the drag-and-drop operation before this event could happen.
789
790 Note that the data_source may still be used in the future and should
791 not be destroyed here.
792 </description>
793 </event>
794
795 <event name="dnd_finished" since="3">
796 <description summary="the drag-and-drop operation concluded">
797 The drop destination finished interoperating with this data
798 source, so the client is now free to destroy this data source and
799 free all associated data.
800
801 If the action used to perform the operation was "move", the
802 source can now delete the transferred data.
803 </description>
804 </event>
805
806 <event name="action" since="3">
807 <description summary="notify the selected action">
808 This event indicates the action selected by the compositor after
809 matching the source/destination side actions. Only one action (or
810 none) will be offered here.
811
812 This event can be emitted multiple times during the drag-and-drop
813 operation, mainly in response to destination side changes through
814 wl_data_offer.set_actions, and as the data device enters/leaves
815 surfaces.
816
817 It is only possible to receive this event after
818 wl_data_source.dnd_drop_performed if the drag-and-drop operation
819 ended in an "ask" action, in which case the final wl_data_source.action
820 event will happen immediately before wl_data_source.dnd_finished.
821
822 Compositors may also change the selected action on the fly, mainly
823 in response to keyboard modifier changes during the drag-and-drop
824 operation.
825
826 The most recent action received is always the valid one. The chosen
827 action may change alongside negotiation (e.g. an "ask" action can turn
828 into a "move" operation), so the effects of the final action must
829 always be applied in wl_data_offer.dnd_finished.
830
831 Clients can trigger cursor surface changes from this point, so
832 they reflect the current action.
833 </description>
834 <arg name="dnd_action" type="uint" summary="action selected by the compositor"
835 enum="wl_data_device_manager.dnd_action"/>
836 </event>
837 </interface>
838
839 <interface name="wl_data_device" version="3">
840 <description summary="data transfer device">
841 There is one wl_data_device per seat which can be obtained
842 from the global wl_data_device_manager singleton.
843
844 A wl_data_device provides access to inter-client data transfer
845 mechanisms such as copy-and-paste and drag-and-drop.
846 </description>
847
848 <enum name="error">
849 <entry name="role" value="0" summary="given wl_surface has another role"/>
850 </enum>
851
852 <request name="start_drag">
853 <description summary="start drag-and-drop operation">
854 This request asks the compositor to start a drag-and-drop
855 operation on behalf of the client.
856
857 The source argument is the data source that provides the data
858 for the eventual data transfer. If source is NULL, enter, leave
859 and motion events are sent only to the client that initiated the
860 drag and the client is expected to handle the data passing
861 internally. If source is destroyed, the drag-and-drop session will be
862 cancelled.
863
864 The origin surface is the surface where the drag originates and
865 the client must have an active implicit grab that matches the
866 serial.
867
868 The icon surface is an optional (can be NULL) surface that
869 provides an icon to be moved around with the cursor. Initially,
870 the top-left corner of the icon surface is placed at the cursor
871 hotspot, but subsequent wl_surface.attach request can move the
872 relative position. Attach requests must be confirmed with
873 wl_surface.commit as usual. The icon surface is given the role of
874 a drag-and-drop icon. If the icon surface already has another role,
875 it raises a protocol error.
876
877 The input region is ignored for wl_surfaces with the role of a
878 drag-and-drop icon.
879 </description>
880 <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the eventual transfer"/>
881 <arg name="origin" type="object" interface="wl_surface" summary="surface where the drag originates"/>
882 <arg name="icon" type="object" interface="wl_surface" allow-null="true" summary="drag-and-drop icon surface"/>
883 <arg name="serial" type="uint" summary="serial number of the implicit grab on the origin"/>
884 </request>
885
886 <request name="set_selection">
887 <description summary="copy data to the selection">
888 This request asks the compositor to set the selection
889 to the data from the source on behalf of the client.
890
891 To unset the selection, set the source to NULL.
892 </description>
893 <arg name="source" type="object" interface="wl_data_source" allow-null="true" summary="data source for the selection"/>
894 <arg name="serial" type="uint" summary="serial number of the event that triggered this request"/>
895 </request>
896
897 <event name="data_offer">
898 <description summary="introduce a new wl_data_offer">
899 The data_offer event introduces a new wl_data_offer object,
900 which will subsequently be used in either the
901 data_device.enter event (for drag-and-drop) or the
902 data_device.selection event (for selections). Immediately
903 following the data_device.data_offer event, the new data_offer
904 object will send out data_offer.offer events to describe the
905 mime types it offers.
906 </description>
907 <arg name="id" type="new_id" interface="wl_data_offer" summary="the new data_offer object"/>
908 </event>
909
910 <event name="enter">
911 <description summary="initiate drag-and-drop session">
912 This event is sent when an active drag-and-drop pointer enters
913 a surface owned by the client. The position of the pointer at
914 enter time is provided by the x and y arguments, in surface-local
915 coordinates.
916 </description>
917 <arg name="serial" type="uint" summary="serial number of the enter event"/>
918 <arg name="surface" type="object" interface="wl_surface" summary="client surface entered"/>
919 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
920 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
921 <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
922 summary="source data_offer object"/>
923 </event>
924
925 <event name="leave">
926 <description summary="end drag-and-drop session">
927 This event is sent when the drag-and-drop pointer leaves the
928 surface and the session ends. The client must destroy the
929 wl_data_offer introduced at enter time at this point.
930 </description>
931 </event>
932
933 <event name="motion">
934 <description summary="drag-and-drop session motion">
935 This event is sent when the drag-and-drop pointer moves within
936 the currently focused surface. The new position of the pointer
937 is provided by the x and y arguments, in surface-local
938 coordinates.
939 </description>
940 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
941 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
942 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
943 </event>
944
945 <event name="drop">
946 <description summary="end drag-and-drop session successfully">
947 The event is sent when a drag-and-drop operation is ended
948 because the implicit grab is removed.
949
950 The drag-and-drop destination is expected to honor the last action
951 received through wl_data_offer.action, if the resulting action is
952 "copy" or "move", the destination can still perform
953 wl_data_offer.receive requests, and is expected to end all
954 transfers with a wl_data_offer.finish request.
955
956 If the resulting action is "ask", the action will not be considered
957 final. The drag-and-drop destination is expected to perform one last
958 wl_data_offer.set_actions request, or wl_data_offer.destroy in order
959 to cancel the operation.
960 </description>
961 </event>
962
963 <event name="selection">
964 <description summary="advertise new selection">
965 The selection event is sent out to notify the client of a new
966 wl_data_offer for the selection for this device. The
967 data_device.data_offer and the data_offer.offer events are
968 sent out immediately before this event to introduce the data
969 offer object. The selection event is sent to a client
970 immediately before receiving keyboard focus and when a new
971 selection is set while the client has keyboard focus. The
972 data_offer is valid until a new data_offer or NULL is received
973 or until the client loses keyboard focus. Switching surface with
974 keyboard focus within the same client doesn't mean a new selection
975 will be sent. The client must destroy the previous selection
976 data_offer, if any, upon receiving this event.
977 </description>
978 <arg name="id" type="object" interface="wl_data_offer" allow-null="true"
979 summary="selection data_offer object"/>
980 </event>
981
982 <!-- Version 2 additions -->
983
984 <request name="release" type="destructor" since="2">
985 <description summary="destroy data device">
986 This request destroys the data device.
987 </description>
988 </request>
989 </interface>
990
991 <interface name="wl_data_device_manager" version="3">
992 <description summary="data transfer interface">
993 The wl_data_device_manager is a singleton global object that
994 provides access to inter-client data transfer mechanisms such as
995 copy-and-paste and drag-and-drop. These mechanisms are tied to
996 a wl_seat and this interface lets a client get a wl_data_device
997 corresponding to a wl_seat.
998
999 Depending on the version bound, the objects created from the bound
1000 wl_data_device_manager object will have different requirements for
1001 functioning properly. See wl_data_source.set_actions,
1002 wl_data_offer.accept and wl_data_offer.finish for details.
1003 </description>
1004
1005 <request name="create_data_source">
1006 <description summary="create a new data source">
1007 Create a new data source.
1008 </description>
1009 <arg name="id" type="new_id" interface="wl_data_source" summary="data source to create"/>
1010 </request>
1011
1012 <request name="get_data_device">
1013 <description summary="create a new data device">
1014 Create a new data device for a given seat.
1015 </description>
1016 <arg name="id" type="new_id" interface="wl_data_device" summary="data device to create"/>
1017 <arg name="seat" type="object" interface="wl_seat" summary="seat associated with the data device"/>
1018 </request>
1019
1020 <!-- Version 3 additions -->
1021
1022 <enum name="dnd_action" bitfield="true" since="3">
1023 <description summary="drag and drop actions">
1024 This is a bitmask of the available/preferred actions in a
1025 drag-and-drop operation.
1026
1027 In the compositor, the selected action is a result of matching the
1028 actions offered by the source and destination sides. "action" events
1029 with a "none" action will be sent to both source and destination if
1030 there is no match. All further checks will effectively happen on
1031 (source actions ∩ destination actions).
1032
1033 In addition, compositors may also pick different actions in
1034 reaction to key modifiers being pressed. One common design that
1035 is used in major toolkits (and the behavior recommended for
1036 compositors) is:
1037
1038 - If no modifiers are pressed, the first match (in bit order)
1039 will be used.
1040 - Pressing Shift selects "move", if enabled in the mask.
1041 - Pressing Control selects "copy", if enabled in the mask.
1042
1043 Behavior beyond that is considered implementation-dependent.
1044 Compositors may for example bind other modifiers (like Alt/Meta)
1045 or drags initiated with other buttons than BTN_LEFT to specific
1046 actions (e.g. "ask").
1047 </description>
1048 <entry name="none" value="0" summary="no action"/>
1049 <entry name="copy" value="1" summary="copy action"/>
1050 <entry name="move" value="2" summary="move action"/>
1051 <entry name="ask" value="4" summary="ask action"/>
1052 </enum>
1053 </interface>
1054
1055 <interface name="wl_shell" version="1">
1056 <description summary="create desktop-style surfaces">
1057 This interface is implemented by servers that provide
1058 desktop-style user interfaces.
1059
1060 It allows clients to associate a wl_shell_surface with
1061 a basic surface.
1062
1063 Note! This protocol is deprecated and not intended for production use.
1064 For desktop-style user interfaces, use xdg_shell. Compositors and clients
1065 should not implement this interface.
1066 </description>
1067
1068 <enum name="error">
1069 <entry name="role" value="0" summary="given wl_surface has another role"/>
1070 </enum>
1071
1072 <request name="get_shell_surface">
1073 <description summary="create a shell surface from a surface">
1074 Create a shell surface for an existing surface. This gives
1075 the wl_surface the role of a shell surface. If the wl_surface
1076 already has another role, it raises a protocol error.
1077
1078 Only one shell surface can be associated with a given surface.
1079 </description>
1080 <arg name="id" type="new_id" interface="wl_shell_surface" summary="shell surface to create"/>
1081 <arg name="surface" type="object" interface="wl_surface" summary="surface to be given the shell surface role"/>
1082 </request>
1083 </interface>
1084
1085 <interface name="wl_shell_surface" version="1">
1086 <description summary="desktop-style metadata interface">
1087 An interface that may be implemented by a wl_surface, for
1088 implementations that provide a desktop-style user interface.
1089
1090 It provides requests to treat surfaces like toplevel, fullscreen
1091 or popup windows, move, resize or maximize them, associate
1092 metadata like title and class, etc.
1093
1094 On the server side the object is automatically destroyed when
1095 the related wl_surface is destroyed. On the client side,
1096 wl_shell_surface_destroy() must be called before destroying
1097 the wl_surface object.
1098 </description>
1099
1100 <request name="pong">
1101 <description summary="respond to a ping event">
1102 A client must respond to a ping event with a pong request or
1103 the client may be deemed unresponsive.
1104 </description>
1105 <arg name="serial" type="uint" summary="serial number of the ping event"/>
1106 </request>
1107
1108 <request name="move">
1109 <description summary="start an interactive move">
1110 Start a pointer-driven move of the surface.
1111
1112 This request must be used in response to a button press event.
1113 The server may ignore move requests depending on the state of
1114 the surface (e.g. fullscreen or maximized).
1115 </description>
1116 <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
1117 <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
1118 </request>
1119
1120 <enum name="resize" bitfield="true">
1121 <description summary="edge values for resizing">
1122 These values are used to indicate which edge of a surface
1123 is being dragged in a resize operation. The server may
1124 use this information to adapt its behavior, e.g. choose
1125 an appropriate cursor image.
1126 </description>
1127 <entry name="none" value="0" summary="no edge"/>
1128 <entry name="top" value="1" summary="top edge"/>
1129 <entry name="bottom" value="2" summary="bottom edge"/>
1130 <entry name="left" value="4" summary="left edge"/>
1131 <entry name="top_left" value="5" summary="top and left edges"/>
1132 <entry name="bottom_left" value="6" summary="bottom and left edges"/>
1133 <entry name="right" value="8" summary="right edge"/>
1134 <entry name="top_right" value="9" summary="top and right edges"/>
1135 <entry name="bottom_right" value="10" summary="bottom and right edges"/>
1136 </enum>
1137
1138 <request name="resize">
1139 <description summary="start an interactive resize">
1140 Start a pointer-driven resizing of the surface.
1141
1142 This request must be used in response to a button press event.
1143 The server may ignore resize requests depending on the state of
1144 the surface (e.g. fullscreen or maximized).
1145 </description>
1146 <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
1147 <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
1148 <arg name="edges" type="uint" enum="resize" summary="which edge or corner is being dragged"/>
1149 </request>
1150
1151 <request name="set_toplevel">
1152 <description summary="make the surface a toplevel surface">
1153 Map the surface as a toplevel surface.
1154
1155 A toplevel surface is not fullscreen, maximized or transient.
1156 </description>
1157 </request>
1158
1159 <enum name="transient" bitfield="true">
1160 <description summary="details of transient behaviour">
1161 These flags specify details of the expected behaviour
1162 of transient surfaces. Used in the set_transient request.
1163 </description>
1164 <entry name="inactive" value="0x1" summary="do not set keyboard focus"/>
1165 </enum>
1166
1167 <request name="set_transient">
1168 <description summary="make the surface a transient surface">
1169 Map the surface relative to an existing surface.
1170
1171 The x and y arguments specify the location of the upper left
1172 corner of the surface relative to the upper left corner of the
1173 parent surface, in surface-local coordinates.
1174
1175 The flags argument controls details of the transient behaviour.
1176 </description>
1177 <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
1178 <arg name="x" type="int" summary="surface-local x coordinate"/>
1179 <arg name="y" type="int" summary="surface-local y coordinate"/>
1180 <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
1181 </request>
1182
1183 <enum name="fullscreen_method">
1184 <description summary="different method to set the surface fullscreen">
1185 Hints to indicate to the compositor how to deal with a conflict
1186 between the dimensions of the surface and the dimensions of the
1187 output. The compositor is free to ignore this parameter.
1188 </description>
1189 <entry name="default" value="0" summary="no preference, apply default policy"/>
1190 <entry name="scale" value="1" summary="scale, preserve the surface's aspect ratio and center on output"/>
1191 <entry name="driver" value="2" summary="switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch"/>
1192 <entry name="fill" value="3" summary="no upscaling, center on output and add black borders to compensate size mismatch"/>
1193 </enum>
1194
1195 <request name="set_fullscreen">
1196 <description summary="make the surface a fullscreen surface">
1197 Map the surface as a fullscreen surface.
1198
1199 If an output parameter is given then the surface will be made
1200 fullscreen on that output. If the client does not specify the
1201 output then the compositor will apply its policy - usually
1202 choosing the output on which the surface has the biggest surface
1203 area.
1204
1205 The client may specify a method to resolve a size conflict
1206 between the output size and the surface size - this is provided
1207 through the method parameter.
1208
1209 The framerate parameter is used only when the method is set
1210 to "driver", to indicate the preferred framerate. A value of 0
1211 indicates that the client does not care about framerate. The
1212 framerate is specified in mHz, that is framerate of 60000 is 60Hz.
1213
1214 A method of "scale" or "driver" implies a scaling operation of
1215 the surface, either via a direct scaling operation or a change of
1216 the output mode. This will override any kind of output scaling, so
1217 that mapping a surface with a buffer size equal to the mode can
1218 fill the screen independent of buffer_scale.
1219
1220 A method of "fill" means we don't scale up the buffer, however
1221 any output scale is applied. This means that you may run into
1222 an edge case where the application maps a buffer with the same
1223 size of the output mode but buffer_scale 1 (thus making a
1224 surface larger than the output). In this case it is allowed to
1225 downscale the results to fit the screen.
1226
1227 The compositor must reply to this request with a configure event
1228 with the dimensions for the output on which the surface will
1229 be made fullscreen.
1230 </description>
1231 <arg name="method" type="uint" enum="fullscreen_method" summary="method for resolving size conflict"/>
1232 <arg name="framerate" type="uint" summary="framerate in mHz"/>
1233 <arg name="output" type="object" interface="wl_output" allow-null="true"
1234 summary="output on which the surface is to be fullscreen"/>
1235 </request>
1236
1237 <request name="set_popup">
1238 <description summary="make the surface a popup surface">
1239 Map the surface as a popup.
1240
1241 A popup surface is a transient surface with an added pointer
1242 grab.
1243
1244 An existing implicit grab will be changed to owner-events mode,
1245 and the popup grab will continue after the implicit grab ends
1246 (i.e. releasing the mouse button does not cause the popup to
1247 be unmapped).
1248
1249 The popup grab continues until the window is destroyed or a
1250 mouse button is pressed in any other client's window. A click
1251 in any of the client's surfaces is reported as normal, however,
1252 clicks in other clients' surfaces will be discarded and trigger
1253 the callback.
1254
1255 The x and y arguments specify the location of the upper left
1256 corner of the surface relative to the upper left corner of the
1257 parent surface, in surface-local coordinates.
1258 </description>
1259 <arg name="seat" type="object" interface="wl_seat" summary="seat whose pointer is used"/>
1260 <arg name="serial" type="uint" summary="serial number of the implicit grab on the pointer"/>
1261 <arg name="parent" type="object" interface="wl_surface" summary="parent surface"/>
1262 <arg name="x" type="int" summary="surface-local x coordinate"/>
1263 <arg name="y" type="int" summary="surface-local y coordinate"/>
1264 <arg name="flags" type="uint" enum="transient" summary="transient surface behavior"/>
1265 </request>
1266
1267 <request name="set_maximized">
1268 <description summary="make the surface a maximized surface">
1269 Map the surface as a maximized surface.
1270
1271 If an output parameter is given then the surface will be
1272 maximized on that output. If the client does not specify the
1273 output then the compositor will apply its policy - usually
1274 choosing the output on which the surface has the biggest surface
1275 area.
1276
1277 The compositor will reply with a configure event telling
1278 the expected new surface size. The operation is completed
1279 on the next buffer attach to this surface.
1280
1281 A maximized surface typically fills the entire output it is
1282 bound to, except for desktop elements such as panels. This is
1283 the main difference between a maximized shell surface and a
1284 fullscreen shell surface.
1285
1286 The details depend on the compositor implementation.
1287 </description>
1288 <arg name="output" type="object" interface="wl_output" allow-null="true"
1289 summary="output on which the surface is to be maximized"/>
1290 </request>
1291
1292 <request name="set_title">
1293 <description summary="set surface title">
1294 Set a short title for the surface.
1295
1296 This string may be used to identify the surface in a task bar,
1297 window list, or other user interface elements provided by the
1298 compositor.
1299
1300 The string must be encoded in UTF-8.
1301 </description>
1302 <arg name="title" type="string" summary="surface title"/>
1303 </request>
1304
1305 <request name="set_class">
1306 <description summary="set surface class">
1307 Set a class for the surface.
1308
1309 The surface class identifies the general class of applications
1310 to which the surface belongs. A common convention is to use the
1311 file name (or the full path if it is a non-standard location) of
1312 the application's .desktop file as the class.
1313 </description>
1314 <arg name="class_" type="string" summary="surface class"/>
1315 </request>
1316
1317 <event name="ping">
1318 <description summary="ping client">
1319 Ping a client to check if it is receiving events and sending
1320 requests. A client is expected to reply with a pong request.
1321 </description>
1322 <arg name="serial" type="uint" summary="serial number of the ping"/>
1323 </event>
1324
1325 <event name="configure">
1326 <description summary="suggest resize">
1327 The configure event asks the client to resize its surface.
1328
1329 The size is a hint, in the sense that the client is free to
1330 ignore it if it doesn't resize, pick a smaller size (to
1331 satisfy aspect ratio or resize in steps of NxM pixels).
1332
1333 The edges parameter provides a hint about how the surface
1334 was resized. The client may use this information to decide
1335 how to adjust its content to the new size (e.g. a scrolling
1336 area might adjust its content position to leave the viewable
1337 content unmoved).
1338
1339 The client is free to dismiss all but the last configure
1340 event it received.
1341
1342 The width and height arguments specify the size of the window
1343 in surface-local coordinates.
1344 </description>
1345 <arg name="edges" type="uint" enum="resize" summary="how the surface was resized"/>
1346 <arg name="width" type="int" summary="new width of the surface"/>
1347 <arg name="height" type="int" summary="new height of the surface"/>
1348 </event>
1349
1350 <event name="popup_done">
1351 <description summary="popup interaction is done">
1352 The popup_done event is sent out when a popup grab is broken,
1353 that is, when the user clicks a surface that doesn't belong
1354 to the client owning the popup surface.
1355 </description>
1356 </event>
1357 </interface>
1358
1359 <interface name="wl_surface" version="6">
1360 <description summary="an onscreen surface">
1361 A surface is a rectangular area that may be displayed on zero
1362 or more outputs, and shown any number of times at the compositor's
1363 discretion. They can present wl_buffers, receive user input, and
1364 define a local coordinate system.
1365
1366 The size of a surface (and relative positions on it) is described
1367 in surface-local coordinates, which may differ from the buffer
1368 coordinates of the pixel content, in case a buffer_transform
1369 or a buffer_scale is used.
1370
1371 A surface without a "role" is fairly useless: a compositor does
1372 not know where, when or how to present it. The role is the
1373 purpose of a wl_surface. Examples of roles are a cursor for a
1374 pointer (as set by wl_pointer.set_cursor), a drag icon
1375 (wl_data_device.start_drag), a sub-surface
1376 (wl_subcompositor.get_subsurface), and a window as defined by a
1377 shell protocol (e.g. wl_shell.get_shell_surface).
1378
1379 A surface can have only one role at a time. Initially a
1380 wl_surface does not have a role. Once a wl_surface is given a
1381 role, it is set permanently for the whole lifetime of the
1382 wl_surface object. Giving the current role again is allowed,
1383 unless explicitly forbidden by the relevant interface
1384 specification.
1385
1386 Surface roles are given by requests in other interfaces such as
1387 wl_pointer.set_cursor. The request should explicitly mention
1388 that this request gives a role to a wl_surface. Often, this
1389 request also creates a new protocol object that represents the
1390 role and adds additional functionality to wl_surface. When a
1391 client wants to destroy a wl_surface, they must destroy this role
1392 object before the wl_surface, otherwise a defunct_role_object error is
1393 sent.
1394
1395 Destroying the role object does not remove the role from the
1396 wl_surface, but it may stop the wl_surface from "playing the role".
1397 For instance, if a wl_subsurface object is destroyed, the wl_surface
1398 it was created for will be unmapped and forget its position and
1399 z-order. It is allowed to create a wl_subsurface for the same
1400 wl_surface again, but it is not allowed to use the wl_surface as
1401 a cursor (cursor is a different role than sub-surface, and role
1402 switching is not allowed).
1403 </description>
1404
1405 <enum name="error">
1406 <description summary="wl_surface error values">
1407 These errors can be emitted in response to wl_surface requests.
1408 </description>
1409 <entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
1410 <entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
1411 <entry name="invalid_size" value="2" summary="buffer size is invalid"/>
1412 <entry name="invalid_offset" value="3" summary="buffer offset is invalid"/>
1413 <entry name="defunct_role_object" value="4"
1414 summary="surface was destroyed before its role object"/>
1415 </enum>
1416
1417 <request name="destroy" type="destructor">
1418 <description summary="delete surface">
1419 Deletes the surface and invalidates its object ID.
1420 </description>
1421 </request>
1422
1423 <request name="attach">
1424 <description summary="set the surface contents">
1425 Set a buffer as the content of this surface.
1426
1427 The new size of the surface is calculated based on the buffer
1428 size transformed by the inverse buffer_transform and the
1429 inverse buffer_scale. This means that at commit time the supplied
1430 buffer size must be an integer multiple of the buffer_scale. If
1431 that's not the case, an invalid_size error is sent.
1432
1433 The x and y arguments specify the location of the new pending
1434 buffer's upper left corner, relative to the current buffer's upper
1435 left corner, in surface-local coordinates. In other words, the
1436 x and y, combined with the new surface size define in which
1437 directions the surface's size changes. Setting anything other than 0
1438 as x and y arguments is discouraged, and should instead be replaced
1439 with using the separate wl_surface.offset request.
1440
1441 When the bound wl_surface version is 5 or higher, passing any
1442 non-zero x or y is a protocol violation, and will result in an
1443 'invalid_offset' error being raised. The x and y arguments are ignored
1444 and do not change the pending state. To achieve equivalent semantics,
1445 use wl_surface.offset.
1446
1447 Surface contents are double-buffered state, see wl_surface.commit.
1448
1449 The initial surface contents are void; there is no content.
1450 wl_surface.attach assigns the given wl_buffer as the pending
1451 wl_buffer. wl_surface.commit makes the pending wl_buffer the new
1452 surface contents, and the size of the surface becomes the size
1453 calculated from the wl_buffer, as described above. After commit,
1454 there is no pending buffer until the next attach.
1455
1456 Committing a pending wl_buffer allows the compositor to read the
1457 pixels in the wl_buffer. The compositor may access the pixels at
1458 any time after the wl_surface.commit request. When the compositor
1459 will not access the pixels anymore, it will send the
1460 wl_buffer.release event. Only after receiving wl_buffer.release,
1461 the client may reuse the wl_buffer. A wl_buffer that has been
1462 attached and then replaced by another attach instead of committed
1463 will not receive a release event, and is not used by the
1464 compositor.
1465
1466 If a pending wl_buffer has been committed to more than one wl_surface,
1467 the delivery of wl_buffer.release events becomes undefined. A well
1468 behaved client should not rely on wl_buffer.release events in this
1469 case. Alternatively, a client could create multiple wl_buffer objects
1470 from the same backing storage or use wp_linux_buffer_release.
1471
1472 Destroying the wl_buffer after wl_buffer.release does not change
1473 the surface contents. Destroying the wl_buffer before wl_buffer.release
1474 is allowed as long as the underlying buffer storage isn't re-used (this
1475 can happen e.g. on client process termination). However, if the client
1476 destroys the wl_buffer before receiving the wl_buffer.release event and
1477 mutates the underlying buffer storage, the surface contents become
1478 undefined immediately.
1479
1480 If wl_surface.attach is sent with a NULL wl_buffer, the
1481 following wl_surface.commit will remove the surface content.
1482 </description>
1483 <arg name="buffer" type="object" interface="wl_buffer" allow-null="true"
1484 summary="buffer of surface contents"/>
1485 <arg name="x" type="int" summary="surface-local x coordinate"/>
1486 <arg name="y" type="int" summary="surface-local y coordinate"/>
1487 </request>
1488
1489 <request name="damage">
1490 <description summary="mark part of the surface damaged">
1491 This request is used to describe the regions where the pending
1492 buffer is different from the current surface contents, and where
1493 the surface therefore needs to be repainted. The compositor
1494 ignores the parts of the damage that fall outside of the surface.
1495
1496 Damage is double-buffered state, see wl_surface.commit.
1497
1498 The damage rectangle is specified in surface-local coordinates,
1499 where x and y specify the upper left corner of the damage rectangle.
1500
1501 The initial value for pending damage is empty: no damage.
1502 wl_surface.damage adds pending damage: the new pending damage
1503 is the union of old pending damage and the given rectangle.
1504
1505 wl_surface.commit assigns pending damage as the current damage,
1506 and clears pending damage. The server will clear the current
1507 damage as it repaints the surface.
1508
1509 Note! New clients should not use this request. Instead damage can be
1510 posted with wl_surface.damage_buffer which uses buffer coordinates
1511 instead of surface coordinates.
1512 </description>
1513 <arg name="x" type="int" summary="surface-local x coordinate"/>
1514 <arg name="y" type="int" summary="surface-local y coordinate"/>
1515 <arg name="width" type="int" summary="width of damage rectangle"/>
1516 <arg name="height" type="int" summary="height of damage rectangle"/>
1517 </request>
1518
1519 <request name="frame">
1520 <description summary="request a frame throttling hint">
1521 Request a notification when it is a good time to start drawing a new
1522 frame, by creating a frame callback. This is useful for throttling
1523 redrawing operations, and driving animations.
1524
1525 When a client is animating on a wl_surface, it can use the 'frame'
1526 request to get notified when it is a good time to draw and commit the
1527 next frame of animation. If the client commits an update earlier than
1528 that, it is likely that some updates will not make it to the display,
1529 and the client is wasting resources by drawing too often.
1530
1531 The frame request will take effect on the next wl_surface.commit.
1532 The notification will only be posted for one frame unless
1533 requested again. For a wl_surface, the notifications are posted in
1534 the order the frame requests were committed.
1535
1536 The server must send the notifications so that a client
1537 will not send excessive updates, while still allowing
1538 the highest possible update rate for clients that wait for the reply
1539 before drawing again. The server should give some time for the client
1540 to draw and commit after sending the frame callback events to let it
1541 hit the next output refresh.
1542
1543 A server should avoid signaling the frame callbacks if the
1544 surface is not visible in any way, e.g. the surface is off-screen,
1545 or completely obscured by other opaque surfaces.
1546
1547 The object returned by this request will be destroyed by the
1548 compositor after the callback is fired and as such the client must not
1549 attempt to use it after that point.
1550
1551 The callback_data passed in the callback is the current time, in
1552 milliseconds, with an undefined base.
1553 </description>
1554 <arg name="callback" type="new_id" interface="wl_callback" summary="callback object for the frame request"/>
1555 </request>
1556
1557 <request name="set_opaque_region">
1558 <description summary="set opaque region">
1559 This request sets the region of the surface that contains
1560 opaque content.
1561
1562 The opaque region is an optimization hint for the compositor
1563 that lets it optimize the redrawing of content behind opaque
1564 regions. Setting an opaque region is not required for correct
1565 behaviour, but marking transparent content as opaque will result
1566 in repaint artifacts.
1567
1568 The opaque region is specified in surface-local coordinates.
1569
1570 The compositor ignores the parts of the opaque region that fall
1571 outside of the surface.
1572
1573 Opaque region is double-buffered state, see wl_surface.commit.
1574
1575 wl_surface.set_opaque_region changes the pending opaque region.
1576 wl_surface.commit copies the pending region to the current region.
1577 Otherwise, the pending and current regions are never changed.
1578
1579 The initial value for an opaque region is empty. Setting the pending
1580 opaque region has copy semantics, and the wl_region object can be
1581 destroyed immediately. A NULL wl_region causes the pending opaque
1582 region to be set to empty.
1583 </description>
1584 <arg name="region" type="object" interface="wl_region" allow-null="true"
1585 summary="opaque region of the surface"/>
1586 </request>
1587
1588 <request name="set_input_region">
1589 <description summary="set input region">
1590 This request sets the region of the surface that can receive
1591 pointer and touch events.
1592
1593 Input events happening outside of this region will try the next
1594 surface in the server surface stack. The compositor ignores the
1595 parts of the input region that fall outside of the surface.
1596
1597 The input region is specified in surface-local coordinates.
1598
1599 Input region is double-buffered state, see wl_surface.commit.
1600
1601 wl_surface.set_input_region changes the pending input region.
1602 wl_surface.commit copies the pending region to the current region.
1603 Otherwise the pending and current regions are never changed,
1604 except cursor and icon surfaces are special cases, see
1605 wl_pointer.set_cursor and wl_data_device.start_drag.
1606
1607 The initial value for an input region is infinite. That means the
1608 whole surface will accept input. Setting the pending input region
1609 has copy semantics, and the wl_region object can be destroyed
1610 immediately. A NULL wl_region causes the input region to be set
1611 to infinite.
1612 </description>
1613 <arg name="region" type="object" interface="wl_region" allow-null="true"
1614 summary="input region of the surface"/>
1615 </request>
1616
1617 <request name="commit">
1618 <description summary="commit pending surface state">
1619 Surface state (input, opaque, and damage regions, attached buffers,
1620 etc.) is double-buffered. Protocol requests modify the pending state,
1621 as opposed to the current state in use by the compositor. A commit
1622 request atomically applies all pending state, replacing the current
1623 state. After commit, the new pending state is as documented for each
1624 related request.
1625
1626 On commit, a pending wl_buffer is applied first, and all other state
1627 second. This means that all coordinates in double-buffered state are
1628 relative to the new wl_buffer coming into use, except for
1629 wl_surface.attach itself. If there is no pending wl_buffer, the
1630 coordinates are relative to the current surface contents.
1631
1632 All requests that need a commit to become effective are documented
1633 to affect double-buffered state.
1634
1635 Other interfaces may add further double-buffered surface state.
1636 </description>
1637 </request>
1638
1639 <event name="enter">
1640 <description summary="surface enters an output">
1641 This is emitted whenever a surface's creation, movement, or resizing
1642 results in some part of it being within the scanout region of an
1643 output.
1644
1645 Note that a surface may be overlapping with zero or more outputs.
1646 </description>
1647 <arg name="output" type="object" interface="wl_output" summary="output entered by the surface"/>
1648 </event>
1649
1650 <event name="leave">
1651 <description summary="surface leaves an output">
1652 This is emitted whenever a surface's creation, movement, or resizing
1653 results in it no longer having any part of it within the scanout region
1654 of an output.
1655
1656 Clients should not use the number of outputs the surface is on for frame
1657 throttling purposes. The surface might be hidden even if no leave event
1658 has been sent, and the compositor might expect new surface content
1659 updates even if no enter event has been sent. The frame event should be
1660 used instead.
1661 </description>
1662 <arg name="output" type="object" interface="wl_output" summary="output left by the surface"/>
1663 </event>
1664
1665 <!-- Version 2 additions -->
1666
1667 <request name="set_buffer_transform" since="2">
1668 <description summary="sets the buffer transformation">
1669 This request sets an optional transformation on how the compositor
1670 interprets the contents of the buffer attached to the surface. The
1671 accepted values for the transform parameter are the values for
1672 wl_output.transform.
1673
1674 Buffer transform is double-buffered state, see wl_surface.commit.
1675
1676 A newly created surface has its buffer transformation set to normal.
1677
1678 wl_surface.set_buffer_transform changes the pending buffer
1679 transformation. wl_surface.commit copies the pending buffer
1680 transformation to the current one. Otherwise, the pending and current
1681 values are never changed.
1682
1683 The purpose of this request is to allow clients to render content
1684 according to the output transform, thus permitting the compositor to
1685 use certain optimizations even if the display is rotated. Using
1686 hardware overlays and scanning out a client buffer for fullscreen
1687 surfaces are examples of such optimizations. Those optimizations are
1688 highly dependent on the compositor implementation, so the use of this
1689 request should be considered on a case-by-case basis.
1690
1691 Note that if the transform value includes 90 or 270 degree rotation,
1692 the width of the buffer will become the surface height and the height
1693 of the buffer will become the surface width.
1694
1695 If transform is not one of the values from the
1696 wl_output.transform enum the invalid_transform protocol error
1697 is raised.
1698 </description>
1699 <arg name="transform" type="int" enum="wl_output.transform"
1700 summary="transform for interpreting buffer contents"/>
1701 </request>
1702
1703 <!-- Version 3 additions -->
1704
1705 <request name="set_buffer_scale" since="3">
1706 <description summary="sets the buffer scaling factor">
1707 This request sets an optional scaling factor on how the compositor
1708 interprets the contents of the buffer attached to the window.
1709
1710 Buffer scale is double-buffered state, see wl_surface.commit.
1711
1712 A newly created surface has its buffer scale set to 1.
1713
1714 wl_surface.set_buffer_scale changes the pending buffer scale.
1715 wl_surface.commit copies the pending buffer scale to the current one.
1716 Otherwise, the pending and current values are never changed.
1717
1718 The purpose of this request is to allow clients to supply higher
1719 resolution buffer data for use on high resolution outputs. It is
1720 intended that you pick the same buffer scale as the scale of the
1721 output that the surface is displayed on. This means the compositor
1722 can avoid scaling when rendering the surface on that output.
1723
1724 Note that if the scale is larger than 1, then you have to attach
1725 a buffer that is larger (by a factor of scale in each dimension)
1726 than the desired surface size.
1727
1728 If scale is not positive the invalid_scale protocol error is
1729 raised.
1730 </description>
1731 <arg name="scale" type="int"
1732 summary="positive scale for interpreting buffer contents"/>
1733 </request>
1734
1735 <!-- Version 4 additions -->
1736 <request name="damage_buffer" since="4">
1737 <description summary="mark part of the surface damaged using buffer coordinates">
1738 This request is used to describe the regions where the pending
1739 buffer is different from the current surface contents, and where
1740 the surface therefore needs to be repainted. The compositor
1741 ignores the parts of the damage that fall outside of the surface.
1742
1743 Damage is double-buffered state, see wl_surface.commit.
1744
1745 The damage rectangle is specified in buffer coordinates,
1746 where x and y specify the upper left corner of the damage rectangle.
1747
1748 The initial value for pending damage is empty: no damage.
1749 wl_surface.damage_buffer adds pending damage: the new pending
1750 damage is the union of old pending damage and the given rectangle.
1751
1752 wl_surface.commit assigns pending damage as the current damage,
1753 and clears pending damage. The server will clear the current
1754 damage as it repaints the surface.
1755
1756 This request differs from wl_surface.damage in only one way - it
1757 takes damage in buffer coordinates instead of surface-local
1758 coordinates. While this generally is more intuitive than surface
1759 coordinates, it is especially desirable when using wp_viewport
1760 or when a drawing library (like EGL) is unaware of buffer scale
1761 and buffer transform.
1762
1763 Note: Because buffer transformation changes and damage requests may
1764 be interleaved in the protocol stream, it is impossible to determine
1765 the actual mapping between surface and buffer damage until
1766 wl_surface.commit time. Therefore, compositors wishing to take both
1767 kinds of damage into account will have to accumulate damage from the
1768 two requests separately and only transform from one to the other
1769 after receiving the wl_surface.commit.
1770 </description>
1771 <arg name="x" type="int" summary="buffer-local x coordinate"/>
1772 <arg name="y" type="int" summary="buffer-local y coordinate"/>
1773 <arg name="width" type="int" summary="width of damage rectangle"/>
1774 <arg name="height" type="int" summary="height of damage rectangle"/>
1775 </request>
1776
1777 <!-- Version 5 additions -->
1778
1779 <request name="offset" since="5">
1780 <description summary="set the surface contents offset">
1781 The x and y arguments specify the location of the new pending
1782 buffer's upper left corner, relative to the current buffer's upper
1783 left corner, in surface-local coordinates. In other words, the
1784 x and y, combined with the new surface size define in which
1785 directions the surface's size changes.
1786
1787 Surface location offset is double-buffered state, see
1788 wl_surface.commit.
1789
1790 This request is semantically equivalent to and the replaces the x and y
1791 arguments in the wl_surface.attach request in wl_surface versions prior
1792 to 5. See wl_surface.attach for details.
1793 </description>
1794 <arg name="x" type="int" summary="surface-local x coordinate"/>
1795 <arg name="y" type="int" summary="surface-local y coordinate"/>
1796 </request>
1797
1798 <!-- Version 6 additions -->
1799
1800 <event name="preferred_buffer_scale" since="6">
1801 <description summary="preferred buffer scale for the surface">
1802 This event indicates the preferred buffer scale for this surface. It is
1803 sent whenever the compositor's preference changes.
1804
1805 It is intended that scaling aware clients use this event to scale their
1806 content and use wl_surface.set_buffer_scale to indicate the scale they
1807 have rendered with. This allows clients to supply a higher detail
1808 buffer.
1809 </description>
1810 <arg name="factor" type="int" summary="preferred scaling factor"/>
1811 </event>
1812
1813 <event name="preferred_buffer_transform" since="6">
1814 <description summary="preferred buffer transform for the surface">
1815 This event indicates the preferred buffer transform for this surface.
1816 It is sent whenever the compositor's preference changes.
1817
1818 It is intended that transform aware clients use this event to apply the
1819 transform to their content and use wl_surface.set_buffer_transform to
1820 indicate the transform they have rendered with.
1821 </description>
1822 <arg name="transform" type="uint" enum="wl_output.transform"
1823 summary="preferred transform"/>
1824 </event>
1825 </interface>
1826
1827 <interface name="wl_seat" version="9">
1828 <description summary="group of input devices">
1829 A seat is a group of keyboards, pointer and touch devices. This
1830 object is published as a global during start up, or when such a
1831 device is hot plugged. A seat typically has a pointer and
1832 maintains a keyboard focus and a pointer focus.
1833 </description>
1834
1835 <enum name="capability" bitfield="true">
1836 <description summary="seat capability bitmask">
1837 This is a bitmask of capabilities this seat has; if a member is
1838 set, then it is present on the seat.
1839 </description>
1840 <entry name="pointer" value="1" summary="the seat has pointer devices"/>
1841 <entry name="keyboard" value="2" summary="the seat has one or more keyboards"/>
1842 <entry name="touch" value="4" summary="the seat has touch devices"/>
1843 </enum>
1844
1845 <enum name="error">
1846 <description summary="wl_seat error values">
1847 These errors can be emitted in response to wl_seat requests.
1848 </description>
1849 <entry name="missing_capability" value="0"
1850 summary="get_pointer, get_keyboard or get_touch called on seat without the matching capability"/>
1851 </enum>
1852
1853 <event name="capabilities">
1854 <description summary="seat capabilities changed">
1855 This is emitted whenever a seat gains or loses the pointer,
1856 keyboard or touch capabilities. The argument is a capability
1857 enum containing the complete set of capabilities this seat has.
1858
1859 When the pointer capability is added, a client may create a
1860 wl_pointer object using the wl_seat.get_pointer request. This object
1861 will receive pointer events until the capability is removed in the
1862 future.
1863
1864 When the pointer capability is removed, a client should destroy the
1865 wl_pointer objects associated with the seat where the capability was
1866 removed, using the wl_pointer.release request. No further pointer
1867 events will be received on these objects.
1868
1869 In some compositors, if a seat regains the pointer capability and a
1870 client has a previously obtained wl_pointer object of version 4 or
1871 less, that object may start sending pointer events again. This
1872 behavior is considered a misinterpretation of the intended behavior
1873 and must not be relied upon by the client. wl_pointer objects of
1874 version 5 or later must not send events if created before the most
1875 recent event notifying the client of an added pointer capability.
1876
1877 The above behavior also applies to wl_keyboard and wl_touch with the
1878 keyboard and touch capabilities, respectively.
1879 </description>
1880 <arg name="capabilities" type="uint" enum="capability" summary="capabilities of the seat"/>
1881 </event>
1882
1883 <request name="get_pointer">
1884 <description summary="return pointer object">
1885 The ID provided will be initialized to the wl_pointer interface
1886 for this seat.
1887
1888 This request only takes effect if the seat has the pointer
1889 capability, or has had the pointer capability in the past.
1890 It is a protocol violation to issue this request on a seat that has
1891 never had the pointer capability. The missing_capability error will
1892 be sent in this case.
1893 </description>
1894 <arg name="id" type="new_id" interface="wl_pointer" summary="seat pointer"/>
1895 </request>
1896
1897 <request name="get_keyboard">
1898 <description summary="return keyboard object">
1899 The ID provided will be initialized to the wl_keyboard interface
1900 for this seat.
1901
1902 This request only takes effect if the seat has the keyboard
1903 capability, or has had the keyboard capability in the past.
1904 It is a protocol violation to issue this request on a seat that has
1905 never had the keyboard capability. The missing_capability error will
1906 be sent in this case.
1907 </description>
1908 <arg name="id" type="new_id" interface="wl_keyboard" summary="seat keyboard"/>
1909 </request>
1910
1911 <request name="get_touch">
1912 <description summary="return touch object">
1913 The ID provided will be initialized to the wl_touch interface
1914 for this seat.
1915
1916 This request only takes effect if the seat has the touch
1917 capability, or has had the touch capability in the past.
1918 It is a protocol violation to issue this request on a seat that has
1919 never had the touch capability. The missing_capability error will
1920 be sent in this case.
1921 </description>
1922 <arg name="id" type="new_id" interface="wl_touch" summary="seat touch interface"/>
1923 </request>
1924
1925 <!-- Version 2 additions -->
1926
1927 <event name="name" since="2">
1928 <description summary="unique identifier for this seat">
1929 In a multi-seat configuration the seat name can be used by clients to
1930 help identify which physical devices the seat represents.
1931
1932 The seat name is a UTF-8 string with no convention defined for its
1933 contents. Each name is unique among all wl_seat globals. The name is
1934 only guaranteed to be unique for the current compositor instance.
1935
1936 The same seat names are used for all clients. Thus, the name can be
1937 shared across processes to refer to a specific wl_seat global.
1938
1939 The name event is sent after binding to the seat global. This event is
1940 only sent once per seat object, and the name does not change over the
1941 lifetime of the wl_seat global.
1942
1943 Compositors may re-use the same seat name if the wl_seat global is
1944 destroyed and re-created later.
1945 </description>
1946 <arg name="name" type="string" summary="seat identifier"/>
1947 </event>
1948
1949 <!-- Version 5 additions -->
1950
1951 <request name="release" type="destructor" since="5">
1952 <description summary="release the seat object">
1953 Using this request a client can tell the server that it is not going to
1954 use the seat object anymore.
1955 </description>
1956 </request>
1957
1958 </interface>
1959
1960 <interface name="wl_pointer" version="9">
1961 <description summary="pointer input device">
1962 The wl_pointer interface represents one or more input devices,
1963 such as mice, which control the pointer location and pointer_focus
1964 of a seat.
1965
1966 The wl_pointer interface generates motion, enter and leave
1967 events for the surfaces that the pointer is located over,
1968 and button and axis events for button presses, button releases
1969 and scrolling.
1970 </description>
1971
1972 <enum name="error">
1973 <entry name="role" value="0" summary="given wl_surface has another role"/>
1974 </enum>
1975
1976 <request name="set_cursor">
1977 <description summary="set the pointer surface">
1978 Set the pointer surface, i.e., the surface that contains the
1979 pointer image (cursor). This request gives the surface the role
1980 of a cursor. If the surface already has another role, it raises
1981 a protocol error.
1982
1983 The cursor actually changes only if the pointer
1984 focus for this device is one of the requesting client's surfaces
1985 or the surface parameter is the current pointer surface. If
1986 there was a previous surface set with this request it is
1987 replaced. If surface is NULL, the pointer image is hidden.
1988
1989 The parameters hotspot_x and hotspot_y define the position of
1990 the pointer surface relative to the pointer location. Its
1991 top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
1992 where (x, y) are the coordinates of the pointer location, in
1993 surface-local coordinates.
1994
1995 On surface.attach requests to the pointer surface, hotspot_x
1996 and hotspot_y are decremented by the x and y parameters
1997 passed to the request. Attach must be confirmed by
1998 wl_surface.commit as usual.
1999
2000 The hotspot can also be updated by passing the currently set
2001 pointer surface to this request with new values for hotspot_x
2002 and hotspot_y.
2003
2004 The input region is ignored for wl_surfaces with the role of
2005 a cursor. When the use as a cursor ends, the wl_surface is
2006 unmapped.
2007
2008 The serial parameter must match the latest wl_pointer.enter
2009 serial number sent to the client. Otherwise the request will be
2010 ignored.
2011 </description>
2012 <arg name="serial" type="uint" summary="serial number of the enter event"/>
2013 <arg name="surface" type="object" interface="wl_surface" allow-null="true"
2014 summary="pointer surface"/>
2015 <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>
2016 <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>
2017 </request>
2018
2019 <event name="enter">
2020 <description summary="enter event">
2021 Notification that this seat's pointer is focused on a certain
2022 surface.
2023
2024 When a seat's focus enters a surface, the pointer image
2025 is undefined and a client should respond to this event by setting
2026 an appropriate pointer image with the set_cursor request.
2027 </description>
2028 <arg name="serial" type="uint" summary="serial number of the enter event"/>
2029 <arg name="surface" type="object" interface="wl_surface" summary="surface entered by the pointer"/>
2030 <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
2031 <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
2032 </event>
2033
2034 <event name="leave">
2035 <description summary="leave event">
2036 Notification that this seat's pointer is no longer focused on
2037 a certain surface.
2038
2039 The leave notification is sent before the enter notification
2040 for the new focus.
2041 </description>
2042 <arg name="serial" type="uint" summary="serial number of the leave event"/>
2043 <arg name="surface" type="object" interface="wl_surface" summary="surface left by the pointer"/>
2044 </event>
2045
2046 <event name="motion">
2047 <description summary="pointer motion event">
2048 Notification of pointer location change. The arguments
2049 surface_x and surface_y are the location relative to the
2050 focused surface.
2051 </description>
2052 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2053 <arg name="surface_x" type="fixed" summary="surface-local x coordinate"/>
2054 <arg name="surface_y" type="fixed" summary="surface-local y coordinate"/>
2055 </event>
2056
2057 <enum name="button_state">
2058 <description summary="physical button state">
2059 Describes the physical state of a button that produced the button
2060 event.
2061 </description>
2062 <entry name="released" value="0" summary="the button is not pressed"/>
2063 <entry name="pressed" value="1" summary="the button is pressed"/>
2064 </enum>
2065
2066 <event name="button">
2067 <description summary="pointer button event">
2068 Mouse button click and release notifications.
2069
2070 The location of the click is given by the last motion or
2071 enter event.
2072 The time argument is a timestamp with millisecond
2073 granularity, with an undefined base.
2074
2075 The button is a button code as defined in the Linux kernel's
2076 linux/input-event-codes.h header file, e.g. BTN_LEFT.
2077
2078 Any 16-bit button code value is reserved for future additions to the
2079 kernel's event code list. All other button codes above 0xFFFF are
2080 currently undefined but may be used in future versions of this
2081 protocol.
2082 </description>
2083 <arg name="serial" type="uint" summary="serial number of the button event"/>
2084 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2085 <arg name="button" type="uint" summary="button that produced the event"/>
2086 <arg name="state" type="uint" enum="button_state" summary="physical state of the button"/>
2087 </event>
2088
2089 <enum name="axis">
2090 <description summary="axis types">
2091 Describes the axis types of scroll events.
2092 </description>
2093 <entry name="vertical_scroll" value="0" summary="vertical axis"/>
2094 <entry name="horizontal_scroll" value="1" summary="horizontal axis"/>
2095 </enum>
2096
2097 <event name="axis">
2098 <description summary="axis event">
2099 Scroll and other axis notifications.
2100
2101 For scroll events (vertical and horizontal scroll axes), the
2102 value parameter is the length of a vector along the specified
2103 axis in a coordinate space identical to those of motion events,
2104 representing a relative movement along the specified axis.
2105
2106 For devices that support movements non-parallel to axes multiple
2107 axis events will be emitted.
2108
2109 When applicable, for example for touch pads, the server can
2110 choose to emit scroll events where the motion vector is
2111 equivalent to a motion event vector.
2112
2113 When applicable, a client can transform its content relative to the
2114 scroll distance.
2115 </description>
2116 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2117 <arg name="axis" type="uint" enum="axis" summary="axis type"/>
2118 <arg name="value" type="fixed" summary="length of vector in surface-local coordinate space"/>
2119 </event>
2120
2121 <!-- Version 3 additions -->
2122
2123 <request name="release" type="destructor" since="3">
2124 <description summary="release the pointer object">
2125 Using this request a client can tell the server that it is not going to
2126 use the pointer object anymore.
2127
2128 This request destroys the pointer proxy object, so clients must not call
2129 wl_pointer_destroy() after using this request.
2130 </description>
2131 </request>
2132
2133 <!-- Version 5 additions -->
2134
2135 <event name="frame" since="5">
2136 <description summary="end of a pointer event sequence">
2137 Indicates the end of a set of events that logically belong together.
2138 A client is expected to accumulate the data in all events within the
2139 frame before proceeding.
2140
2141 All wl_pointer events before a wl_pointer.frame event belong
2142 logically together. For example, in a diagonal scroll motion the
2143 compositor will send an optional wl_pointer.axis_source event, two
2144 wl_pointer.axis events (horizontal and vertical) and finally a
2145 wl_pointer.frame event. The client may use this information to
2146 calculate a diagonal vector for scrolling.
2147
2148 When multiple wl_pointer.axis events occur within the same frame,
2149 the motion vector is the combined motion of all events.
2150 When a wl_pointer.axis and a wl_pointer.axis_stop event occur within
2151 the same frame, this indicates that axis movement in one axis has
2152 stopped but continues in the other axis.
2153 When multiple wl_pointer.axis_stop events occur within the same
2154 frame, this indicates that these axes stopped in the same instance.
2155
2156 A wl_pointer.frame event is sent for every logical event group,
2157 even if the group only contains a single wl_pointer event.
2158 Specifically, a client may get a sequence: motion, frame, button,
2159 frame, axis, frame, axis_stop, frame.
2160
2161 The wl_pointer.enter and wl_pointer.leave events are logical events
2162 generated by the compositor and not the hardware. These events are
2163 also grouped by a wl_pointer.frame. When a pointer moves from one
2164 surface to another, a compositor should group the
2165 wl_pointer.leave event within the same wl_pointer.frame.
2166 However, a client must not rely on wl_pointer.leave and
2167 wl_pointer.enter being in the same wl_pointer.frame.
2168 Compositor-specific policies may require the wl_pointer.leave and
2169 wl_pointer.enter event being split across multiple wl_pointer.frame
2170 groups.
2171 </description>
2172 </event>
2173
2174 <enum name="axis_source">
2175 <description summary="axis source types">
2176 Describes the source types for axis events. This indicates to the
2177 client how an axis event was physically generated; a client may
2178 adjust the user interface accordingly. For example, scroll events
2179 from a "finger" source may be in a smooth coordinate space with
2180 kinetic scrolling whereas a "wheel" source may be in discrete steps
2181 of a number of lines.
2182
2183 The "continuous" axis source is a device generating events in a
2184 continuous coordinate space, but using something other than a
2185 finger. One example for this source is button-based scrolling where
2186 the vertical motion of a device is converted to scroll events while
2187 a button is held down.
2188
2189 The "wheel tilt" axis source indicates that the actual device is a
2190 wheel but the scroll event is not caused by a rotation but a
2191 (usually sideways) tilt of the wheel.
2192 </description>
2193 <entry name="wheel" value="0" summary="a physical wheel rotation" />
2194 <entry name="finger" value="1" summary="finger on a touch surface" />
2195 <entry name="continuous" value="2" summary="continuous coordinate space"/>
2196 <entry name="wheel_tilt" value="3" summary="a physical wheel tilt" since="6"/>
2197 </enum>
2198
2199 <event name="axis_source" since="5">
2200 <description summary="axis source event">
2201 Source information for scroll and other axes.
2202
2203 This event does not occur on its own. It is sent before a
2204 wl_pointer.frame event and carries the source information for
2205 all events within that frame.
2206
2207 The source specifies how this event was generated. If the source is
2208 wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
2209 sent when the user lifts the finger off the device.
2210
2211 If the source is wl_pointer.axis_source.wheel,
2212 wl_pointer.axis_source.wheel_tilt or
2213 wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
2214 or may not be sent. Whether a compositor sends an axis_stop event
2215 for these sources is hardware-specific and implementation-dependent;
2216 clients must not rely on receiving an axis_stop event for these
2217 scroll sources and should treat scroll sequences from these scroll
2218 sources as unterminated by default.
2219
2220 This event is optional. If the source is unknown for a particular
2221 axis event sequence, no event is sent.
2222 Only one wl_pointer.axis_source event is permitted per frame.
2223
2224 The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
2225 not guaranteed.
2226 </description>
2227 <arg name="axis_source" type="uint" enum="axis_source" summary="source of the axis event"/>
2228 </event>
2229
2230 <event name="axis_stop" since="5">
2231 <description summary="axis stop event">
2232 Stop notification for scroll and other axes.
2233
2234 For some wl_pointer.axis_source types, a wl_pointer.axis_stop event
2235 is sent to notify a client that the axis sequence has terminated.
2236 This enables the client to implement kinetic scrolling.
2237 See the wl_pointer.axis_source documentation for information on when
2238 this event may be generated.
2239
2240 Any wl_pointer.axis events with the same axis_source after this
2241 event should be considered as the start of a new axis motion.
2242
2243 The timestamp is to be interpreted identical to the timestamp in the
2244 wl_pointer.axis event. The timestamp value may be the same as a
2245 preceding wl_pointer.axis event.
2246 </description>
2247 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2248 <arg name="axis" type="uint" enum="axis" summary="the axis stopped with this event"/>
2249 </event>
2250
2251 <event name="axis_discrete" since="5">
2252 <description summary="axis click event">
2253 Discrete step information for scroll and other axes.
2254
2255 This event carries the axis value of the wl_pointer.axis event in
2256 discrete steps (e.g. mouse wheel clicks).
2257
2258 This event is deprecated with wl_pointer version 8 - this event is not
2259 sent to clients supporting version 8 or later.
2260
2261 This event does not occur on its own, it is coupled with a
2262 wl_pointer.axis event that represents this axis value on a
2263 continuous scale. The protocol guarantees that each axis_discrete
2264 event is always followed by exactly one axis event with the same
2265 axis number within the same wl_pointer.frame. Note that the protocol
2266 allows for other events to occur between the axis_discrete and
2267 its coupled axis event, including other axis_discrete or axis
2268 events. A wl_pointer.frame must not contain more than one axis_discrete
2269 event per axis type.
2270
2271 This event is optional; continuous scrolling devices
2272 like two-finger scrolling on touchpads do not have discrete
2273 steps and do not generate this event.
2274
2275 The discrete value carries the directional information. e.g. a value
2276 of -2 is two steps towards the negative direction of this axis.
2277
2278 The axis number is identical to the axis number in the associated
2279 axis event.
2280
2281 The order of wl_pointer.axis_discrete and wl_pointer.axis_source is
2282 not guaranteed.
2283 </description>
2284 <arg name="axis" type="uint" enum="axis" summary="axis type"/>
2285 <arg name="discrete" type="int" summary="number of steps"/>
2286 </event>
2287
2288 <event name="axis_value120" since="8">
2289 <description summary="axis high-resolution scroll event">
2290 Discrete high-resolution scroll information.
2291
2292 This event carries high-resolution wheel scroll information,
2293 with each multiple of 120 representing one logical scroll step
2294 (a wheel detent). For example, an axis_value120 of 30 is one quarter of
2295 a logical scroll step in the positive direction, a value120 of
2296 -240 are two logical scroll steps in the negative direction within the
2297 same hardware event.
2298 Clients that rely on discrete scrolling should accumulate the
2299 value120 to multiples of 120 before processing the event.
2300
2301 The value120 must not be zero.
2302
2303 This event replaces the wl_pointer.axis_discrete event in clients
2304 supporting wl_pointer version 8 or later.
2305
2306 Where a wl_pointer.axis_source event occurs in the same
2307 wl_pointer.frame, the axis source applies to this event.
2308
2309 The order of wl_pointer.axis_value120 and wl_pointer.axis_source is
2310 not guaranteed.
2311 </description>
2312 <arg name="axis" type="uint" enum="axis" summary="axis type"/>
2313 <arg name="value120" type="int" summary="scroll distance as fraction of 120"/>
2314 </event>
2315
2316 <!-- Version 9 additions -->
2317
2318 <enum name="axis_relative_direction">
2319 <description summary="axis relative direction">
2320 This specifies the direction of the physical motion that caused a
2321 wl_pointer.axis event, relative to the wl_pointer.axis direction.
2322 </description>
2323 <entry name="identical" value="0"
2324 summary="physical motion matches axis direction"/>
2325 <entry name="inverted" value="1"
2326 summary="physical motion is the inverse of the axis direction"/>
2327 </enum>
2328
2329 <event name="axis_relative_direction" since="9">
2330 <description summary="axis relative physical direction event">
2331 Relative directional information of the entity causing the axis
2332 motion.
2333
2334 For a wl_pointer.axis event, the wl_pointer.axis_relative_direction
2335 event specifies the movement direction of the entity causing the
2336 wl_pointer.axis event. For example:
2337 - if a user's fingers on a touchpad move down and this
2338 causes a wl_pointer.axis vertical_scroll down event, the physical
2339 direction is 'identical'
2340 - if a user's fingers on a touchpad move down and this causes a
2341 wl_pointer.axis vertical_scroll up scroll up event ('natural
2342 scrolling'), the physical direction is 'inverted'.
2343
2344 A client may use this information to adjust scroll motion of
2345 components. Specifically, enabling natural scrolling causes the
2346 content to change direction compared to traditional scrolling.
2347 Some widgets like volume control sliders should usually match the
2348 physical direction regardless of whether natural scrolling is
2349 active. This event enables clients to match the scroll direction of
2350 a widget to the physical direction.
2351
2352 This event does not occur on its own, it is coupled with a
2353 wl_pointer.axis event that represents this axis value.
2354 The protocol guarantees that each axis_relative_direction event is
2355 always followed by exactly one axis event with the same
2356 axis number within the same wl_pointer.frame. Note that the protocol
2357 allows for other events to occur between the axis_relative_direction
2358 and its coupled axis event.
2359
2360 The axis number is identical to the axis number in the associated
2361 axis event.
2362
2363 The order of wl_pointer.axis_relative_direction,
2364 wl_pointer.axis_discrete and wl_pointer.axis_source is not
2365 guaranteed.
2366 </description>
2367 <arg name="axis" type="uint" enum="axis" summary="axis type"/>
2368 <arg name="direction" type="uint" enum="axis_relative_direction"
2369 summary="physical direction relative to axis motion"/>
2370 </event>
2371 </interface>
2372
2373 <interface name="wl_keyboard" version="9">
2374 <description summary="keyboard input device">
2375 The wl_keyboard interface represents one or more keyboards
2376 associated with a seat.
2377 </description>
2378
2379 <enum name="keymap_format">
2380 <description summary="keyboard mapping format">
2381 This specifies the format of the keymap provided to the
2382 client with the wl_keyboard.keymap event.
2383 </description>
2384 <entry name="no_keymap" value="0"
2385 summary="no keymap; client must understand how to interpret the raw keycode"/>
2386 <entry name="xkb_v1" value="1"
2387 summary="libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
2388 </enum>
2389
2390 <event name="keymap">
2391 <description summary="keyboard mapping">
2392 This event provides a file descriptor to the client which can be
2393 memory-mapped in read-only mode to provide a keyboard mapping
2394 description.
2395
2396 From version 7 onwards, the fd must be mapped with MAP_PRIVATE by
2397 the recipient, as MAP_SHARED may fail.
2398 </description>
2399 <arg name="format" type="uint" enum="keymap_format" summary="keymap format"/>
2400 <arg name="fd" type="fd" summary="keymap file descriptor"/>
2401 <arg name="size" type="uint" summary="keymap size, in bytes"/>
2402 </event>
2403
2404 <event name="enter">
2405 <description summary="enter event">
2406 Notification that this seat's keyboard focus is on a certain
2407 surface.
2408
2409 The compositor must send the wl_keyboard.modifiers event after this
2410 event.
2411 </description>
2412 <arg name="serial" type="uint" summary="serial number of the enter event"/>
2413 <arg name="surface" type="object" interface="wl_surface" summary="surface gaining keyboard focus"/>
2414 <arg name="keys" type="array" summary="the currently pressed keys"/>
2415 </event>
2416
2417 <event name="leave">
2418 <description summary="leave event">
2419 Notification that this seat's keyboard focus is no longer on
2420 a certain surface.
2421
2422 The leave notification is sent before the enter notification
2423 for the new focus.
2424
2425 After this event client must assume that all keys, including modifiers,
2426 are lifted and also it must stop key repeating if there's some going on.
2427 </description>
2428 <arg name="serial" type="uint" summary="serial number of the leave event"/>
2429 <arg name="surface" type="object" interface="wl_surface" summary="surface that lost keyboard focus"/>
2430 </event>
2431
2432 <enum name="key_state">
2433 <description summary="physical key state">
2434 Describes the physical state of a key that produced the key event.
2435 </description>
2436 <entry name="released" value="0" summary="key is not pressed"/>
2437 <entry name="pressed" value="1" summary="key is pressed"/>
2438 </enum>
2439
2440 <event name="key">
2441 <description summary="key event">
2442 A key was pressed or released.
2443 The time argument is a timestamp with millisecond
2444 granularity, with an undefined base.
2445
2446 The key is a platform-specific key code that can be interpreted
2447 by feeding it to the keyboard mapping (see the keymap event).
2448
2449 If this event produces a change in modifiers, then the resulting
2450 wl_keyboard.modifiers event must be sent after this event.
2451 </description>
2452 <arg name="serial" type="uint" summary="serial number of the key event"/>
2453 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2454 <arg name="key" type="uint" summary="key that produced the event"/>
2455 <arg name="state" type="uint" enum="key_state" summary="physical state of the key"/>
2456 </event>
2457
2458 <event name="modifiers">
2459 <description summary="modifier and group state">
2460 Notifies clients that the modifier and/or group state has
2461 changed, and it should update its local state.
2462 </description>
2463 <arg name="serial" type="uint" summary="serial number of the modifiers event"/>
2464 <arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
2465 <arg name="mods_latched" type="uint" summary="latched modifiers"/>
2466 <arg name="mods_locked" type="uint" summary="locked modifiers"/>
2467 <arg name="group" type="uint" summary="keyboard layout"/>
2468 </event>
2469
2470 <!-- Version 3 additions -->
2471
2472 <request name="release" type="destructor" since="3">
2473 <description summary="release the keyboard object"/>
2474 </request>
2475
2476 <!-- Version 4 additions -->
2477
2478 <event name="repeat_info" since="4">
2479 <description summary="repeat rate and delay">
2480 Informs the client about the keyboard's repeat rate and delay.
2481
2482 This event is sent as soon as the wl_keyboard object has been created,
2483 and is guaranteed to be received by the client before any key press
2484 event.
2485
2486 Negative values for either rate or delay are illegal. A rate of zero
2487 will disable any repeating (regardless of the value of delay).
2488
2489 This event can be sent later on as well with a new value if necessary,
2490 so clients should continue listening for the event past the creation
2491 of wl_keyboard.
2492 </description>
2493 <arg name="rate" type="int"
2494 summary="the rate of repeating keys in characters per second"/>
2495 <arg name="delay" type="int"
2496 summary="delay in milliseconds since key down until repeating starts"/>
2497 </event>
2498 </interface>
2499
2500 <interface name="wl_touch" version="9">
2501 <description summary="touchscreen input device">
2502 The wl_touch interface represents a touchscreen
2503 associated with a seat.
2504
2505 Touch interactions can consist of one or more contacts.
2506 For each contact, a series of events is generated, starting
2507 with a down event, followed by zero or more motion events,
2508 and ending with an up event. Events relating to the same
2509 contact point can be identified by the ID of the sequence.
2510 </description>
2511
2512 <event name="down">
2513 <description summary="touch down event and beginning of a touch sequence">
2514 A new touch point has appeared on the surface. This touch point is
2515 assigned a unique ID. Future events from this touch point reference
2516 this ID. The ID ceases to be valid after a touch up event and may be
2517 reused in the future.
2518 </description>
2519 <arg name="serial" type="uint" summary="serial number of the touch down event"/>
2520 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2521 <arg name="surface" type="object" interface="wl_surface" summary="surface touched"/>
2522 <arg name="id" type="int" summary="the unique ID of this touch point"/>
2523 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
2524 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
2525 </event>
2526
2527 <event name="up">
2528 <description summary="end of a touch event sequence">
2529 The touch point has disappeared. No further events will be sent for
2530 this touch point and the touch point's ID is released and may be
2531 reused in a future touch down event.
2532 </description>
2533 <arg name="serial" type="uint" summary="serial number of the touch up event"/>
2534 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2535 <arg name="id" type="int" summary="the unique ID of this touch point"/>
2536 </event>
2537
2538 <event name="motion">
2539 <description summary="update of touch point coordinates">
2540 A touch point has changed coordinates.
2541 </description>
2542 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
2543 <arg name="id" type="int" summary="the unique ID of this touch point"/>
2544 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
2545 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
2546 </event>
2547
2548 <event name="frame">
2549 <description summary="end of touch frame event">
2550 Indicates the end of a set of events that logically belong together.
2551 A client is expected to accumulate the data in all events within the
2552 frame before proceeding.
2553
2554 A wl_touch.frame terminates at least one event but otherwise no
2555 guarantee is provided about the set of events within a frame. A client
2556 must assume that any state not updated in a frame is unchanged from the
2557 previously known state.
2558 </description>
2559 </event>
2560
2561 <event name="cancel">
2562 <description summary="touch session cancelled">
2563 Sent if the compositor decides the touch stream is a global
2564 gesture. No further events are sent to the clients from that
2565 particular gesture. Touch cancellation applies to all touch points
2566 currently active on this client's surface. The client is
2567 responsible for finalizing the touch points, future touch points on
2568 this surface may reuse the touch point ID.
2569 </description>
2570 </event>
2571
2572 <!-- Version 3 additions -->
2573
2574 <request name="release" type="destructor" since="3">
2575 <description summary="release the touch object"/>
2576 </request>
2577
2578 <!-- Version 6 additions -->
2579
2580 <event name="shape" since="6">
2581 <description summary="update shape of touch point">
2582 Sent when a touchpoint has changed its shape.
2583
2584 This event does not occur on its own. It is sent before a
2585 wl_touch.frame event and carries the new shape information for
2586 any previously reported, or new touch points of that frame.
2587
2588 Other events describing the touch point such as wl_touch.down,
2589 wl_touch.motion or wl_touch.orientation may be sent within the
2590 same wl_touch.frame. A client should treat these events as a single
2591 logical touch point update. The order of wl_touch.shape,
2592 wl_touch.orientation and wl_touch.motion is not guaranteed.
2593 A wl_touch.down event is guaranteed to occur before the first
2594 wl_touch.shape event for this touch ID but both events may occur within
2595 the same wl_touch.frame.
2596
2597 A touchpoint shape is approximated by an ellipse through the major and
2598 minor axis length. The major axis length describes the longer diameter
2599 of the ellipse, while the minor axis length describes the shorter
2600 diameter. Major and minor are orthogonal and both are specified in
2601 surface-local coordinates. The center of the ellipse is always at the
2602 touchpoint location as reported by wl_touch.down or wl_touch.move.
2603
2604 This event is only sent by the compositor if the touch device supports
2605 shape reports. The client has to make reasonable assumptions about the
2606 shape if it did not receive this event.
2607 </description>
2608 <arg name="id" type="int" summary="the unique ID of this touch point"/>
2609 <arg name="major" type="fixed" summary="length of the major axis in surface-local coordinates"/>
2610 <arg name="minor" type="fixed" summary="length of the minor axis in surface-local coordinates"/>
2611 </event>
2612
2613 <event name="orientation" since="6">
2614 <description summary="update orientation of touch point">
2615 Sent when a touchpoint has changed its orientation.
2616
2617 This event does not occur on its own. It is sent before a
2618 wl_touch.frame event and carries the new shape information for
2619 any previously reported, or new touch points of that frame.
2620
2621 Other events describing the touch point such as wl_touch.down,
2622 wl_touch.motion or wl_touch.shape may be sent within the
2623 same wl_touch.frame. A client should treat these events as a single
2624 logical touch point update. The order of wl_touch.shape,
2625 wl_touch.orientation and wl_touch.motion is not guaranteed.
2626 A wl_touch.down event is guaranteed to occur before the first
2627 wl_touch.orientation event for this touch ID but both events may occur
2628 within the same wl_touch.frame.
2629
2630 The orientation describes the clockwise angle of a touchpoint's major
2631 axis to the positive surface y-axis and is normalized to the -180 to
2632 +180 degree range. The granularity of orientation depends on the touch
2633 device, some devices only support binary rotation values between 0 and
2634 90 degrees.
2635
2636 This event is only sent by the compositor if the touch device supports
2637 orientation reports.
2638 </description>
2639 <arg name="id" type="int" summary="the unique ID of this touch point"/>
2640 <arg name="orientation" type="fixed" summary="angle between major axis and positive surface y-axis in degrees"/>
2641 </event>
2642 </interface>
2643
2644 <interface name="wl_output" version="4">
2645 <description summary="compositor output region">
2646 An output describes part of the compositor geometry. The
2647 compositor works in the 'compositor coordinate system' and an
2648 output corresponds to a rectangular area in that space that is
2649 actually visible. This typically corresponds to a monitor that
2650 displays part of the compositor space. This object is published
2651 as global during start up, or when a monitor is hotplugged.
2652 </description>
2653
2654 <enum name="subpixel">
2655 <description summary="subpixel geometry information">
2656 This enumeration describes how the physical
2657 pixels on an output are laid out.
2658 </description>
2659 <entry name="unknown" value="0" summary="unknown geometry"/>
2660 <entry name="none" value="1" summary="no geometry"/>
2661 <entry name="horizontal_rgb" value="2" summary="horizontal RGB"/>
2662 <entry name="horizontal_bgr" value="3" summary="horizontal BGR"/>
2663 <entry name="vertical_rgb" value="4" summary="vertical RGB"/>
2664 <entry name="vertical_bgr" value="5" summary="vertical BGR"/>
2665 </enum>
2666
2667 <enum name="transform">
2668 <description summary="transform from framebuffer to output">
2669 This describes the transform that a compositor will apply to a
2670 surface to compensate for the rotation or mirroring of an
2671 output device.
2672
2673 The flipped values correspond to an initial flip around a
2674 vertical axis followed by rotation.
2675
2676 The purpose is mainly to allow clients to render accordingly and
2677 tell the compositor, so that for fullscreen surfaces, the
2678 compositor will still be able to scan out directly from client
2679 surfaces.
2680 </description>
2681 <entry name="normal" value="0" summary="no transform"/>
2682 <entry name="90" value="1" summary="90 degrees counter-clockwise"/>
2683 <entry name="180" value="2" summary="180 degrees counter-clockwise"/>
2684 <entry name="270" value="3" summary="270 degrees counter-clockwise"/>
2685 <entry name="flipped" value="4" summary="180 degree flip around a vertical axis"/>
2686 <entry name="flipped_90" value="5" summary="flip and rotate 90 degrees counter-clockwise"/>
2687 <entry name="flipped_180" value="6" summary="flip and rotate 180 degrees counter-clockwise"/>
2688 <entry name="flipped_270" value="7" summary="flip and rotate 270 degrees counter-clockwise"/>
2689 </enum>
2690
2691 <event name="geometry">
2692 <description summary="properties of the output">
2693 The geometry event describes geometric properties of the output.
2694 The event is sent when binding to the output object and whenever
2695 any of the properties change.
2696
2697 The physical size can be set to zero if it doesn't make sense for this
2698 output (e.g. for projectors or virtual outputs).
2699
2700 The geometry event will be followed by a done event (starting from
2701 version 2).
2702
2703 Note: wl_output only advertises partial information about the output
2704 position and identification. Some compositors, for instance those not
2705 implementing a desktop-style output layout or those exposing virtual
2706 outputs, might fake this information. Instead of using x and y, clients
2707 should use xdg_output.logical_position. Instead of using make and model,
2708 clients should use name and description.
2709 </description>
2710 <arg name="x" type="int"
2711 summary="x position within the global compositor space"/>
2712 <arg name="y" type="int"
2713 summary="y position within the global compositor space"/>
2714 <arg name="physical_width" type="int"
2715 summary="width in millimeters of the output"/>
2716 <arg name="physical_height" type="int"
2717 summary="height in millimeters of the output"/>
2718 <arg name="subpixel" type="int" enum="subpixel"
2719 summary="subpixel orientation of the output"/>
2720 <arg name="make" type="string"
2721 summary="textual description of the manufacturer"/>
2722 <arg name="model" type="string"
2723 summary="textual description of the model"/>
2724 <arg name="transform" type="int" enum="transform"
2725 summary="transform that maps framebuffer to output"/>
2726 </event>
2727
2728 <enum name="mode" bitfield="true">
2729 <description summary="mode information">
2730 These flags describe properties of an output mode.
2731 They are used in the flags bitfield of the mode event.
2732 </description>
2733 <entry name="current" value="0x1"
2734 summary="indicates this is the current mode"/>
2735 <entry name="preferred" value="0x2"
2736 summary="indicates this is the preferred mode"/>
2737 </enum>
2738
2739 <event name="mode">
2740 <description summary="advertise available modes for the output">
2741 The mode event describes an available mode for the output.
2742
2743 The event is sent when binding to the output object and there
2744 will always be one mode, the current mode. The event is sent
2745 again if an output changes mode, for the mode that is now
2746 current. In other words, the current mode is always the last
2747 mode that was received with the current flag set.
2748
2749 Non-current modes are deprecated. A compositor can decide to only
2750 advertise the current mode and never send other modes. Clients
2751 should not rely on non-current modes.
2752
2753 The size of a mode is given in physical hardware units of
2754 the output device. This is not necessarily the same as
2755 the output size in the global compositor space. For instance,
2756 the output may be scaled, as described in wl_output.scale,
2757 or transformed, as described in wl_output.transform. Clients
2758 willing to retrieve the output size in the global compositor
2759 space should use xdg_output.logical_size instead.
2760
2761 The vertical refresh rate can be set to zero if it doesn't make
2762 sense for this output (e.g. for virtual outputs).
2763
2764 The mode event will be followed by a done event (starting from
2765 version 2).
2766
2767 Clients should not use the refresh rate to schedule frames. Instead,
2768 they should use the wl_surface.frame event or the presentation-time
2769 protocol.
2770
2771 Note: this information is not always meaningful for all outputs. Some
2772 compositors, such as those exposing virtual outputs, might fake the
2773 refresh rate or the size.
2774 </description>
2775 <arg name="flags" type="uint" enum="mode" summary="bitfield of mode flags"/>
2776 <arg name="width" type="int" summary="width of the mode in hardware units"/>
2777 <arg name="height" type="int" summary="height of the mode in hardware units"/>
2778 <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
2779 </event>
2780
2781 <!-- Version 2 additions -->
2782
2783 <event name="done" since="2">
2784 <description summary="sent all information about output">
2785 This event is sent after all other properties have been
2786 sent after binding to the output object and after any
2787 other property changes done after that. This allows
2788 changes to the output properties to be seen as
2789 atomic, even if they happen via multiple events.
2790 </description>
2791 </event>
2792
2793 <event name="scale" since="2">
2794 <description summary="output scaling properties">
2795 This event contains scaling geometry information
2796 that is not in the geometry event. It may be sent after
2797 binding the output object or if the output scale changes
2798 later. If it is not sent, the client should assume a
2799 scale of 1.
2800
2801 A scale larger than 1 means that the compositor will
2802 automatically scale surface buffers by this amount
2803 when rendering. This is used for very high resolution
2804 displays where applications rendering at the native
2805 resolution would be too small to be legible.
2806
2807 It is intended that scaling aware clients track the
2808 current output of a surface, and if it is on a scaled
2809 output it should use wl_surface.set_buffer_scale with
2810 the scale of the output. That way the compositor can
2811 avoid scaling the surface, and the client can supply
2812 a higher detail image.
2813
2814 The scale event will be followed by a done event.
2815 </description>
2816 <arg name="factor" type="int" summary="scaling factor of output"/>
2817 </event>
2818
2819 <!-- Version 3 additions -->
2820
2821 <request name="release" type="destructor" since="3">
2822 <description summary="release the output object">
2823 Using this request a client can tell the server that it is not going to
2824 use the output object anymore.
2825 </description>
2826 </request>
2827
2828 <!-- Version 4 additions -->
2829
2830 <event name="name" since="4">
2831 <description summary="name of this output">
2832 Many compositors will assign user-friendly names to their outputs, show
2833 them to the user, allow the user to refer to an output, etc. The client
2834 may wish to know this name as well to offer the user similar behaviors.
2835
2836 The name is a UTF-8 string with no convention defined for its contents.
2837 Each name is unique among all wl_output globals. The name is only
2838 guaranteed to be unique for the compositor instance.
2839
2840 The same output name is used for all clients for a given wl_output
2841 global. Thus, the name can be shared across processes to refer to a
2842 specific wl_output global.
2843
2844 The name is not guaranteed to be persistent across sessions, thus cannot
2845 be used to reliably identify an output in e.g. configuration files.
2846
2847 Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
2848 not assume that the name is a reflection of an underlying DRM connector,
2849 X11 connection, etc.
2850
2851 The name event is sent after binding the output object. This event is
2852 only sent once per output object, and the name does not change over the
2853 lifetime of the wl_output global.
2854
2855 Compositors may re-use the same output name if the wl_output global is
2856 destroyed and re-created later. Compositors should avoid re-using the
2857 same name if possible.
2858
2859 The name event will be followed by a done event.
2860 </description>
2861 <arg name="name" type="string" summary="output name"/>
2862 </event>
2863
2864 <event name="description" since="4">
2865 <description summary="human-readable description of this output">
2866 Many compositors can produce human-readable descriptions of their
2867 outputs. The client may wish to know this description as well, e.g. for
2868 output selection purposes.
2869
2870 The description is a UTF-8 string with no convention defined for its
2871 contents. The description is not guaranteed to be unique among all
2872 wl_output globals. Examples might include 'Foocorp 11" Display' or
2873 'Virtual X11 output via :1'.
2874
2875 The description event is sent after binding the output object and
2876 whenever the description changes. The description is optional, and may
2877 not be sent at all.
2878
2879 The description event will be followed by a done event.
2880 </description>
2881 <arg name="description" type="string" summary="output description"/>
2882 </event>
2883 </interface>
2884
2885 <interface name="wl_region" version="1">
2886 <description summary="region interface">
2887 A region object describes an area.
2888
2889 Region objects are used to describe the opaque and input
2890 regions of a surface.
2891 </description>
2892
2893 <request name="destroy" type="destructor">
2894 <description summary="destroy region">
2895 Destroy the region. This will invalidate the object ID.
2896 </description>
2897 </request>
2898
2899 <request name="add">
2900 <description summary="add rectangle to region">
2901 Add the specified rectangle to the region.
2902 </description>
2903 <arg name="x" type="int" summary="region-local x coordinate"/>
2904 <arg name="y" type="int" summary="region-local y coordinate"/>
2905 <arg name="width" type="int" summary="rectangle width"/>
2906 <arg name="height" type="int" summary="rectangle height"/>
2907 </request>
2908
2909 <request name="subtract">
2910 <description summary="subtract rectangle from region">
2911 Subtract the specified rectangle from the region.
2912 </description>
2913 <arg name="x" type="int" summary="region-local x coordinate"/>
2914 <arg name="y" type="int" summary="region-local y coordinate"/>
2915 <arg name="width" type="int" summary="rectangle width"/>
2916 <arg name="height" type="int" summary="rectangle height"/>
2917 </request>
2918 </interface>
2919
2920 <interface name="wl_subcompositor" version="1">
2921 <description summary="sub-surface compositing">
2922 The global interface exposing sub-surface compositing capabilities.
2923 A wl_surface, that has sub-surfaces associated, is called the
2924 parent surface. Sub-surfaces can be arbitrarily nested and create
2925 a tree of sub-surfaces.
2926
2927 The root surface in a tree of sub-surfaces is the main
2928 surface. The main surface cannot be a sub-surface, because
2929 sub-surfaces must always have a parent.
2930
2931 A main surface with its sub-surfaces forms a (compound) window.
2932 For window management purposes, this set of wl_surface objects is
2933 to be considered as a single window, and it should also behave as
2934 such.
2935
2936 The aim of sub-surfaces is to offload some of the compositing work
2937 within a window from clients to the compositor. A prime example is
2938 a video player with decorations and video in separate wl_surface
2939 objects. This should allow the compositor to pass YUV video buffer
2940 processing to dedicated overlay hardware when possible.
2941 </description>
2942
2943 <request name="destroy" type="destructor">
2944 <description summary="unbind from the subcompositor interface">
2945 Informs the server that the client will not be using this
2946 protocol object anymore. This does not affect any other
2947 objects, wl_subsurface objects included.
2948 </description>
2949 </request>
2950
2951 <enum name="error">
2952 <entry name="bad_surface" value="0"
2953 summary="the to-be sub-surface is invalid"/>
2954 <entry name="bad_parent" value="1"
2955 summary="the to-be sub-surface parent is invalid"/>
2956 </enum>
2957
2958 <request name="get_subsurface">
2959 <description summary="give a surface the role sub-surface">
2960 Create a sub-surface interface for the given surface, and
2961 associate it with the given parent surface. This turns a
2962 plain wl_surface into a sub-surface.
2963
2964 The to-be sub-surface must not already have another role, and it
2965 must not have an existing wl_subsurface object. Otherwise the
2966 bad_surface protocol error is raised.
2967
2968 Adding sub-surfaces to a parent is a double-buffered operation on the
2969 parent (see wl_surface.commit). The effect of adding a sub-surface
2970 becomes visible on the next time the state of the parent surface is
2971 applied.
2972
2973 The parent surface must not be one of the child surface's descendants,
2974 and the parent must be different from the child surface, otherwise the
2975 bad_parent protocol error is raised.
2976
2977 This request modifies the behaviour of wl_surface.commit request on
2978 the sub-surface, see the documentation on wl_subsurface interface.
2979 </description>
2980 <arg name="id" type="new_id" interface="wl_subsurface"
2981 summary="the new sub-surface object ID"/>
2982 <arg name="surface" type="object" interface="wl_surface"
2983 summary="the surface to be turned into a sub-surface"/>
2984 <arg name="parent" type="object" interface="wl_surface"
2985 summary="the parent surface"/>
2986 </request>
2987 </interface>
2988
2989 <interface name="wl_subsurface" version="1">
2990 <description summary="sub-surface interface to a wl_surface">
2991 An additional interface to a wl_surface object, which has been
2992 made a sub-surface. A sub-surface has one parent surface. A
2993 sub-surface's size and position are not limited to that of the parent.
2994 Particularly, a sub-surface is not automatically clipped to its
2995 parent's area.
2996
2997 A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
2998 and the parent surface is mapped. The order of which one happens
2999 first is irrelevant. A sub-surface is hidden if the parent becomes
3000 hidden, or if a NULL wl_buffer is applied. These rules apply
3001 recursively through the tree of surfaces.
3002
3003 The behaviour of a wl_surface.commit request on a sub-surface
3004 depends on the sub-surface's mode. The possible modes are
3005 synchronized and desynchronized, see methods
3006 wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
3007 mode caches the wl_surface state to be applied when the parent's
3008 state gets applied, and desynchronized mode applies the pending
3009 wl_surface state directly. A sub-surface is initially in the
3010 synchronized mode.
3011
3012 Sub-surfaces also have another kind of state, which is managed by
3013 wl_subsurface requests, as opposed to wl_surface requests. This
3014 state includes the sub-surface position relative to the parent
3015 surface (wl_subsurface.set_position), and the stacking order of
3016 the parent and its sub-surfaces (wl_subsurface.place_above and
3017 .place_below). This state is applied when the parent surface's
3018 wl_surface state is applied, regardless of the sub-surface's mode.
3019 As the exception, set_sync and set_desync are effective immediately.
3020
3021 The main surface can be thought to be always in desynchronized mode,
3022 since it does not have a parent in the sub-surfaces sense.
3023
3024 Even if a sub-surface is in desynchronized mode, it will behave as
3025 in synchronized mode, if its parent surface behaves as in
3026 synchronized mode. This rule is applied recursively throughout the
3027 tree of surfaces. This means, that one can set a sub-surface into
3028 synchronized mode, and then assume that all its child and grand-child
3029 sub-surfaces are synchronized, too, without explicitly setting them.
3030
3031 Destroying a sub-surface takes effect immediately. If you need to
3032 synchronize the removal of a sub-surface to the parent surface update,
3033 unmap the sub-surface first by attaching a NULL wl_buffer, update parent,
3034 and then destroy the sub-surface.
3035
3036 If the parent wl_surface object is destroyed, the sub-surface is
3037 unmapped.
3038 </description>
3039
3040 <request name="destroy" type="destructor">
3041 <description summary="remove sub-surface interface">
3042 The sub-surface interface is removed from the wl_surface object
3043 that was turned into a sub-surface with a
3044 wl_subcompositor.get_subsurface request. The wl_surface's association
3045 to the parent is deleted. The wl_surface is unmapped immediately.
3046 </description>
3047 </request>
3048
3049 <enum name="error">
3050 <entry name="bad_surface" value="0"
3051 summary="wl_surface is not a sibling or the parent"/>
3052 </enum>
3053
3054 <request name="set_position">
3055 <description summary="reposition the sub-surface">
3056 This schedules a sub-surface position change.
3057 The sub-surface will be moved so that its origin (top left
3058 corner pixel) will be at the location x, y of the parent surface
3059 coordinate system. The coordinates are not restricted to the parent
3060 surface area. Negative values are allowed.
3061
3062 The scheduled coordinates will take effect whenever the state of the
3063 parent surface is applied. When this happens depends on whether the
3064 parent surface is in synchronized mode or not. See
3065 wl_subsurface.set_sync and wl_subsurface.set_desync for details.
3066
3067 If more than one set_position request is invoked by the client before
3068 the commit of the parent surface, the position of a new request always
3069 replaces the scheduled position from any previous request.
3070
3071 The initial position is 0, 0.
3072 </description>
3073 <arg name="x" type="int" summary="x coordinate in the parent surface"/>
3074 <arg name="y" type="int" summary="y coordinate in the parent surface"/>
3075 </request>
3076
3077 <request name="place_above">
3078 <description summary="restack the sub-surface">
3079 This sub-surface is taken from the stack, and put back just
3080 above the reference surface, changing the z-order of the sub-surfaces.
3081 The reference surface must be one of the sibling surfaces, or the
3082 parent surface. Using any other surface, including this sub-surface,
3083 will cause a protocol error.
3084
3085 The z-order is double-buffered. Requests are handled in order and
3086 applied immediately to a pending state. The final pending state is
3087 copied to the active state the next time the state of the parent
3088 surface is applied. When this happens depends on whether the parent
3089 surface is in synchronized mode or not. See wl_subsurface.set_sync and
3090 wl_subsurface.set_desync for details.
3091
3092 A new sub-surface is initially added as the top-most in the stack
3093 of its siblings and parent.
3094 </description>
3095 <arg name="sibling" type="object" interface="wl_surface"
3096 summary="the reference surface"/>
3097 </request>
3098
3099 <request name="place_below">
3100 <description summary="restack the sub-surface">
3101 The sub-surface is placed just below the reference surface.
3102 See wl_subsurface.place_above.
3103 </description>
3104 <arg name="sibling" type="object" interface="wl_surface"
3105 summary="the reference surface"/>
3106 </request>
3107
3108 <request name="set_sync">
3109 <description summary="set sub-surface to synchronized mode">
3110 Change the commit behaviour of the sub-surface to synchronized
3111 mode, also described as the parent dependent mode.
3112
3113 In synchronized mode, wl_surface.commit on a sub-surface will
3114 accumulate the committed state in a cache, but the state will
3115 not be applied and hence will not change the compositor output.
3116 The cached state is applied to the sub-surface immediately after
3117 the parent surface's state is applied. This ensures atomic
3118 updates of the parent and all its synchronized sub-surfaces.
3119 Applying the cached state will invalidate the cache, so further
3120 parent surface commits do not (re-)apply old state.
3121
3122 See wl_subsurface for the recursive effect of this mode.
3123 </description>
3124 </request>
3125
3126 <request name="set_desync">
3127 <description summary="set sub-surface to desynchronized mode">
3128 Change the commit behaviour of the sub-surface to desynchronized
3129 mode, also described as independent or freely running mode.
3130
3131 In desynchronized mode, wl_surface.commit on a sub-surface will
3132 apply the pending state directly, without caching, as happens
3133 normally with a wl_surface. Calling wl_surface.commit on the
3134 parent surface has no effect on the sub-surface's wl_surface
3135 state. This mode allows a sub-surface to be updated on its own.
3136
3137 If cached state exists when wl_surface.commit is called in
3138 desynchronized mode, the pending state is added to the cached
3139 state, and applied as a whole. This invalidates the cache.
3140
3141 Note: even if a sub-surface is set to desynchronized, a parent
3142 sub-surface may override it to behave as synchronized. For details,
3143 see wl_subsurface.
3144
3145 If a surface's parent surface behaves as desynchronized, then
3146 the cached state is applied on set_desync.
3147 </description>
3148 </request>
3149 </interface>
3150
3151</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-activation-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-activation-v1.xml
new file mode 100644
index 0000000..d87e633
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-activation-v1.xml
@@ -0,0 +1,186 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_activation_v1">
3
4 <copyright>
5 Copyright © 2020 Aleix Pol Gonzalez &lt;aleixpol@kde.org&gt;
6 Copyright © 2020 Carlos Garnacho &lt;carlosg@gnome.org&gt;
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 </copyright>
27
28 <description summary="Protocol for requesting activation of surfaces">
29 The way for a client to pass focus to another toplevel is as follows.
30
31 The client that intends to activate another toplevel uses the
32 xdg_activation_v1.get_activation_token request to get an activation token.
33 This token is then passed to the client to be activated through a separate
34 band of communication. The client to be activated will then pass the token
35 it received to the xdg_activation_v1.activate request. The compositor can
36 then use this token to decide how to react to the activation request.
37
38 The token the activating client gets may be ineffective either already at
39 the time it receives it, for example if it was not focused, for focus
40 stealing prevention. The activating client will have no way to discover
41 the validity of the token, and may still forward it to the to be activated
42 client.
43
44 The created activation token may optionally get information attached to it
45 that can be used by the compositor to identify the application that we
46 intend to activate. This can for example be used to display a visual hint
47 about what application is being started.
48
49 Warning! The protocol described in this file is currently in the testing
50 phase. Backward compatible changes may be added together with the
51 corresponding interface version bump. Backward incompatible changes can
52 only be done by creating a new major version of the extension.
53 </description>
54
55 <interface name="xdg_activation_v1" version="1">
56 <description summary="interface for activating surfaces">
57 A global interface used for informing the compositor about applications
58 being activated or started, or for applications to request to be
59 activated.
60 </description>
61
62 <request name="destroy" type="destructor">
63 <description summary="destroy the xdg_activation object">
64 Notify the compositor that the xdg_activation object will no longer be
65 used.
66
67 The child objects created via this interface are unaffected and should
68 be destroyed separately.
69 </description>
70 </request>
71
72 <request name="get_activation_token">
73 <description summary="requests a token">
74 Creates an xdg_activation_token_v1 object that will provide
75 the initiating client with a unique token for this activation. This
76 token should be offered to the clients to be activated.
77 </description>
78
79 <arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
80 </request>
81
82 <request name="activate">
83 <description summary="notify new interaction being available">
84 Requests surface activation. It's up to the compositor to display
85 this information as desired, for example by placing the surface above
86 the rest.
87
88 The compositor may know who requested this by checking the activation
89 token and might decide not to follow through with the activation if it's
90 considered unwanted.
91
92 Compositors can ignore unknown presentation tokens when an invalid
93 token is passed.
94 </description>
95 <arg name="token" type="string" summary="the activation token of the initiating client"/>
96 <arg name="surface" type="object" interface="wl_surface"
97 summary="the wl_surface to activate"/>
98 </request>
99 </interface>
100
101 <interface name="xdg_activation_token_v1" version="1">
102 <description summary="an exported activation handle">
103 An object for setting up a token and receiving a token handle that can
104 be passed as an activation token to another client.
105
106 The object is created using the xdg_activation_v1.get_activation_token
107 request. This object should then be populated with the app_id, surface
108 and serial information and committed. The compositor shall then issue a
109 done event with the token. In case the request's parameters are invalid,
110 the compositor will provide an invalid token.
111 </description>
112
113 <enum name="error">
114 <entry name="already_used" value="0"
115 summary="The token has already been used previously"/>
116 </enum>
117
118 <request name="set_serial">
119 <description summary="specifies the seat and serial of the activating event">
120 Provides information about the seat and serial event that requested the
121 token.
122
123 Must be sent before commit. This information is optional.
124 </description>
125 <arg name="serial" type="uint"
126 summary="the serial of the event that triggered the activation"/>
127 <arg name="seat" type="object" interface="wl_seat"
128 summary="the wl_seat of the event"/>
129 </request>
130
131 <request name="set_app_id">
132 <description summary="specifies the application being activated">
133 The requesting client can specify an app_id to associate the token
134 being created with it.
135
136 Must be sent before commit. This information is optional.
137 </description>
138 <arg name="app_id" type="string"
139 summary="the application id of the client being activated."/>
140 </request>
141
142 <request name="set_surface">
143 <description summary="specifies the application being activated">
144 The requesting client can specify a surface to associate the token
145 being created with it.
146
147 Must be triggered before commit. This information is optional.
148 </description>
149 <arg name="surface" type="object" interface="wl_surface"
150 summary="the requesting surface"/>
151 </request>
152
153 <request name="commit">
154 <description summary="issues the token request">
155 Requests an activation token based on the different parameters that
156 have been offered through set_serial, set_surface and set_app_id.
157 </description>
158 </request>
159
160 <event name="done">
161 <description summary="the exported activation token">
162 The 'done' event contains the unique token of this activation request
163 and notifies that the provider is done.
164
165 Applications will typically receive the token through the
166 XDG_ACTIVATION_TOKEN environment variable as set by its launcher, and
167 should unset the environment variable right after this request, in
168 order to avoid propagating it to child processes.
169
170 Applications implementing the D-Bus interface org.freedesktop.Application
171 should get their token under XDG_ACTIVATION_TOKEN on their platform_data.
172
173 Presentation tokens may be transferred across clients through means not
174 described in this protocol.
175 </description>
176 <arg name="token" type="string" summary="the exported activation token"/>
177 </event>
178
179 <request name="destroy" type="destructor">
180 <description summary="destroy the xdg_activation_token_v1 object">
181 Notify the compositor that the xdg_activation_token_v1 object will no
182 longer be used.
183 </description>
184 </request>
185 </interface>
186</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-decoration-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-decoration-unstable-v1.xml
new file mode 100644
index 0000000..378e8ff
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-decoration-unstable-v1.xml
@@ -0,0 +1,156 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_decoration_unstable_v1">
3 <copyright>
4 Copyright © 2018 Simon Ser
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <interface name="zxdg_decoration_manager_v1" version="1">
27 <description summary="window decoration manager">
28 This interface allows a compositor to announce support for server-side
29 decorations.
30
31 A window decoration is a set of window controls as deemed appropriate by
32 the party managing them, such as user interface components used to move,
33 resize and change a window's state.
34
35 A client can use this protocol to request being decorated by a supporting
36 compositor.
37
38 If compositor and client do not negotiate the use of a server-side
39 decoration using this protocol, clients continue to self-decorate as they
40 see fit.
41
42 Warning! The protocol described in this file is experimental and
43 backward incompatible changes may be made. Backward compatible changes
44 may be added together with the corresponding interface version bump.
45 Backward incompatible changes are done by bumping the version number in
46 the protocol and interface names and resetting the interface version.
47 Once the protocol is to be declared stable, the 'z' prefix and the
48 version number in the protocol and interface names are removed and the
49 interface version number is reset.
50 </description>
51
52 <request name="destroy" type="destructor">
53 <description summary="destroy the decoration manager object">
54 Destroy the decoration manager. This doesn't destroy objects created
55 with the manager.
56 </description>
57 </request>
58
59 <request name="get_toplevel_decoration">
60 <description summary="create a new toplevel decoration object">
61 Create a new decoration object associated with the given toplevel.
62
63 Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
64 buffer attached or committed is a client error, and any attempts by a
65 client to attach or manipulate a buffer prior to the first
66 xdg_toplevel_decoration.configure event must also be treated as
67 errors.
68 </description>
69 <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
70 <arg name="toplevel" type="object" interface="xdg_toplevel"/>
71 </request>
72 </interface>
73
74 <interface name="zxdg_toplevel_decoration_v1" version="1">
75 <description summary="decoration object for a toplevel surface">
76 The decoration object allows the compositor to toggle server-side window
77 decorations for a toplevel surface. The client can request to switch to
78 another mode.
79
80 The xdg_toplevel_decoration object must be destroyed before its
81 xdg_toplevel.
82 </description>
83
84 <enum name="error">
85 <entry name="unconfigured_buffer" value="0"
86 summary="xdg_toplevel has a buffer attached before configure"/>
87 <entry name="already_constructed" value="1"
88 summary="xdg_toplevel already has a decoration object"/>
89 <entry name="orphaned" value="2"
90 summary="xdg_toplevel destroyed before the decoration object"/>
91 </enum>
92
93 <request name="destroy" type="destructor">
94 <description summary="destroy the decoration object">
95 Switch back to a mode without any server-side decorations at the next
96 commit.
97 </description>
98 </request>
99
100 <enum name="mode">
101 <description summary="window decoration modes">
102 These values describe window decoration modes.
103 </description>
104 <entry name="client_side" value="1"
105 summary="no server-side window decoration"/>
106 <entry name="server_side" value="2"
107 summary="server-side window decoration"/>
108 </enum>
109
110 <request name="set_mode">
111 <description summary="set the decoration mode">
112 Set the toplevel surface decoration mode. This informs the compositor
113 that the client prefers the provided decoration mode.
114
115 After requesting a decoration mode, the compositor will respond by
116 emitting a xdg_surface.configure event. The client should then update
117 its content, drawing it without decorations if the received mode is
118 server-side decorations. The client must also acknowledge the configure
119 when committing the new content (see xdg_surface.ack_configure).
120
121 The compositor can decide not to use the client's mode and enforce a
122 different mode instead.
123
124 Clients whose decoration mode depend on the xdg_toplevel state may send
125 a set_mode request in response to a xdg_surface.configure event and wait
126 for the next xdg_surface.configure event to prevent unwanted state.
127 Such clients are responsible for preventing configure loops and must
128 make sure not to send multiple successive set_mode requests with the
129 same decoration mode.
130 </description>
131 <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
132 </request>
133
134 <request name="unset_mode">
135 <description summary="unset the decoration mode">
136 Unset the toplevel surface decoration mode. This informs the compositor
137 that the client doesn't prefer a particular decoration mode.
138
139 This request has the same semantics as set_mode.
140 </description>
141 </request>
142
143 <event name="configure">
144 <description summary="suggest a surface change">
145 The configure event asks the client to change its decoration mode. The
146 configured state should not be applied immediately. Clients must send an
147 ack_configure in response to this event. See xdg_surface.configure and
148 xdg_surface.ack_configure for details.
149
150 A configure event can be sent at any time. The specified mode must be
151 obeyed by the client.
152 </description>
153 <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
154 </event>
155 </interface>
156</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-dialog-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-dialog-v1.xml
new file mode 100644
index 0000000..fb3fc14
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-dialog-v1.xml
@@ -0,0 +1,110 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_dialog_v1">
3 <copyright>
4 Copyright © 2023 Carlos Garnacho
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <interface name="xdg_wm_dialog_v1" version="1">
27 <description summary="create dialogs related to other toplevels">
28 The xdg_wm_dialog_v1 interface is exposed as a global object allowing
29 to register surfaces with a xdg_toplevel role as "dialogs" relative to
30 another toplevel.
31
32 The compositor may let this relation influence how the surface is
33 placed, displayed or interacted with.
34
35 Warning! The protocol described in this file is currently in the testing
36 phase. Backward compatible changes may be added together with the
37 corresponding interface version bump. Backward incompatible changes can
38 only be done by creating a new major version of the extension.
39 </description>
40
41 <enum name="error">
42 <entry name="already_used" value="0"
43 summary="the xdg_toplevel object has already been used to create a xdg_dialog_v1"/>
44 </enum>
45
46 <request name="destroy" type="destructor">
47 <description summary="destroy the dialog manager object">
48 Destroys the xdg_wm_dialog_v1 object. This does not affect
49 the xdg_dialog_v1 objects generated through it.
50 </description>
51 </request>
52
53 <request name="get_xdg_dialog">
54 <description summary="create a dialog object">
55 Creates a xdg_dialog_v1 object for the given toplevel. See the interface
56 description for more details.
57
58 Compositors must raise an already_used error if clients attempt to
59 create multiple xdg_dialog_v1 objects for the same xdg_toplevel.
60 </description>
61 <arg name="id" type="new_id" interface="xdg_dialog_v1"/>
62 <arg name="toplevel" type="object" interface="xdg_toplevel"/>
63 </request>
64 </interface>
65
66 <interface name="xdg_dialog_v1" version="1">
67 <description summary="dialog object">
68 A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its
69 purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a
70 temporary window) relative to another toplevel (see
71 xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1
72 becomes inert.
73
74 Through this object, the client may provide additional hints about
75 the purpose of the secondary toplevel. This interface has no effect
76 on toplevels that are not attached to a parent toplevel.
77 </description>
78
79 <request name="destroy" type="destructor">
80 <description summary="destroy the dialog object">
81 Destroys the xdg_dialog_v1 object. If this object is destroyed
82 before the related xdg_toplevel, the compositor should unapply its
83 effects.
84 </description>
85 </request>
86
87 <request name="set_modal">
88 <description summary="mark dialog as modal">
89 Hints that the dialog has "modal" behavior. Modal dialogs typically
90 require to be fully addressed by the user (i.e. closed) before resuming
91 interaction with the parent toplevel, and may require a distinct
92 presentation.
93
94 Clients must implement the logic to filter events in the parent
95 toplevel on their own.
96
97 Compositors may choose any policy in event delivery to the parent
98 toplevel, from delivering all events unfiltered to using them for
99 internal consumption.
100 </description>
101 </request>
102
103 <request name="unset_modal">
104 <description summary="mark dialog as not modal">
105 Drops the hint that this dialog has "modal" behavior. See
106 xdg_dialog_v1.set_modal for more details.
107 </description>
108 </request>
109 </interface>
110</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-foreign-unstable-v2.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-foreign-unstable-v2.xml
new file mode 100644
index 0000000..cc3271d
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-foreign-unstable-v2.xml
@@ -0,0 +1,200 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_foreign_unstable_v2">
3
4 <copyright>
5 Copyright © 2015-2016 Red Hat Inc.
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 <description summary="Protocol for exporting xdg surface handles">
28 This protocol specifies a way for making it possible to reference a surface
29 of a different client. With such a reference, a client can, by using the
30 interfaces provided by this protocol, manipulate the relationship between
31 its own surfaces and the surface of some other client. For example, stack
32 some of its own surface above the other clients surface.
33
34 In order for a client A to get a reference of a surface of client B, client
35 B must first export its surface using xdg_exporter.export_toplevel. Upon
36 doing this, client B will receive a handle (a unique string) that it may
37 share with client A in some way (for example D-Bus). After client A has
38 received the handle from client B, it may use xdg_importer.import_toplevel
39 to create a reference to the surface client B just exported. See the
40 corresponding requests for details.
41
42 A possible use case for this is out-of-process dialogs. For example when a
43 sandboxed client without file system access needs the user to select a file
44 on the file system, given sandbox environment support, it can export its
45 surface, passing the exported surface handle to an unsandboxed process that
46 can show a file browser dialog and stack it above the sandboxed client's
47 surface.
48
49 Warning! The protocol described in this file is experimental and backward
50 incompatible changes may be made. Backward compatible changes may be added
51 together with the corresponding interface version bump. Backward
52 incompatible changes are done by bumping the version number in the protocol
53 and interface names and resetting the interface version. Once the protocol
54 is to be declared stable, the 'z' prefix and the version number in the
55 protocol and interface names are removed and the interface version number is
56 reset.
57 </description>
58
59 <interface name="zxdg_exporter_v2" version="1">
60 <description summary="interface for exporting surfaces">
61 A global interface used for exporting surfaces that can later be imported
62 using xdg_importer.
63 </description>
64
65 <request name="destroy" type="destructor">
66 <description summary="destroy the xdg_exporter object">
67 Notify the compositor that the xdg_exporter object will no longer be
68 used.
69 </description>
70 </request>
71
72 <enum name="error">
73 <description summary="error values">
74 These errors can be emitted in response to invalid xdg_exporter
75 requests.
76 </description>
77 <entry name="invalid_surface" value="0" summary="surface is not an xdg_toplevel"/>
78 </enum>
79
80 <request name="export_toplevel">
81 <description summary="export a toplevel surface">
82 The export_toplevel request exports the passed surface so that it can later be
83 imported via xdg_importer. When called, a new xdg_exported object will
84 be created and xdg_exported.handle will be sent immediately. See the
85 corresponding interface and event for details.
86
87 A surface may be exported multiple times, and each exported handle may
88 be used to create an xdg_imported multiple times. Only xdg_toplevel
89 equivalent surfaces may be exported, otherwise an invalid_surface
90 protocol error is sent.
91 </description>
92 <arg name="id" type="new_id" interface="zxdg_exported_v2"
93 summary="the new xdg_exported object"/>
94 <arg name="surface" type="object" interface="wl_surface"
95 summary="the surface to export"/>
96 </request>
97 </interface>
98
99 <interface name="zxdg_importer_v2" version="1">
100 <description summary="interface for importing surfaces">
101 A global interface used for importing surfaces exported by xdg_exporter.
102 With this interface, a client can create a reference to a surface of
103 another client.
104 </description>
105
106 <request name="destroy" type="destructor">
107 <description summary="destroy the xdg_importer object">
108 Notify the compositor that the xdg_importer object will no longer be
109 used.
110 </description>
111 </request>
112
113 <request name="import_toplevel">
114 <description summary="import a toplevel surface">
115 The import_toplevel request imports a surface from any client given a handle
116 retrieved by exporting said surface using xdg_exporter.export_toplevel.
117 When called, a new xdg_imported object will be created. This new object
118 represents the imported surface, and the importing client can
119 manipulate its relationship using it. See xdg_imported for details.
120 </description>
121 <arg name="id" type="new_id" interface="zxdg_imported_v2"
122 summary="the new xdg_imported object"/>
123 <arg name="handle" type="string"
124 summary="the exported surface handle"/>
125 </request>
126 </interface>
127
128 <interface name="zxdg_exported_v2" version="1">
129 <description summary="an exported surface handle">
130 An xdg_exported object represents an exported reference to a surface. The
131 exported surface may be referenced as long as the xdg_exported object not
132 destroyed. Destroying the xdg_exported invalidates any relationship the
133 importer may have established using xdg_imported.
134 </description>
135
136 <request name="destroy" type="destructor">
137 <description summary="unexport the exported surface">
138 Revoke the previously exported surface. This invalidates any
139 relationship the importer may have set up using the xdg_imported created
140 given the handle sent via xdg_exported.handle.
141 </description>
142 </request>
143
144 <event name="handle">
145 <description summary="the exported surface handle">
146 The handle event contains the unique handle of this exported surface
147 reference. It may be shared with any client, which then can use it to
148 import the surface by calling xdg_importer.import_toplevel. A handle
149 may be used to import the surface multiple times.
150 </description>
151 <arg name="handle" type="string" summary="the exported surface handle"/>
152 </event>
153 </interface>
154
155 <interface name="zxdg_imported_v2" version="1">
156 <description summary="an imported surface handle">
157 An xdg_imported object represents an imported reference to surface exported
158 by some client. A client can use this interface to manipulate
159 relationships between its own surfaces and the imported surface.
160 </description>
161
162 <enum name="error">
163 <description summary="error values">
164 These errors can be emitted in response to invalid xdg_imported
165 requests.
166 </description>
167 <entry name="invalid_surface" value="0" summary="surface is not an xdg_toplevel"/>
168 </enum>
169
170 <request name="destroy" type="destructor">
171 <description summary="destroy the xdg_imported object">
172 Notify the compositor that it will no longer use the xdg_imported
173 object. Any relationship that may have been set up will at this point
174 be invalidated.
175 </description>
176 </request>
177
178 <request name="set_parent_of">
179 <description summary="set as the parent of some surface">
180 Set the imported surface as the parent of some surface of the client.
181 The passed surface must be an xdg_toplevel equivalent, otherwise an
182 invalid_surface protocol error is sent. Calling this function sets up
183 a surface to surface relation with the same stacking and positioning
184 semantics as xdg_toplevel.set_parent.
185 </description>
186 <arg name="surface" type="object" interface="wl_surface"
187 summary="the child surface"/>
188 </request>
189
190 <event name="destroyed">
191 <description summary="the imported surface handle has been destroyed">
192 The imported surface handle has been destroyed and any relationship set
193 up has been invalidated. This may happen for various reasons, for
194 example if the exported surface or the exported surface handle has been
195 destroyed, if the handle used for importing was invalid.
196 </description>
197 </event>
198 </interface>
199
200</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-output-unstable-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-output-unstable-v1.xml
new file mode 100644
index 0000000..9a5b790
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-output-unstable-v1.xml
@@ -0,0 +1,220 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_output_unstable_v1">
3
4 <copyright>
5 Copyright © 2017 Red Hat Inc.
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 <description summary="Protocol to describe output regions">
28 This protocol aims at describing outputs in a way which is more in line
29 with the concept of an output on desktop oriented systems.
30
31 Some information are more specific to the concept of an output for
32 a desktop oriented system and may not make sense in other applications,
33 such as IVI systems for example.
34
35 Typically, the global compositor space on a desktop system is made of
36 a contiguous or overlapping set of rectangular regions.
37
38 Some of the information provided in this protocol might be identical
39 to their counterparts already available from wl_output, in which case
40 the information provided by this protocol should be preferred to their
41 equivalent in wl_output. The goal is to move the desktop specific
42 concepts (such as output location within the global compositor space,
43 the connector name and types, etc.) out of the core wl_output protocol.
44
45 Warning! The protocol described in this file is experimental and
46 backward incompatible changes may be made. Backward compatible
47 changes may be added together with the corresponding interface
48 version bump.
49 Backward incompatible changes are done by bumping the version
50 number in the protocol and interface names and resetting the
51 interface version. Once the protocol is to be declared stable,
52 the 'z' prefix and the version number in the protocol and
53 interface names are removed and the interface version number is
54 reset.
55 </description>
56
57 <interface name="zxdg_output_manager_v1" version="3">
58 <description summary="manage xdg_output objects">
59 A global factory interface for xdg_output objects.
60 </description>
61
62 <request name="destroy" type="destructor">
63 <description summary="destroy the xdg_output_manager object">
64 Using this request a client can tell the server that it is not
65 going to use the xdg_output_manager object anymore.
66
67 Any objects already created through this instance are not affected.
68 </description>
69 </request>
70
71 <request name="get_xdg_output">
72 <description summary="create an xdg output from a wl_output">
73 This creates a new xdg_output object for the given wl_output.
74 </description>
75 <arg name="id" type="new_id" interface="zxdg_output_v1"/>
76 <arg name="output" type="object" interface="wl_output"/>
77 </request>
78 </interface>
79
80 <interface name="zxdg_output_v1" version="3">
81 <description summary="compositor logical output region">
82 An xdg_output describes part of the compositor geometry.
83
84 This typically corresponds to a monitor that displays part of the
85 compositor space.
86
87 For objects version 3 onwards, after all xdg_output properties have been
88 sent (when the object is created and when properties are updated), a
89 wl_output.done event is sent. This allows changes to the output
90 properties to be seen as atomic, even if they happen via multiple events.
91 </description>
92
93 <request name="destroy" type="destructor">
94 <description summary="destroy the xdg_output object">
95 Using this request a client can tell the server that it is not
96 going to use the xdg_output object anymore.
97 </description>
98 </request>
99
100 <event name="logical_position">
101 <description summary="position of the output within the global compositor space">
102 The position event describes the location of the wl_output within
103 the global compositor space.
104
105 The logical_position event is sent after creating an xdg_output
106 (see xdg_output_manager.get_xdg_output) and whenever the location
107 of the output changes within the global compositor space.
108 </description>
109 <arg name="x" type="int"
110 summary="x position within the global compositor space"/>
111 <arg name="y" type="int"
112 summary="y position within the global compositor space"/>
113 </event>
114
115 <event name="logical_size">
116 <description summary="size of the output in the global compositor space">
117 The logical_size event describes the size of the output in the
118 global compositor space.
119
120 For example, a surface without any buffer scale, transformation
121 nor rotation set, with the size matching the logical_size will
122 have the same size as the corresponding output when displayed.
123
124 Most regular Wayland clients should not pay attention to the
125 logical size and would rather rely on xdg_shell interfaces.
126
127 Some clients such as Xwayland, however, need this to configure
128 their surfaces in the global compositor space as the compositor
129 may apply a different scale from what is advertised by the output
130 scaling property (to achieve fractional scaling, for example).
131
132 For example, for a wl_output mode 3840×2160 and a scale factor 2:
133
134 - A compositor not scaling the surface buffers will advertise a
135 logical size of 3840×2160,
136
137 - A compositor automatically scaling the surface buffers will
138 advertise a logical size of 1920×1080,
139
140 - A compositor using a fractional scale of 1.5 will advertise a
141 logical size of 2560×1440.
142
143 For example, for a wl_output mode 1920×1080 and a 90 degree rotation,
144 the compositor will advertise a logical size of 1080x1920.
145
146 The logical_size event is sent after creating an xdg_output
147 (see xdg_output_manager.get_xdg_output) and whenever the logical
148 size of the output changes, either as a result of a change in the
149 applied scale or because of a change in the corresponding output
150 mode(see wl_output.mode) or transform (see wl_output.transform).
151 </description>
152 <arg name="width" type="int"
153 summary="width in global compositor space"/>
154 <arg name="height" type="int"
155 summary="height in global compositor space"/>
156 </event>
157
158 <event name="done">
159 <description summary="all information about the output have been sent">
160 This event is sent after all other properties of an xdg_output
161 have been sent.
162
163 This allows changes to the xdg_output properties to be seen as
164 atomic, even if they happen via multiple events.
165
166 For objects version 3 onwards, this event is deprecated. Compositors
167 are not required to send it anymore and must send wl_output.done
168 instead.
169 </description>
170 </event>
171
172 <!-- Version 2 additions -->
173
174 <event name="name" since="2">
175 <description summary="name of this output">
176 Many compositors will assign names to their outputs, show them to the
177 user, allow them to be configured by name, etc. The client may wish to
178 know this name as well to offer the user similar behaviors.
179
180 The naming convention is compositor defined, but limited to
181 alphanumeric characters and dashes (-). Each name is unique among all
182 wl_output globals, but if a wl_output global is destroyed the same name
183 may be reused later. The names will also remain consistent across
184 sessions with the same hardware and software configuration.
185
186 Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do
187 not assume that the name is a reflection of an underlying DRM
188 connector, X11 connection, etc.
189
190 The name event is sent after creating an xdg_output (see
191 xdg_output_manager.get_xdg_output). This event is only sent once per
192 xdg_output, and the name does not change over the lifetime of the
193 wl_output global.
194 </description>
195 <arg name="name" type="string" summary="output name"/>
196 </event>
197
198 <event name="description" since="2">
199 <description summary="human-readable description of this output">
200 Many compositors can produce human-readable descriptions of their
201 outputs. The client may wish to know this description as well, to
202 communicate the user for various purposes.
203
204 The description is a UTF-8 string with no convention defined for its
205 contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11
206 output via :1'.
207
208 The description event is sent after creating an xdg_output (see
209 xdg_output_manager.get_xdg_output) and whenever the description
210 changes. The description is optional, and may not be sent at all.
211
212 For objects of version 2 and lower, this event is only sent once per
213 xdg_output, and the description does not change over the lifetime of
214 the wl_output global.
215 </description>
216 <arg name="description" type="string" summary="output description"/>
217 </event>
218
219 </interface>
220</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-shell.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-shell.xml
new file mode 100644
index 0000000..777eaa7
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-shell.xml
@@ -0,0 +1,1370 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_shell">
3
4 <copyright>
5 Copyright © 2008-2013 Kristian Høgsberg
6 Copyright © 2013 Rafael Antognolli
7 Copyright © 2013 Jasper St. Pierre
8 Copyright © 2010-2013 Intel Corporation
9 Copyright © 2015-2017 Samsung Electronics Co., Ltd
10 Copyright © 2015-2017 Red Hat Inc.
11
12 Permission is hereby granted, free of charge, to any person obtaining a
13 copy of this software and associated documentation files (the "Software"),
14 to deal in the Software without restriction, including without limitation
15 the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 and/or sell copies of the Software, and to permit persons to whom the
17 Software is furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice (including the next
20 paragraph) shall be included in all copies or substantial portions of the
21 Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 DEALINGS IN THE SOFTWARE.
30 </copyright>
31
32 <interface name="xdg_wm_base" version="6">
33 <description summary="create desktop-style surfaces">
34 The xdg_wm_base interface is exposed as a global object enabling clients
35 to turn their wl_surfaces into windows in a desktop environment. It
36 defines the basic functionality needed for clients and the compositor to
37 create windows that can be dragged, resized, maximized, etc, as well as
38 creating transient windows such as popup menus.
39 </description>
40
41 <enum name="error">
42 <entry name="role" value="0" summary="given wl_surface has another role"/>
43 <entry name="defunct_surfaces" value="1"
44 summary="xdg_wm_base was destroyed before children"/>
45 <entry name="not_the_topmost_popup" value="2"
46 summary="the client tried to map or destroy a non-topmost popup"/>
47 <entry name="invalid_popup_parent" value="3"
48 summary="the client specified an invalid popup parent surface"/>
49 <entry name="invalid_surface_state" value="4"
50 summary="the client provided an invalid surface state"/>
51 <entry name="invalid_positioner" value="5"
52 summary="the client provided an invalid positioner"/>
53 <entry name="unresponsive" value="6"
54 summary="the client didn’t respond to a ping event in time"/>
55 </enum>
56
57 <request name="destroy" type="destructor">
58 <description summary="destroy xdg_wm_base">
59 Destroy this xdg_wm_base object.
60
61 Destroying a bound xdg_wm_base object while there are surfaces
62 still alive created by this xdg_wm_base object instance is illegal
63 and will result in a defunct_surfaces error.
64 </description>
65 </request>
66
67 <request name="create_positioner">
68 <description summary="create a positioner object">
69 Create a positioner object. A positioner object is used to position
70 surfaces relative to some parent surface. See the interface description
71 and xdg_surface.get_popup for details.
72 </description>
73 <arg name="id" type="new_id" interface="xdg_positioner"/>
74 </request>
75
76 <request name="get_xdg_surface">
77 <description summary="create a shell surface from a surface">
78 This creates an xdg_surface for the given surface. While xdg_surface
79 itself is not a role, the corresponding surface may only be assigned
80 a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is
81 illegal to create an xdg_surface for a wl_surface which already has an
82 assigned role and this will result in a role error.
83
84 This creates an xdg_surface for the given surface. An xdg_surface is
85 used as basis to define a role to a given surface, such as xdg_toplevel
86 or xdg_popup. It also manages functionality shared between xdg_surface
87 based surface roles.
88
89 See the documentation of xdg_surface for more details about what an
90 xdg_surface is and how it is used.
91 </description>
92 <arg name="id" type="new_id" interface="xdg_surface"/>
93 <arg name="surface" type="object" interface="wl_surface"/>
94 </request>
95
96 <request name="pong">
97 <description summary="respond to a ping event">
98 A client must respond to a ping event with a pong request or
99 the client may be deemed unresponsive. See xdg_wm_base.ping
100 and xdg_wm_base.error.unresponsive.
101 </description>
102 <arg name="serial" type="uint" summary="serial of the ping event"/>
103 </request>
104
105 <event name="ping">
106 <description summary="check if the client is alive">
107 The ping event asks the client if it's still alive. Pass the
108 serial specified in the event back to the compositor by sending
109 a "pong" request back with the specified serial. See xdg_wm_base.pong.
110
111 Compositors can use this to determine if the client is still
112 alive. It's unspecified what will happen if the client doesn't
113 respond to the ping request, or in what timeframe. Clients should
114 try to respond in a reasonable amount of time. The “unresponsive”
115 error is provided for compositors that wish to disconnect unresponsive
116 clients.
117
118 A compositor is free to ping in any way it wants, but a client must
119 always respond to any xdg_wm_base object it created.
120 </description>
121 <arg name="serial" type="uint" summary="pass this to the pong request"/>
122 </event>
123 </interface>
124
125 <interface name="xdg_positioner" version="6">
126 <description summary="child surface positioner">
127 The xdg_positioner provides a collection of rules for the placement of a
128 child surface relative to a parent surface. Rules can be defined to ensure
129 the child surface remains within the visible area's borders, and to
130 specify how the child surface changes its position, such as sliding along
131 an axis, or flipping around a rectangle. These positioner-created rules are
132 constrained by the requirement that a child surface must intersect with or
133 be at least partially adjacent to its parent surface.
134
135 See the various requests for details about possible rules.
136
137 At the time of the request, the compositor makes a copy of the rules
138 specified by the xdg_positioner. Thus, after the request is complete the
139 xdg_positioner object can be destroyed or reused; further changes to the
140 object will have no effect on previous usages.
141
142 For an xdg_positioner object to be considered complete, it must have a
143 non-zero size set by set_size, and a non-zero anchor rectangle set by
144 set_anchor_rect. Passing an incomplete xdg_positioner object when
145 positioning a surface raises an invalid_positioner error.
146 </description>
147
148 <enum name="error">
149 <entry name="invalid_input" value="0" summary="invalid input provided"/>
150 </enum>
151
152 <request name="destroy" type="destructor">
153 <description summary="destroy the xdg_positioner object">
154 Notify the compositor that the xdg_positioner will no longer be used.
155 </description>
156 </request>
157
158 <request name="set_size">
159 <description summary="set the size of the to-be positioned rectangle">
160 Set the size of the surface that is to be positioned with the positioner
161 object. The size is in surface-local coordinates and corresponds to the
162 window geometry. See xdg_surface.set_window_geometry.
163
164 If a zero or negative size is set the invalid_input error is raised.
165 </description>
166 <arg name="width" type="int" summary="width of positioned rectangle"/>
167 <arg name="height" type="int" summary="height of positioned rectangle"/>
168 </request>
169
170 <request name="set_anchor_rect">
171 <description summary="set the anchor rectangle within the parent surface">
172 Specify the anchor rectangle within the parent surface that the child
173 surface will be placed relative to. The rectangle is relative to the
174 window geometry as defined by xdg_surface.set_window_geometry of the
175 parent surface.
176
177 When the xdg_positioner object is used to position a child surface, the
178 anchor rectangle may not extend outside the window geometry of the
179 positioned child's parent surface.
180
181 If a negative size is set the invalid_input error is raised.
182 </description>
183 <arg name="x" type="int" summary="x position of anchor rectangle"/>
184 <arg name="y" type="int" summary="y position of anchor rectangle"/>
185 <arg name="width" type="int" summary="width of anchor rectangle"/>
186 <arg name="height" type="int" summary="height of anchor rectangle"/>
187 </request>
188
189 <enum name="anchor">
190 <entry name="none" value="0"/>
191 <entry name="top" value="1"/>
192 <entry name="bottom" value="2"/>
193 <entry name="left" value="3"/>
194 <entry name="right" value="4"/>
195 <entry name="top_left" value="5"/>
196 <entry name="bottom_left" value="6"/>
197 <entry name="top_right" value="7"/>
198 <entry name="bottom_right" value="8"/>
199 </enum>
200
201 <request name="set_anchor">
202 <description summary="set anchor rectangle anchor">
203 Defines the anchor point for the anchor rectangle. The specified anchor
204 is used derive an anchor point that the child surface will be
205 positioned relative to. If a corner anchor is set (e.g. 'top_left' or
206 'bottom_right'), the anchor point will be at the specified corner;
207 otherwise, the derived anchor point will be centered on the specified
208 edge, or in the center of the anchor rectangle if no edge is specified.
209 </description>
210 <arg name="anchor" type="uint" enum="anchor"
211 summary="anchor"/>
212 </request>
213
214 <enum name="gravity">
215 <entry name="none" value="0"/>
216 <entry name="top" value="1"/>
217 <entry name="bottom" value="2"/>
218 <entry name="left" value="3"/>
219 <entry name="right" value="4"/>
220 <entry name="top_left" value="5"/>
221 <entry name="bottom_left" value="6"/>
222 <entry name="top_right" value="7"/>
223 <entry name="bottom_right" value="8"/>
224 </enum>
225
226 <request name="set_gravity">
227 <description summary="set child surface gravity">
228 Defines in what direction a surface should be positioned, relative to
229 the anchor point of the parent surface. If a corner gravity is
230 specified (e.g. 'bottom_right' or 'top_left'), then the child surface
231 will be placed towards the specified gravity; otherwise, the child
232 surface will be centered over the anchor point on any axis that had no
233 gravity specified. If the gravity is not in the ‘gravity’ enum, an
234 invalid_input error is raised.
235 </description>
236 <arg name="gravity" type="uint" enum="gravity"
237 summary="gravity direction"/>
238 </request>
239
240 <enum name="constraint_adjustment" bitfield="true">
241 <description summary="constraint adjustments">
242 The constraint adjustment value define ways the compositor will adjust
243 the position of the surface, if the unadjusted position would result
244 in the surface being partly constrained.
245
246 Whether a surface is considered 'constrained' is left to the compositor
247 to determine. For example, the surface may be partly outside the
248 compositor's defined 'work area', thus necessitating the child surface's
249 position be adjusted until it is entirely inside the work area.
250
251 The adjustments can be combined, according to a defined precedence: 1)
252 Flip, 2) Slide, 3) Resize.
253 </description>
254 <entry name="none" value="0">
255 <description summary="don't move the child surface when constrained">
256 Don't alter the surface position even if it is constrained on some
257 axis, for example partially outside the edge of an output.
258 </description>
259 </entry>
260 <entry name="slide_x" value="1">
261 <description summary="move along the x axis until unconstrained">
262 Slide the surface along the x axis until it is no longer constrained.
263
264 First try to slide towards the direction of the gravity on the x axis
265 until either the edge in the opposite direction of the gravity is
266 unconstrained or the edge in the direction of the gravity is
267 constrained.
268
269 Then try to slide towards the opposite direction of the gravity on the
270 x axis until either the edge in the direction of the gravity is
271 unconstrained or the edge in the opposite direction of the gravity is
272 constrained.
273 </description>
274 </entry>
275 <entry name="slide_y" value="2">
276 <description summary="move along the y axis until unconstrained">
277 Slide the surface along the y axis until it is no longer constrained.
278
279 First try to slide towards the direction of the gravity on the y axis
280 until either the edge in the opposite direction of the gravity is
281 unconstrained or the edge in the direction of the gravity is
282 constrained.
283
284 Then try to slide towards the opposite direction of the gravity on the
285 y axis until either the edge in the direction of the gravity is
286 unconstrained or the edge in the opposite direction of the gravity is
287 constrained.
288 </description>
289 </entry>
290 <entry name="flip_x" value="4">
291 <description summary="invert the anchor and gravity on the x axis">
292 Invert the anchor and gravity on the x axis if the surface is
293 constrained on the x axis. For example, if the left edge of the
294 surface is constrained, the gravity is 'left' and the anchor is
295 'left', change the gravity to 'right' and the anchor to 'right'.
296
297 If the adjusted position also ends up being constrained, the resulting
298 position of the flip_x adjustment will be the one before the
299 adjustment.
300 </description>
301 </entry>
302 <entry name="flip_y" value="8">
303 <description summary="invert the anchor and gravity on the y axis">
304 Invert the anchor and gravity on the y axis if the surface is
305 constrained on the y axis. For example, if the bottom edge of the
306 surface is constrained, the gravity is 'bottom' and the anchor is
307 'bottom', change the gravity to 'top' and the anchor to 'top'.
308
309 The adjusted position is calculated given the original anchor
310 rectangle and offset, but with the new flipped anchor and gravity
311 values.
312
313 If the adjusted position also ends up being constrained, the resulting
314 position of the flip_y adjustment will be the one before the
315 adjustment.
316 </description>
317 </entry>
318 <entry name="resize_x" value="16">
319 <description summary="horizontally resize the surface">
320 Resize the surface horizontally so that it is completely
321 unconstrained.
322 </description>
323 </entry>
324 <entry name="resize_y" value="32">
325 <description summary="vertically resize the surface">
326 Resize the surface vertically so that it is completely unconstrained.
327 </description>
328 </entry>
329 </enum>
330
331 <request name="set_constraint_adjustment">
332 <description summary="set the adjustment to be done when constrained">
333 Specify how the window should be positioned if the originally intended
334 position caused the surface to be constrained, meaning at least
335 partially outside positioning boundaries set by the compositor. The
336 adjustment is set by constructing a bitmask describing the adjustment to
337 be made when the surface is constrained on that axis.
338
339 If no bit for one axis is set, the compositor will assume that the child
340 surface should not change its position on that axis when constrained.
341
342 If more than one bit for one axis is set, the order of how adjustments
343 are applied is specified in the corresponding adjustment descriptions.
344
345 The default adjustment is none.
346 </description>
347 <arg name="constraint_adjustment" type="uint"
348 summary="bit mask of constraint adjustments"/>
349 </request>
350
351 <request name="set_offset">
352 <description summary="set surface position offset">
353 Specify the surface position offset relative to the position of the
354 anchor on the anchor rectangle and the anchor on the surface. For
355 example if the anchor of the anchor rectangle is at (x, y), the surface
356 has the gravity bottom|right, and the offset is (ox, oy), the calculated
357 surface position will be (x + ox, y + oy). The offset position of the
358 surface is the one used for constraint testing. See
359 set_constraint_adjustment.
360
361 An example use case is placing a popup menu on top of a user interface
362 element, while aligning the user interface element of the parent surface
363 with some user interface element placed somewhere in the popup surface.
364 </description>
365 <arg name="x" type="int" summary="surface position x offset"/>
366 <arg name="y" type="int" summary="surface position y offset"/>
367 </request>
368
369 <!-- Version 3 additions -->
370
371 <request name="set_reactive" since="3">
372 <description summary="continuously reconstrain the surface">
373 When set reactive, the surface is reconstrained if the conditions used
374 for constraining changed, e.g. the parent window moved.
375
376 If the conditions changed and the popup was reconstrained, an
377 xdg_popup.configure event is sent with updated geometry, followed by an
378 xdg_surface.configure event.
379 </description>
380 </request>
381
382 <request name="set_parent_size" since="3">
383 <description summary="">
384 Set the parent window geometry the compositor should use when
385 positioning the popup. The compositor may use this information to
386 determine the future state the popup should be constrained using. If
387 this doesn't match the dimension of the parent the popup is eventually
388 positioned against, the behavior is undefined.
389
390 The arguments are given in the surface-local coordinate space.
391 </description>
392 <arg name="parent_width" type="int"
393 summary="future window geometry width of parent"/>
394 <arg name="parent_height" type="int"
395 summary="future window geometry height of parent"/>
396 </request>
397
398 <request name="set_parent_configure" since="3">
399 <description summary="set parent configure this is a response to">
400 Set the serial of an xdg_surface.configure event this positioner will be
401 used in response to. The compositor may use this information together
402 with set_parent_size to determine what future state the popup should be
403 constrained using.
404 </description>
405 <arg name="serial" type="uint"
406 summary="serial of parent configure event"/>
407 </request>
408 </interface>
409
410 <interface name="xdg_surface" version="6">
411 <description summary="desktop user interface surface base interface">
412 An interface that may be implemented by a wl_surface, for
413 implementations that provide a desktop-style user interface.
414
415 It provides a base set of functionality required to construct user
416 interface elements requiring management by the compositor, such as
417 toplevel windows, menus, etc. The types of functionality are split into
418 xdg_surface roles.
419
420 Creating an xdg_surface does not set the role for a wl_surface. In order
421 to map an xdg_surface, the client must create a role-specific object
422 using, e.g., get_toplevel, get_popup. The wl_surface for any given
423 xdg_surface can have at most one role, and may not be assigned any role
424 not based on xdg_surface.
425
426 A role must be assigned before any other requests are made to the
427 xdg_surface object.
428
429 The client must call wl_surface.commit on the corresponding wl_surface
430 for the xdg_surface state to take effect.
431
432 Creating an xdg_surface from a wl_surface which has a buffer attached or
433 committed is a client error, and any attempts by a client to attach or
434 manipulate a buffer prior to the first xdg_surface.configure call must
435 also be treated as errors.
436
437 After creating a role-specific object and setting it up, the client must
438 perform an initial commit without any buffer attached. The compositor
439 will reply with initial wl_surface state such as
440 wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
441 event. The client must acknowledge it and is then allowed to attach a
442 buffer to map the surface.
443
444 Mapping an xdg_surface-based role surface is defined as making it
445 possible for the surface to be shown by the compositor. Note that
446 a mapped surface is not guaranteed to be visible once it is mapped.
447
448 For an xdg_surface to be mapped by the compositor, the following
449 conditions must be met:
450 (1) the client has assigned an xdg_surface-based role to the surface
451 (2) the client has set and committed the xdg_surface state and the
452 role-dependent state to the surface
453 (3) the client has committed a buffer to the surface
454
455 A newly-unmapped surface is considered to have met condition (1) out
456 of the 3 required conditions for mapping a surface if its role surface
457 has not been destroyed, i.e. the client must perform the initial commit
458 again before attaching a buffer.
459 </description>
460
461 <enum name="error">
462 <entry name="not_constructed" value="1"
463 summary="Surface was not fully constructed"/>
464 <entry name="already_constructed" value="2"
465 summary="Surface was already constructed"/>
466 <entry name="unconfigured_buffer" value="3"
467 summary="Attaching a buffer to an unconfigured surface"/>
468 <entry name="invalid_serial" value="4"
469 summary="Invalid serial number when acking a configure event"/>
470 <entry name="invalid_size" value="5"
471 summary="Width or height was zero or negative"/>
472 <entry name="defunct_role_object" value="6"
473 summary="Surface was destroyed before its role object"/>
474 </enum>
475
476 <request name="destroy" type="destructor">
477 <description summary="destroy the xdg_surface">
478 Destroy the xdg_surface object. An xdg_surface must only be destroyed
479 after its role object has been destroyed, otherwise
480 a defunct_role_object error is raised.
481 </description>
482 </request>
483
484 <request name="get_toplevel">
485 <description summary="assign the xdg_toplevel surface role">
486 This creates an xdg_toplevel object for the given xdg_surface and gives
487 the associated wl_surface the xdg_toplevel role.
488
489 See the documentation of xdg_toplevel for more details about what an
490 xdg_toplevel is and how it is used.
491 </description>
492 <arg name="id" type="new_id" interface="xdg_toplevel"/>
493 </request>
494
495 <request name="get_popup">
496 <description summary="assign the xdg_popup surface role">
497 This creates an xdg_popup object for the given xdg_surface and gives
498 the associated wl_surface the xdg_popup role.
499
500 If null is passed as a parent, a parent surface must be specified using
501 some other protocol, before committing the initial state.
502
503 See the documentation of xdg_popup for more details about what an
504 xdg_popup is and how it is used.
505 </description>
506 <arg name="id" type="new_id" interface="xdg_popup"/>
507 <arg name="parent" type="object" interface="xdg_surface" allow-null="true"/>
508 <arg name="positioner" type="object" interface="xdg_positioner"/>
509 </request>
510
511 <request name="set_window_geometry">
512 <description summary="set the new window geometry">
513 The window geometry of a surface is its "visible bounds" from the
514 user's perspective. Client-side decorations often have invisible
515 portions like drop-shadows which should be ignored for the
516 purposes of aligning, placing and constraining windows.
517
518 The window geometry is double buffered, and will be applied at the
519 time wl_surface.commit of the corresponding wl_surface is called.
520
521 When maintaining a position, the compositor should treat the (x, y)
522 coordinate of the window geometry as the top left corner of the window.
523 A client changing the (x, y) window geometry coordinate should in
524 general not alter the position of the window.
525
526 Once the window geometry of the surface is set, it is not possible to
527 unset it, and it will remain the same until set_window_geometry is
528 called again, even if a new subsurface or buffer is attached.
529
530 If never set, the value is the full bounds of the surface,
531 including any subsurfaces. This updates dynamically on every
532 commit. This unset is meant for extremely simple clients.
533
534 The arguments are given in the surface-local coordinate space of
535 the wl_surface associated with this xdg_surface, and may extend outside
536 of the wl_surface itself to mark parts of the subsurface tree as part of
537 the window geometry.
538
539 When applied, the effective window geometry will be the set window
540 geometry clamped to the bounding rectangle of the combined
541 geometry of the surface of the xdg_surface and the associated
542 subsurfaces.
543
544 The effective geometry will not be recalculated unless a new call to
545 set_window_geometry is done and the new pending surface state is
546 subsequently applied.
547
548 The width and height of the effective window geometry must be
549 greater than zero. Setting an invalid size will raise an
550 invalid_size error.
551 </description>
552 <arg name="x" type="int"/>
553 <arg name="y" type="int"/>
554 <arg name="width" type="int"/>
555 <arg name="height" type="int"/>
556 </request>
557
558 <request name="ack_configure">
559 <description summary="ack a configure event">
560 When a configure event is received, if a client commits the
561 surface in response to the configure event, then the client
562 must make an ack_configure request sometime before the commit
563 request, passing along the serial of the configure event.
564
565 For instance, for toplevel surfaces the compositor might use this
566 information to move a surface to the top left only when the client has
567 drawn itself for the maximized or fullscreen state.
568
569 If the client receives multiple configure events before it
570 can respond to one, it only has to ack the last configure event.
571 Acking a configure event that was never sent raises an invalid_serial
572 error.
573
574 A client is not required to commit immediately after sending
575 an ack_configure request - it may even ack_configure several times
576 before its next surface commit.
577
578 A client may send multiple ack_configure requests before committing, but
579 only the last request sent before a commit indicates which configure
580 event the client really is responding to.
581
582 Sending an ack_configure request consumes the serial number sent with
583 the request, as well as serial numbers sent by all configure events
584 sent on this xdg_surface prior to the configure event referenced by
585 the committed serial.
586
587 It is an error to issue multiple ack_configure requests referencing a
588 serial from the same configure event, or to issue an ack_configure
589 request referencing a serial from a configure event issued before the
590 event identified by the last ack_configure request for the same
591 xdg_surface. Doing so will raise an invalid_serial error.
592 </description>
593 <arg name="serial" type="uint" summary="the serial from the configure event"/>
594 </request>
595
596 <event name="configure">
597 <description summary="suggest a surface change">
598 The configure event marks the end of a configure sequence. A configure
599 sequence is a set of one or more events configuring the state of the
600 xdg_surface, including the final xdg_surface.configure event.
601
602 Where applicable, xdg_surface surface roles will during a configure
603 sequence extend this event as a latched state sent as events before the
604 xdg_surface.configure event. Such events should be considered to make up
605 a set of atomically applied configuration states, where the
606 xdg_surface.configure commits the accumulated state.
607
608 Clients should arrange their surface for the new states, and then send
609 an ack_configure request with the serial sent in this configure event at
610 some point before committing the new surface.
611
612 If the client receives multiple configure events before it can respond
613 to one, it is free to discard all but the last event it received.
614 </description>
615 <arg name="serial" type="uint" summary="serial of the configure event"/>
616 </event>
617
618 </interface>
619
620 <interface name="xdg_toplevel" version="6">
621 <description summary="toplevel surface">
622 This interface defines an xdg_surface role which allows a surface to,
623 among other things, set window-like properties such as maximize,
624 fullscreen, and minimize, set application-specific metadata like title and
625 id, and well as trigger user interactive operations such as interactive
626 resize and move.
627
628 Unmapping an xdg_toplevel means that the surface cannot be shown
629 by the compositor until it is explicitly mapped again.
630 All active operations (e.g., move, resize) are canceled and all
631 attributes (e.g. title, state, stacking, ...) are discarded for
632 an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
633 the state it had right after xdg_surface.get_toplevel. The client
634 can re-map the toplevel by perfoming a commit without any buffer
635 attached, waiting for a configure event and handling it as usual (see
636 xdg_surface description).
637
638 Attaching a null buffer to a toplevel unmaps the surface.
639 </description>
640
641 <request name="destroy" type="destructor">
642 <description summary="destroy the xdg_toplevel">
643 This request destroys the role surface and unmaps the surface;
644 see "Unmapping" behavior in interface section for details.
645 </description>
646 </request>
647
648 <enum name="error">
649 <entry name="invalid_resize_edge" value="0" summary="provided value is
650 not a valid variant of the resize_edge enum"/>
651 <entry name="invalid_parent" value="1"
652 summary="invalid parent toplevel"/>
653 <entry name="invalid_size" value="2"
654 summary="client provided an invalid min or max size"/>
655 </enum>
656
657 <request name="set_parent">
658 <description summary="set the parent of this surface">
659 Set the "parent" of this surface. This surface should be stacked
660 above the parent surface and all other ancestor surfaces.
661
662 Parent surfaces should be set on dialogs, toolboxes, or other
663 "auxiliary" surfaces, so that the parent is raised when the dialog
664 is raised.
665
666 Setting a null parent for a child surface unsets its parent. Setting
667 a null parent for a surface which currently has no parent is a no-op.
668
669 Only mapped surfaces can have child surfaces. Setting a parent which
670 is not mapped is equivalent to setting a null parent. If a surface
671 becomes unmapped, its children's parent is set to the parent of
672 the now-unmapped surface. If the now-unmapped surface has no parent,
673 its children's parent is unset. If the now-unmapped surface becomes
674 mapped again, its parent-child relationship is not restored.
675
676 The parent toplevel must not be one of the child toplevel's
677 descendants, and the parent must be different from the child toplevel,
678 otherwise the invalid_parent protocol error is raised.
679 </description>
680 <arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/>
681 </request>
682
683 <request name="set_title">
684 <description summary="set surface title">
685 Set a short title for the surface.
686
687 This string may be used to identify the surface in a task bar,
688 window list, or other user interface elements provided by the
689 compositor.
690
691 The string must be encoded in UTF-8.
692 </description>
693 <arg name="title" type="string"/>
694 </request>
695
696 <request name="set_app_id">
697 <description summary="set application ID">
698 Set an application identifier for the surface.
699
700 The app ID identifies the general class of applications to which
701 the surface belongs. The compositor can use this to group multiple
702 surfaces together, or to determine how to launch a new application.
703
704 For D-Bus activatable applications, the app ID is used as the D-Bus
705 service name.
706
707 The compositor shell will try to group application surfaces together
708 by their app ID. As a best practice, it is suggested to select app
709 ID's that match the basename of the application's .desktop file.
710 For example, "org.freedesktop.FooViewer" where the .desktop file is
711 "org.freedesktop.FooViewer.desktop".
712
713 Like other properties, a set_app_id request can be sent after the
714 xdg_toplevel has been mapped to update the property.
715
716 See the desktop-entry specification [0] for more details on
717 application identifiers and how they relate to well-known D-Bus
718 names and .desktop files.
719
720 [0] https://standards.freedesktop.org/desktop-entry-spec/
721 </description>
722 <arg name="app_id" type="string"/>
723 </request>
724
725 <request name="show_window_menu">
726 <description summary="show the window menu">
727 Clients implementing client-side decorations might want to show
728 a context menu when right-clicking on the decorations, giving the
729 user a menu that they can use to maximize or minimize the window.
730
731 This request asks the compositor to pop up such a window menu at
732 the given position, relative to the local surface coordinates of
733 the parent surface. There are no guarantees as to what menu items
734 the window menu contains, or even if a window menu will be drawn
735 at all.
736
737 This request must be used in response to some sort of user action
738 like a button press, key press, or touch down event.
739 </description>
740 <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
741 <arg name="serial" type="uint" summary="the serial of the user event"/>
742 <arg name="x" type="int" summary="the x position to pop up the window menu at"/>
743 <arg name="y" type="int" summary="the y position to pop up the window menu at"/>
744 </request>
745
746 <request name="move">
747 <description summary="start an interactive move">
748 Start an interactive, user-driven move of the surface.
749
750 This request must be used in response to some sort of user action
751 like a button press, key press, or touch down event. The passed
752 serial is used to determine the type of interactive move (touch,
753 pointer, etc).
754
755 The server may ignore move requests depending on the state of
756 the surface (e.g. fullscreen or maximized), or if the passed serial
757 is no longer valid.
758
759 If triggered, the surface will lose the focus of the device
760 (wl_pointer, wl_touch, etc) used for the move. It is up to the
761 compositor to visually indicate that the move is taking place, such as
762 updating a pointer cursor, during the move. There is no guarantee
763 that the device focus will return when the move is completed.
764 </description>
765 <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
766 <arg name="serial" type="uint" summary="the serial of the user event"/>
767 </request>
768
769 <enum name="resize_edge">
770 <description summary="edge values for resizing">
771 These values are used to indicate which edge of a surface
772 is being dragged in a resize operation.
773 </description>
774 <entry name="none" value="0"/>
775 <entry name="top" value="1"/>
776 <entry name="bottom" value="2"/>
777 <entry name="left" value="4"/>
778 <entry name="top_left" value="5"/>
779 <entry name="bottom_left" value="6"/>
780 <entry name="right" value="8"/>
781 <entry name="top_right" value="9"/>
782 <entry name="bottom_right" value="10"/>
783 </enum>
784
785 <request name="resize">
786 <description summary="start an interactive resize">
787 Start a user-driven, interactive resize of the surface.
788
789 This request must be used in response to some sort of user action
790 like a button press, key press, or touch down event. The passed
791 serial is used to determine the type of interactive resize (touch,
792 pointer, etc).
793
794 The server may ignore resize requests depending on the state of
795 the surface (e.g. fullscreen or maximized).
796
797 If triggered, the client will receive configure events with the
798 "resize" state enum value and the expected sizes. See the "resize"
799 enum value for more details about what is required. The client
800 must also acknowledge configure events using "ack_configure". After
801 the resize is completed, the client will receive another "configure"
802 event without the resize state.
803
804 If triggered, the surface also will lose the focus of the device
805 (wl_pointer, wl_touch, etc) used for the resize. It is up to the
806 compositor to visually indicate that the resize is taking place,
807 such as updating a pointer cursor, during the resize. There is no
808 guarantee that the device focus will return when the resize is
809 completed.
810
811 The edges parameter specifies how the surface should be resized, and
812 is one of the values of the resize_edge enum. Values not matching
813 a variant of the enum will cause the invalid_resize_edge protocol error.
814 The compositor may use this information to update the surface position
815 for example when dragging the top left corner. The compositor may also
816 use this information to adapt its behavior, e.g. choose an appropriate
817 cursor image.
818 </description>
819 <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
820 <arg name="serial" type="uint" summary="the serial of the user event"/>
821 <arg name="edges" type="uint" enum="resize_edge" summary="which edge or corner is being dragged"/>
822 </request>
823
824 <enum name="state">
825 <description summary="types of state on the surface">
826 The different state values used on the surface. This is designed for
827 state values like maximized, fullscreen. It is paired with the
828 configure event to ensure that both the client and the compositor
829 setting the state can be synchronized.
830
831 States set in this way are double-buffered. They will get applied on
832 the next commit.
833 </description>
834 <entry name="maximized" value="1" summary="the surface is maximized">
835 <description summary="the surface is maximized">
836 The surface is maximized. The window geometry specified in the configure
837 event must be obeyed by the client, or the xdg_wm_base.invalid_surface_state
838 error is raised.
839
840 The client should draw without shadow or other
841 decoration outside of the window geometry.
842 </description>
843 </entry>
844 <entry name="fullscreen" value="2" summary="the surface is fullscreen">
845 <description summary="the surface is fullscreen">
846 The surface is fullscreen. The window geometry specified in the
847 configure event is a maximum; the client cannot resize beyond it. For
848 a surface to cover the whole fullscreened area, the geometry
849 dimensions must be obeyed by the client. For more details, see
850 xdg_toplevel.set_fullscreen.
851 </description>
852 </entry>
853 <entry name="resizing" value="3" summary="the surface is being resized">
854 <description summary="the surface is being resized">
855 The surface is being resized. The window geometry specified in the
856 configure event is a maximum; the client cannot resize beyond it.
857 Clients that have aspect ratio or cell sizing configuration can use
858 a smaller size, however.
859 </description>
860 </entry>
861 <entry name="activated" value="4" summary="the surface is now activated">
862 <description summary="the surface is now activated">
863 Client window decorations should be painted as if the window is
864 active. Do not assume this means that the window actually has
865 keyboard or pointer focus.
866 </description>
867 </entry>
868 <entry name="tiled_left" value="5" since="2">
869 <description summary="the surface’s left edge is tiled">
870 The window is currently in a tiled layout and the left edge is
871 considered to be adjacent to another part of the tiling grid.
872 </description>
873 </entry>
874 <entry name="tiled_right" value="6" since="2">
875 <description summary="the surface’s right edge is tiled">
876 The window is currently in a tiled layout and the right edge is
877 considered to be adjacent to another part of the tiling grid.
878 </description>
879 </entry>
880 <entry name="tiled_top" value="7" since="2">
881 <description summary="the surface’s top edge is tiled">
882 The window is currently in a tiled layout and the top edge is
883 considered to be adjacent to another part of the tiling grid.
884 </description>
885 </entry>
886 <entry name="tiled_bottom" value="8" since="2">
887 <description summary="the surface’s bottom edge is tiled">
888 The window is currently in a tiled layout and the bottom edge is
889 considered to be adjacent to another part of the tiling grid.
890 </description>
891 </entry>
892 <entry name="suspended" value="9" since="6">
893 <description summary="surface repaint is suspended">
894 The surface is currently not ordinarily being repainted; for
895 example because its content is occluded by another window, or its
896 outputs are switched off due to screen locking.
897 </description>
898 </entry>
899 </enum>
900
901 <request name="set_max_size">
902 <description summary="set the maximum size">
903 Set a maximum size for the window.
904
905 The client can specify a maximum size so that the compositor does
906 not try to configure the window beyond this size.
907
908 The width and height arguments are in window geometry coordinates.
909 See xdg_surface.set_window_geometry.
910
911 Values set in this way are double-buffered. They will get applied
912 on the next commit.
913
914 The compositor can use this information to allow or disallow
915 different states like maximize or fullscreen and draw accurate
916 animations.
917
918 Similarly, a tiling window manager may use this information to
919 place and resize client windows in a more effective way.
920
921 The client should not rely on the compositor to obey the maximum
922 size. The compositor may decide to ignore the values set by the
923 client and request a larger size.
924
925 If never set, or a value of zero in the request, means that the
926 client has no expected maximum size in the given dimension.
927 As a result, a client wishing to reset the maximum size
928 to an unspecified state can use zero for width and height in the
929 request.
930
931 Requesting a maximum size to be smaller than the minimum size of
932 a surface is illegal and will result in an invalid_size error.
933
934 The width and height must be greater than or equal to zero. Using
935 strictly negative values for width or height will result in a
936 invalid_size error.
937 </description>
938 <arg name="width" type="int"/>
939 <arg name="height" type="int"/>
940 </request>
941
942 <request name="set_min_size">
943 <description summary="set the minimum size">
944 Set a minimum size for the window.
945
946 The client can specify a minimum size so that the compositor does
947 not try to configure the window below this size.
948
949 The width and height arguments are in window geometry coordinates.
950 See xdg_surface.set_window_geometry.
951
952 Values set in this way are double-buffered. They will get applied
953 on the next commit.
954
955 The compositor can use this information to allow or disallow
956 different states like maximize or fullscreen and draw accurate
957 animations.
958
959 Similarly, a tiling window manager may use this information to
960 place and resize client windows in a more effective way.
961
962 The client should not rely on the compositor to obey the minimum
963 size. The compositor may decide to ignore the values set by the
964 client and request a smaller size.
965
966 If never set, or a value of zero in the request, means that the
967 client has no expected minimum size in the given dimension.
968 As a result, a client wishing to reset the minimum size
969 to an unspecified state can use zero for width and height in the
970 request.
971
972 Requesting a minimum size to be larger than the maximum size of
973 a surface is illegal and will result in an invalid_size error.
974
975 The width and height must be greater than or equal to zero. Using
976 strictly negative values for width and height will result in a
977 invalid_size error.
978 </description>
979 <arg name="width" type="int"/>
980 <arg name="height" type="int"/>
981 </request>
982
983 <request name="set_maximized">
984 <description summary="maximize the window">
985 Maximize the surface.
986
987 After requesting that the surface should be maximized, the compositor
988 will respond by emitting a configure event. Whether this configure
989 actually sets the window maximized is subject to compositor policies.
990 The client must then update its content, drawing in the configured
991 state. The client must also acknowledge the configure when committing
992 the new content (see ack_configure).
993
994 It is up to the compositor to decide how and where to maximize the
995 surface, for example which output and what region of the screen should
996 be used.
997
998 If the surface was already maximized, the compositor will still emit
999 a configure event with the "maximized" state.
1000
1001 If the surface is in a fullscreen state, this request has no direct
1002 effect. It may alter the state the surface is returned to when
1003 unmaximized unless overridden by the compositor.
1004 </description>
1005 </request>
1006
1007 <request name="unset_maximized">
1008 <description summary="unmaximize the window">
1009 Unmaximize the surface.
1010
1011 After requesting that the surface should be unmaximized, the compositor
1012 will respond by emitting a configure event. Whether this actually
1013 un-maximizes the window is subject to compositor policies.
1014 If available and applicable, the compositor will include the window
1015 geometry dimensions the window had prior to being maximized in the
1016 configure event. The client must then update its content, drawing it in
1017 the configured state. The client must also acknowledge the configure
1018 when committing the new content (see ack_configure).
1019
1020 It is up to the compositor to position the surface after it was
1021 unmaximized; usually the position the surface had before maximizing, if
1022 applicable.
1023
1024 If the surface was already not maximized, the compositor will still
1025 emit a configure event without the "maximized" state.
1026
1027 If the surface is in a fullscreen state, this request has no direct
1028 effect. It may alter the state the surface is returned to when
1029 unmaximized unless overridden by the compositor.
1030 </description>
1031 </request>
1032
1033 <request name="set_fullscreen">
1034 <description summary="set the window as fullscreen on an output">
1035 Make the surface fullscreen.
1036
1037 After requesting that the surface should be fullscreened, the
1038 compositor will respond by emitting a configure event. Whether the
1039 client is actually put into a fullscreen state is subject to compositor
1040 policies. The client must also acknowledge the configure when
1041 committing the new content (see ack_configure).
1042
1043 The output passed by the request indicates the client's preference as
1044 to which display it should be set fullscreen on. If this value is NULL,
1045 it's up to the compositor to choose which display will be used to map
1046 this surface.
1047
1048 If the surface doesn't cover the whole output, the compositor will
1049 position the surface in the center of the output and compensate with
1050 with border fill covering the rest of the output. The content of the
1051 border fill is undefined, but should be assumed to be in some way that
1052 attempts to blend into the surrounding area (e.g. solid black).
1053
1054 If the fullscreened surface is not opaque, the compositor must make
1055 sure that other screen content not part of the same surface tree (made
1056 up of subsurfaces, popups or similarly coupled surfaces) are not
1057 visible below the fullscreened surface.
1058 </description>
1059 <arg name="output" type="object" interface="wl_output" allow-null="true"/>
1060 </request>
1061
1062 <request name="unset_fullscreen">
1063 <description summary="unset the window as fullscreen">
1064 Make the surface no longer fullscreen.
1065
1066 After requesting that the surface should be unfullscreened, the
1067 compositor will respond by emitting a configure event.
1068 Whether this actually removes the fullscreen state of the client is
1069 subject to compositor policies.
1070
1071 Making a surface unfullscreen sets states for the surface based on the following:
1072 * the state(s) it may have had before becoming fullscreen
1073 * any state(s) decided by the compositor
1074 * any state(s) requested by the client while the surface was fullscreen
1075
1076 The compositor may include the previous window geometry dimensions in
1077 the configure event, if applicable.
1078
1079 The client must also acknowledge the configure when committing the new
1080 content (see ack_configure).
1081 </description>
1082 </request>
1083
1084 <request name="set_minimized">
1085 <description summary="set the window as minimized">
1086 Request that the compositor minimize your surface. There is no
1087 way to know if the surface is currently minimized, nor is there
1088 any way to unset minimization on this surface.
1089
1090 If you are looking to throttle redrawing when minimized, please
1091 instead use the wl_surface.frame event for this, as this will
1092 also work with live previews on windows in Alt-Tab, Expose or
1093 similar compositor features.
1094 </description>
1095 </request>
1096
1097 <event name="configure">
1098 <description summary="suggest a surface change">
1099 This configure event asks the client to resize its toplevel surface or
1100 to change its state. The configured state should not be applied
1101 immediately. See xdg_surface.configure for details.
1102
1103 The width and height arguments specify a hint to the window
1104 about how its surface should be resized in window geometry
1105 coordinates. See set_window_geometry.
1106
1107 If the width or height arguments are zero, it means the client
1108 should decide its own window dimension. This may happen when the
1109 compositor needs to configure the state of the surface but doesn't
1110 have any information about any previous or expected dimension.
1111
1112 The states listed in the event specify how the width/height
1113 arguments should be interpreted, and possibly how it should be
1114 drawn.
1115
1116 Clients must send an ack_configure in response to this event. See
1117 xdg_surface.configure and xdg_surface.ack_configure for details.
1118 </description>
1119 <arg name="width" type="int"/>
1120 <arg name="height" type="int"/>
1121 <arg name="states" type="array"/>
1122 </event>
1123
1124 <event name="close">
1125 <description summary="surface wants to be closed">
1126 The close event is sent by the compositor when the user
1127 wants the surface to be closed. This should be equivalent to
1128 the user clicking the close button in client-side decorations,
1129 if your application has any.
1130
1131 This is only a request that the user intends to close the
1132 window. The client may choose to ignore this request, or show
1133 a dialog to ask the user to save their data, etc.
1134 </description>
1135 </event>
1136
1137 <!-- Version 4 additions -->
1138
1139 <event name="configure_bounds" since="4">
1140 <description summary="recommended window geometry bounds">
1141 The configure_bounds event may be sent prior to a xdg_toplevel.configure
1142 event to communicate the bounds a window geometry size is recommended
1143 to constrain to.
1144
1145 The passed width and height are in surface coordinate space. If width
1146 and height are 0, it means bounds is unknown and equivalent to as if no
1147 configure_bounds event was ever sent for this surface.
1148
1149 The bounds can for example correspond to the size of a monitor excluding
1150 any panels or other shell components, so that a surface isn't created in
1151 a way that it cannot fit.
1152
1153 The bounds may change at any point, and in such a case, a new
1154 xdg_toplevel.configure_bounds will be sent, followed by
1155 xdg_toplevel.configure and xdg_surface.configure.
1156 </description>
1157 <arg name="width" type="int"/>
1158 <arg name="height" type="int"/>
1159 </event>
1160
1161 <!-- Version 5 additions -->
1162
1163 <enum name="wm_capabilities" since="5">
1164 <entry name="window_menu" value="1" summary="show_window_menu is available"/>
1165 <entry name="maximize" value="2" summary="set_maximized and unset_maximized are available"/>
1166 <entry name="fullscreen" value="3" summary="set_fullscreen and unset_fullscreen are available"/>
1167 <entry name="minimize" value="4" summary="set_minimized is available"/>
1168 </enum>
1169
1170 <event name="wm_capabilities" since="5">
1171 <description summary="compositor capabilities">
1172 This event advertises the capabilities supported by the compositor. If
1173 a capability isn't supported, clients should hide or disable the UI
1174 elements that expose this functionality. For instance, if the
1175 compositor doesn't advertise support for minimized toplevels, a button
1176 triggering the set_minimized request should not be displayed.
1177
1178 The compositor will ignore requests it doesn't support. For instance,
1179 a compositor which doesn't advertise support for minimized will ignore
1180 set_minimized requests.
1181
1182 Compositors must send this event once before the first
1183 xdg_surface.configure event. When the capabilities change, compositors
1184 must send this event again and then send an xdg_surface.configure
1185 event.
1186
1187 The configured state should not be applied immediately. See
1188 xdg_surface.configure for details.
1189
1190 The capabilities are sent as an array of 32-bit unsigned integers in
1191 native endianness.
1192 </description>
1193 <arg name="capabilities" type="array" summary="array of 32-bit capabilities"/>
1194 </event>
1195 </interface>
1196
1197 <interface name="xdg_popup" version="6">
1198 <description summary="short-lived, popup surfaces for menus">
1199 A popup surface is a short-lived, temporary surface. It can be used to
1200 implement for example menus, popovers, tooltips and other similar user
1201 interface concepts.
1202
1203 A popup can be made to take an explicit grab. See xdg_popup.grab for
1204 details.
1205
1206 When the popup is dismissed, a popup_done event will be sent out, and at
1207 the same time the surface will be unmapped. See the xdg_popup.popup_done
1208 event for details.
1209
1210 Explicitly destroying the xdg_popup object will also dismiss the popup and
1211 unmap the surface. Clients that want to dismiss the popup when another
1212 surface of their own is clicked should dismiss the popup using the destroy
1213 request.
1214
1215 A newly created xdg_popup will be stacked on top of all previously created
1216 xdg_popup surfaces associated with the same xdg_toplevel.
1217
1218 The parent of an xdg_popup must be mapped (see the xdg_surface
1219 description) before the xdg_popup itself.
1220
1221 The client must call wl_surface.commit on the corresponding wl_surface
1222 for the xdg_popup state to take effect.
1223 </description>
1224
1225 <enum name="error">
1226 <entry name="invalid_grab" value="0"
1227 summary="tried to grab after being mapped"/>
1228 </enum>
1229
1230 <request name="destroy" type="destructor">
1231 <description summary="remove xdg_popup interface">
1232 This destroys the popup. Explicitly destroying the xdg_popup
1233 object will also dismiss the popup, and unmap the surface.
1234
1235 If this xdg_popup is not the "topmost" popup, the
1236 xdg_wm_base.not_the_topmost_popup protocol error will be sent.
1237 </description>
1238 </request>
1239
1240 <request name="grab">
1241 <description summary="make the popup take an explicit grab">
1242 This request makes the created popup take an explicit grab. An explicit
1243 grab will be dismissed when the user dismisses the popup, or when the
1244 client destroys the xdg_popup. This can be done by the user clicking
1245 outside the surface, using the keyboard, or even locking the screen
1246 through closing the lid or a timeout.
1247
1248 If the compositor denies the grab, the popup will be immediately
1249 dismissed.
1250
1251 This request must be used in response to some sort of user action like a
1252 button press, key press, or touch down event. The serial number of the
1253 event should be passed as 'serial'.
1254
1255 The parent of a grabbing popup must either be an xdg_toplevel surface or
1256 another xdg_popup with an explicit grab. If the parent is another
1257 xdg_popup it means that the popups are nested, with this popup now being
1258 the topmost popup.
1259
1260 Nested popups must be destroyed in the reverse order they were created
1261 in, e.g. the only popup you are allowed to destroy at all times is the
1262 topmost one.
1263
1264 When compositors choose to dismiss a popup, they may dismiss every
1265 nested grabbing popup as well. When a compositor dismisses popups, it
1266 will follow the same dismissing order as required from the client.
1267
1268 If the topmost grabbing popup is destroyed, the grab will be returned to
1269 the parent of the popup, if that parent previously had an explicit grab.
1270
1271 If the parent is a grabbing popup which has already been dismissed, this
1272 popup will be immediately dismissed. If the parent is a popup that did
1273 not take an explicit grab, an error will be raised.
1274
1275 During a popup grab, the client owning the grab will receive pointer
1276 and touch events for all their surfaces as normal (similar to an
1277 "owner-events" grab in X11 parlance), while the top most grabbing popup
1278 will always have keyboard focus.
1279 </description>
1280 <arg name="seat" type="object" interface="wl_seat"
1281 summary="the wl_seat of the user event"/>
1282 <arg name="serial" type="uint" summary="the serial of the user event"/>
1283 </request>
1284
1285 <event name="configure">
1286 <description summary="configure the popup surface">
1287 This event asks the popup surface to configure itself given the
1288 configuration. The configured state should not be applied immediately.
1289 See xdg_surface.configure for details.
1290
1291 The x and y arguments represent the position the popup was placed at
1292 given the xdg_positioner rule, relative to the upper left corner of the
1293 window geometry of the parent surface.
1294
1295 For version 2 or older, the configure event for an xdg_popup is only
1296 ever sent once for the initial configuration. Starting with version 3,
1297 it may be sent again if the popup is setup with an xdg_positioner with
1298 set_reactive requested, or in response to xdg_popup.reposition requests.
1299 </description>
1300 <arg name="x" type="int"
1301 summary="x position relative to parent surface window geometry"/>
1302 <arg name="y" type="int"
1303 summary="y position relative to parent surface window geometry"/>
1304 <arg name="width" type="int" summary="window geometry width"/>
1305 <arg name="height" type="int" summary="window geometry height"/>
1306 </event>
1307
1308 <event name="popup_done">
1309 <description summary="popup interaction is done">
1310 The popup_done event is sent out when a popup is dismissed by the
1311 compositor. The client should destroy the xdg_popup object at this
1312 point.
1313 </description>
1314 </event>
1315
1316 <!-- Version 3 additions -->
1317
1318 <request name="reposition" since="3">
1319 <description summary="recalculate the popup's location">
1320 Reposition an already-mapped popup. The popup will be placed given the
1321 details in the passed xdg_positioner object, and a
1322 xdg_popup.repositioned followed by xdg_popup.configure and
1323 xdg_surface.configure will be emitted in response. Any parameters set
1324 by the previous positioner will be discarded.
1325
1326 The passed token will be sent in the corresponding
1327 xdg_popup.repositioned event. The new popup position will not take
1328 effect until the corresponding configure event is acknowledged by the
1329 client. See xdg_popup.repositioned for details. The token itself is
1330 opaque, and has no other special meaning.
1331
1332 If multiple reposition requests are sent, the compositor may skip all
1333 but the last one.
1334
1335 If the popup is repositioned in response to a configure event for its
1336 parent, the client should send an xdg_positioner.set_parent_configure
1337 and possibly an xdg_positioner.set_parent_size request to allow the
1338 compositor to properly constrain the popup.
1339
1340 If the popup is repositioned together with a parent that is being
1341 resized, but not in response to a configure event, the client should
1342 send an xdg_positioner.set_parent_size request.
1343 </description>
1344 <arg name="positioner" type="object" interface="xdg_positioner"/>
1345 <arg name="token" type="uint" summary="reposition request token"/>
1346 </request>
1347
1348 <event name="repositioned" since="3">
1349 <description summary="signal the completion of a repositioned request">
1350 The repositioned event is sent as part of a popup configuration
1351 sequence, together with xdg_popup.configure and lastly
1352 xdg_surface.configure to notify the completion of a reposition request.
1353
1354 The repositioned event is to notify about the completion of a
1355 xdg_popup.reposition request. The token argument is the token passed
1356 in the xdg_popup.reposition request.
1357
1358 Immediately after this event is emitted, xdg_popup.configure and
1359 xdg_surface.configure will be sent with the updated size and position,
1360 as well as a new configure serial.
1361
1362 The client should optionally update the content of the popup, but must
1363 acknowledge the new popup configuration for the new position to take
1364 effect. See xdg_surface.ack_configure for details.
1365 </description>
1366 <arg name="token" type="uint" summary="reposition request token"/>
1367 </event>
1368
1369 </interface>
1370</protocol>
diff --git a/src/contrib/SDL-3.2.20/wayland-protocols/xdg-toplevel-icon-v1.xml b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-toplevel-icon-v1.xml
new file mode 100644
index 0000000..4270d69
--- /dev/null
+++ b/src/contrib/SDL-3.2.20/wayland-protocols/xdg-toplevel-icon-v1.xml
@@ -0,0 +1,203 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="xdg_toplevel_icon_v1">
3
4 <copyright>
5 Copyright © 2023-2024 Matthias Klumpp
6 Copyright © 2024 David Edmundson
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 and/or sell copies of the Software, and to permit persons to whom the
13 Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 </copyright>
27
28 <description summary="protocol to assign icons to toplevels">
29 This protocol allows clients to set icons for their toplevel surfaces
30 either via the XDG icon stock (using an icon name), or from pixel data.
31
32 A toplevel icon represents the individual toplevel (unlike the application
33 or launcher icon, which represents the application as a whole), and may be
34 shown in window switchers, window overviews and taskbars that list
35 individual windows.
36
37 This document adheres to RFC 2119 when using words like "must",
38 "should", "may", etc.
39
40 Warning! The protocol described in this file is currently in the testing
41 phase. Backward compatible changes may be added together with the
42 corresponding interface version bump. Backward incompatible changes can
43 only be done by creating a new major version of the extension.
44 </description>
45
46 <interface name="xdg_toplevel_icon_manager_v1" version="1">
47 <description summary="interface to manage toplevel icons">
48 This interface allows clients to create toplevel window icons and set
49 them on toplevel windows to be displayed to the user.
50 </description>
51
52 <request name="destroy" type="destructor">
53 <description summary="destroy the toplevel icon manager">
54 Destroy the toplevel icon manager.
55 This does not destroy objects created with the manager.
56 </description>
57 </request>
58
59 <request name="create_icon">
60 <description summary="create a new icon instance">
61 Creates a new icon object. This icon can then be attached to a
62 xdg_toplevel via the 'set_icon' request.
63 </description>
64 <arg name="id" type="new_id" interface="xdg_toplevel_icon_v1"/>
65 </request>
66
67 <request name="set_icon">
68 <description summary="set an icon on a toplevel window">
69 This request assigns the icon 'icon' to 'toplevel', or clears the
70 toplevel icon if 'icon' was null.
71 This state is double-buffered and is applied on the next
72 wl_surface.commit of the toplevel.
73
74 After making this call, the xdg_toplevel_icon_v1 provided as 'icon'
75 can be destroyed by the client without 'toplevel' losing its icon.
76 The xdg_toplevel_icon_v1 is immutable from this point, and any
77 future attempts to change it must raise the
78 'xdg_toplevel_icon_v1.immutable' protocol error.
79
80 The compositor must set the toplevel icon from either the pixel data
81 the icon provides, or by loading a stock icon using the icon name.
82 See the description of 'xdg_toplevel_icon_v1' for details.
83
84 If 'icon' is set to null, the icon of the respective toplevel is reset
85 to its default icon (usually the icon of the application, derived from
86 its desktop-entry file, or a placeholder icon).
87 If this request is passed an icon with no pixel buffers or icon name
88 assigned, the icon must be reset just like if 'icon' was null.
89 </description>
90 <arg name="toplevel" type="object" interface="xdg_toplevel" summary="the toplevel to act on"/>
91 <arg name="icon" type="object" interface="xdg_toplevel_icon_v1" allow-null="true"/>
92 </request>
93
94 <event name="icon_size">
95 <description summary="describes a supported &amp; preferred icon size">
96 This event indicates an icon size the compositor prefers to be
97 available if the client has scalable icons and can render to any size.
98
99 When the 'xdg_toplevel_icon_manager_v1' object is created, the
100 compositor may send one or more 'icon_size' events to describe the list
101 of preferred icon sizes. If the compositor has no size preference, it
102 may not send any 'icon_size' event, and it is up to the client to
103 decide a suitable icon size.
104
105 A sequence of 'icon_size' events must be finished with a 'done' event.
106 If the compositor has no size preferences, it must still send the
107 'done' event, without any preceding 'icon_size' events.
108 </description>
109 <arg name="size" type="int"
110 summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/>
111 </event>
112
113 <event name="done">
114 <description summary="all information has been sent">
115 This event is sent after all 'icon_size' events have been sent.
116 </description>
117 </event>
118 </interface>
119
120 <interface name="xdg_toplevel_icon_v1" version="1">
121 <description summary="a toplevel window icon">
122 This interface defines a toplevel icon.
123 An icon can have a name, and multiple buffers.
124 In order to be applied, the icon must have either a name, or at least
125 one buffer assigned. Applying an empty icon (with no buffer or name) to
126 a toplevel should reset its icon to the default icon.
127
128 It is up to compositor policy whether to prefer using a buffer or loading
129 an icon via its name. See 'set_name' and 'add_buffer' for details.
130 </description>
131
132 <enum name="error">
133 <entry name="invalid_buffer"
134 summary="the provided buffer does not satisfy requirements"
135 value="1"/>
136 <entry name="immutable"
137 summary="the icon has already been assigned to a toplevel and must not be changed"
138 value="2"/>
139 <entry name="no_buffer"
140 summary="the provided buffer has been destroyed before the toplevel icon"
141 value="3"/>
142 </enum>
143
144 <request name="destroy" type="destructor">
145 <description summary="destroy the icon object">
146 Destroys the 'xdg_toplevel_icon_v1' object.
147 The icon must still remain set on every toplevel it was assigned to,
148 until the toplevel icon is reset explicitly.
149 </description>
150 </request>
151
152 <request name="set_name">
153 <description summary="set an icon name">
154 This request assigns an icon name to this icon.
155 Any previously set name is overridden.
156
157 The compositor must resolve 'icon_name' according to the lookup rules
158 described in the XDG icon theme specification[1] using the
159 environment's current icon theme.
160
161 If the compositor does not support icon names or cannot resolve
162 'icon_name' according to the XDG icon theme specification it must
163 fall back to using pixel buffer data instead.
164
165 If this request is made after the icon has been assigned to a toplevel
166 via 'set_icon', a 'immutable' error must be raised.
167
168 [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
169 </description>
170 <arg name="icon_name" type="string"/>
171 </request>
172
173 <request name="add_buffer">
174 <description summary="add icon data from a pixel buffer">
175 This request adds pixel data supplied as wl_buffer to the icon.
176
177 The client should add pixel data for all icon sizes and scales that
178 it can provide, or which are explicitly requested by the compositor
179 via 'icon_size' events on xdg_toplevel_icon_manager_v1.
180
181 The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm
182 and must be a square (width and height being equal).
183 If any of these buffer requirements are not fulfilled, a 'invalid_buffer'
184 error must be raised.
185
186 If this icon instance already has a buffer of the same size and scale
187 from a previous 'add_buffer' request, data from the last request
188 overrides the preexisting pixel data.
189
190 The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
191 it is associated with is not destroyed, otherwise a 'no_buffer' error
192 is raised. The buffer contents must not be modified after it was
193 assigned to the icon.
194
195 If this request is made after the icon has been assigned to a toplevel
196 via 'set_icon', a 'immutable' error must be raised.
197 </description>
198 <arg name="buffer" type="object" interface="wl_buffer"/>
199 <arg name="scale" type="int"
200 summary="the scaling factor of the icon, e.g. 1"/>
201 </request>
202 </interface>
203</protocol>