objc2_foundation/generated/
NSMorphology.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct NSGrammaticalGender(pub NSInteger);
14impl NSGrammaticalGender {
15 #[doc(alias = "NSGrammaticalGenderNotSet")]
16 pub const NotSet: Self = Self(0);
17 #[doc(alias = "NSGrammaticalGenderFeminine")]
18 pub const Feminine: Self = Self(1);
19 #[doc(alias = "NSGrammaticalGenderMasculine")]
20 pub const Masculine: Self = Self(2);
21 #[doc(alias = "NSGrammaticalGenderNeuter")]
22 pub const Neuter: Self = Self(3);
23}
24
25unsafe impl Encode for NSGrammaticalGender {
26 const ENCODING: Encoding = NSInteger::ENCODING;
27}
28
29unsafe impl RefEncode for NSGrammaticalGender {
30 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
31}
32
33#[repr(transparent)]
36#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
37pub struct NSGrammaticalPartOfSpeech(pub NSInteger);
38impl NSGrammaticalPartOfSpeech {
39 #[doc(alias = "NSGrammaticalPartOfSpeechNotSet")]
40 pub const NotSet: Self = Self(0);
41 #[doc(alias = "NSGrammaticalPartOfSpeechDeterminer")]
42 pub const Determiner: Self = Self(1);
43 #[doc(alias = "NSGrammaticalPartOfSpeechPronoun")]
44 pub const Pronoun: Self = Self(2);
45 #[doc(alias = "NSGrammaticalPartOfSpeechLetter")]
46 pub const Letter: Self = Self(3);
47 #[doc(alias = "NSGrammaticalPartOfSpeechAdverb")]
48 pub const Adverb: Self = Self(4);
49 #[doc(alias = "NSGrammaticalPartOfSpeechParticle")]
50 pub const Particle: Self = Self(5);
51 #[doc(alias = "NSGrammaticalPartOfSpeechAdjective")]
52 pub const Adjective: Self = Self(6);
53 #[doc(alias = "NSGrammaticalPartOfSpeechAdposition")]
54 pub const Adposition: Self = Self(7);
55 #[doc(alias = "NSGrammaticalPartOfSpeechVerb")]
56 pub const Verb: Self = Self(8);
57 #[doc(alias = "NSGrammaticalPartOfSpeechNoun")]
58 pub const Noun: Self = Self(9);
59 #[doc(alias = "NSGrammaticalPartOfSpeechConjunction")]
60 pub const Conjunction: Self = Self(10);
61 #[doc(alias = "NSGrammaticalPartOfSpeechNumeral")]
62 pub const Numeral: Self = Self(11);
63 #[doc(alias = "NSGrammaticalPartOfSpeechInterjection")]
64 pub const Interjection: Self = Self(12);
65 #[doc(alias = "NSGrammaticalPartOfSpeechPreposition")]
66 pub const Preposition: Self = Self(13);
67 #[doc(alias = "NSGrammaticalPartOfSpeechAbbreviation")]
68 pub const Abbreviation: Self = Self(14);
69}
70
71unsafe impl Encode for NSGrammaticalPartOfSpeech {
72 const ENCODING: Encoding = NSInteger::ENCODING;
73}
74
75unsafe impl RefEncode for NSGrammaticalPartOfSpeech {
76 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
77}
78
79#[repr(transparent)]
82#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
83pub struct NSGrammaticalNumber(pub NSInteger);
84impl NSGrammaticalNumber {
85 #[doc(alias = "NSGrammaticalNumberNotSet")]
86 pub const NotSet: Self = Self(0);
87 #[doc(alias = "NSGrammaticalNumberSingular")]
88 pub const Singular: Self = Self(1);
89 #[doc(alias = "NSGrammaticalNumberZero")]
90 pub const Zero: Self = Self(2);
91 #[doc(alias = "NSGrammaticalNumberPlural")]
92 pub const Plural: Self = Self(3);
93 #[doc(alias = "NSGrammaticalNumberPluralTwo")]
94 pub const PluralTwo: Self = Self(4);
95 #[doc(alias = "NSGrammaticalNumberPluralFew")]
96 pub const PluralFew: Self = Self(5);
97 #[doc(alias = "NSGrammaticalNumberPluralMany")]
98 pub const PluralMany: Self = Self(6);
99}
100
101unsafe impl Encode for NSGrammaticalNumber {
102 const ENCODING: Encoding = NSInteger::ENCODING;
103}
104
105unsafe impl RefEncode for NSGrammaticalNumber {
106 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
107}
108
109#[repr(transparent)]
112#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
113pub struct NSGrammaticalCase(pub NSInteger);
114impl NSGrammaticalCase {
115 #[doc(alias = "NSGrammaticalCaseNotSet")]
116 pub const NotSet: Self = Self(0);
117 #[doc(alias = "NSGrammaticalCaseNominative")]
118 pub const Nominative: Self = Self(1);
119 #[doc(alias = "NSGrammaticalCaseAccusative")]
120 pub const Accusative: Self = Self(2);
121 #[doc(alias = "NSGrammaticalCaseDative")]
122 pub const Dative: Self = Self(3);
123 #[doc(alias = "NSGrammaticalCaseGenitive")]
124 pub const Genitive: Self = Self(4);
125 #[doc(alias = "NSGrammaticalCasePrepositional")]
126 pub const Prepositional: Self = Self(5);
127 #[doc(alias = "NSGrammaticalCaseAblative")]
128 pub const Ablative: Self = Self(6);
129 #[doc(alias = "NSGrammaticalCaseAdessive")]
130 pub const Adessive: Self = Self(7);
131 #[doc(alias = "NSGrammaticalCaseAllative")]
132 pub const Allative: Self = Self(8);
133 #[doc(alias = "NSGrammaticalCaseElative")]
134 pub const Elative: Self = Self(9);
135 #[doc(alias = "NSGrammaticalCaseIllative")]
136 pub const Illative: Self = Self(10);
137 #[doc(alias = "NSGrammaticalCaseEssive")]
138 pub const Essive: Self = Self(11);
139 #[doc(alias = "NSGrammaticalCaseInessive")]
140 pub const Inessive: Self = Self(12);
141 #[doc(alias = "NSGrammaticalCaseLocative")]
142 pub const Locative: Self = Self(13);
143 #[doc(alias = "NSGrammaticalCaseTranslative")]
144 pub const Translative: Self = Self(14);
145}
146
147unsafe impl Encode for NSGrammaticalCase {
148 const ENCODING: Encoding = NSInteger::ENCODING;
149}
150
151unsafe impl RefEncode for NSGrammaticalCase {
152 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
153}
154
155#[repr(transparent)]
158#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
159pub struct NSGrammaticalPronounType(pub NSInteger);
160impl NSGrammaticalPronounType {
161 #[doc(alias = "NSGrammaticalPronounTypeNotSet")]
162 pub const NotSet: Self = Self(0);
163 #[doc(alias = "NSGrammaticalPronounTypePersonal")]
164 pub const Personal: Self = Self(1);
165 #[doc(alias = "NSGrammaticalPronounTypeReflexive")]
166 pub const Reflexive: Self = Self(2);
167 #[doc(alias = "NSGrammaticalPronounTypePossessive")]
168 pub const Possessive: Self = Self(3);
169}
170
171unsafe impl Encode for NSGrammaticalPronounType {
172 const ENCODING: Encoding = NSInteger::ENCODING;
173}
174
175unsafe impl RefEncode for NSGrammaticalPronounType {
176 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
177}
178
179#[repr(transparent)]
182#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
183pub struct NSGrammaticalPerson(pub NSInteger);
184impl NSGrammaticalPerson {
185 #[doc(alias = "NSGrammaticalPersonNotSet")]
186 pub const NotSet: Self = Self(0);
187 #[doc(alias = "NSGrammaticalPersonFirst")]
188 pub const First: Self = Self(1);
189 #[doc(alias = "NSGrammaticalPersonSecond")]
190 pub const Second: Self = Self(2);
191 #[doc(alias = "NSGrammaticalPersonThird")]
192 pub const Third: Self = Self(3);
193}
194
195unsafe impl Encode for NSGrammaticalPerson {
196 const ENCODING: Encoding = NSInteger::ENCODING;
197}
198
199unsafe impl RefEncode for NSGrammaticalPerson {
200 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
201}
202
203#[repr(transparent)]
206#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
207pub struct NSGrammaticalDetermination(pub NSInteger);
208impl NSGrammaticalDetermination {
209 #[doc(alias = "NSGrammaticalDeterminationNotSet")]
210 pub const NotSet: Self = Self(0);
211 #[doc(alias = "NSGrammaticalDeterminationIndependent")]
212 pub const Independent: Self = Self(1);
213 #[doc(alias = "NSGrammaticalDeterminationDependent")]
214 pub const Dependent: Self = Self(2);
215}
216
217unsafe impl Encode for NSGrammaticalDetermination {
218 const ENCODING: Encoding = NSInteger::ENCODING;
219}
220
221unsafe impl RefEncode for NSGrammaticalDetermination {
222 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
223}
224
225#[repr(transparent)]
228#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
229pub struct NSGrammaticalDefiniteness(pub NSInteger);
230impl NSGrammaticalDefiniteness {
231 #[doc(alias = "NSGrammaticalDefinitenessNotSet")]
232 pub const NotSet: Self = Self(0);
233 #[doc(alias = "NSGrammaticalDefinitenessIndefinite")]
234 pub const Indefinite: Self = Self(1);
235 #[doc(alias = "NSGrammaticalDefinitenessDefinite")]
236 pub const Definite: Self = Self(2);
237}
238
239unsafe impl Encode for NSGrammaticalDefiniteness {
240 const ENCODING: Encoding = NSInteger::ENCODING;
241}
242
243unsafe impl RefEncode for NSGrammaticalDefiniteness {
244 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
245}
246
247extern_class!(
248 #[unsafe(super(NSObject))]
250 #[derive(Debug, PartialEq, Eq, Hash)]
251 pub struct NSMorphology;
252);
253
254#[cfg(feature = "NSObject")]
255extern_conformance!(
256 unsafe impl NSCoding for NSMorphology {}
257);
258
259#[cfg(feature = "NSObject")]
260extern_conformance!(
261 unsafe impl NSCopying for NSMorphology {}
262);
263
264#[cfg(feature = "NSObject")]
265unsafe impl CopyingHelper for NSMorphology {
266 type Result = Self;
267}
268
269extern_conformance!(
270 unsafe impl NSObjectProtocol for NSMorphology {}
271);
272
273#[cfg(feature = "NSObject")]
274extern_conformance!(
275 unsafe impl NSSecureCoding for NSMorphology {}
276);
277
278impl NSMorphology {
279 extern_methods!(
280 #[unsafe(method(grammaticalGender))]
281 #[unsafe(method_family = none)]
282 pub fn grammaticalGender(&self) -> NSGrammaticalGender;
283
284 #[unsafe(method(setGrammaticalGender:))]
286 #[unsafe(method_family = none)]
287 pub fn setGrammaticalGender(&self, grammatical_gender: NSGrammaticalGender);
288
289 #[unsafe(method(partOfSpeech))]
290 #[unsafe(method_family = none)]
291 pub fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech;
292
293 #[unsafe(method(setPartOfSpeech:))]
295 #[unsafe(method_family = none)]
296 pub fn setPartOfSpeech(&self, part_of_speech: NSGrammaticalPartOfSpeech);
297
298 #[unsafe(method(number))]
299 #[unsafe(method_family = none)]
300 pub fn number(&self) -> NSGrammaticalNumber;
301
302 #[unsafe(method(setNumber:))]
304 #[unsafe(method_family = none)]
305 pub fn setNumber(&self, number: NSGrammaticalNumber);
306
307 #[unsafe(method(grammaticalCase))]
308 #[unsafe(method_family = none)]
309 pub fn grammaticalCase(&self) -> NSGrammaticalCase;
310
311 #[unsafe(method(setGrammaticalCase:))]
313 #[unsafe(method_family = none)]
314 pub fn setGrammaticalCase(&self, grammatical_case: NSGrammaticalCase);
315
316 #[unsafe(method(determination))]
317 #[unsafe(method_family = none)]
318 pub fn determination(&self) -> NSGrammaticalDetermination;
319
320 #[unsafe(method(setDetermination:))]
322 #[unsafe(method_family = none)]
323 pub fn setDetermination(&self, determination: NSGrammaticalDetermination);
324
325 #[unsafe(method(grammaticalPerson))]
326 #[unsafe(method_family = none)]
327 pub fn grammaticalPerson(&self) -> NSGrammaticalPerson;
328
329 #[unsafe(method(setGrammaticalPerson:))]
331 #[unsafe(method_family = none)]
332 pub fn setGrammaticalPerson(&self, grammatical_person: NSGrammaticalPerson);
333
334 #[unsafe(method(pronounType))]
335 #[unsafe(method_family = none)]
336 pub fn pronounType(&self) -> NSGrammaticalPronounType;
337
338 #[unsafe(method(setPronounType:))]
340 #[unsafe(method_family = none)]
341 pub fn setPronounType(&self, pronoun_type: NSGrammaticalPronounType);
342
343 #[unsafe(method(definiteness))]
344 #[unsafe(method_family = none)]
345 pub fn definiteness(&self) -> NSGrammaticalDefiniteness;
346
347 #[unsafe(method(setDefiniteness:))]
349 #[unsafe(method_family = none)]
350 pub fn setDefiniteness(&self, definiteness: NSGrammaticalDefiniteness);
351 );
352}
353
354impl NSMorphology {
356 extern_methods!(
357 #[unsafe(method(init))]
358 #[unsafe(method_family = init)]
359 pub fn init(this: Allocated<Self>) -> Retained<Self>;
360
361 #[unsafe(method(new))]
362 #[unsafe(method_family = new)]
363 pub fn new() -> Retained<Self>;
364 );
365}
366
367impl DefaultRetained for NSMorphology {
368 #[inline]
369 fn default_retained() -> Retained<Self> {
370 Self::new()
371 }
372}
373
374extern_class!(
375 #[unsafe(super(NSObject))]
377 #[derive(Debug, PartialEq, Eq, Hash)]
378 pub struct NSMorphologyPronoun;
379);
380
381#[cfg(feature = "NSObject")]
382extern_conformance!(
383 unsafe impl NSCoding for NSMorphologyPronoun {}
384);
385
386#[cfg(feature = "NSObject")]
387extern_conformance!(
388 unsafe impl NSCopying for NSMorphologyPronoun {}
389);
390
391#[cfg(feature = "NSObject")]
392unsafe impl CopyingHelper for NSMorphologyPronoun {
393 type Result = Self;
394}
395
396extern_conformance!(
397 unsafe impl NSObjectProtocol for NSMorphologyPronoun {}
398);
399
400#[cfg(feature = "NSObject")]
401extern_conformance!(
402 unsafe impl NSSecureCoding for NSMorphologyPronoun {}
403);
404
405impl NSMorphologyPronoun {
406 extern_methods!(
407 #[unsafe(method(new))]
408 #[unsafe(method_family = new)]
409 pub unsafe fn new() -> Retained<Self>;
410
411 #[unsafe(method(init))]
412 #[unsafe(method_family = init)]
413 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
414
415 #[cfg(feature = "NSString")]
416 #[unsafe(method(initWithPronoun:morphology:dependentMorphology:))]
417 #[unsafe(method_family = init)]
418 pub fn initWithPronoun_morphology_dependentMorphology(
419 this: Allocated<Self>,
420 pronoun: &NSString,
421 morphology: &NSMorphology,
422 dependent_morphology: Option<&NSMorphology>,
423 ) -> Retained<Self>;
424
425 #[cfg(feature = "NSString")]
426 #[unsafe(method(pronoun))]
427 #[unsafe(method_family = none)]
428 pub fn pronoun(&self) -> Retained<NSString>;
429
430 #[unsafe(method(morphology))]
431 #[unsafe(method_family = none)]
432 pub fn morphology(&self) -> Retained<NSMorphology>;
433
434 #[unsafe(method(dependentMorphology))]
435 #[unsafe(method_family = none)]
436 pub fn dependentMorphology(&self) -> Option<Retained<NSMorphology>>;
437 );
438}
439
440#[deprecated = "Use NSTermOfAddress instead"]
442impl NSMorphology {
443 extern_methods!(
444 #[cfg(feature = "NSString")]
445 #[deprecated = "Use NSTermOfAddress instead"]
446 #[unsafe(method(customPronounForLanguage:))]
447 #[unsafe(method_family = none)]
448 pub fn customPronounForLanguage(
449 &self,
450 language: &NSString,
451 ) -> Option<Retained<NSMorphologyCustomPronoun>>;
452
453 #[cfg(all(feature = "NSError", feature = "NSString"))]
454 #[deprecated = "Use NSTermOfAddress instead"]
455 #[unsafe(method(setCustomPronoun:forLanguage:error:_))]
456 #[unsafe(method_family = none)]
457 pub fn setCustomPronoun_forLanguage_error(
458 &self,
459 features: Option<&NSMorphologyCustomPronoun>,
460 language: &NSString,
461 ) -> Result<(), Retained<NSError>>;
462 );
463}
464
465extern_class!(
466 #[unsafe(super(NSObject))]
468 #[derive(Debug, PartialEq, Eq, Hash)]
469 #[deprecated = "Use NSTermOfAddress instead"]
470 pub struct NSMorphologyCustomPronoun;
471);
472
473#[cfg(feature = "NSObject")]
474extern_conformance!(
475 unsafe impl NSCoding for NSMorphologyCustomPronoun {}
476);
477
478#[cfg(feature = "NSObject")]
479extern_conformance!(
480 unsafe impl NSCopying for NSMorphologyCustomPronoun {}
481);
482
483#[cfg(feature = "NSObject")]
484unsafe impl CopyingHelper for NSMorphologyCustomPronoun {
485 type Result = Self;
486}
487
488extern_conformance!(
489 unsafe impl NSObjectProtocol for NSMorphologyCustomPronoun {}
490);
491
492#[cfg(feature = "NSObject")]
493extern_conformance!(
494 unsafe impl NSSecureCoding for NSMorphologyCustomPronoun {}
495);
496
497impl NSMorphologyCustomPronoun {
498 extern_methods!(
499 #[cfg(feature = "NSString")]
500 #[deprecated = "Use NSTermOfAddress instead"]
501 #[unsafe(method(isSupportedForLanguage:))]
502 #[unsafe(method_family = none)]
503 pub fn isSupportedForLanguage(language: &NSString) -> bool;
504
505 #[cfg(all(feature = "NSArray", feature = "NSString"))]
506 #[deprecated = "Use NSTermOfAddress instead"]
507 #[unsafe(method(requiredKeysForLanguage:))]
508 #[unsafe(method_family = none)]
509 pub fn requiredKeysForLanguage(language: &NSString) -> Retained<NSArray<NSString>>;
510
511 #[cfg(feature = "NSString")]
512 #[deprecated = "Use NSTermOfAddress instead"]
513 #[unsafe(method(subjectForm))]
514 #[unsafe(method_family = none)]
515 pub fn subjectForm(&self) -> Option<Retained<NSString>>;
516
517 #[cfg(feature = "NSString")]
518 #[deprecated = "Use NSTermOfAddress instead"]
522 #[unsafe(method(setSubjectForm:))]
523 #[unsafe(method_family = none)]
524 pub fn setSubjectForm(&self, subject_form: Option<&NSString>);
525
526 #[cfg(feature = "NSString")]
527 #[deprecated = "Use NSTermOfAddress instead"]
528 #[unsafe(method(objectForm))]
529 #[unsafe(method_family = none)]
530 pub fn objectForm(&self) -> Option<Retained<NSString>>;
531
532 #[cfg(feature = "NSString")]
533 #[deprecated = "Use NSTermOfAddress instead"]
537 #[unsafe(method(setObjectForm:))]
538 #[unsafe(method_family = none)]
539 pub fn setObjectForm(&self, object_form: Option<&NSString>);
540
541 #[cfg(feature = "NSString")]
542 #[deprecated = "Use NSTermOfAddress instead"]
543 #[unsafe(method(possessiveForm))]
544 #[unsafe(method_family = none)]
545 pub fn possessiveForm(&self) -> Option<Retained<NSString>>;
546
547 #[cfg(feature = "NSString")]
548 #[deprecated = "Use NSTermOfAddress instead"]
552 #[unsafe(method(setPossessiveForm:))]
553 #[unsafe(method_family = none)]
554 pub fn setPossessiveForm(&self, possessive_form: Option<&NSString>);
555
556 #[cfg(feature = "NSString")]
557 #[deprecated = "Use NSTermOfAddress instead"]
558 #[unsafe(method(possessiveAdjectiveForm))]
559 #[unsafe(method_family = none)]
560 pub fn possessiveAdjectiveForm(&self) -> Option<Retained<NSString>>;
561
562 #[cfg(feature = "NSString")]
563 #[deprecated = "Use NSTermOfAddress instead"]
567 #[unsafe(method(setPossessiveAdjectiveForm:))]
568 #[unsafe(method_family = none)]
569 pub fn setPossessiveAdjectiveForm(&self, possessive_adjective_form: Option<&NSString>);
570
571 #[cfg(feature = "NSString")]
572 #[deprecated = "Use NSTermOfAddress instead"]
573 #[unsafe(method(reflexiveForm))]
574 #[unsafe(method_family = none)]
575 pub fn reflexiveForm(&self) -> Option<Retained<NSString>>;
576
577 #[cfg(feature = "NSString")]
578 #[deprecated = "Use NSTermOfAddress instead"]
582 #[unsafe(method(setReflexiveForm:))]
583 #[unsafe(method_family = none)]
584 pub fn setReflexiveForm(&self, reflexive_form: Option<&NSString>);
585 );
586}
587
588impl NSMorphologyCustomPronoun {
590 extern_methods!(
591 #[unsafe(method(init))]
592 #[unsafe(method_family = init)]
593 pub fn init(this: Allocated<Self>) -> Retained<Self>;
594
595 #[unsafe(method(new))]
596 #[unsafe(method_family = new)]
597 pub fn new() -> Retained<Self>;
598 );
599}
600
601impl DefaultRetained for NSMorphologyCustomPronoun {
602 #[inline]
603 fn default_retained() -> Retained<Self> {
604 Self::new()
605 }
606}
607
608impl NSMorphology {
610 extern_methods!(
611 #[unsafe(method(isUnspecified))]
612 #[unsafe(method_family = none)]
613 pub fn isUnspecified(&self) -> bool;
614
615 #[unsafe(method(userMorphology))]
616 #[unsafe(method_family = none)]
617 pub fn userMorphology() -> Retained<NSMorphology>;
618 );
619}