pub trait HwndLoopCallbacks<CommandType: Debug>: Send {
    fn set_up(&mut self, hwnd: HWND) { ... }
    fn tear_down(&mut self, hwnd: HWND) { ... }
    fn handle_message(
        &mut self,
        hwnd: HWND,
        msg: UINT,
        w: WPARAM,
        l: LPARAM
    ) -> LRESULT { ... } fn handle_command(&mut self, hwnd: HWND, cmd: CommandType) { ... } }
Expand description

Callbacks called by a HwndLoop.

Provided Methods

Called on the handler thread just before the HwndLoop starts.

Called on the handler thread just before the HwndLoop terminates.

Note that if you need to wait for a message to finish tearing down, it is too late by this point. The HWND and thread will be destroyed immediateliy after this function returns.

Handle a Windows message.

Note that most messages need to have DefWindowProcA called on them for cleanup.

Handle a command sent via HwndLoop::send_command.

Implementors