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
66unsafe impl NSCoding for UIListContentTextProperties {}
67
68unsafe impl NSCopying for UIListContentTextProperties {}
69
70unsafe impl CopyingHelper for UIListContentTextProperties {
71 type Result = Self;
72}
73
74unsafe impl NSObjectProtocol for UIListContentTextProperties {}
75
76unsafe impl NSSecureCoding for UIListContentTextProperties {}
77
78impl UIListContentTextProperties {
79 extern_methods!(
80 #[cfg(feature = "UIFont")]
81 #[unsafe(method(font))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn font(&self) -> Retained<UIFont>;
85
86 #[cfg(feature = "UIFont")]
87 #[unsafe(method(setFont:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setFont(&self, font: &UIFont);
91
92 #[cfg(feature = "UIColor")]
93 #[unsafe(method(color))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn color(&self) -> Retained<UIColor>;
97
98 #[cfg(feature = "UIColor")]
99 #[unsafe(method(setColor:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setColor(&self, color: &UIColor);
103
104 #[cfg(all(
105 feature = "UIColor",
106 feature = "UIConfigurationColorTransformer",
107 feature = "block2"
108 ))]
109 #[unsafe(method(colorTransformer))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn colorTransformer(&self) -> UIConfigurationColorTransformer;
113
114 #[cfg(all(
115 feature = "UIColor",
116 feature = "UIConfigurationColorTransformer",
117 feature = "block2"
118 ))]
119 #[unsafe(method(setColorTransformer:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setColorTransformer(
123 &self,
124 color_transformer: UIConfigurationColorTransformer,
125 );
126
127 #[cfg(feature = "UIColor")]
128 #[unsafe(method(resolvedColor))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn resolvedColor(&self) -> Retained<UIColor>;
132
133 #[unsafe(method(alignment))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn alignment(&self) -> UIListContentTextAlignment;
137
138 #[unsafe(method(setAlignment:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setAlignment(&self, alignment: UIListContentTextAlignment);
142
143 #[cfg(feature = "NSParagraphStyle")]
144 #[unsafe(method(lineBreakMode))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode;
148
149 #[cfg(feature = "NSParagraphStyle")]
150 #[unsafe(method(setLineBreakMode:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
154
155 #[unsafe(method(numberOfLines))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn numberOfLines(&self) -> NSInteger;
159
160 #[unsafe(method(setNumberOfLines:))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn setNumberOfLines(&self, number_of_lines: NSInteger);
164
165 #[unsafe(method(adjustsFontSizeToFitWidth))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn adjustsFontSizeToFitWidth(&self) -> bool;
169
170 #[unsafe(method(setAdjustsFontSizeToFitWidth:))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn setAdjustsFontSizeToFitWidth(&self, adjusts_font_size_to_fit_width: bool);
174
175 #[cfg(feature = "objc2-core-foundation")]
176 #[unsafe(method(minimumScaleFactor))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn minimumScaleFactor(&self) -> CGFloat;
180
181 #[cfg(feature = "objc2-core-foundation")]
182 #[unsafe(method(setMinimumScaleFactor:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn setMinimumScaleFactor(&self, minimum_scale_factor: CGFloat);
186
187 #[unsafe(method(allowsDefaultTighteningForTruncation))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool;
191
192 #[unsafe(method(setAllowsDefaultTighteningForTruncation:))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn setAllowsDefaultTighteningForTruncation(
196 &self,
197 allows_default_tightening_for_truncation: bool,
198 );
199
200 #[unsafe(method(adjustsFontForContentSizeCategory))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn adjustsFontForContentSizeCategory(&self) -> bool;
204
205 #[unsafe(method(setAdjustsFontForContentSizeCategory:))]
207 #[unsafe(method_family = none)]
208 pub unsafe fn setAdjustsFontForContentSizeCategory(
209 &self,
210 adjusts_font_for_content_size_category: bool,
211 );
212
213 #[unsafe(method(showsExpansionTextWhenTruncated))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn showsExpansionTextWhenTruncated(&self) -> bool;
217
218 #[unsafe(method(setShowsExpansionTextWhenTruncated:))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn setShowsExpansionTextWhenTruncated(
222 &self,
223 shows_expansion_text_when_truncated: bool,
224 );
225
226 #[unsafe(method(transform))]
228 #[unsafe(method_family = none)]
229 pub unsafe fn transform(&self) -> UIListContentTextTransform;
230
231 #[unsafe(method(setTransform:))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn setTransform(&self, transform: UIListContentTextTransform);
235 );
236}
237
238impl UIListContentTextProperties {
240 extern_methods!(
241 #[unsafe(method(init))]
242 #[unsafe(method_family = init)]
243 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
244
245 #[unsafe(method(new))]
246 #[unsafe(method_family = new)]
247 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
248 );
249}