objc2_intents_ui/generated/
INUIEditVoiceShortcutViewController.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 INUIEditVoiceShortcutViewController;
28);
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32extern_conformance!(
33 unsafe impl NSCoding for INUIEditVoiceShortcutViewController {}
34);
35
36#[cfg(feature = "objc2-app-kit")]
37#[cfg(target_os = "macos")]
38extern_conformance!(
39 unsafe impl NSEditor for INUIEditVoiceShortcutViewController {}
40);
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44extern_conformance!(
45 unsafe impl NSObjectProtocol for INUIEditVoiceShortcutViewController {}
46);
47
48#[cfg(feature = "objc2-app-kit")]
49#[cfg(target_os = "macos")]
50extern_conformance!(
51 unsafe impl NSSeguePerforming for INUIEditVoiceShortcutViewController {}
52);
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56extern_conformance!(
57 unsafe impl NSUserInterfaceItemIdentification for INUIEditVoiceShortcutViewController {}
58);
59
60#[cfg(feature = "objc2-app-kit")]
61#[cfg(target_os = "macos")]
62impl INUIEditVoiceShortcutViewController {
63 extern_methods!(
64 #[unsafe(method(delegate))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn delegate(
67 &self,
68 ) -> Option<Retained<ProtocolObject<dyn INUIEditVoiceShortcutViewControllerDelegate>>>;
69
70 #[unsafe(method(setDelegate:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn setDelegate(
75 &self,
76 delegate: Option<&ProtocolObject<dyn INUIEditVoiceShortcutViewControllerDelegate>>,
77 );
78
79 #[cfg(feature = "objc2-intents")]
80 #[unsafe(method(initWithVoiceShortcut:))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn initWithVoiceShortcut(
84 this: Allocated<Self>,
85 voice_shortcut: &INVoiceShortcut,
86 ) -> Retained<Self>;
87
88 #[unsafe(method(init))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92 #[unsafe(method(initWithNibName:bundle:))]
93 #[unsafe(method_family = init)]
94 pub unsafe fn initWithNibName_bundle(
95 this: Allocated<Self>,
96 nib_name_or_nil: Option<&NSString>,
97 nib_bundle_or_nil: Option<&NSBundle>,
98 ) -> Retained<Self>;
99 );
100}
101
102#[cfg(feature = "objc2-app-kit")]
104#[cfg(target_os = "macos")]
105impl INUIEditVoiceShortcutViewController {
106 extern_methods!(
107 #[unsafe(method(initWithCoder:))]
108 #[unsafe(method_family = init)]
109 pub unsafe fn initWithCoder(
110 this: Allocated<Self>,
111 coder: &NSCoder,
112 ) -> Option<Retained<Self>>;
113 );
114}
115
116#[cfg(feature = "objc2-app-kit")]
118#[cfg(target_os = "macos")]
119impl INUIEditVoiceShortcutViewController {
120 extern_methods!(
121 #[unsafe(method(new))]
122 #[unsafe(method_family = new)]
123 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
124 );
125}
126
127extern_protocol!(
128 pub unsafe trait INUIEditVoiceShortcutViewControllerDelegate: NSObjectProtocol {
130 #[cfg(all(feature = "objc2-app-kit", feature = "objc2-intents"))]
131 #[cfg(target_os = "macos")]
132 #[unsafe(method(editVoiceShortcutViewController:didUpdateVoiceShortcut:error:))]
136 #[unsafe(method_family = none)]
137 unsafe fn editVoiceShortcutViewController_didUpdateVoiceShortcut_error(
138 &self,
139 controller: &INUIEditVoiceShortcutViewController,
140 voice_shortcut: Option<&INVoiceShortcut>,
141 error: Option<&NSError>,
142 );
143
144 #[cfg(feature = "objc2-app-kit")]
145 #[cfg(target_os = "macos")]
146 #[unsafe(method(editVoiceShortcutViewController:didDeleteVoiceShortcutWithIdentifier:))]
150 #[unsafe(method_family = none)]
151 unsafe fn editVoiceShortcutViewController_didDeleteVoiceShortcutWithIdentifier(
152 &self,
153 controller: &INUIEditVoiceShortcutViewController,
154 deleted_voice_shortcut_identifier: &NSUUID,
155 );
156
157 #[cfg(feature = "objc2-app-kit")]
158 #[cfg(target_os = "macos")]
159 #[unsafe(method(editVoiceShortcutViewControllerDidCancel:))]
163 #[unsafe(method_family = none)]
164 unsafe fn editVoiceShortcutViewControllerDidCancel(
165 &self,
166 controller: &INUIEditVoiceShortcutViewController,
167 );
168 }
169);