objc2_intents/generated/
INCreateNoteIntent.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(INIntent, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "INIntent")]
15 pub struct INCreateNoteIntent;
16);
17
18#[cfg(feature = "INIntent")]
19extern_conformance!(
20 unsafe impl NSCoding for INCreateNoteIntent {}
21);
22
23#[cfg(feature = "INIntent")]
24extern_conformance!(
25 unsafe impl NSCopying for INCreateNoteIntent {}
26);
27
28#[cfg(feature = "INIntent")]
29unsafe impl CopyingHelper for INCreateNoteIntent {
30 type Result = Self;
31}
32
33#[cfg(feature = "INIntent")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INCreateNoteIntent {}
36);
37
38#[cfg(feature = "INIntent")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for INCreateNoteIntent {}
41);
42
43#[cfg(feature = "INIntent")]
44impl INCreateNoteIntent {
45 extern_methods!(
46 #[cfg(all(feature = "INNoteContent", feature = "INSpeakableString"))]
47 #[unsafe(method(initWithTitle:content:groupName:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithTitle_content_groupName(
50 this: Allocated<Self>,
51 title: Option<&INSpeakableString>,
52 content: Option<&INNoteContent>,
53 group_name: Option<&INSpeakableString>,
54 ) -> Retained<Self>;
55
56 #[cfg(feature = "INSpeakableString")]
57 #[unsafe(method(title))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn title(&self) -> Option<Retained<INSpeakableString>>;
60
61 #[cfg(feature = "INNoteContent")]
62 #[unsafe(method(content))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn content(&self) -> Option<Retained<INNoteContent>>;
65
66 #[cfg(feature = "INSpeakableString")]
67 #[unsafe(method(groupName))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn groupName(&self) -> Option<Retained<INSpeakableString>>;
70 );
71}
72
73#[cfg(feature = "INIntent")]
75impl INCreateNoteIntent {
76 extern_methods!(
77 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub unsafe fn new() -> Retained<Self>;
84 );
85}
86
87extern_protocol!(
88 pub unsafe trait INCreateNoteIntentHandling: NSObjectProtocol {
94 #[cfg(all(
95 feature = "INCreateNoteIntentResponse",
96 feature = "INIntent",
97 feature = "INIntentResponse",
98 feature = "block2"
99 ))]
100 #[unsafe(method(handleCreateNote:completion:))]
112 #[unsafe(method_family = none)]
113 unsafe fn handleCreateNote_completion(
114 &self,
115 intent: &INCreateNoteIntent,
116 completion: &block2::DynBlock<dyn Fn(NonNull<INCreateNoteIntentResponse>)>,
117 );
118
119 #[cfg(all(
120 feature = "INCreateNoteIntentResponse",
121 feature = "INIntent",
122 feature = "INIntentResponse",
123 feature = "block2"
124 ))]
125 #[optional]
137 #[unsafe(method(confirmCreateNote:completion:))]
138 #[unsafe(method_family = none)]
139 unsafe fn confirmCreateNote_completion(
140 &self,
141 intent: &INCreateNoteIntent,
142 completion: &block2::DynBlock<dyn Fn(NonNull<INCreateNoteIntentResponse>)>,
143 );
144
145 #[cfg(all(
146 feature = "INIntent",
147 feature = "INIntentResolutionResult",
148 feature = "INSpeakableStringResolutionResult",
149 feature = "block2"
150 ))]
151 #[optional]
163 #[unsafe(method(resolveTitleForCreateNote:withCompletion:))]
164 #[unsafe(method_family = none)]
165 unsafe fn resolveTitleForCreateNote_withCompletion(
166 &self,
167 intent: &INCreateNoteIntent,
168 completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
169 );
170
171 #[cfg(all(
172 feature = "INIntent",
173 feature = "INIntentResolutionResult",
174 feature = "INNoteContentResolutionResult",
175 feature = "block2"
176 ))]
177 #[optional]
178 #[unsafe(method(resolveContentForCreateNote:withCompletion:))]
179 #[unsafe(method_family = none)]
180 unsafe fn resolveContentForCreateNote_withCompletion(
181 &self,
182 intent: &INCreateNoteIntent,
183 completion: &block2::DynBlock<dyn Fn(NonNull<INNoteContentResolutionResult>)>,
184 );
185
186 #[cfg(all(
187 feature = "INIntent",
188 feature = "INIntentResolutionResult",
189 feature = "INSpeakableStringResolutionResult",
190 feature = "block2"
191 ))]
192 #[optional]
193 #[unsafe(method(resolveGroupNameForCreateNote:withCompletion:))]
194 #[unsafe(method_family = none)]
195 unsafe fn resolveGroupNameForCreateNote_withCompletion(
196 &self,
197 intent: &INCreateNoteIntent,
198 completion: &block2::DynBlock<dyn Fn(NonNull<INSpeakableStringResolutionResult>)>,
199 );
200 }
201);