objc2_ar_kit/generated/
ARCoachingOverlayView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-core-foundation")]
8use objc2_core_foundation::*;
9#[cfg(feature = "objc2-foundation")]
10use objc2_foundation::*;
11#[cfg(feature = "objc2-quartz-core")]
12use objc2_quartz_core::*;
13#[cfg(feature = "objc2-ui-kit")]
14use objc2_ui_kit::*;
15
16use crate::*;
17
18#[cfg(feature = "objc2")]
23#[repr(transparent)]
24#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
25pub struct ARCoachingGoal(pub NSInteger);
26#[cfg(feature = "objc2")]
27impl ARCoachingGoal {
28 #[doc(alias = "ARCoachingGoalTracking")]
30 pub const Tracking: Self = Self(0);
31 #[doc(alias = "ARCoachingGoalHorizontalPlane")]
33 pub const HorizontalPlane: Self = Self(1);
34 #[doc(alias = "ARCoachingGoalVerticalPlane")]
36 pub const VerticalPlane: Self = Self(2);
37 #[doc(alias = "ARCoachingGoalAnyPlane")]
39 pub const AnyPlane: Self = Self(3);
40 #[doc(alias = "ARCoachingGoalGeoTracking")]
42 pub const GeoTracking: Self = Self(4);
43}
44
45#[cfg(feature = "objc2")]
46unsafe impl Encode for ARCoachingGoal {
47 const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50#[cfg(feature = "objc2")]
51unsafe impl RefEncode for ARCoachingGoal {
52 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
53}
54
55#[cfg(feature = "objc2")]
56extern_class!(
57 #[unsafe(super(UIView, UIResponder, NSObject))]
64 #[derive(Debug, PartialEq, Eq, Hash)]
65 #[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
66 pub struct ARCoachingOverlayView;
67);
68
69#[cfg(all(
70 feature = "objc2",
71 feature = "objc2-quartz-core",
72 feature = "objc2-ui-kit"
73))]
74extern_conformance!(
75 unsafe impl CALayerDelegate for ARCoachingOverlayView {}
76);
77
78#[cfg(all(
79 feature = "objc2",
80 feature = "objc2-foundation",
81 feature = "objc2-ui-kit"
82))]
83extern_conformance!(
84 unsafe impl NSCoding for ARCoachingOverlayView {}
85);
86
87#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
88extern_conformance!(
89 unsafe impl NSObjectProtocol for ARCoachingOverlayView {}
90);
91
92#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
93extern_conformance!(
94 unsafe impl UIAppearance for ARCoachingOverlayView {}
95);
96
97#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
98extern_conformance!(
99 unsafe impl UIAppearanceContainer for ARCoachingOverlayView {}
100);
101
102#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
103extern_conformance!(
104 unsafe impl UICoordinateSpace for ARCoachingOverlayView {}
105);
106
107#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
108extern_conformance!(
109 unsafe impl UIDynamicItem for ARCoachingOverlayView {}
110);
111
112#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
113extern_conformance!(
114 unsafe impl UIFocusEnvironment for ARCoachingOverlayView {}
115);
116
117#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
118extern_conformance!(
119 unsafe impl UIFocusItem for ARCoachingOverlayView {}
120);
121
122#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
123extern_conformance!(
124 unsafe impl UIFocusItemContainer for ARCoachingOverlayView {}
125);
126
127#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
128extern_conformance!(
129 unsafe impl UIResponderStandardEditActions for ARCoachingOverlayView {}
130);
131
132#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
133extern_conformance!(
134 unsafe impl UITraitEnvironment for ARCoachingOverlayView {}
135);
136
137#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
138impl ARCoachingOverlayView {
139 extern_methods!(
140 #[unsafe(method(delegate))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn delegate(
144 &self,
145 ) -> Option<Retained<ProtocolObject<dyn ARCoachingOverlayViewDelegate>>>;
146
147 #[unsafe(method(setDelegate:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setDelegate(
152 &self,
153 delegate: Option<&ProtocolObject<dyn ARCoachingOverlayViewDelegate>>,
154 );
155
156 #[cfg(feature = "ARSession")]
157 #[unsafe(method(sessionProvider))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn sessionProvider(&self) -> Option<Retained<NSObject>>;
165
166 #[cfg(feature = "ARSession")]
167 #[unsafe(method(setSessionProvider:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setSessionProvider(&self, session_provider: Option<&NSObject>);
172
173 #[cfg(feature = "ARSession")]
174 #[unsafe(method(session))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn session(&self) -> Option<Retained<ARSession>>;
178
179 #[cfg(feature = "ARSession")]
180 #[unsafe(method(setSession:))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn setSession(&self, session: Option<&ARSession>);
184
185 #[unsafe(method(goal))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn goal(&self) -> ARCoachingGoal;
190
191 #[unsafe(method(setGoal:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn setGoal(&self, goal: ARCoachingGoal);
195
196 #[unsafe(method(activatesAutomatically))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn activatesAutomatically(&self) -> bool;
206
207 #[unsafe(method(setActivatesAutomatically:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn setActivatesAutomatically(&self, activates_automatically: bool);
211
212 #[unsafe(method(isActive))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn isActive(&self) -> bool;
219
220 #[unsafe(method(setActive:animated:))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn setActive_animated(&self, active: bool, animated: bool);
237 );
238}
239
240#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
242impl ARCoachingOverlayView {
243 extern_methods!(
244 #[cfg(feature = "objc2-core-foundation")]
245 #[unsafe(method(initWithFrame:))]
246 #[unsafe(method_family = init)]
247 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
248
249 #[cfg(feature = "objc2-foundation")]
250 #[unsafe(method(initWithCoder:))]
251 #[unsafe(method_family = init)]
252 pub unsafe fn initWithCoder(
253 this: Allocated<Self>,
254 coder: &NSCoder,
255 ) -> Option<Retained<Self>>;
256 );
257}
258
259#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
261impl ARCoachingOverlayView {
262 extern_methods!(
263 #[unsafe(method(init))]
264 #[unsafe(method_family = init)]
265 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
266
267 #[unsafe(method(new))]
268 #[unsafe(method_family = new)]
269 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
270 );
271}
272
273#[cfg(feature = "objc2")]
274extern_protocol!(
275 #[cfg(feature = "objc2")]
277 pub unsafe trait ARCoachingOverlayViewDelegate: NSObjectProtocol {
278 #[cfg(feature = "objc2-ui-kit")]
279 #[optional]
289 #[unsafe(method(coachingOverlayViewDidRequestSessionReset:))]
290 #[unsafe(method_family = none)]
291 unsafe fn coachingOverlayViewDidRequestSessionReset(
292 &self,
293 coaching_overlay_view: &ARCoachingOverlayView,
294 );
295
296 #[cfg(feature = "objc2-ui-kit")]
297 #[optional]
305 #[unsafe(method(coachingOverlayViewWillActivate:))]
306 #[unsafe(method_family = none)]
307 unsafe fn coachingOverlayViewWillActivate(
308 &self,
309 coaching_overlay_view: &ARCoachingOverlayView,
310 );
311
312 #[cfg(feature = "objc2-ui-kit")]
313 #[optional]
318 #[unsafe(method(coachingOverlayViewDidDeactivate:))]
319 #[unsafe(method_family = none)]
320 unsafe fn coachingOverlayViewDidDeactivate(
321 &self,
322 coaching_overlay_view: &ARCoachingOverlayView,
323 );
324 }
325);