pub unsafe trait INUIAddVoiceShortcutViewControllerDelegate: NSObjectProtocol {
// Provided methods
unsafe fn addVoiceShortcutViewController_didFinishWithVoiceShortcut_error(
&self,
controller: &INUIAddVoiceShortcutViewController,
voice_shortcut: Option<&INVoiceShortcut>,
error: Option<&NSError>,
)
where Self: Sized + Message { ... }
unsafe fn addVoiceShortcutViewControllerDidCancel(
&self,
controller: &INUIAddVoiceShortcutViewController,
)
where Self: Sized + Message { ... }
}Available on crate feature
INUIAddVoiceShortcutViewController only.Expand description
Provided Methods§
Sourceunsafe fn addVoiceShortcutViewController_didFinishWithVoiceShortcut_error(
&self,
controller: &INUIAddVoiceShortcutViewController,
voice_shortcut: Option<&INVoiceShortcut>,
error: Option<&NSError>,
)
Available on crate feature objc2-app-kit and crate feature objc2-intents and macOS only.
unsafe fn addVoiceShortcutViewController_didFinishWithVoiceShortcut_error( &self, controller: &INUIAddVoiceShortcutViewController, voice_shortcut: Option<&INVoiceShortcut>, error: Option<&NSError>, )
objc2-app-kit and crate feature objc2-intents and macOS only.Called after the user finishes the setup flow for the voice shortcut, with either the successfully-added voice shortcut, or an error.
Your implementation of this method should dismiss the view controller.
Sourceunsafe fn addVoiceShortcutViewControllerDidCancel(
&self,
controller: &INUIAddVoiceShortcutViewController,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn addVoiceShortcutViewControllerDidCancel( &self, controller: &INUIAddVoiceShortcutViewController, )
objc2-app-kit and macOS only.Called if the user cancels the setup flow; the voice shortcut was not added.
Your implementation of this method should dismiss the view controller.