objc2_vision/generated/
VNTrackRectangleRequest.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    /// VNTrackRectangleRequest tracks a rectangle in a sequence of images.
11    ///
12    /// The VNTrackRectangleRequest is a special tracker to track rectangular shape objects. The VNTrackRectangleRequest is initialized with a VNRectangleObservation object that contains a rectangle bounding box and four corners locations. VNRectangleObservation can be obtained by running rectangle detector  (VNDetectRectanglesRequest). The VNTrackRectangleRequest is processed using one of the [VNSequenceRequestHandler performRequests:...] methods.
13    ///
14    /// Note: The rectangular object doesn't have to look like a rectangle when projected into the plane of the image of interest. For example, it may look like trapezoid.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackrectanglerequest?language=objc)
17    #[unsafe(super(VNTrackingRequest, VNImageBasedRequest, VNRequest, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
20    pub struct VNTrackRectangleRequest;
21);
22
23#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
24extern_conformance!(
25    unsafe impl NSCopying for VNTrackRectangleRequest {}
26);
27
28#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
29unsafe impl CopyingHelper for VNTrackRectangleRequest {
30    type Result = Self;
31}
32
33#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for VNTrackRectangleRequest {}
36);
37
38#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
39impl VNTrackRectangleRequest {
40    extern_methods!(
41        #[cfg(feature = "VNObservation")]
42        /// Create a new rectangle tracking request with rectangle observation.
43        ///
44        ///
45        /// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
46        #[unsafe(method(initWithRectangleObservation:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithRectangleObservation(
49            this: Allocated<Self>,
50            observation: &VNRectangleObservation,
51        ) -> Retained<Self>;
52
53        #[cfg(all(feature = "VNObservation", feature = "block2"))]
54        /// Create a new rectangle tracking request with rectangle observation.
55        ///
56        ///
57        /// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
58        ///
59        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
60        #[unsafe(method(initWithRectangleObservation:completionHandler:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithRectangleObservation_completionHandler(
63            this: Allocated<Self>,
64            observation: &VNRectangleObservation,
65            completion_handler: VNRequestCompletionHandler,
66        ) -> Retained<Self>;
67
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[cfg(feature = "block2")]
73        #[unsafe(method(initWithCompletionHandler:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithCompletionHandler(
76            this: Allocated<Self>,
77            completion_handler: VNRequestCompletionHandler,
78        ) -> Retained<Self>;
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
84impl VNTrackRectangleRequest {
85    extern_methods!(
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}
91
92/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackrectanglerequestrevision1?language=objc)
93pub static VNTrackRectangleRequestRevision1: NSUInteger = 1;