objc2-foundation 0.3.2

Bindings to the Foundation 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
//! 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 crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalgender?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalGender(pub NSInteger);
impl NSGrammaticalGender {
    #[doc(alias = "NSGrammaticalGenderNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalGenderFeminine")]
    pub const Feminine: Self = Self(1);
    #[doc(alias = "NSGrammaticalGenderMasculine")]
    pub const Masculine: Self = Self(2);
    #[doc(alias = "NSGrammaticalGenderNeuter")]
    pub const Neuter: Self = Self(3);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalpartofspeech?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalPartOfSpeech(pub NSInteger);
impl NSGrammaticalPartOfSpeech {
    #[doc(alias = "NSGrammaticalPartOfSpeechNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalPartOfSpeechDeterminer")]
    pub const Determiner: Self = Self(1);
    #[doc(alias = "NSGrammaticalPartOfSpeechPronoun")]
    pub const Pronoun: Self = Self(2);
    #[doc(alias = "NSGrammaticalPartOfSpeechLetter")]
    pub const Letter: Self = Self(3);
    #[doc(alias = "NSGrammaticalPartOfSpeechAdverb")]
    pub const Adverb: Self = Self(4);
    #[doc(alias = "NSGrammaticalPartOfSpeechParticle")]
    pub const Particle: Self = Self(5);
    #[doc(alias = "NSGrammaticalPartOfSpeechAdjective")]
    pub const Adjective: Self = Self(6);
    #[doc(alias = "NSGrammaticalPartOfSpeechAdposition")]
    pub const Adposition: Self = Self(7);
    #[doc(alias = "NSGrammaticalPartOfSpeechVerb")]
    pub const Verb: Self = Self(8);
    #[doc(alias = "NSGrammaticalPartOfSpeechNoun")]
    pub const Noun: Self = Self(9);
    #[doc(alias = "NSGrammaticalPartOfSpeechConjunction")]
    pub const Conjunction: Self = Self(10);
    #[doc(alias = "NSGrammaticalPartOfSpeechNumeral")]
    pub const Numeral: Self = Self(11);
    #[doc(alias = "NSGrammaticalPartOfSpeechInterjection")]
    pub const Interjection: Self = Self(12);
    #[doc(alias = "NSGrammaticalPartOfSpeechPreposition")]
    pub const Preposition: Self = Self(13);
    #[doc(alias = "NSGrammaticalPartOfSpeechAbbreviation")]
    pub const Abbreviation: Self = Self(14);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalnumber?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalNumber(pub NSInteger);
impl NSGrammaticalNumber {
    #[doc(alias = "NSGrammaticalNumberNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalNumberSingular")]
    pub const Singular: Self = Self(1);
    #[doc(alias = "NSGrammaticalNumberZero")]
    pub const Zero: Self = Self(2);
    #[doc(alias = "NSGrammaticalNumberPlural")]
    pub const Plural: Self = Self(3);
    #[doc(alias = "NSGrammaticalNumberPluralTwo")]
    pub const PluralTwo: Self = Self(4);
    #[doc(alias = "NSGrammaticalNumberPluralFew")]
    pub const PluralFew: Self = Self(5);
    #[doc(alias = "NSGrammaticalNumberPluralMany")]
    pub const PluralMany: Self = Self(6);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalcase?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalCase(pub NSInteger);
impl NSGrammaticalCase {
    #[doc(alias = "NSGrammaticalCaseNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalCaseNominative")]
    pub const Nominative: Self = Self(1);
    #[doc(alias = "NSGrammaticalCaseAccusative")]
    pub const Accusative: Self = Self(2);
    #[doc(alias = "NSGrammaticalCaseDative")]
    pub const Dative: Self = Self(3);
    #[doc(alias = "NSGrammaticalCaseGenitive")]
    pub const Genitive: Self = Self(4);
    #[doc(alias = "NSGrammaticalCasePrepositional")]
    pub const Prepositional: Self = Self(5);
    #[doc(alias = "NSGrammaticalCaseAblative")]
    pub const Ablative: Self = Self(6);
    #[doc(alias = "NSGrammaticalCaseAdessive")]
    pub const Adessive: Self = Self(7);
    #[doc(alias = "NSGrammaticalCaseAllative")]
    pub const Allative: Self = Self(8);
    #[doc(alias = "NSGrammaticalCaseElative")]
    pub const Elative: Self = Self(9);
    #[doc(alias = "NSGrammaticalCaseIllative")]
    pub const Illative: Self = Self(10);
    #[doc(alias = "NSGrammaticalCaseEssive")]
    pub const Essive: Self = Self(11);
    #[doc(alias = "NSGrammaticalCaseInessive")]
    pub const Inessive: Self = Self(12);
    #[doc(alias = "NSGrammaticalCaseLocative")]
    pub const Locative: Self = Self(13);
    #[doc(alias = "NSGrammaticalCaseTranslative")]
    pub const Translative: Self = Self(14);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalpronountype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalPronounType(pub NSInteger);
impl NSGrammaticalPronounType {
    #[doc(alias = "NSGrammaticalPronounTypeNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalPronounTypePersonal")]
    pub const Personal: Self = Self(1);
    #[doc(alias = "NSGrammaticalPronounTypeReflexive")]
    pub const Reflexive: Self = Self(2);
    #[doc(alias = "NSGrammaticalPronounTypePossessive")]
    pub const Possessive: Self = Self(3);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticalperson?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalPerson(pub NSInteger);
impl NSGrammaticalPerson {
    #[doc(alias = "NSGrammaticalPersonNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalPersonFirst")]
    pub const First: Self = Self(1);
    #[doc(alias = "NSGrammaticalPersonSecond")]
    pub const Second: Self = Self(2);
    #[doc(alias = "NSGrammaticalPersonThird")]
    pub const Third: Self = Self(3);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticaldetermination?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalDetermination(pub NSInteger);
impl NSGrammaticalDetermination {
    #[doc(alias = "NSGrammaticalDeterminationNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalDeterminationIndependent")]
    pub const Independent: Self = Self(1);
    #[doc(alias = "NSGrammaticalDeterminationDependent")]
    pub const Dependent: Self = Self(2);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsgrammaticaldefiniteness?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGrammaticalDefiniteness(pub NSInteger);
impl NSGrammaticalDefiniteness {
    #[doc(alias = "NSGrammaticalDefinitenessNotSet")]
    pub const NotSet: Self = Self(0);
    #[doc(alias = "NSGrammaticalDefinitenessIndefinite")]
    pub const Indefinite: Self = Self(1);
    #[doc(alias = "NSGrammaticalDefinitenessDefinite")]
    pub const Definite: Self = Self(2);
}

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

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

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

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCoding for NSMorphology {}
);

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCopying for NSMorphology {}
);

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSMorphology {
    type Result = Self;
}

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

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSSecureCoding for NSMorphology {}
);

impl NSMorphology {
    extern_methods!(
        #[unsafe(method(grammaticalGender))]
        #[unsafe(method_family = none)]
        pub fn grammaticalGender(&self) -> NSGrammaticalGender;

        /// Setter for [`grammaticalGender`][Self::grammaticalGender].
        #[unsafe(method(setGrammaticalGender:))]
        #[unsafe(method_family = none)]
        pub fn setGrammaticalGender(&self, grammatical_gender: NSGrammaticalGender);

        #[unsafe(method(partOfSpeech))]
        #[unsafe(method_family = none)]
        pub fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech;

        /// Setter for [`partOfSpeech`][Self::partOfSpeech].
        #[unsafe(method(setPartOfSpeech:))]
        #[unsafe(method_family = none)]
        pub fn setPartOfSpeech(&self, part_of_speech: NSGrammaticalPartOfSpeech);

        #[unsafe(method(number))]
        #[unsafe(method_family = none)]
        pub fn number(&self) -> NSGrammaticalNumber;

        /// Setter for [`number`][Self::number].
        #[unsafe(method(setNumber:))]
        #[unsafe(method_family = none)]
        pub fn setNumber(&self, number: NSGrammaticalNumber);

        #[unsafe(method(grammaticalCase))]
        #[unsafe(method_family = none)]
        pub fn grammaticalCase(&self) -> NSGrammaticalCase;

        /// Setter for [`grammaticalCase`][Self::grammaticalCase].
        #[unsafe(method(setGrammaticalCase:))]
        #[unsafe(method_family = none)]
        pub fn setGrammaticalCase(&self, grammatical_case: NSGrammaticalCase);

        #[unsafe(method(determination))]
        #[unsafe(method_family = none)]
        pub fn determination(&self) -> NSGrammaticalDetermination;

        /// Setter for [`determination`][Self::determination].
        #[unsafe(method(setDetermination:))]
        #[unsafe(method_family = none)]
        pub fn setDetermination(&self, determination: NSGrammaticalDetermination);

        #[unsafe(method(grammaticalPerson))]
        #[unsafe(method_family = none)]
        pub fn grammaticalPerson(&self) -> NSGrammaticalPerson;

        /// Setter for [`grammaticalPerson`][Self::grammaticalPerson].
        #[unsafe(method(setGrammaticalPerson:))]
        #[unsafe(method_family = none)]
        pub fn setGrammaticalPerson(&self, grammatical_person: NSGrammaticalPerson);

        #[unsafe(method(pronounType))]
        #[unsafe(method_family = none)]
        pub fn pronounType(&self) -> NSGrammaticalPronounType;

        /// Setter for [`pronounType`][Self::pronounType].
        #[unsafe(method(setPronounType:))]
        #[unsafe(method_family = none)]
        pub fn setPronounType(&self, pronoun_type: NSGrammaticalPronounType);

        #[unsafe(method(definiteness))]
        #[unsafe(method_family = none)]
        pub fn definiteness(&self) -> NSGrammaticalDefiniteness;

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

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

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

impl DefaultRetained for NSMorphology {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

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

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCoding for NSMorphologyPronoun {}
);

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCopying for NSMorphologyPronoun {}
);

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSMorphologyPronoun {
    type Result = Self;
}

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

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSSecureCoding for NSMorphologyPronoun {}
);

impl NSMorphologyPronoun {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(initWithPronoun:morphology:dependentMorphology:))]
        #[unsafe(method_family = init)]
        pub fn initWithPronoun_morphology_dependentMorphology(
            this: Allocated<Self>,
            pronoun: &NSString,
            morphology: &NSMorphology,
            dependent_morphology: Option<&NSMorphology>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSString")]
        #[unsafe(method(pronoun))]
        #[unsafe(method_family = none)]
        pub fn pronoun(&self) -> Retained<NSString>;

        #[unsafe(method(morphology))]
        #[unsafe(method_family = none)]
        pub fn morphology(&self) -> Retained<NSMorphology>;

        #[unsafe(method(dependentMorphology))]
        #[unsafe(method_family = none)]
        pub fn dependentMorphology(&self) -> Option<Retained<NSMorphology>>;
    );
}

/// NSCustomPronouns.
#[deprecated = "Use NSTermOfAddress instead"]
impl NSMorphology {
    extern_methods!(
        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(customPronounForLanguage:))]
        #[unsafe(method_family = none)]
        pub fn customPronounForLanguage(
            &self,
            language: &NSString,
        ) -> Option<Retained<NSMorphologyCustomPronoun>>;

        #[cfg(all(feature = "NSError", feature = "NSString"))]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setCustomPronoun:forLanguage:error:_))]
        #[unsafe(method_family = none)]
        pub fn setCustomPronoun_forLanguage_error(
            &self,
            features: Option<&NSMorphologyCustomPronoun>,
            language: &NSString,
        ) -> Result<(), Retained<NSError>>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsmorphologycustompronoun?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use NSTermOfAddress instead"]
    pub struct NSMorphologyCustomPronoun;
);

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCoding for NSMorphologyCustomPronoun {}
);

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSCopying for NSMorphologyCustomPronoun {}
);

#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSMorphologyCustomPronoun {
    type Result = Self;
}

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

#[cfg(feature = "NSObject")]
extern_conformance!(
    unsafe impl NSSecureCoding for NSMorphologyCustomPronoun {}
);

impl NSMorphologyCustomPronoun {
    extern_methods!(
        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(isSupportedForLanguage:))]
        #[unsafe(method_family = none)]
        pub fn isSupportedForLanguage(language: &NSString) -> bool;

        #[cfg(all(feature = "NSArray", feature = "NSString"))]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(requiredKeysForLanguage:))]
        #[unsafe(method_family = none)]
        pub fn requiredKeysForLanguage(language: &NSString) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(subjectForm))]
        #[unsafe(method_family = none)]
        pub fn subjectForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`subjectForm`][Self::subjectForm].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setSubjectForm:))]
        #[unsafe(method_family = none)]
        pub fn setSubjectForm(&self, subject_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(objectForm))]
        #[unsafe(method_family = none)]
        pub fn objectForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`objectForm`][Self::objectForm].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setObjectForm:))]
        #[unsafe(method_family = none)]
        pub fn setObjectForm(&self, object_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(possessiveForm))]
        #[unsafe(method_family = none)]
        pub fn possessiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`possessiveForm`][Self::possessiveForm].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setPossessiveForm:))]
        #[unsafe(method_family = none)]
        pub fn setPossessiveForm(&self, possessive_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(possessiveAdjectiveForm))]
        #[unsafe(method_family = none)]
        pub fn possessiveAdjectiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`possessiveAdjectiveForm`][Self::possessiveAdjectiveForm].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setPossessiveAdjectiveForm:))]
        #[unsafe(method_family = none)]
        pub fn setPossessiveAdjectiveForm(&self, possessive_adjective_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(reflexiveForm))]
        #[unsafe(method_family = none)]
        pub fn reflexiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        /// Setter for [`reflexiveForm`][Self::reflexiveForm].
        ///
        /// This is [copied][crate::NSCopying::copy] when set.
        #[deprecated = "Use NSTermOfAddress instead"]
        #[unsafe(method(setReflexiveForm:))]
        #[unsafe(method_family = none)]
        pub fn setReflexiveForm(&self, reflexive_form: Option<&NSString>);
    );
}

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

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

impl DefaultRetained for NSMorphologyCustomPronoun {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// NSMorphologyUserSettings.
impl NSMorphology {
    extern_methods!(
        #[unsafe(method(isUnspecified))]
        #[unsafe(method_family = none)]
        pub fn isUnspecified(&self) -> bool;

        #[unsafe(method(userMorphology))]
        #[unsafe(method_family = none)]
        pub fn userMorphology() -> Retained<NSMorphology>;
    );
}