objc2_vision/generated/
VNDetectBarcodesRequest.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "VNRequest")]
20 pub struct VNDetectBarcodesRequest;
21);
22
23#[cfg(feature = "VNRequest")]
24extern_conformance!(
25 unsafe impl NSCopying for VNDetectBarcodesRequest {}
26);
27
28#[cfg(feature = "VNRequest")]
29unsafe impl CopyingHelper for VNDetectBarcodesRequest {
30 type Result = Self;
31}
32
33#[cfg(feature = "VNRequest")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for VNDetectBarcodesRequest {}
36);
37
38#[cfg(feature = "VNRequest")]
39impl VNDetectBarcodesRequest {
40 extern_methods!(
41 #[cfg(feature = "VNTypes")]
42 #[deprecated]
50 #[unsafe(method(supportedSymbologies))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn supportedSymbologies() -> Retained<NSArray<VNBarcodeSymbology>>;
53
54 #[cfg(feature = "VNTypes")]
55 #[unsafe(method(supportedSymbologiesAndReturnError:_))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn supportedSymbologiesAndReturnError(
65 &self,
66 ) -> Result<Retained<NSArray<VNBarcodeSymbology>>, Retained<NSError>>;
67
68 #[cfg(feature = "VNTypes")]
69 #[unsafe(method(symbologies))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn symbologies(&self) -> Retained<NSArray<VNBarcodeSymbology>>;
73
74 #[cfg(feature = "VNTypes")]
75 #[unsafe(method(setSymbologies:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn setSymbologies(&self, symbologies: &NSArray<VNBarcodeSymbology>);
79
80 #[unsafe(method(coalesceCompositeSymbologies))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn coalesceCompositeSymbologies(&self) -> bool;
84
85 #[unsafe(method(setCoalesceCompositeSymbologies:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setCoalesceCompositeSymbologies(&self, coalesce_composite_symbologies: bool);
89
90 #[cfg(feature = "VNObservation")]
91 #[unsafe(method(results))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn results(&self) -> Option<Retained<NSArray<VNBarcodeObservation>>>;
95 );
96}
97
98#[cfg(feature = "VNRequest")]
100impl VNDetectBarcodesRequest {
101 extern_methods!(
102 #[unsafe(method(init))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106
107 #[cfg(feature = "block2")]
108 #[unsafe(method(initWithCompletionHandler:))]
113 #[unsafe(method_family = init)]
114 pub unsafe fn initWithCompletionHandler(
115 this: Allocated<Self>,
116 completion_handler: VNRequestCompletionHandler,
117 ) -> Retained<Self>;
118 );
119}
120
121#[cfg(feature = "VNRequest")]
123impl VNDetectBarcodesRequest {
124 extern_methods!(
125 #[unsafe(method(new))]
126 #[unsafe(method_family = new)]
127 pub unsafe fn new() -> Retained<Self>;
128 );
129}
130
131pub static VNDetectBarcodesRequestRevision1: NSUInteger = 1;
133
134pub static VNDetectBarcodesRequestRevision2: NSUInteger = 2;
136
137pub static VNDetectBarcodesRequestRevision3: NSUInteger = 3;
139
140pub static VNDetectBarcodesRequestRevision4: NSUInteger = 4;