objc2_foundation/generated/
NSTermOfAddress.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nstermofaddress?language=objc)
10    #[unsafe(super(NSObject))]
11    #[derive(Debug, PartialEq, Eq, Hash)]
12    pub struct NSTermOfAddress;
13);
14
15#[cfg(feature = "NSObject")]
16extern_conformance!(
17    unsafe impl NSCoding for NSTermOfAddress {}
18);
19
20#[cfg(feature = "NSObject")]
21extern_conformance!(
22    unsafe impl NSCopying for NSTermOfAddress {}
23);
24
25#[cfg(feature = "NSObject")]
26unsafe impl CopyingHelper for NSTermOfAddress {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for NSTermOfAddress {}
32);
33
34#[cfg(feature = "NSObject")]
35extern_conformance!(
36    unsafe impl NSSecureCoding for NSTermOfAddress {}
37);
38
39impl NSTermOfAddress {
40    extern_methods!(
41        /// Term of address that uses gender-neutral pronouns (e.g. they/them/theirs in
42        /// English), and an epicene grammatical gender when inflecting verbs and
43        /// adjectives referring to the person
44        #[unsafe(method(neutral))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn neutral() -> Retained<Self>;
47
48        /// Term of address that uses feminine pronouns (e.g. she/her/hers in English),
49        /// and a feminine grammatical gender when inflecting verbs and adjectives
50        /// referring to the person
51        #[unsafe(method(feminine))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn feminine() -> Retained<Self>;
54
55        /// Term of address that uses masculine pronouns (e.g. he/him/his in English),
56        /// and a masculine grammatical gender when inflecting verbs and adjectives
57        /// referring to the person
58        #[unsafe(method(masculine))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn masculine() -> Retained<Self>;
61
62        /// The term of address that should be used for addressing the user
63        ///
64        /// This term of address will only compare equal to another `+[NSTermOfAddress currentUser]`
65        #[unsafe(method(currentUser))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn currentUser() -> Retained<Self>;
68
69        #[cfg(all(feature = "NSArray", feature = "NSMorphology", feature = "NSString"))]
70        /// A term of address restricted to a given language
71        ///
72        /// Parameter `language`: ISO language code identifier for the language
73        ///
74        /// Parameter `pronouns`: A list of pronouns in the target language that can be used to
75        /// refer to the person.
76        #[unsafe(method(localizedForLanguageIdentifier:withPronouns:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn localizedForLanguageIdentifier_withPronouns(
79            language: &NSString,
80            pronouns: &NSArray<NSMorphologyPronoun>,
81        ) -> Retained<Self>;
82
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86
87        #[unsafe(method(init))]
88        #[unsafe(method_family = init)]
89        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91        #[cfg(feature = "NSString")]
92        /// The ISO language code if this is a localized term of address
93        #[unsafe(method(languageIdentifier))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn languageIdentifier(&self) -> Option<Retained<NSString>>;
96
97        #[cfg(all(feature = "NSArray", feature = "NSMorphology"))]
98        /// A list of pronouns for a localized term of address
99        #[unsafe(method(pronouns))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn pronouns(&self) -> Option<Retained<NSArray<NSMorphologyPronoun>>>;
102    );
103}