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§
unsafe fn applicationShouldTerminate( &self, sender: &NSApplication ) -> NSApplicationTerminateReply
Available on crate feature
NSResponder
only.unsafe fn application_openURLs( &self, application: &NSApplication, urls: &NSArray<NSURL> )
Available on crate feature
NSResponder
only.unsafe fn application_openFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
Available on crate feature
NSResponder
only.unsafe fn application_openFiles( &self, sender: &NSApplication, filenames: &NSArray<NSString> )
Available on crate feature
NSResponder
only.unsafe fn application_openTempFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
Available on crate feature
NSResponder
only.unsafe fn applicationShouldOpenUntitledFile( &self, sender: &NSApplication ) -> bool
Available on crate feature
NSResponder
only.unsafe fn applicationOpenUntitledFile(&self, sender: &NSApplication) -> bool
Available on crate feature
NSResponder
only.unsafe fn application_openFileWithoutUI( &self, sender: &AnyObject, filename: &NSString ) -> bool
unsafe fn application_printFile( &self, sender: &NSApplication, filename: &NSString ) -> bool
Available on crate feature
NSResponder
only.unsafe fn application_printFiles_withSettings_showPrintPanels( &self, application: &NSApplication, file_names: &NSArray<NSString>, print_settings: &NSDictionary<NSPrintInfoAttributeKey, AnyObject>, show_print_panels: bool ) -> NSApplicationPrintReply
Available on crate features
NSPrintInfo
and NSResponder
only.unsafe fn applicationShouldTerminateAfterLastWindowClosed( &self, sender: &NSApplication ) -> bool
Available on crate feature
NSResponder
only.unsafe fn applicationShouldHandleReopen_hasVisibleWindows( &self, sender: &NSApplication, flag: bool ) -> bool
Available on crate feature
NSResponder
only.unsafe fn applicationDockMenu( &self, sender: &NSApplication ) -> Option<Id<NSMenu>>
Available on crate features
NSMenu
and NSResponder
only.unsafe fn application_willPresentError( &self, application: &NSApplication, error: &NSError ) -> Id<NSError>
Available on crate feature
NSResponder
only.unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( &self, application: &NSApplication, device_token: &NSData )
Available on crate feature
NSResponder
only.unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( &self, application: &NSApplication, error: &NSError )
Available on crate feature
NSResponder
only.unsafe fn application_didReceiveRemoteNotification( &self, application: &NSApplication, user_info: &NSDictionary<NSString, AnyObject> )
Available on crate feature
NSResponder
only.unsafe fn applicationSupportsSecureRestorableState( &self, app: &NSApplication ) -> bool
Available on crate feature
NSResponder
only.unsafe fn application_willEncodeRestorableState( &self, app: &NSApplication, coder: &NSCoder )
Available on crate feature
NSResponder
only.unsafe fn application_didDecodeRestorableState( &self, app: &NSApplication, coder: &NSCoder )
Available on crate feature
NSResponder
only.unsafe fn application_willContinueUserActivityWithType( &self, application: &NSApplication, user_activity_type: &NSString ) -> bool
Available on crate feature
NSResponder
only.unsafe fn application_continueUserActivity_restorationHandler( &self, application: &NSApplication, user_activity: &NSUserActivity, restoration_handler: &Block<dyn Fn(NonNull<NSArray<ProtocolObject<dyn NSUserActivityRestoring>>>)> ) -> bool
Available on crate features
NSResponder
and NSUserActivity
and block2
only.unsafe fn application_didFailToContinueUserActivityWithType_error( &self, application: &NSApplication, user_activity_type: &NSString, error: &NSError )
Available on crate feature
NSResponder
only.unsafe fn application_didUpdateUserActivity( &self, application: &NSApplication, user_activity: &NSUserActivity )
Available on crate feature
NSResponder
only.unsafe fn application_delegateHandlesKey( &self, sender: &NSApplication, key: &NSString ) -> bool
Available on crate feature
NSResponder
only.unsafe fn applicationShouldAutomaticallyLocalizeKeyEquivalents( &self, application: &NSApplication ) -> bool
Available on crate feature
NSResponder
only.