display.rs

 1use crate::{point, size, Bounds, DisplayId, GlobalPixels, PlatformDisplay};
 2use anyhow::Result;
 3use uuid::Uuid;
 4
 5#[derive(Debug)]
 6pub(crate) struct LinuxDisplay;
 7
 8impl PlatformDisplay for LinuxDisplay {
 9    fn id(&self) -> DisplayId {
10        DisplayId(0)
11    }
12
13    fn uuid(&self) -> Result<Uuid> {
14        Ok(Uuid::from_bytes([0; 16]))
15    }
16
17    fn bounds(&self) -> Bounds<GlobalPixels> {
18        Bounds {
19            origin: point(GlobalPixels(0.0), GlobalPixels(0.0)),
20            size: size(GlobalPixels(100.0), GlobalPixels(100.0)),
21        }
22    }
23}