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")]
28extern_conformance!(
29 unsafe impl NSCopying for VNTargetedImageRequest {}
30);
31
32#[cfg(feature = "VNRequest")]
33unsafe impl CopyingHelper for VNTargetedImageRequest {
34 type Result = Self;
35}
36
37#[cfg(feature = "VNRequest")]
38extern_conformance!(
39 unsafe impl NSObjectProtocol for VNTargetedImageRequest {}
40);
41
42#[cfg(feature = "VNRequest")]
43impl VNTargetedImageRequest {
44 extern_methods!(
45 #[unsafe(method(init))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49 #[cfg(feature = "block2")]
50 #[unsafe(method(initWithCompletionHandler:))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn initWithCompletionHandler(
53 this: Allocated<Self>,
54 completion_handler: VNRequestCompletionHandler,
55 ) -> Retained<Self>;
56
57 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
58 #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn initWithTargetedCVPixelBuffer_options(
67 this: Allocated<Self>,
68 pixel_buffer: &CVPixelBuffer,
69 options: &NSDictionary<VNImageOption, AnyObject>,
70 ) -> Retained<Self>;
71
72 #[cfg(all(
73 feature = "VNRequestHandler",
74 feature = "block2",
75 feature = "objc2-core-video"
76 ))]
77 #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
88 this: Allocated<Self>,
89 pixel_buffer: &CVPixelBuffer,
90 options: &NSDictionary<VNImageOption, AnyObject>,
91 completion_handler: VNRequestCompletionHandler,
92 ) -> Retained<Self>;
93
94 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
95 #[unsafe(method(initWithTargetedCGImage:options:))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn initWithTargetedCGImage_options(
104 this: Allocated<Self>,
105 cg_image: &CGImage,
106 options: &NSDictionary<VNImageOption, AnyObject>,
107 ) -> Retained<Self>;
108
109 #[cfg(all(
110 feature = "VNRequestHandler",
111 feature = "block2",
112 feature = "objc2-core-graphics"
113 ))]
114 #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
123 #[unsafe(method_family = init)]
124 pub unsafe fn initWithTargetedCGImage_options_completionHandler(
125 this: Allocated<Self>,
126 cg_image: &CGImage,
127 options: &NSDictionary<VNImageOption, AnyObject>,
128 completion_handler: VNRequestCompletionHandler,
129 ) -> Retained<Self>;
130
131 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
132 #[unsafe(method(initWithTargetedCIImage:options:))]
139 #[unsafe(method_family = init)]
140 pub unsafe fn initWithTargetedCIImage_options(
141 this: Allocated<Self>,
142 ci_image: &CIImage,
143 options: &NSDictionary<VNImageOption, AnyObject>,
144 ) -> Retained<Self>;
145
146 #[cfg(all(
147 feature = "VNRequestHandler",
148 feature = "block2",
149 feature = "objc2-core-image"
150 ))]
151 #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
160 #[unsafe(method_family = init)]
161 pub unsafe fn initWithTargetedCIImage_options_completionHandler(
162 this: Allocated<Self>,
163 ci_image: &CIImage,
164 options: &NSDictionary<VNImageOption, AnyObject>,
165 completion_handler: VNRequestCompletionHandler,
166 ) -> Retained<Self>;
167
168 #[cfg(feature = "VNRequestHandler")]
169 #[unsafe(method(initWithTargetedImageURL:options:))]
176 #[unsafe(method_family = init)]
177 pub unsafe fn initWithTargetedImageURL_options(
178 this: Allocated<Self>,
179 image_url: &NSURL,
180 options: &NSDictionary<VNImageOption, AnyObject>,
181 ) -> Retained<Self>;
182
183 #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
184 #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
193 #[unsafe(method_family = init)]
194 pub unsafe fn initWithTargetedImageURL_options_completionHandler(
195 this: Allocated<Self>,
196 image_url: &NSURL,
197 options: &NSDictionary<VNImageOption, AnyObject>,
198 completion_handler: VNRequestCompletionHandler,
199 ) -> Retained<Self>;
200
201 #[cfg(feature = "VNRequestHandler")]
202 #[unsafe(method(initWithTargetedImageData:options:))]
209 #[unsafe(method_family = init)]
210 pub unsafe fn initWithTargetedImageData_options(
211 this: Allocated<Self>,
212 image_data: &NSData,
213 options: &NSDictionary<VNImageOption, AnyObject>,
214 ) -> Retained<Self>;
215
216 #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
217 #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
226 #[unsafe(method_family = init)]
227 pub unsafe fn initWithTargetedImageData_options_completionHandler(
228 this: Allocated<Self>,
229 image_data: &NSData,
230 options: &NSDictionary<VNImageOption, AnyObject>,
231 completion_handler: VNRequestCompletionHandler,
232 ) -> Retained<Self>;
233
234 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
235 #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
242 #[unsafe(method_family = init)]
243 pub unsafe fn initWithTargetedCMSampleBuffer_options(
244 this: Allocated<Self>,
245 sample_buffer: &CMSampleBuffer,
246 options: &NSDictionary<VNImageOption, AnyObject>,
247 ) -> Retained<Self>;
248
249 #[cfg(all(
250 feature = "VNRequestHandler",
251 feature = "block2",
252 feature = "objc2-core-media"
253 ))]
254 #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
263 #[unsafe(method_family = init)]
264 pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
265 this: Allocated<Self>,
266 sample_buffer: &CMSampleBuffer,
267 options: &NSDictionary<VNImageOption, AnyObject>,
268 completion_handler: VNRequestCompletionHandler,
269 ) -> Retained<Self>;
270 );
271}
272
273#[cfg(feature = "VNRequest")]
275impl VNTargetedImageRequest {
276 extern_methods!(
277 #[unsafe(method(new))]
278 #[unsafe(method_family = new)]
279 pub unsafe fn new() -> Retained<Self>;
280 );
281}