wayrs_protocols/
lib.rs

1//! A collection of Wayland protocols to use with `wayrs_client`.
2//!
3//! All protocols are behind feature gates and none of them are enabeled by default.
4
5#![cfg_attr(docsrs, feature(doc_cfg))]
6
7macro_rules! gen {
8    (mod: $mod:ident, feat: $feat:literal, file: $file:literal, deps: [$($dep:ident),*],) => {
9        #[cfg(feature = $feat)]
10        #[cfg_attr(docsrs, doc(cfg(feature = $feat)))]
11        pub mod $mod {
12            $(gen!(@dep $dep);)*
13            wayrs_client::generate!($file);
14        }
15    };
16    (@dep core) => {
17        use wayrs_client::protocol::*;
18    };
19    (@dep $dep:ident) => {
20        use super::$dep::*;
21    };
22}
23
24gen! {
25    mod: linux_dmabuf_v1,
26    feat: "linux-dmabuf-v1",
27    file: "wayland-protocols/stable/linux-dmabuf/linux-dmabuf-v1.xml",
28    deps: [core],
29}
30
31gen! {
32    mod: presentation_time,
33    feat: "presentation-time",
34    file: "wayland-protocols/stable/presentation-time/presentation-time.xml",
35    deps: [core],
36}
37
38gen! {
39    mod: viewporter,
40    feat: "viewporter",
41    file: "wayland-protocols/stable/viewporter/viewporter.xml",
42    deps: [core],
43}
44
45gen! {
46    mod: xdg_shell,
47    feat: "xdg-shell",
48    file: "wayland-protocols/stable/xdg-shell/xdg-shell.xml",
49    deps: [core],
50}
51
52gen! {
53    mod: alpha_modifier_v1,
54    feat: "alpha-modifier-v1",
55    file: "wayland-protocols/staging/alpha-modifier/alpha-modifier-v1.xml",
56    deps: [core],
57}
58
59gen! {
60    mod: color_management_v1,
61    feat: "color-management-v1",
62    file: "wayland-protocols/staging/color-management/color-management-v1.xml",
63    deps: [core],
64}
65
66gen! {
67    mod: color_representation_v1,
68    feat: "color-representation-v1",
69    file: "wayland-protocols/staging/color-representation/color-representation-v1.xml",
70    deps: [core],
71}
72
73gen! {
74    mod: commit_timing_v1,
75    feat: "commit-timing-v1",
76    file: "wayland-protocols/staging/commit-timing/commit-timing-v1.xml",
77    deps: [core],
78}
79
80gen! {
81    mod: content_type_v1,
82    feat: "content-type-v1",
83    file: "wayland-protocols/staging/content-type/content-type-v1.xml",
84    deps: [core],
85}
86
87gen! {
88    mod: cursor_shape_v1,
89    feat: "cursor-shape-v1",
90    file: "wayland-protocols/staging/cursor-shape/cursor-shape-v1.xml",
91    deps: [core, tablet_v2],
92}
93
94gen! {
95    mod: drm_lease_v1,
96    feat: "drm-lease-v1",
97    file: "wayland-protocols/staging/drm-lease/drm-lease-v1.xml",
98    deps: [],
99}
100
101gen! {
102    mod: ext_background_effect_v1,
103    feat: "ext-background-effect-v1",
104    file: "wayland-protocols/staging/ext-background-effect/ext-background-effect-v1.xml",
105    deps: [core],
106}
107
108gen! {
109    mod: ext_data_control_v1,
110    feat: "ext-data-control-v1",
111    file: "wayland-protocols/staging/ext-data-control/ext-data-control-v1.xml",
112    deps: [core],
113}
114
115gen! {
116    mod: ext_foreign_toplevel_list,
117    feat: "ext-foreign-toplevel-list-v1",
118    file: "wayland-protocols/staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml",
119    deps: [],
120}
121
122gen! {
123    mod: ext_idle_notify_v1,
124    feat: "ext-idle-notify-v1",
125    file: "wayland-protocols/staging/ext-idle-notify/ext-idle-notify-v1.xml",
126    deps: [core],
127}
128
129gen! {
130    mod: ext_image_copy_capture_v1,
131    feat: "ext-image-copy-capture-v1",
132    file: "wayland-protocols/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml",
133    deps: [core, ext_image_capture_source_v1],
134}
135
136gen! {
137    mod: ext_image_capture_source_v1,
138    feat: "ext-image-capture-source-v1",
139    file: "wayland-protocols/staging/ext-image-capture-source/ext-image-capture-source-v1.xml",
140    deps: [core, ext_foreign_toplevel_list],
141}
142
143gen! {
144    mod: ext_session_lock_v1,
145    feat: "ext-session-lock-v1",
146    file: "wayland-protocols/staging/ext-session-lock/ext-session-lock-v1.xml",
147    deps: [core],
148}
149
150gen! {
151    mod: ext_transient_seat_v1,
152    feat: "ext-transient-seat-v1",
153    file: "wayland-protocols/staging/ext-transient-seat/ext-transient-seat-v1.xml",
154    deps: [],
155}
156
157gen! {
158    mod: ext_workspace_v1,
159    feat: "ext-workspace-v1",
160    file: "wayland-protocols/staging/ext-workspace/ext-workspace-v1.xml",
161    deps: [],
162}
163
164gen! {
165    mod: fifo_v1,
166    feat: "fifo-v1",
167    file: "wayland-protocols/staging/fifo/fifo-v1.xml",
168    deps: [core],
169}
170
171gen! {
172    mod: fractional_scale_v1,
173    feat: "fractional-scale-v1",
174    file: "wayland-protocols/staging/fractional-scale/fractional-scale-v1.xml",
175    deps: [core],
176}
177
178gen! {
179    mod: linux_drm_syncobj_v1,
180    feat: "linux-drm-syncobj-v1",
181    file: "wayland-protocols/staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml",
182    deps: [core],
183}
184
185gen! {
186    mod: pointer_warp_v1,
187    feat: "pointer-warp-v1",
188    file: "wayland-protocols/staging/pointer-warp/pointer-warp-v1.xml",
189    deps: [core],
190}
191
192gen! {
193    mod: security_context_v1,
194    feat: "security-context-v1",
195    file: "wayland-protocols/staging/security-context/security-context-v1.xml",
196    deps: [],
197}
198
199gen! {
200    mod: single_pixel_buffer_v1,
201    feat: "single-pixel-buffer-v1",
202    file: "wayland-protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml",
203    deps: [core],
204}
205
206gen! {
207    mod: tearing_control_v1,
208    feat: "tearing-control-v1",
209    file: "wayland-protocols/staging/tearing-control/tearing-control-v1.xml",
210    deps: [core],
211}
212
213gen! {
214    mod: xdg_activation_v1,
215    feat: "xdg-activation-v1",
216    file: "wayland-protocols/staging/xdg-activation/xdg-activation-v1.xml",
217    deps: [core],
218}
219
220gen! {
221    mod: xdg_dialog_v1,
222    feat: "xdg-dialog-v1",
223    file: "wayland-protocols/staging/xdg-dialog/xdg-dialog-v1.xml",
224    deps: [xdg_shell],
225}
226
227gen! {
228    mod: xdg_system_bell_v1,
229    feat: "xdg-system-bell-v1",
230    file: "wayland-protocols/staging/xdg-system-bell/xdg-system-bell-v1.xml",
231    deps: [core],
232}
233
234gen! {
235    mod: xdg_toplevel_drag_v1,
236    feat: "xdg-toplevel-drag-v1",
237    file: "wayland-protocols/staging/xdg-toplevel-drag/xdg-toplevel-drag-v1.xml",
238    deps: [core, xdg_shell],
239}
240
241gen! {
242    mod: xdg_toplevel_icon_v1,
243    feat: "xdg-toplevel-icon-v1",
244    file: "wayland-protocols/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml",
245    deps: [core, xdg_shell],
246}
247
248gen! {
249    mod: xdg_toplevel_tag_v1,
250    feat: "xdg-toplevel-tag-v1",
251    file: "wayland-protocols/staging/xdg-toplevel-tag/xdg-toplevel-tag-v1.xml",
252    deps: [xdg_shell],
253}
254
255gen! {
256    mod: xwayland_shell_v1,
257    feat: "xwayland-shell-v1",
258    file: "wayland-protocols/staging/xwayland-shell/xwayland-shell-v1.xml",
259    deps: [core],
260}
261
262gen! {
263    mod: fullscreen_shell_unstable_v1,
264    feat: "fullscreen-shell-unstable-v1",
265    file: "wayland-protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml",
266    deps: [core],
267}
268
269gen! {
270    mod: idle_inhibit_unstable_v1,
271    feat: "idle-inhibit-unstable-v1",
272    file: "wayland-protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml",
273    deps: [core],
274}
275
276gen! {
277    mod: input_method_unstable_v1,
278    feat: "input-method-unstable-v1",
279    file: "wayland-protocols/unstable/input-method/input-method-unstable-v1.xml",
280    deps: [core],
281}
282
283gen! {
284    mod: input_timestamps_unstable_v1,
285    feat: "input-timestamps-unstable-v1",
286    file: "wayland-protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml",
287    deps: [core],
288}
289
290gen! {
291    mod: keyboard_shortcuts_inhibit_unstable_v1,
292    feat: "keyboard-shortcuts-inhibit-unstable-v1",
293    file: "wayland-protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml",
294    deps: [core],
295}
296
297gen! {
298    mod: linux_explicit_synchronization_unstable_v1,
299    feat: "linux-explicit-synchronization-unstable-v1",
300    file: "wayland-protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml",
301    deps: [core],
302}
303
304gen! {
305    mod: pointer_constraints_unstable_v1,
306    feat: "pointer-constraints-unstable-v1",
307    file: "wayland-protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml",
308    deps: [core],
309}
310
311gen! {
312    mod: pointer_gestures_unstable_v1,
313    feat: "pointer-gestures-unstable-v1",
314    file: "wayland-protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml",
315    deps: [core],
316}
317
318gen! {
319    mod: primary_selection_unstable_v1,
320    feat: "primary-selection-unstable-v1",
321    file: "wayland-protocols/unstable/primary-selection/primary-selection-unstable-v1.xml",
322    deps: [core],
323}
324
325gen! {
326    mod: relative_pointer_unstable_v1,
327    feat: "relative-pointer-unstable-v1",
328    file: "wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml",
329    deps: [core],
330}
331
332gen! {
333    mod: tablet_unstable_v1,
334    feat: "tablet-unstable-v1",
335    file: "wayland-protocols/unstable/tablet/tablet-unstable-v1.xml",
336    deps: [core],
337}
338
339gen! {
340    mod: tablet_v2,
341    feat: "tablet-v2",
342    file: "wayland-protocols/stable/tablet/tablet-v2.xml",
343    deps: [core],
344}
345
346gen! {
347    mod: text_input_unstable_v1,
348    feat: "text-input-unstable-v1",
349    file: "wayland-protocols/unstable/text-input/text-input-unstable-v1.xml",
350    deps: [core],
351}
352
353gen! {
354    mod: text_input_unstable_v3,
355    feat: "text-input-unstable-v3",
356    file: "wayland-protocols/unstable/text-input/text-input-unstable-v3.xml",
357    deps: [core],
358}
359
360gen! {
361    mod: xdg_decoration_unstable_v1,
362    feat: "xdg-decoration-unstable-v1",
363    file: "wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml",
364    deps: [xdg_shell],
365}
366
367gen! {
368    mod: xdg_foreign_unstable_v1,
369    feat: "xdg-foreign-unstable-v1",
370    file: "wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml",
371    deps: [core],
372}
373
374gen! {
375    mod: xdg_foreign_unstable_v2,
376    feat: "xdg-foreign-unstable-v2",
377    file: "wayland-protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml",
378    deps: [core],
379}
380
381gen! {
382    mod: xdg_output_unstable_v1,
383    feat: "xdg-output-unstable-v1",
384    file: "wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml",
385    deps: [core],
386}
387
388gen! {
389    mod: xdg_shell_unstable_v5,
390    feat: "xdg-shell-unstable-v5",
391    file: "wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml",
392    deps: [core],
393}
394
395gen! {
396    mod: xdg_shell_unstable_v6,
397    feat: "xdg-shell-unstable-v6",
398    file: "wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml",
399    deps: [core],
400}
401
402gen! {
403    mod: xwayland_keyboard_grab_unstable_v1,
404    feat: "xwayland-keyboard-grab-unstable-v1",
405    file: "wayland-protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml",
406    deps: [core],
407}
408
409gen! {
410    mod: wlr_data_control_unstable_v1,
411    feat: "wlr-data-control-unstable-v1",
412    file: "wlr-protocols/unstable/wlr-data-control-unstable-v1.xml",
413    deps: [core],
414}
415
416gen! {
417    mod: wlr_export_dmabuf_unstable_v1,
418    feat: "wlr-export-dmabuf-unstable-v1",
419    file: "wlr-protocols/unstable/wlr-export-dmabuf-unstable-v1.xml",
420    deps: [core],
421}
422
423gen! {
424    mod: wlr_foreign_toplevel_management_unstable_v1,
425    feat: "wlr-foreign-toplevel-management-unstable-v1",
426    file: "wlr-protocols/unstable/wlr-foreign-toplevel-management-unstable-v1.xml",
427    deps: [core],
428}
429
430gen! {
431    mod: wlr_gamma_control_unstable_v1,
432    feat: "wlr-gamma-control-unstable-v1",
433    file: "wlr-protocols/unstable/wlr-gamma-control-unstable-v1.xml",
434    deps: [core],
435}
436
437gen! {
438    mod: wlr_input_inhibitor_unstable_v1,
439    feat: "wlr-input-inhibitor-unstable-v1",
440    file: "wlr-protocols/unstable/wlr-input-inhibitor-unstable-v1.xml",
441    deps: [],
442}
443
444gen! {
445    mod: wlr_layer_shell_unstable_v1,
446    feat: "wlr-layer-shell-unstable-v1",
447    file: "wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml",
448    deps: [core, xdg_shell],
449}
450
451gen! {
452    mod: wlr_output_management_unstable_v1,
453    feat: "wlr-output-management-unstable-v1",
454    file: "wlr-protocols/unstable/wlr-output-management-unstable-v1.xml",
455    deps: [core],
456}
457
458gen! {
459    mod: wlr_output_power_management_unstable_v1,
460    feat: "wlr-output-power-management-unstable-v1",
461    file: "wlr-protocols/unstable/wlr-output-power-management-unstable-v1.xml",
462    deps: [core],
463}
464
465gen! {
466    mod: wlr_screencopy_unstable_v1,
467    feat: "wlr-screencopy-unstable-v1",
468    file: "wlr-protocols/unstable/wlr-screencopy-unstable-v1.xml",
469    deps: [core],
470}
471
472gen! {
473    mod: wlr_virtual_pointer_unstable_v1,
474    feat: "wlr-virtual-pointer-unstable-v1",
475    file: "wlr-protocols/unstable/wlr-virtual-pointer-unstable-v1.xml",
476    deps: [core],
477}