objc2_vision/generated/
VNTrackObjectRequest.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    /// VNTrackObjectRequest tracks an object in a sequence of images.
11    ///
12    /// The VNTrackObjectRequest is a general purpose object tracker. This tracker is used when the tracked entity does not have a special tracker, like VNTrackRectangleRequest. The VNTrackObjectRequest is initialized with VNDetectedObjectObservation that contains bounding box for the object of interest. This tracker is processed using one of the [VNSequenceRequestHandler performRequests:...] methods.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackobjectrequest?language=objc)
15    #[unsafe(super(VNTrackingRequest, VNImageBasedRequest, VNRequest, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
18    pub struct VNTrackObjectRequest;
19);
20
21#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
22extern_conformance!(
23    unsafe impl NSCopying for VNTrackObjectRequest {}
24);
25
26#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
27unsafe impl CopyingHelper for VNTrackObjectRequest {
28    type Result = Self;
29}
30
31#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
32extern_conformance!(
33    unsafe impl NSObjectProtocol for VNTrackObjectRequest {}
34);
35
36#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
37impl VNTrackObjectRequest {
38    extern_methods!(
39        #[cfg(feature = "VNObservation")]
40        /// Create a new request with detected object observation.
41        ///
42        ///
43        /// Parameter `observation`: Detected object observation with bounding box info.
44        #[unsafe(method(initWithDetectedObjectObservation:))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn initWithDetectedObjectObservation(
47            this: Allocated<Self>,
48            observation: &VNDetectedObjectObservation,
49        ) -> Retained<Self>;
50
51        #[cfg(all(feature = "VNObservation", feature = "block2"))]
52        /// Create a new request with detected object observation.
53        ///
54        ///
55        /// Parameter `observation`: Detected object observation with bounding box info.
56        ///
57        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
58        #[unsafe(method(initWithDetectedObjectObservation:completionHandler:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithDetectedObjectObservation_completionHandler(
61            this: Allocated<Self>,
62            observation: &VNDetectedObjectObservation,
63            completion_handler: VNRequestCompletionHandler,
64        ) -> Retained<Self>;
65
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70        #[cfg(feature = "block2")]
71        #[unsafe(method(initWithCompletionHandler:))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn initWithCompletionHandler(
74            this: Allocated<Self>,
75            completion_handler: VNRequestCompletionHandler,
76        ) -> Retained<Self>;
77    );
78}
79
80/// Methods declared on superclass `NSObject`.
81#[cfg(all(feature = "VNRequest", feature = "VNTrackingRequest"))]
82impl VNTrackObjectRequest {
83    extern_methods!(
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}
89
90/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackobjectrequestrevision1?language=objc)
91pub static VNTrackObjectRequestRevision1: NSUInteger = 1;
92
93/// [Apple's documentation](https://developer.apple.com/documentation/vision/vntrackobjectrequestrevision2?language=objc)
94pub static VNTrackObjectRequestRevision2: NSUInteger = 2;