objc2_vision/generated/
VNTargetedImageRequest.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-graphics")]
6use objc2_core_graphics::*;
7#[cfg(feature = "objc2-core-image")]
8use objc2_core_image::*;
9#[cfg(feature = "objc2-core-media")]
10use objc2_core_media::*;
11#[cfg(feature = "objc2-core-video")]
12use objc2_core_video::*;
13use objc2_foundation::*;
14
15use crate::*;
16
17extern_class!(
18 #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
22 #[derive(Debug, PartialEq, Eq, Hash)]
23 #[cfg(feature = "VNRequest")]
24 pub struct VNTargetedImageRequest;
25);
26
27#[cfg(feature = "VNRequest")]
28unsafe impl NSCopying for VNTargetedImageRequest {}
29
30#[cfg(feature = "VNRequest")]
31unsafe impl CopyingHelper for VNTargetedImageRequest {
32 type Result = Self;
33}
34
35#[cfg(feature = "VNRequest")]
36unsafe impl NSObjectProtocol for VNTargetedImageRequest {}
37
38#[cfg(feature = "VNRequest")]
39impl VNTargetedImageRequest {
40 extern_methods!(
41 #[unsafe(method(init))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[cfg(feature = "block2")]
46 #[unsafe(method(initWithCompletionHandler:))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn initWithCompletionHandler(
49 this: Allocated<Self>,
50 completion_handler: VNRequestCompletionHandler,
51 ) -> Retained<Self>;
52
53 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
54 #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn initWithTargetedCVPixelBuffer_options(
63 this: Allocated<Self>,
64 pixel_buffer: &CVPixelBuffer,
65 options: &NSDictionary<VNImageOption, AnyObject>,
66 ) -> Retained<Self>;
67
68 #[cfg(all(
69 feature = "VNRequestHandler",
70 feature = "block2",
71 feature = "objc2-core-video"
72 ))]
73 #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
84 this: Allocated<Self>,
85 pixel_buffer: &CVPixelBuffer,
86 options: &NSDictionary<VNImageOption, AnyObject>,
87 completion_handler: VNRequestCompletionHandler,
88 ) -> Retained<Self>;
89
90 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
91 #[unsafe(method(initWithTargetedCGImage:options:))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn initWithTargetedCGImage_options(
100 this: Allocated<Self>,
101 cg_image: &CGImage,
102 options: &NSDictionary<VNImageOption, AnyObject>,
103 ) -> Retained<Self>;
104
105 #[cfg(all(
106 feature = "VNRequestHandler",
107 feature = "block2",
108 feature = "objc2-core-graphics"
109 ))]
110 #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn initWithTargetedCGImage_options_completionHandler(
121 this: Allocated<Self>,
122 cg_image: &CGImage,
123 options: &NSDictionary<VNImageOption, AnyObject>,
124 completion_handler: VNRequestCompletionHandler,
125 ) -> Retained<Self>;
126
127 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
128 #[unsafe(method(initWithTargetedCIImage:options:))]
135 #[unsafe(method_family = init)]
136 pub unsafe fn initWithTargetedCIImage_options(
137 this: Allocated<Self>,
138 ci_image: &CIImage,
139 options: &NSDictionary<VNImageOption, AnyObject>,
140 ) -> Retained<Self>;
141
142 #[cfg(all(
143 feature = "VNRequestHandler",
144 feature = "block2",
145 feature = "objc2-core-image"
146 ))]
147 #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
156 #[unsafe(method_family = init)]
157 pub unsafe fn initWithTargetedCIImage_options_completionHandler(
158 this: Allocated<Self>,
159 ci_image: &CIImage,
160 options: &NSDictionary<VNImageOption, AnyObject>,
161 completion_handler: VNRequestCompletionHandler,
162 ) -> Retained<Self>;
163
164 #[cfg(feature = "VNRequestHandler")]
165 #[unsafe(method(initWithTargetedImageURL:options:))]
172 #[unsafe(method_family = init)]
173 pub unsafe fn initWithTargetedImageURL_options(
174 this: Allocated<Self>,
175 image_url: &NSURL,
176 options: &NSDictionary<VNImageOption, AnyObject>,
177 ) -> Retained<Self>;
178
179 #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
180 #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
189 #[unsafe(method_family = init)]
190 pub unsafe fn initWithTargetedImageURL_options_completionHandler(
191 this: Allocated<Self>,
192 image_url: &NSURL,
193 options: &NSDictionary<VNImageOption, AnyObject>,
194 completion_handler: VNRequestCompletionHandler,
195 ) -> Retained<Self>;
196
197 #[cfg(feature = "VNRequestHandler")]
198 #[unsafe(method(initWithTargetedImageData:options:))]
205 #[unsafe(method_family = init)]
206 pub unsafe fn initWithTargetedImageData_options(
207 this: Allocated<Self>,
208 image_data: &NSData,
209 options: &NSDictionary<VNImageOption, AnyObject>,
210 ) -> Retained<Self>;
211
212 #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
213 #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
222 #[unsafe(method_family = init)]
223 pub unsafe fn initWithTargetedImageData_options_completionHandler(
224 this: Allocated<Self>,
225 image_data: &NSData,
226 options: &NSDictionary<VNImageOption, AnyObject>,
227 completion_handler: VNRequestCompletionHandler,
228 ) -> Retained<Self>;
229
230 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
231 #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
238 #[unsafe(method_family = init)]
239 pub unsafe fn initWithTargetedCMSampleBuffer_options(
240 this: Allocated<Self>,
241 sample_buffer: &CMSampleBuffer,
242 options: &NSDictionary<VNImageOption, AnyObject>,
243 ) -> Retained<Self>;
244
245 #[cfg(all(
246 feature = "VNRequestHandler",
247 feature = "block2",
248 feature = "objc2-core-media"
249 ))]
250 #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
259 #[unsafe(method_family = init)]
260 pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
261 this: Allocated<Self>,
262 sample_buffer: &CMSampleBuffer,
263 options: &NSDictionary<VNImageOption, AnyObject>,
264 completion_handler: VNRequestCompletionHandler,
265 ) -> Retained<Self>;
266 );
267}
268
269#[cfg(feature = "VNRequest")]
271impl VNTargetedImageRequest {
272 extern_methods!(
273 #[unsafe(method(new))]
274 #[unsafe(method_family = new)]
275 pub unsafe fn new() -> Retained<Self>;
276 );
277}