| 1 | //! This crate provides bindings to the official wayland protocol extensions |
| 2 | //! provided in <https://gitlab.freedesktop.org/wayland/wayland-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 | //! ## Protocol categories |
| 11 | //! |
| 12 | //! The protocols provided in this crate are grouped in 4 main categories: |
| 13 | //! |
| 14 | //! - The [`wp`] module contains general purpose wayland protocols |
| 15 | //! - The [`xdg`] module contains protocols specifically related to window management |
| 16 | //! - The [`xwayland`] module contains protocols used by xwayland. |
| 17 | //! - The [`ext`] module contains protocols that do not fit into the three previous categories. |
| 18 | //! |
| 19 | //! ## Staging protocols |
| 20 | //! |
| 21 | //! The cargo feature `staging` enables the generation of the staging protocols. |
| 22 | //! |
| 23 | //! These protocols are ready for wider adoption and clients and compositors are encouraged to |
| 24 | //! implement staging protocol extensions where a protocol's functionality is desired. |
| 25 | //! |
| 26 | //! Although these protocols should be stable, the protocols may still be completely replaced in a new |
| 27 | //! major version or with a completely different protocol. |
| 28 | //! |
| 29 | //! ## Unstable protocols |
| 30 | //! |
| 31 | //! The `wayland-protocols` project previously had a notion of "unstable protocols" representing protocols |
| 32 | //! that are still being worked on and evolving. These protocols are recognized by the use of the prefix `z` |
| 33 | //! in their interface names. |
| 34 | //! |
| 35 | //! This category has now been deprecated and is no longer supposed to be used, however several protocols |
| 36 | //! are still under that umbrella. We can expect them to be replaced by staging and stable protocols in the |
| 37 | //! long term, but in the meantime you can enable them with the `unstable` cargo feature. |
| 38 | //! |
| 39 | //! ## Other protocols |
| 40 | //! |
| 41 | //! Additionally, more protocol extensions are provided here: |
| 42 | //! - [wayland-protocols-wlr](https://docs.rs/wayland-protocols-wlr) |
| 43 | //! - [wayland-protocols-plasma](https://docs.rs/wayland-protocols-plasma) |
| 44 | //! - [wayland-protocols-misc](https://docs.rs/wayland-protocols-misc) |
| 45 | |
| 46 | #![warn (missing_docs)] |
| 47 | #![forbid (improper_ctypes, unsafe_op_in_unsafe_fn)] |
| 48 | #![cfg_attr (docsrs, feature(doc_auto_cfg))] |
| 49 | |
| 50 | #[macro_use ] |
| 51 | mod protocol_macro; |
| 52 | |
| 53 | pub mod ext; |
| 54 | pub mod wp; |
| 55 | pub mod xdg; |
| 56 | pub mod xwayland; |
| 57 | |