objc2-ui-kit 0.3.2

Bindings to the UIKit 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
//! 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::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextautocapitalizationtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextAutocapitalizationType(pub NSInteger);
impl UITextAutocapitalizationType {
    #[doc(alias = "UITextAutocapitalizationTypeNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "UITextAutocapitalizationTypeWords")]
    pub const Words: Self = Self(1);
    #[doc(alias = "UITextAutocapitalizationTypeSentences")]
    pub const Sentences: Self = Self(2);
    #[doc(alias = "UITextAutocapitalizationTypeAllCharacters")]
    pub const AllCharacters: Self = Self(3);
}

unsafe impl Encode for UITextAutocapitalizationType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextautocorrectiontype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextAutocorrectionType(pub NSInteger);
impl UITextAutocorrectionType {
    #[doc(alias = "UITextAutocorrectionTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextAutocorrectionTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextAutocorrectionTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextAutocorrectionType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextspellcheckingtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSpellCheckingType(pub NSInteger);
impl UITextSpellCheckingType {
    #[doc(alias = "UITextSpellCheckingTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSpellCheckingTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSpellCheckingTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextSpellCheckingType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartquotestype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartQuotesType(pub NSInteger);
impl UITextSmartQuotesType {
    #[doc(alias = "UITextSmartQuotesTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartQuotesTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartQuotesTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextSmartQuotesType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartdashestype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartDashesType(pub NSInteger);
impl UITextSmartDashesType {
    #[doc(alias = "UITextSmartDashesTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartDashesTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartDashesTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextSmartDashesType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartinsertdeletetype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextSmartInsertDeleteType(pub NSInteger);
impl UITextSmartInsertDeleteType {
    #[doc(alias = "UITextSmartInsertDeleteTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextSmartInsertDeleteTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextSmartInsertDeleteTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextSmartInsertDeleteType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinlinepredictiontype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextInlinePredictionType(pub NSInteger);
impl UITextInlinePredictionType {
    #[doc(alias = "UITextInlinePredictionTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextInlinePredictionTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextInlinePredictionTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextInlinePredictionType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextmathexpressioncompletiontype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITextMathExpressionCompletionType(pub NSInteger);
impl UITextMathExpressionCompletionType {
    #[doc(alias = "UITextMathExpressionCompletionTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UITextMathExpressionCompletionTypeNo")]
    pub const No: Self = Self(1);
    #[doc(alias = "UITextMathExpressionCompletionTypeYes")]
    pub const Yes: Self = Self(2);
}

unsafe impl Encode for UITextMathExpressionCompletionType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uikeyboardtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIKeyboardType(pub NSInteger);
impl UIKeyboardType {
    #[doc(alias = "UIKeyboardTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIKeyboardTypeASCIICapable")]
    pub const ASCIICapable: Self = Self(1);
    #[doc(alias = "UIKeyboardTypeNumbersAndPunctuation")]
    pub const NumbersAndPunctuation: Self = Self(2);
    #[doc(alias = "UIKeyboardTypeURL")]
    pub const URL: Self = Self(3);
    #[doc(alias = "UIKeyboardTypeNumberPad")]
    pub const NumberPad: Self = Self(4);
    #[doc(alias = "UIKeyboardTypePhonePad")]
    pub const PhonePad: Self = Self(5);
    #[doc(alias = "UIKeyboardTypeNamePhonePad")]
    pub const NamePhonePad: Self = Self(6);
    #[doc(alias = "UIKeyboardTypeEmailAddress")]
    pub const EmailAddress: Self = Self(7);
    #[doc(alias = "UIKeyboardTypeDecimalPad")]
    pub const DecimalPad: Self = Self(8);
    #[doc(alias = "UIKeyboardTypeTwitter")]
    pub const Twitter: Self = Self(9);
    #[doc(alias = "UIKeyboardTypeWebSearch")]
    pub const WebSearch: Self = Self(10);
    #[doc(alias = "UIKeyboardTypeASCIICapableNumberPad")]
    pub const ASCIICapableNumberPad: Self = Self(11);
    #[doc(alias = "UIKeyboardTypeAlphabet")]
    pub const Alphabet: Self = Self(UIKeyboardType::ASCIICapable.0);
}

unsafe impl Encode for UIKeyboardType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uikeyboardappearance?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIKeyboardAppearance(pub NSInteger);
impl UIKeyboardAppearance {
    #[doc(alias = "UIKeyboardAppearanceDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIKeyboardAppearanceDark")]
    pub const Dark: Self = Self(1);
    #[doc(alias = "UIKeyboardAppearanceLight")]
    pub const Light: Self = Self(2);
    #[doc(alias = "UIKeyboardAppearanceAlert")]
    pub const Alert: Self = Self(UIKeyboardAppearance::Dark.0);
}

unsafe impl Encode for UIKeyboardAppearance {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uireturnkeytype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIReturnKeyType(pub NSInteger);
impl UIReturnKeyType {
    #[doc(alias = "UIReturnKeyDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "UIReturnKeyGo")]
    pub const Go: Self = Self(1);
    #[doc(alias = "UIReturnKeyGoogle")]
    pub const Google: Self = Self(2);
    #[doc(alias = "UIReturnKeyJoin")]
    pub const Join: Self = Self(3);
    #[doc(alias = "UIReturnKeyNext")]
    pub const Next: Self = Self(4);
    #[doc(alias = "UIReturnKeyRoute")]
    pub const Route: Self = Self(5);
    #[doc(alias = "UIReturnKeySearch")]
    pub const Search: Self = Self(6);
    #[doc(alias = "UIReturnKeySend")]
    pub const Send: Self = Self(7);
    #[doc(alias = "UIReturnKeyYahoo")]
    pub const Yahoo: Self = Self(8);
    #[doc(alias = "UIReturnKeyDone")]
    pub const Done: Self = Self(9);
    #[doc(alias = "UIReturnKeyEmergencyCall")]
    pub const EmergencyCall: Self = Self(10);
    #[doc(alias = "UIReturnKeyContinue")]
    pub const Continue: Self = Self(11);
}

unsafe impl Encode for UIReturnKeyType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwritingtoolsbehavior?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIWritingToolsBehavior(pub NSInteger);
impl UIWritingToolsBehavior {
    /// Writing Tools will ignore this view
    #[doc(alias = "UIWritingToolsBehaviorNone")]
    pub const None: Self = Self(-1);
    /// System-defined behavior, may resolve to `None`, `Complete`, or `Limited`
    #[doc(alias = "UIWritingToolsBehaviorDefault")]
    pub const Default: Self = Self(0);
    /// The complete inline-editing experience will be provided if possible.
    #[doc(alias = "UIWritingToolsBehaviorComplete")]
    pub const Complete: Self = Self(1);
    /// The limited, overlay-panel experience will be provided if possible.
    #[doc(alias = "UIWritingToolsBehaviorLimited")]
    pub const Limited: Self = Self(2);
}

unsafe impl Encode for UIWritingToolsBehavior {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwritingtoolsresultoptions?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIWritingToolsResultOptions(pub NSUInteger);
bitflags::bitflags! {
    impl UIWritingToolsResultOptions: NSUInteger {
/// System-defined behavior
        #[doc(alias = "UIWritingToolsResultDefault")]
        const Default = 0;
/// Writing Tools will provide plain text in proofreading suggestions or rewrites
        #[doc(alias = "UIWritingToolsResultPlainText")]
        const PlainText = 1<<0;
/// As well as plain text, Writing Tools will provide text attributes in proofreading suggestions or rewrites that are natively supported or known to be easily adopted (such as lists)
        #[doc(alias = "UIWritingToolsResultRichText")]
        const RichText = 1<<1;
/// implies `RichText`,  and Writing Tools may provide attributes for list layout
        #[doc(alias = "UIWritingToolsResultList")]
        const List = 1<<2;
/// implies `RichText`,  and Writing Tools may provide attributes for tabular layout
        #[doc(alias = "UIWritingToolsResultTable")]
        const Table = 1<<3;
/// implies `RichText`, `List`, and `Table`, and Writing Tools may provide text with presentation intent attributes. Writing Tools will use `NSPresentationIntent` instead of `NSTextList` and `NSTextTable` to represent lists and tables.
        #[doc(alias = "UIWritingToolsResultPresentationIntent")]
        const PresentationIntent = 1<<4;
    }
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttype?language=objc)
// NS_TYPED_ENUM
pub type UITextContentType = NSString;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinputpasswordrules?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITextInputPasswordRules;
);

extern_conformance!(
    unsafe impl NSCoding for UITextInputPasswordRules {}
);

extern_conformance!(
    unsafe impl NSCopying for UITextInputPasswordRules {}
);

unsafe impl CopyingHelper for UITextInputPasswordRules {
    type Result = Self;
}

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

extern_conformance!(
    unsafe impl NSSecureCoding for UITextInputPasswordRules {}
);

impl UITextInputPasswordRules {
    extern_methods!(
        #[unsafe(method(passwordRulesDescriptor))]
        #[unsafe(method_family = none)]
        pub fn passwordRulesDescriptor(&self) -> Retained<NSString>;

        #[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(mtm: MainThreadMarker) -> Retained<Self>;

        #[unsafe(method(passwordRulesWithDescriptor:))]
        #[unsafe(method_family = none)]
        pub fn passwordRulesWithDescriptor(
            password_rules_descriptor: &NSString,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;
    );
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinputtraits?language=objc)
    pub unsafe trait UITextInputTraits: NSObjectProtocol + MainThreadOnly {
        #[optional]
        #[unsafe(method(autocapitalizationType))]
        #[unsafe(method_family = none)]
        fn autocapitalizationType(&self) -> UITextAutocapitalizationType;

        /// Setter for [`autocapitalizationType`][Self::autocapitalizationType].
        #[optional]
        #[unsafe(method(setAutocapitalizationType:))]
        #[unsafe(method_family = none)]
        fn setAutocapitalizationType(&self, autocapitalization_type: UITextAutocapitalizationType);

        #[optional]
        #[unsafe(method(autocorrectionType))]
        #[unsafe(method_family = none)]
        fn autocorrectionType(&self) -> UITextAutocorrectionType;

        /// Setter for [`autocorrectionType`][Self::autocorrectionType].
        #[optional]
        #[unsafe(method(setAutocorrectionType:))]
        #[unsafe(method_family = none)]
        fn setAutocorrectionType(&self, autocorrection_type: UITextAutocorrectionType);

        #[optional]
        #[unsafe(method(spellCheckingType))]
        #[unsafe(method_family = none)]
        fn spellCheckingType(&self) -> UITextSpellCheckingType;

        /// Setter for [`spellCheckingType`][Self::spellCheckingType].
        #[optional]
        #[unsafe(method(setSpellCheckingType:))]
        #[unsafe(method_family = none)]
        fn setSpellCheckingType(&self, spell_checking_type: UITextSpellCheckingType);

        #[optional]
        #[unsafe(method(smartQuotesType))]
        #[unsafe(method_family = none)]
        fn smartQuotesType(&self) -> UITextSmartQuotesType;

        /// Setter for [`smartQuotesType`][Self::smartQuotesType].
        #[optional]
        #[unsafe(method(setSmartQuotesType:))]
        #[unsafe(method_family = none)]
        fn setSmartQuotesType(&self, smart_quotes_type: UITextSmartQuotesType);

        #[optional]
        #[unsafe(method(smartDashesType))]
        #[unsafe(method_family = none)]
        fn smartDashesType(&self) -> UITextSmartDashesType;

        /// Setter for [`smartDashesType`][Self::smartDashesType].
        #[optional]
        #[unsafe(method(setSmartDashesType:))]
        #[unsafe(method_family = none)]
        fn setSmartDashesType(&self, smart_dashes_type: UITextSmartDashesType);

        #[optional]
        #[unsafe(method(smartInsertDeleteType))]
        #[unsafe(method_family = none)]
        fn smartInsertDeleteType(&self) -> UITextSmartInsertDeleteType;

        /// Setter for [`smartInsertDeleteType`][Self::smartInsertDeleteType].
        #[optional]
        #[unsafe(method(setSmartInsertDeleteType:))]
        #[unsafe(method_family = none)]
        fn setSmartInsertDeleteType(&self, smart_insert_delete_type: UITextSmartInsertDeleteType);

        #[optional]
        #[unsafe(method(inlinePredictionType))]
        #[unsafe(method_family = none)]
        fn inlinePredictionType(&self) -> UITextInlinePredictionType;

        /// Setter for [`inlinePredictionType`][Self::inlinePredictionType].
        #[optional]
        #[unsafe(method(setInlinePredictionType:))]
        #[unsafe(method_family = none)]
        fn setInlinePredictionType(&self, inline_prediction_type: UITextInlinePredictionType);

        #[optional]
        #[unsafe(method(mathExpressionCompletionType))]
        #[unsafe(method_family = none)]
        fn mathExpressionCompletionType(&self) -> UITextMathExpressionCompletionType;

        /// Setter for [`mathExpressionCompletionType`][Self::mathExpressionCompletionType].
        #[optional]
        #[unsafe(method(setMathExpressionCompletionType:))]
        #[unsafe(method_family = none)]
        fn setMathExpressionCompletionType(
            &self,
            math_expression_completion_type: UITextMathExpressionCompletionType,
        );

        #[optional]
        #[unsafe(method(keyboardType))]
        #[unsafe(method_family = none)]
        fn keyboardType(&self) -> UIKeyboardType;

        /// Setter for [`keyboardType`][Self::keyboardType].
        #[optional]
        #[unsafe(method(setKeyboardType:))]
        #[unsafe(method_family = none)]
        fn setKeyboardType(&self, keyboard_type: UIKeyboardType);

        #[optional]
        #[unsafe(method(keyboardAppearance))]
        #[unsafe(method_family = none)]
        fn keyboardAppearance(&self) -> UIKeyboardAppearance;

        /// Setter for [`keyboardAppearance`][Self::keyboardAppearance].
        #[optional]
        #[unsafe(method(setKeyboardAppearance:))]
        #[unsafe(method_family = none)]
        fn setKeyboardAppearance(&self, keyboard_appearance: UIKeyboardAppearance);

        #[optional]
        #[unsafe(method(returnKeyType))]
        #[unsafe(method_family = none)]
        fn returnKeyType(&self) -> UIReturnKeyType;

        /// Setter for [`returnKeyType`][Self::returnKeyType].
        #[optional]
        #[unsafe(method(setReturnKeyType:))]
        #[unsafe(method_family = none)]
        fn setReturnKeyType(&self, return_key_type: UIReturnKeyType);

        #[optional]
        #[unsafe(method(enablesReturnKeyAutomatically))]
        #[unsafe(method_family = none)]
        fn enablesReturnKeyAutomatically(&self) -> bool;

        /// Setter for [`enablesReturnKeyAutomatically`][Self::enablesReturnKeyAutomatically].
        #[optional]
        #[unsafe(method(setEnablesReturnKeyAutomatically:))]
        #[unsafe(method_family = none)]
        fn setEnablesReturnKeyAutomatically(&self, enables_return_key_automatically: bool);

        #[optional]
        #[unsafe(method(isSecureTextEntry))]
        #[unsafe(method_family = none)]
        fn isSecureTextEntry(&self) -> bool;

        /// Setter for [`isSecureTextEntry`][Self::isSecureTextEntry].
        #[optional]
        #[unsafe(method(setSecureTextEntry:))]
        #[unsafe(method_family = none)]
        fn setSecureTextEntry(&self, secure_text_entry: bool);

        #[optional]
        #[unsafe(method(textContentType))]
        #[unsafe(method_family = none)]
        fn textContentType(&self) -> Retained<UITextContentType>;

        /// Setter for [`textContentType`][Self::textContentType].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[optional]
        #[unsafe(method(setTextContentType:))]
        #[unsafe(method_family = none)]
        fn setTextContentType(&self, text_content_type: Option<&UITextContentType>);

        #[optional]
        #[unsafe(method(passwordRules))]
        #[unsafe(method_family = none)]
        fn passwordRules(&self) -> Option<Retained<UITextInputPasswordRules>>;

        /// Setter for [`passwordRules`][Self::passwordRules].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[optional]
        #[unsafe(method(setPasswordRules:))]
        #[unsafe(method_family = none)]
        fn setPasswordRules(&self, password_rules: Option<&UITextInputPasswordRules>);

        #[optional]
        #[unsafe(method(writingToolsBehavior))]
        #[unsafe(method_family = none)]
        fn writingToolsBehavior(&self) -> UIWritingToolsBehavior;

        /// Setter for [`writingToolsBehavior`][Self::writingToolsBehavior].
        #[optional]
        #[unsafe(method(setWritingToolsBehavior:))]
        #[unsafe(method_family = none)]
        fn setWritingToolsBehavior(&self, writing_tools_behavior: UIWritingToolsBehavior);

        #[optional]
        #[unsafe(method(allowedWritingToolsResultOptions))]
        #[unsafe(method_family = none)]
        fn allowedWritingToolsResultOptions(&self) -> UIWritingToolsResultOptions;

        /// Setter for [`allowedWritingToolsResultOptions`][Self::allowedWritingToolsResultOptions].
        #[optional]
        #[unsafe(method(setAllowedWritingToolsResultOptions:))]
        #[unsafe(method_family = none)]
        fn setAllowedWritingToolsResultOptions(
            &self,
            allowed_writing_tools_result_options: UIWritingToolsResultOptions,
        );

        #[cfg(feature = "UIConversationContext")]
        /// A reference to a conversation, such as a mail or messaging thread.
        ///
        /// Set this conversation context before the keyboard appears; the keyboard uses this context to initialize its conversation context value. When updates occur in the conversation, call ``UITextInputDelegate/conversationContext(_:didChange:)`` on the ``inputDelegate`` property for ``UITextInput`` objects, such as UITextView/inputDelegate`` or ``UITextField/inputDelegate``.
        #[optional]
        #[unsafe(method(conversationContext))]
        #[unsafe(method_family = none)]
        fn conversationContext(&self) -> Option<Retained<UIConversationContext>>;

        #[cfg(feature = "UIConversationContext")]
        /// Setter for [`conversationContext`][Self::conversationContext].
        #[optional]
        #[unsafe(method(setConversationContext:))]
        #[unsafe(method_family = none)]
        fn setConversationContext(&self, conversation_context: Option<&UIConversationContext>);

        #[optional]
        #[unsafe(method(allowsNumberPadPopover))]
        #[unsafe(method_family = none)]
        fn allowsNumberPadPopover(&self) -> bool;

        /// Setter for [`allowsNumberPadPopover`][Self::allowsNumberPadPopover].
        #[optional]
        #[unsafe(method(setAllowsNumberPadPopover:))]
        #[unsafe(method_family = none)]
        fn setAllowsNumberPadPopover(&self, allows_number_pad_popover: bool);
    }
);

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypename?language=objc)
    pub static UITextContentTypeName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenameprefix?language=objc)
    pub static UITextContentTypeNamePrefix: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypegivenname?language=objc)
    pub static UITextContentTypeGivenName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypemiddlename?language=objc)
    pub static UITextContentTypeMiddleName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypefamilyname?language=objc)
    pub static UITextContentTypeFamilyName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenamesuffix?language=objc)
    pub static UITextContentTypeNameSuffix: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenickname?language=objc)
    pub static UITextContentTypeNickname: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypejobtitle?language=objc)
    pub static UITextContentTypeJobTitle: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeorganizationname?language=objc)
    pub static UITextContentTypeOrganizationName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypelocation?language=objc)
    pub static UITextContentTypeLocation: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypefullstreetaddress?language=objc)
    pub static UITextContentTypeFullStreetAddress: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypestreetaddressline1?language=objc)
    pub static UITextContentTypeStreetAddressLine1: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypestreetaddressline2?language=objc)
    pub static UITextContentTypeStreetAddressLine2: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddresscity?language=objc)
    pub static UITextContentTypeAddressCity: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddressstate?language=objc)
    pub static UITextContentTypeAddressState: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddresscityandstate?language=objc)
    pub static UITextContentTypeAddressCityAndState: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypesublocality?language=objc)
    pub static UITextContentTypeSublocality: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecountryname?language=objc)
    pub static UITextContentTypeCountryName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypepostalcode?language=objc)
    pub static UITextContentTypePostalCode: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypetelephonenumber?language=objc)
    pub static UITextContentTypeTelephoneNumber: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeemailaddress?language=objc)
    pub static UITextContentTypeEmailAddress: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeurl?language=objc)
    pub static UITextContentTypeURL: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardnumber?language=objc)
    pub static UITextContentTypeCreditCardNumber: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeusername?language=objc)
    pub static UITextContentTypeUsername: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypepassword?language=objc)
    pub static UITextContentTypePassword: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenewpassword?language=objc)
    pub static UITextContentTypeNewPassword: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeonetimecode?language=objc)
    pub static UITextContentTypeOneTimeCode: &'static UITextContentType;
}

extern "C" {
    /// Parcel tracking numbers such as "FedEx 8602 9191 3550", "1Z50T0536891664106", and "729445720428778".
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeshipmenttrackingnumber?language=objc)
    pub static UITextContentTypeShipmentTrackingNumber: &'static UITextContentType;
}

extern "C" {
    /// Airline flight numbers such as "CZ # 1234", "AA212", and "SW Flight 573".
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeflightnumber?language=objc)
    pub static UITextContentTypeFlightNumber: &'static UITextContentType;
}

extern "C" {
    /// Dates, times, or durations such as "7-3-2021" or "This Saturday", "12:30", and "10-11am", respectively.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypedatetime?language=objc)
    pub static UITextContentTypeDateTime: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdate?language=objc)
    pub static UITextContentTypeBirthdate: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdateday?language=objc)
    pub static UITextContentTypeBirthdateDay: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdatemonth?language=objc)
    pub static UITextContentTypeBirthdateMonth: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdateyear?language=objc)
    pub static UITextContentTypeBirthdateYear: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardsecuritycode?language=objc)
    pub static UITextContentTypeCreditCardSecurityCode: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardname?language=objc)
    pub static UITextContentTypeCreditCardName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardgivenname?language=objc)
    pub static UITextContentTypeCreditCardGivenName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardmiddlename?language=objc)
    pub static UITextContentTypeCreditCardMiddleName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardfamilyname?language=objc)
    pub static UITextContentTypeCreditCardFamilyName: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpiration?language=objc)
    pub static UITextContentTypeCreditCardExpiration: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpirationmonth?language=objc)
    pub static UITextContentTypeCreditCardExpirationMonth: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpirationyear?language=objc)
    pub static UITextContentTypeCreditCardExpirationYear: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardtype?language=objc)
    pub static UITextContentTypeCreditCardType: &'static UITextContentType;
}

extern "C" {
    /// eSIM activation
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecellulareid?language=objc)
    pub static UITextContentTypeCellularEID: &'static UITextContentType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecellularimei?language=objc)
    pub static UITextContentTypeCellularIMEI: &'static UITextContentType;
}