Struct wry::application::monitor::MonitorHandle
source · [−]pub struct MonitorHandle { /* private fields */ }
Expand description
Handle to a monitor.
Allows you to retrieve information about a given monitor and can be used in Window
creation.
Implementations
sourceimpl MonitorHandle
impl MonitorHandle
sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Returns a human-readable name of the monitor.
Returns None
if the monitor doesn’t exist anymore.
sourcepub fn size(&self) -> PhysicalSize<u32>
pub fn size(&self) -> PhysicalSize<u32>
Returns the monitor’s resolution.
sourcepub fn position(&self) -> PhysicalPosition<i32>
pub fn position(&self) -> PhysicalPosition<i32>
Returns the top-left corner position of the monitor relative to the larger full screen area.
sourcepub fn scale_factor(&self) -> f64
pub fn scale_factor(&self) -> f64
Returns the scale factor that can be used to map logical pixels to physical pixels, and vice versa.
See the dpi
module for more information.
Platform-specific
- Android: Always returns 1.0.
sourcepub fn video_modes(&self) -> impl Iterator<Item = VideoMode>
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode>
Returns all fullscreen video modes supported by this monitor.
Platform-specific
- Linux: Unsupported. This will always return empty iterator.
Trait Implementations
sourceimpl Clone for MonitorHandle
impl Clone for MonitorHandle
sourcepub fn clone(&self) -> MonitorHandle
pub fn clone(&self) -> MonitorHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MonitorHandle
impl Debug for MonitorHandle
sourceimpl Ord for MonitorHandle
impl Ord for MonitorHandle
sourceimpl PartialEq<MonitorHandle> for MonitorHandle
impl PartialEq<MonitorHandle> for MonitorHandle
sourcepub fn eq(&self, other: &MonitorHandle) -> bool
pub fn eq(&self, other: &MonitorHandle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &MonitorHandle) -> bool
pub fn ne(&self, other: &MonitorHandle) -> bool
This method tests for !=
.
sourceimpl PartialOrd<MonitorHandle> for MonitorHandle
impl PartialOrd<MonitorHandle> for MonitorHandle
sourcepub fn partial_cmp(&self, other: &MonitorHandle) -> Option<Ordering>
pub fn partial_cmp(&self, other: &MonitorHandle) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for MonitorHandle
impl StructuralEq for MonitorHandle
impl StructuralPartialEq for MonitorHandle
Auto Trait Implementations
impl RefUnwindSafe for MonitorHandle
impl Send for MonitorHandle
impl Sync for MonitorHandle
impl Unpin for MonitorHandle
impl UnwindSafe for MonitorHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more