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
//! 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 UIListContentTextAlignment(pub NSInteger);
impl UIListContentTextAlignment {
    #[doc(alias = "UIListContentTextAlignmentNatural")]
    pub const Natural: Self = Self(0);
    #[doc(alias = "UIListContentTextAlignmentCenter")]
    pub const Center: Self = Self(1);
    #[doc(alias = "UIListContentTextAlignmentJustified")]
    pub const Justified: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIListContentTextTransform(pub NSInteger);
impl UIListContentTextTransform {
    #[doc(alias = "UIListContentTextTransformNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "UIListContentTextTransformUppercase")]
    pub const Uppercase: Self = Self(1);
    #[doc(alias = "UIListContentTextTransformLowercase")]
    pub const Lowercase: Self = Self(2);
    #[doc(alias = "UIListContentTextTransformCapitalized")]
    pub const Capitalized: Self = Self(3);
}

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

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

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

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

unsafe impl NSCoding for UIListContentTextProperties {}

unsafe impl NSCopying for UIListContentTextProperties {}

unsafe impl NSObjectProtocol for UIListContentTextProperties {}

unsafe impl NSSecureCoding for UIListContentTextProperties {}

extern_methods!(
    unsafe impl UIListContentTextProperties {
        #[cfg(feature = "UIFont")]
        #[method_id(@__retain_semantics Other font)]
        pub unsafe fn font(&self) -> Retained<UIFont>;

        #[cfg(feature = "UIFont")]
        #[method(setFont:)]
        pub unsafe fn setFont(&self, font: &UIFont);

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

        #[cfg(feature = "UIColor")]
        #[method(setColor:)]
        pub unsafe fn setColor(&self, color: &UIColor);

        #[cfg(all(
            feature = "UIColor",
            feature = "UIConfigurationColorTransformer",
            feature = "block2"
        ))]
        #[method(colorTransformer)]
        pub unsafe fn colorTransformer(&self) -> UIConfigurationColorTransformer;

        #[cfg(all(
            feature = "UIColor",
            feature = "UIConfigurationColorTransformer",
            feature = "block2"
        ))]
        #[method(setColorTransformer:)]
        pub unsafe fn setColorTransformer(
            &self,
            color_transformer: UIConfigurationColorTransformer,
        );

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

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

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

        #[cfg(feature = "NSParagraphStyle")]
        #[method(lineBreakMode)]
        pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode;

        #[cfg(feature = "NSParagraphStyle")]
        #[method(setLineBreakMode:)]
        pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);

        #[method(numberOfLines)]
        pub unsafe fn numberOfLines(&self) -> NSInteger;

        #[method(setNumberOfLines:)]
        pub unsafe fn setNumberOfLines(&self, number_of_lines: NSInteger);

        #[method(adjustsFontSizeToFitWidth)]
        pub unsafe fn adjustsFontSizeToFitWidth(&self) -> bool;

        #[method(setAdjustsFontSizeToFitWidth:)]
        pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);

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

        #[method(setMinimumScaleFactor:)]
        pub unsafe fn setMinimumScaleFactor(&self, minimum_scale_factor: CGFloat);

        #[method(allowsDefaultTighteningForTruncation)]
        pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool;

        #[method(setAllowsDefaultTighteningForTruncation:)]
        pub unsafe fn setAllowsDefaultTighteningForTruncation(
            &self,
            allows_default_tightening_for_truncation: bool,
        );

        #[method(adjustsFontForContentSizeCategory)]
        pub unsafe fn adjustsFontForContentSizeCategory(&self) -> bool;

        #[method(setAdjustsFontForContentSizeCategory:)]
        pub unsafe fn setAdjustsFontForContentSizeCategory(
            &self,
            adjusts_font_for_content_size_category: bool,
        );

        #[method(showsExpansionTextWhenTruncated)]
        pub unsafe fn showsExpansionTextWhenTruncated(&self) -> bool;

        #[method(setShowsExpansionTextWhenTruncated:)]
        pub unsafe fn setShowsExpansionTextWhenTruncated(
            &self,
            shows_expansion_text_when_truncated: bool,
        );

        #[method(transform)]
        pub unsafe fn transform(&self) -> UIListContentTextTransform;

        #[method(setTransform:)]
        pub unsafe fn setTransform(&self, transform: UIListContentTextTransform);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UIListContentTextProperties {
        #[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(mtm: MainThreadMarker) -> Retained<Self>;
    }
);