objc2_vision/generated/
VNDetectFaceRectanglesRequest.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A request that will detect faces in an image.
11    ///
12    ///
13    /// This request will generate VNFaceObservation objects with a defined boundingBox.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequest?language=objc)
16    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(feature = "VNRequest")]
19    pub struct VNDetectFaceRectanglesRequest;
20);
21
22#[cfg(feature = "VNRequest")]
23extern_conformance!(
24    unsafe impl NSCopying for VNDetectFaceRectanglesRequest {}
25);
26
27#[cfg(feature = "VNRequest")]
28unsafe impl CopyingHelper for VNDetectFaceRectanglesRequest {
29    type Result = Self;
30}
31
32#[cfg(feature = "VNRequest")]
33extern_conformance!(
34    unsafe impl NSObjectProtocol for VNDetectFaceRectanglesRequest {}
35);
36
37#[cfg(feature = "VNRequest")]
38impl VNDetectFaceRectanglesRequest {
39    extern_methods!(
40        #[cfg(feature = "VNObservation")]
41        /// VNFaceObservation results.
42        #[unsafe(method(results))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFaceObservation>>>;
45    );
46}
47
48/// Methods declared on superclass `VNRequest`.
49#[cfg(feature = "VNRequest")]
50impl VNDetectFaceRectanglesRequest {
51    extern_methods!(
52        /// Creates a new VNRequest with no completion handler.
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[cfg(feature = "block2")]
58        /// Creates a new VNRequest with an optional completion handler.
59        ///
60        ///
61        /// Parameter `completionHandler`: The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
62        ///
63        /// # Safety
64        ///
65        /// `completion_handler` must be a valid pointer or null.
66        #[unsafe(method(initWithCompletionHandler:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithCompletionHandler(
69            this: Allocated<Self>,
70            completion_handler: VNRequestCompletionHandler,
71        ) -> Retained<Self>;
72    );
73}
74
75/// Methods declared on superclass `NSObject`.
76#[cfg(feature = "VNRequest")]
77impl VNDetectFaceRectanglesRequest {
78    extern_methods!(
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub unsafe fn new() -> Retained<Self>;
82    );
83}
84
85/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision1?language=objc)
86#[deprecated]
87pub static VNDetectFaceRectanglesRequestRevision1: NSUInteger = 1;
88
89/// This request revision can calculate face roll and yaw properties. See [VNFaceObservation -roll] and [VNFaceObservation -yaw]  respectively.
90///
91/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision2?language=objc)
92pub static VNDetectFaceRectanglesRequestRevision2: NSUInteger = 2;
93
94/// This request revision can calculate face pitch, in addition to roll and yaw, see [VNFaceObservation -pitch] property. In addition, all three properties - roll, yaw, and pitch are now reported in contiguous manner.
95///
96/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision3?language=objc)
97pub static VNDetectFaceRectanglesRequestRevision3: NSUInteger = 3;