#[repr(C)]pub struct WindowSize {
pub dimensions: LogicalSize,
pub dpi: u32,
pub min_dimensions: OptionLogicalSize,
pub max_dimensions: OptionLogicalSize,
}Fields§
§dimensions: LogicalSizeWidth and height of the window, in logical units (may not correspond to the physical on-screen size)
dpi: u32Actual DPI value (default: 96)
min_dimensions: OptionLogicalSizeMinimum dimensions of the window
max_dimensions: OptionLogicalSizeMaximum dimensions of the window
Implementations§
Source§impl WindowSize
impl WindowSize
pub fn get_layout_size(&self) -> LayoutSize
Sourcepub fn get_logical_size(&self) -> LogicalSize
pub fn get_logical_size(&self) -> LogicalSize
Get the actual logical size
pub fn get_physical_size(&self) -> PhysicalSize<u32>
pub fn get_hidpi_factor(&self) -> f32
Trait Implementations§
Source§impl Clone for WindowSize
impl Clone for WindowSize
Source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
Returns a duplicate 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 moreSource§impl Debug for WindowSize
impl Debug for WindowSize
Source§impl Default for WindowSize
impl Default for WindowSize
Source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
Source§impl PartialOrd for WindowSize
impl PartialOrd for WindowSize
impl Copy for WindowSize
impl StructuralPartialEq for WindowSize
Auto Trait Implementations§
impl Freeze for WindowSize
impl RefUnwindSafe for WindowSize
impl Send for WindowSize
impl Sync for WindowSize
impl Unpin for WindowSize
impl UnwindSafe for WindowSize
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> 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