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 fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(initWithString:range:))]
162 #[unsafe(method_family = init)]
163 pub fn initWithString_range(
164 this: Allocated<Self>,
165 string: &NSAttributedString,
166 range: NSRange,
167 ) -> Retained<Self>;
168
169 #[unsafe(method(initWithAttributes:))]
176 #[unsafe(method_family = init)]
177 pub unsafe fn initWithAttributes(
178 this: Allocated<Self>,
179 attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
180 ) -> Retained<Self>;
181
182 #[cfg(feature = "UIFont")]
183 #[unsafe(method(fonts))]
184 #[unsafe(method_family = none)]
185 pub fn fonts(&self) -> Option<Retained<NSArray<UIFont>>>;
186
187 #[cfg(feature = "UIFont")]
188 #[unsafe(method(setFonts:))]
192 #[unsafe(method_family = none)]
193 pub fn setFonts(&self, fonts: Option<&NSArray<UIFont>>);
194
195 #[cfg(feature = "UIColor")]
196 #[unsafe(method(textColors))]
197 #[unsafe(method_family = none)]
198 pub fn textColors(&self) -> Option<Retained<NSArray<UIColor>>>;
199
200 #[cfg(feature = "UIColor")]
201 #[unsafe(method(setTextColors:))]
205 #[unsafe(method_family = none)]
206 pub fn setTextColors(&self, text_colors: Option<&NSArray<UIColor>>);
207
208 #[cfg(feature = "objc2-core-foundation")]
209 #[unsafe(method(lineHeight))]
210 #[unsafe(method_family = none)]
211 pub fn lineHeight(&self) -> CGFloat;
212
213 #[cfg(feature = "objc2-core-foundation")]
214 #[unsafe(method(setLineHeight:))]
216 #[unsafe(method_family = none)]
217 pub fn setLineHeight(&self, line_height: CGFloat);
218
219 #[unsafe(method(underlinePresent))]
220 #[unsafe(method_family = none)]
221 pub fn underlinePresent(&self) -> bool;
222
223 #[unsafe(method(setUnderlinePresent:))]
225 #[unsafe(method_family = none)]
226 pub fn setUnderlinePresent(&self, underline_present: bool);
227
228 #[unsafe(method(strikethroughPresent))]
229 #[unsafe(method_family = none)]
230 pub fn strikethroughPresent(&self) -> bool;
231
232 #[unsafe(method(setStrikethroughPresent:))]
234 #[unsafe(method_family = none)]
235 pub fn setStrikethroughPresent(&self, strikethrough_present: bool);
236
237 #[unsafe(method(textAlignments))]
238 #[unsafe(method_family = none)]
239 pub fn textAlignments(
240 &self,
241 ) -> Retained<NSSet<UITextFormattingViewControllerTextAlignment>>;
242
243 #[unsafe(method(setTextAlignments:))]
247 #[unsafe(method_family = none)]
248 pub fn setTextAlignments(
249 &self,
250 text_alignments: &NSSet<UITextFormattingViewControllerTextAlignment>,
251 );
252
253 #[unsafe(method(textLists))]
254 #[unsafe(method_family = none)]
255 pub fn textLists(&self) -> Retained<NSSet<UITextFormattingViewControllerTextList>>;
256
257 #[unsafe(method(setTextLists:))]
261 #[unsafe(method_family = none)]
262 pub fn setTextLists(&self, text_lists: &NSSet<UITextFormattingViewControllerTextList>);
263
264 #[unsafe(method(highlights))]
265 #[unsafe(method_family = none)]
266 pub fn highlights(&self) -> Retained<NSSet<UITextFormattingViewControllerHighlight>>;
267
268 #[unsafe(method(setHighlights:))]
272 #[unsafe(method_family = none)]
273 pub fn setHighlights(&self, highlights: &NSSet<UITextFormattingViewControllerHighlight>);
274
275 #[unsafe(method(formattingStyleKey))]
276 #[unsafe(method_family = none)]
277 pub fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
278
279 #[unsafe(method(setFormattingStyleKey:))]
283 #[unsafe(method_family = none)]
284 pub fn setFormattingStyleKey(&self, formatting_style_key: Option<&NSString>);
285 );
286}
287
288impl UITextFormattingViewControllerFormattingDescriptor {
290 extern_methods!(
291 #[unsafe(method(new))]
292 #[unsafe(method_family = new)]
293 pub fn new() -> Retained<Self>;
294 );
295}
296
297impl DefaultRetained for UITextFormattingViewControllerFormattingDescriptor {
298 #[inline]
299 fn default_retained() -> Retained<Self> {
300 Self::new()
301 }
302}