diff --git a/Cargo.lock b/Cargo.lock index 88f8309..11aa6c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2274,8 +2274,12 @@ name = "weft-servo-shell" version = "0.1.0" dependencies = [ "anyhow", + "bitflags 2.11.0", "tracing", "tracing-subscriber", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] diff --git a/crates/weft-servo-shell/Cargo.toml b/crates/weft-servo-shell/Cargo.toml index 3edc4fc..0a834b8 100644 --- a/crates/weft-servo-shell/Cargo.toml +++ b/crates/weft-servo-shell/Cargo.toml @@ -12,3 +12,7 @@ path = "src/main.rs" anyhow = "1.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } +wayland-client = "0.31" +wayland-backend = "0.3" +wayland-scanner = "0.31" +bitflags = "2" diff --git a/crates/weft-servo-shell/src/main.rs b/crates/weft-servo-shell/src/main.rs index c040b46..c3e120f 100644 --- a/crates/weft-servo-shell/src/main.rs +++ b/crates/weft-servo-shell/src/main.rs @@ -2,6 +2,8 @@ use std::path::PathBuf; use anyhow::Context; +mod protocols; + fn main() -> anyhow::Result<()> { tracing_subscriber::fmt() .with_env_filter( diff --git a/crates/weft-servo-shell/src/protocols/mod.rs b/crates/weft-servo-shell/src/protocols/mod.rs new file mode 100644 index 0000000..31d9d8a --- /dev/null +++ b/crates/weft-servo-shell/src/protocols/mod.rs @@ -0,0 +1,20 @@ +#[allow(dead_code, non_camel_case_types, unused_unsafe, unused_variables)] +#[allow(non_upper_case_globals, non_snake_case, unused_imports)] +#[allow(missing_docs, clippy::all)] +pub mod client { + use wayland_client; + use wayland_client::protocol::*; + + pub mod __interfaces { + use wayland_client::protocol::__interfaces::*; + wayland_scanner::generate_interfaces!("../../protocol/weft-shell-unstable-v1.xml"); + } + use self::__interfaces::*; + + wayland_scanner::generate_client_code!("../../protocol/weft-shell-unstable-v1.xml"); +} + +#[allow(unused_imports)] +pub use client::zweft_shell_manager_v1::ZweftShellManagerV1; +#[allow(unused_imports)] +pub use client::zweft_shell_window_v1::ZweftShellWindowV1;