| 1 | // Official BSD-3-Clause protocol definitions are bundled beside the executable. |
| 2 | macro_rules! protocol { |
| 3 | ($name:ident, $file:literal) => { |
| 4 | #[allow(unused_imports, dead_code, non_camel_case_types, non_snake_case)] |
| 5 | pub mod $name { |
| 6 | use wayland_client; |
| 7 | use wayland_client::protocol::*; |
| 8 | use wayland_protocols::ext::foreign_toplevel_list::v1::client::*; |
| 9 | use wayland_protocols_wlr::foreign_toplevel::v1::client::*; |
| 10 | pub mod __interfaces { |
| 11 | use wayland_client::protocol::__interfaces::*; |
| 12 | use wayland_protocols::ext::foreign_toplevel_list::v1::client::__interfaces::*; |
| 13 | use wayland_protocols_wlr::foreign_toplevel::v1::client::__interfaces::*; |
| 14 | wayland_scanner::generate_interfaces!($file); |
| 15 | } |
| 16 | use self::__interfaces::*; |
| 17 | wayland_scanner::generate_client_code!($file); |
| 18 | #[cfg(test)] |
| 19 | pub mod server { |
| 20 | use wayland_protocols::ext::foreign_toplevel_list::v1::server::*; |
| 21 | use wayland_protocols_wlr::foreign_toplevel::v1::server::*; |
| 22 | use wayland_server; |
| 23 | use wayland_server::protocol::*; |
| 24 | pub mod __interfaces { |
| 25 | use wayland_protocols::ext::foreign_toplevel_list::v1::server::__interfaces::*; |
| 26 | use wayland_protocols_wlr::foreign_toplevel::v1::server::__interfaces::*; |
| 27 | use wayland_server::protocol::__interfaces::*; |
| 28 | wayland_scanner::generate_interfaces!($file); |
| 29 | } |
| 30 | use self::__interfaces::*; |
| 31 | wayland_scanner::generate_server_code!($file); |
| 32 | } |
| 33 | } |
| 34 | }; |
| 35 | } |
| 36 | protocol!(export, "protocols/hyprland-toplevel-export-v1.xml"); |
| 37 | protocol!(mapping, "protocols/hyprland-toplevel-mapping-v1.xml"); |