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        #[unsafe(method(initWithCompletionHandler:))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn initWithCompletionHandler(
65            this: Allocated<Self>,
66            completion_handler: VNRequestCompletionHandler,
67        ) -> Retained<Self>;
68    );
69}
70
71/// Methods declared on superclass `NSObject`.
72#[cfg(feature = "VNRequest")]
73impl VNDetectFaceRectanglesRequest {
74    extern_methods!(
75        #[unsafe(method(new))]
76        #[unsafe(method_family = new)]
77        pub unsafe fn new() -> Retained<Self>;
78    );
79}
80
81/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision1?language=objc)
82pub static VNDetectFaceRectanglesRequestRevision1: NSUInteger = 1;
83
84/// This request revision can calculate face roll and yaw properties. See [VNFaceObservation -roll] and [VNFaceObservation -yaw]  respectively.
85///
86/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision2?language=objc)
87pub static VNDetectFaceRectanglesRequestRevision2: NSUInteger = 2;
88
89/// 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.
90///
91/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision3?language=objc)
92pub static VNDetectFaceRectanglesRequestRevision3: NSUInteger = 3;