objc2_foundation/generated/
NSPersonNameComponents.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nspersonnamecomponents?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct NSPersonNameComponents;
14);
15
16#[cfg(feature = "NSObject")]
17extern_conformance!(
18    unsafe impl NSCoding for NSPersonNameComponents {}
19);
20
21#[cfg(feature = "NSObject")]
22extern_conformance!(
23    unsafe impl NSCopying for NSPersonNameComponents {}
24);
25
26#[cfg(feature = "NSObject")]
27unsafe impl CopyingHelper for NSPersonNameComponents {
28    type Result = Self;
29}
30
31extern_conformance!(
32    unsafe impl NSObjectProtocol for NSPersonNameComponents {}
33);
34
35#[cfg(feature = "NSObject")]
36extern_conformance!(
37    unsafe impl NSSecureCoding for NSPersonNameComponents {}
38);
39
40impl NSPersonNameComponents {
41    extern_methods!(
42        #[cfg(feature = "NSString")]
43        #[unsafe(method(namePrefix))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn namePrefix(&self) -> Option<Retained<NSString>>;
46
47        #[cfg(feature = "NSString")]
48        /// Setter for [`namePrefix`][Self::namePrefix].
49        #[unsafe(method(setNamePrefix:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn setNamePrefix(&self, name_prefix: Option<&NSString>);
52
53        #[cfg(feature = "NSString")]
54        #[unsafe(method(givenName))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn givenName(&self) -> Option<Retained<NSString>>;
57
58        #[cfg(feature = "NSString")]
59        /// Setter for [`givenName`][Self::givenName].
60        #[unsafe(method(setGivenName:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn setGivenName(&self, given_name: Option<&NSString>);
63
64        #[cfg(feature = "NSString")]
65        #[unsafe(method(middleName))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn middleName(&self) -> Option<Retained<NSString>>;
68
69        #[cfg(feature = "NSString")]
70        /// Setter for [`middleName`][Self::middleName].
71        #[unsafe(method(setMiddleName:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setMiddleName(&self, middle_name: Option<&NSString>);
74
75        #[cfg(feature = "NSString")]
76        #[unsafe(method(familyName))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn familyName(&self) -> Option<Retained<NSString>>;
79
80        #[cfg(feature = "NSString")]
81        /// Setter for [`familyName`][Self::familyName].
82        #[unsafe(method(setFamilyName:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setFamilyName(&self, family_name: Option<&NSString>);
85
86        #[cfg(feature = "NSString")]
87        #[unsafe(method(nameSuffix))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn nameSuffix(&self) -> Option<Retained<NSString>>;
90
91        #[cfg(feature = "NSString")]
92        /// Setter for [`nameSuffix`][Self::nameSuffix].
93        #[unsafe(method(setNameSuffix:))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn setNameSuffix(&self, name_suffix: Option<&NSString>);
96
97        #[cfg(feature = "NSString")]
98        #[unsafe(method(nickname))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn nickname(&self) -> Option<Retained<NSString>>;
101
102        #[cfg(feature = "NSString")]
103        /// Setter for [`nickname`][Self::nickname].
104        #[unsafe(method(setNickname:))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn setNickname(&self, nickname: Option<&NSString>);
107
108        #[unsafe(method(phoneticRepresentation))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn phoneticRepresentation(&self) -> Option<Retained<NSPersonNameComponents>>;
111
112        /// Setter for [`phoneticRepresentation`][Self::phoneticRepresentation].
113        #[unsafe(method(setPhoneticRepresentation:))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn setPhoneticRepresentation(
116            &self,
117            phonetic_representation: Option<&NSPersonNameComponents>,
118        );
119    );
120}
121
122/// Methods declared on superclass `NSObject`.
123impl NSPersonNameComponents {
124    extern_methods!(
125        #[unsafe(method(init))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128
129        #[unsafe(method(new))]
130        #[unsafe(method_family = new)]
131        pub unsafe fn new() -> Retained<Self>;
132    );
133}