use std::sync::mpsc::Receiver;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ScreenCaptureRequest {
pub monitors: bool,
pub windows: bool,
pub embed_cursor: bool,
}
impl Default for ScreenCaptureRequest {
fn default() -> Self {
Self {
monitors: true,
windows: true,
embed_cursor: true,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum CaptureStream {
PipeWire { node_id: u32 },
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ScreenCaptureGrant {
pub stream: CaptureStream,
pub size: Option<(u32, u32)>,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ScreenCaptureOutcome {
Granted(ScreenCaptureGrant),
Cancelled,
Unavailable(String),
}
pub type ScreenCaptureChannel = Receiver<ScreenCaptureOutcome>;