pub struct Monitor { /* private fields */ }Available on crate feature
winio only.Expand description
Represents the geometry of a monitor.
Implementations§
Source§impl Monitor
impl Monitor
Sourcepub fn new(
region: Rect<f64, LogicalSpace>,
client: Rect<f64, LogicalSpace>,
dpi: Size2D<f64, LogicalSpace>,
) -> Monitor
pub fn new( region: Rect<f64, LogicalSpace>, client: Rect<f64, LogicalSpace>, dpi: Size2D<f64, LogicalSpace>, ) -> Monitor
Create a monitor geometry.
Sourcepub fn region(&self) -> Rect<f64, LogicalSpace>
pub fn region(&self) -> Rect<f64, LogicalSpace>
The physical region.
Sourcepub fn client(&self) -> Rect<f64, LogicalSpace>
pub fn client(&self) -> Rect<f64, LogicalSpace>
The client region.
Sourcepub fn dpi(&self) -> Size2D<f64, LogicalSpace>
pub fn dpi(&self) -> Size2D<f64, LogicalSpace>
Dpi of the monitor, 1.0 if no scale. You should take it into
consideration when setting the location of windows.
See Monitor::region_scaled & Monitor::client_scaled.
Sourcepub fn region_scaled(&self) -> Rect<f64, LogicalSpace>
pub fn region_scaled(&self) -> Rect<f64, LogicalSpace>
Scaled physical region.
Sourcepub fn client_scaled(&self) -> Rect<f64, LogicalSpace>
pub fn client_scaled(&self) -> Rect<f64, LogicalSpace>
Scaled client region.
Trait Implementations§
impl StructuralPartialEq for Monitor
Auto Trait Implementations§
impl Freeze for Monitor
impl RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more