objc2_vision/generated/
VNDetectFaceLandmarksRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct VNRequestFaceLandmarksConstellation(pub NSUInteger);
17impl VNRequestFaceLandmarksConstellation {
18 #[doc(alias = "VNRequestFaceLandmarksConstellationNotDefined")]
19 pub const ConstellationNotDefined: Self = Self(0);
20 #[doc(alias = "VNRequestFaceLandmarksConstellation65Points")]
21 pub const Constellation65Points: Self = Self(1);
22 #[doc(alias = "VNRequestFaceLandmarksConstellation76Points")]
23 pub const Constellation76Points: Self = Self(2);
24}
25
26unsafe impl Encode for VNRequestFaceLandmarksConstellation {
27 const ENCODING: Encoding = NSUInteger::ENCODING;
28}
29
30unsafe impl RefEncode for VNRequestFaceLandmarksConstellation {
31 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34extern_class!(
35 #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 #[cfg(feature = "VNRequest")]
44 pub struct VNDetectFaceLandmarksRequest;
45);
46
47#[cfg(feature = "VNRequest")]
48unsafe impl NSCopying for VNDetectFaceLandmarksRequest {}
49
50#[cfg(feature = "VNRequest")]
51unsafe impl CopyingHelper for VNDetectFaceLandmarksRequest {
52 type Result = Self;
53}
54
55#[cfg(feature = "VNRequest")]
56unsafe impl NSObjectProtocol for VNDetectFaceLandmarksRequest {}
57
58#[cfg(all(feature = "VNFaceObservationAccepting", feature = "VNRequest"))]
59unsafe impl VNFaceObservationAccepting for VNDetectFaceLandmarksRequest {}
60
61#[cfg(feature = "VNRequest")]
62impl VNDetectFaceLandmarksRequest {
63 extern_methods!(
64 #[unsafe(method(revision:supportsConstellation:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn revision_supportsConstellation(
67 request_revision: NSUInteger,
68 constellation: VNRequestFaceLandmarksConstellation,
69 ) -> bool;
70
71 #[unsafe(method(constellation))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn constellation(&self) -> VNRequestFaceLandmarksConstellation;
75
76 #[unsafe(method(setConstellation:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setConstellation(&self, constellation: VNRequestFaceLandmarksConstellation);
80
81 #[cfg(feature = "VNObservation")]
82 #[unsafe(method(results))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFaceObservation>>>;
86 );
87}
88
89#[cfg(feature = "VNRequest")]
91impl VNDetectFaceLandmarksRequest {
92 extern_methods!(
93 #[unsafe(method(init))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98 #[cfg(feature = "block2")]
99 #[unsafe(method(initWithCompletionHandler:))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn initWithCompletionHandler(
106 this: Allocated<Self>,
107 completion_handler: VNRequestCompletionHandler,
108 ) -> Retained<Self>;
109 );
110}
111
112#[cfg(feature = "VNRequest")]
114impl VNDetectFaceLandmarksRequest {
115 extern_methods!(
116 #[unsafe(method(new))]
117 #[unsafe(method_family = new)]
118 pub unsafe fn new() -> Retained<Self>;
119 );
120}
121
122pub static VNDetectFaceLandmarksRequestRevision1: NSUInteger = 1;
124
125pub static VNDetectFaceLandmarksRequestRevision2: NSUInteger = 2;
127
128pub static VNDetectFaceLandmarksRequestRevision3: NSUInteger = 3;