objc2_ar_kit/generated/
ARFaceAnchor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-foundation")]
7use objc2_foundation::*;
8
9use crate::*;
10
11/// Blend shape locations of a face geometry.
12///
13/// Each location defines an area of the face that can be displaced with a provided coefficient.
14/// blend shape activation  by ARKit.
15///
16/// Note: Blend shapes are computed based on the captured image. For example, if the detected person has a closed right eye, the eye on the left side of
17/// the captured image will appear closed and reported as blend shape activation  by ARKit.
18///
19/// See: -[ARFrame capturedImage]
20///
21/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocation?language=objc)
22// NS_TYPED_ENUM
23#[cfg(feature = "objc2-foundation")]
24pub type ARBlendShapeLocation = NSString;
25
26extern "C" {
27    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowdownleft?language=objc)
28    #[cfg(feature = "objc2-foundation")]
29    pub static ARBlendShapeLocationBrowDownLeft: &'static ARBlendShapeLocation;
30}
31
32extern "C" {
33    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowdownright?language=objc)
34    #[cfg(feature = "objc2-foundation")]
35    pub static ARBlendShapeLocationBrowDownRight: &'static ARBlendShapeLocation;
36}
37
38extern "C" {
39    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowinnerup?language=objc)
40    #[cfg(feature = "objc2-foundation")]
41    pub static ARBlendShapeLocationBrowInnerUp: &'static ARBlendShapeLocation;
42}
43
44extern "C" {
45    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowouterupleft?language=objc)
46    #[cfg(feature = "objc2-foundation")]
47    pub static ARBlendShapeLocationBrowOuterUpLeft: &'static ARBlendShapeLocation;
48}
49
50extern "C" {
51    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowouterupright?language=objc)
52    #[cfg(feature = "objc2-foundation")]
53    pub static ARBlendShapeLocationBrowOuterUpRight: &'static ARBlendShapeLocation;
54}
55
56extern "C" {
57    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheekpuff?language=objc)
58    #[cfg(feature = "objc2-foundation")]
59    pub static ARBlendShapeLocationCheekPuff: &'static ARBlendShapeLocation;
60}
61
62extern "C" {
63    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheeksquintleft?language=objc)
64    #[cfg(feature = "objc2-foundation")]
65    pub static ARBlendShapeLocationCheekSquintLeft: &'static ARBlendShapeLocation;
66}
67
68extern "C" {
69    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheeksquintright?language=objc)
70    #[cfg(feature = "objc2-foundation")]
71    pub static ARBlendShapeLocationCheekSquintRight: &'static ARBlendShapeLocation;
72}
73
74extern "C" {
75    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyeblinkleft?language=objc)
76    #[cfg(feature = "objc2-foundation")]
77    pub static ARBlendShapeLocationEyeBlinkLeft: &'static ARBlendShapeLocation;
78}
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyeblinkright?language=objc)
82    #[cfg(feature = "objc2-foundation")]
83    pub static ARBlendShapeLocationEyeBlinkRight: &'static ARBlendShapeLocation;
84}
85
86extern "C" {
87    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookdownleft?language=objc)
88    #[cfg(feature = "objc2-foundation")]
89    pub static ARBlendShapeLocationEyeLookDownLeft: &'static ARBlendShapeLocation;
90}
91
92extern "C" {
93    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookdownright?language=objc)
94    #[cfg(feature = "objc2-foundation")]
95    pub static ARBlendShapeLocationEyeLookDownRight: &'static ARBlendShapeLocation;
96}
97
98extern "C" {
99    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookinleft?language=objc)
100    #[cfg(feature = "objc2-foundation")]
101    pub static ARBlendShapeLocationEyeLookInLeft: &'static ARBlendShapeLocation;
102}
103
104extern "C" {
105    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookinright?language=objc)
106    #[cfg(feature = "objc2-foundation")]
107    pub static ARBlendShapeLocationEyeLookInRight: &'static ARBlendShapeLocation;
108}
109
110extern "C" {
111    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookoutleft?language=objc)
112    #[cfg(feature = "objc2-foundation")]
113    pub static ARBlendShapeLocationEyeLookOutLeft: &'static ARBlendShapeLocation;
114}
115
116extern "C" {
117    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookoutright?language=objc)
118    #[cfg(feature = "objc2-foundation")]
119    pub static ARBlendShapeLocationEyeLookOutRight: &'static ARBlendShapeLocation;
120}
121
122extern "C" {
123    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookupleft?language=objc)
124    #[cfg(feature = "objc2-foundation")]
125    pub static ARBlendShapeLocationEyeLookUpLeft: &'static ARBlendShapeLocation;
126}
127
128extern "C" {
129    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookupright?language=objc)
130    #[cfg(feature = "objc2-foundation")]
131    pub static ARBlendShapeLocationEyeLookUpRight: &'static ARBlendShapeLocation;
132}
133
134extern "C" {
135    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyesquintleft?language=objc)
136    #[cfg(feature = "objc2-foundation")]
137    pub static ARBlendShapeLocationEyeSquintLeft: &'static ARBlendShapeLocation;
138}
139
140extern "C" {
141    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyesquintright?language=objc)
142    #[cfg(feature = "objc2-foundation")]
143    pub static ARBlendShapeLocationEyeSquintRight: &'static ARBlendShapeLocation;
144}
145
146extern "C" {
147    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyewideleft?language=objc)
148    #[cfg(feature = "objc2-foundation")]
149    pub static ARBlendShapeLocationEyeWideLeft: &'static ARBlendShapeLocation;
150}
151
152extern "C" {
153    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyewideright?language=objc)
154    #[cfg(feature = "objc2-foundation")]
155    pub static ARBlendShapeLocationEyeWideRight: &'static ARBlendShapeLocation;
156}
157
158extern "C" {
159    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawforward?language=objc)
160    #[cfg(feature = "objc2-foundation")]
161    pub static ARBlendShapeLocationJawForward: &'static ARBlendShapeLocation;
162}
163
164extern "C" {
165    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawleft?language=objc)
166    #[cfg(feature = "objc2-foundation")]
167    pub static ARBlendShapeLocationJawLeft: &'static ARBlendShapeLocation;
168}
169
170extern "C" {
171    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawopen?language=objc)
172    #[cfg(feature = "objc2-foundation")]
173    pub static ARBlendShapeLocationJawOpen: &'static ARBlendShapeLocation;
174}
175
176extern "C" {
177    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawright?language=objc)
178    #[cfg(feature = "objc2-foundation")]
179    pub static ARBlendShapeLocationJawRight: &'static ARBlendShapeLocation;
180}
181
182extern "C" {
183    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthclose?language=objc)
184    #[cfg(feature = "objc2-foundation")]
185    pub static ARBlendShapeLocationMouthClose: &'static ARBlendShapeLocation;
186}
187
188extern "C" {
189    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthdimpleleft?language=objc)
190    #[cfg(feature = "objc2-foundation")]
191    pub static ARBlendShapeLocationMouthDimpleLeft: &'static ARBlendShapeLocation;
192}
193
194extern "C" {
195    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthdimpleright?language=objc)
196    #[cfg(feature = "objc2-foundation")]
197    pub static ARBlendShapeLocationMouthDimpleRight: &'static ARBlendShapeLocation;
198}
199
200extern "C" {
201    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfrownleft?language=objc)
202    #[cfg(feature = "objc2-foundation")]
203    pub static ARBlendShapeLocationMouthFrownLeft: &'static ARBlendShapeLocation;
204}
205
206extern "C" {
207    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfrownright?language=objc)
208    #[cfg(feature = "objc2-foundation")]
209    pub static ARBlendShapeLocationMouthFrownRight: &'static ARBlendShapeLocation;
210}
211
212extern "C" {
213    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfunnel?language=objc)
214    #[cfg(feature = "objc2-foundation")]
215    pub static ARBlendShapeLocationMouthFunnel: &'static ARBlendShapeLocation;
216}
217
218extern "C" {
219    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthleft?language=objc)
220    #[cfg(feature = "objc2-foundation")]
221    pub static ARBlendShapeLocationMouthLeft: &'static ARBlendShapeLocation;
222}
223
224extern "C" {
225    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthlowerdownleft?language=objc)
226    #[cfg(feature = "objc2-foundation")]
227    pub static ARBlendShapeLocationMouthLowerDownLeft: &'static ARBlendShapeLocation;
228}
229
230extern "C" {
231    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthlowerdownright?language=objc)
232    #[cfg(feature = "objc2-foundation")]
233    pub static ARBlendShapeLocationMouthLowerDownRight: &'static ARBlendShapeLocation;
234}
235
236extern "C" {
237    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpressleft?language=objc)
238    #[cfg(feature = "objc2-foundation")]
239    pub static ARBlendShapeLocationMouthPressLeft: &'static ARBlendShapeLocation;
240}
241
242extern "C" {
243    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpressright?language=objc)
244    #[cfg(feature = "objc2-foundation")]
245    pub static ARBlendShapeLocationMouthPressRight: &'static ARBlendShapeLocation;
246}
247
248extern "C" {
249    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpucker?language=objc)
250    #[cfg(feature = "objc2-foundation")]
251    pub static ARBlendShapeLocationMouthPucker: &'static ARBlendShapeLocation;
252}
253
254extern "C" {
255    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthright?language=objc)
256    #[cfg(feature = "objc2-foundation")]
257    pub static ARBlendShapeLocationMouthRight: &'static ARBlendShapeLocation;
258}
259
260extern "C" {
261    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthrolllower?language=objc)
262    #[cfg(feature = "objc2-foundation")]
263    pub static ARBlendShapeLocationMouthRollLower: &'static ARBlendShapeLocation;
264}
265
266extern "C" {
267    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthrollupper?language=objc)
268    #[cfg(feature = "objc2-foundation")]
269    pub static ARBlendShapeLocationMouthRollUpper: &'static ARBlendShapeLocation;
270}
271
272extern "C" {
273    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthshruglower?language=objc)
274    #[cfg(feature = "objc2-foundation")]
275    pub static ARBlendShapeLocationMouthShrugLower: &'static ARBlendShapeLocation;
276}
277
278extern "C" {
279    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthshrugupper?language=objc)
280    #[cfg(feature = "objc2-foundation")]
281    pub static ARBlendShapeLocationMouthShrugUpper: &'static ARBlendShapeLocation;
282}
283
284extern "C" {
285    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthsmileleft?language=objc)
286    #[cfg(feature = "objc2-foundation")]
287    pub static ARBlendShapeLocationMouthSmileLeft: &'static ARBlendShapeLocation;
288}
289
290extern "C" {
291    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthsmileright?language=objc)
292    #[cfg(feature = "objc2-foundation")]
293    pub static ARBlendShapeLocationMouthSmileRight: &'static ARBlendShapeLocation;
294}
295
296extern "C" {
297    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthstretchleft?language=objc)
298    #[cfg(feature = "objc2-foundation")]
299    pub static ARBlendShapeLocationMouthStretchLeft: &'static ARBlendShapeLocation;
300}
301
302extern "C" {
303    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthstretchright?language=objc)
304    #[cfg(feature = "objc2-foundation")]
305    pub static ARBlendShapeLocationMouthStretchRight: &'static ARBlendShapeLocation;
306}
307
308extern "C" {
309    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthupperupleft?language=objc)
310    #[cfg(feature = "objc2-foundation")]
311    pub static ARBlendShapeLocationMouthUpperUpLeft: &'static ARBlendShapeLocation;
312}
313
314extern "C" {
315    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthupperupright?language=objc)
316    #[cfg(feature = "objc2-foundation")]
317    pub static ARBlendShapeLocationMouthUpperUpRight: &'static ARBlendShapeLocation;
318}
319
320extern "C" {
321    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationnosesneerleft?language=objc)
322    #[cfg(feature = "objc2-foundation")]
323    pub static ARBlendShapeLocationNoseSneerLeft: &'static ARBlendShapeLocation;
324}
325
326extern "C" {
327    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationnosesneerright?language=objc)
328    #[cfg(feature = "objc2-foundation")]
329    pub static ARBlendShapeLocationNoseSneerRight: &'static ARBlendShapeLocation;
330}
331
332extern "C" {
333    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationtongueout?language=objc)
334    #[cfg(feature = "objc2-foundation")]
335    pub static ARBlendShapeLocationTongueOut: &'static ARBlendShapeLocation;
336}
337
338#[cfg(feature = "objc2")]
339extern_class!(
340    /// An anchor representing a face and its geometry.
341    ///
342    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arfaceanchor?language=objc)
343    #[unsafe(super(ARAnchor, NSObject))]
344    #[derive(Debug, PartialEq, Eq, Hash)]
345    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
346    pub struct ARFaceAnchor;
347);
348
349#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
350unsafe impl Send for ARFaceAnchor {}
351
352#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
353unsafe impl Sync for ARFaceAnchor {}
354
355#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
356extern_conformance!(
357    unsafe impl ARAnchorCopying for ARFaceAnchor {}
358);
359
360#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
361extern_conformance!(
362    unsafe impl ARTrackable for ARFaceAnchor {}
363);
364
365#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
366extern_conformance!(
367    unsafe impl NSCoding for ARFaceAnchor {}
368);
369
370#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
371extern_conformance!(
372    unsafe impl NSCopying for ARFaceAnchor {}
373);
374
375#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
376unsafe impl CopyingHelper for ARFaceAnchor {
377    type Result = Self;
378}
379
380#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
381extern_conformance!(
382    unsafe impl NSObjectProtocol for ARFaceAnchor {}
383);
384
385#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
386extern_conformance!(
387    unsafe impl NSSecureCoding for ARFaceAnchor {}
388);
389
390#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
391impl ARFaceAnchor {
392    extern_methods!(
393        #[cfg(feature = "ARFaceGeometry")]
394        /// The face geometry updated based on the computed blend shapes.
395        ///
396        /// This property is not atomic.
397        ///
398        /// # Safety
399        ///
400        /// This might not be thread-safe.
401        #[unsafe(method(geometry))]
402        #[unsafe(method_family = none)]
403        pub unsafe fn geometry(&self) -> Retained<ARFaceGeometry>;
404
405        #[cfg(feature = "objc2-foundation")]
406        /// A dictionary of blend shape coefficients for each blend shape location.
407        ///
408        /// Blend shapes coefficients define the amount of displacement of a neutral shape at a specific location on the face.
409        ///
410        /// This property is not atomic.
411        ///
412        /// # Safety
413        ///
414        /// This might not be thread-safe.
415        #[unsafe(method(blendShapes))]
416        #[unsafe(method_family = none)]
417        pub unsafe fn blendShapes(&self) -> Retained<NSDictionary<ARBlendShapeLocation, NSNumber>>;
418    );
419}
420
421/// Methods declared on superclass `ARAnchor`.
422#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
423impl ARFaceAnchor {
424    extern_methods!(
425        /// Unavailable
426        #[unsafe(method(init))]
427        #[unsafe(method_family = init)]
428        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
429
430        #[unsafe(method(new))]
431        #[unsafe(method_family = new)]
432        pub unsafe fn new() -> Retained<Self>;
433    );
434}