1 //! wlr-procotols extension family
2 //!
3 //! This module regroup bindings to the protocol extensions from
4 //! [wlr-protocols](https://github.com/swaywm/wlr-protocols).
5 
6 #![cfg_attr(rustfmt, rustfmt_skip)]
7 
8 #[cfg(feature = "unstable_protocols")]
9 pub mod unstable {
10     //! Unstable protocols from wlr-protocols
11     //!
12     //! The protocols described in this module are experimental and
13     //! backward incompatible changes may be made. Backward compatible
14     //! changes may be added together with the corresponding interface
15     //! version bump.
16     //!
17     //! Backward incompatible changes are done by bumping the version
18     //! number in the protocol and interface names and resetting the
19     //! interface version. Once the protocol is to be declared stable,
20     //! the 'z' prefix and the version number in the protocol and
21     //! interface names are removed and the interface version number is
22     //! reset.
23 
24     pub mod data_control {
25         //! Control data devices, particularly the clipboard.
26         //!
27         //! An interface to control data devices, particularly to manage the current selection and
28         //! take the role of a clipboard manager.
29 
30         wayland_protocol_versioned!(
31             "wlr-data-control",
32             [v1],
33             [
34                 (wl_seat, wl_seat_interface)
35             ],
36             []
37         );
38     }
39 
40     pub mod export_dmabuf {
41         //! A protocol for low overhead screen content capturing
42         //!
43         //! An interface to capture surfaces in an efficient way by exporting DMA-BUFs.
44 
45         wayland_protocol_versioned!(
46             "wlr-export-dmabuf",
47             [v1],
48             [
49                 (wl_output, wl_output_interface)
50             ],
51             []
52         );
53     }
54 
55     pub mod foreign_toplevel {
56         //! List and control opened apps
57         //!
58         //! Use for creating taskbars and docks.
59 
60         wayland_protocol_versioned!(
61             "wlr-foreign-toplevel-management",
62             [v1],
63             [
64                 (wl_seat, wl_seat_interface),
65                 (wl_surface, wl_surface_interface),
66                 (wl_output, wl_output_interface)
67             ],
68             []
69         );
70     }
71 
72     pub mod gamma_control {
73         //! Manage gamma tables of outputs.
74         //!
75         //! This protocol allows a privileged client to set the gamma tables for outputs.
76 
77         wayland_protocol_versioned!(
78             "wlr-gamma-control",
79             [v1],
80             [
81                 (wl_output, wl_output_interface)
82             ],
83             []
84         );
85     }
86 
87     pub mod input_inhibitor {
88         //! Inhibits input events to other clients
89 
90         wayland_protocol_versioned!(
91             "wlr-input-inhibitor",
92             [v1],
93             [],
94             []
95         );
96     }
97 
98     pub mod layer_shell {
99         //! Layered shell protocol
100 
101         wayland_protocol_versioned!(
102             "wlr-layer-shell",
103             [v1],
104             [
105                 (wl_output, wl_output_interface),
106                 (wl_surface, wl_surface_interface)
107             ],
108             [
109                 (xdg_shell, xdg_popup, xdg_popup_interface)
110             ]
111         );
112     }
113 
114     pub mod screencopy {
115         //! Screen content capturing on client buffers
116         //!
117         //! This protocol allows clients to ask the compositor to copy part of the
118         //! screen content to a client buffer.
119 
120         wayland_protocol_versioned!(
121             "wlr-screencopy",
122             [v1],
123             [
124                 (wl_buffer, wl_buffer_interface),
125                 (wl_output, wl_output_interface)
126             ],
127             []
128         );
129     }
130 }
131