mirror of
https://github.com/storytold/winit.git
synced 2026-11-25 05:40:45 +01:00
Proxy -> EventLoopProxy Id -> WindowId or DeviceId WindowTarget -> EventLoopWindowTarget Handle -> MonitorHandle Mode -> VideoMode PlatformSpecificBuilderAttributes -> PlatformSpecificWindowBuilderAttributes SuperWindowId -> RootWindowId
54 lines
1.1 KiB
Rust
54 lines
1.1 KiB
Rust
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
|
use crate::monitor::{MonitorHandle as RootMonitorHandle, VideoMode as RootVideoMode};
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
pub struct MonitorHandle;
|
|
|
|
impl MonitorHandle {
|
|
pub fn scale_factor(&self) -> f64 {
|
|
1.0
|
|
}
|
|
|
|
pub fn position(&self) -> PhysicalPosition<i32> {
|
|
PhysicalPosition { x: 0, y: 0 }
|
|
}
|
|
|
|
pub fn name(&self) -> Option<String> {
|
|
None
|
|
}
|
|
|
|
pub fn size(&self) -> PhysicalSize<u32> {
|
|
PhysicalSize {
|
|
width: 0,
|
|
height: 0,
|
|
}
|
|
}
|
|
|
|
pub fn video_modes(&self) -> impl Iterator<Item = RootVideoMode> {
|
|
std::iter::empty()
|
|
}
|
|
}
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
|
pub struct VideoMode;
|
|
|
|
impl VideoMode {
|
|
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) -> RootMonitorHandle {
|
|
RootMonitorHandle {
|
|
inner: MonitorHandle,
|
|
}
|
|
}
|
|
}
|