objc2_av_foundation/generated/
AVMetadataObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7#[cfg(feature = "objc2-core-image")]
8#[cfg(not(target_os = "watchos"))]
9use objc2_core_image::*;
10#[cfg(feature = "objc2-core-media")]
11use objc2_core_media::*;
12use objc2_foundation::*;
13
14use crate::*;
15
16/// AVMetadataObjectType string constants
17///
18///
19/// Constants indicating the type of an AVMetadataObject.
20///
21/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttype?language=objc)
22// NS_TYPED_ENUM
23pub type AVMetadataObjectType = NSString;
24
25extern_class!(
26    /// AVMetadataObject is an abstract class that defines an interface for a metadata object used by AVFoundation.
27    ///
28    ///
29    /// AVMetadataObject provides an abstract interface for metadata associated with a piece of media. One example is face metadata that might be detected in a picture. All metadata objects have a time, duration, bounds, and type.
30    ///
31    /// The concrete AVMetadataFaceObject is used by AVCaptureMetadataOutput for face detection.
32    ///
33    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobject?language=objc)
34    #[unsafe(super(NSObject))]
35    #[derive(Debug, PartialEq, Eq, Hash)]
36    pub struct AVMetadataObject;
37);
38
39extern_conformance!(
40    unsafe impl NSObjectProtocol for AVMetadataObject {}
41);
42
43impl AVMetadataObject {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52
53        #[cfg(feature = "objc2-core-media")]
54        /// The media time associated with this metadata object.
55        ///
56        ///
57        /// The value of this property is a CMTime associated with the metadata object. For capture, it is the time at which this object was captured. If this metadata object originates from a CMSampleBuffer, its time matches the sample buffer's presentation time. This property may return kCMTimeInvalid.
58        #[unsafe(method(time))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn time(&self) -> CMTime;
61
62        #[cfg(feature = "objc2-core-media")]
63        /// The media duration associated with this metadata object.
64        ///
65        ///
66        /// The value of this property is a CMTime representing the duration of the metadata object. If this metadata object originates from a CMSampleBuffer, its duration matches the sample buffer's duration. This property may return kCMTimeInvalid.
67        #[unsafe(method(duration))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn duration(&self) -> CMTime;
70
71        #[cfg(feature = "objc2-core-foundation")]
72        /// The bounding rectangle of the receiver.
73        ///
74        ///
75        /// The value of this property is a CGRect representing the bounding rectangle of the object with respect to the picture in which it resides. The rectangle's origin is top left. If the metadata originates from video, bounds may be expressed as scalar values from 0. - 1. If the original video has been scaled down, the bounds of the metadata object still are meaningful. This property may return CGRectZero if the metadata has no bounds.
76        #[unsafe(method(bounds))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn bounds(&self) -> CGRect;
79
80        /// An identifier for the metadata object.
81        ///
82        ///
83        /// The value of this property is an AVMetadataObjectType representing the type of the metadata object. Clients inspecting a collection of metadata objects can use this property to filter objects with a matching type.
84        #[unsafe(method(type))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn r#type(&self) -> Retained<AVMetadataObjectType>;
87
88        /// An identifier associated with a metadata object used to group it with other metadata objects belonging to a common parent.
89        ///
90        /// When presented with a collection of ``AVMetadataObject`` instances of different types, you may use the objects' ``groupID`` to combine them into groups. For example, a human body and face belonging to the same person have the same ``groupID``.  If an object's ``groupID`` property is set to -1, it is invalid. When set to a value of >=0, it is unique across all object groups.
91        #[unsafe(method(groupID))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn groupID(&self) -> NSInteger;
94
95        /// A unique identifier for each detected object type (face, body, hands, heads and salient objects) in a collection.
96        ///
97        /// Defaults to a value of -1 when invalid or not available. When used in conjunction with an ``AVCaptureMetadataOutput``, each newly detected object that enters the scene is assigned a unique identifier. ``objectID``s are never re-used as objects leave the picture and new ones enter. Objects that leave the picture and then re-enter are assigned a new ``objectID``.
98        #[unsafe(method(objectID))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn objectID(&self) -> NSInteger;
101    );
102}
103
104/// AVMetadataObjectCinematicVideoSupport.
105impl AVMetadataObject {
106    extern_methods!(
107        #[cfg(feature = "AVCaptureDevice")]
108        /// The current focus mode when an object is detected during a Cinematic Video recording.
109        ///
110        /// Default is ``AVCaptureCinematicVideoFocusMode/AVCaptureCinematicVideoFocusModeNone``.
111        #[unsafe(method(cinematicVideoFocusMode))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn cinematicVideoFocusMode(&self) -> AVCaptureCinematicVideoFocusMode;
114
115        /// A BOOL indicating whether this metadata object represents a fixed focus.
116        #[unsafe(method(isFixedFocus))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn isFixedFocus(&self) -> bool;
119    );
120}
121
122extern_class!(
123    /// AVMetadataBodyObject is an abstract class that defines an interface for a body metadata object used by AVFoundation.
124    ///
125    ///
126    /// AVMetadataBodyObject represents a single detected body in a picture. It is the base object used to represent bodies, for example AVMetadataHumanBodyObject, AVMetadataCatBodyObject, AVMetadataDogBodyObject.
127    ///
128    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatabodyobject?language=objc)
129    #[unsafe(super(AVMetadataObject, NSObject))]
130    #[derive(Debug, PartialEq, Eq, Hash)]
131    pub struct AVMetadataBodyObject;
132);
133
134extern_conformance!(
135    unsafe impl NSCopying for AVMetadataBodyObject {}
136);
137
138unsafe impl CopyingHelper for AVMetadataBodyObject {
139    type Result = Self;
140}
141
142extern_conformance!(
143    unsafe impl NSObjectProtocol for AVMetadataBodyObject {}
144);
145
146impl AVMetadataBodyObject {
147    extern_methods!(
148        /// A unique number associated with the receiver.
149        ///
150        ///
151        /// The value of this property is an NSInteger indicating the unique identifier of this body type (Human, Dog, Cat) in the picture. When a new body enters the picture, it is assigned a new unique identifier. bodyIDs are not re-used as bodies leave the picture and new ones enter. Bodies that leave the picture then re-enter are assigned a new bodyID.
152        #[unsafe(method(bodyID))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn bodyID(&self) -> NSInteger;
155    );
156}
157
158/// Methods declared on superclass `AVMetadataObject`.
159impl AVMetadataBodyObject {
160    extern_methods!(
161        #[unsafe(method(init))]
162        #[unsafe(method_family = init)]
163        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164
165        #[unsafe(method(new))]
166        #[unsafe(method_family = new)]
167        pub unsafe fn new() -> Retained<Self>;
168    );
169}
170
171extern "C" {
172    /// An identifier for an instance of AVMetadataHumanBodyObject.
173    ///
174    ///
175    /// AVMetadataHumanBodyObject objects return this constant as their type.
176    ///
177    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypehumanbody?language=objc)
178    pub static AVMetadataObjectTypeHumanBody: &'static AVMetadataObjectType;
179}
180
181extern_class!(
182    /// AVMetadataHumanBodyObject is a concrete subclass of AVMetadataBodyObject defining a detected human body.
183    ///
184    ///
185    /// AVMetadataHumanBodyObject represents a single detected human body in a picture. It is an immutable object describing the various features found in the body.
186    ///
187    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected human body objects. See AVCaptureOutput.h.
188    ///
189    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatahumanbodyobject?language=objc)
190    #[unsafe(super(AVMetadataBodyObject, AVMetadataObject, NSObject))]
191    #[derive(Debug, PartialEq, Eq, Hash)]
192    pub struct AVMetadataHumanBodyObject;
193);
194
195extern_conformance!(
196    unsafe impl NSCopying for AVMetadataHumanBodyObject {}
197);
198
199unsafe impl CopyingHelper for AVMetadataHumanBodyObject {
200    type Result = Self;
201}
202
203extern_conformance!(
204    unsafe impl NSObjectProtocol for AVMetadataHumanBodyObject {}
205);
206
207impl AVMetadataHumanBodyObject {
208    extern_methods!();
209}
210
211/// Methods declared on superclass `AVMetadataObject`.
212impl AVMetadataHumanBodyObject {
213    extern_methods!(
214        #[unsafe(method(init))]
215        #[unsafe(method_family = init)]
216        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217
218        #[unsafe(method(new))]
219        #[unsafe(method_family = new)]
220        pub unsafe fn new() -> Retained<Self>;
221    );
222}
223
224extern "C" {
225    /// An identifier for an instance of AVMetadataHumanFullBodyObject.
226    ///
227    ///
228    /// AVMetadataHumanFullBodyObject objects return this constant as their type.
229    ///
230    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypehumanfullbody?language=objc)
231    pub static AVMetadataObjectTypeHumanFullBody: &'static AVMetadataObjectType;
232}
233
234extern_class!(
235    /// AVMetadataHumanFullBodyObject is a concrete subclass of AVMetadataBodyObject defining a detected human full body.
236    ///
237    ///
238    /// AVMetadataHumanFullBodyObject represents a single detected human full body in a picture. It is an immutable object describing the various features found in the body.
239    ///
240    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected human full body objects. See AVCaptureOutput.h.
241    ///
242    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatahumanfullbodyobject?language=objc)
243    #[unsafe(super(AVMetadataBodyObject, AVMetadataObject, NSObject))]
244    #[derive(Debug, PartialEq, Eq, Hash)]
245    pub struct AVMetadataHumanFullBodyObject;
246);
247
248extern_conformance!(
249    unsafe impl NSCopying for AVMetadataHumanFullBodyObject {}
250);
251
252unsafe impl CopyingHelper for AVMetadataHumanFullBodyObject {
253    type Result = Self;
254}
255
256extern_conformance!(
257    unsafe impl NSObjectProtocol for AVMetadataHumanFullBodyObject {}
258);
259
260impl AVMetadataHumanFullBodyObject {
261    extern_methods!();
262}
263
264/// Methods declared on superclass `AVMetadataObject`.
265impl AVMetadataHumanFullBodyObject {
266    extern_methods!(
267        #[unsafe(method(init))]
268        #[unsafe(method_family = init)]
269        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
270
271        #[unsafe(method(new))]
272        #[unsafe(method_family = new)]
273        pub unsafe fn new() -> Retained<Self>;
274    );
275}
276
277extern "C" {
278    /// An identifier for an instance of a cat head object.
279    ///
280    /// ``AVMetadataCatHeadObject`` objects return this constant as their type.
281    ///
282    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecathead?language=objc)
283    pub static AVMetadataObjectTypeCatHead: &'static AVMetadataObjectType;
284}
285
286extern_class!(
287    /// A concrete metadata object subclass representing a cat head.
288    ///
289    /// ``AVMetadataCatHeadObject`` is a concrete subclass of ``AVMetadataObject`` representing a cat head.
290    ///
291    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatacatheadobject?language=objc)
292    #[unsafe(super(AVMetadataObject, NSObject))]
293    #[derive(Debug, PartialEq, Eq, Hash)]
294    pub struct AVMetadataCatHeadObject;
295);
296
297extern_conformance!(
298    unsafe impl NSCopying for AVMetadataCatHeadObject {}
299);
300
301unsafe impl CopyingHelper for AVMetadataCatHeadObject {
302    type Result = Self;
303}
304
305extern_conformance!(
306    unsafe impl NSObjectProtocol for AVMetadataCatHeadObject {}
307);
308
309impl AVMetadataCatHeadObject {
310    extern_methods!();
311}
312
313/// Methods declared on superclass `AVMetadataObject`.
314impl AVMetadataCatHeadObject {
315    extern_methods!(
316        #[unsafe(method(init))]
317        #[unsafe(method_family = init)]
318        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
319
320        #[unsafe(method(new))]
321        #[unsafe(method_family = new)]
322        pub unsafe fn new() -> Retained<Self>;
323    );
324}
325
326extern "C" {
327    /// An identifier for an instance of AVMetadataCatBodyObject.
328    ///
329    ///
330    /// AVMetadataCatBodyObject objects return this constant as their type.
331    ///
332    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecatbody?language=objc)
333    pub static AVMetadataObjectTypeCatBody: &'static AVMetadataObjectType;
334}
335
336extern_class!(
337    /// AVMetadataCatBodyObject is a concrete subclass of AVMetadataBodyObject defining a detected cat body.
338    ///
339    ///
340    /// AVMetadataCatBodyObject represents a single detected cat body in a picture. It is an immutable object describing the various features found in the body.
341    ///
342    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected cat body objects. See AVCaptureOutput.h.
343    ///
344    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatacatbodyobject?language=objc)
345    #[unsafe(super(AVMetadataBodyObject, AVMetadataObject, NSObject))]
346    #[derive(Debug, PartialEq, Eq, Hash)]
347    pub struct AVMetadataCatBodyObject;
348);
349
350extern_conformance!(
351    unsafe impl NSCopying for AVMetadataCatBodyObject {}
352);
353
354unsafe impl CopyingHelper for AVMetadataCatBodyObject {
355    type Result = Self;
356}
357
358extern_conformance!(
359    unsafe impl NSObjectProtocol for AVMetadataCatBodyObject {}
360);
361
362impl AVMetadataCatBodyObject {
363    extern_methods!();
364}
365
366/// Methods declared on superclass `AVMetadataObject`.
367impl AVMetadataCatBodyObject {
368    extern_methods!(
369        #[unsafe(method(init))]
370        #[unsafe(method_family = init)]
371        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
372
373        #[unsafe(method(new))]
374        #[unsafe(method_family = new)]
375        pub unsafe fn new() -> Retained<Self>;
376    );
377}
378
379extern "C" {
380    /// An identifier for an instance of a dog head object.
381    ///
382    /// ``AVMetadataDogHeadObject`` objects return this constant as their type.
383    ///
384    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypedoghead?language=objc)
385    pub static AVMetadataObjectTypeDogHead: &'static AVMetadataObjectType;
386}
387
388extern_class!(
389    /// A concrete metadata object subclass representing a dog head.
390    ///
391    /// ``AVMetadataDogHeadObject`` is a concrete subclass of ``AVMetadataObject`` representing a dog head.
392    ///
393    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatadogheadobject?language=objc)
394    #[unsafe(super(AVMetadataObject, NSObject))]
395    #[derive(Debug, PartialEq, Eq, Hash)]
396    pub struct AVMetadataDogHeadObject;
397);
398
399extern_conformance!(
400    unsafe impl NSCopying for AVMetadataDogHeadObject {}
401);
402
403unsafe impl CopyingHelper for AVMetadataDogHeadObject {
404    type Result = Self;
405}
406
407extern_conformance!(
408    unsafe impl NSObjectProtocol for AVMetadataDogHeadObject {}
409);
410
411impl AVMetadataDogHeadObject {
412    extern_methods!();
413}
414
415/// Methods declared on superclass `AVMetadataObject`.
416impl AVMetadataDogHeadObject {
417    extern_methods!(
418        #[unsafe(method(init))]
419        #[unsafe(method_family = init)]
420        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
421
422        #[unsafe(method(new))]
423        #[unsafe(method_family = new)]
424        pub unsafe fn new() -> Retained<Self>;
425    );
426}
427
428extern "C" {
429    /// An identifier for an instance of AVMetadataDogBodyObject.
430    ///
431    ///
432    /// AVMetadataDogBodyObject objects return this constant as their type.
433    ///
434    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypedogbody?language=objc)
435    pub static AVMetadataObjectTypeDogBody: &'static AVMetadataObjectType;
436}
437
438extern_class!(
439    /// AVMetadataDogBodyObject is a concrete subclass of AVMetadataBodyObject defining a detected dog body.
440    ///
441    ///
442    /// AVMetadataDogBodyObject represents a single detected dog body in a picture. It is an immutable object describing the various features found in the body.
443    ///
444    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected dog body objects. See AVCaptureOutput.h.
445    ///
446    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatadogbodyobject?language=objc)
447    #[unsafe(super(AVMetadataBodyObject, AVMetadataObject, NSObject))]
448    #[derive(Debug, PartialEq, Eq, Hash)]
449    pub struct AVMetadataDogBodyObject;
450);
451
452extern_conformance!(
453    unsafe impl NSCopying for AVMetadataDogBodyObject {}
454);
455
456unsafe impl CopyingHelper for AVMetadataDogBodyObject {
457    type Result = Self;
458}
459
460extern_conformance!(
461    unsafe impl NSObjectProtocol for AVMetadataDogBodyObject {}
462);
463
464impl AVMetadataDogBodyObject {
465    extern_methods!();
466}
467
468/// Methods declared on superclass `AVMetadataObject`.
469impl AVMetadataDogBodyObject {
470    extern_methods!(
471        #[unsafe(method(init))]
472        #[unsafe(method_family = init)]
473        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
474
475        #[unsafe(method(new))]
476        #[unsafe(method_family = new)]
477        pub unsafe fn new() -> Retained<Self>;
478    );
479}
480
481extern "C" {
482    /// An identifier for an instance of AVMetadataSalientObject.
483    ///
484    ///
485    /// AVMetadataSalientObject objects return this constant as their type.
486    ///
487    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypesalientobject?language=objc)
488    pub static AVMetadataObjectTypeSalientObject: &'static AVMetadataObjectType;
489}
490
491extern_class!(
492    /// AVMetadataSalientObject is a concrete subclass of AVMetadataObject defining the features of a salient object.
493    ///
494    ///
495    /// AVMetadataSalientObject represents a single detected salient area in a picture. It is an immutable object describing the salient object.
496    ///
497    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected salient objects. See AVCaptureOutput.h.
498    ///
499    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatasalientobject?language=objc)
500    #[unsafe(super(AVMetadataObject, NSObject))]
501    #[derive(Debug, PartialEq, Eq, Hash)]
502    pub struct AVMetadataSalientObject;
503);
504
505extern_conformance!(
506    unsafe impl NSCopying for AVMetadataSalientObject {}
507);
508
509unsafe impl CopyingHelper for AVMetadataSalientObject {
510    type Result = Self;
511}
512
513extern_conformance!(
514    unsafe impl NSObjectProtocol for AVMetadataSalientObject {}
515);
516
517impl AVMetadataSalientObject {
518    extern_methods!(
519        /// A unique number associated with the receiver.
520        ///
521        ///
522        /// The value of this property is an NSInteger indicating the unique identifier of this object in the picture. When a new object enters the picture, it is assigned a new unique identifier. objectIDs are not re-used as object leave the picture and new ones enter. Objects that leave the picture then re-enter are assigned a new objectID.
523        #[unsafe(method(objectID))]
524        #[unsafe(method_family = none)]
525        pub unsafe fn objectID(&self) -> NSInteger;
526    );
527}
528
529/// Methods declared on superclass `AVMetadataObject`.
530impl AVMetadataSalientObject {
531    extern_methods!(
532        #[unsafe(method(init))]
533        #[unsafe(method_family = init)]
534        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
535
536        #[unsafe(method(new))]
537        #[unsafe(method_family = new)]
538        pub unsafe fn new() -> Retained<Self>;
539    );
540}
541
542extern "C" {
543    /// An identifier for an instance of AVMetadataFaceObject.
544    ///
545    ///
546    /// AVMetadataFaceObject objects return this constant as their type.
547    ///
548    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeface?language=objc)
549    pub static AVMetadataObjectTypeFace: &'static AVMetadataObjectType;
550}
551
552extern_class!(
553    /// AVMetadataFaceObject is a concrete subclass of AVMetadataObject defining the features of a detected face.
554    ///
555    ///
556    /// AVMetadataFaceObject represents a single detected face in a picture. It is an immutable object describing the various features found in the face.
557    ///
558    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected face objects. See AVCaptureOutput.h.
559    ///
560    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatafaceobject?language=objc)
561    #[unsafe(super(AVMetadataObject, NSObject))]
562    #[derive(Debug, PartialEq, Eq, Hash)]
563    pub struct AVMetadataFaceObject;
564);
565
566extern_conformance!(
567    unsafe impl NSCopying for AVMetadataFaceObject {}
568);
569
570unsafe impl CopyingHelper for AVMetadataFaceObject {
571    type Result = Self;
572}
573
574extern_conformance!(
575    unsafe impl NSObjectProtocol for AVMetadataFaceObject {}
576);
577
578impl AVMetadataFaceObject {
579    extern_methods!(
580        /// A unique number associated with the receiver.
581        ///
582        ///
583        /// The value of this property is an NSInteger indicating the unique identifier of this face in the picture. When a new face enters the picture, it is assigned a new unique identifier. faceIDs are not re-used as faces leave the picture and new ones enter. Faces that leave the picture then re-enter are assigned a new faceID.
584        #[unsafe(method(faceID))]
585        #[unsafe(method_family = none)]
586        pub unsafe fn faceID(&self) -> NSInteger;
587
588        /// A BOOL indicating whether the rollAngle property is valid for this receiver.
589        #[unsafe(method(hasRollAngle))]
590        #[unsafe(method_family = none)]
591        pub unsafe fn hasRollAngle(&self) -> bool;
592
593        #[cfg(feature = "objc2-core-foundation")]
594        /// The roll angle of the face in degrees.
595        ///
596        ///
597        /// The value of this property is a CGFloat indicating the face's angle of roll (or tilt) in degrees. A value of 0.0 indicates that the face is level in the picture. If -hasRollAngle returns NO, then reading this property throws an NSGenericException.
598        #[unsafe(method(rollAngle))]
599        #[unsafe(method_family = none)]
600        pub unsafe fn rollAngle(&self) -> CGFloat;
601
602        /// A BOOL indicating whether the yawAngle property is valid for this receiver.
603        #[unsafe(method(hasYawAngle))]
604        #[unsafe(method_family = none)]
605        pub unsafe fn hasYawAngle(&self) -> bool;
606
607        #[cfg(feature = "objc2-core-foundation")]
608        /// The yaw angle of the face in degrees.
609        ///
610        ///
611        /// The value of this property is a CGFloat indicating the face's angle of yaw (or turn) in degrees. A value of 0.0 indicates that the face is straight on in the picture. If -hasYawAngle returns NO, then reading this property throws an NSGenericException.
612        #[unsafe(method(yawAngle))]
613        #[unsafe(method_family = none)]
614        pub unsafe fn yawAngle(&self) -> CGFloat;
615    );
616}
617
618/// Methods declared on superclass `AVMetadataObject`.
619impl AVMetadataFaceObject {
620    extern_methods!(
621        #[unsafe(method(init))]
622        #[unsafe(method_family = init)]
623        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
624
625        #[unsafe(method(new))]
626        #[unsafe(method_family = new)]
627        pub unsafe fn new() -> Retained<Self>;
628    );
629}
630
631extern "C" {
632    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeUPCECode.
633    ///
634    ///
635    /// AVMetadataMachineReadableCodeObject objects generated from UPC-E codes return this constant as their type.
636    ///
637    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeupcecode?language=objc)
638    pub static AVMetadataObjectTypeUPCECode: &'static AVMetadataObjectType;
639}
640
641extern "C" {
642    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeCode39Code.
643    ///
644    ///
645    /// AVMetadataMachineReadableCodeObject objects generated from Code 39 codes return this constant as their type.
646    ///
647    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecode39code?language=objc)
648    pub static AVMetadataObjectTypeCode39Code: &'static AVMetadataObjectType;
649}
650
651extern "C" {
652    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeCode39Mod43Code.
653    ///
654    ///
655    /// AVMetadataMachineReadableCodeObject objects generated from Code 39 mod 43 codes return this constant as their type.
656    ///
657    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecode39mod43code?language=objc)
658    pub static AVMetadataObjectTypeCode39Mod43Code: &'static AVMetadataObjectType;
659}
660
661extern "C" {
662    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeEAN13Code.
663    ///
664    ///
665    /// AVMetadataMachineReadableCodeObject objects generated from EAN-13 (including UPC-A) codes return this constant as their type.
666    ///
667    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeean13code?language=objc)
668    pub static AVMetadataObjectTypeEAN13Code: &'static AVMetadataObjectType;
669}
670
671extern "C" {
672    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeEAN8Code.
673    ///
674    ///
675    /// AVMetadataMachineReadableCodeObject objects generated from EAN-8 codes return this constant as their type.
676    ///
677    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeean8code?language=objc)
678    pub static AVMetadataObjectTypeEAN8Code: &'static AVMetadataObjectType;
679}
680
681extern "C" {
682    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeCode93Code.
683    ///
684    ///
685    /// AVMetadataMachineReadableCodeObject objects generated from Code 93 codes return this constant as their type.
686    ///
687    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecode93code?language=objc)
688    pub static AVMetadataObjectTypeCode93Code: &'static AVMetadataObjectType;
689}
690
691extern "C" {
692    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeCode128Code.
693    ///
694    ///
695    /// AVMetadataMachineReadableCodeObject objects generated from Code 128 codes return this constant as their type.
696    ///
697    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecode128code?language=objc)
698    pub static AVMetadataObjectTypeCode128Code: &'static AVMetadataObjectType;
699}
700
701extern "C" {
702    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypePDF417Code.
703    ///
704    ///
705    /// AVMetadataMachineReadableCodeObject objects generated from PDF417 codes return this constant as their type.
706    ///
707    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypepdf417code?language=objc)
708    pub static AVMetadataObjectTypePDF417Code: &'static AVMetadataObjectType;
709}
710
711extern "C" {
712    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeQRCode.
713    ///
714    ///
715    /// AVMetadataMachineReadableCodeObject objects generated from QR codes return this constant as their type.
716    ///
717    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeqrcode?language=objc)
718    pub static AVMetadataObjectTypeQRCode: &'static AVMetadataObjectType;
719}
720
721extern "C" {
722    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeAztecCode.
723    ///
724    ///
725    /// AVMetadataMachineReadableCodeObject objects generated from Aztec codes return this constant as their type.
726    ///
727    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeazteccode?language=objc)
728    pub static AVMetadataObjectTypeAztecCode: &'static AVMetadataObjectType;
729}
730
731extern "C" {
732    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeInterleaved2of5Code.
733    ///
734    ///
735    /// AVMetadataMachineReadableCodeObject objects generated from Interleaved 2 of 5 codes return this constant as their type.
736    ///
737    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeinterleaved2of5code?language=objc)
738    pub static AVMetadataObjectTypeInterleaved2of5Code: &'static AVMetadataObjectType;
739}
740
741extern "C" {
742    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeITF14Code.
743    ///
744    ///
745    /// AVMetadataMachineReadableCodeObject objects generated from ITF14 codes return this constant as their type.
746    ///
747    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypeitf14code?language=objc)
748    pub static AVMetadataObjectTypeITF14Code: &'static AVMetadataObjectType;
749}
750
751extern "C" {
752    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeDataMatrixCode.
753    ///
754    ///
755    /// AVMetadataMachineReadableCodeObject objects generated from DataMatrix codes return this constant as their type.
756    ///
757    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypedatamatrixcode?language=objc)
758    pub static AVMetadataObjectTypeDataMatrixCode: &'static AVMetadataObjectType;
759}
760
761extern "C" {
762    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeCodabarCode.
763    ///
764    ///
765    /// AVMetadataMachineReadableCodeObject objects generated from Codabar codes return this constant as their type.
766    ///
767    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypecodabarcode?language=objc)
768    pub static AVMetadataObjectTypeCodabarCode: &'static AVMetadataObjectType;
769}
770
771extern "C" {
772    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeGS1DataBarCode.
773    ///
774    ///
775    /// AVMetadataMachineReadableCodeObject objects generated from GS1DataBar codes return this constant as their type.
776    ///
777    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypegs1databarcode?language=objc)
778    pub static AVMetadataObjectTypeGS1DataBarCode: &'static AVMetadataObjectType;
779}
780
781extern "C" {
782    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeGS1DataBarExpandedCode.
783    ///
784    ///
785    /// AVMetadataMachineReadableCodeObject objects generated from GS1DataBarExpanded codes return this constant as their type.
786    ///
787    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypegs1databarexpandedcode?language=objc)
788    pub static AVMetadataObjectTypeGS1DataBarExpandedCode: &'static AVMetadataObjectType;
789}
790
791extern "C" {
792    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeGS1DataBarLimitedCode.
793    ///
794    ///
795    /// AVMetadataMachineReadableCodeObject objects generated from GS1DataBarLimited codes return this constant as their type.
796    ///
797    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypegs1databarlimitedcode?language=objc)
798    pub static AVMetadataObjectTypeGS1DataBarLimitedCode: &'static AVMetadataObjectType;
799}
800
801extern "C" {
802    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeMicroQRCode.
803    ///
804    ///
805    /// AVMetadataMachineReadableCodeObject objects generated from MicroQR codes return this constant as their type.
806    ///
807    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypemicroqrcode?language=objc)
808    pub static AVMetadataObjectTypeMicroQRCode: &'static AVMetadataObjectType;
809}
810
811extern "C" {
812    /// An identifier for an instance of AVMetadataMachineReadableCodeObject having a type AVMetadataObjectTypeMicroPDF417Code.
813    ///
814    ///
815    /// AVMetadataMachineReadableCodeObject objects generated from MicroPDF417 codes return this constant as their type.
816    ///
817    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataobjecttypemicropdf417code?language=objc)
818    pub static AVMetadataObjectTypeMicroPDF417Code: &'static AVMetadataObjectType;
819}
820
821extern_class!(
822    /// AVMetadataMachineReadableCodeObject is a concrete subclass of AVMetadataObject defining the features of a detected one-dimensional or two-dimensional barcode.
823    ///
824    ///
825    /// AVMetadataMachineReadableCodeObject represents a single detected machine readable code in a picture. It is an immutable object describing the features and payload of a barcode.
826    ///
827    /// On supported platforms, AVCaptureMetadataOutput outputs arrays of detected machine readable code objects. See AVCaptureMetadataOutput.h.
828    ///
829    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadatamachinereadablecodeobject?language=objc)
830    #[unsafe(super(AVMetadataObject, NSObject))]
831    #[derive(Debug, PartialEq, Eq, Hash)]
832    pub struct AVMetadataMachineReadableCodeObject;
833);
834
835extern_conformance!(
836    unsafe impl NSObjectProtocol for AVMetadataMachineReadableCodeObject {}
837);
838
839impl AVMetadataMachineReadableCodeObject {
840    extern_methods!(
841        /// The points defining the (X,Y) locations of the corners of the machine-readable code.
842        ///
843        ///
844        /// The value of this property is an NSArray of NSDictionaries, each of which has been created from a CGPoint using CGPointCreateDictionaryRepresentation(), representing the coordinates of the corners of the object with respect to the image in which it resides. If the metadata originates from video, the points may be expressed as scalar values from 0. - 1. The points in the corners differ from the bounds rectangle in that bounds is axis-aligned to orientation of the captured image, and the values of the corners reside within the bounds rectangle. The points are arranged in counter-clockwise order (clockwise if the code or image is mirrored), starting with the top-left of the code in its canonical orientation.
845        #[unsafe(method(corners))]
846        #[unsafe(method_family = none)]
847        pub unsafe fn corners(&self) -> Retained<NSArray<NSDictionary>>;
848
849        /// Returns the receiver's errorCorrectedData decoded into a human-readable string.
850        ///
851        ///
852        /// The value of this property is an NSString created by decoding the binary payload according to the format of the machine readable code. Returns nil if a string representation cannot be created from the payload.
853        #[unsafe(method(stringValue))]
854        #[unsafe(method_family = none)]
855        pub unsafe fn stringValue(&self) -> Option<Retained<NSString>>;
856    );
857}
858
859/// Methods declared on superclass `AVMetadataObject`.
860impl AVMetadataMachineReadableCodeObject {
861    extern_methods!(
862        #[unsafe(method(init))]
863        #[unsafe(method_family = init)]
864        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
865
866        #[unsafe(method(new))]
867        #[unsafe(method_family = new)]
868        pub unsafe fn new() -> Retained<Self>;
869    );
870}
871
872/// AVMetadataMachineReadableCodeDescriptor.
873impl AVMetadataMachineReadableCodeObject {
874    extern_methods!(
875        #[cfg(feature = "objc2-core-image")]
876        #[cfg(not(target_os = "watchos"))]
877        /// An abstract representation of a machine readable code's symbol attributes.
878        ///
879        ///
880        /// The value may be nil if an abstract representation of a machine readable code object is not defined for the code type or could not be detected.
881        #[unsafe(method(descriptor))]
882        #[unsafe(method_family = none)]
883        pub unsafe fn descriptor(&self) -> Option<Retained<CIBarcodeDescriptor>>;
884    );
885}