[−][src]Struct druid_shell::windows::IdleHandle
A handle that can get used to schedule an idle handler. Note that this handle is thread safe. If the handle is used after the hwnd has been destroyed, probably not much will go wrong (the XI_RUN_IDLE message may be sent to a stray window).
Methods
impl IdleHandle[src]
pub fn add_idle<F>(&self, callback: F) where
F: FnOnce(&mut dyn Any) + Send + 'static, [src]
F: FnOnce(&mut dyn Any) + Send + 'static,
Add an idle handler, which is called (once) when the message loop is empty. The idle handler will be run from the window's wndproc, which means it won't be scheduled if the window is closed.
Trait Implementations
impl Send for IdleHandle[src]
impl Clone for IdleHandle[src]
fn clone(&self) -> IdleHandle[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !Sync for IdleHandle
impl Unpin for IdleHandle
impl UnwindSafe for IdleHandle
impl RefUnwindSafe for IdleHandle
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,