pub struct Monitor { /* private fields */ }
Expand description
Monitor struct containing data about a monitor on the system
Use Screen::get_monitors
to return a Vec<Monitor>
of all the monitors on the system
Implementations§
source§impl Monitor
impl Monitor
sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Returns true if the monitor is the primary monitor. The primary monitor has its origin at (0, 0) in virtual screen coordinates.
sourcepub fn virtual_rect(&self) -> Rect
pub fn virtual_rect(&self) -> Rect
Returns the monitor rectangle in virtual screen coordinates.
sourcepub fn virtual_work_rect(&self) -> Rect
pub fn virtual_work_rect(&self) -> Rect
Returns the monitor working rectangle in virtual screen coordinates. The working rectangle excludes certain things like the dock and menubar on mac, and the taskbar on windows.
Trait Implementations§
source§impl PartialEq<Monitor> for Monitor
impl PartialEq<Monitor> for Monitor
impl StructuralPartialEq for Monitor
Auto Trait Implementations§
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> 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> ⓘ
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.