wayland_protocols_wlr/
lib.rs

1//! This crate provides bindings to the wlroots wayland protocol extensions
2//! provided in <https://gitlab.freedesktop.org/wlroots/wlr-protocols>
3//!
4//! These bindings are built on top of the crates wayland-client and wayland-server.
5//!
6//! Each protocol module contains a `client` and a `server` submodules, for each side of the
7//! protocol. The creation of these modules (and the dependency on the associated crate) is
8//! controlled by the two cargo features `client` and `server`.
9
10#![warn(missing_docs)]
11#![forbid(improper_ctypes, unsafe_op_in_unsafe_fn)]
12#![cfg_attr(docsrs, feature(doc_auto_cfg))]
13#![cfg_attr(rustfmt, rustfmt_skip)]
14
15#[macro_use]
16mod protocol_macro;
17
18pub mod data_control {
19    //! Control data devices, particularly the clipboard.
20    //!
21    //! An interface to control data devices, particularly to manage the current selection and
22    //! take the role of a clipboard manager.
23
24    #[allow(missing_docs)]
25    pub mod v1 {
26        wayland_protocol!(
27            "./wlr-protocols/unstable/wlr-data-control-unstable-v1.xml",
28            []
29        );
30    }
31}
32
33pub mod export_dmabuf {
34    //! A protocol for low overhead screen content capturing
35    //!
36    //! An interface to capture surfaces in an efficient way by exporting DMA-BUFs.
37
38    #[allow(missing_docs)]
39    pub mod v1 {
40        wayland_protocol!(
41            "./wlr-protocols/unstable/wlr-export-dmabuf-unstable-v1.xml",
42            []
43        );
44    }
45}
46
47pub mod foreign_toplevel {
48    //! List and control opened apps
49    //!
50    //! Use for creating taskbars and docks.
51
52    #[allow(missing_docs)]
53    pub mod v1 {
54        wayland_protocol!(
55            "./wlr-protocols/unstable/wlr-foreign-toplevel-management-unstable-v1.xml",
56            []
57        );
58    }
59}
60
61pub mod gamma_control {
62    //! Manage gamma tables of outputs.
63    //!
64    //! This protocol allows a privileged client to set the gamma tables for outputs.
65
66    #[allow(missing_docs)]
67    pub mod v1 {
68        wayland_protocol!(
69            "./wlr-protocols/unstable/wlr-gamma-control-unstable-v1.xml",
70            []
71        );
72    }
73}
74
75pub mod input_inhibitor {
76    //! Inhibits input events to other clients
77
78    #[allow(missing_docs)]
79    pub mod v1 {
80        wayland_protocol!(
81            "./wlr-protocols/unstable/wlr-input-inhibitor-unstable-v1.xml",
82            []
83        );
84    }
85}
86
87pub mod layer_shell {
88    //! Layered shell protocol
89
90    #[allow(missing_docs)]
91    pub mod v1 {
92        wayland_protocol!(
93            "./wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml",
94            [wayland_protocols::xdg::shell]
95        );
96    }
97}
98
99pub mod output_management {
100    //! Output management protocol
101    //!
102    //! This protocol exposes interfaces to obtain and modify output device configuration.
103
104    #[allow(missing_docs)]
105    pub mod v1 {
106        wayland_protocol!(
107            "./wlr-protocols/unstable/wlr-output-management-unstable-v1.xml",
108            []
109        );
110    }
111}
112
113pub mod output_power_management {
114    //! Output power management protocol
115    //!
116    //! This protocol allows clients to control power management modes
117    //! of outputs that are currently part of the compositor space. The
118    //! intent is to allow special clients like desktop shells to power
119    //! down outputs when the system is idle.
120
121    #[allow(missing_docs)]
122    pub mod v1 {
123        wayland_protocol!(
124            "./wlr-protocols/unstable/wlr-output-power-management-unstable-v1.xml",
125            []
126        );
127    }
128}
129
130pub mod screencopy {
131    //! Screen content capturing on client buffers
132    //!
133    //! This protocol allows clients to ask the compositor to copy part of the
134    //! screen content to a client buffer.
135
136    #[allow(missing_docs)]
137    pub mod v1 {
138        wayland_protocol!(
139            "./wlr-protocols/unstable/wlr-screencopy-unstable-v1.xml",
140            []
141        );
142    }
143}
144
145pub mod virtual_pointer {
146    //! Virtual pointer protocol
147    //!
148    //! This protocol allows clients to emulate a physical pointer device. The
149    //! requests are mostly mirror opposites of those specified in wl_pointer.
150
151    #[allow(missing_docs)]
152    pub mod v1 {
153        wayland_protocol!(
154            "./wlr-protocols/unstable/wlr-virtual-pointer-unstable-v1.xml",
155            []
156        );
157    }
158}