objc2_vision/generated/
VNTrackHomographicImageRegistrationRequest.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::*;
5#[cfg(feature = "objc2-core-media")]
6use objc2_core_media::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// An image registration request that will produce a homographic transformation that can morph one image to another.
13    ///
14    /// Because this is a stateful request, it must be performed on at least two images in order to produce an observation.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackhomographicimageregistrationrequest?language=objc)
17    #[unsafe(super(VNStatefulRequest, VNImageBasedRequest, VNRequest, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
20    pub struct VNTrackHomographicImageRegistrationRequest;
21);
22
23#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
24extern_conformance!(
25    unsafe impl NSCopying for VNTrackHomographicImageRegistrationRequest {}
26);
27
28#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
29unsafe impl CopyingHelper for VNTrackHomographicImageRegistrationRequest {
30    type Result = Self;
31}
32
33#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for VNTrackHomographicImageRegistrationRequest {}
36);
37
38#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
39impl VNTrackHomographicImageRegistrationRequest {
40    extern_methods!(
41        /// Create a new request that can statefully track the homographic registration of two images.
42        ///
43        /// This is a convenience initializer for a frame analysis spacing of kCMTimeZero and a nil completion handler.
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[cfg(feature = "block2")]
49        /// Create a new request that can statefully track the homographic registration of two images.
50        ///
51        /// This is a convenience initializer for a frame analysis spacing of kCMTimeZero.
52        #[unsafe(method(initWithCompletionHandler:))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn initWithCompletionHandler(
55            this: Allocated<Self>,
56            completion_handler: VNRequestCompletionHandler,
57        ) -> Retained<Self>;
58
59        #[cfg(feature = "VNObservation")]
60        /// VNImageHomographicAlignmentObservation results.
61        #[unsafe(method(results))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn results(
64            &self,
65        ) -> Option<Retained<NSArray<VNImageHomographicAlignmentObservation>>>;
66    );
67}
68
69/// Methods declared on superclass `VNStatefulRequest`.
70#[cfg(all(feature = "VNRequest", feature = "VNStatefulRequest"))]
71impl VNTrackHomographicImageRegistrationRequest {
72    extern_methods!(
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76
77        #[cfg(all(feature = "block2", feature = "objc2-core-media"))]
78        /// Create a new video-based stateful request.
79        ///
80        ///
81        /// Parameter `frameAnalysisSpacing`: The reciprocal of maximum rate at which buffers will be processed. The request will not process buffers that fall within the frameAnalysisSpacing after it has performed the analysis. The analysis is not done by wall time but by analysis of of the time stamps of the samplebuffers being processed.
82        ///
83        /// 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.
84        #[unsafe(method(initWithFrameAnalysisSpacing:completionHandler:))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn initWithFrameAnalysisSpacing_completionHandler(
87            this: Allocated<Self>,
88            frame_analysis_spacing: CMTime,
89            completion_handler: VNRequestCompletionHandler,
90        ) -> Retained<Self>;
91    );
92}
93
94/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackhomographicimageregistrationrequestrevision1?language=objc)
95pub static VNTrackHomographicImageRegistrationRequestRevision1: NSUInteger = 1;