objc2_ui_kit/generated/
UIListContentTextProperties.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UIListContentTextAlignment(pub NSInteger);
17impl UIListContentTextAlignment {
18 #[doc(alias = "UIListContentTextAlignmentNatural")]
19 pub const Natural: Self = Self(0);
20 #[doc(alias = "UIListContentTextAlignmentCenter")]
21 pub const Center: Self = Self(1);
22 #[doc(alias = "UIListContentTextAlignmentJustified")]
23 pub const Justified: Self = Self(2);
24}
25
26unsafe impl Encode for UIListContentTextAlignment {
27 const ENCODING: Encoding = NSInteger::ENCODING;
28}
29
30unsafe impl RefEncode for UIListContentTextAlignment {
31 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34#[repr(transparent)]
37#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
38pub struct UIListContentTextTransform(pub NSInteger);
39impl UIListContentTextTransform {
40 #[doc(alias = "UIListContentTextTransformNone")]
41 pub const None: Self = Self(0);
42 #[doc(alias = "UIListContentTextTransformUppercase")]
43 pub const Uppercase: Self = Self(1);
44 #[doc(alias = "UIListContentTextTransformLowercase")]
45 pub const Lowercase: Self = Self(2);
46 #[doc(alias = "UIListContentTextTransformCapitalized")]
47 pub const Capitalized: Self = Self(3);
48}
49
50unsafe impl Encode for UIListContentTextTransform {
51 const ENCODING: Encoding = NSInteger::ENCODING;
52}
53
54unsafe impl RefEncode for UIListContentTextTransform {
55 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
56}
57
58extern_class!(
59 #[unsafe(super(NSObject))]
61 #[thread_kind = MainThreadOnly]
62 #[derive(Debug, PartialEq, Eq, Hash)]
63 pub struct UIListContentTextProperties;
64);
65
66extern_conformance!(
67 unsafe impl NSCoding for UIListContentTextProperties {}
68);
69
70extern_conformance!(
71 unsafe impl NSCopying for UIListContentTextProperties {}
72);
73
74unsafe impl CopyingHelper for UIListContentTextProperties {
75 type Result = Self;
76}
77
78extern_conformance!(
79 unsafe impl NSObjectProtocol for UIListContentTextProperties {}
80);
81
82extern_conformance!(
83 unsafe impl NSSecureCoding for UIListContentTextProperties {}
84);
85
86impl UIListContentTextProperties {
87 extern_methods!(
88 #[cfg(feature = "UIFont")]
89 #[unsafe(method(font))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn font(&self) -> Retained<UIFont>;
93
94 #[cfg(feature = "UIFont")]
95 #[unsafe(method(setFont:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn setFont(&self, font: &UIFont);
99
100 #[cfg(feature = "UIColor")]
101 #[unsafe(method(color))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn color(&self) -> Retained<UIColor>;
105
106 #[cfg(feature = "UIColor")]
107 #[unsafe(method(setColor:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn setColor(&self, color: &UIColor);
111
112 #[cfg(all(
113 feature = "UIColor",
114 feature = "UIConfigurationColorTransformer",
115 feature = "block2"
116 ))]
117 #[unsafe(method(colorTransformer))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn colorTransformer(&self) -> UIConfigurationColorTransformer;
121
122 #[cfg(all(
123 feature = "UIColor",
124 feature = "UIConfigurationColorTransformer",
125 feature = "block2"
126 ))]
127 #[unsafe(method(setColorTransformer:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setColorTransformer(
131 &self,
132 color_transformer: UIConfigurationColorTransformer,
133 );
134
135 #[cfg(feature = "UIColor")]
136 #[unsafe(method(resolvedColor))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn resolvedColor(&self) -> Retained<UIColor>;
140
141 #[unsafe(method(alignment))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn alignment(&self) -> UIListContentTextAlignment;
145
146 #[unsafe(method(setAlignment:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setAlignment(&self, alignment: UIListContentTextAlignment);
150
151 #[cfg(feature = "NSParagraphStyle")]
152 #[unsafe(method(lineBreakMode))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode;
156
157 #[cfg(feature = "NSParagraphStyle")]
158 #[unsafe(method(setLineBreakMode:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
162
163 #[unsafe(method(numberOfLines))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn numberOfLines(&self) -> NSInteger;
167
168 #[unsafe(method(setNumberOfLines:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setNumberOfLines(&self, number_of_lines: NSInteger);
172
173 #[unsafe(method(adjustsFontSizeToFitWidth))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn adjustsFontSizeToFitWidth(&self) -> bool;
177
178 #[unsafe(method(setAdjustsFontSizeToFitWidth:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);
182
183 #[cfg(feature = "objc2-core-foundation")]
184 #[unsafe(method(minimumScaleFactor))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn minimumScaleFactor(&self) -> CGFloat;
188
189 #[cfg(feature = "objc2-core-foundation")]
190 #[unsafe(method(setMinimumScaleFactor:))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn setMinimumScaleFactor(&self, minimum_scale_factor: CGFloat);
194
195 #[unsafe(method(allowsDefaultTighteningForTruncation))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool;
199
200 #[unsafe(method(setAllowsDefaultTighteningForTruncation:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn setAllowsDefaultTighteningForTruncation(
204 &self,
205 allows_default_tightening_for_truncation: bool,
206 );
207
208 #[unsafe(method(adjustsFontForContentSizeCategory))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn adjustsFontForContentSizeCategory(&self) -> bool;
212
213 #[unsafe(method(setAdjustsFontForContentSizeCategory:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn setAdjustsFontForContentSizeCategory(
217 &self,
218 adjusts_font_for_content_size_category: bool,
219 );
220
221 #[unsafe(method(showsExpansionTextWhenTruncated))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn showsExpansionTextWhenTruncated(&self) -> bool;
225
226 #[unsafe(method(setShowsExpansionTextWhenTruncated:))]
228 #[unsafe(method_family = none)]
229 pub unsafe fn setShowsExpansionTextWhenTruncated(
230 &self,
231 shows_expansion_text_when_truncated: bool,
232 );
233
234 #[unsafe(method(transform))]
236 #[unsafe(method_family = none)]
237 pub unsafe fn transform(&self) -> UIListContentTextTransform;
238
239 #[unsafe(method(setTransform:))]
241 #[unsafe(method_family = none)]
242 pub unsafe fn setTransform(&self, transform: UIListContentTextTransform);
243 );
244}
245
246impl UIListContentTextProperties {
248 extern_methods!(
249 #[unsafe(method(init))]
250 #[unsafe(method_family = init)]
251 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
252
253 #[unsafe(method(new))]
254 #[unsafe(method_family = new)]
255 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
256 );
257}