Introduce close_requested for multi-window

This commit is contained in:
Richard 2022-07-27 15:37:48 -03:00 committed by bungoboingo
parent 35331d0a41
commit dc86bd0373
4 changed files with 26 additions and 4 deletions

View file

@ -113,6 +113,9 @@ pub trait Application: Sized {
false
}
/// TODO(derezzedex)
fn close_requested(&self, window: window::Id) -> Self::Message;
/// Runs the [`Application`].
///
/// On native platforms, this method will take control of the current thread
@ -207,4 +210,8 @@ where
fn should_exit(&self) -> bool {
self.0.should_exit()
}
fn close_requested(&self, window: window::Id) -> Self::Message {
self.0.close_requested(window)
}
}