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"))]
102unsafe impl NSCoding for UITextFormattingViewController {}
103
104#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
105unsafe impl NSObjectProtocol for UITextFormattingViewController {}
106
107#[cfg(all(
108 feature = "UIAppearance",
109 feature = "UIResponder",
110 feature = "UIViewController"
111))]
112unsafe impl UIAppearanceContainer for UITextFormattingViewController {}
113
114#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
115unsafe impl UIContentContainer for UITextFormattingViewController {}
116
117#[cfg(all(
118 feature = "UIFocus",
119 feature = "UIResponder",
120 feature = "UIViewController"
121))]
122unsafe impl UIFocusEnvironment for UITextFormattingViewController {}
123
124#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
125unsafe impl UIResponderStandardEditActions for UITextFormattingViewController {}
126
127#[cfg(all(
128 feature = "UIResponder",
129 feature = "UITraitCollection",
130 feature = "UIViewController"
131))]
132unsafe impl UITraitEnvironment for UITextFormattingViewController {}
133
134#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
135impl UITextFormattingViewController {
136 extern_methods!(
137 #[cfg(feature = "UITextFormattingViewControllerConfiguration")]
138 #[unsafe(method(configuration))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn configuration(&self)
142 -> Retained<UITextFormattingViewControllerConfiguration>;
143
144 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
145 #[unsafe(method(formattingDescriptor))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn formattingDescriptor(
149 &self,
150 ) -> Option<Retained<UITextFormattingViewControllerFormattingDescriptor>>;
151
152 #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
153 #[unsafe(method(setFormattingDescriptor:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn setFormattingDescriptor(
157 &self,
158 formatting_descriptor: Option<&UITextFormattingViewControllerFormattingDescriptor>,
159 );
160
161 #[unsafe(method(delegate))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn delegate(
165 &self,
166 ) -> Option<Retained<ProtocolObject<dyn UITextFormattingViewControllerDelegate>>>;
167
168 #[unsafe(method(setDelegate:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn setDelegate(
173 &self,
174 delegate: Option<&ProtocolObject<dyn UITextFormattingViewControllerDelegate>>,
175 );
176
177 #[unsafe(method(init))]
178 #[unsafe(method_family = init)]
179 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
180
181 #[unsafe(method(initWithNibName:bundle:))]
182 #[unsafe(method_family = init)]
183 pub unsafe fn initWithNibName_bundle(
184 this: Allocated<Self>,
185 nib_name_or_nil: Option<&NSString>,
186 nib_bundle_or_nil: Option<&NSBundle>,
187 ) -> Retained<Self>;
188
189 #[cfg(feature = "UITextFormattingViewControllerConfiguration")]
190 #[unsafe(method(initWithConfiguration:))]
191 #[unsafe(method_family = init)]
192 pub unsafe fn initWithConfiguration(
193 this: Allocated<Self>,
194 configuration: &UITextFormattingViewControllerConfiguration,
195 ) -> Retained<Self>;
196 );
197}
198
199#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
201impl UITextFormattingViewController {
202 extern_methods!(
203 #[unsafe(method(initWithCoder:))]
204 #[unsafe(method_family = init)]
205 pub unsafe fn initWithCoder(
206 this: Allocated<Self>,
207 coder: &NSCoder,
208 ) -> Option<Retained<Self>>;
209 );
210}
211
212#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
214impl UITextFormattingViewController {
215 extern_methods!(
216 #[unsafe(method(new))]
217 #[unsafe(method_family = new)]
218 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
219 );
220}