objc2_ui_kit/generated/
UISceneOptions.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-cloud-kit")]
7use objc2_cloud_kit::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-user-notifications")]
10use objc2_user_notifications::*;
11
12use crate::*;
13
14extern_class!(
15 #[unsafe(super(NSObject))]
17 #[thread_kind = MainThreadOnly]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct UISceneConnectionOptions;
20);
21
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UISceneConnectionOptions {}
24);
25
26impl UISceneConnectionOptions {
27 extern_methods!(
28 #[unsafe(method(new))]
29 #[unsafe(method_family = new)]
30 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
31
32 #[unsafe(method(init))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36 #[cfg(feature = "UIOpenURLContext")]
37 #[unsafe(method(URLContexts))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn URLContexts(&self) -> Retained<NSSet<UIOpenURLContext>>;
40
41 #[unsafe(method(sourceApplication))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn sourceApplication(&self) -> Option<Retained<NSString>>;
44
45 #[unsafe(method(handoffUserActivityType))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn handoffUserActivityType(&self) -> Option<Retained<NSString>>;
48
49 #[unsafe(method(userActivities))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn userActivities(&self) -> Retained<NSSet<NSUserActivity>>;
52
53 #[cfg(feature = "objc2-user-notifications")]
54 #[unsafe(method(notificationResponse))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn notificationResponse(&self) -> Option<Retained<UNNotificationResponse>>;
57
58 #[cfg(feature = "UIApplicationShortcutItem")]
59 #[unsafe(method(shortcutItem))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn shortcutItem(&self) -> Option<Retained<UIApplicationShortcutItem>>;
62
63 #[cfg(feature = "objc2-cloud-kit")]
64 #[unsafe(method(cloudKitShareMetadata))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn cloudKitShareMetadata(&self) -> Option<Retained<CKShareMetadata>>;
67 );
68}
69
70extern_class!(
71 #[unsafe(super(NSObject))]
73 #[thread_kind = MainThreadOnly]
74 #[derive(Debug, PartialEq, Eq, Hash)]
75 pub struct UISceneOpenURLOptions;
76);
77
78extern_conformance!(
79 unsafe impl NSObjectProtocol for UISceneOpenURLOptions {}
80);
81
82impl UISceneOpenURLOptions {
83 extern_methods!(
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new(mtm: MainThreadMarker) -> 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(sourceApplication))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn sourceApplication(&self) -> Option<Retained<NSString>>;
95
96 #[unsafe(method(annotation))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn annotation(&self) -> Option<Retained<AnyObject>>;
99
100 #[unsafe(method(openInPlace))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn openInPlace(&self) -> bool;
103
104 #[cfg(feature = "UIEventAttribution")]
105 #[unsafe(method(eventAttribution))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn eventAttribution(&self) -> Option<Retained<UIEventAttribution>>;
108 );
109}
110
111extern_class!(
112 #[unsafe(super(NSObject))]
114 #[thread_kind = MainThreadOnly]
115 #[derive(Debug, PartialEq, Eq, Hash)]
116 pub struct UISceneOpenExternalURLOptions;
117);
118
119extern_conformance!(
120 unsafe impl NSObjectProtocol for UISceneOpenExternalURLOptions {}
121);
122
123impl UISceneOpenExternalURLOptions {
124 extern_methods!(
125 #[unsafe(method(universalLinksOnly))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn universalLinksOnly(&self) -> bool;
128
129 #[unsafe(method(setUniversalLinksOnly:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn setUniversalLinksOnly(&self, universal_links_only: bool);
133
134 #[cfg(feature = "UIEventAttribution")]
135 #[unsafe(method(eventAttribution))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn eventAttribution(&self) -> Option<Retained<UIEventAttribution>>;
138
139 #[cfg(feature = "UIEventAttribution")]
140 #[unsafe(method(setEventAttribution:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn setEventAttribution(&self, event_attribution: Option<&UIEventAttribution>);
144 );
145}
146
147impl UISceneOpenExternalURLOptions {
149 extern_methods!(
150 #[unsafe(method(init))]
151 #[unsafe(method_family = init)]
152 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
153
154 #[unsafe(method(new))]
155 #[unsafe(method_family = new)]
156 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
157 );
158}
159
160#[repr(transparent)]
163#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
164pub struct UISceneCollectionJoinBehavior(pub NSInteger);
165impl UISceneCollectionJoinBehavior {
166 #[doc(alias = "UISceneCollectionJoinBehaviorAutomatic")]
167 pub const Automatic: Self = Self(0);
168 #[doc(alias = "UISceneCollectionJoinBehaviorPreferred")]
169 pub const Preferred: Self = Self(1);
170 #[doc(alias = "UISceneCollectionJoinBehaviorDisallowed")]
171 pub const Disallowed: Self = Self(2);
172 #[doc(alias = "UISceneCollectionJoinBehaviorPreferredWithoutActivating")]
173 pub const PreferredWithoutActivating: Self = Self(3);
174}
175
176unsafe impl Encode for UISceneCollectionJoinBehavior {
177 const ENCODING: Encoding = NSInteger::ENCODING;
178}
179
180unsafe impl RefEncode for UISceneCollectionJoinBehavior {
181 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
182}
183
184extern_class!(
185 #[unsafe(super(NSObject))]
187 #[thread_kind = MainThreadOnly]
188 #[derive(Debug, PartialEq, Eq, Hash)]
189 pub struct UISceneActivationRequestOptions;
190);
191
192extern_conformance!(
193 unsafe impl NSObjectProtocol for UISceneActivationRequestOptions {}
194);
195
196impl UISceneActivationRequestOptions {
197 extern_methods!(
198 #[cfg(all(feature = "UIResponder", feature = "UIScene"))]
199 #[unsafe(method(requestingScene))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn requestingScene(&self) -> Option<Retained<UIScene>>;
202
203 #[cfg(all(feature = "UIResponder", feature = "UIScene"))]
204 #[unsafe(method(setRequestingScene:))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn setRequestingScene(&self, requesting_scene: Option<&UIScene>);
208
209 #[unsafe(method(collectionJoinBehavior))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn collectionJoinBehavior(&self) -> UISceneCollectionJoinBehavior;
212
213 #[unsafe(method(setCollectionJoinBehavior:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn setCollectionJoinBehavior(
217 &self,
218 collection_join_behavior: UISceneCollectionJoinBehavior,
219 );
220 );
221}
222
223impl UISceneActivationRequestOptions {
225 extern_methods!(
226 #[unsafe(method(init))]
227 #[unsafe(method_family = init)]
228 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
229
230 #[unsafe(method(new))]
231 #[unsafe(method_family = new)]
232 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
233 );
234}
235
236extern_class!(
237 #[unsafe(super(NSObject))]
239 #[thread_kind = MainThreadOnly]
240 #[derive(Debug, PartialEq, Eq, Hash)]
241 pub struct UISceneDestructionRequestOptions;
242);
243
244extern_conformance!(
245 unsafe impl NSObjectProtocol for UISceneDestructionRequestOptions {}
246);
247
248impl UISceneDestructionRequestOptions {
249 extern_methods!();
250}
251
252impl UISceneDestructionRequestOptions {
254 extern_methods!(
255 #[unsafe(method(init))]
256 #[unsafe(method_family = init)]
257 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
258
259 #[unsafe(method(new))]
260 #[unsafe(method_family = new)]
261 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
262 );
263}