objc2_vision/generated/
VNTargetedImageRequest.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::*;
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#[cfg(feature = "objc2-image-io")]
15use objc2_image_io::*;
16
17use crate::*;
18
19extern_class!(
20    /// A request that requires an initial image as a starting point for its work.
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vntargetedimagerequest?language=objc)
23    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    #[cfg(feature = "VNRequest")]
26    pub struct VNTargetedImageRequest;
27);
28
29#[cfg(feature = "VNRequest")]
30extern_conformance!(
31    unsafe impl NSCopying for VNTargetedImageRequest {}
32);
33
34#[cfg(feature = "VNRequest")]
35unsafe impl CopyingHelper for VNTargetedImageRequest {
36    type Result = Self;
37}
38
39#[cfg(feature = "VNRequest")]
40extern_conformance!(
41    unsafe impl NSObjectProtocol for VNTargetedImageRequest {}
42);
43
44#[cfg(feature = "VNRequest")]
45impl VNTargetedImageRequest {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51        #[cfg(feature = "block2")]
52        /// # Safety
53        ///
54        /// `completion_handler` must be a valid pointer or null.
55        #[unsafe(method(initWithCompletionHandler:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithCompletionHandler(
58            this: Allocated<Self>,
59            completion_handler: VNRequestCompletionHandler,
60        ) -> Retained<Self>;
61
62        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
63        /// Create a new request that targets an image in a pixel buffer.
64        ///
65        ///
66        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
67        ///
68        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
69        ///
70        /// # Safety
71        ///
72        /// `options` generic should be of the correct type.
73        #[unsafe(method(initWithTargetedCVPixelBuffer:options:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithTargetedCVPixelBuffer_options(
76            this: Allocated<Self>,
77            pixel_buffer: &CVPixelBuffer,
78            options: &NSDictionary<VNImageOption, AnyObject>,
79        ) -> Retained<Self>;
80
81        #[cfg(all(
82            feature = "VNRequestHandler",
83            feature = "block2",
84            feature = "objc2-core-video"
85        ))]
86        /// Create a new request that targets an image in a pixel buffer.
87        ///
88        ///
89        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
90        ///
91        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
92        ///
93        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
94        ///
95        /// # Safety
96        ///
97        /// - `options` generic should be of the correct type.
98        /// - `completion_handler` must be a valid pointer or null.
99        #[unsafe(method(initWithTargetedCVPixelBuffer:options:completionHandler:))]
100        #[unsafe(method_family = init)]
101        pub unsafe fn initWithTargetedCVPixelBuffer_options_completionHandler(
102            this: Allocated<Self>,
103            pixel_buffer: &CVPixelBuffer,
104            options: &NSDictionary<VNImageOption, AnyObject>,
105            completion_handler: VNRequestCompletionHandler,
106        ) -> Retained<Self>;
107
108        #[cfg(all(
109            feature = "VNRequestHandler",
110            feature = "objc2-core-video",
111            feature = "objc2-image-io"
112        ))]
113        /// Create a new request that targets an image in a pixel buffer.
114        ///
115        ///
116        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
117        ///
118        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
119        ///
120        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
121        ///
122        /// # Safety
123        ///
124        /// `options` generic should be of the correct type.
125        #[unsafe(method(initWithTargetedCVPixelBuffer:orientation:options:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithTargetedCVPixelBuffer_orientation_options(
128            this: Allocated<Self>,
129            pixel_buffer: &CVPixelBuffer,
130            orientation: CGImagePropertyOrientation,
131            options: &NSDictionary<VNImageOption, AnyObject>,
132        ) -> Retained<Self>;
133
134        #[cfg(all(
135            feature = "VNRequestHandler",
136            feature = "block2",
137            feature = "objc2-core-video",
138            feature = "objc2-image-io"
139        ))]
140        /// Create a new request that targets an image in a pixel buffer.
141        ///
142        ///
143        /// Parameter `pixelBuffer`: The pixel buffer containing the targeted image.
144        ///
145        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
146        ///
147        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
148        ///
149        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
150        ///
151        /// # Safety
152        ///
153        /// - `options` generic should be of the correct type.
154        /// - `completion_handler` must be a valid pointer or null.
155        #[unsafe(method(initWithTargetedCVPixelBuffer:orientation:options:completionHandler:))]
156        #[unsafe(method_family = init)]
157        pub unsafe fn initWithTargetedCVPixelBuffer_orientation_options_completionHandler(
158            this: Allocated<Self>,
159            pixel_buffer: &CVPixelBuffer,
160            orientation: CGImagePropertyOrientation,
161            options: &NSDictionary<VNImageOption, AnyObject>,
162            completion_handler: VNRequestCompletionHandler,
163        ) -> Retained<Self>;
164
165        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-graphics"))]
166        /// Create a new request with a targeted CGImage.
167        ///
168        ///
169        /// Parameter `cgImage`: The CGImageRef of the targeted image.
170        ///
171        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
172        ///
173        /// # Safety
174        ///
175        /// `options` generic should be of the correct type.
176        #[unsafe(method(initWithTargetedCGImage:options:))]
177        #[unsafe(method_family = init)]
178        pub unsafe fn initWithTargetedCGImage_options(
179            this: Allocated<Self>,
180            cg_image: &CGImage,
181            options: &NSDictionary<VNImageOption, AnyObject>,
182        ) -> Retained<Self>;
183
184        #[cfg(all(
185            feature = "VNRequestHandler",
186            feature = "block2",
187            feature = "objc2-core-graphics"
188        ))]
189        /// Create a new request with a targeted CGImage.
190        ///
191        ///
192        /// Parameter `cgImage`: The CGImageRef of the targeted image.
193        ///
194        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
195        ///
196        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
197        ///
198        /// # Safety
199        ///
200        /// - `options` generic should be of the correct type.
201        /// - `completion_handler` must be a valid pointer or null.
202        #[unsafe(method(initWithTargetedCGImage:options:completionHandler:))]
203        #[unsafe(method_family = init)]
204        pub unsafe fn initWithTargetedCGImage_options_completionHandler(
205            this: Allocated<Self>,
206            cg_image: &CGImage,
207            options: &NSDictionary<VNImageOption, AnyObject>,
208            completion_handler: VNRequestCompletionHandler,
209        ) -> Retained<Self>;
210
211        #[cfg(all(
212            feature = "VNRequestHandler",
213            feature = "objc2-core-graphics",
214            feature = "objc2-image-io"
215        ))]
216        /// Create a new request with a targeted CGImage.
217        ///
218        ///
219        /// Parameter `cgImage`: The CGImageRef of the targeted image.
220        ///
221        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
222        ///
223        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
224        ///
225        /// # Safety
226        ///
227        /// `options` generic should be of the correct type.
228        #[unsafe(method(initWithTargetedCGImage:orientation:options:))]
229        #[unsafe(method_family = init)]
230        pub unsafe fn initWithTargetedCGImage_orientation_options(
231            this: Allocated<Self>,
232            cg_image: &CGImage,
233            orientation: CGImagePropertyOrientation,
234            options: &NSDictionary<VNImageOption, AnyObject>,
235        ) -> Retained<Self>;
236
237        #[cfg(all(
238            feature = "VNRequestHandler",
239            feature = "block2",
240            feature = "objc2-core-graphics",
241            feature = "objc2-image-io"
242        ))]
243        /// Create a new request with a targeted CGImage.
244        ///
245        ///
246        /// Parameter `cgImage`: The CGImageRef of the targeted image.
247        ///
248        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
249        ///
250        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
251        ///
252        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
253        ///
254        /// # Safety
255        ///
256        /// - `options` generic should be of the correct type.
257        /// - `completion_handler` must be a valid pointer or null.
258        #[unsafe(method(initWithTargetedCGImage:orientation:options:completionHandler:))]
259        #[unsafe(method_family = init)]
260        pub unsafe fn initWithTargetedCGImage_orientation_options_completionHandler(
261            this: Allocated<Self>,
262            cg_image: &CGImage,
263            orientation: CGImagePropertyOrientation,
264            options: &NSDictionary<VNImageOption, AnyObject>,
265            completion_handler: VNRequestCompletionHandler,
266        ) -> Retained<Self>;
267
268        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-image"))]
269        /// Create a new request with a targeted CIImage.
270        ///
271        ///
272        /// Parameter `ciImage`: The CIImage of the targeted image.
273        ///
274        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
275        ///
276        /// # Safety
277        ///
278        /// `options` generic should be of the correct type.
279        #[unsafe(method(initWithTargetedCIImage:options:))]
280        #[unsafe(method_family = init)]
281        pub unsafe fn initWithTargetedCIImage_options(
282            this: Allocated<Self>,
283            ci_image: &CIImage,
284            options: &NSDictionary<VNImageOption, AnyObject>,
285        ) -> Retained<Self>;
286
287        #[cfg(all(
288            feature = "VNRequestHandler",
289            feature = "block2",
290            feature = "objc2-core-image"
291        ))]
292        /// Create a new request with a targeted CIImage.
293        ///
294        ///
295        /// Parameter `ciImage`: The CIImage of the targeted image.
296        ///
297        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
298        ///
299        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
300        ///
301        /// # Safety
302        ///
303        /// - `options` generic should be of the correct type.
304        /// - `completion_handler` must be a valid pointer or null.
305        #[unsafe(method(initWithTargetedCIImage:options:completionHandler:))]
306        #[unsafe(method_family = init)]
307        pub unsafe fn initWithTargetedCIImage_options_completionHandler(
308            this: Allocated<Self>,
309            ci_image: &CIImage,
310            options: &NSDictionary<VNImageOption, AnyObject>,
311            completion_handler: VNRequestCompletionHandler,
312        ) -> Retained<Self>;
313
314        #[cfg(all(
315            feature = "VNRequestHandler",
316            feature = "objc2-core-image",
317            feature = "objc2-image-io"
318        ))]
319        /// Create a new request with a targeted CIImage.
320        ///
321        ///
322        /// Parameter `ciImage`: The CIImage of the targeted image.
323        ///
324        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
325        ///
326        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
327        ///
328        /// # Safety
329        ///
330        /// `options` generic should be of the correct type.
331        #[unsafe(method(initWithTargetedCIImage:orientation:options:))]
332        #[unsafe(method_family = init)]
333        pub unsafe fn initWithTargetedCIImage_orientation_options(
334            this: Allocated<Self>,
335            ci_image: &CIImage,
336            orientation: CGImagePropertyOrientation,
337            options: &NSDictionary<VNImageOption, AnyObject>,
338        ) -> Retained<Self>;
339
340        #[cfg(all(
341            feature = "VNRequestHandler",
342            feature = "block2",
343            feature = "objc2-core-image",
344            feature = "objc2-image-io"
345        ))]
346        /// Create a new request with a targeted CIImage.
347        ///
348        ///
349        /// Parameter `ciImage`: The CIImage of the targeted image.
350        ///
351        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
352        ///
353        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
354        ///
355        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
356        ///
357        /// # Safety
358        ///
359        /// - `options` generic should be of the correct type.
360        /// - `completion_handler` must be a valid pointer or null.
361        #[unsafe(method(initWithTargetedCIImage:orientation:options:completionHandler:))]
362        #[unsafe(method_family = init)]
363        pub unsafe fn initWithTargetedCIImage_orientation_options_completionHandler(
364            this: Allocated<Self>,
365            ci_image: &CIImage,
366            orientation: CGImagePropertyOrientation,
367            options: &NSDictionary<VNImageOption, AnyObject>,
368            completion_handler: VNRequestCompletionHandler,
369        ) -> Retained<Self>;
370
371        #[cfg(feature = "VNRequestHandler")]
372        /// Create a new request with a targeted image URL.
373        ///
374        ///
375        /// Parameter `imageURL`: The URL of the targeted image.
376        ///
377        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
378        ///
379        /// # Safety
380        ///
381        /// `options` generic should be of the correct type.
382        #[unsafe(method(initWithTargetedImageURL:options:))]
383        #[unsafe(method_family = init)]
384        pub unsafe fn initWithTargetedImageURL_options(
385            this: Allocated<Self>,
386            image_url: &NSURL,
387            options: &NSDictionary<VNImageOption, AnyObject>,
388        ) -> Retained<Self>;
389
390        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
391        /// Create a new request with a targeted image URL.
392        ///
393        ///
394        /// Parameter `imageURL`: The URL of the targeted image.
395        ///
396        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
397        ///
398        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
399        ///
400        /// # Safety
401        ///
402        /// - `options` generic should be of the correct type.
403        /// - `completion_handler` must be a valid pointer or null.
404        #[unsafe(method(initWithTargetedImageURL:options:completionHandler:))]
405        #[unsafe(method_family = init)]
406        pub unsafe fn initWithTargetedImageURL_options_completionHandler(
407            this: Allocated<Self>,
408            image_url: &NSURL,
409            options: &NSDictionary<VNImageOption, AnyObject>,
410            completion_handler: VNRequestCompletionHandler,
411        ) -> Retained<Self>;
412
413        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-image-io"))]
414        /// Create a new request with a targeted image URL.
415        ///
416        ///
417        /// Parameter `imageURL`: The URL of the targeted image.
418        ///
419        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
420        ///
421        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
422        ///
423        /// # Safety
424        ///
425        /// `options` generic should be of the correct type.
426        #[unsafe(method(initWithTargetedImageURL:orientation:options:))]
427        #[unsafe(method_family = init)]
428        pub unsafe fn initWithTargetedImageURL_orientation_options(
429            this: Allocated<Self>,
430            image_url: &NSURL,
431            orientation: CGImagePropertyOrientation,
432            options: &NSDictionary<VNImageOption, AnyObject>,
433        ) -> Retained<Self>;
434
435        #[cfg(all(
436            feature = "VNRequestHandler",
437            feature = "block2",
438            feature = "objc2-image-io"
439        ))]
440        /// Create a new request with a targeted image URL.
441        ///
442        ///
443        /// Parameter `imageURL`: The URL of the targeted image.
444        ///
445        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
446        ///
447        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
448        ///
449        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
450        ///
451        /// # Safety
452        ///
453        /// - `options` generic should be of the correct type.
454        /// - `completion_handler` must be a valid pointer or null.
455        #[unsafe(method(initWithTargetedImageURL:orientation:options:completionHandler:))]
456        #[unsafe(method_family = init)]
457        pub unsafe fn initWithTargetedImageURL_orientation_options_completionHandler(
458            this: Allocated<Self>,
459            image_url: &NSURL,
460            orientation: CGImagePropertyOrientation,
461            options: &NSDictionary<VNImageOption, AnyObject>,
462            completion_handler: VNRequestCompletionHandler,
463        ) -> Retained<Self>;
464
465        #[cfg(feature = "VNRequestHandler")]
466        /// Create a new request with a targeted image data.
467        ///
468        ///
469        /// Parameter `imageData`: The data of the targeted image.
470        ///
471        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
472        ///
473        /// # Safety
474        ///
475        /// `options` generic should be of the correct type.
476        #[unsafe(method(initWithTargetedImageData:options:))]
477        #[unsafe(method_family = init)]
478        pub unsafe fn initWithTargetedImageData_options(
479            this: Allocated<Self>,
480            image_data: &NSData,
481            options: &NSDictionary<VNImageOption, AnyObject>,
482        ) -> Retained<Self>;
483
484        #[cfg(all(feature = "VNRequestHandler", feature = "block2"))]
485        /// Create a new request with a targeted image data.
486        ///
487        ///
488        /// Parameter `imageData`: The data of the targeted image.
489        ///
490        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
491        ///
492        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
493        ///
494        /// # Safety
495        ///
496        /// - `options` generic should be of the correct type.
497        /// - `completion_handler` must be a valid pointer or null.
498        #[unsafe(method(initWithTargetedImageData:options:completionHandler:))]
499        #[unsafe(method_family = init)]
500        pub unsafe fn initWithTargetedImageData_options_completionHandler(
501            this: Allocated<Self>,
502            image_data: &NSData,
503            options: &NSDictionary<VNImageOption, AnyObject>,
504            completion_handler: VNRequestCompletionHandler,
505        ) -> Retained<Self>;
506
507        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-image-io"))]
508        /// Create a new request with a targeted image data.
509        ///
510        ///
511        /// Parameter `imageData`: The data of the targeted image.
512        ///
513        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
514        ///
515        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
516        ///
517        /// # Safety
518        ///
519        /// `options` generic should be of the correct type.
520        #[unsafe(method(initWithTargetedImageData:orientation:options:))]
521        #[unsafe(method_family = init)]
522        pub unsafe fn initWithTargetedImageData_orientation_options(
523            this: Allocated<Self>,
524            image_data: &NSData,
525            orientation: CGImagePropertyOrientation,
526            options: &NSDictionary<VNImageOption, AnyObject>,
527        ) -> Retained<Self>;
528
529        #[cfg(all(
530            feature = "VNRequestHandler",
531            feature = "block2",
532            feature = "objc2-image-io"
533        ))]
534        /// Create a new request with a targeted image data.
535        ///
536        ///
537        /// Parameter `imageData`: The data of the targeted image.
538        ///
539        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
540        ///
541        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
542        ///
543        /// Parameter `completionHandler`: The block that is invoked when the request has been performed.
544        ///
545        /// # Safety
546        ///
547        /// - `options` generic should be of the correct type.
548        /// - `completion_handler` must be a valid pointer or null.
549        #[unsafe(method(initWithTargetedImageData:orientation:options:completionHandler:))]
550        #[unsafe(method_family = init)]
551        pub unsafe fn initWithTargetedImageData_orientation_options_completionHandler(
552            this: Allocated<Self>,
553            image_data: &NSData,
554            orientation: CGImagePropertyOrientation,
555            options: &NSDictionary<VNImageOption, AnyObject>,
556            completion_handler: VNRequestCompletionHandler,
557        ) -> Retained<Self>;
558
559        #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-media"))]
560        /// Create a new request with a targeted CMSampleBuffer.
561        ///
562        ///
563        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
564        ///
565        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
566        ///
567        /// # Safety
568        ///
569        /// `options` generic should be of the correct type.
570        #[unsafe(method(initWithTargetedCMSampleBuffer:options:))]
571        #[unsafe(method_family = init)]
572        pub unsafe fn initWithTargetedCMSampleBuffer_options(
573            this: Allocated<Self>,
574            sample_buffer: &CMSampleBuffer,
575            options: &NSDictionary<VNImageOption, AnyObject>,
576        ) -> Retained<Self>;
577
578        #[cfg(all(
579            feature = "VNRequestHandler",
580            feature = "block2",
581            feature = "objc2-core-media"
582        ))]
583        /// Create a new request with a targeted CMSampleBuffer.
584        ///
585        ///
586        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
587        ///
588        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
589        ///
590        /// Parameter `completionHandler`: The block that is invoked after the request has been performed.
591        ///
592        /// # Safety
593        ///
594        /// - `options` generic should be of the correct type.
595        /// - `completion_handler` must be a valid pointer or null.
596        #[unsafe(method(initWithTargetedCMSampleBuffer:options:completionHandler:))]
597        #[unsafe(method_family = init)]
598        pub unsafe fn initWithTargetedCMSampleBuffer_options_completionHandler(
599            this: Allocated<Self>,
600            sample_buffer: &CMSampleBuffer,
601            options: &NSDictionary<VNImageOption, AnyObject>,
602            completion_handler: VNRequestCompletionHandler,
603        ) -> Retained<Self>;
604
605        #[cfg(all(
606            feature = "VNRequestHandler",
607            feature = "objc2-core-media",
608            feature = "objc2-image-io"
609        ))]
610        /// Create a new request with a targeted CMSampleBuffer.
611        ///
612        ///
613        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
614        ///
615        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
616        ///
617        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
618        ///
619        /// # Safety
620        ///
621        /// `options` generic should be of the correct type.
622        #[unsafe(method(initWithTargetedCMSampleBuffer:orientation:options:))]
623        #[unsafe(method_family = init)]
624        pub unsafe fn initWithTargetedCMSampleBuffer_orientation_options(
625            this: Allocated<Self>,
626            sample_buffer: &CMSampleBuffer,
627            orientation: CGImagePropertyOrientation,
628            options: &NSDictionary<VNImageOption, AnyObject>,
629        ) -> Retained<Self>;
630
631        #[cfg(all(
632            feature = "VNRequestHandler",
633            feature = "block2",
634            feature = "objc2-core-media",
635            feature = "objc2-image-io"
636        ))]
637        /// Create a new request with a targeted CMSampleBuffer.
638        ///
639        ///
640        /// Parameter `sampleBuffer`: The CMSampleBuffer containing the CVImageBuffer to be used by the request.
641        ///
642        /// Parameter `orientation`: The orientation of the image/buffer based on the EXIF specification. For details see kCGImagePropertyOrientation. The value has to be an integer from 1 to 8. This supersedes every other orientation information.
643        ///
644        /// Parameter `options`: A dictionary with options specifying auxiliary information for the image.
645        ///
646        /// Parameter `completionHandler`: The block that is invoked after the request has been performed.
647        ///
648        /// # Safety
649        ///
650        /// - `options` generic should be of the correct type.
651        /// - `completion_handler` must be a valid pointer or null.
652        #[unsafe(method(initWithTargetedCMSampleBuffer:orientation:options:completionHandler:))]
653        #[unsafe(method_family = init)]
654        pub unsafe fn initWithTargetedCMSampleBuffer_orientation_options_completionHandler(
655            this: Allocated<Self>,
656            sample_buffer: &CMSampleBuffer,
657            orientation: CGImagePropertyOrientation,
658            options: &NSDictionary<VNImageOption, AnyObject>,
659            completion_handler: VNRequestCompletionHandler,
660        ) -> Retained<Self>;
661    );
662}
663
664/// Methods declared on superclass `NSObject`.
665#[cfg(feature = "VNRequest")]
666impl VNTargetedImageRequest {
667    extern_methods!(
668        #[unsafe(method(new))]
669        #[unsafe(method_family = new)]
670        pub unsafe fn new() -> Retained<Self>;
671    );
672}