Dispatch keystrokes and fix rerendering when window invalidated

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2021-03-21 11:38:23 -06:00
co-authored by Antonio Scandurra
parent f5df3681f8
commit 046fe3fff9
9 changed files with 55 additions and 27 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ pub trait Dispatcher: Send + Sync {
}
pub trait Window: WindowContext {
fn on_event(&mut self, callback: Box<dyn FnMut(Event, &mut dyn WindowContext)>);
fn on_event(&mut self, callback: Box<dyn FnMut(Event)>);
fn on_resize(&mut self, callback: Box<dyn FnMut(&mut dyn WindowContext)>);
}