objc2_ui_kit/generated/
UITextInputTraits.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextautocapitalizationtype?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct UITextAutocapitalizationType(pub NSInteger);
15impl UITextAutocapitalizationType {
16    #[doc(alias = "UITextAutocapitalizationTypeNone")]
17    pub const None: Self = Self(0);
18    #[doc(alias = "UITextAutocapitalizationTypeWords")]
19    pub const Words: Self = Self(1);
20    #[doc(alias = "UITextAutocapitalizationTypeSentences")]
21    pub const Sentences: Self = Self(2);
22    #[doc(alias = "UITextAutocapitalizationTypeAllCharacters")]
23    pub const AllCharacters: Self = Self(3);
24}
25
26unsafe impl Encode for UITextAutocapitalizationType {
27    const ENCODING: Encoding = NSInteger::ENCODING;
28}
29
30unsafe impl RefEncode for UITextAutocapitalizationType {
31    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextautocorrectiontype?language=objc)
35// NS_ENUM
36#[repr(transparent)]
37#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
38pub struct UITextAutocorrectionType(pub NSInteger);
39impl UITextAutocorrectionType {
40    #[doc(alias = "UITextAutocorrectionTypeDefault")]
41    pub const Default: Self = Self(0);
42    #[doc(alias = "UITextAutocorrectionTypeNo")]
43    pub const No: Self = Self(1);
44    #[doc(alias = "UITextAutocorrectionTypeYes")]
45    pub const Yes: Self = Self(2);
46}
47
48unsafe impl Encode for UITextAutocorrectionType {
49    const ENCODING: Encoding = NSInteger::ENCODING;
50}
51
52unsafe impl RefEncode for UITextAutocorrectionType {
53    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
54}
55
56/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextspellcheckingtype?language=objc)
57// NS_ENUM
58#[repr(transparent)]
59#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
60pub struct UITextSpellCheckingType(pub NSInteger);
61impl UITextSpellCheckingType {
62    #[doc(alias = "UITextSpellCheckingTypeDefault")]
63    pub const Default: Self = Self(0);
64    #[doc(alias = "UITextSpellCheckingTypeNo")]
65    pub const No: Self = Self(1);
66    #[doc(alias = "UITextSpellCheckingTypeYes")]
67    pub const Yes: Self = Self(2);
68}
69
70unsafe impl Encode for UITextSpellCheckingType {
71    const ENCODING: Encoding = NSInteger::ENCODING;
72}
73
74unsafe impl RefEncode for UITextSpellCheckingType {
75    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
76}
77
78/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartquotestype?language=objc)
79// NS_ENUM
80#[repr(transparent)]
81#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
82pub struct UITextSmartQuotesType(pub NSInteger);
83impl UITextSmartQuotesType {
84    #[doc(alias = "UITextSmartQuotesTypeDefault")]
85    pub const Default: Self = Self(0);
86    #[doc(alias = "UITextSmartQuotesTypeNo")]
87    pub const No: Self = Self(1);
88    #[doc(alias = "UITextSmartQuotesTypeYes")]
89    pub const Yes: Self = Self(2);
90}
91
92unsafe impl Encode for UITextSmartQuotesType {
93    const ENCODING: Encoding = NSInteger::ENCODING;
94}
95
96unsafe impl RefEncode for UITextSmartQuotesType {
97    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
98}
99
100/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartdashestype?language=objc)
101// NS_ENUM
102#[repr(transparent)]
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
104pub struct UITextSmartDashesType(pub NSInteger);
105impl UITextSmartDashesType {
106    #[doc(alias = "UITextSmartDashesTypeDefault")]
107    pub const Default: Self = Self(0);
108    #[doc(alias = "UITextSmartDashesTypeNo")]
109    pub const No: Self = Self(1);
110    #[doc(alias = "UITextSmartDashesTypeYes")]
111    pub const Yes: Self = Self(2);
112}
113
114unsafe impl Encode for UITextSmartDashesType {
115    const ENCODING: Encoding = NSInteger::ENCODING;
116}
117
118unsafe impl RefEncode for UITextSmartDashesType {
119    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
120}
121
122/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextsmartinsertdeletetype?language=objc)
123// NS_ENUM
124#[repr(transparent)]
125#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
126pub struct UITextSmartInsertDeleteType(pub NSInteger);
127impl UITextSmartInsertDeleteType {
128    #[doc(alias = "UITextSmartInsertDeleteTypeDefault")]
129    pub const Default: Self = Self(0);
130    #[doc(alias = "UITextSmartInsertDeleteTypeNo")]
131    pub const No: Self = Self(1);
132    #[doc(alias = "UITextSmartInsertDeleteTypeYes")]
133    pub const Yes: Self = Self(2);
134}
135
136unsafe impl Encode for UITextSmartInsertDeleteType {
137    const ENCODING: Encoding = NSInteger::ENCODING;
138}
139
140unsafe impl RefEncode for UITextSmartInsertDeleteType {
141    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
142}
143
144/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinlinepredictiontype?language=objc)
145// NS_ENUM
146#[repr(transparent)]
147#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
148pub struct UITextInlinePredictionType(pub NSInteger);
149impl UITextInlinePredictionType {
150    #[doc(alias = "UITextInlinePredictionTypeDefault")]
151    pub const Default: Self = Self(0);
152    #[doc(alias = "UITextInlinePredictionTypeNo")]
153    pub const No: Self = Self(1);
154    #[doc(alias = "UITextInlinePredictionTypeYes")]
155    pub const Yes: Self = Self(2);
156}
157
158unsafe impl Encode for UITextInlinePredictionType {
159    const ENCODING: Encoding = NSInteger::ENCODING;
160}
161
162unsafe impl RefEncode for UITextInlinePredictionType {
163    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
164}
165
166/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextmathexpressioncompletiontype?language=objc)
167// NS_ENUM
168#[repr(transparent)]
169#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
170pub struct UITextMathExpressionCompletionType(pub NSInteger);
171impl UITextMathExpressionCompletionType {
172    #[doc(alias = "UITextMathExpressionCompletionTypeDefault")]
173    pub const Default: Self = Self(0);
174    #[doc(alias = "UITextMathExpressionCompletionTypeNo")]
175    pub const No: Self = Self(1);
176    #[doc(alias = "UITextMathExpressionCompletionTypeYes")]
177    pub const Yes: Self = Self(2);
178}
179
180unsafe impl Encode for UITextMathExpressionCompletionType {
181    const ENCODING: Encoding = NSInteger::ENCODING;
182}
183
184unsafe impl RefEncode for UITextMathExpressionCompletionType {
185    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
186}
187
188/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uikeyboardtype?language=objc)
189// NS_ENUM
190#[repr(transparent)]
191#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
192pub struct UIKeyboardType(pub NSInteger);
193impl UIKeyboardType {
194    #[doc(alias = "UIKeyboardTypeDefault")]
195    pub const Default: Self = Self(0);
196    #[doc(alias = "UIKeyboardTypeASCIICapable")]
197    pub const ASCIICapable: Self = Self(1);
198    #[doc(alias = "UIKeyboardTypeNumbersAndPunctuation")]
199    pub const NumbersAndPunctuation: Self = Self(2);
200    #[doc(alias = "UIKeyboardTypeURL")]
201    pub const URL: Self = Self(3);
202    #[doc(alias = "UIKeyboardTypeNumberPad")]
203    pub const NumberPad: Self = Self(4);
204    #[doc(alias = "UIKeyboardTypePhonePad")]
205    pub const PhonePad: Self = Self(5);
206    #[doc(alias = "UIKeyboardTypeNamePhonePad")]
207    pub const NamePhonePad: Self = Self(6);
208    #[doc(alias = "UIKeyboardTypeEmailAddress")]
209    pub const EmailAddress: Self = Self(7);
210    #[doc(alias = "UIKeyboardTypeDecimalPad")]
211    pub const DecimalPad: Self = Self(8);
212    #[doc(alias = "UIKeyboardTypeTwitter")]
213    pub const Twitter: Self = Self(9);
214    #[doc(alias = "UIKeyboardTypeWebSearch")]
215    pub const WebSearch: Self = Self(10);
216    #[doc(alias = "UIKeyboardTypeASCIICapableNumberPad")]
217    pub const ASCIICapableNumberPad: Self = Self(11);
218    #[doc(alias = "UIKeyboardTypeAlphabet")]
219    pub const Alphabet: Self = Self(UIKeyboardType::ASCIICapable.0);
220}
221
222unsafe impl Encode for UIKeyboardType {
223    const ENCODING: Encoding = NSInteger::ENCODING;
224}
225
226unsafe impl RefEncode for UIKeyboardType {
227    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
228}
229
230/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uikeyboardappearance?language=objc)
231// NS_ENUM
232#[repr(transparent)]
233#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
234pub struct UIKeyboardAppearance(pub NSInteger);
235impl UIKeyboardAppearance {
236    #[doc(alias = "UIKeyboardAppearanceDefault")]
237    pub const Default: Self = Self(0);
238    #[doc(alias = "UIKeyboardAppearanceDark")]
239    pub const Dark: Self = Self(1);
240    #[doc(alias = "UIKeyboardAppearanceLight")]
241    pub const Light: Self = Self(2);
242    #[doc(alias = "UIKeyboardAppearanceAlert")]
243    pub const Alert: Self = Self(UIKeyboardAppearance::Dark.0);
244}
245
246unsafe impl Encode for UIKeyboardAppearance {
247    const ENCODING: Encoding = NSInteger::ENCODING;
248}
249
250unsafe impl RefEncode for UIKeyboardAppearance {
251    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
252}
253
254/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uireturnkeytype?language=objc)
255// NS_ENUM
256#[repr(transparent)]
257#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
258pub struct UIReturnKeyType(pub NSInteger);
259impl UIReturnKeyType {
260    #[doc(alias = "UIReturnKeyDefault")]
261    pub const Default: Self = Self(0);
262    #[doc(alias = "UIReturnKeyGo")]
263    pub const Go: Self = Self(1);
264    #[doc(alias = "UIReturnKeyGoogle")]
265    pub const Google: Self = Self(2);
266    #[doc(alias = "UIReturnKeyJoin")]
267    pub const Join: Self = Self(3);
268    #[doc(alias = "UIReturnKeyNext")]
269    pub const Next: Self = Self(4);
270    #[doc(alias = "UIReturnKeyRoute")]
271    pub const Route: Self = Self(5);
272    #[doc(alias = "UIReturnKeySearch")]
273    pub const Search: Self = Self(6);
274    #[doc(alias = "UIReturnKeySend")]
275    pub const Send: Self = Self(7);
276    #[doc(alias = "UIReturnKeyYahoo")]
277    pub const Yahoo: Self = Self(8);
278    #[doc(alias = "UIReturnKeyDone")]
279    pub const Done: Self = Self(9);
280    #[doc(alias = "UIReturnKeyEmergencyCall")]
281    pub const EmergencyCall: Self = Self(10);
282    #[doc(alias = "UIReturnKeyContinue")]
283    pub const Continue: Self = Self(11);
284}
285
286unsafe impl Encode for UIReturnKeyType {
287    const ENCODING: Encoding = NSInteger::ENCODING;
288}
289
290unsafe impl RefEncode for UIReturnKeyType {
291    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
292}
293
294/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwritingtoolsbehavior?language=objc)
295// NS_ENUM
296#[repr(transparent)]
297#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
298pub struct UIWritingToolsBehavior(pub NSInteger);
299impl UIWritingToolsBehavior {
300    /// Writing Tools will ignore this view
301    #[doc(alias = "UIWritingToolsBehaviorNone")]
302    pub const None: Self = Self(-1);
303    /// System-defined behavior, may resolve to `None`, `Complete`, or `Limited`
304    #[doc(alias = "UIWritingToolsBehaviorDefault")]
305    pub const Default: Self = Self(0);
306    /// The complete inline-editing experience will be provided if possible.
307    #[doc(alias = "UIWritingToolsBehaviorComplete")]
308    pub const Complete: Self = Self(1);
309    /// The limited, overlay-panel experience will be provided if possible.
310    #[doc(alias = "UIWritingToolsBehaviorLimited")]
311    pub const Limited: Self = Self(2);
312}
313
314unsafe impl Encode for UIWritingToolsBehavior {
315    const ENCODING: Encoding = NSInteger::ENCODING;
316}
317
318unsafe impl RefEncode for UIWritingToolsBehavior {
319    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
320}
321
322/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwritingtoolsresultoptions?language=objc)
323// NS_OPTIONS
324#[repr(transparent)]
325#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
326pub struct UIWritingToolsResultOptions(pub NSUInteger);
327bitflags::bitflags! {
328    impl UIWritingToolsResultOptions: NSUInteger {
329/// System-defined behavior
330        #[doc(alias = "UIWritingToolsResultDefault")]
331        const Default = 0;
332/// Writing Tools will provide plain text in proofreading suggestions or rewrites
333        #[doc(alias = "UIWritingToolsResultPlainText")]
334        const PlainText = 1<<0;
335/// 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)
336        #[doc(alias = "UIWritingToolsResultRichText")]
337        const RichText = 1<<1;
338/// implies `RichText`,  and Writing Tools may provide attributes for list layout
339        #[doc(alias = "UIWritingToolsResultList")]
340        const List = 1<<2;
341/// implies `RichText`,  and Writing Tools may provide attributes for tabular layout
342        #[doc(alias = "UIWritingToolsResultTable")]
343        const Table = 1<<3;
344/// 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.
345        #[doc(alias = "UIWritingToolsResultPresentationIntent")]
346        const PresentationIntent = 1<<4;
347    }
348}
349
350unsafe impl Encode for UIWritingToolsResultOptions {
351    const ENCODING: Encoding = NSUInteger::ENCODING;
352}
353
354unsafe impl RefEncode for UIWritingToolsResultOptions {
355    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
356}
357
358/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttype?language=objc)
359// NS_TYPED_ENUM
360pub type UITextContentType = NSString;
361
362extern_class!(
363    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinputpasswordrules?language=objc)
364    #[unsafe(super(NSObject))]
365    #[thread_kind = MainThreadOnly]
366    #[derive(Debug, PartialEq, Eq, Hash)]
367    pub struct UITextInputPasswordRules;
368);
369
370extern_conformance!(
371    unsafe impl NSCoding for UITextInputPasswordRules {}
372);
373
374extern_conformance!(
375    unsafe impl NSCopying for UITextInputPasswordRules {}
376);
377
378unsafe impl CopyingHelper for UITextInputPasswordRules {
379    type Result = Self;
380}
381
382extern_conformance!(
383    unsafe impl NSObjectProtocol for UITextInputPasswordRules {}
384);
385
386extern_conformance!(
387    unsafe impl NSSecureCoding for UITextInputPasswordRules {}
388);
389
390impl UITextInputPasswordRules {
391    extern_methods!(
392        #[unsafe(method(passwordRulesDescriptor))]
393        #[unsafe(method_family = none)]
394        pub fn passwordRulesDescriptor(&self) -> Retained<NSString>;
395
396        #[unsafe(method(init))]
397        #[unsafe(method_family = init)]
398        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
399
400        #[unsafe(method(new))]
401        #[unsafe(method_family = new)]
402        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
403
404        #[unsafe(method(passwordRulesWithDescriptor:))]
405        #[unsafe(method_family = none)]
406        pub fn passwordRulesWithDescriptor(
407            password_rules_descriptor: &NSString,
408            mtm: MainThreadMarker,
409        ) -> Retained<Self>;
410    );
411}
412
413extern_protocol!(
414    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextinputtraits?language=objc)
415    pub unsafe trait UITextInputTraits: NSObjectProtocol + MainThreadOnly {
416        #[optional]
417        #[unsafe(method(autocapitalizationType))]
418        #[unsafe(method_family = none)]
419        fn autocapitalizationType(&self) -> UITextAutocapitalizationType;
420
421        /// Setter for [`autocapitalizationType`][Self::autocapitalizationType].
422        #[optional]
423        #[unsafe(method(setAutocapitalizationType:))]
424        #[unsafe(method_family = none)]
425        fn setAutocapitalizationType(&self, autocapitalization_type: UITextAutocapitalizationType);
426
427        #[optional]
428        #[unsafe(method(autocorrectionType))]
429        #[unsafe(method_family = none)]
430        fn autocorrectionType(&self) -> UITextAutocorrectionType;
431
432        /// Setter for [`autocorrectionType`][Self::autocorrectionType].
433        #[optional]
434        #[unsafe(method(setAutocorrectionType:))]
435        #[unsafe(method_family = none)]
436        fn setAutocorrectionType(&self, autocorrection_type: UITextAutocorrectionType);
437
438        #[optional]
439        #[unsafe(method(spellCheckingType))]
440        #[unsafe(method_family = none)]
441        fn spellCheckingType(&self) -> UITextSpellCheckingType;
442
443        /// Setter for [`spellCheckingType`][Self::spellCheckingType].
444        #[optional]
445        #[unsafe(method(setSpellCheckingType:))]
446        #[unsafe(method_family = none)]
447        fn setSpellCheckingType(&self, spell_checking_type: UITextSpellCheckingType);
448
449        #[optional]
450        #[unsafe(method(smartQuotesType))]
451        #[unsafe(method_family = none)]
452        fn smartQuotesType(&self) -> UITextSmartQuotesType;
453
454        /// Setter for [`smartQuotesType`][Self::smartQuotesType].
455        #[optional]
456        #[unsafe(method(setSmartQuotesType:))]
457        #[unsafe(method_family = none)]
458        fn setSmartQuotesType(&self, smart_quotes_type: UITextSmartQuotesType);
459
460        #[optional]
461        #[unsafe(method(smartDashesType))]
462        #[unsafe(method_family = none)]
463        fn smartDashesType(&self) -> UITextSmartDashesType;
464
465        /// Setter for [`smartDashesType`][Self::smartDashesType].
466        #[optional]
467        #[unsafe(method(setSmartDashesType:))]
468        #[unsafe(method_family = none)]
469        fn setSmartDashesType(&self, smart_dashes_type: UITextSmartDashesType);
470
471        #[optional]
472        #[unsafe(method(smartInsertDeleteType))]
473        #[unsafe(method_family = none)]
474        fn smartInsertDeleteType(&self) -> UITextSmartInsertDeleteType;
475
476        /// Setter for [`smartInsertDeleteType`][Self::smartInsertDeleteType].
477        #[optional]
478        #[unsafe(method(setSmartInsertDeleteType:))]
479        #[unsafe(method_family = none)]
480        fn setSmartInsertDeleteType(&self, smart_insert_delete_type: UITextSmartInsertDeleteType);
481
482        #[optional]
483        #[unsafe(method(inlinePredictionType))]
484        #[unsafe(method_family = none)]
485        fn inlinePredictionType(&self) -> UITextInlinePredictionType;
486
487        /// Setter for [`inlinePredictionType`][Self::inlinePredictionType].
488        #[optional]
489        #[unsafe(method(setInlinePredictionType:))]
490        #[unsafe(method_family = none)]
491        fn setInlinePredictionType(&self, inline_prediction_type: UITextInlinePredictionType);
492
493        #[optional]
494        #[unsafe(method(mathExpressionCompletionType))]
495        #[unsafe(method_family = none)]
496        fn mathExpressionCompletionType(&self) -> UITextMathExpressionCompletionType;
497
498        /// Setter for [`mathExpressionCompletionType`][Self::mathExpressionCompletionType].
499        #[optional]
500        #[unsafe(method(setMathExpressionCompletionType:))]
501        #[unsafe(method_family = none)]
502        fn setMathExpressionCompletionType(
503            &self,
504            math_expression_completion_type: UITextMathExpressionCompletionType,
505        );
506
507        #[optional]
508        #[unsafe(method(keyboardType))]
509        #[unsafe(method_family = none)]
510        fn keyboardType(&self) -> UIKeyboardType;
511
512        /// Setter for [`keyboardType`][Self::keyboardType].
513        #[optional]
514        #[unsafe(method(setKeyboardType:))]
515        #[unsafe(method_family = none)]
516        fn setKeyboardType(&self, keyboard_type: UIKeyboardType);
517
518        #[optional]
519        #[unsafe(method(keyboardAppearance))]
520        #[unsafe(method_family = none)]
521        fn keyboardAppearance(&self) -> UIKeyboardAppearance;
522
523        /// Setter for [`keyboardAppearance`][Self::keyboardAppearance].
524        #[optional]
525        #[unsafe(method(setKeyboardAppearance:))]
526        #[unsafe(method_family = none)]
527        fn setKeyboardAppearance(&self, keyboard_appearance: UIKeyboardAppearance);
528
529        #[optional]
530        #[unsafe(method(returnKeyType))]
531        #[unsafe(method_family = none)]
532        fn returnKeyType(&self) -> UIReturnKeyType;
533
534        /// Setter for [`returnKeyType`][Self::returnKeyType].
535        #[optional]
536        #[unsafe(method(setReturnKeyType:))]
537        #[unsafe(method_family = none)]
538        fn setReturnKeyType(&self, return_key_type: UIReturnKeyType);
539
540        #[optional]
541        #[unsafe(method(enablesReturnKeyAutomatically))]
542        #[unsafe(method_family = none)]
543        fn enablesReturnKeyAutomatically(&self) -> bool;
544
545        /// Setter for [`enablesReturnKeyAutomatically`][Self::enablesReturnKeyAutomatically].
546        #[optional]
547        #[unsafe(method(setEnablesReturnKeyAutomatically:))]
548        #[unsafe(method_family = none)]
549        fn setEnablesReturnKeyAutomatically(&self, enables_return_key_automatically: bool);
550
551        #[optional]
552        #[unsafe(method(isSecureTextEntry))]
553        #[unsafe(method_family = none)]
554        fn isSecureTextEntry(&self) -> bool;
555
556        /// Setter for [`isSecureTextEntry`][Self::isSecureTextEntry].
557        #[optional]
558        #[unsafe(method(setSecureTextEntry:))]
559        #[unsafe(method_family = none)]
560        fn setSecureTextEntry(&self, secure_text_entry: bool);
561
562        #[optional]
563        #[unsafe(method(textContentType))]
564        #[unsafe(method_family = none)]
565        fn textContentType(&self) -> Retained<UITextContentType>;
566
567        /// Setter for [`textContentType`][Self::textContentType].
568        ///
569        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
570        #[optional]
571        #[unsafe(method(setTextContentType:))]
572        #[unsafe(method_family = none)]
573        fn setTextContentType(&self, text_content_type: Option<&UITextContentType>);
574
575        #[optional]
576        #[unsafe(method(passwordRules))]
577        #[unsafe(method_family = none)]
578        fn passwordRules(&self) -> Option<Retained<UITextInputPasswordRules>>;
579
580        /// Setter for [`passwordRules`][Self::passwordRules].
581        ///
582        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
583        #[optional]
584        #[unsafe(method(setPasswordRules:))]
585        #[unsafe(method_family = none)]
586        fn setPasswordRules(&self, password_rules: Option<&UITextInputPasswordRules>);
587
588        #[optional]
589        #[unsafe(method(writingToolsBehavior))]
590        #[unsafe(method_family = none)]
591        fn writingToolsBehavior(&self) -> UIWritingToolsBehavior;
592
593        /// Setter for [`writingToolsBehavior`][Self::writingToolsBehavior].
594        #[optional]
595        #[unsafe(method(setWritingToolsBehavior:))]
596        #[unsafe(method_family = none)]
597        fn setWritingToolsBehavior(&self, writing_tools_behavior: UIWritingToolsBehavior);
598
599        #[optional]
600        #[unsafe(method(allowedWritingToolsResultOptions))]
601        #[unsafe(method_family = none)]
602        fn allowedWritingToolsResultOptions(&self) -> UIWritingToolsResultOptions;
603
604        /// Setter for [`allowedWritingToolsResultOptions`][Self::allowedWritingToolsResultOptions].
605        #[optional]
606        #[unsafe(method(setAllowedWritingToolsResultOptions:))]
607        #[unsafe(method_family = none)]
608        fn setAllowedWritingToolsResultOptions(
609            &self,
610            allowed_writing_tools_result_options: UIWritingToolsResultOptions,
611        );
612
613        #[cfg(feature = "UIConversationContext")]
614        /// A reference to a conversation, such as a mail or messaging thread.
615        ///
616        /// 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``.
617        #[optional]
618        #[unsafe(method(conversationContext))]
619        #[unsafe(method_family = none)]
620        fn conversationContext(&self) -> Option<Retained<UIConversationContext>>;
621
622        #[cfg(feature = "UIConversationContext")]
623        /// Setter for [`conversationContext`][Self::conversationContext].
624        #[optional]
625        #[unsafe(method(setConversationContext:))]
626        #[unsafe(method_family = none)]
627        fn setConversationContext(&self, conversation_context: Option<&UIConversationContext>);
628
629        #[optional]
630        #[unsafe(method(allowsNumberPadPopover))]
631        #[unsafe(method_family = none)]
632        fn allowsNumberPadPopover(&self) -> bool;
633
634        /// Setter for [`allowsNumberPadPopover`][Self::allowsNumberPadPopover].
635        #[optional]
636        #[unsafe(method(setAllowsNumberPadPopover:))]
637        #[unsafe(method_family = none)]
638        fn setAllowsNumberPadPopover(&self, allows_number_pad_popover: bool);
639    }
640);
641
642extern "C" {
643    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypename?language=objc)
644    pub static UITextContentTypeName: &'static UITextContentType;
645}
646
647extern "C" {
648    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenameprefix?language=objc)
649    pub static UITextContentTypeNamePrefix: &'static UITextContentType;
650}
651
652extern "C" {
653    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypegivenname?language=objc)
654    pub static UITextContentTypeGivenName: &'static UITextContentType;
655}
656
657extern "C" {
658    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypemiddlename?language=objc)
659    pub static UITextContentTypeMiddleName: &'static UITextContentType;
660}
661
662extern "C" {
663    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypefamilyname?language=objc)
664    pub static UITextContentTypeFamilyName: &'static UITextContentType;
665}
666
667extern "C" {
668    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenamesuffix?language=objc)
669    pub static UITextContentTypeNameSuffix: &'static UITextContentType;
670}
671
672extern "C" {
673    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenickname?language=objc)
674    pub static UITextContentTypeNickname: &'static UITextContentType;
675}
676
677extern "C" {
678    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypejobtitle?language=objc)
679    pub static UITextContentTypeJobTitle: &'static UITextContentType;
680}
681
682extern "C" {
683    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeorganizationname?language=objc)
684    pub static UITextContentTypeOrganizationName: &'static UITextContentType;
685}
686
687extern "C" {
688    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypelocation?language=objc)
689    pub static UITextContentTypeLocation: &'static UITextContentType;
690}
691
692extern "C" {
693    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypefullstreetaddress?language=objc)
694    pub static UITextContentTypeFullStreetAddress: &'static UITextContentType;
695}
696
697extern "C" {
698    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypestreetaddressline1?language=objc)
699    pub static UITextContentTypeStreetAddressLine1: &'static UITextContentType;
700}
701
702extern "C" {
703    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypestreetaddressline2?language=objc)
704    pub static UITextContentTypeStreetAddressLine2: &'static UITextContentType;
705}
706
707extern "C" {
708    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddresscity?language=objc)
709    pub static UITextContentTypeAddressCity: &'static UITextContentType;
710}
711
712extern "C" {
713    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddressstate?language=objc)
714    pub static UITextContentTypeAddressState: &'static UITextContentType;
715}
716
717extern "C" {
718    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeaddresscityandstate?language=objc)
719    pub static UITextContentTypeAddressCityAndState: &'static UITextContentType;
720}
721
722extern "C" {
723    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypesublocality?language=objc)
724    pub static UITextContentTypeSublocality: &'static UITextContentType;
725}
726
727extern "C" {
728    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecountryname?language=objc)
729    pub static UITextContentTypeCountryName: &'static UITextContentType;
730}
731
732extern "C" {
733    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypepostalcode?language=objc)
734    pub static UITextContentTypePostalCode: &'static UITextContentType;
735}
736
737extern "C" {
738    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypetelephonenumber?language=objc)
739    pub static UITextContentTypeTelephoneNumber: &'static UITextContentType;
740}
741
742extern "C" {
743    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeemailaddress?language=objc)
744    pub static UITextContentTypeEmailAddress: &'static UITextContentType;
745}
746
747extern "C" {
748    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeurl?language=objc)
749    pub static UITextContentTypeURL: &'static UITextContentType;
750}
751
752extern "C" {
753    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardnumber?language=objc)
754    pub static UITextContentTypeCreditCardNumber: &'static UITextContentType;
755}
756
757extern "C" {
758    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeusername?language=objc)
759    pub static UITextContentTypeUsername: &'static UITextContentType;
760}
761
762extern "C" {
763    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypepassword?language=objc)
764    pub static UITextContentTypePassword: &'static UITextContentType;
765}
766
767extern "C" {
768    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypenewpassword?language=objc)
769    pub static UITextContentTypeNewPassword: &'static UITextContentType;
770}
771
772extern "C" {
773    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeonetimecode?language=objc)
774    pub static UITextContentTypeOneTimeCode: &'static UITextContentType;
775}
776
777extern "C" {
778    /// Parcel tracking numbers such as "FedEx 8602 9191 3550", "1Z50T0536891664106", and "729445720428778".
779    ///
780    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeshipmenttrackingnumber?language=objc)
781    pub static UITextContentTypeShipmentTrackingNumber: &'static UITextContentType;
782}
783
784extern "C" {
785    /// Airline flight numbers such as "CZ # 1234", "AA212", and "SW Flight 573".
786    ///
787    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypeflightnumber?language=objc)
788    pub static UITextContentTypeFlightNumber: &'static UITextContentType;
789}
790
791extern "C" {
792    /// Dates, times, or durations such as "7-3-2021" or "This Saturday", "12:30", and "10-11am", respectively.
793    ///
794    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypedatetime?language=objc)
795    pub static UITextContentTypeDateTime: &'static UITextContentType;
796}
797
798extern "C" {
799    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdate?language=objc)
800    pub static UITextContentTypeBirthdate: &'static UITextContentType;
801}
802
803extern "C" {
804    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdateday?language=objc)
805    pub static UITextContentTypeBirthdateDay: &'static UITextContentType;
806}
807
808extern "C" {
809    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdatemonth?language=objc)
810    pub static UITextContentTypeBirthdateMonth: &'static UITextContentType;
811}
812
813extern "C" {
814    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypebirthdateyear?language=objc)
815    pub static UITextContentTypeBirthdateYear: &'static UITextContentType;
816}
817
818extern "C" {
819    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardsecuritycode?language=objc)
820    pub static UITextContentTypeCreditCardSecurityCode: &'static UITextContentType;
821}
822
823extern "C" {
824    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardname?language=objc)
825    pub static UITextContentTypeCreditCardName: &'static UITextContentType;
826}
827
828extern "C" {
829    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardgivenname?language=objc)
830    pub static UITextContentTypeCreditCardGivenName: &'static UITextContentType;
831}
832
833extern "C" {
834    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardmiddlename?language=objc)
835    pub static UITextContentTypeCreditCardMiddleName: &'static UITextContentType;
836}
837
838extern "C" {
839    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardfamilyname?language=objc)
840    pub static UITextContentTypeCreditCardFamilyName: &'static UITextContentType;
841}
842
843extern "C" {
844    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpiration?language=objc)
845    pub static UITextContentTypeCreditCardExpiration: &'static UITextContentType;
846}
847
848extern "C" {
849    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpirationmonth?language=objc)
850    pub static UITextContentTypeCreditCardExpirationMonth: &'static UITextContentType;
851}
852
853extern "C" {
854    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardexpirationyear?language=objc)
855    pub static UITextContentTypeCreditCardExpirationYear: &'static UITextContentType;
856}
857
858extern "C" {
859    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecreditcardtype?language=objc)
860    pub static UITextContentTypeCreditCardType: &'static UITextContentType;
861}
862
863extern "C" {
864    /// eSIM activation
865    ///
866    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecellulareid?language=objc)
867    pub static UITextContentTypeCellularEID: &'static UITextContentType;
868}
869
870extern "C" {
871    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcontenttypecellularimei?language=objc)
872    pub static UITextContentTypeCellularIMEI: &'static UITextContentType;
873}