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"))]
24unsafe impl NSCopying for VNTrackRectangleRequest {}
25
26#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
27unsafe impl CopyingHelper for VNTrackRectangleRequest {
28    type Result = Self;
29}
30
31#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
32unsafe impl NSObjectProtocol for VNTrackRectangleRequest {}
33
34#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
35impl VNTrackRectangleRequest {
36    extern_methods!(
37        #[cfg(feature = "VNObservation")]
38        /// Create a new rectangle tracking request with rectangle observation.
39        ///
40        ///
41        /// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
42        #[unsafe(method(initWithRectangleObservation:))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn initWithRectangleObservation(
45            this: Allocated<Self>,
46            observation: &VNRectangleObservation,
47        ) -> Retained<Self>;
48
49        #[cfg(all(feature = "VNObservation", feature = "block2"))]
50        /// Create a new rectangle tracking request with rectangle observation.
51        ///
52        ///
53        /// Parameter `observation`: Rectangle observation with bounding box and rectangle corners location info.
54        ///
55        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
56        #[unsafe(method(initWithRectangleObservation:completionHandler:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithRectangleObservation_completionHandler(
59            this: Allocated<Self>,
60            observation: &VNRectangleObservation,
61            completion_handler: VNRequestCompletionHandler,
62        ) -> Retained<Self>;
63
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[cfg(feature = "block2")]
69        #[unsafe(method(initWithCompletionHandler:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithCompletionHandler(
72            this: Allocated<Self>,
73            completion_handler: VNRequestCompletionHandler,
74        ) -> Retained<Self>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
80impl VNTrackRectangleRequest {
81    extern_methods!(
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub unsafe fn new() -> Retained<Self>;
85    );
86}
87
88/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackrectanglerequestrevision1?language=objc)
89pub static VNTrackRectangleRequestRevision1: NSUInteger = 1;