Expand description
An event loop backed by a Win32 window and thread.
A HwndLoop
consists of a message window and handler thread on which all callbacks happen.
Implementations
sourceimpl<CommandType: Send + Debug + 'static> HwndLoop<CommandType>
impl<CommandType: Send + Debug + 'static> HwndLoop<CommandType>
sourcepub fn new(
callbacks: Box<dyn HwndLoopCallbacks<CommandType>>
) -> HwndLoop<CommandType>
pub fn new(
callbacks: Box<dyn HwndLoopCallbacks<CommandType>>
) -> HwndLoop<CommandType>
Create a new HwndLoop
.
sourcepub fn send_command(&self, cmd: CommandType)
pub fn send_command(&self, cmd: CommandType)
Send a command to a HwndLoop
, to be handled by HwndLoopCallbacks::handle_command
on
the handler thread.
Trait Implementations
Auto Trait Implementations
impl<CommandType> RefUnwindSafe for HwndLoop<CommandType>
impl<CommandType> Send for HwndLoop<CommandType>
impl<CommandType> Sync for HwndLoop<CommandType>
impl<CommandType> Unpin for HwndLoop<CommandType>
impl<CommandType> UnwindSafe for HwndLoop<CommandType>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more