objc2_ui_kit/generated/
UITextFormattingViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait UITextFormattingViewControllerDelegate:
13 NSObjectProtocol + MainThreadOnly
14 {
15 #[cfg(all(
16 feature = "UIResponder",
17 feature = "UITextFormattingViewControllerChangeValue",
18 feature = "UIViewController"
19 ))]
20 #[unsafe(method(textFormattingViewController:didChangeValue:))]
26 #[unsafe(method_family = none)]
27 unsafe fn textFormattingViewController_didChangeValue(
28 &self,
29 view_controller: &UITextFormattingViewController,
30 change_value: &UITextFormattingViewControllerChangeValue,
31 );
32
33 #[cfg(all(
34 feature = "UIFontPickerViewController",
35 feature = "UIResponder",
36 feature = "UIViewController"
37 ))]
38 #[optional]
49 #[unsafe(method(textFormattingViewController:shouldPresentFontPicker:))]
50 #[unsafe(method_family = none)]
51 unsafe fn textFormattingViewController_shouldPresentFontPicker(
52 &self,
53 view_controller: &UITextFormattingViewController,
54 font_picker: &UIFontPickerViewController,
55 ) -> bool;
56
57 #[cfg(all(
58 feature = "UIColorPickerViewController",
59 feature = "UIResponder",
60 feature = "UIViewController"
61 ))]
62 #[optional]
73 #[unsafe(method(textFormattingViewController:shouldPresentColorPicker:))]
74 #[unsafe(method_family = none)]
75 unsafe fn textFormattingViewController_shouldPresentColorPicker(
76 &self,
77 view_controller: &UITextFormattingViewController,
78 color_picker: &UIColorPickerViewController,
79 ) -> bool;
80
81 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
82 #[optional]
84 #[unsafe(method(textFormattingDidFinish:))]
85 #[unsafe(method_family = none)]
86 unsafe fn textFormattingDidFinish(&self, view_controller: &UITextFormattingViewController);
87 }
88);
89
90extern_class!(
91 #[unsafe(super(UIViewController, UIResponder, NSObject))]
95 #[thread_kind = MainThreadOnly]
96 #[derive(Debug, PartialEq, Eq, Hash)]
97 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
98 pub struct UITextFormattingViewController;
99);
100
101#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
102extern_conformance!(
103 unsafe impl NSCoding for UITextFormattingViewController {}
104);
105
106#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
107extern_conformance!(
108 unsafe impl NSObjectProtocol for UITextFormattingViewController {}
109);
110
111#[cfg(all(
112 feature = "UIAppearance",
113 feature = "UIResponder",
114 feature = "UIViewController"
115))]
116extern_conformance!(
117 unsafe impl UIAppearanceContainer for UITextFormattingViewController {}
118);
119
120#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
121extern_conformance!(
122 unsafe impl UIContentContainer for UITextFormattingViewController {}
123);
124
125#[cfg(all(
126 feature = "UIFocus",
127 feature = "UIResponder",
128 feature = "UIViewController"
129))]
130extern_conformance!(
131 unsafe impl UIFocusEnvironment for UITextFormattingViewController {}
132);
133
134#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
135extern_conformance!(
136 unsafe impl UIResponderStandardEditActions for UITextFormattingViewController {}
137);
138
139#[cfg(all(
140 feature = "UIResponder",
141 feature = "UITraitCollection",
142 feature = "UIViewController"
143))]
144extern_conformance!(
145 unsafe impl UITraitEnvironment for UITextFormattingViewController {}
146);
147
148#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
149impl UITextFormattingViewController {
150 extern_methods!(
151 #[cfg(feature = "UITextFormattingViewControllerConfiguration")]
152 #[unsafe(method(configuration))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn configuration(&self)
156 -> Retained<UITextFormattingViewControllerConfiguration>;
157
158 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
159 #[unsafe(method(formattingDescriptor))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn formattingDescriptor(
163 &self,
164 ) -> Option<Retained<UITextFormattingViewControllerFormattingDescriptor>>;
165
166 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
167 #[unsafe(method(setFormattingDescriptor:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn setFormattingDescriptor(
171 &self,
172 formatting_descriptor: Option<&UITextFormattingViewControllerFormattingDescriptor>,
173 );
174
175 #[unsafe(method(delegate))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn delegate(
179 &self,
180 ) -> Option<Retained<ProtocolObject<dyn UITextFormattingViewControllerDelegate>>>;
181
182 #[unsafe(method(setDelegate:))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn setDelegate(
187 &self,
188 delegate: Option<&ProtocolObject<dyn UITextFormattingViewControllerDelegate>>,
189 );
190
191 #[unsafe(method(init))]
192 #[unsafe(method_family = init)]
193 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
194
195 #[unsafe(method(initWithNibName:bundle:))]
196 #[unsafe(method_family = init)]
197 pub unsafe fn initWithNibName_bundle(
198 this: Allocated<Self>,
199 nib_name_or_nil: Option<&NSString>,
200 nib_bundle_or_nil: Option<&NSBundle>,
201 ) -> Retained<Self>;
202
203 #[cfg(feature = "UITextFormattingViewControllerConfiguration")]
204 #[unsafe(method(initWithConfiguration:))]
205 #[unsafe(method_family = init)]
206 pub unsafe fn initWithConfiguration(
207 this: Allocated<Self>,
208 configuration: &UITextFormattingViewControllerConfiguration,
209 ) -> Retained<Self>;
210 );
211}
212
213#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
215impl UITextFormattingViewController {
216 extern_methods!(
217 #[unsafe(method(initWithCoder:))]
218 #[unsafe(method_family = init)]
219 pub unsafe fn initWithCoder(
220 this: Allocated<Self>,
221 coder: &NSCoder,
222 ) -> Option<Retained<Self>>;
223 );
224}
225
226#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
228impl UITextFormattingViewController {
229 extern_methods!(
230 #[unsafe(method(new))]
231 #[unsafe(method_family = new)]
232 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
233 );
234}