Return true in the Window::on_event
callback if event was handled
This commit is contained in:
parent
ae2273b40a
commit
607903eed5
5 changed files with 15 additions and 9 deletions
|
@ -90,7 +90,7 @@ pub trait Dispatcher: Send + Sync {
|
|||
|
||||
pub trait Window: WindowContext {
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any;
|
||||
fn on_event(&mut self, callback: Box<dyn FnMut(Event)>);
|
||||
fn on_event(&mut self, callback: Box<dyn FnMut(Event) -> bool>);
|
||||
fn on_active_status_change(&mut self, callback: Box<dyn FnMut(bool)>);
|
||||
fn on_resize(&mut self, callback: Box<dyn FnMut()>);
|
||||
fn on_close(&mut self, callback: Box<dyn FnOnce()>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue