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
130unsafe impl NSCoding for UITextFormattingViewControllerFormattingDescriptor {}
131
132unsafe impl NSCopying for UITextFormattingViewControllerFormattingDescriptor {}
133
134unsafe impl CopyingHelper for UITextFormattingViewControllerFormattingDescriptor {
135 type Result = Self;
136}
137
138unsafe impl NSObjectProtocol for UITextFormattingViewControllerFormattingDescriptor {}
139
140unsafe impl NSSecureCoding for UITextFormattingViewControllerFormattingDescriptor {}
141
142impl UITextFormattingViewControllerFormattingDescriptor {
143 extern_methods!(
144 #[unsafe(method(init))]
146 #[unsafe(method_family = init)]
147 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
148
149 #[unsafe(method(initWithString:range:))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn initWithString_range(
156 this: Allocated<Self>,
157 string: &NSAttributedString,
158 range: NSRange,
159 ) -> Retained<Self>;
160
161 #[unsafe(method(initWithAttributes:))]
164 #[unsafe(method_family = init)]
165 pub unsafe fn initWithAttributes(
166 this: Allocated<Self>,
167 attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
168 ) -> Retained<Self>;
169
170 #[cfg(feature = "UIFont")]
171 #[unsafe(method(fonts))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn fonts(&self) -> Option<Retained<NSArray<UIFont>>>;
174
175 #[cfg(feature = "UIFont")]
176 #[unsafe(method(setFonts:))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn setFonts(&self, fonts: Option<&NSArray<UIFont>>);
180
181 #[cfg(feature = "UIColor")]
182 #[unsafe(method(textColors))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn textColors(&self) -> Option<Retained<NSArray<UIColor>>>;
185
186 #[cfg(feature = "UIColor")]
187 #[unsafe(method(setTextColors:))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn setTextColors(&self, text_colors: Option<&NSArray<UIColor>>);
191
192 #[cfg(feature = "objc2-core-foundation")]
193 #[unsafe(method(lineHeight))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn lineHeight(&self) -> CGFloat;
196
197 #[cfg(feature = "objc2-core-foundation")]
198 #[unsafe(method(setLineHeight:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn setLineHeight(&self, line_height: CGFloat);
202
203 #[unsafe(method(underlinePresent))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn underlinePresent(&self) -> bool;
206
207 #[unsafe(method(setUnderlinePresent:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn setUnderlinePresent(&self, underline_present: bool);
211
212 #[unsafe(method(strikethroughPresent))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn strikethroughPresent(&self) -> bool;
215
216 #[unsafe(method(setStrikethroughPresent:))]
218 #[unsafe(method_family = none)]
219 pub unsafe fn setStrikethroughPresent(&self, strikethrough_present: bool);
220
221 #[unsafe(method(textAlignments))]
222 #[unsafe(method_family = none)]
223 pub unsafe fn textAlignments(
224 &self,
225 ) -> Retained<NSSet<UITextFormattingViewControllerTextAlignment>>;
226
227 #[unsafe(method(setTextAlignments:))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn setTextAlignments(
231 &self,
232 text_alignments: &NSSet<UITextFormattingViewControllerTextAlignment>,
233 );
234
235 #[unsafe(method(textLists))]
236 #[unsafe(method_family = none)]
237 pub unsafe fn textLists(&self) -> Retained<NSSet<UITextFormattingViewControllerTextList>>;
238
239 #[unsafe(method(setTextLists:))]
241 #[unsafe(method_family = none)]
242 pub unsafe fn setTextLists(
243 &self,
244 text_lists: &NSSet<UITextFormattingViewControllerTextList>,
245 );
246
247 #[unsafe(method(highlights))]
248 #[unsafe(method_family = none)]
249 pub unsafe fn highlights(&self)
250 -> Retained<NSSet<UITextFormattingViewControllerHighlight>>;
251
252 #[unsafe(method(setHighlights:))]
254 #[unsafe(method_family = none)]
255 pub unsafe fn setHighlights(
256 &self,
257 highlights: &NSSet<UITextFormattingViewControllerHighlight>,
258 );
259
260 #[unsafe(method(formattingStyleKey))]
261 #[unsafe(method_family = none)]
262 pub unsafe fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
263
264 #[unsafe(method(setFormattingStyleKey:))]
266 #[unsafe(method_family = none)]
267 pub unsafe fn setFormattingStyleKey(&self, formatting_style_key: Option<&NSString>);
268 );
269}
270
271impl UITextFormattingViewControllerFormattingDescriptor {
273 extern_methods!(
274 #[unsafe(method(new))]
275 #[unsafe(method_family = new)]
276 pub unsafe fn new() -> Retained<Self>;
277 );
278}