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 export_dmabuf {
25         //! A protocol for low overhead screen content capturing
26         //!
27         //! An interface to capture surfaces in an efficient way by exporting DMA-BUFs.
28 
29         wayland_protocol_versioned!(
30             "wlr-export-dmabuf",
31             [v1],
32             [
33                 (wl_output, wl_output_interface)
34             ],
35             []
36         );
37     }
38 
39     pub mod gamma_control {
40         //! Manage gamma tables of outputs.
41         //!
42         //! This protocol allows a privileged client to set the gamma tables for outputs.
43 
44         wayland_protocol_versioned!(
45             "wlr-gamma-control",
46             [v1],
47             [
48                 (wl_output, wl_output_interface)
49             ],
50             []
51         );
52     }
53 
54     pub mod input_inhibitor {
55         //! Inhibits input events to other clients
56 
57         wayland_protocol_versioned!(
58             "wlr-input-inhibitor",
59             [v1],
60             [],
61             []
62         );
63     }
64 
65     pub mod layer_shell {
66         //! Layered shell protocol
67 
68         wayland_protocol_versioned!(
69             "wlr-layer-shell",
70             [v1],
71             [
72                 (wl_output, wl_output_interface),
73                 (wl_surface, wl_surface_interface)
74             ],
75             [
76                 (xdg_shell, xdg_popup, xdg_popup_interface)
77             ]
78         );
79     }
80 
81     pub mod screencopy {
82         //! Screen content capturing on client buffers
83         //!
84         //! This protocol allows clients to ask the compositor to copy part of the
85         //! screen content to a client buffer.
86 
87         wayland_protocol_versioned!(
88             "wlr-screencopy",
89             [v1],
90             [
91                 (wl_buffer, wl_buffer_interface),
92                 (wl_output, wl_output_interface)
93             ],
94             []
95         );
96     }
97 }