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 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 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 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 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 fn configuration(&self) -> Retained<UITextFormattingViewControllerConfiguration>;
156
157 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
158 #[unsafe(method(formattingDescriptor))]
160 #[unsafe(method_family = none)]
161 pub fn formattingDescriptor(
162 &self,
163 ) -> Option<Retained<UITextFormattingViewControllerFormattingDescriptor>>;
164
165 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
166 #[unsafe(method(setFormattingDescriptor:))]
170 #[unsafe(method_family = none)]
171 pub fn setFormattingDescriptor(
172 &self,
173 formatting_descriptor: Option<&UITextFormattingViewControllerFormattingDescriptor>,
174 );
175
176 #[unsafe(method(delegate))]
178 #[unsafe(method_family = none)]
179 pub fn delegate(
180 &self,
181 ) -> Option<Retained<ProtocolObject<dyn UITextFormattingViewControllerDelegate>>>;
182
183 #[unsafe(method(setDelegate:))]
187 #[unsafe(method_family = none)]
188 pub fn setDelegate(
189 &self,
190 delegate: Option<&ProtocolObject<dyn UITextFormattingViewControllerDelegate>>,
191 );
192
193 #[unsafe(method(init))]
194 #[unsafe(method_family = init)]
195 pub fn init(this: Allocated<Self>) -> Retained<Self>;
196
197 #[unsafe(method(initWithNibName:bundle:))]
198 #[unsafe(method_family = init)]
199 pub unsafe fn initWithNibName_bundle(
200 this: Allocated<Self>,
201 nib_name_or_nil: Option<&NSString>,
202 nib_bundle_or_nil: Option<&NSBundle>,
203 ) -> Retained<Self>;
204
205 #[cfg(feature = "UITextFormattingViewControllerConfiguration")]
206 #[unsafe(method(initWithConfiguration:))]
207 #[unsafe(method_family = init)]
208 pub fn initWithConfiguration(
209 this: Allocated<Self>,
210 configuration: &UITextFormattingViewControllerConfiguration,
211 ) -> Retained<Self>;
212 );
213}
214
215#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
217impl UITextFormattingViewController {
218 extern_methods!(
219 #[unsafe(method(initWithCoder:))]
223 #[unsafe(method_family = init)]
224 pub unsafe fn initWithCoder(
225 this: Allocated<Self>,
226 coder: &NSCoder,
227 ) -> Option<Retained<Self>>;
228 );
229}
230
231#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
233impl UITextFormattingViewController {
234 extern_methods!(
235 #[unsafe(method(new))]
236 #[unsafe(method_family = new)]
237 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
238 );
239}