pub trait INSApplication: INSResponder {
Show 21 methods
// Provided methods
fn p_shared_application() -> Self
where Self: Sized + FromId { ... }
fn p_delegate(&self) -> id { ... }
fn p_set_delegate<'app, T>(&'app mut self, app_delegate: T)
where T: PNSApplicationDelegate + 'app { ... }
fn p_running(&self) -> bool { ... }
fn m_run(&self) { ... }
fn m_finish_launching(&self) { ... }
fn m_stop(&self, sender: id) { ... }
fn m_terminate(&self, sender: id) { ... }
fn m_reply_to_application_should_terminate(&self, should_terminate: bool) { ... }
fn p_active(&self) -> bool { ... }
fn m_activate_ignoring_other_apps(&mut self, flag: bool) { ... }
fn m_deactivate(&mut self) { ... }
fn m_disable_relaunch_on_login(&mut self) { ... }
fn m_enable_relaunch_on_login(&mut self) { ... }
fn m_register_for_remote_notifications(&mut self) { ... }
fn m_unregister_for_remote_notifications(&mut self) { ... }
fn m_reply_to_open_or_print(&self, response: NSApplicationDelegateReply) { ... }
fn m_activation_policy(&self) -> NSApplicationActivationPolicy { ... }
fn m_set_activation_policy(&mut self, policy: NSApplicationActivationPolicy) { ... }
fn p_main_menu(&self) -> NSMenu { ... }
fn p_set_main_menu(&mut self, menu: NSMenu) { ... }
}Expand description
An object that manages an app’s main event loop and resources used by all of that app’s objects.
Provided Methods§
Returns the application instance, creating it if it doesn’t exist yet.
Sourcefn p_delegate(&self) -> id
fn p_delegate(&self) -> id
The app delegate object.
Sourcefn p_set_delegate<'app, T>(&'app mut self, app_delegate: T)where
T: PNSApplicationDelegate + 'app,
fn p_set_delegate<'app, T>(&'app mut self, app_delegate: T)where
T: PNSApplicationDelegate + 'app,
Sets the app delegate object.
Sourcefn m_finish_launching(&self)
fn m_finish_launching(&self)
Activates the app, opens any files specified by the NSOpen user default, and unhighlights the app’s icon.
Sourcefn m_terminate(&self, sender: id)
fn m_terminate(&self, sender: id)
Terminates the receiver.
Sourcefn m_reply_to_application_should_terminate(&self, should_terminate: bool)
fn m_reply_to_application_should_terminate(&self, should_terminate: bool)
Responds to NSTerminateLater once the app knows whether it can terminate.
Sourcefn m_activate_ignoring_other_apps(&mut self, flag: bool)
fn m_activate_ignoring_other_apps(&mut self, flag: bool)
Makes the receiver the active app.
Sourcefn m_deactivate(&mut self)
fn m_deactivate(&mut self)
Deactivates the receiver.
Sourcefn m_disable_relaunch_on_login(&mut self)
fn m_disable_relaunch_on_login(&mut self)
Disables relaunching the app on login.
Sourcefn m_enable_relaunch_on_login(&mut self)
fn m_enable_relaunch_on_login(&mut self)
Enables relaunching the app on login.
Sourcefn m_register_for_remote_notifications(&mut self)
fn m_register_for_remote_notifications(&mut self)
Register for notifications sent by Apple Push Notification service (APNs).
Sourcefn m_unregister_for_remote_notifications(&mut self)
fn m_unregister_for_remote_notifications(&mut self)
Unregister for notifications received from Apple Push Notification service.
Sourcefn m_reply_to_open_or_print(&self, response: NSApplicationDelegateReply)
fn m_reply_to_open_or_print(&self, response: NSApplicationDelegateReply)
Handles errors that might occur when the user attempts to open or print files.
Sourcefn m_activation_policy(&self) -> NSApplicationActivationPolicy
fn m_activation_policy(&self) -> NSApplicationActivationPolicy
Returns the app’s activation policy.
Sourcefn m_set_activation_policy(&mut self, policy: NSApplicationActivationPolicy)
fn m_set_activation_policy(&mut self, policy: NSApplicationActivationPolicy)
The app’s main menu bar.
Sets the app’s main menu bar.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.