objc2_intents_ui/generated/
INUIAddVoiceShortcutViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10#[cfg(feature = "objc2-intents")]
11use objc2_intents::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(NSViewController, NSResponder, NSObject))]
24 #[derive(Debug, PartialEq, Eq, Hash)]
25 #[cfg(feature = "objc2-app-kit")]
26 #[cfg(target_os = "macos")]
27 pub struct INUIAddVoiceShortcutViewController;
28);
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32extern_conformance!(
33 unsafe impl NSCoding for INUIAddVoiceShortcutViewController {}
34);
35
36#[cfg(feature = "objc2-app-kit")]
37#[cfg(target_os = "macos")]
38extern_conformance!(
39 unsafe impl NSEditor for INUIAddVoiceShortcutViewController {}
40);
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44extern_conformance!(
45 unsafe impl NSObjectProtocol for INUIAddVoiceShortcutViewController {}
46);
47
48#[cfg(feature = "objc2-app-kit")]
49#[cfg(target_os = "macos")]
50extern_conformance!(
51 unsafe impl NSSeguePerforming for INUIAddVoiceShortcutViewController {}
52);
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56extern_conformance!(
57 unsafe impl NSUserInterfaceItemIdentification for INUIAddVoiceShortcutViewController {}
58);
59
60#[cfg(feature = "objc2-app-kit")]
61#[cfg(target_os = "macos")]
62impl INUIAddVoiceShortcutViewController {
63 extern_methods!(
64 #[unsafe(method(delegate))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn delegate(
67 &self,
68 ) -> Option<Retained<ProtocolObject<dyn INUIAddVoiceShortcutViewControllerDelegate>>>;
69
70 #[unsafe(method(setDelegate:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setDelegate(
76 &self,
77 delegate: Option<&ProtocolObject<dyn INUIAddVoiceShortcutViewControllerDelegate>>,
78 );
79
80 #[cfg(feature = "objc2-intents")]
81 #[unsafe(method(initWithShortcut:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithShortcut(
86 this: Allocated<Self>,
87 shortcut: &INShortcut,
88 ) -> Retained<Self>;
89
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(initWithNibName:bundle:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithNibName_bundle(
97 this: Allocated<Self>,
98 nib_name_or_nil: Option<&NSString>,
99 nib_bundle_or_nil: Option<&NSBundle>,
100 ) -> Retained<Self>;
101 );
102}
103
104#[cfg(feature = "objc2-app-kit")]
106#[cfg(target_os = "macos")]
107impl INUIAddVoiceShortcutViewController {
108 extern_methods!(
109 #[unsafe(method(initWithCoder:))]
113 #[unsafe(method_family = init)]
114 pub unsafe fn initWithCoder(
115 this: Allocated<Self>,
116 coder: &NSCoder,
117 ) -> Option<Retained<Self>>;
118 );
119}
120
121#[cfg(feature = "objc2-app-kit")]
123#[cfg(target_os = "macos")]
124impl INUIAddVoiceShortcutViewController {
125 extern_methods!(
126 #[unsafe(method(new))]
127 #[unsafe(method_family = new)]
128 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
129 );
130}
131
132extern_protocol!(
133 pub unsafe trait INUIAddVoiceShortcutViewControllerDelegate: NSObjectProtocol {
135 #[cfg(all(feature = "objc2-app-kit", feature = "objc2-intents"))]
136 #[cfg(target_os = "macos")]
137 #[unsafe(method(addVoiceShortcutViewController:didFinishWithVoiceShortcut:error:))]
141 #[unsafe(method_family = none)]
142 unsafe fn addVoiceShortcutViewController_didFinishWithVoiceShortcut_error(
143 &self,
144 controller: &INUIAddVoiceShortcutViewController,
145 voice_shortcut: Option<&INVoiceShortcut>,
146 error: Option<&NSError>,
147 );
148
149 #[cfg(feature = "objc2-app-kit")]
150 #[cfg(target_os = "macos")]
151 #[unsafe(method(addVoiceShortcutViewControllerDidCancel:))]
155 #[unsafe(method_family = none)]
156 unsafe fn addVoiceShortcutViewControllerDidCancel(
157 &self,
158 controller: &INUIAddVoiceShortcutViewController,
159 );
160 }
161);