objc2-image-capture-core 0.3.2

Bindings to the ImageCaptureCore framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use objc2_foundation::*;

use crate::*;

/// Scanner Functional Unit Types
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunittype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerFunctionalUnitType(pub NSUInteger);
impl ICScannerFunctionalUnitType {
    #[doc(alias = "ICScannerFunctionalUnitTypeFlatbed")]
    pub const Flatbed: Self = Self(0);
    #[doc(alias = "ICScannerFunctionalUnitTypePositiveTransparency")]
    pub const PositiveTransparency: Self = Self(1);
    #[doc(alias = "ICScannerFunctionalUnitTypeNegativeTransparency")]
    pub const NegativeTransparency: Self = Self(2);
    #[doc(alias = "ICScannerFunctionalUnitTypeDocumentFeeder")]
    pub const DocumentFeeder: Self = Self(3);
}

unsafe impl Encode for ICScannerFunctionalUnitType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerFunctionalUnitType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Unit of measurement used by the scanner. This corresponds to values used for ICAP_UNITS as defined in the TWAIN Specification.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannermeasurementunit?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerMeasurementUnit(pub NSUInteger);
impl ICScannerMeasurementUnit {
    #[doc(alias = "ICScannerMeasurementUnitInches")]
    pub const Inches: Self = Self(0);
    #[doc(alias = "ICScannerMeasurementUnitCentimeters")]
    pub const Centimeters: Self = Self(1);
    #[doc(alias = "ICScannerMeasurementUnitPicas")]
    pub const Picas: Self = Self(2);
    #[doc(alias = "ICScannerMeasurementUnitPoints")]
    pub const Points: Self = Self(3);
    #[doc(alias = "ICScannerMeasurementUnitTwips")]
    pub const Twips: Self = Self(4);
    #[doc(alias = "ICScannerMeasurementUnitPixels")]
    pub const Pixels: Self = Self(5);
}

unsafe impl Encode for ICScannerMeasurementUnit {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerMeasurementUnit {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Bits per channel in the scanned image.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerbitdepth?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerBitDepth(pub NSUInteger);
impl ICScannerBitDepth {
    #[doc(alias = "ICScannerBitDepth1Bit")]
    pub const Depth1Bit: Self = Self(1);
    #[doc(alias = "ICScannerBitDepth8Bits")]
    pub const Depth8Bits: Self = Self(8);
    #[doc(alias = "ICScannerBitDepth16Bits")]
    pub const Depth16Bits: Self = Self(16);
}

unsafe impl Encode for ICScannerBitDepth {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerBitDepth {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Identifies color data formats. Only relevant for multi-channel data. Corresponds to "ICAP_PLANARCHUNKY" of the TWAIN Specification.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannercolordataformattype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerColorDataFormatType(pub NSUInteger);
impl ICScannerColorDataFormatType {
    #[doc(alias = "ICScannerColorDataFormatTypeChunky")]
    pub const Chunky: Self = Self(0);
    #[doc(alias = "ICScannerColorDataFormatTypePlanar")]
    pub const Planar: Self = Self(1);
}

unsafe impl Encode for ICScannerColorDataFormatType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerColorDataFormatType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Pixel data types. Corresponds to "ICAP_PIXELTYPE" of the TWAIN Specification.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerpixeldatatype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerPixelDataType(pub NSUInteger);
impl ICScannerPixelDataType {
    #[doc(alias = "ICScannerPixelDataTypeBW")]
    pub const BW: Self = Self(0);
    #[doc(alias = "ICScannerPixelDataTypeGray")]
    pub const Gray: Self = Self(1);
    #[doc(alias = "ICScannerPixelDataTypeRGB")]
    pub const RGB: Self = Self(2);
    #[doc(alias = "ICScannerPixelDataTypePalette")]
    pub const Palette: Self = Self(3);
    #[doc(alias = "ICScannerPixelDataTypeCMY")]
    pub const CMY: Self = Self(4);
    #[doc(alias = "ICScannerPixelDataTypeCMYK")]
    pub const CMYK: Self = Self(5);
    #[doc(alias = "ICScannerPixelDataTypeYUV")]
    pub const YUV: Self = Self(6);
    #[doc(alias = "ICScannerPixelDataTypeYUVK")]
    pub const YUVK: Self = Self(7);
    #[doc(alias = "ICScannerPixelDataTypeCIEXYZ")]
    pub const CIEXYZ: Self = Self(8);
}

unsafe impl Encode for ICScannerPixelDataType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerPixelDataType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Document size types. Corresponds to "ICAP_SUPPORTEDSIZES" used by the Image Catpure scanner modules. Also refer to TWAIN 1.9 Specification, page 9-483.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerdocumenttype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerDocumentType(pub NSUInteger);
impl ICScannerDocumentType {
    #[doc(alias = "ICScannerDocumentTypeDefault")]
    pub const TypeDefault: Self = Self(0);
    #[doc(alias = "ICScannerDocumentTypeA4")]
    pub const TypeA4: Self = Self(1);
    #[doc(alias = "ICScannerDocumentTypeB5")]
    pub const TypeB5: Self = Self(2);
    #[doc(alias = "ICScannerDocumentTypeUSLetter")]
    pub const TypeUSLetter: Self = Self(3);
    #[doc(alias = "ICScannerDocumentTypeUSLegal")]
    pub const TypeUSLegal: Self = Self(4);
    #[doc(alias = "ICScannerDocumentTypeA5")]
    pub const TypeA5: Self = Self(5);
    #[doc(alias = "ICScannerDocumentTypeISOB4")]
    pub const TypeISOB4: Self = Self(6);
    #[doc(alias = "ICScannerDocumentTypeISOB6")]
    pub const TypeISOB6: Self = Self(7);
    #[doc(alias = "ICScannerDocumentTypeUSLedger")]
    pub const TypeUSLedger: Self = Self(9);
    #[doc(alias = "ICScannerDocumentTypeUSExecutive")]
    pub const TypeUSExecutive: Self = Self(10);
    #[doc(alias = "ICScannerDocumentTypeA3")]
    pub const TypeA3: Self = Self(11);
    #[doc(alias = "ICScannerDocumentTypeISOB3")]
    pub const TypeISOB3: Self = Self(12);
    #[doc(alias = "ICScannerDocumentTypeA6")]
    pub const TypeA6: Self = Self(13);
    #[doc(alias = "ICScannerDocumentTypeC4")]
    pub const TypeC4: Self = Self(14);
    #[doc(alias = "ICScannerDocumentTypeC5")]
    pub const TypeC5: Self = Self(15);
    #[doc(alias = "ICScannerDocumentTypeC6")]
    pub const TypeC6: Self = Self(16);
    #[doc(alias = "ICScannerDocumentType4A0")]
    pub const Type4A0: Self = Self(17);
    #[doc(alias = "ICScannerDocumentType2A0")]
    pub const Type2A0: Self = Self(18);
    #[doc(alias = "ICScannerDocumentTypeA0")]
    pub const TypeA0: Self = Self(19);
    #[doc(alias = "ICScannerDocumentTypeA1")]
    pub const TypeA1: Self = Self(20);
    #[doc(alias = "ICScannerDocumentTypeA2")]
    pub const TypeA2: Self = Self(21);
    #[doc(alias = "ICScannerDocumentTypeA7")]
    pub const TypeA7: Self = Self(22);
    #[doc(alias = "ICScannerDocumentTypeA8")]
    pub const TypeA8: Self = Self(23);
    #[doc(alias = "ICScannerDocumentTypeA9")]
    pub const TypeA9: Self = Self(24);
    #[doc(alias = "ICScannerDocumentType10")]
    pub const Type10: Self = Self(25);
    #[doc(alias = "ICScannerDocumentTypeISOB0")]
    pub const TypeISOB0: Self = Self(26);
    #[doc(alias = "ICScannerDocumentTypeISOB1")]
    pub const TypeISOB1: Self = Self(27);
    #[doc(alias = "ICScannerDocumentTypeISOB2")]
    pub const TypeISOB2: Self = Self(28);
    #[doc(alias = "ICScannerDocumentTypeISOB5")]
    pub const TypeISOB5: Self = Self(29);
    #[doc(alias = "ICScannerDocumentTypeISOB7")]
    pub const TypeISOB7: Self = Self(30);
    #[doc(alias = "ICScannerDocumentTypeISOB8")]
    pub const TypeISOB8: Self = Self(31);
    #[doc(alias = "ICScannerDocumentTypeISOB9")]
    pub const TypeISOB9: Self = Self(32);
    #[doc(alias = "ICScannerDocumentTypeISOB10")]
    pub const TypeISOB10: Self = Self(33);
    #[doc(alias = "ICScannerDocumentTypeJISB0")]
    pub const TypeJISB0: Self = Self(34);
    #[doc(alias = "ICScannerDocumentTypeJISB1")]
    pub const TypeJISB1: Self = Self(35);
    #[doc(alias = "ICScannerDocumentTypeJISB2")]
    pub const TypeJISB2: Self = Self(36);
    #[doc(alias = "ICScannerDocumentTypeJISB3")]
    pub const TypeJISB3: Self = Self(37);
    #[doc(alias = "ICScannerDocumentTypeJISB4")]
    pub const TypeJISB4: Self = Self(38);
    #[doc(alias = "ICScannerDocumentTypeJISB6")]
    pub const TypeJISB6: Self = Self(39);
    #[doc(alias = "ICScannerDocumentTypeJISB7")]
    pub const TypeJISB7: Self = Self(40);
    #[doc(alias = "ICScannerDocumentTypeJISB8")]
    pub const TypeJISB8: Self = Self(41);
    #[doc(alias = "ICScannerDocumentTypeJISB9")]
    pub const TypeJISB9: Self = Self(42);
    #[doc(alias = "ICScannerDocumentTypeJISB10")]
    pub const TypeJISB10: Self = Self(43);
    #[doc(alias = "ICScannerDocumentTypeC0")]
    pub const TypeC0: Self = Self(44);
    #[doc(alias = "ICScannerDocumentTypeC1")]
    pub const TypeC1: Self = Self(45);
    #[doc(alias = "ICScannerDocumentTypeC2")]
    pub const TypeC2: Self = Self(46);
    #[doc(alias = "ICScannerDocumentTypeC3")]
    pub const TypeC3: Self = Self(47);
    #[doc(alias = "ICScannerDocumentTypeC7")]
    pub const TypeC7: Self = Self(48);
    #[doc(alias = "ICScannerDocumentTypeC8")]
    pub const TypeC8: Self = Self(49);
    #[doc(alias = "ICScannerDocumentTypeC9")]
    pub const TypeC9: Self = Self(50);
    #[doc(alias = "ICScannerDocumentTypeC10")]
    pub const TypeC10: Self = Self(51);
    #[doc(alias = "ICScannerDocumentTypeUSStatement")]
    pub const TypeUSStatement: Self = Self(52);
    #[doc(alias = "ICScannerDocumentTypeBusinessCard")]
    pub const TypeBusinessCard: Self = Self(53);
    #[doc(alias = "ICScannerDocumentTypeE")]
    pub const TypeE: Self = Self(60);
    #[doc(alias = "ICScannerDocumentType3R")]
    pub const Type3R: Self = Self(61);
    #[doc(alias = "ICScannerDocumentType4R")]
    pub const Type4R: Self = Self(62);
    #[doc(alias = "ICScannerDocumentType5R")]
    pub const Type5R: Self = Self(63);
    #[doc(alias = "ICScannerDocumentType6R")]
    pub const Type6R: Self = Self(64);
    #[doc(alias = "ICScannerDocumentType8R")]
    pub const Type8R: Self = Self(65);
    #[doc(alias = "ICScannerDocumentTypeS8R")]
    pub const TypeS8R: Self = Self(66);
    #[doc(alias = "ICScannerDocumentType10R")]
    pub const Type10R: Self = Self(67);
    #[doc(alias = "ICScannerDocumentTypeS10R")]
    pub const TypeS10R: Self = Self(68);
    #[doc(alias = "ICScannerDocumentType11R")]
    pub const Type11R: Self = Self(69);
    #[doc(alias = "ICScannerDocumentType12R")]
    pub const Type12R: Self = Self(70);
    #[doc(alias = "ICScannerDocumentTypeS12R")]
    pub const TypeS12R: Self = Self(71);
    #[doc(alias = "ICScannerDocumentType110")]
    pub const Type110: Self = Self(72);
    #[doc(alias = "ICScannerDocumentTypeAPSH")]
    pub const TypeAPSH: Self = Self(73);
    #[doc(alias = "ICScannerDocumentTypeAPSC")]
    pub const TypeAPSC: Self = Self(74);
    #[doc(alias = "ICScannerDocumentTypeAPSP")]
    pub const TypeAPSP: Self = Self(75);
    #[doc(alias = "ICScannerDocumentType135")]
    pub const Type135: Self = Self(76);
    #[doc(alias = "ICScannerDocumentTypeMF")]
    pub const TypeMF: Self = Self(77);
    #[doc(alias = "ICScannerDocumentTypeLF")]
    pub const TypeLF: Self = Self(78);
}

unsafe impl Encode for ICScannerDocumentType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerDocumentType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// A flag to indicate the scanner functional unit's state
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunitstate?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerFunctionalUnitState(pub NSUInteger);
impl ICScannerFunctionalUnitState {
    #[doc(alias = "ICScannerFunctionalUnitStateReady")]
    pub const Ready: Self = Self(1 << 0);
    #[doc(alias = "ICScannerFunctionalUnitStateScanInProgress")]
    pub const ScanInProgress: Self = Self(1 << 1);
    #[doc(alias = "ICScannerFunctionalUnitStateOverviewScanInProgress")]
    pub const OverviewScanInProgress: Self = Self(1 << 2);
}

unsafe impl Encode for ICScannerFunctionalUnitState {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerFunctionalUnitState {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Scanner Feature Types
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeaturetype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ICScannerFeatureType(pub NSUInteger);
impl ICScannerFeatureType {
    #[doc(alias = "ICScannerFeatureTypeEnumeration")]
    pub const Enumeration: Self = Self(0);
    #[doc(alias = "ICScannerFeatureTypeRange")]
    pub const Range: Self = Self(1);
    #[doc(alias = "ICScannerFeatureTypeBoolean")]
    pub const Boolean: Self = Self(2);
    #[doc(alias = "ICScannerFeatureTypeTemplate")]
    pub const Template: Self = Self(3);
}

unsafe impl Encode for ICScannerFeatureType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for ICScannerFeatureType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// ICScannerFeature class is an abstract base class used to describe a scanner feature. ImageCaptureCore defines three concrete subclasses of ICScannerFeature: ICScannerFeatureEnumeration, ICScannerFeatureRange and ICScannerFeatureBoolean.
    ///
    /// The scanner functional units may have one or more instances of these classes to allow users to choose scanner-specific settings or operations before performing a scan.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeature?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFeature;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFeature {}
);

impl ICScannerFeature {
    extern_methods!(
        /// Scanner feature type.
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub unsafe fn r#type(&self) -> ICScannerFeatureType;

        /// The internal name of this feature.
        #[unsafe(method(internalName))]
        #[unsafe(method_family = none)]
        pub unsafe fn internalName(&self) -> Option<Retained<NSString>>;

        /// The human readable name of this feature.
        #[unsafe(method(humanReadableName))]
        #[unsafe(method_family = none)]
        pub unsafe fn humanReadableName(&self) -> Option<Retained<NSString>>;

        /// Tooltip text describing the feature.
        #[unsafe(method(tooltip))]
        #[unsafe(method_family = none)]
        pub unsafe fn tooltip(&self) -> Option<Retained<NSString>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFeature {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFeatureEnumeration object is used to represent a feature of a scanner functional unit that can have one of several discrete values.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeatureenumeration?language=objc)
    #[unsafe(super(ICScannerFeature, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFeatureEnumeration;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFeatureEnumeration {}
);

impl ICScannerFeatureEnumeration {
    extern_methods!(
        /// The current value. The current value can be set to one of the possible values in the "values" property below.
        ///
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[unsafe(method(currentValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn currentValue(&self) -> Retained<AnyObject>;

        /// Setter for [`currentValue`][Self::currentValue].
        ///
        /// # Safety
        ///
        /// - `current_value` should be of the correct type.
        /// - This is unretained, you must ensure the object is kept alive while in use.
        #[unsafe(method(setCurrentValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCurrentValue(&self, current_value: &AnyObject);

        /// The default value. The default value can be set to one of the possible values in the "values" property below.
        #[unsafe(method(defaultValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultValue(&self) -> Retained<AnyObject>;

        /// An array of possible values. All items in this array must be of same type.
        #[unsafe(method(values))]
        #[unsafe(method_family = none)]
        pub unsafe fn values(&self) -> Retained<NSArray<NSNumber>>;

        /// The human readable menu item labels to be used in a menu to allow the user to select the current value from an array of possible values.
        #[unsafe(method(menuItemLabels))]
        #[unsafe(method_family = none)]
        pub unsafe fn menuItemLabels(&self) -> Retained<NSArray<NSString>>;

        /// Tooltip text associated with the menu items.
        #[unsafe(method(menuItemLabelsTooltips))]
        #[unsafe(method_family = none)]
        pub unsafe fn menuItemLabelsTooltips(&self) -> Retained<NSArray<NSString>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFeatureEnumeration {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFeatureRange object is used to represent a property of a scanner functional unit whose value lies within a range.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeaturerange?language=objc)
    #[unsafe(super(ICScannerFeature, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFeatureRange;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFeatureRange {}
);

impl ICScannerFeatureRange {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        /// The current value. Attempting to set the current value to a value that is not coincident with a step will result in a value corresponding to the nearest step being assigned to the current value.
        #[unsafe(method(currentValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn currentValue(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`currentValue`][Self::currentValue].
        #[unsafe(method(setCurrentValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCurrentValue(&self, current_value: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        /// The default value. Attempting to set the default value to a value that is not coincident with a step will result in a value corresponding to the nearest step being assigned to the default value.
        #[unsafe(method(defaultValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultValue(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// The minimum value.
        #[unsafe(method(minValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn minValue(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// The maximum value.
        #[unsafe(method(maxValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxValue(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// The step size.
        #[unsafe(method(stepSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn stepSize(&self) -> CGFloat;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFeatureRange {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFeatureBoolean object is used to represent a property of a scanner functional unit whose value can be YES or NO.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeatureboolean?language=objc)
    #[unsafe(super(ICScannerFeature, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFeatureBoolean;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFeatureBoolean {}
);

impl ICScannerFeatureBoolean {
    extern_methods!(
        /// The value of this feature.
        #[unsafe(method(value))]
        #[unsafe(method_family = none)]
        pub unsafe fn value(&self) -> bool;

        /// Setter for [`value`][Self::value].
        #[unsafe(method(setValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setValue(&self, value: bool);
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFeatureBoolean {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFeatureTemplate object is used to define a group of one or more rectangular scan areas that can be used with a scanner functional unit.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfeaturetemplate?language=objc)
    #[unsafe(super(ICScannerFeature, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFeatureTemplate;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFeatureTemplate {}
);

impl ICScannerFeatureTemplate {
    extern_methods!(
        /// # Safety
        ///
        /// The returned generic generic should be of the correct type.
        #[unsafe(method(targets))]
        #[unsafe(method_family = none)]
        pub unsafe fn targets(&self) -> Retained<NSArray<NSMutableArray>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFeatureTemplate {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFunctionalUnit is an abstract class that represents a scanner functiona unit. ImageCaptureCore defines three concrete subclasses of ICScannerFunctionalUnit: ICScannerFunctionalUnitFlatbed, ICScannerFunctionalUnitPositiveTransparency, ICScannerFunctionalUnitNegativeTransparency and ICScannerFunctionalUnitDocumentFeeder. ICScannerDevice creates instances of these concrete subclasses.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunit?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFunctionalUnit;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFunctionalUnit {}
);

impl ICScannerFunctionalUnit {
    extern_methods!(
        /// Functional unit type.
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub unsafe fn r#type(&self) -> ICScannerFunctionalUnitType;

        /// The pixel data type.
        #[unsafe(method(pixelDataType))]
        #[unsafe(method_family = none)]
        pub unsafe fn pixelDataType(&self) -> ICScannerPixelDataType;

        /// Setter for [`pixelDataType`][Self::pixelDataType].
        #[unsafe(method(setPixelDataType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPixelDataType(&self, pixel_data_type: ICScannerPixelDataType);

        /// Supported bit depths. The values in this set are valid values defined by ICScannerBitDepth.
        #[unsafe(method(supportedBitDepths))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedBitDepths(&self) -> Retained<NSIndexSet>;

        /// The bit depth to use when performing the final scan. This will always be one of the supported bit depths.
        #[unsafe(method(bitDepth))]
        #[unsafe(method_family = none)]
        pub unsafe fn bitDepth(&self) -> ICScannerBitDepth;

        /// Setter for [`bitDepth`][Self::bitDepth].
        #[unsafe(method(setBitDepth:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBitDepth(&self, bit_depth: ICScannerBitDepth);

        /// Supported measurement units. The values in this set are valid values defined by ICScannerMeasurementUnit.
        #[unsafe(method(supportedMeasurementUnits))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedMeasurementUnits(&self) -> Retained<NSIndexSet>;

        /// Current measurement unit. This will always be one of the supported measurement units.
        #[unsafe(method(measurementUnit))]
        #[unsafe(method_family = none)]
        pub unsafe fn measurementUnit(&self) -> ICScannerMeasurementUnit;

        /// Setter for [`measurementUnit`][Self::measurementUnit].
        #[unsafe(method(setMeasurementUnit:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMeasurementUnit(&self, measurement_unit: ICScannerMeasurementUnit);

        /// Supported scan resolutions in DPI.
        #[unsafe(method(supportedResolutions))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedResolutions(&self) -> Retained<NSIndexSet>;

        /// Preferred scan resolutions in DPI.
        #[unsafe(method(preferredResolutions))]
        #[unsafe(method_family = none)]
        pub unsafe fn preferredResolutions(&self) -> Retained<NSIndexSet>;

        /// Current scan resolution. This will always be one of the supported resolution values.
        #[unsafe(method(resolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn resolution(&self) -> NSUInteger;

        /// Setter for [`resolution`][Self::resolution].
        #[unsafe(method(setResolution:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setResolution(&self, resolution: NSUInteger);

        /// Optical resolution along the X axis.
        #[unsafe(method(nativeXResolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn nativeXResolution(&self) -> NSUInteger;

        /// Optical resolution along the Y axis.
        #[unsafe(method(nativeYResolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn nativeYResolution(&self) -> NSUInteger;

        /// Supported scale factors in percentage.
        #[unsafe(method(supportedScaleFactors))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedScaleFactors(&self) -> Retained<NSIndexSet>;

        /// Preferred scale factors in percentage.
        #[unsafe(method(preferredScaleFactors))]
        #[unsafe(method_family = none)]
        pub unsafe fn preferredScaleFactors(&self) -> Retained<NSIndexSet>;

        /// Current scale factor. This will always be one of the supported scale factor values.
        #[unsafe(method(scaleFactor))]
        #[unsafe(method_family = none)]
        pub unsafe fn scaleFactor(&self) -> NSUInteger;

        /// Setter for [`scaleFactor`][Self::scaleFactor].
        #[unsafe(method(setScaleFactor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setScaleFactor(&self, scale_factor: NSUInteger);

        /// An array of objects of type ICScannerFeatureTemplate.
        #[unsafe(method(templates))]
        #[unsafe(method_family = none)]
        pub unsafe fn templates(&self) -> Retained<NSArray<ICScannerFeatureTemplate>>;

        /// An array of objects of type ICScannerFeature.
        #[unsafe(method(vendorFeatures))]
        #[unsafe(method_family = none)]
        pub unsafe fn vendorFeatures(&self) -> Option<Retained<NSArray<ICScannerFeature>>>;

        /// Physical size of the scan area in current measurement unit.
        #[unsafe(method(physicalSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn physicalSize(&self) -> NSSize;

        /// This property along with scanAreaOrientation describes the area to be scanned.
        #[unsafe(method(scanArea))]
        #[unsafe(method_family = none)]
        pub unsafe fn scanArea(&self) -> NSRect;

        /// Setter for [`scanArea`][Self::scanArea].
        #[unsafe(method(setScanArea:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setScanArea(&self, scan_area: NSRect);

        #[cfg(feature = "ImageCaptureConstants")]
        /// Desired orientation of the scan area. This property along with scanArea describes the area to be scanned.
        ///
        /// This property is set to ICEXIFOrientation1 initially. This property is not used by the ICScannerFunctionalUnitDocumentFeeder subclass.
        #[unsafe(method(scanAreaOrientation))]
        #[unsafe(method_family = none)]
        pub unsafe fn scanAreaOrientation(&self) -> ICEXIFOrientationType;

        #[cfg(feature = "ImageCaptureConstants")]
        /// Setter for [`scanAreaOrientation`][Self::scanAreaOrientation].
        #[unsafe(method(setScanAreaOrientation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setScanAreaOrientation(&self, scan_area_orientation: ICEXIFOrientationType);

        /// Indicates if this functional unit accepts threshold value to be used when performing a scan in black
        /// &
        /// white.
        #[unsafe(method(acceptsThresholdForBlackAndWhiteScanning))]
        #[unsafe(method_family = none)]
        pub unsafe fn acceptsThresholdForBlackAndWhiteScanning(&self) -> bool;

        /// Indicates if this functional unit uses threshold value to be used when performing a scan in black
        /// &
        /// white.
        #[unsafe(method(usesThresholdForBlackAndWhiteScanning))]
        #[unsafe(method_family = none)]
        pub unsafe fn usesThresholdForBlackAndWhiteScanning(&self) -> bool;

        /// Setter for [`usesThresholdForBlackAndWhiteScanning`][Self::usesThresholdForBlackAndWhiteScanning].
        #[unsafe(method(setUsesThresholdForBlackAndWhiteScanning:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUsesThresholdForBlackAndWhiteScanning(
            &self,
            uses_threshold_for_black_and_white_scanning: bool,
        );

        /// Default threshold value used when performing a scan in black
        /// &
        /// white. This value is from 0 to 255.
        #[unsafe(method(defaultThresholdForBlackAndWhiteScanning))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultThresholdForBlackAndWhiteScanning(&self) -> c_uchar;

        /// Threshold value to be used when performing a scan in black
        /// &
        /// white. This value should be from 0 to 255.
        #[unsafe(method(thresholdForBlackAndWhiteScanning))]
        #[unsafe(method_family = none)]
        pub unsafe fn thresholdForBlackAndWhiteScanning(&self) -> c_uchar;

        /// Setter for [`thresholdForBlackAndWhiteScanning`][Self::thresholdForBlackAndWhiteScanning].
        #[unsafe(method(setThresholdForBlackAndWhiteScanning:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setThresholdForBlackAndWhiteScanning(
            &self,
            threshold_for_black_and_white_scanning: c_uchar,
        );

        /// Indicates the current state of the functional unit.
        #[unsafe(method(state))]
        #[unsafe(method_family = none)]
        pub unsafe fn state(&self) -> ICScannerFunctionalUnitState;

        /// Indicates if a scan is in progress.
        #[unsafe(method(scanInProgress))]
        #[unsafe(method_family = none)]
        pub unsafe fn scanInProgress(&self) -> bool;

        #[cfg(feature = "objc2-core-foundation")]
        /// Indicates percentage of scan completed.
        #[unsafe(method(scanProgressPercentDone))]
        #[unsafe(method_family = none)]
        pub unsafe fn scanProgressPercentDone(&self) -> CGFloat;

        /// Indicates if this functional unit can perfrom an overview scan. Not all functional units can perform an overview scan. For example, a document feeder or a sheet feeder unit cannot perform an overview scan.
        #[unsafe(method(canPerformOverviewScan))]
        #[unsafe(method_family = none)]
        pub unsafe fn canPerformOverviewScan(&self) -> bool;

        /// Indicates if an overview scan is in progress.
        #[unsafe(method(overviewScanInProgress))]
        #[unsafe(method_family = none)]
        pub unsafe fn overviewScanInProgress(&self) -> bool;

        #[cfg(feature = "objc2-core-graphics")]
        /// Overview scan image. This property will be NULL for functional units that do not support overview scans.
        #[unsafe(method(overviewImage))]
        #[unsafe(method_family = none)]
        pub unsafe fn overviewImage(&self) -> Option<Retained<CGImage>>;

        /// Overview image resolution. Value assigned to this will be contrained by resolutions allowed by the device.
        #[unsafe(method(overviewResolution))]
        #[unsafe(method_family = none)]
        pub unsafe fn overviewResolution(&self) -> NSUInteger;

        /// Setter for [`overviewResolution`][Self::overviewResolution].
        #[unsafe(method(setOverviewResolution:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOverviewResolution(&self, overview_resolution: NSUInteger);
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFunctionalUnit {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFunctionalUnitFlatbed is a concrete subclass of ICScannerFunctionalUnit class. ICScannerDevice creates instances of this class.
    ///
    /// This represents the flatbed  unit on the scanner.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunitflatbed?language=objc)
    #[unsafe(super(ICScannerFunctionalUnit, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFunctionalUnitFlatbed;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFunctionalUnitFlatbed {}
);

impl ICScannerFunctionalUnitFlatbed {
    extern_methods!(
        /// Supported document types. The values in this set are valid values defined by ICScannerDocumentType.
        #[unsafe(method(supportedDocumentTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedDocumentTypes(&self) -> Retained<NSIndexSet>;

        /// Current document type. This will always be one of the supported document types.
        #[unsafe(method(documentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentType(&self) -> ICScannerDocumentType;

        /// Setter for [`documentType`][Self::documentType].
        #[unsafe(method(setDocumentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDocumentType(&self, document_type: ICScannerDocumentType);

        /// Document size of the current document type expressed in current measurement unit.
        #[unsafe(method(documentSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentSize(&self) -> NSSize;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFunctionalUnitFlatbed {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFunctionalUnitPositiveTransparency is a concrete subclass of ICScannerFunctionalUnit class. ICScannerDevice creates instances of this class.
    ///
    /// This represents the transparency unit on the scanner for scanning postives
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunitpositivetransparency?language=objc)
    #[unsafe(super(ICScannerFunctionalUnit, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFunctionalUnitPositiveTransparency;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFunctionalUnitPositiveTransparency {}
);

impl ICScannerFunctionalUnitPositiveTransparency {
    extern_methods!(
        /// Supported document types. The values in this set are valid values defined by ICScannerDocumentType.
        #[unsafe(method(supportedDocumentTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedDocumentTypes(&self) -> Retained<NSIndexSet>;

        /// Current document type. This will always be one of the supported document types.
        #[unsafe(method(documentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentType(&self) -> ICScannerDocumentType;

        /// Setter for [`documentType`][Self::documentType].
        #[unsafe(method(setDocumentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDocumentType(&self, document_type: ICScannerDocumentType);

        /// Document size of the current document type expressed in current measurement unit.
        #[unsafe(method(documentSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentSize(&self) -> NSSize;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFunctionalUnitPositiveTransparency {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFunctionalUnitNegativeTransparency is a concrete subclass of ICScannerFunctionalUnit class. ICScannerDevice creates instances of this class.
    ///
    /// This represents the transparency unit on the scanner for scanning negatives.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunitnegativetransparency?language=objc)
    #[unsafe(super(ICScannerFunctionalUnit, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFunctionalUnitNegativeTransparency;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFunctionalUnitNegativeTransparency {}
);

impl ICScannerFunctionalUnitNegativeTransparency {
    extern_methods!(
        /// Supported document types. The values in this set are valid values defined by ICScannerDocumentType.
        #[unsafe(method(supportedDocumentTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedDocumentTypes(&self) -> Retained<NSIndexSet>;

        /// Current document type. This will always be one of the supported document types.
        #[unsafe(method(documentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentType(&self) -> ICScannerDocumentType;

        /// Setter for [`documentType`][Self::documentType].
        #[unsafe(method(setDocumentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDocumentType(&self, document_type: ICScannerDocumentType);

        /// Document size of the current document type expressed in current measurement unit.
        #[unsafe(method(documentSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentSize(&self) -> NSSize;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFunctionalUnitNegativeTransparency {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// ICScannerFunctionalUnitDocumentFeeder is a concrete subclass of ICScannerFunctionalUnit class. ICScannerDevice creates instances of this class.
    ///
    /// This represents the document feeder unit on the scanner.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/imagecapturecore/icscannerfunctionalunitdocumentfeeder?language=objc)
    #[unsafe(super(ICScannerFunctionalUnit, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct ICScannerFunctionalUnitDocumentFeeder;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for ICScannerFunctionalUnitDocumentFeeder {}
);

impl ICScannerFunctionalUnitDocumentFeeder {
    extern_methods!(
        /// Supported document types. The values in this set are valid values defined by ICScannerDocumentType.
        #[unsafe(method(supportedDocumentTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedDocumentTypes(&self) -> Retained<NSIndexSet>;

        /// Current document type. This will always be one of the supported document types.
        #[unsafe(method(documentType))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentType(&self) -> ICScannerDocumentType;

        /// Setter for [`documentType`][Self::documentType].
        #[unsafe(method(setDocumentType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDocumentType(&self, document_type: ICScannerDocumentType);

        /// Document size of the current document type expressed in current measurement unit.
        #[unsafe(method(documentSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentSize(&self) -> NSSize;

        /// Indicates whether duplex scanning is supported.
        #[unsafe(method(supportsDuplexScanning))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportsDuplexScanning(&self) -> bool;

        /// Indicates whether duplex scanning is enabled.
        #[unsafe(method(duplexScanningEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn duplexScanningEnabled(&self) -> bool;

        /// Setter for [`duplexScanningEnabled`][Self::duplexScanningEnabled].
        #[unsafe(method(setDuplexScanningEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDuplexScanningEnabled(&self, duplex_scanning_enabled: bool);

        /// Indicates whether the feeder has documents to scan.
        ///
        /// This value will change when the document is loaded or removed from the feeder, if the scanner module has the capability to detect this state.
        #[unsafe(method(documentLoaded))]
        #[unsafe(method_family = none)]
        pub unsafe fn documentLoaded(&self) -> bool;

        #[cfg(feature = "ImageCaptureConstants")]
        /// Desired orientation of the odd pages of the scanned document.
        ///
        /// This property is set to ICEXIFOrientation1 initially.
        #[unsafe(method(oddPageOrientation))]
        #[unsafe(method_family = none)]
        pub unsafe fn oddPageOrientation(&self) -> ICEXIFOrientationType;

        #[cfg(feature = "ImageCaptureConstants")]
        /// Setter for [`oddPageOrientation`][Self::oddPageOrientation].
        #[unsafe(method(setOddPageOrientation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOddPageOrientation(&self, odd_page_orientation: ICEXIFOrientationType);

        #[cfg(feature = "ImageCaptureConstants")]
        /// Desired orientation of the even pages of the scanned document.
        ///
        /// This property is set to ICEXIFOrientation1 initially.
        #[unsafe(method(evenPageOrientation))]
        #[unsafe(method_family = none)]
        pub unsafe fn evenPageOrientation(&self) -> ICEXIFOrientationType;

        #[cfg(feature = "ImageCaptureConstants")]
        /// Setter for [`evenPageOrientation`][Self::evenPageOrientation].
        #[unsafe(method(setEvenPageOrientation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEvenPageOrientation(&self, even_page_orientation: ICEXIFOrientationType);

        /// Indicates whether the document feeder reads pages from back to front.
        #[unsafe(method(reverseFeederPageOrder))]
        #[unsafe(method_family = none)]
        pub unsafe fn reverseFeederPageOrder(&self) -> bool;
    );
}

/// Methods declared on superclass `NSObject`.
impl ICScannerFunctionalUnitDocumentFeeder {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}