Files
oak-gpui/crates/gpui/src/platform/windows/display.rs
T
白山風露andMarshall Bowers 69e0474ebb Windows gpui platform (#8490)
First implementation of gpui platform for Windows.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-03-03 10:53:22 -08:00

37 lines
762 B
Rust

use anyhow::{anyhow, Result};
use uuid::Uuid;
use crate::{Bounds, DisplayId, GlobalPixels, PlatformDisplay, Point, Size};
#[derive(Debug)]
pub(crate) struct WindowsDisplay;
impl WindowsDisplay {
pub(crate) fn new() -> Self {
Self
}
}
impl PlatformDisplay for WindowsDisplay {
// todo!("windows")
fn id(&self) -> DisplayId {
DisplayId(1)
}
// todo!("windows")
fn uuid(&self) -> Result<Uuid> {
Err(anyhow!("not implemented yet."))
}
// todo!("windows")
fn bounds(&self) -> Bounds<GlobalPixels> {
Bounds::new(
Point::new(0.0.into(), 0.0.into()),
Size {
width: 1920.0.into(),
height: 1280.0.into(),
},
)
}
}