Rename internal structs for consistency (#2149)

Proxy -> EventLoopProxy
Id -> WindowId or DeviceId
WindowTarget -> EventLoopWindowTarget
Handle -> MonitorHandle
Mode -> VideoMode
PlatformSpecificBuilderAttributes -> PlatformSpecificWindowBuilderAttributes
SuperWindowId -> RootWindowId
This commit is contained in:
Mads Marquart 2022-03-18 14:09:39 +01:00 committed by GitHub
parent 85baf79d17
commit a438091266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 134 additions and 135 deletions

View file

@ -1,10 +1,10 @@
use crate::dpi::{PhysicalPosition, PhysicalSize};
use crate::monitor::{MonitorHandle, VideoMode};
use crate::monitor::{MonitorHandle as RootMonitorHandle, VideoMode as RootVideoMode};
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Handle;
pub struct MonitorHandle;
impl Handle {
impl MonitorHandle {
pub fn scale_factor(&self) -> f64 {
1.0
}
@ -24,15 +24,15 @@ impl Handle {
}
}
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
pub fn video_modes(&self) -> impl Iterator<Item = RootVideoMode> {
std::iter::empty()
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Mode;
pub struct VideoMode;
impl Mode {
impl VideoMode {
pub fn size(&self) -> PhysicalSize<u32> {
unimplemented!();
}
@ -45,7 +45,9 @@ impl Mode {
32
}
pub fn monitor(&self) -> MonitorHandle {
MonitorHandle { inner: Handle }
pub fn monitor(&self) -> RootMonitorHandle {
RootMonitorHandle {
inner: MonitorHandle,
}
}
}