pub struct Monitor { /* private fields */ }
Implementations§
Source§impl Monitor
impl Monitor
pub fn new() -> Self
pub fn register_keyboard_callback( &self, callback: Box<dyn Fn(Vec<KeyboardEvent>) + Send + Sync>, )
pub fn register_mouse_callback( &self, callback: Box<dyn Fn(Vec<MouseEvent>) + Send + Sync>, )
pub fn register_window_callback( &self, callback: Box<dyn Fn(WindowEvent) + Send + Sync>, )
Trait Implementations§
Source§impl EventCallback for Monitor
impl EventCallback for Monitor
fn on_mouse_events(&self, events: Vec<MouseEvent>)
fn on_keyboard_events(&self, events: Vec<KeyboardEvent>)
fn on_window_event(&self, event: WindowEvent)
Auto Trait Implementations§
impl !Freeze for Monitor
impl RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl UnwindSafe for Monitor
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