objc2_ui_kit/generated/
UITextFormattingViewControllerFormattingDescriptor.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
12pub type UITextFormattingViewControllerTextAlignment = NSString;
17
18extern "C" {
19 pub static UITextFormattingViewControllerTextAlignmentLeft:
21 &'static UITextFormattingViewControllerTextAlignment;
22}
23
24extern "C" {
25 pub static UITextFormattingViewControllerTextAlignmentCenter:
27 &'static UITextFormattingViewControllerTextAlignment;
28}
29
30extern "C" {
31 pub static UITextFormattingViewControllerTextAlignmentRight:
33 &'static UITextFormattingViewControllerTextAlignment;
34}
35
36extern "C" {
37 pub static UITextFormattingViewControllerTextAlignmentJustified:
39 &'static UITextFormattingViewControllerTextAlignment;
40}
41
42extern "C" {
43 pub static UITextFormattingViewControllerTextAlignmentNatural:
45 &'static UITextFormattingViewControllerTextAlignment;
46}
47
48pub type UITextFormattingViewControllerTextList = NSString;
53
54extern "C" {
55 pub static UITextFormattingViewControllerTextListDisc:
57 &'static UITextFormattingViewControllerTextList;
58}
59
60extern "C" {
61 pub static UITextFormattingViewControllerTextListHyphen:
63 &'static UITextFormattingViewControllerTextList;
64}
65
66extern "C" {
67 pub static UITextFormattingViewControllerTextListDecimal:
69 &'static UITextFormattingViewControllerTextList;
70}
71
72extern "C" {
73 pub static UITextFormattingViewControllerTextListOther:
75 &'static UITextFormattingViewControllerTextList;
76}
77
78pub type UITextFormattingViewControllerHighlight = NSString;
83
84extern "C" {
85 pub static UITextFormattingViewControllerHighlightDefault:
87 &'static UITextFormattingViewControllerHighlight;
88}
89
90extern "C" {
91 pub static UITextFormattingViewControllerHighlightPurple:
93 &'static UITextFormattingViewControllerHighlight;
94}
95
96extern "C" {
97 pub static UITextFormattingViewControllerHighlightPink:
99 &'static UITextFormattingViewControllerHighlight;
100}
101
102extern "C" {
103 pub static UITextFormattingViewControllerHighlightOrange:
105 &'static UITextFormattingViewControllerHighlight;
106}
107
108extern "C" {
109 pub static UITextFormattingViewControllerHighlightMint:
111 &'static UITextFormattingViewControllerHighlight;
112}
113
114extern "C" {
115 pub static UITextFormattingViewControllerHighlightBlue:
117 &'static UITextFormattingViewControllerHighlight;
118}
119
120extern_class!(
121 #[unsafe(super(NSObject))]
126 #[derive(Debug, PartialEq, Eq, Hash)]
127 pub struct UITextFormattingViewControllerFormattingDescriptor;
128);
129
130extern_conformance!(
131 unsafe impl NSCoding for UITextFormattingViewControllerFormattingDescriptor {}
132);
133
134extern_conformance!(
135 unsafe impl NSCopying for UITextFormattingViewControllerFormattingDescriptor {}
136);
137
138unsafe impl CopyingHelper for UITextFormattingViewControllerFormattingDescriptor {
139 type Result = Self;
140}
141
142extern_conformance!(
143 unsafe impl NSObjectProtocol for UITextFormattingViewControllerFormattingDescriptor {}
144);
145
146extern_conformance!(
147 unsafe impl NSSecureCoding for UITextFormattingViewControllerFormattingDescriptor {}
148);
149
150impl UITextFormattingViewControllerFormattingDescriptor {
151 extern_methods!(
152 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(initWithString:range:))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn initWithString_range(
164 this: Allocated<Self>,
165 string: &NSAttributedString,
166 range: NSRange,
167 ) -> Retained<Self>;
168
169 #[unsafe(method(initWithAttributes:))]
172 #[unsafe(method_family = init)]
173 pub unsafe fn initWithAttributes(
174 this: Allocated<Self>,
175 attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
176 ) -> Retained<Self>;
177
178 #[cfg(feature = "UIFont")]
179 #[unsafe(method(fonts))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn fonts(&self) -> Option<Retained<NSArray<UIFont>>>;
182
183 #[cfg(feature = "UIFont")]
184 #[unsafe(method(setFonts:))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn setFonts(&self, fonts: Option<&NSArray<UIFont>>);
188
189 #[cfg(feature = "UIColor")]
190 #[unsafe(method(textColors))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn textColors(&self) -> Option<Retained<NSArray<UIColor>>>;
193
194 #[cfg(feature = "UIColor")]
195 #[unsafe(method(setTextColors:))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn setTextColors(&self, text_colors: Option<&NSArray<UIColor>>);
199
200 #[cfg(feature = "objc2-core-foundation")]
201 #[unsafe(method(lineHeight))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn lineHeight(&self) -> CGFloat;
204
205 #[cfg(feature = "objc2-core-foundation")]
206 #[unsafe(method(setLineHeight:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn setLineHeight(&self, line_height: CGFloat);
210
211 #[unsafe(method(underlinePresent))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn underlinePresent(&self) -> bool;
214
215 #[unsafe(method(setUnderlinePresent:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn setUnderlinePresent(&self, underline_present: bool);
219
220 #[unsafe(method(strikethroughPresent))]
221 #[unsafe(method_family = none)]
222 pub unsafe fn strikethroughPresent(&self) -> bool;
223
224 #[unsafe(method(setStrikethroughPresent:))]
226 #[unsafe(method_family = none)]
227 pub unsafe fn setStrikethroughPresent(&self, strikethrough_present: bool);
228
229 #[unsafe(method(textAlignments))]
230 #[unsafe(method_family = none)]
231 pub unsafe fn textAlignments(
232 &self,
233 ) -> Retained<NSSet<UITextFormattingViewControllerTextAlignment>>;
234
235 #[unsafe(method(setTextAlignments:))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn setTextAlignments(
239 &self,
240 text_alignments: &NSSet<UITextFormattingViewControllerTextAlignment>,
241 );
242
243 #[unsafe(method(textLists))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn textLists(&self) -> Retained<NSSet<UITextFormattingViewControllerTextList>>;
246
247 #[unsafe(method(setTextLists:))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn setTextLists(
251 &self,
252 text_lists: &NSSet<UITextFormattingViewControllerTextList>,
253 );
254
255 #[unsafe(method(highlights))]
256 #[unsafe(method_family = none)]
257 pub unsafe fn highlights(&self)
258 -> Retained<NSSet<UITextFormattingViewControllerHighlight>>;
259
260 #[unsafe(method(setHighlights:))]
262 #[unsafe(method_family = none)]
263 pub unsafe fn setHighlights(
264 &self,
265 highlights: &NSSet<UITextFormattingViewControllerHighlight>,
266 );
267
268 #[unsafe(method(formattingStyleKey))]
269 #[unsafe(method_family = none)]
270 pub unsafe fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
271
272 #[unsafe(method(setFormattingStyleKey:))]
274 #[unsafe(method_family = none)]
275 pub unsafe fn setFormattingStyleKey(&self, formatting_style_key: Option<&NSString>);
276 );
277}
278
279impl UITextFormattingViewControllerFormattingDescriptor {
281 extern_methods!(
282 #[unsafe(method(new))]
283 #[unsafe(method_family = new)]
284 pub unsafe fn new() -> Retained<Self>;
285 );
286}