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 fn font(&self) -> Retained<UIFont>;
93
94 #[cfg(feature = "UIFont")]
95 #[unsafe(method(setFont:))]
97 #[unsafe(method_family = none)]
98 pub fn setFont(&self, font: &UIFont);
99
100 #[cfg(feature = "UIColor")]
101 #[unsafe(method(color))]
103 #[unsafe(method_family = none)]
104 pub fn color(&self) -> Retained<UIColor>;
105
106 #[cfg(feature = "UIColor")]
107 #[unsafe(method(setColor:))]
109 #[unsafe(method_family = none)]
110 pub fn setColor(&self, color: &UIColor);
111
112 #[cfg(all(
113 feature = "UIColor",
114 feature = "UIConfigurationColorTransformer",
115 feature = "block2"
116 ))]
117 #[unsafe(method(colorTransformer))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn colorTransformer(&self) -> UIConfigurationColorTransformer;
125
126 #[cfg(all(
127 feature = "UIColor",
128 feature = "UIConfigurationColorTransformer",
129 feature = "block2"
130 ))]
131 #[unsafe(method(setColorTransformer:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn setColorTransformer(
141 &self,
142 color_transformer: UIConfigurationColorTransformer,
143 );
144
145 #[cfg(feature = "UIColor")]
146 #[unsafe(method(resolvedColor))]
148 #[unsafe(method_family = none)]
149 pub fn resolvedColor(&self) -> Retained<UIColor>;
150
151 #[unsafe(method(alignment))]
153 #[unsafe(method_family = none)]
154 pub fn alignment(&self) -> UIListContentTextAlignment;
155
156 #[unsafe(method(setAlignment:))]
158 #[unsafe(method_family = none)]
159 pub fn setAlignment(&self, alignment: UIListContentTextAlignment);
160
161 #[cfg(feature = "NSParagraphStyle")]
162 #[unsafe(method(lineBreakMode))]
164 #[unsafe(method_family = none)]
165 pub fn lineBreakMode(&self) -> NSLineBreakMode;
166
167 #[cfg(feature = "NSParagraphStyle")]
168 #[unsafe(method(setLineBreakMode:))]
170 #[unsafe(method_family = none)]
171 pub fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
172
173 #[unsafe(method(numberOfLines))]
175 #[unsafe(method_family = none)]
176 pub fn numberOfLines(&self) -> NSInteger;
177
178 #[unsafe(method(setNumberOfLines:))]
180 #[unsafe(method_family = none)]
181 pub fn setNumberOfLines(&self, number_of_lines: NSInteger);
182
183 #[unsafe(method(adjustsFontSizeToFitWidth))]
185 #[unsafe(method_family = none)]
186 pub fn adjustsFontSizeToFitWidth(&self) -> bool;
187
188 #[unsafe(method(setAdjustsFontSizeToFitWidth:))]
190 #[unsafe(method_family = none)]
191 pub fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);
192
193 #[cfg(feature = "objc2-core-foundation")]
194 #[unsafe(method(minimumScaleFactor))]
196 #[unsafe(method_family = none)]
197 pub fn minimumScaleFactor(&self) -> CGFloat;
198
199 #[cfg(feature = "objc2-core-foundation")]
200 #[unsafe(method(setMinimumScaleFactor:))]
202 #[unsafe(method_family = none)]
203 pub fn setMinimumScaleFactor(&self, minimum_scale_factor: CGFloat);
204
205 #[unsafe(method(allowsDefaultTighteningForTruncation))]
207 #[unsafe(method_family = none)]
208 pub fn allowsDefaultTighteningForTruncation(&self) -> bool;
209
210 #[unsafe(method(setAllowsDefaultTighteningForTruncation:))]
212 #[unsafe(method_family = none)]
213 pub fn setAllowsDefaultTighteningForTruncation(
214 &self,
215 allows_default_tightening_for_truncation: bool,
216 );
217
218 #[unsafe(method(adjustsFontForContentSizeCategory))]
220 #[unsafe(method_family = none)]
221 pub fn adjustsFontForContentSizeCategory(&self) -> bool;
222
223 #[unsafe(method(setAdjustsFontForContentSizeCategory:))]
225 #[unsafe(method_family = none)]
226 pub fn setAdjustsFontForContentSizeCategory(
227 &self,
228 adjusts_font_for_content_size_category: bool,
229 );
230
231 #[unsafe(method(showsExpansionTextWhenTruncated))]
233 #[unsafe(method_family = none)]
234 pub fn showsExpansionTextWhenTruncated(&self) -> bool;
235
236 #[unsafe(method(setShowsExpansionTextWhenTruncated:))]
238 #[unsafe(method_family = none)]
239 pub fn setShowsExpansionTextWhenTruncated(&self, shows_expansion_text_when_truncated: bool);
240
241 #[unsafe(method(transform))]
243 #[unsafe(method_family = none)]
244 pub fn transform(&self) -> UIListContentTextTransform;
245
246 #[unsafe(method(setTransform:))]
248 #[unsafe(method_family = none)]
249 pub fn setTransform(&self, transform: UIListContentTextTransform);
250 );
251}
252
253impl UIListContentTextProperties {
255 extern_methods!(
256 #[unsafe(method(init))]
257 #[unsafe(method_family = init)]
258 pub fn init(this: Allocated<Self>) -> Retained<Self>;
259
260 #[unsafe(method(new))]
261 #[unsafe(method_family = new)]
262 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
263 );
264}