* Begin implementing DPI generics * Fix multithreaded example * Format * Fix serde test * hopefully fix most of the errors * Fix dpi module errors * More error fixings * Format * fix macos errors * Another error pass * Replace bad type signatures * more fixins
51 lines
1 KiB
Rust
51 lines
1 KiB
Rust
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
|
use crate::monitor::{MonitorHandle, VideoMode};
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
pub struct Handle;
|
|
|
|
impl Handle {
|
|
pub fn hidpi_factor(&self) -> f64 {
|
|
1.0
|
|
}
|
|
|
|
pub fn position(&self) -> PhysicalPosition<i32> {
|
|
PhysicalPosition { x: 0.0, y: 0.0 }
|
|
}
|
|
|
|
pub fn name(&self) -> Option<String> {
|
|
None
|
|
}
|
|
|
|
pub fn size(&self) -> PhysicalSize<u32> {
|
|
PhysicalSize {
|
|
width: 0.0,
|
|
height: 0.0,
|
|
}
|
|
}
|
|
|
|
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
|
|
std::iter::empty()
|
|
}
|
|
}
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
|
pub struct Mode;
|
|
|
|
impl Mode {
|
|
pub fn size(&self) -> PhysicalSize<u32> {
|
|
unimplemented!();
|
|
}
|
|
|
|
pub fn bit_depth(&self) -> u16 {
|
|
unimplemented!();
|
|
}
|
|
|
|
pub fn refresh_rate(&self) -> u16 {
|
|
32
|
|
}
|
|
|
|
pub fn monitor(&self) -> MonitorHandle {
|
|
MonitorHandle { inner: Handle }
|
|
}
|
|
}
|