pub trait AppDelegate: Send + Sync {
// Provided methods
fn will_finish_launching(&mut self) { ... }
fn did_finish_launching(&mut self) { ... }
fn will_become_active(&mut self) { ... }
fn did_become_active(&mut self) { ... }
fn will_resign_active(&mut self) { ... }
fn did_resign_active(&mut self) { ... }
fn should_terminate(&self) -> bool { ... }
fn will_terminate(&mut self) { ... }
fn _window_will_close(&self, _window_id: usize) { ... }
}Expand description
Each platform tends to have their own startup routine, their own runloop, and so on.
Alchemy recognizes this and provides an AppDelegate that receives events at a system
level and allows the user to operate within the established framework per-system.
Provided Methods§
Sourcefn will_finish_launching(&mut self)
fn will_finish_launching(&mut self)
Fired when an Application is about to finish launching.
Sourcefn did_finish_launching(&mut self)
fn did_finish_launching(&mut self)
Fired when an Application has finished launching - this is a good place to, say, show your window.
Sourcefn will_become_active(&mut self)
fn will_become_active(&mut self)
Fired when an Application will become active.
Sourcefn did_become_active(&mut self)
fn did_become_active(&mut self)
Fired when an Application became active.
Sourcefn will_resign_active(&mut self)
fn will_resign_active(&mut self)
Fired when an Application will resign active. You can use this to, say, persist resources or state.
Sourcefn did_resign_active(&mut self)
fn did_resign_active(&mut self)
Fired when an Application has resigned active.
Sourcefn should_terminate(&self) -> bool
fn should_terminate(&self) -> bool
Fired when an Application is going to terminate. You can use this to, say, instruct the system to “wait a minute, lemme finish”.
Sourcefn will_terminate(&mut self)
fn will_terminate(&mut self)
Fired when the Application has determined “no, you’re done, stop the world”.
Sourcefn _window_will_close(&self, _window_id: usize)
fn _window_will_close(&self, _window_id: usize)
A private trait method that you shouldn’t call. This may change or disappear in later releases. Do not rely on this.