pub struct Screen {
pub id: ScreenId,
pub name: String,
pub frame: Rect,
pub visible_frame: Rect,
pub scale: f64,
pub refresh_rate: Option<f64>,
}Expand description
A monitor: where it is (the frames, for placing windows) and what drawing on it needs
(Flutter’s Display: id, devicePixelRatio, refreshRate; Display.size is the frame’s
size at scale).
Fields§
§id: ScreenIdFlutter Display.id; stable while the screen stays connected.
name: StringWhat the system calls it: “Built-in Retina Display”. Empty where the host has no name for it.
frame: RectAll of it, in points, placed on the desktop.
visible_frame: RectWhat the system’s own bars leave free: the menu bar and the Dock, or the taskbar. The whole frame where the host cannot say.
scale: f64Flutter Display.devicePixelRatio: physical pixels per point, as on every view on the
screen.
refresh_rate: Option<f64>Flutter Display.refreshRate, in hertz; none where the host cannot say.
Trait Implementations§
impl StructuralPartialEq for Screen
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnsafeUnpin for Screen
impl UnwindSafe for Screen
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