Struct wineventhook::WindowEventHook
source · pub struct WindowEventHook { /* private fields */ }
Expand description
A hook with a message loop that listens for window events.
Implementations§
source§impl WindowEventHook
impl WindowEventHook
sourcepub async fn hook(
filter: EventFilter,
event_tx: UnboundedSender<WindowEvent>
) -> Result<Self, Error>
pub async fn hook( filter: EventFilter, event_tx: UnboundedSender<WindowEvent> ) -> Result<Self, Error>
Creates a new WindowEventHook
that listens to the events matching the given filter.
An WindowEvent
is sent to the given event_tx
whenever an event matching the filter is received.
A dedicated event loop thread is created to be able to receive events.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WindowEventHook
impl Send for WindowEventHook
impl Sync for WindowEventHook
impl Unpin for WindowEventHook
impl !UnwindSafe for WindowEventHook
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