pub struct HwndLoop<CommandType: Send + Debug + 'static> { /* private fields */ }
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§
Source§impl<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> Freeze for HwndLoop<CommandType>
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§
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