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

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIContentUnavailableAlignment(pub NSInteger);
impl UIContentUnavailableAlignment {
    #[doc(alias = "UIContentUnavailableAlignmentCenter")]
    pub const Center: Self = Self(0);
    #[doc(alias = "UIContentUnavailableAlignmentNatural")]
    pub const Natural: Self = Self(1);
}

unsafe impl Encode for UIContentUnavailableAlignment {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIContentUnavailableAlignment {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

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

    unsafe impl ClassType for UIContentUnavailableConfiguration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCoding for UIContentUnavailableConfiguration {}

unsafe impl NSCopying for UIContentUnavailableConfiguration {}

unsafe impl NSObjectProtocol for UIContentUnavailableConfiguration {}

unsafe impl NSSecureCoding for UIContentUnavailableConfiguration {}

#[cfg(feature = "UIContentConfiguration")]
unsafe impl UIContentConfiguration for UIContentUnavailableConfiguration {}

extern_methods!(
    unsafe impl UIContentUnavailableConfiguration {
        #[method_id(@__retain_semantics Other emptyConfiguration)]
        pub unsafe fn emptyConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other loadingConfiguration)]
        pub unsafe fn loadingConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other searchConfiguration)]
        pub unsafe fn searchConfiguration(mtm: MainThreadMarker) -> Retained<Self>;

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

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

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

        #[cfg(feature = "UIImage")]
        #[method(setImage:)]
        pub unsafe fn setImage(&self, image: Option<&UIImage>);

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

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

        #[method(setText:)]
        pub unsafe fn setText(&self, text: Option<&NSString>);

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

        #[method(setAttributedText:)]
        pub unsafe fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);

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

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

        #[method(setSecondaryText:)]
        pub unsafe fn setSecondaryText(&self, secondary_text: Option<&NSString>);

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

        #[method(setSecondaryAttributedText:)]
        pub unsafe fn setSecondaryAttributedText(
            &self,
            secondary_attributed_text: Option<&NSAttributedString>,
        );

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

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

        #[cfg(feature = "UIButtonConfiguration")]
        #[method(setButton:)]
        pub unsafe fn setButton(&self, button: &UIButtonConfiguration);

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

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

        #[cfg(feature = "UIButtonConfiguration")]
        #[method(setSecondaryButton:)]
        pub unsafe fn setSecondaryButton(&self, secondary_button: &UIButtonConfiguration);

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

        #[method(alignment)]
        pub unsafe fn alignment(&self) -> UIContentUnavailableAlignment;

        #[method(setAlignment:)]
        pub unsafe fn setAlignment(&self, alignment: UIContentUnavailableAlignment);

        #[cfg(feature = "UIGeometry")]
        #[method(axesPreservingSuperviewLayoutMargins)]
        pub unsafe fn axesPreservingSuperviewLayoutMargins(&self) -> UIAxis;

        #[cfg(feature = "UIGeometry")]
        #[method(setAxesPreservingSuperviewLayoutMargins:)]
        pub unsafe fn setAxesPreservingSuperviewLayoutMargins(
            &self,
            axes_preserving_superview_layout_margins: UIAxis,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(directionalLayoutMargins)]
        pub unsafe fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setDirectionalLayoutMargins:)]
        pub unsafe fn setDirectionalLayoutMargins(
            &self,
            directional_layout_margins: NSDirectionalEdgeInsets,
        );

        #[method(imageToTextPadding)]
        pub unsafe fn imageToTextPadding(&self) -> CGFloat;

        #[method(setImageToTextPadding:)]
        pub unsafe fn setImageToTextPadding(&self, image_to_text_padding: CGFloat);

        #[method(textToSecondaryTextPadding)]
        pub unsafe fn textToSecondaryTextPadding(&self) -> CGFloat;

        #[method(setTextToSecondaryTextPadding:)]
        pub unsafe fn setTextToSecondaryTextPadding(&self, text_to_secondary_text_padding: CGFloat);

        #[method(textToButtonPadding)]
        pub unsafe fn textToButtonPadding(&self) -> CGFloat;

        #[method(setTextToButtonPadding:)]
        pub unsafe fn setTextToButtonPadding(&self, text_to_button_padding: CGFloat);

        #[method(buttonToSecondaryButtonPadding)]
        pub unsafe fn buttonToSecondaryButtonPadding(&self) -> CGFloat;

        #[method(setButtonToSecondaryButtonPadding:)]
        pub unsafe fn setButtonToSecondaryButtonPadding(
            &self,
            button_to_secondary_button_padding: CGFloat,
        );

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

        #[cfg(feature = "UIBackgroundConfiguration")]
        #[method(setBackground:)]
        pub unsafe fn setBackground(&self, background: &UIBackgroundConfiguration);
    }
);