2019-06-25 03:15:34 +02:00
|
|
|
use crate::dpi::{PhysicalPosition, PhysicalSize};
|
2022-03-18 14:09:39 +01:00
|
|
|
use crate::monitor::{MonitorHandle as RootMonitorHandle, VideoMode as RootVideoMode};
|
2019-06-25 03:15:34 +02:00
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
2022-03-18 14:09:39 +01:00
|
|
|
pub struct MonitorHandle;
|
2019-06-25 03:15:34 +02:00
|
|
|
|
2022-03-18 14:09:39 +01:00
|
|
|
impl MonitorHandle {
|
2020-01-03 14:52:27 -05:00
|
|
|
pub fn scale_factor(&self) -> f64 {
|
2019-06-25 03:15:34 +02:00
|
|
|
1.0
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-04 01:33:07 -05:00
|
|
|
pub fn position(&self) -> PhysicalPosition<i32> {
|
2019-12-31 14:39:33 -08:00
|
|
|
PhysicalPosition { x: 0, y: 0 }
|
2019-06-25 03:15:34 +02:00
|
|
|
}
|
|
|
|
|
|
2019-07-11 00:54:54 +02:00
|
|
|
pub fn name(&self) -> Option<String> {
|
2019-09-24 19:33:32 -04:00
|
|
|
None
|
2019-06-25 03:15:34 +02:00
|
|
|
}
|
|
|
|
|
|
2020-01-04 01:33:07 -05:00
|
|
|
pub fn size(&self) -> PhysicalSize<u32> {
|
2019-09-24 19:33:32 -04:00
|
|
|
PhysicalSize {
|
2019-12-31 14:39:33 -08:00
|
|
|
width: 0,
|
|
|
|
|
height: 0,
|
2019-09-24 19:33:32 -04:00
|
|
|
}
|
2019-06-25 03:15:34 +02:00
|
|
|
}
|
2019-07-11 00:54:54 +02:00
|
|
|
|
2022-03-18 14:09:39 +01:00
|
|
|
pub fn video_modes(&self) -> impl Iterator<Item = RootVideoMode> {
|
2019-07-11 00:54:54 +02:00
|
|
|
std::iter::empty()
|
|
|
|
|
}
|
2019-06-25 03:15:34 +02:00
|
|
|
}
|
2019-09-24 19:39:13 -04:00
|
|
|
|
2019-10-13 14:36:54 -04:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
2022-03-18 14:09:39 +01:00
|
|
|
pub struct VideoMode;
|
2019-09-24 19:39:13 -04:00
|
|
|
|
2022-03-18 14:09:39 +01:00
|
|
|
impl VideoMode {
|
2020-01-04 01:33:07 -05:00
|
|
|
pub fn size(&self) -> PhysicalSize<u32> {
|
2019-09-24 19:39:13 -04:00
|
|
|
unimplemented!();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn bit_depth(&self) -> u16 {
|
|
|
|
|
unimplemented!();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn refresh_rate(&self) -> u16 {
|
|
|
|
|
32
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-18 14:09:39 +01:00
|
|
|
pub fn monitor(&self) -> RootMonitorHandle {
|
|
|
|
|
RootMonitorHandle {
|
|
|
|
|
inner: MonitorHandle,
|
|
|
|
|
}
|
2019-09-24 19:39:13 -04:00
|
|
|
}
|
|
|
|
|
}
|