pub struct Monitor {
pub id: String,
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
pub primary: bool,
pub scale: u32,
}Expand description
One monitor: its size in physical pixels, and where it sits in the system’s display arrangement.
Fields§
§id: StringStable id that survives reboots and re-plugging: the device path on Windows. Per-monitor seeds and saved scenes key on it.
x: i32Its top-left corner in the system’s display arrangement (the origin can be negative), in the arrangement’s units: pixels on Windows, points on macOS.
y: i32§width: u32Its size in physical pixels.
height: u32§primary: bool§scale: u32Physical pixels per arrangement unit: 2 on a Retina screen, 1 elsewhere (and always on Windows, which arranges in pixels).
Implementations§
Trait Implementations§
impl Eq for Monitor
impl StructuralPartialEq for Monitor
Auto Trait Implementations§
impl Forget for Monitor
impl Freeze for Monitor
impl Move for Monitor
impl RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl UnsafeUnpin for Monitor
impl UnwindSafe for Monitor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more