objc2_vision/generated/
VNDetectAnimalBodyPoseRequest.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    /// Detects specific landmark points on animal bodies.
11    ///
12    /// This request will produce a collection of VNAnimalBodyPoseObservation objects which describe the pose of each detected animal body.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectanimalbodyposerequest?language=objc)
15    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "VNRequest")]
18    pub struct VNDetectAnimalBodyPoseRequest;
19);
20
21#[cfg(feature = "VNRequest")]
22extern_conformance!(
23    unsafe impl NSCopying for VNDetectAnimalBodyPoseRequest {}
24);
25
26#[cfg(feature = "VNRequest")]
27unsafe impl CopyingHelper for VNDetectAnimalBodyPoseRequest {
28    type Result = Self;
29}
30
31#[cfg(feature = "VNRequest")]
32extern_conformance!(
33    unsafe impl NSObjectProtocol for VNDetectAnimalBodyPoseRequest {}
34);
35
36#[cfg(feature = "VNRequest")]
37impl VNDetectAnimalBodyPoseRequest {
38    extern_methods!(
39        #[cfg(feature = "VNTypes")]
40        /// Obtain the collection of animal body joint names that are supported by a request object configured with a request revision.
41        ///
42        /// 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.
43        ///
44        /// Returns: An array of VNAnimalBodyPoseObservationJointName symbols that are supported by the request, or nil if a failure occurs.
45        #[unsafe(method(supportedJointNamesAndReturnError:_))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn supportedJointNamesAndReturnError(
48            &self,
49        ) -> Result<Retained<NSArray<VNAnimalBodyPoseObservationJointName>>, Retained<NSError>>;
50
51        #[cfg(feature = "VNTypes")]
52        /// Obtain the collection of animal body joints group names that are supported by a request object configured with a request revision.
53        ///
54        /// 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.
55        ///
56        /// Returns: An array of VNAnimalBodyPoseObservationJointsGroupName symbols that are supported by the request, or nil if a failure occurs.
57        #[unsafe(method(supportedJointsGroupNamesAndReturnError:_))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn supportedJointsGroupNamesAndReturnError(
60            &self,
61        ) -> Result<Retained<NSArray<VNAnimalBodyPoseObservationJointsGroupName>>, Retained<NSError>>;
62
63        #[cfg(feature = "VNObservation")]
64        /// VNAnimalBodyPoseObservation results.
65        #[unsafe(method(results))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNAnimalBodyPoseObservation>>>;
68    );
69}
70
71/// Methods declared on superclass `VNRequest`.
72#[cfg(feature = "VNRequest")]
73impl VNDetectAnimalBodyPoseRequest {
74    extern_methods!(
75        /// Creates a new VNRequest with no completion handler.
76        #[unsafe(method(init))]
77        #[unsafe(method_family = init)]
78        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
79
80        #[cfg(feature = "block2")]
81        /// Creates a new VNRequest with an optional completion handler.
82        ///
83        ///
84        /// 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.
85        ///
86        /// # Safety
87        ///
88        /// `completion_handler` must be a valid pointer or null.
89        #[unsafe(method(initWithCompletionHandler:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithCompletionHandler(
92            this: Allocated<Self>,
93            completion_handler: VNRequestCompletionHandler,
94        ) -> Retained<Self>;
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99#[cfg(feature = "VNRequest")]
100impl VNDetectAnimalBodyPoseRequest {
101    extern_methods!(
102        #[unsafe(method(new))]
103        #[unsafe(method_family = new)]
104        pub unsafe fn new() -> Retained<Self>;
105    );
106}
107
108/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectanimalbodyposerequestrevision1?language=objc)
109pub static VNDetectAnimalBodyPoseRequestRevision1: NSUInteger = 1;