use objc2::__framework_prelude::*;
use crate::*;
#[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);
}
#[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);
}
#[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);
}
#[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);
}
#[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);
}
#[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);
}
#[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);
}
#[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!(
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!(
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!(
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!(
unsafe impl NSMorphology {
#[method(isUnspecified)]
pub unsafe fn isUnspecified(&self) -> bool;
#[method_id(@__retain_semantics Other userMorphology)]
pub unsafe fn userMorphology() -> Retained<NSMorphology>;
}
);