Struct display_info::DisplayInfo
source · pub struct DisplayInfo {
pub name: String,
pub id: u32,
pub raw_handle: HMONITOR,
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
pub rotation: f32,
pub scale_factor: f32,
pub frequency: f32,
pub is_primary: bool,
}
Fields§
§name: String
The Display Name
id: u32
Unique identifier associated with the display.
raw_handle: HMONITOR
Native screen raw handle
x: i32
The display x coordinate.
y: i32
The display x coordinate.
width: u32
The display pixel width.
height: u32
The display pixel height.
rotation: f32
Can be 0, 90, 180, 270, represents screen rotation in clock-wise degrees.
scale_factor: f32
Output device’s pixel scale factor.
frequency: f32
The display refresh rate.
is_primary: bool
Whether the screen is the main screen
Implementations§
source§impl DisplayInfo
impl DisplayInfo
sourcepub fn all() -> Result<Vec<DisplayInfo>>
pub fn all() -> Result<Vec<DisplayInfo>>
sourcepub fn from_point(x: i32, y: i32) -> Result<DisplayInfo>
pub fn from_point(x: i32, y: i32) -> Result<DisplayInfo>
pub fn from_name(name: impl ToString) -> Result<DisplayInfo>
Trait Implementations§
source§impl Clone for DisplayInfo
impl Clone for DisplayInfo
source§fn clone(&self) -> DisplayInfo
fn clone(&self) -> DisplayInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DisplayInfo
impl RefUnwindSafe for DisplayInfo
impl Send for DisplayInfo
impl Sync for DisplayInfo
impl Unpin for DisplayInfo
impl UnwindSafe for DisplayInfo
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