objc2_core_image/generated/
CIBarcodeDescriptor.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CIBarcodeDescriptor;
19);
20
21extern_conformance!(
22 unsafe impl NSCoding for CIBarcodeDescriptor {}
23);
24
25extern_conformance!(
26 unsafe impl NSCopying for CIBarcodeDescriptor {}
27);
28
29unsafe impl CopyingHelper for CIBarcodeDescriptor {
30 type Result = Self;
31}
32
33extern_conformance!(
34 unsafe impl NSObjectProtocol for CIBarcodeDescriptor {}
35);
36
37extern_conformance!(
38 unsafe impl NSSecureCoding for CIBarcodeDescriptor {}
39);
40
41impl CIBarcodeDescriptor {
42 extern_methods!();
43}
44
45impl CIBarcodeDescriptor {
47 extern_methods!(
48 #[unsafe(method(init))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
51
52 #[unsafe(method(new))]
53 #[unsafe(method_family = new)]
54 pub unsafe fn new() -> Retained<Self>;
55 );
56}
57
58#[repr(transparent)]
72#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
73pub struct CIQRCodeErrorCorrectionLevel(pub NSInteger);
74impl CIQRCodeErrorCorrectionLevel {
75 #[doc(alias = "CIQRCodeErrorCorrectionLevelL")]
76 pub const L: Self = Self(b'L' as _);
77 #[doc(alias = "CIQRCodeErrorCorrectionLevelM")]
78 pub const M: Self = Self(b'M' as _);
79 #[doc(alias = "CIQRCodeErrorCorrectionLevelQ")]
80 pub const Q: Self = Self(b'Q' as _);
81 #[doc(alias = "CIQRCodeErrorCorrectionLevelH")]
82 pub const H: Self = Self(b'H' as _);
83}
84
85unsafe impl Encode for CIQRCodeErrorCorrectionLevel {
86 const ENCODING: Encoding = NSInteger::ENCODING;
87}
88
89unsafe impl RefEncode for CIQRCodeErrorCorrectionLevel {
90 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
91}
92
93extern_class!(
94 #[unsafe(super(CIBarcodeDescriptor, NSObject))]
98 #[derive(Debug, PartialEq, Eq, Hash)]
99 pub struct CIQRCodeDescriptor;
100);
101
102extern_conformance!(
103 unsafe impl NSCoding for CIQRCodeDescriptor {}
104);
105
106extern_conformance!(
107 unsafe impl NSCopying for CIQRCodeDescriptor {}
108);
109
110unsafe impl CopyingHelper for CIQRCodeDescriptor {
111 type Result = Self;
112}
113
114extern_conformance!(
115 unsafe impl NSObjectProtocol for CIQRCodeDescriptor {}
116);
117
118extern_conformance!(
119 unsafe impl NSSecureCoding for CIQRCodeDescriptor {}
120);
121
122impl CIQRCodeDescriptor {
123 extern_methods!(
124 #[unsafe(method(errorCorrectedPayload))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn errorCorrectedPayload(&self) -> Retained<NSData>;
133
134 #[unsafe(method(symbolVersion))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn symbolVersion(&self) -> NSInteger;
141
142 #[unsafe(method(maskPattern))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn maskPattern(&self) -> u8;
149
150 #[unsafe(method(errorCorrectionLevel))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn errorCorrectionLevel(&self) -> CIQRCodeErrorCorrectionLevel;
157
158 #[unsafe(method(initWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:))]
159 #[unsafe(method_family = init)]
160 pub unsafe fn initWithPayload_symbolVersion_maskPattern_errorCorrectionLevel(
161 this: Allocated<Self>,
162 error_corrected_payload: &NSData,
163 symbol_version: NSInteger,
164 mask_pattern: u8,
165 error_correction_level: CIQRCodeErrorCorrectionLevel,
166 ) -> Option<Retained<Self>>;
167
168 #[unsafe(method(descriptorWithPayload:symbolVersion:maskPattern:errorCorrectionLevel:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn descriptorWithPayload_symbolVersion_maskPattern_errorCorrectionLevel(
171 error_corrected_payload: &NSData,
172 symbol_version: NSInteger,
173 mask_pattern: u8,
174 error_correction_level: CIQRCodeErrorCorrectionLevel,
175 ) -> Option<Retained<Self>>;
176 );
177}
178
179impl CIQRCodeDescriptor {
181 extern_methods!(
182 #[unsafe(method(init))]
183 #[unsafe(method_family = init)]
184 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
185
186 #[unsafe(method(new))]
187 #[unsafe(method_family = new)]
188 pub unsafe fn new() -> Retained<Self>;
189 );
190}
191
192extern_class!(
193 #[unsafe(super(CIBarcodeDescriptor, NSObject))]
200 #[derive(Debug, PartialEq, Eq, Hash)]
201 pub struct CIAztecCodeDescriptor;
202);
203
204extern_conformance!(
205 unsafe impl NSCoding for CIAztecCodeDescriptor {}
206);
207
208extern_conformance!(
209 unsafe impl NSCopying for CIAztecCodeDescriptor {}
210);
211
212unsafe impl CopyingHelper for CIAztecCodeDescriptor {
213 type Result = Self;
214}
215
216extern_conformance!(
217 unsafe impl NSObjectProtocol for CIAztecCodeDescriptor {}
218);
219
220extern_conformance!(
221 unsafe impl NSSecureCoding for CIAztecCodeDescriptor {}
222);
223
224impl CIAztecCodeDescriptor {
225 extern_methods!(
226 #[unsafe(method(errorCorrectedPayload))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn errorCorrectedPayload(&self) -> Retained<NSData>;
235
236 #[unsafe(method(isCompact))]
241 #[unsafe(method_family = none)]
242 pub unsafe fn isCompact(&self) -> bool;
243
244 #[unsafe(method(layerCount))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn layerCount(&self) -> NSInteger;
253
254 #[unsafe(method(dataCodewordCount))]
261 #[unsafe(method_family = none)]
262 pub unsafe fn dataCodewordCount(&self) -> NSInteger;
263
264 #[unsafe(method(initWithPayload:isCompact:layerCount:dataCodewordCount:))]
265 #[unsafe(method_family = init)]
266 pub unsafe fn initWithPayload_isCompact_layerCount_dataCodewordCount(
267 this: Allocated<Self>,
268 error_corrected_payload: &NSData,
269 is_compact: bool,
270 layer_count: NSInteger,
271 data_codeword_count: NSInteger,
272 ) -> Option<Retained<Self>>;
273
274 #[unsafe(method(descriptorWithPayload:isCompact:layerCount:dataCodewordCount:))]
275 #[unsafe(method_family = none)]
276 pub unsafe fn descriptorWithPayload_isCompact_layerCount_dataCodewordCount(
277 error_corrected_payload: &NSData,
278 is_compact: bool,
279 layer_count: NSInteger,
280 data_codeword_count: NSInteger,
281 ) -> Option<Retained<Self>>;
282 );
283}
284
285impl CIAztecCodeDescriptor {
287 extern_methods!(
288 #[unsafe(method(init))]
289 #[unsafe(method_family = init)]
290 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
291
292 #[unsafe(method(new))]
293 #[unsafe(method_family = new)]
294 pub unsafe fn new() -> Retained<Self>;
295 );
296}
297
298extern_class!(
299 #[unsafe(super(CIBarcodeDescriptor, NSObject))]
306 #[derive(Debug, PartialEq, Eq, Hash)]
307 pub struct CIPDF417CodeDescriptor;
308);
309
310extern_conformance!(
311 unsafe impl NSCoding for CIPDF417CodeDescriptor {}
312);
313
314extern_conformance!(
315 unsafe impl NSCopying for CIPDF417CodeDescriptor {}
316);
317
318unsafe impl CopyingHelper for CIPDF417CodeDescriptor {
319 type Result = Self;
320}
321
322extern_conformance!(
323 unsafe impl NSObjectProtocol for CIPDF417CodeDescriptor {}
324);
325
326extern_conformance!(
327 unsafe impl NSSecureCoding for CIPDF417CodeDescriptor {}
328);
329
330impl CIPDF417CodeDescriptor {
331 extern_methods!(
332 #[unsafe(method(errorCorrectedPayload))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn errorCorrectedPayload(&self) -> Retained<NSData>;
339
340 #[unsafe(method(isCompact))]
345 #[unsafe(method_family = none)]
346 pub unsafe fn isCompact(&self) -> bool;
347
348 #[unsafe(method(rowCount))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn rowCount(&self) -> NSInteger;
355
356 #[unsafe(method(columnCount))]
361 #[unsafe(method_family = none)]
362 pub unsafe fn columnCount(&self) -> NSInteger;
363
364 #[unsafe(method(initWithPayload:isCompact:rowCount:columnCount:))]
365 #[unsafe(method_family = init)]
366 pub unsafe fn initWithPayload_isCompact_rowCount_columnCount(
367 this: Allocated<Self>,
368 error_corrected_payload: &NSData,
369 is_compact: bool,
370 row_count: NSInteger,
371 column_count: NSInteger,
372 ) -> Option<Retained<Self>>;
373
374 #[unsafe(method(descriptorWithPayload:isCompact:rowCount:columnCount:))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn descriptorWithPayload_isCompact_rowCount_columnCount(
377 error_corrected_payload: &NSData,
378 is_compact: bool,
379 row_count: NSInteger,
380 column_count: NSInteger,
381 ) -> Option<Retained<Self>>;
382 );
383}
384
385impl CIPDF417CodeDescriptor {
387 extern_methods!(
388 #[unsafe(method(init))]
389 #[unsafe(method_family = init)]
390 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
391
392 #[unsafe(method(new))]
393 #[unsafe(method_family = new)]
394 pub unsafe fn new() -> Retained<Self>;
395 );
396}
397
398#[repr(transparent)]
421#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
422pub struct CIDataMatrixCodeECCVersion(pub NSInteger);
423impl CIDataMatrixCodeECCVersion {
424 #[doc(alias = "CIDataMatrixCodeECCVersion000")]
425 pub const Version000: Self = Self(0);
426 #[doc(alias = "CIDataMatrixCodeECCVersion050")]
427 pub const Version050: Self = Self(50);
428 #[doc(alias = "CIDataMatrixCodeECCVersion080")]
429 pub const Version080: Self = Self(80);
430 #[doc(alias = "CIDataMatrixCodeECCVersion100")]
431 pub const Version100: Self = Self(100);
432 #[doc(alias = "CIDataMatrixCodeECCVersion140")]
433 pub const Version140: Self = Self(140);
434 #[doc(alias = "CIDataMatrixCodeECCVersion200")]
435 pub const Version200: Self = Self(200);
436}
437
438unsafe impl Encode for CIDataMatrixCodeECCVersion {
439 const ENCODING: Encoding = NSInteger::ENCODING;
440}
441
442unsafe impl RefEncode for CIDataMatrixCodeECCVersion {
443 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
444}
445
446extern_class!(
447 #[unsafe(super(CIBarcodeDescriptor, NSObject))]
451 #[derive(Debug, PartialEq, Eq, Hash)]
452 pub struct CIDataMatrixCodeDescriptor;
453);
454
455extern_conformance!(
456 unsafe impl NSCoding for CIDataMatrixCodeDescriptor {}
457);
458
459extern_conformance!(
460 unsafe impl NSCopying for CIDataMatrixCodeDescriptor {}
461);
462
463unsafe impl CopyingHelper for CIDataMatrixCodeDescriptor {
464 type Result = Self;
465}
466
467extern_conformance!(
468 unsafe impl NSObjectProtocol for CIDataMatrixCodeDescriptor {}
469);
470
471extern_conformance!(
472 unsafe impl NSSecureCoding for CIDataMatrixCodeDescriptor {}
473);
474
475impl CIDataMatrixCodeDescriptor {
476 extern_methods!(
477 #[unsafe(method(errorCorrectedPayload))]
484 #[unsafe(method_family = none)]
485 pub unsafe fn errorCorrectedPayload(&self) -> Retained<NSData>;
486
487 #[unsafe(method(rowCount))]
492 #[unsafe(method_family = none)]
493 pub unsafe fn rowCount(&self) -> NSInteger;
494
495 #[unsafe(method(columnCount))]
500 #[unsafe(method_family = none)]
501 pub unsafe fn columnCount(&self) -> NSInteger;
502
503 #[unsafe(method(eccVersion))]
508 #[unsafe(method_family = none)]
509 pub unsafe fn eccVersion(&self) -> CIDataMatrixCodeECCVersion;
510
511 #[unsafe(method(initWithPayload:rowCount:columnCount:eccVersion:))]
512 #[unsafe(method_family = init)]
513 pub unsafe fn initWithPayload_rowCount_columnCount_eccVersion(
514 this: Allocated<Self>,
515 error_corrected_payload: &NSData,
516 row_count: NSInteger,
517 column_count: NSInteger,
518 ecc_version: CIDataMatrixCodeECCVersion,
519 ) -> Option<Retained<Self>>;
520
521 #[unsafe(method(descriptorWithPayload:rowCount:columnCount:eccVersion:))]
522 #[unsafe(method_family = none)]
523 pub unsafe fn descriptorWithPayload_rowCount_columnCount_eccVersion(
524 error_corrected_payload: &NSData,
525 row_count: NSInteger,
526 column_count: NSInteger,
527 ecc_version: CIDataMatrixCodeECCVersion,
528 ) -> Option<Retained<Self>>;
529 );
530}
531
532impl CIDataMatrixCodeDescriptor {
534 extern_methods!(
535 #[unsafe(method(init))]
536 #[unsafe(method_family = init)]
537 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
538
539 #[unsafe(method(new))]
540 #[unsafe(method_family = new)]
541 pub unsafe fn new() -> Retained<Self>;
542 );
543}
544
545mod private_NSUserActivityCIBarcodeDescriptor {
546 pub trait Sealed {}
547}
548
549#[doc(alias = "CIBarcodeDescriptor")]
551pub unsafe trait NSUserActivityCIBarcodeDescriptor:
552 ClassType + Sized + private_NSUserActivityCIBarcodeDescriptor::Sealed
553{
554 extern_methods!(
555 #[unsafe(method(detectedBarcodeDescriptor))]
557 #[unsafe(method_family = none)]
558 unsafe fn detectedBarcodeDescriptor(&self) -> Option<Retained<CIBarcodeDescriptor>>;
559 );
560}
561
562impl private_NSUserActivityCIBarcodeDescriptor::Sealed for NSUserActivity {}
563unsafe impl NSUserActivityCIBarcodeDescriptor for NSUserActivity {}