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")]
23unsafe impl NSCopying for VNDetectFaceRectanglesRequest {}
24
25#[cfg(feature = "VNRequest")]
26unsafe impl CopyingHelper for VNDetectFaceRectanglesRequest {
27 type Result = Self;
28}
29
30#[cfg(feature = "VNRequest")]
31unsafe impl NSObjectProtocol for VNDetectFaceRectanglesRequest {}
32
33#[cfg(feature = "VNRequest")]
34impl VNDetectFaceRectanglesRequest {
35 extern_methods!(
36 #[cfg(feature = "VNObservation")]
37 /// VNFaceObservation results.
38 #[unsafe(method(results))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFaceObservation>>>;
41 );
42}
43
44/// Methods declared on superclass `VNRequest`.
45#[cfg(feature = "VNRequest")]
46impl VNDetectFaceRectanglesRequest {
47 extern_methods!(
48 /// Creates a new VNRequest with no completion handler.
49 #[unsafe(method(init))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53 #[cfg(feature = "block2")]
54 /// Creates a new VNRequest with an optional completion handler.
55 ///
56 ///
57 /// 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.
58 #[unsafe(method(initWithCompletionHandler:))]
59 #[unsafe(method_family = init)]
60 pub unsafe fn initWithCompletionHandler(
61 this: Allocated<Self>,
62 completion_handler: VNRequestCompletionHandler,
63 ) -> Retained<Self>;
64 );
65}
66
67/// Methods declared on superclass `NSObject`.
68#[cfg(feature = "VNRequest")]
69impl VNDetectFaceRectanglesRequest {
70 extern_methods!(
71 #[unsafe(method(new))]
72 #[unsafe(method_family = new)]
73 pub unsafe fn new() -> Retained<Self>;
74 );
75}
76
77/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision1?language=objc)
78pub static VNDetectFaceRectanglesRequestRevision1: NSUInteger = 1;
79
80/// This request revision can calculate face roll and yaw properties. See [VNFaceObservation -roll] and [VNFaceObservation -yaw] respectively.
81///
82/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision2?language=objc)
83pub static VNDetectFaceRectanglesRequestRevision2: NSUInteger = 2;
84
85/// 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.
86///
87/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacerectanglesrequestrevision3?language=objc)
88pub static VNDetectFaceRectanglesRequestRevision3: NSUInteger = 3;