objc2_ar_kit/generated/
ARPlaneAnchor.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-foundation")]
8use objc2_foundation::*;
9
10use crate::*;
11
12#[cfg(feature = "objc2")]
17#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct ARPlaneAnchorAlignment(pub NSInteger);
20#[cfg(feature = "objc2")]
21impl ARPlaneAnchorAlignment {
22 #[doc(alias = "ARPlaneAnchorAlignmentHorizontal")]
24 pub const Horizontal: Self = Self(0);
25 #[doc(alias = "ARPlaneAnchorAlignmentVertical")]
27 pub const Vertical: Self = Self(1);
28}
29
30#[cfg(feature = "objc2")]
31unsafe impl Encode for ARPlaneAnchorAlignment {
32 const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35#[cfg(feature = "objc2")]
36unsafe impl RefEncode for ARPlaneAnchorAlignment {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40#[cfg(feature = "objc2")]
45#[repr(transparent)]
46#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
47pub struct ARPlaneClassificationStatus(pub NSInteger);
48#[cfg(feature = "objc2")]
49impl ARPlaneClassificationStatus {
50 #[doc(alias = "ARPlaneClassificationStatusNotAvailable")]
52 pub const NotAvailable: Self = Self(0);
53 #[doc(alias = "ARPlaneClassificationStatusUndetermined")]
55 pub const Undetermined: Self = Self(1);
56 #[doc(alias = "ARPlaneClassificationStatusUnknown")]
58 pub const Unknown: Self = Self(2);
59 #[doc(alias = "ARPlaneClassificationStatusKnown")]
61 pub const Known: Self = Self(3);
62}
63
64#[cfg(feature = "objc2")]
65unsafe impl Encode for ARPlaneClassificationStatus {
66 const ENCODING: Encoding = NSInteger::ENCODING;
67}
68
69#[cfg(feature = "objc2")]
70unsafe impl RefEncode for ARPlaneClassificationStatus {
71 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
72}
73
74#[cfg(feature = "objc2")]
79#[repr(transparent)]
80#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
81pub struct ARPlaneClassification(pub NSInteger);
82#[cfg(feature = "objc2")]
83impl ARPlaneClassification {
84 #[doc(alias = "ARPlaneClassificationNone")]
86 pub const None: Self = Self(0);
87 #[doc(alias = "ARPlaneClassificationWall")]
89 pub const Wall: Self = Self(1);
90 #[doc(alias = "ARPlaneClassificationFloor")]
92 pub const Floor: Self = Self(2);
93 #[doc(alias = "ARPlaneClassificationCeiling")]
95 pub const Ceiling: Self = Self(3);
96 #[doc(alias = "ARPlaneClassificationTable")]
98 pub const Table: Self = Self(4);
99 #[doc(alias = "ARPlaneClassificationSeat")]
101 pub const Seat: Self = Self(5);
102 #[doc(alias = "ARPlaneClassificationWindow")]
104 pub const Window: Self = Self(6);
105 #[doc(alias = "ARPlaneClassificationDoor")]
107 pub const Door: Self = Self(7);
108}
109
110#[cfg(feature = "objc2")]
111unsafe impl Encode for ARPlaneClassification {
112 const ENCODING: Encoding = NSInteger::ENCODING;
113}
114
115#[cfg(feature = "objc2")]
116unsafe impl RefEncode for ARPlaneClassification {
117 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
118}
119
120#[cfg(feature = "objc2")]
121extern_class!(
122 #[unsafe(super(NSObject))]
126 #[derive(Debug, PartialEq, Eq, Hash)]
127 #[cfg(feature = "objc2")]
128 pub struct ARPlaneExtent;
129);
130
131#[cfg(feature = "objc2")]
132unsafe impl Send for ARPlaneExtent {}
133
134#[cfg(feature = "objc2")]
135unsafe impl Sync for ARPlaneExtent {}
136
137#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
138extern_conformance!(
139 unsafe impl NSCoding for ARPlaneExtent {}
140);
141
142#[cfg(feature = "objc2")]
143extern_conformance!(
144 unsafe impl NSObjectProtocol for ARPlaneExtent {}
145);
146
147#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
148extern_conformance!(
149 unsafe impl NSSecureCoding for ARPlaneExtent {}
150);
151
152#[cfg(feature = "objc2")]
153impl ARPlaneExtent {
154 extern_methods!(
155 #[unsafe(method(rotationOnYAxis))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn rotationOnYAxis(&self) -> c_float;
159
160 #[unsafe(method(width))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn width(&self) -> c_float;
164
165 #[unsafe(method(height))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn height(&self) -> c_float;
169 );
170}
171
172#[cfg(feature = "objc2")]
174impl ARPlaneExtent {
175 extern_methods!(
176 #[unsafe(method(init))]
177 #[unsafe(method_family = init)]
178 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
179
180 #[unsafe(method(new))]
181 #[unsafe(method_family = new)]
182 pub unsafe fn new() -> Retained<Self>;
183 );
184}
185
186#[cfg(feature = "objc2")]
187extern_class!(
188 #[unsafe(super(ARAnchor, NSObject))]
194 #[derive(Debug, PartialEq, Eq, Hash)]
195 #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
196 pub struct ARPlaneAnchor;
197);
198
199#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
200unsafe impl Send for ARPlaneAnchor {}
201
202#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
203unsafe impl Sync for ARPlaneAnchor {}
204
205#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
206extern_conformance!(
207 unsafe impl ARAnchorCopying for ARPlaneAnchor {}
208);
209
210#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
211extern_conformance!(
212 unsafe impl NSCoding for ARPlaneAnchor {}
213);
214
215#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
216extern_conformance!(
217 unsafe impl NSCopying for ARPlaneAnchor {}
218);
219
220#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
221unsafe impl CopyingHelper for ARPlaneAnchor {
222 type Result = Self;
223}
224
225#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
226extern_conformance!(
227 unsafe impl NSObjectProtocol for ARPlaneAnchor {}
228);
229
230#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
231extern_conformance!(
232 unsafe impl NSSecureCoding for ARPlaneAnchor {}
233);
234
235#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
236impl ARPlaneAnchor {
237 extern_methods!(
238 #[unsafe(method(isClassificationSupported))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn isClassificationSupported() -> bool;
242
243 #[unsafe(method(alignment))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn alignment(&self) -> ARPlaneAnchorAlignment;
247
248 #[unsafe(method(planeExtent))]
250 #[unsafe(method_family = none)]
251 pub unsafe fn planeExtent(&self) -> Retained<ARPlaneExtent>;
252
253 #[cfg(feature = "ARPlaneGeometry")]
254 #[unsafe(method(geometry))]
256 #[unsafe(method_family = none)]
257 pub unsafe fn geometry(&self) -> Retained<ARPlaneGeometry>;
258
259 #[unsafe(method(classificationStatus))]
261 #[unsafe(method_family = none)]
262 pub unsafe fn classificationStatus(&self) -> ARPlaneClassificationStatus;
263
264 #[unsafe(method(classification))]
266 #[unsafe(method_family = none)]
267 pub unsafe fn classification(&self) -> ARPlaneClassification;
268 );
269}
270
271#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
273impl ARPlaneAnchor {
274 extern_methods!(
275 #[unsafe(method(init))]
277 #[unsafe(method_family = init)]
278 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
279
280 #[unsafe(method(new))]
281 #[unsafe(method_family = new)]
282 pub unsafe fn new() -> Retained<Self>;
283 );
284}