Trait objc2_app_kit::NSApplicationDelegate

source ·
pub unsafe trait NSApplicationDelegate: NSObjectProtocol + IsMainThreadOnly {
Show 43 methods // Provided methods unsafe fn applicationShouldTerminate( &self, sender: &NSApplication ) -> NSApplicationTerminateReply where Self: Sized + Message { ... } unsafe fn application_openURLs( &self, application: &NSApplication, urls: &NSArray<NSURL> ) where Self: Sized + Message { ... } unsafe fn application_openFile( &self, sender: &NSApplication, filename: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn application_openFiles( &self, sender: &NSApplication, filenames: &NSArray<NSString> ) where Self: Sized + Message { ... } unsafe fn application_openTempFile( &self, sender: &NSApplication, filename: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn applicationShouldOpenUntitledFile( &self, sender: &NSApplication ) -> bool where Self: Sized + Message { ... } unsafe fn applicationOpenUntitledFile(&self, sender: &NSApplication) -> bool where Self: Sized + Message { ... } unsafe fn application_openFileWithoutUI( &self, sender: &AnyObject, filename: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn application_printFile( &self, sender: &NSApplication, filename: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn application_printFiles_withSettings_showPrintPanels( &self, application: &NSApplication, file_names: &NSArray<NSString>, print_settings: &NSDictionary<NSPrintInfoAttributeKey, AnyObject>, show_print_panels: bool ) -> NSApplicationPrintReply where Self: Sized + Message { ... } unsafe fn applicationShouldTerminateAfterLastWindowClosed( &self, sender: &NSApplication ) -> bool where Self: Sized + Message { ... } unsafe fn applicationShouldHandleReopen_hasVisibleWindows( &self, sender: &NSApplication, flag: bool ) -> bool where Self: Sized + Message { ... } unsafe fn applicationDockMenu( &self, sender: &NSApplication ) -> Option<Id<NSMenu>> where Self: Sized + Message { ... } unsafe fn application_willPresentError( &self, application: &NSApplication, error: &NSError ) -> Id<NSError> where Self: Sized + Message { ... } unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &NSApplication, device_token: &NSData ) where Self: Sized + Message { ... } unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &NSApplication, error: &NSError ) where Self: Sized + Message { ... } unsafe fn application_didReceiveRemoteNotification( &self, application: &NSApplication, user_info: &NSDictionary<NSString, AnyObject> ) where Self: Sized + Message { ... } unsafe fn applicationSupportsSecureRestorableState( &self, app: &NSApplication ) -> bool where Self: Sized + Message { ... } unsafe fn application_willEncodeRestorableState( &self, app: &NSApplication, coder: &NSCoder ) where Self: Sized + Message { ... } unsafe fn application_didDecodeRestorableState( &self, app: &NSApplication, coder: &NSCoder ) where Self: Sized + Message { ... } unsafe fn application_willContinueUserActivityWithType( &self, application: &NSApplication, user_activity_type: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn application_continueUserActivity_restorationHandler( &self, application: &NSApplication, user_activity: &NSUserActivity, restoration_handler: &Block<dyn Fn(NonNull<NSArray<ProtocolObject<dyn NSUserActivityRestoring>>>)> ) -> bool where Self: Sized + Message { ... } unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &NSApplication, user_activity_type: &NSString, error: &NSError ) where Self: Sized + Message { ... } unsafe fn application_didUpdateUserActivity( &self, application: &NSApplication, user_activity: &NSUserActivity ) where Self: Sized + Message { ... } unsafe fn application_delegateHandlesKey( &self, sender: &NSApplication, key: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn applicationShouldAutomaticallyLocalizeKeyEquivalents( &self, application: &NSApplication ) -> bool where Self: Sized + Message { ... } unsafe fn applicationWillFinishLaunching( &self, notification: &NSNotification ) where Self: Sized + Message { ... } unsafe fn applicationDidFinishLaunching( &self, notification: &NSNotification ) where Self: Sized + Message { ... } unsafe fn applicationWillHide(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidHide(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationWillUnhide(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidUnhide(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationWillBecomeActive(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidBecomeActive(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationWillResignActive(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidResignActive(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationWillUpdate(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidUpdate(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationWillTerminate(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn applicationDidChangeScreenParameters( &self, notification: &NSNotification ) where Self: Sized + Message { ... } unsafe fn applicationDidChangeOcclusionState( &self, notification: &NSNotification ) where Self: Sized + Message { ... } unsafe fn applicationProtectedDataWillBecomeUnavailable( &self, notification: &NSNotification ) where Self: Sized + Message { ... } unsafe fn applicationProtectedDataDidBecomeAvailable( &self, notification: &NSNotification ) where Self: Sized + Message { ... }
}
Available on crate feature NSApplication only.

Provided Methods§

source

unsafe fn applicationShouldTerminate( &self, sender: &NSApplication ) -> NSApplicationTerminateReply
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_openURLs( &self, application: &NSApplication, urls: &NSArray<NSURL> )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_openFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_openFiles( &self, sender: &NSApplication, filenames: &NSArray<NSString> )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_openTempFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationShouldOpenUntitledFile( &self, sender: &NSApplication ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationOpenUntitledFile(&self, sender: &NSApplication) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_openFileWithoutUI( &self, sender: &AnyObject, filename: &NSString ) -> bool
where Self: Sized + Message,

source

unsafe fn application_printFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_printFiles_withSettings_showPrintPanels( &self, application: &NSApplication, file_names: &NSArray<NSString>, print_settings: &NSDictionary<NSPrintInfoAttributeKey, AnyObject>, show_print_panels: bool ) -> NSApplicationPrintReply
where Self: Sized + Message,

Available on crate features NSPrintInfo and NSResponder only.
source

unsafe fn applicationShouldTerminateAfterLastWindowClosed( &self, sender: &NSApplication ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationShouldHandleReopen_hasVisibleWindows( &self, sender: &NSApplication, flag: bool ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationDockMenu( &self, sender: &NSApplication ) -> Option<Id<NSMenu>>
where Self: Sized + Message,

Available on crate features NSMenu and NSResponder only.
source

unsafe fn application_willPresentError( &self, application: &NSApplication, error: &NSError ) -> Id<NSError>
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &NSApplication, device_token: &NSData )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &NSApplication, error: &NSError )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_didReceiveRemoteNotification( &self, application: &NSApplication, user_info: &NSDictionary<NSString, AnyObject> )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationSupportsSecureRestorableState( &self, app: &NSApplication ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_willEncodeRestorableState( &self, app: &NSApplication, coder: &NSCoder )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_didDecodeRestorableState( &self, app: &NSApplication, coder: &NSCoder )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_willContinueUserActivityWithType( &self, application: &NSApplication, user_activity_type: &NSString ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_continueUserActivity_restorationHandler( &self, application: &NSApplication, user_activity: &NSUserActivity, restoration_handler: &Block<dyn Fn(NonNull<NSArray<ProtocolObject<dyn NSUserActivityRestoring>>>)> ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSUserActivity and block2 only.
source

unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &NSApplication, user_activity_type: &NSString, error: &NSError )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_didUpdateUserActivity( &self, application: &NSApplication, user_activity: &NSUserActivity )
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn application_delegateHandlesKey( &self, sender: &NSApplication, key: &NSString ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationShouldAutomaticallyLocalizeKeyEquivalents( &self, application: &NSApplication ) -> bool
where Self: Sized + Message,

Available on crate feature NSResponder only.
source

unsafe fn applicationWillFinishLaunching(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidFinishLaunching(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillHide(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidHide(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillUnhide(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidUnhide(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillBecomeActive(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidBecomeActive(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillResignActive(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidResignActive(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillUpdate(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidUpdate(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationWillTerminate(&self, notification: &NSNotification)
where Self: Sized + Message,

source

unsafe fn applicationDidChangeScreenParameters( &self, notification: &NSNotification )
where Self: Sized + Message,

source

unsafe fn applicationDidChangeOcclusionState( &self, notification: &NSNotification )
where Self: Sized + Message,

source

unsafe fn applicationProtectedDataWillBecomeUnavailable( &self, notification: &NSNotification )
where Self: Sized + Message,

source

unsafe fn applicationProtectedDataDidBecomeAvailable( &self, notification: &NSNotification )
where Self: Sized + Message,

Trait Implementations§

source§

impl ProtocolType for dyn NSApplicationDelegate

source§

const NAME: &'static str = "NSApplicationDelegate"

The name of the Objective-C protocol that this type represents.
source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
source§

impl<T> ImplementedBy<T> for dyn NSApplicationDelegate

Implementations on Foreign Types§

source§

impl<T> NSApplicationDelegate for ProtocolObject<T>

Implementors§