INSApplication

Trait INSApplication 

Source
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§

Source

fn p_shared_application() -> Self
where Self: Sized + FromId,

Returns the application instance, creating it if it doesn’t exist yet.

Source

fn p_delegate(&self) -> id

The app delegate object.

Source

fn p_set_delegate<'app, T>(&'app mut self, app_delegate: T)
where T: PNSApplicationDelegate + 'app,

Sets the app delegate object.

Source

fn p_running(&self) -> bool

A Boolean value indicating whether the main event loop is running.

Source

fn m_run(&self)

Starts the main event loop.

Source

fn m_finish_launching(&self)

Activates the app, opens any files specified by the NSOpen user default, and unhighlights the app’s icon.

Source

fn m_stop(&self, sender: id)

Stops the main event loop.

Source

fn m_terminate(&self, sender: id)

Terminates the receiver.

Source

fn m_reply_to_application_should_terminate(&self, should_terminate: bool)

Responds to NSTerminateLater once the app knows whether it can terminate.

Source

fn p_active(&self) -> bool

A Boolean value indicating whether this is the active app.

Source

fn m_activate_ignoring_other_apps(&mut self, flag: bool)

Makes the receiver the active app.

Source

fn m_deactivate(&mut self)

Deactivates the receiver.

Source

fn m_disable_relaunch_on_login(&mut self)

Disables relaunching the app on login.

Source

fn m_enable_relaunch_on_login(&mut self)

Enables relaunching the app on login.

Source

fn m_register_for_remote_notifications(&mut self)

Register for notifications sent by Apple Push Notification service (APNs).

Source

fn m_unregister_for_remote_notifications(&mut self)

Unregister for notifications received from Apple Push Notification service.

Source

fn m_reply_to_open_or_print(&self, response: NSApplicationDelegateReply)

Handles errors that might occur when the user attempts to open or print files.

Source

fn m_activation_policy(&self) -> NSApplicationActivationPolicy

Returns the app’s activation policy.

Source

fn m_set_activation_policy(&mut self, policy: NSApplicationActivationPolicy)

Sets the app’s activation policy.

§Arguments
  • policy - The activation policy to set.
Source

fn p_main_menu(&self) -> NSMenu

The app’s main menu bar.

Source

fn p_set_main_menu(&mut self, menu: NSMenu)

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.

Implementors§