1use wayland_client;
4use wayland_client::protocol::*;
5
6use self::interfaces::*;
7
8use pkg_config;
9
10pub fn wayfire_proto_path() -> String {
14 let wayfire = pkg_config::Config::new()
16 .atleast_version("0.7.0")
17 .probe("wayfire")
18 .unwrap();
19
20 wayfire.include_paths[0].to_str().unwrap().to_string()
22 + "/unstable/wayfire-shell-unstable-v2.xml"
23}
24
25pub mod interfaces {
26 use wayland_client::protocol::__interfaces::*;
27
28 #[cfg(feature = "system_proto")]
29 wayland_scanner::generate_interfaces!(
30 "/usr/share/wayfire/protocols/unstable/wayfire-shell-unstable-v2.xml"
31 );
32
33 #[cfg(not(feature = "system_proto"))]
35 wayland_scanner::generate_interfaces!("src/proto/wayfire-shell-unstable-v2.xml");
36}
37
38#[cfg(feature = "system_proto")]
39wayland_scanner::generate_client_code!(
40 "/usr/share/wayfire/protocols/unstable/wayfire-shell-unstable-v2.xml"
41);
42#[cfg(not(feature = "system_proto"))]
43wayland_scanner::generate_client_code!("src/proto/wayfire-shell-unstable-v2.xml");
44
45