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:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setDelegate(
153 &self,
154 delegate: Option<&ProtocolObject<dyn ARCoachingOverlayViewDelegate>>,
155 );
156
157 #[cfg(feature = "ARSession")]
158 #[unsafe(method(sessionProvider))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn sessionProvider(&self) -> Option<Retained<NSObject>>;
166
167 #[cfg(feature = "ARSession")]
168 #[unsafe(method(setSessionProvider:))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn setSessionProvider(&self, session_provider: Option<&NSObject>);
178
179 #[cfg(feature = "ARSession")]
180 #[unsafe(method(session))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn session(&self) -> Option<Retained<ARSession>>;
184
185 #[cfg(feature = "ARSession")]
186 #[unsafe(method(setSession:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn setSession(&self, session: Option<&ARSession>);
190
191 #[unsafe(method(goal))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn goal(&self) -> ARCoachingGoal;
196
197 #[unsafe(method(setGoal:))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn setGoal(&self, goal: ARCoachingGoal);
201
202 #[unsafe(method(activatesAutomatically))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn activatesAutomatically(&self) -> bool;
212
213 #[unsafe(method(setActivatesAutomatically:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn setActivatesAutomatically(&self, activates_automatically: bool);
217
218 #[unsafe(method(isActive))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn isActive(&self) -> bool;
225
226 #[unsafe(method(setActive:animated:))]
241 #[unsafe(method_family = none)]
242 pub unsafe fn setActive_animated(&self, active: bool, animated: bool);
243 );
244}
245
246#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
248impl ARCoachingOverlayView {
249 extern_methods!(
250 #[cfg(feature = "objc2-core-foundation")]
251 #[unsafe(method(initWithFrame:))]
252 #[unsafe(method_family = init)]
253 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
254
255 #[cfg(feature = "objc2-foundation")]
256 #[unsafe(method(initWithCoder:))]
260 #[unsafe(method_family = init)]
261 pub unsafe fn initWithCoder(
262 this: Allocated<Self>,
263 coder: &NSCoder,
264 ) -> Option<Retained<Self>>;
265
266 #[unsafe(method(init))]
267 #[unsafe(method_family = init)]
268 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
269 );
270}
271
272#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
274impl ARCoachingOverlayView {
275 extern_methods!(
276 #[unsafe(method(new))]
277 #[unsafe(method_family = new)]
278 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
279 );
280}
281
282#[cfg(feature = "objc2")]
283extern_protocol!(
284 #[cfg(feature = "objc2")]
286 pub unsafe trait ARCoachingOverlayViewDelegate: NSObjectProtocol {
287 #[cfg(feature = "objc2-ui-kit")]
288 #[optional]
298 #[unsafe(method(coachingOverlayViewDidRequestSessionReset:))]
299 #[unsafe(method_family = none)]
300 unsafe fn coachingOverlayViewDidRequestSessionReset(
301 &self,
302 coaching_overlay_view: &ARCoachingOverlayView,
303 );
304
305 #[cfg(feature = "objc2-ui-kit")]
306 #[optional]
314 #[unsafe(method(coachingOverlayViewWillActivate:))]
315 #[unsafe(method_family = none)]
316 unsafe fn coachingOverlayViewWillActivate(
317 &self,
318 coaching_overlay_view: &ARCoachingOverlayView,
319 );
320
321 #[cfg(feature = "objc2-ui-kit")]
322 #[optional]
327 #[unsafe(method(coachingOverlayViewDidDeactivate:))]
328 #[unsafe(method_family = none)]
329 unsafe fn coachingOverlayViewDidDeactivate(
330 &self,
331 coaching_overlay_view: &ARCoachingOverlayView,
332 );
333 }
334);