pub struct ScreenInfo<'a> { /* private fields */ }Expand description
Screen information similar to the one returned by window.getScreenDetails() method, see https://w3c.github.io/window-management/#screendetailed.
Implementations§
Source§impl<'a> ScreenInfo<'a>
impl<'a> ScreenInfo<'a>
Sourcepub fn builder(
left: i64,
top: i64,
width: u64,
height: i64,
avail_left: i64,
avail_top: i64,
avail_width: u64,
avail_height: i64,
device_pixel_ratio: f64,
orientation: ScreenOrientation<'a>,
color_depth: i64,
is_extended: bool,
is_internal: bool,
is_primary: bool,
label: impl Into<Cow<'a, str>>,
id: impl Into<ScreenId<'a>>,
) -> ScreenInfoBuilder<'a>
pub fn builder( left: i64, top: i64, width: u64, height: i64, avail_left: i64, avail_top: i64, avail_width: u64, avail_height: i64, device_pixel_ratio: f64, orientation: ScreenOrientation<'a>, color_depth: i64, is_extended: bool, is_internal: bool, is_primary: bool, label: impl Into<Cow<'a, str>>, id: impl Into<ScreenId<'a>>, ) -> ScreenInfoBuilder<'a>
Creates a builder for this type with the required parameters:
left: Offset of the left edge of the screen.top: Offset of the top edge of the screen.width: Width of the screen.height: Height of the screen.avail_left: Offset of the left edge of the available screen area.avail_top: Offset of the top edge of the available screen area.avail_width: Width of the available screen area.avail_height: Height of the available screen area.device_pixel_ratio: Specifies the screen’s device pixel ratio.orientation: Specifies the screen’s orientation.color_depth: Specifies the screen’s color depth in bits.is_extended: Indicates whether the device has multiple screens.is_internal: Indicates whether the screen is internal to the device or external, attached to the device.is_primary: Indicates whether the screen is set as the the operating system primary screen.label: Specifies the descriptive label for the screen.id: Specifies the unique identifier of the screen.
Sourcepub fn avail_left(&self) -> i64
pub fn avail_left(&self) -> i64
Offset of the left edge of the available screen area.
Sourcepub fn avail_width(&self) -> u64
pub fn avail_width(&self) -> u64
Width of the available screen area.
Sourcepub fn avail_height(&self) -> i64
pub fn avail_height(&self) -> i64
Height of the available screen area.
Sourcepub fn device_pixel_ratio(&self) -> f64
pub fn device_pixel_ratio(&self) -> f64
Specifies the screen’s device pixel ratio.
Sourcepub fn orientation(&self) -> &ScreenOrientation<'a>
pub fn orientation(&self) -> &ScreenOrientation<'a>
Specifies the screen’s orientation.
Sourcepub fn color_depth(&self) -> i64
pub fn color_depth(&self) -> i64
Specifies the screen’s color depth in bits.
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Indicates whether the device has multiple screens.
Sourcepub fn is_internal(&self) -> bool
pub fn is_internal(&self) -> bool
Indicates whether the screen is internal to the device or external, attached to the device.
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Indicates whether the screen is set as the the operating system primary screen.
Trait Implementations§
Source§impl<'a> Clone for ScreenInfo<'a>
impl<'a> Clone for ScreenInfo<'a>
Source§fn clone(&self) -> ScreenInfo<'a>
fn clone(&self) -> ScreenInfo<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ScreenInfo<'a>
impl<'a> Debug for ScreenInfo<'a>
Source§impl<'a> Default for ScreenInfo<'a>
impl<'a> Default for ScreenInfo<'a>
Source§fn default() -> ScreenInfo<'a>
fn default() -> ScreenInfo<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for ScreenInfo<'a>
impl<'de, 'a> Deserialize<'de> for ScreenInfo<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for ScreenInfo<'a>
impl<'a> RefUnwindSafe for ScreenInfo<'a>
impl<'a> Send for ScreenInfo<'a>
impl<'a> Sync for ScreenInfo<'a>
impl<'a> Unpin for ScreenInfo<'a>
impl<'a> UnsafeUnpin for ScreenInfo<'a>
impl<'a> UnwindSafe for ScreenInfo<'a>
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