pub struct ShellControl<'a> { /* private fields */ }Expand description
Steering handle passed to ShellHost::on_idle.
Implementations§
Source§impl ShellControl<'_>
impl ShellControl<'_>
Sourcepub fn redraw_policy(&self) -> RedrawPolicy
pub fn redraw_policy(&self) -> RedrawPolicy
Current redraw policy.
Sourcepub fn set_redraw_policy(&mut self, policy: RedrawPolicy)
pub fn set_redraw_policy(&mut self, policy: RedrawPolicy)
Switch between reactive and continuous redraw at runtime.
Sourcepub fn painted(&self) -> bool
pub fn painted(&self) -> bool
Whether a frame was painted in this loop iteration. false means the
loop is idling — nothing asked for a frame.
Sourcepub fn pointer_idle(&self) -> bool
pub fn pointer_idle(&self) -> bool
Whether no mouse button is currently held. The gate an app’s own
auto-save should use so a drag/resize doesn’t thrash the disk; the
shell applies the same gate to its crate::WindowBoundsStore.
Sourcepub fn request_exit(&mut self)
pub fn request_exit(&mut self)
Close the window and leave the event loop after this iteration.
Sourcepub fn request_relaunch(&mut self)
pub fn request_relaunch(&mut self)
Leave the event loop and start a fresh copy of this executable.
Used for settings that can only be applied at startup (MSAA sample
count, backend selection). The spawn happens after the loop exits and
after ShellHost::on_exit and the bounds store have run, so the
child sees the state this run just saved.
Auto Trait Implementations§
impl<'a> !UnwindSafe for ShellControl<'a>
impl<'a> Freeze for ShellControl<'a>
impl<'a> RefUnwindSafe for ShellControl<'a>
impl<'a> Send for ShellControl<'a>
impl<'a> Sync for ShellControl<'a>
impl<'a> Unpin for ShellControl<'a>
impl<'a> UnsafeUnpin for ShellControl<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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