objc2_ui_kit/generated/
UIPasteControl.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#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct UIPasteControlDisplayMode(pub NSUInteger);
20impl UIPasteControlDisplayMode {
21 #[doc(alias = "UIPasteControlDisplayModeIconAndLabel")]
22 pub const IconAndLabel: Self = Self(0);
23 #[doc(alias = "UIPasteControlDisplayModeIconOnly")]
24 pub const IconOnly: Self = Self(1);
25 #[doc(alias = "UIPasteControlDisplayModeLabelOnly")]
26 pub const LabelOnly: Self = Self(2);
27 #[doc(alias = "UIPasteControlDisplayModeArrowAndLabel")]
28 pub const ArrowAndLabel: Self = Self(3);
29}
30
31unsafe impl Encode for UIPasteControlDisplayMode {
32 const ENCODING: Encoding = NSUInteger::ENCODING;
33}
34
35unsafe impl RefEncode for UIPasteControlDisplayMode {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_class!(
40 #[unsafe(super(NSObject))]
42 #[thread_kind = MainThreadOnly]
43 #[derive(Debug, PartialEq, Eq, Hash)]
44 pub struct UIPasteControlConfiguration;
45);
46
47extern_conformance!(
48 unsafe impl NSCoding for UIPasteControlConfiguration {}
49);
50
51extern_conformance!(
52 unsafe impl NSObjectProtocol for UIPasteControlConfiguration {}
53);
54
55extern_conformance!(
56 unsafe impl NSSecureCoding for UIPasteControlConfiguration {}
57);
58
59impl UIPasteControlConfiguration {
60 extern_methods!(
61 #[unsafe(method(displayMode))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn displayMode(&self) -> UIPasteControlDisplayMode;
64
65 #[unsafe(method(setDisplayMode:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setDisplayMode(&self, display_mode: UIPasteControlDisplayMode);
69
70 #[cfg(feature = "UIButtonConfiguration")]
71 #[unsafe(method(cornerStyle))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn cornerStyle(&self) -> UIButtonConfigurationCornerStyle;
74
75 #[cfg(feature = "UIButtonConfiguration")]
76 #[unsafe(method(setCornerStyle:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setCornerStyle(&self, corner_style: UIButtonConfigurationCornerStyle);
80
81 #[cfg(feature = "objc2-core-foundation")]
82 #[unsafe(method(cornerRadius))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn cornerRadius(&self) -> CGFloat;
85
86 #[cfg(feature = "objc2-core-foundation")]
87 #[unsafe(method(setCornerRadius:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setCornerRadius(&self, corner_radius: CGFloat);
91
92 #[cfg(feature = "UIGeometry")]
93 #[unsafe(method(imagePlacement))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn imagePlacement(&self) -> NSDirectionalRectEdge;
96
97 #[cfg(feature = "UIGeometry")]
98 #[unsafe(method(setImagePlacement:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setImagePlacement(&self, image_placement: NSDirectionalRectEdge);
102
103 #[cfg(feature = "UIColor")]
104 #[unsafe(method(baseForegroundColor))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn baseForegroundColor(&self) -> Option<Retained<UIColor>>;
107
108 #[cfg(feature = "UIColor")]
109 #[unsafe(method(setBaseForegroundColor:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setBaseForegroundColor(&self, base_foreground_color: Option<&UIColor>);
113
114 #[cfg(feature = "UIColor")]
115 #[unsafe(method(baseBackgroundColor))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn baseBackgroundColor(&self) -> Option<Retained<UIColor>>;
118
119 #[cfg(feature = "UIColor")]
120 #[unsafe(method(setBaseBackgroundColor:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn setBaseBackgroundColor(&self, base_background_color: Option<&UIColor>);
124 );
125}
126
127impl UIPasteControlConfiguration {
129 extern_methods!(
130 #[unsafe(method(init))]
131 #[unsafe(method_family = init)]
132 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
133
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
137 );
138}
139
140extern_class!(
141 #[unsafe(super(UIControl, UIView, UIResponder, NSObject))]
143 #[thread_kind = MainThreadOnly]
144 #[derive(Debug, PartialEq, Eq, Hash)]
145 #[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
146 pub struct UIPasteControl;
147);
148
149#[cfg(all(
150 feature = "UIControl",
151 feature = "UIResponder",
152 feature = "UIView",
153 feature = "objc2-quartz-core"
154))]
155#[cfg(not(target_os = "watchos"))]
156extern_conformance!(
157 unsafe impl CALayerDelegate for UIPasteControl {}
158);
159
160#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
161extern_conformance!(
162 unsafe impl NSCoding for UIPasteControl {}
163);
164
165#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
166extern_conformance!(
167 unsafe impl NSObjectProtocol for UIPasteControl {}
168);
169
170#[cfg(all(
171 feature = "UIAppearance",
172 feature = "UIControl",
173 feature = "UIResponder",
174 feature = "UIView"
175))]
176extern_conformance!(
177 unsafe impl UIAppearance for UIPasteControl {}
178);
179
180#[cfg(all(
181 feature = "UIAppearance",
182 feature = "UIControl",
183 feature = "UIResponder",
184 feature = "UIView"
185))]
186extern_conformance!(
187 unsafe impl UIAppearanceContainer for UIPasteControl {}
188);
189
190#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
191extern_conformance!(
192 unsafe impl UICoordinateSpace for UIPasteControl {}
193);
194
195#[cfg(all(
196 feature = "UIControl",
197 feature = "UIDynamicBehavior",
198 feature = "UIResponder",
199 feature = "UIView"
200))]
201extern_conformance!(
202 unsafe impl UIDynamicItem for UIPasteControl {}
203);
204
205#[cfg(all(
206 feature = "UIControl",
207 feature = "UIFocus",
208 feature = "UIResponder",
209 feature = "UIView"
210))]
211extern_conformance!(
212 unsafe impl UIFocusEnvironment for UIPasteControl {}
213);
214
215#[cfg(all(
216 feature = "UIControl",
217 feature = "UIFocus",
218 feature = "UIResponder",
219 feature = "UIView"
220))]
221extern_conformance!(
222 unsafe impl UIFocusItem for UIPasteControl {}
223);
224
225#[cfg(all(
226 feature = "UIControl",
227 feature = "UIFocus",
228 feature = "UIResponder",
229 feature = "UIView"
230))]
231extern_conformance!(
232 unsafe impl UIFocusItemContainer for UIPasteControl {}
233);
234
235#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
236extern_conformance!(
237 unsafe impl UIResponderStandardEditActions for UIPasteControl {}
238);
239
240#[cfg(all(
241 feature = "UIControl",
242 feature = "UIResponder",
243 feature = "UITraitCollection",
244 feature = "UIView"
245))]
246extern_conformance!(
247 unsafe impl UITraitEnvironment for UIPasteControl {}
248);
249
250#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
251impl UIPasteControl {
252 extern_methods!(
253 #[unsafe(method(configuration))]
254 #[unsafe(method_family = none)]
255 pub unsafe fn configuration(&self) -> Retained<UIPasteControlConfiguration>;
256
257 #[cfg(feature = "UIPasteConfigurationSupporting")]
258 #[unsafe(method(target))]
259 #[unsafe(method_family = none)]
260 pub unsafe fn target(
261 &self,
262 ) -> Option<Retained<ProtocolObject<dyn UIPasteConfigurationSupporting>>>;
263
264 #[cfg(feature = "UIPasteConfigurationSupporting")]
265 #[unsafe(method(setTarget:))]
268 #[unsafe(method_family = none)]
269 pub unsafe fn setTarget(
270 &self,
271 target: Option<&ProtocolObject<dyn UIPasteConfigurationSupporting>>,
272 );
273
274 #[unsafe(method(initWithConfiguration:))]
275 #[unsafe(method_family = init)]
276 pub unsafe fn initWithConfiguration(
277 this: Allocated<Self>,
278 configuration: &UIPasteControlConfiguration,
279 ) -> Retained<Self>;
280
281 #[unsafe(method(initWithCoder:))]
282 #[unsafe(method_family = init)]
283 pub unsafe fn initWithCoder(
284 this: Allocated<Self>,
285 coder: &NSCoder,
286 ) -> Option<Retained<Self>>;
287
288 #[cfg(feature = "objc2-core-foundation")]
289 #[unsafe(method(initWithFrame:))]
290 #[unsafe(method_family = init)]
291 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
292 );
293}
294
295#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
297impl UIPasteControl {
298 extern_methods!(
299 #[cfg(all(
300 feature = "UIAction",
301 feature = "UIMenuElement",
302 feature = "objc2-core-foundation"
303 ))]
304 #[unsafe(method(initWithFrame:primaryAction:))]
306 #[unsafe(method_family = init)]
307 pub unsafe fn initWithFrame_primaryAction(
308 this: Allocated<Self>,
309 frame: CGRect,
310 primary_action: Option<&UIAction>,
311 ) -> Retained<Self>;
312 );
313}
314
315#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
317impl UIPasteControl {
318 extern_methods!(
319 #[unsafe(method(init))]
320 #[unsafe(method_family = init)]
321 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
322
323 #[unsafe(method(new))]
324 #[unsafe(method_family = new)]
325 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
326 );
327}