pixelflux/wayland/kdeproto.rs
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5 */
6
7//! Client bindings for the KDE output protocols, generated from the XMLs
8//! vendored under `protocols/`.
9//!
10//! Vendored rather than taken from `wayland-protocols-plasma` because that
11//! crate's bundled copies lag KDE, and the lag is fatal: KWin sends the mode
12//! `flags` event to every client whatever version it bound — its guard
13//! compares the bound version against the flag enum's `custom` value instead
14//! of the event's since-version — and a wayland-rs client treats an event its
15//! spec does not know as a malformed message, killing the connection mid-read.
16//! The vendored XMLs know every event current KWin can leak; events KDE adds
17//! later stay unsent behind the low versions `kdeclient` binds, unless they
18//! too leak unguarded, which re-vendoring the XMLs cures.
19
20/// `kde-output-device-v2.xml`: the per-output `kde_output_device_v2` globals
21/// and their `kde_output_device_mode_v2` children.
22#[allow(missing_docs, non_upper_case_globals, unused_imports, clippy::all)]
23pub mod output_device {
24 use wayland_client;
25 use wayland_client::protocol::*;
26
27 pub mod __interfaces {
28 use wayland_client::protocol::__interfaces::*;
29 wayland_scanner::generate_interfaces!("./protocols/kde-output-device-v2.xml");
30 }
31 use self::__interfaces::*;
32
33 wayland_scanner::generate_client_code!("./protocols/kde-output-device-v2.xml");
34}
35
36/// `kde-output-management-v2.xml`: `kde_output_management_v2` and the
37/// configuration objects it creates against the output devices.
38#[allow(missing_docs, non_upper_case_globals, unused_imports, clippy::all)]
39pub mod output_management {
40 use wayland_client;
41 use wayland_client::protocol::*;
42
43 use super::output_device::*;
44
45 pub mod __interfaces {
46 use super::super::output_device::__interfaces::*;
47 use wayland_client::protocol::__interfaces::*;
48 wayland_scanner::generate_interfaces!("./protocols/kde-output-management-v2.xml");
49 }
50 use self::__interfaces::*;
51
52 wayland_scanner::generate_client_code!("./protocols/kde-output-management-v2.xml");
53}