objc2_vision/generated/
VNDetectHumanHandPoseRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointname?language=objc)
11// NS_TYPED_ENUM
12#[cfg(feature = "VNTypes")]
13pub type VNHumanHandPoseObservationJointName = VNRecognizedPointKey;
14
15extern "C" {
16    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamewrist?language=objc)
17    #[cfg(feature = "VNTypes")]
18    pub static VNHumanHandPoseObservationJointNameWrist:
19        &'static VNHumanHandPoseObservationJointName;
20}
21
22extern "C" {
23    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamethumbcmc?language=objc)
24    #[cfg(feature = "VNTypes")]
25    pub static VNHumanHandPoseObservationJointNameThumbCMC:
26        &'static VNHumanHandPoseObservationJointName;
27}
28
29extern "C" {
30    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamethumbmp?language=objc)
31    #[cfg(feature = "VNTypes")]
32    pub static VNHumanHandPoseObservationJointNameThumbMP:
33        &'static VNHumanHandPoseObservationJointName;
34}
35
36extern "C" {
37    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamethumbip?language=objc)
38    #[cfg(feature = "VNTypes")]
39    pub static VNHumanHandPoseObservationJointNameThumbIP:
40        &'static VNHumanHandPoseObservationJointName;
41}
42
43extern "C" {
44    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamethumbtip?language=objc)
45    #[cfg(feature = "VNTypes")]
46    pub static VNHumanHandPoseObservationJointNameThumbTip:
47        &'static VNHumanHandPoseObservationJointName;
48}
49
50extern "C" {
51    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameindexmcp?language=objc)
52    #[cfg(feature = "VNTypes")]
53    pub static VNHumanHandPoseObservationJointNameIndexMCP:
54        &'static VNHumanHandPoseObservationJointName;
55}
56
57extern "C" {
58    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameindexpip?language=objc)
59    #[cfg(feature = "VNTypes")]
60    pub static VNHumanHandPoseObservationJointNameIndexPIP:
61        &'static VNHumanHandPoseObservationJointName;
62}
63
64extern "C" {
65    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameindexdip?language=objc)
66    #[cfg(feature = "VNTypes")]
67    pub static VNHumanHandPoseObservationJointNameIndexDIP:
68        &'static VNHumanHandPoseObservationJointName;
69}
70
71extern "C" {
72    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameindextip?language=objc)
73    #[cfg(feature = "VNTypes")]
74    pub static VNHumanHandPoseObservationJointNameIndexTip:
75        &'static VNHumanHandPoseObservationJointName;
76}
77
78extern "C" {
79    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamemiddlemcp?language=objc)
80    #[cfg(feature = "VNTypes")]
81    pub static VNHumanHandPoseObservationJointNameMiddleMCP:
82        &'static VNHumanHandPoseObservationJointName;
83}
84
85extern "C" {
86    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamemiddlepip?language=objc)
87    #[cfg(feature = "VNTypes")]
88    pub static VNHumanHandPoseObservationJointNameMiddlePIP:
89        &'static VNHumanHandPoseObservationJointName;
90}
91
92extern "C" {
93    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamemiddledip?language=objc)
94    #[cfg(feature = "VNTypes")]
95    pub static VNHumanHandPoseObservationJointNameMiddleDIP:
96        &'static VNHumanHandPoseObservationJointName;
97}
98
99extern "C" {
100    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamemiddletip?language=objc)
101    #[cfg(feature = "VNTypes")]
102    pub static VNHumanHandPoseObservationJointNameMiddleTip:
103        &'static VNHumanHandPoseObservationJointName;
104}
105
106extern "C" {
107    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameringmcp?language=objc)
108    #[cfg(feature = "VNTypes")]
109    pub static VNHumanHandPoseObservationJointNameRingMCP:
110        &'static VNHumanHandPoseObservationJointName;
111}
112
113extern "C" {
114    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameringpip?language=objc)
115    #[cfg(feature = "VNTypes")]
116    pub static VNHumanHandPoseObservationJointNameRingPIP:
117        &'static VNHumanHandPoseObservationJointName;
118}
119
120extern "C" {
121    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameringdip?language=objc)
122    #[cfg(feature = "VNTypes")]
123    pub static VNHumanHandPoseObservationJointNameRingDIP:
124        &'static VNHumanHandPoseObservationJointName;
125}
126
127extern "C" {
128    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnameringtip?language=objc)
129    #[cfg(feature = "VNTypes")]
130    pub static VNHumanHandPoseObservationJointNameRingTip:
131        &'static VNHumanHandPoseObservationJointName;
132}
133
134extern "C" {
135    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamelittlemcp?language=objc)
136    #[cfg(feature = "VNTypes")]
137    pub static VNHumanHandPoseObservationJointNameLittleMCP:
138        &'static VNHumanHandPoseObservationJointName;
139}
140
141extern "C" {
142    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamelittlepip?language=objc)
143    #[cfg(feature = "VNTypes")]
144    pub static VNHumanHandPoseObservationJointNameLittlePIP:
145        &'static VNHumanHandPoseObservationJointName;
146}
147
148extern "C" {
149    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamelittledip?language=objc)
150    #[cfg(feature = "VNTypes")]
151    pub static VNHumanHandPoseObservationJointNameLittleDIP:
152        &'static VNHumanHandPoseObservationJointName;
153}
154
155extern "C" {
156    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointnamelittletip?language=objc)
157    #[cfg(feature = "VNTypes")]
158    pub static VNHumanHandPoseObservationJointNameLittleTip:
159        &'static VNHumanHandPoseObservationJointName;
160}
161
162/// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupname?language=objc)
163// NS_TYPED_ENUM
164#[cfg(feature = "VNTypes")]
165pub type VNHumanHandPoseObservationJointsGroupName = VNRecognizedPointGroupKey;
166
167extern "C" {
168    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnamethumb?language=objc)
169    #[cfg(feature = "VNTypes")]
170    pub static VNHumanHandPoseObservationJointsGroupNameThumb:
171        &'static VNHumanHandPoseObservationJointsGroupName;
172}
173
174extern "C" {
175    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnameindexfinger?language=objc)
176    #[cfg(feature = "VNTypes")]
177    pub static VNHumanHandPoseObservationJointsGroupNameIndexFinger:
178        &'static VNHumanHandPoseObservationJointsGroupName;
179}
180
181extern "C" {
182    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnamemiddlefinger?language=objc)
183    #[cfg(feature = "VNTypes")]
184    pub static VNHumanHandPoseObservationJointsGroupNameMiddleFinger:
185        &'static VNHumanHandPoseObservationJointsGroupName;
186}
187
188extern "C" {
189    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnameringfinger?language=objc)
190    #[cfg(feature = "VNTypes")]
191    pub static VNHumanHandPoseObservationJointsGroupNameRingFinger:
192        &'static VNHumanHandPoseObservationJointsGroupName;
193}
194
195extern "C" {
196    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnamelittlefinger?language=objc)
197    #[cfg(feature = "VNTypes")]
198    pub static VNHumanHandPoseObservationJointsGroupNameLittleFinger:
199        &'static VNHumanHandPoseObservationJointsGroupName;
200}
201
202extern "C" {
203    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservationjointsgroupnameall?language=objc)
204    #[cfg(feature = "VNTypes")]
205    pub static VNHumanHandPoseObservationJointsGroupNameAll:
206        &'static VNHumanHandPoseObservationJointsGroupName;
207}
208
209extern_class!(
210    /// [Apple's documentation](https://developer.apple.com/documentation/vision/vnhumanhandposeobservation?language=objc)
211    #[unsafe(super(VNRecognizedPointsObservation, VNObservation, NSObject))]
212    #[derive(Debug, PartialEq, Eq, Hash)]
213    #[cfg(feature = "VNObservation")]
214    pub struct VNHumanHandPoseObservation;
215);
216
217#[cfg(feature = "VNObservation")]
218extern_conformance!(
219    unsafe impl NSCoding for VNHumanHandPoseObservation {}
220);
221
222#[cfg(feature = "VNObservation")]
223extern_conformance!(
224    unsafe impl NSCopying for VNHumanHandPoseObservation {}
225);
226
227#[cfg(feature = "VNObservation")]
228unsafe impl CopyingHelper for VNHumanHandPoseObservation {
229    type Result = Self;
230}
231
232#[cfg(feature = "VNObservation")]
233extern_conformance!(
234    unsafe impl NSObjectProtocol for VNHumanHandPoseObservation {}
235);
236
237#[cfg(feature = "VNObservation")]
238extern_conformance!(
239    unsafe impl NSSecureCoding for VNHumanHandPoseObservation {}
240);
241
242#[cfg(all(feature = "VNObservation", feature = "VNRequestRevisionProviding"))]
243extern_conformance!(
244    unsafe impl VNRequestRevisionProviding for VNHumanHandPoseObservation {}
245);
246
247#[cfg(feature = "VNObservation")]
248impl VNHumanHandPoseObservation {
249    extern_methods!(
250        #[cfg(feature = "VNTypes")]
251        /// All of the joint names available in the observation.
252        #[unsafe(method(availableJointNames))]
253        #[unsafe(method_family = none)]
254        pub unsafe fn availableJointNames(
255            &self,
256        ) -> Retained<NSArray<VNHumanHandPoseObservationJointName>>;
257
258        #[cfg(feature = "VNTypes")]
259        /// All of the joints group names available in the observation.
260        #[unsafe(method(availableJointsGroupNames))]
261        #[unsafe(method_family = none)]
262        pub unsafe fn availableJointsGroupNames(
263            &self,
264        ) -> Retained<NSArray<VNHumanHandPoseObservationJointsGroupName>>;
265
266        #[cfg(all(
267            feature = "VNDetectedPoint",
268            feature = "VNGeometry",
269            feature = "VNTypes"
270        ))]
271        /// Obtain a specific normalized point for a named human hand joint.
272        ///
273        ///
274        /// Parameter `jointName`: The name of the human hand joint.
275        ///
276        /// Parameter `error`: The address of a variable that will be populated with the error that describes the failure.  If the caller does not require this information, NULL can be passed.
277        ///
278        /// Returns: the recognized point, or nil if the point could not be obtained.
279        #[unsafe(method(recognizedPointForJointName:error:_))]
280        #[unsafe(method_family = none)]
281        pub unsafe fn recognizedPointForJointName_error(
282            &self,
283            joint_name: &VNHumanHandPoseObservationJointName,
284        ) -> Result<Retained<VNRecognizedPoint>, Retained<NSError>>;
285
286        #[cfg(all(
287            feature = "VNDetectedPoint",
288            feature = "VNGeometry",
289            feature = "VNTypes"
290        ))]
291        /// Obtains the collection of points associated with a named human hand joints group.
292        ///
293        ///
294        /// The obtained collection is a dictionary that provides the mapping of human hand join names to the recognized point.
295        ///
296        ///
297        /// Parameter `jointsGroupName`: The name of the human hand joints group.
298        ///
299        /// Parameter `error`: The address of a variable that will be populated with the error that describes the failure.  If the caller does not require this information, NULL can be passed.
300        ///
301        /// Returns: a dictionary of recognized points in the group, or nil if an error was encountered.
302        #[unsafe(method(recognizedPointsForJointsGroupName:error:_))]
303        #[unsafe(method_family = none)]
304        pub unsafe fn recognizedPointsForJointsGroupName_error(
305            &self,
306            joints_group_name: &VNHumanHandPoseObservationJointsGroupName,
307        ) -> Result<
308            Retained<NSDictionary<VNHumanHandPoseObservationJointName, VNRecognizedPoint>>,
309            Retained<NSError>,
310        >;
311
312        #[cfg(feature = "VNTypes")]
313        /// The chirality of the hand.
314        #[unsafe(method(chirality))]
315        #[unsafe(method_family = none)]
316        pub unsafe fn chirality(&self) -> VNChirality;
317    );
318}
319
320/// Methods declared on superclass `VNRecognizedPointsObservation`.
321#[cfg(feature = "VNObservation")]
322impl VNHumanHandPoseObservation {
323    extern_methods!(
324        #[unsafe(method(new))]
325        #[unsafe(method_family = new)]
326        pub unsafe fn new() -> Retained<Self>;
327
328        #[unsafe(method(init))]
329        #[unsafe(method_family = init)]
330        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
331    );
332}
333
334extern_class!(
335    /// Detects specific landmark points on human hands.
336    ///
337    /// This request will produce a collection of VNRecognizedPointsObservation objects which describe the pose of each detected human hand.
338    ///
339    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecthumanhandposerequest?language=objc)
340    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
341    #[derive(Debug, PartialEq, Eq, Hash)]
342    #[cfg(feature = "VNRequest")]
343    pub struct VNDetectHumanHandPoseRequest;
344);
345
346#[cfg(feature = "VNRequest")]
347extern_conformance!(
348    unsafe impl NSCopying for VNDetectHumanHandPoseRequest {}
349);
350
351#[cfg(feature = "VNRequest")]
352unsafe impl CopyingHelper for VNDetectHumanHandPoseRequest {
353    type Result = Self;
354}
355
356#[cfg(feature = "VNRequest")]
357extern_conformance!(
358    unsafe impl NSObjectProtocol for VNDetectHumanHandPoseRequest {}
359);
360
361#[cfg(feature = "VNRequest")]
362impl VNDetectHumanHandPoseRequest {
363    extern_methods!(
364        #[cfg(feature = "VNTypes")]
365        /// Obtain the collection of human hand joint names that are supported by a given request revision.
366        ///
367        /// Parameter `revision`: The revision of VNDetectHumanHandPoseRequest being queried.
368        ///
369        /// Parameter `error`: The address of a variable that will be populated with an error upon failure.  If the caller does not need this information, NULL can be passed.
370        ///
371        /// Returns: An array of VNHumanHandPoseObservationJointName symbols that are supported by the request revision, or nil if a failure occurs.
372        #[deprecated]
373        #[unsafe(method(supportedJointNamesForRevision:error:_))]
374        #[unsafe(method_family = none)]
375        pub unsafe fn supportedJointNamesForRevision_error(
376            revision: NSUInteger,
377        ) -> Result<Retained<NSArray<VNHumanHandPoseObservationJointName>>, Retained<NSError>>;
378
379        #[cfg(feature = "VNTypes")]
380        /// Obtain the collection of human hand joint names that are supported by a given request object configured with a specific revision.
381        ///
382        /// Parameter `error`: The address of a variable that will be populated with an error upon failure.  If the caller does not need this information, NULL can be passed.
383        ///
384        /// Returns: An array of VNHumanHandPoseObservationJointName symbols that are supported by the request revision, or nil if a failure occurs.
385        #[unsafe(method(supportedJointNamesAndReturnError:_))]
386        #[unsafe(method_family = none)]
387        pub unsafe fn supportedJointNamesAndReturnError(
388            &self,
389        ) -> Result<Retained<NSArray<VNHumanHandPoseObservationJointName>>, Retained<NSError>>;
390
391        #[cfg(feature = "VNTypes")]
392        /// Obtain the collection of human hand joints group names that are supported by a given request revision.
393        ///
394        /// Parameter `revision`: The revision of VNDetectHumanHandPoseRequest being queried.
395        ///
396        /// Parameter `error`: The address of a variable that will be populated with an error upon failure.  If the caller does not need this information, NULL can be passed.
397        ///
398        /// Returns: An array of VNHumanHandPoseObservationJointsGroupName symbols that are supported by the request revision, or nil if a failure occurs.
399        #[deprecated]
400        #[unsafe(method(supportedJointsGroupNamesForRevision:error:_))]
401        #[unsafe(method_family = none)]
402        pub unsafe fn supportedJointsGroupNamesForRevision_error(
403            revision: NSUInteger,
404        ) -> Result<Retained<NSArray<VNHumanHandPoseObservationJointsGroupName>>, Retained<NSError>>;
405
406        #[cfg(feature = "VNTypes")]
407        /// Obtain the collection of human hand joints group names that are supported by a given request object configured with a specific revision.
408        ///
409        /// Parameter `error`: The address of a variable that will be populated with an error upon failure.  If the caller does not need this information, NULL can be passed.
410        ///
411        /// Returns: An array of VNHumanHandPoseObservationJointsGroupName symbols that are supported by the request revision, or nil if a failure occurs.
412        #[unsafe(method(supportedJointsGroupNamesAndReturnError:_))]
413        #[unsafe(method_family = none)]
414        pub unsafe fn supportedJointsGroupNamesAndReturnError(
415            &self,
416        ) -> Result<Retained<NSArray<VNHumanHandPoseObservationJointsGroupName>>, Retained<NSError>>;
417
418        /// Defines an upper bounds to the maximum number of hands that will be processed for key points in an image.
419        ///
420        /// The complexity in key points determination is scalable by the number of hands to be processed.  All hands detected in an image will be ordered by relative size, with only the N largest ones having key points determined.  The default value for this property is 2. The maximum value for VNDetectHumanHandPoseRequestRevision1 is 6.
421        #[unsafe(method(maximumHandCount))]
422        #[unsafe(method_family = none)]
423        pub unsafe fn maximumHandCount(&self) -> NSUInteger;
424
425        /// Setter for [`maximumHandCount`][Self::maximumHandCount].
426        #[unsafe(method(setMaximumHandCount:))]
427        #[unsafe(method_family = none)]
428        pub unsafe fn setMaximumHandCount(&self, maximum_hand_count: NSUInteger);
429
430        #[cfg(feature = "VNObservation")]
431        /// VNHumanHandPoseObservation results.
432        #[unsafe(method(results))]
433        #[unsafe(method_family = none)]
434        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNHumanHandPoseObservation>>>;
435    );
436}
437
438/// Methods declared on superclass `VNRequest`.
439#[cfg(feature = "VNRequest")]
440impl VNDetectHumanHandPoseRequest {
441    extern_methods!(
442        /// Creates a new VNRequest with no completion handler.
443        #[unsafe(method(init))]
444        #[unsafe(method_family = init)]
445        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
446
447        #[cfg(feature = "block2")]
448        /// Creates a new VNRequest with an optional completion handler.
449        ///
450        ///
451        /// 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.
452        #[unsafe(method(initWithCompletionHandler:))]
453        #[unsafe(method_family = init)]
454        pub unsafe fn initWithCompletionHandler(
455            this: Allocated<Self>,
456            completion_handler: VNRequestCompletionHandler,
457        ) -> Retained<Self>;
458    );
459}
460
461/// Methods declared on superclass `NSObject`.
462#[cfg(feature = "VNRequest")]
463impl VNDetectHumanHandPoseRequest {
464    extern_methods!(
465        #[unsafe(method(new))]
466        #[unsafe(method_family = new)]
467        pub unsafe fn new() -> Retained<Self>;
468    );
469}
470
471/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetecthumanhandposerequestrevision1?language=objc)
472pub static VNDetectHumanHandPoseRequestRevision1: NSUInteger = 1;