pub struct OsWindowHandle {
pub size: Rc<Cell<(u32, u32)>>,
pub fullscreen: Rc<Cell<bool>>,
pub maximized: Rc<Cell<bool>>,
}Expand description
Live shared cells the platform harness mutates during the event loop.
Cheap to clone — all fields are Rc<Cell<...>>. The harness updates
size on every Resized, fullscreen / maximized on the
corresponding state-change events. Widgets that want to reflect the
current OS window state read the cells directly.
Fields§
§size: Rc<Cell<(u32, u32)>>§fullscreen: Rc<Cell<bool>>§maximized: Rc<Cell<bool>>Implementations§
Source§impl OsWindowHandle
impl OsWindowHandle
pub fn new() -> Self
Sourcepub fn apply(&self, s: &OsWindowState)
pub fn apply(&self, s: &OsWindowState)
Load an initial snapshot into the cells so first-frame code sees the
about-to-be-applied state before any Resized event fires.
Trait Implementations§
Source§impl Clone for OsWindowHandle
impl Clone for OsWindowHandle
Source§fn clone(&self) -> OsWindowHandle
fn clone(&self) -> OsWindowHandle
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 moreAuto Trait Implementations§
impl Freeze for OsWindowHandle
impl !RefUnwindSafe for OsWindowHandle
impl !Send for OsWindowHandle
impl !Sync for OsWindowHandle
impl Unpin for OsWindowHandle
impl UnsafeUnpin for OsWindowHandle
impl !UnwindSafe for OsWindowHandle
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