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))]
74unsafe impl CALayerDelegate for ARCoachingOverlayView {}
75
76#[cfg(all(
77 feature = "objc2",
78 feature = "objc2-foundation",
79 feature = "objc2-ui-kit"
80))]
81unsafe impl NSCoding for ARCoachingOverlayView {}
82
83#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
84unsafe impl NSObjectProtocol for ARCoachingOverlayView {}
85
86#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
87unsafe impl UIAppearance for ARCoachingOverlayView {}
88
89#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
90unsafe impl UIAppearanceContainer for ARCoachingOverlayView {}
91
92#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
93unsafe impl UICoordinateSpace for ARCoachingOverlayView {}
94
95#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
96unsafe impl UIDynamicItem for ARCoachingOverlayView {}
97
98#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
99unsafe impl UIFocusEnvironment for ARCoachingOverlayView {}
100
101#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
102unsafe impl UIFocusItem for ARCoachingOverlayView {}
103
104#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
105unsafe impl UIFocusItemContainer for ARCoachingOverlayView {}
106
107#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
108unsafe impl UIResponderStandardEditActions for ARCoachingOverlayView {}
109
110#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
111unsafe impl UITraitEnvironment for ARCoachingOverlayView {}
112
113#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
114impl ARCoachingOverlayView {
115 extern_methods!(
116 #[unsafe(method(delegate))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn delegate(
120 &self,
121 ) -> Option<Retained<ProtocolObject<dyn ARCoachingOverlayViewDelegate>>>;
122
123 #[unsafe(method(setDelegate:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setDelegate(
128 &self,
129 delegate: Option<&ProtocolObject<dyn ARCoachingOverlayViewDelegate>>,
130 );
131
132 #[cfg(feature = "ARSession")]
133 #[unsafe(method(sessionProvider))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn sessionProvider(&self) -> Option<Retained<NSObject>>;
141
142 #[cfg(feature = "ARSession")]
143 #[unsafe(method(setSessionProvider:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn setSessionProvider(&self, session_provider: Option<&NSObject>);
148
149 #[cfg(feature = "ARSession")]
150 #[unsafe(method(session))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn session(&self) -> Option<Retained<ARSession>>;
154
155 #[cfg(feature = "ARSession")]
156 #[unsafe(method(setSession:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setSession(&self, session: Option<&ARSession>);
160
161 #[unsafe(method(goal))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn goal(&self) -> ARCoachingGoal;
166
167 #[unsafe(method(setGoal:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn setGoal(&self, goal: ARCoachingGoal);
171
172 #[unsafe(method(activatesAutomatically))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn activatesAutomatically(&self) -> bool;
182
183 #[unsafe(method(setActivatesAutomatically:))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn setActivatesAutomatically(&self, activates_automatically: bool);
187
188 #[unsafe(method(isActive))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn isActive(&self) -> bool;
195
196 #[unsafe(method(setActive:animated:))]
211 #[unsafe(method_family = none)]
212 pub unsafe fn setActive_animated(&self, active: bool, animated: bool);
213 );
214}
215
216#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
218impl ARCoachingOverlayView {
219 extern_methods!(
220 #[cfg(feature = "objc2-core-foundation")]
221 #[unsafe(method(initWithFrame:))]
222 #[unsafe(method_family = init)]
223 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
224
225 #[cfg(feature = "objc2-foundation")]
226 #[unsafe(method(initWithCoder:))]
227 #[unsafe(method_family = init)]
228 pub unsafe fn initWithCoder(
229 this: Allocated<Self>,
230 coder: &NSCoder,
231 ) -> Option<Retained<Self>>;
232 );
233}
234
235#[cfg(all(feature = "objc2", feature = "objc2-ui-kit"))]
237impl ARCoachingOverlayView {
238 extern_methods!(
239 #[unsafe(method(init))]
240 #[unsafe(method_family = init)]
241 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
242
243 #[unsafe(method(new))]
244 #[unsafe(method_family = new)]
245 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
246 );
247}
248
249#[cfg(feature = "objc2")]
250extern_protocol!(
251 #[cfg(feature = "objc2")]
253 pub unsafe trait ARCoachingOverlayViewDelegate: NSObjectProtocol {
254 #[cfg(feature = "objc2-ui-kit")]
255 #[optional]
265 #[unsafe(method(coachingOverlayViewDidRequestSessionReset:))]
266 #[unsafe(method_family = none)]
267 unsafe fn coachingOverlayViewDidRequestSessionReset(
268 &self,
269 coaching_overlay_view: &ARCoachingOverlayView,
270 );
271
272 #[cfg(feature = "objc2-ui-kit")]
273 #[optional]
281 #[unsafe(method(coachingOverlayViewWillActivate:))]
282 #[unsafe(method_family = none)]
283 unsafe fn coachingOverlayViewWillActivate(
284 &self,
285 coaching_overlay_view: &ARCoachingOverlayView,
286 );
287
288 #[cfg(feature = "objc2-ui-kit")]
289 #[optional]
294 #[unsafe(method(coachingOverlayViewDidDeactivate:))]
295 #[unsafe(method_family = none)]
296 unsafe fn coachingOverlayViewDidDeactivate(
297 &self,
298 coaching_overlay_view: &ARCoachingOverlayView,
299 );
300 }
301);