pub mod cli;
pub mod desktop_input;
pub mod scene;
#[cfg(target_os = "linux")]
pub mod audio;
#[cfg(target_os = "linux")]
pub mod keysynth;
#[cfg(target_os = "linux")]
pub mod terminal;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ProductIdentity {
pub slug: &'static str,
pub display_name: &'static str,
pub compositor_name: &'static str,
}
pub trait TerminalInjector {
fn key(&mut self, code: u32, pressed: bool) -> io::Result<()>;
fn pointer_absolute(&mut self, x: u32, y: u32) -> io::Result<()>;
fn pointer_button(&mut self, button: u32, pressed: bool) -> io::Result<()>;
fn pointer_axis(&mut self, axis: u32, delta: i32) -> io::Result<()>;
fn release_all(&mut self) -> io::Result<()>;
}
use std::io;
#[cfg(test)]
mod branding {
#[test]
fn shared_modules_contain_no_product_name() {
let manifest = env!("CARGO_MANIFEST_DIR");
for file in [
"src/producer/audio.rs",
"src/producer/cli.rs",
"src/producer/desktop_input.rs",
"src/producer/keysynth.rs",
"src/producer/scene.rs",
"src/producer/terminal.rs",
] {
let source = std::fs::read_to_string(format!("{manifest}/{file}")).unwrap();
for name in [
"veston", "vvsway", "vvland", "Veston", "Vvsway", "Vvland", "Weston", "Sway",
] {
assert!(
!source.contains(name),
"{file} contains the product name {name:?}"
);
}
}
}
}