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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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);
}

// 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!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSMorphology;

    unsafe impl ClassType for NSMorphology {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

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

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

unsafe impl NSObjectProtocol for NSMorphology {}

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

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

        #[method(setGrammaticalGender:)]
        pub unsafe fn setGrammaticalGender(&self, grammatical_gender: NSGrammaticalGender);

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

        #[method(setPartOfSpeech:)]
        pub unsafe fn setPartOfSpeech(&self, part_of_speech: NSGrammaticalPartOfSpeech);

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

        #[method(setNumber:)]
        pub unsafe fn setNumber(&self, number: NSGrammaticalNumber);

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

        #[method(setGrammaticalCase:)]
        pub unsafe fn setGrammaticalCase(&self, grammatical_case: NSGrammaticalCase);

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

        #[method(setDetermination:)]
        pub unsafe fn setDetermination(&self, determination: NSGrammaticalDetermination);

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

        #[method(setGrammaticalPerson:)]
        pub unsafe fn setGrammaticalPerson(&self, grammatical_person: NSGrammaticalPerson);

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

        #[method(setPronounType:)]
        pub unsafe fn setPronounType(&self, pronoun_type: NSGrammaticalPronounType);

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

        #[method(setDefiniteness:)]
        pub unsafe fn setDefiniteness(&self, definiteness: NSGrammaticalDefiniteness);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSMorphology {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSMorphologyPronoun;

    unsafe impl ClassType for NSMorphologyPronoun {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

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

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

unsafe impl NSObjectProtocol for NSMorphologyPronoun {}

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

extern_methods!(
    unsafe impl NSMorphologyPronoun {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

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

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other pronoun)]
        pub unsafe fn pronoun(&self) -> Retained<NSString>;

        #[method_id(@__retain_semantics Other morphology)]
        pub unsafe fn morphology(&self) -> Retained<NSMorphology>;

        #[method_id(@__retain_semantics Other dependentMorphology)]
        pub unsafe fn dependentMorphology(&self) -> Option<Retained<NSMorphology>>;
    }
);

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

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

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "Use NSTermOfAddress instead"]
    pub struct NSMorphologyCustomPronoun;

    unsafe impl ClassType for NSMorphologyCustomPronoun {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

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

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

unsafe impl NSObjectProtocol for NSMorphologyCustomPronoun {}

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

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

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

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method_id(@__retain_semantics Other subjectForm)]
        pub unsafe fn subjectForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method(setSubjectForm:)]
        pub unsafe fn setSubjectForm(&self, subject_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method_id(@__retain_semantics Other objectForm)]
        pub unsafe fn objectForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method(setObjectForm:)]
        pub unsafe fn setObjectForm(&self, object_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method_id(@__retain_semantics Other possessiveForm)]
        pub unsafe fn possessiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method(setPossessiveForm:)]
        pub unsafe fn setPossessiveForm(&self, possessive_form: Option<&NSString>);

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method_id(@__retain_semantics Other possessiveAdjectiveForm)]
        pub unsafe fn possessiveAdjectiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method(setPossessiveAdjectiveForm:)]
        pub unsafe fn setPossessiveAdjectiveForm(
            &self,
            possessive_adjective_form: Option<&NSString>,
        );

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method_id(@__retain_semantics Other reflexiveForm)]
        pub unsafe fn reflexiveForm(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[deprecated = "Use NSTermOfAddress instead"]
        #[method(setReflexiveForm:)]
        pub unsafe fn setReflexiveForm(&self, reflexive_form: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSMorphologyCustomPronoun {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

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

        #[method_id(@__retain_semantics Other userMorphology)]
        pub unsafe fn userMorphology() -> Retained<NSMorphology>;
    }
);