objc2_ui_kit/generated/UIPasteboard.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardname?language=objc)
11// NS_TYPED_EXTENSIBLE_ENUM
12pub type UIPasteboardName = NSString;
13
14extern "C" {
15 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardnamegeneral?language=objc)
16 pub static UIPasteboardNameGeneral: &'static UIPasteboardName;
17}
18
19extern "C" {
20 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardnamefind?language=objc)
21 #[deprecated = "The Find pasteboard is no longer available."]
22 pub static UIPasteboardNameFind: &'static NSString;
23}
24
25/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpattern?language=objc)
26// NS_TYPED_ENUM
27pub type UIPasteboardDetectionPattern = NSString;
28
29extern "C" {
30 /// NSString value, suitable for implementing "Paste and Go"
31 ///
32 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternprobableweburl?language=objc)
33 pub static UIPasteboardDetectionPatternProbableWebURL: &'static UIPasteboardDetectionPattern;
34}
35
36extern "C" {
37 /// NSString value, suitable for implementing "Paste and Search"
38 ///
39 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternprobablewebsearch?language=objc)
40 pub static UIPasteboardDetectionPatternProbableWebSearch: &'static UIPasteboardDetectionPattern;
41}
42
43extern "C" {
44 /// NSNumber value
45 ///
46 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternnumber?language=objc)
47 pub static UIPasteboardDetectionPatternNumber: &'static UIPasteboardDetectionPattern;
48}
49
50extern "C" {
51 /// Array of DDMatchLink values
52 ///
53 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternlink?language=objc)
54 pub static UIPasteboardDetectionPatternLink: &'static UIPasteboardDetectionPattern;
55}
56
57extern "C" {
58 /// Array of DDMatchPhoneNumber values
59 ///
60 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternphonenumber?language=objc)
61 pub static UIPasteboardDetectionPatternPhoneNumber: &'static UIPasteboardDetectionPattern;
62}
63
64extern "C" {
65 /// Array of DDMatchEmailAddress values
66 ///
67 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternemailaddress?language=objc)
68 pub static UIPasteboardDetectionPatternEmailAddress: &'static UIPasteboardDetectionPattern;
69}
70
71extern "C" {
72 /// Array of DDMatchAddress values
73 ///
74 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternpostaladdress?language=objc)
75 pub static UIPasteboardDetectionPatternPostalAddress: &'static UIPasteboardDetectionPattern;
76}
77
78extern "C" {
79 /// Array of DDMatchCalendarEvent values
80 ///
81 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatterncalendarevent?language=objc)
82 pub static UIPasteboardDetectionPatternCalendarEvent: &'static UIPasteboardDetectionPattern;
83}
84
85extern "C" {
86 /// Array of DDMatchShipmentTrackingNumber values
87 ///
88 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternshipmenttrackingnumber?language=objc)
89 pub static UIPasteboardDetectionPatternShipmentTrackingNumber:
90 &'static UIPasteboardDetectionPattern;
91}
92
93extern "C" {
94 /// Array of DDMatchFlightNumber values
95 ///
96 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternflightnumber?language=objc)
97 pub static UIPasteboardDetectionPatternFlightNumber: &'static UIPasteboardDetectionPattern;
98}
99
100extern "C" {
101 /// Array of DDMatchMoneyAmount values
102 ///
103 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboarddetectionpatternmoneyamount?language=objc)
104 pub static UIPasteboardDetectionPatternMoneyAmount: &'static UIPasteboardDetectionPattern;
105}
106
107/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardoption?language=objc)
108// NS_TYPED_ENUM
109pub type UIPasteboardOption = NSString;
110
111extern "C" {
112 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardoptionexpirationdate?language=objc)
113 pub static UIPasteboardOptionExpirationDate: &'static UIPasteboardOption;
114}
115
116extern "C" {
117 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardoptionlocalonly?language=objc)
118 pub static UIPasteboardOptionLocalOnly: &'static UIPasteboardOption;
119}
120
121extern_class!(
122 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboard?language=objc)
123 #[unsafe(super(NSObject))]
124 #[derive(Debug, PartialEq, Eq, Hash)]
125 pub struct UIPasteboard;
126);
127
128unsafe impl Send for UIPasteboard {}
129
130unsafe impl Sync for UIPasteboard {}
131
132extern_conformance!(
133 unsafe impl NSObjectProtocol for UIPasteboard {}
134);
135
136impl UIPasteboard {
137 extern_methods!(
138 #[unsafe(method(generalPasteboard))]
139 #[unsafe(method_family = none)]
140 pub fn generalPasteboard() -> Retained<UIPasteboard>;
141
142 #[unsafe(method(pasteboardWithName:create:))]
143 #[unsafe(method_family = none)]
144 pub fn pasteboardWithName_create(
145 pasteboard_name: &UIPasteboardName,
146 create: bool,
147 ) -> Option<Retained<UIPasteboard>>;
148
149 #[unsafe(method(pasteboardWithUniqueName))]
150 #[unsafe(method_family = none)]
151 pub fn pasteboardWithUniqueName() -> Retained<UIPasteboard>;
152
153 /// This property is not atomic.
154 ///
155 /// # Safety
156 ///
157 /// This might not be thread-safe.
158 #[unsafe(method(name))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn name(&self) -> Retained<UIPasteboardName>;
161
162 #[unsafe(method(removePasteboardWithName:))]
163 #[unsafe(method_family = none)]
164 pub fn removePasteboardWithName(pasteboard_name: &UIPasteboardName);
165
166 /// This property is not atomic.
167 ///
168 /// # Safety
169 ///
170 /// This might not be thread-safe.
171 #[unsafe(method(isPersistent))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn isPersistent(&self) -> bool;
174
175 #[deprecated = "Do not set persistence on pasteboards. This property is set automatically."]
176 #[unsafe(method(setPersistent:))]
177 #[unsafe(method_family = none)]
178 pub fn setPersistent(&self, persistent: bool);
179
180 /// This property is not atomic.
181 ///
182 /// # Safety
183 ///
184 /// This might not be thread-safe.
185 #[unsafe(method(changeCount))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn changeCount(&self) -> NSInteger;
188
189 /// This property is not atomic.
190 ///
191 /// # Safety
192 ///
193 /// This might not be thread-safe.
194 #[unsafe(method(itemProviders))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn itemProviders(&self) -> Retained<NSArray<NSItemProvider>>;
197
198 /// Setter for [`itemProviders`][Self::itemProviders].
199 ///
200 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
201 ///
202 /// # Safety
203 ///
204 /// This might not be thread-safe.
205 #[unsafe(method(setItemProviders:))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn setItemProviders(&self, item_providers: &NSArray<NSItemProvider>);
208
209 #[unsafe(method(setItemProviders:localOnly:expirationDate:))]
210 #[unsafe(method_family = none)]
211 pub fn setItemProviders_localOnly_expirationDate(
212 &self,
213 item_providers: &NSArray<NSItemProvider>,
214 local_only: bool,
215 expiration_date: Option<&NSDate>,
216 );
217
218 #[unsafe(method(setObjects:))]
219 #[unsafe(method_family = none)]
220 pub fn setObjects(&self, objects: &NSArray<ProtocolObject<dyn NSItemProviderWriting>>);
221
222 #[unsafe(method(setObjects:localOnly:expirationDate:))]
223 #[unsafe(method_family = none)]
224 pub fn setObjects_localOnly_expirationDate(
225 &self,
226 objects: &NSArray<ProtocolObject<dyn NSItemProviderWriting>>,
227 local_only: bool,
228 expiration_date: Option<&NSDate>,
229 );
230
231 /// This property is not atomic.
232 ///
233 /// # Safety
234 ///
235 /// This might not be thread-safe.
236 #[unsafe(method(pasteboardTypes))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn pasteboardTypes(&self) -> Retained<NSArray<NSString>>;
239
240 #[unsafe(method(containsPasteboardTypes:))]
241 #[unsafe(method_family = none)]
242 pub fn containsPasteboardTypes(&self, pasteboard_types: &NSArray<NSString>) -> bool;
243
244 #[unsafe(method(dataForPasteboardType:))]
245 #[unsafe(method_family = none)]
246 pub fn dataForPasteboardType(&self, pasteboard_type: &NSString)
247 -> Option<Retained<NSData>>;
248
249 #[unsafe(method(valueForPasteboardType:))]
250 #[unsafe(method_family = none)]
251 pub fn valueForPasteboardType(
252 &self,
253 pasteboard_type: &NSString,
254 ) -> Option<Retained<AnyObject>>;
255
256 /// # Safety
257 ///
258 /// `value` should be of the correct type.
259 #[unsafe(method(setValue:forPasteboardType:))]
260 #[unsafe(method_family = none)]
261 pub unsafe fn setValue_forPasteboardType(
262 &self,
263 value: &AnyObject,
264 pasteboard_type: &NSString,
265 );
266
267 #[unsafe(method(setData:forPasteboardType:))]
268 #[unsafe(method_family = none)]
269 pub fn setData_forPasteboardType(&self, data: &NSData, pasteboard_type: &NSString);
270
271 /// This property is not atomic.
272 ///
273 /// # Safety
274 ///
275 /// This might not be thread-safe.
276 #[unsafe(method(numberOfItems))]
277 #[unsafe(method_family = none)]
278 pub unsafe fn numberOfItems(&self) -> NSInteger;
279
280 #[unsafe(method(pasteboardTypesForItemSet:))]
281 #[unsafe(method_family = none)]
282 pub fn pasteboardTypesForItemSet(
283 &self,
284 item_set: Option<&NSIndexSet>,
285 ) -> Option<Retained<NSArray<NSArray<NSString>>>>;
286
287 #[unsafe(method(containsPasteboardTypes:inItemSet:))]
288 #[unsafe(method_family = none)]
289 pub fn containsPasteboardTypes_inItemSet(
290 &self,
291 pasteboard_types: &NSArray<NSString>,
292 item_set: Option<&NSIndexSet>,
293 ) -> bool;
294
295 #[unsafe(method(itemSetWithPasteboardTypes:))]
296 #[unsafe(method_family = none)]
297 pub fn itemSetWithPasteboardTypes(
298 &self,
299 pasteboard_types: &NSArray<NSString>,
300 ) -> Option<Retained<NSIndexSet>>;
301
302 #[unsafe(method(valuesForPasteboardType:inItemSet:))]
303 #[unsafe(method_family = none)]
304 pub fn valuesForPasteboardType_inItemSet(
305 &self,
306 pasteboard_type: &NSString,
307 item_set: Option<&NSIndexSet>,
308 ) -> Option<Retained<NSArray>>;
309
310 #[unsafe(method(dataForPasteboardType:inItemSet:))]
311 #[unsafe(method_family = none)]
312 pub fn dataForPasteboardType_inItemSet(
313 &self,
314 pasteboard_type: &NSString,
315 item_set: Option<&NSIndexSet>,
316 ) -> Option<Retained<NSArray<NSData>>>;
317
318 /// This property is not atomic.
319 ///
320 /// # Safety
321 ///
322 /// This might not be thread-safe.
323 #[unsafe(method(items))]
324 #[unsafe(method_family = none)]
325 pub unsafe fn items(&self) -> Retained<NSArray<NSDictionary<NSString, AnyObject>>>;
326
327 /// Setter for [`items`][Self::items].
328 ///
329 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
330 ///
331 /// # Safety
332 ///
333 /// - `items` generic generic should be of the correct type.
334 /// - This might not be thread-safe.
335 #[unsafe(method(setItems:))]
336 #[unsafe(method_family = none)]
337 pub unsafe fn setItems(&self, items: &NSArray<NSDictionary<NSString, AnyObject>>);
338
339 /// # Safety
340 ///
341 /// `items` generic generic should be of the correct type.
342 #[unsafe(method(addItems:))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn addItems(&self, items: &NSArray<NSDictionary<NSString, AnyObject>>);
345
346 /// # Safety
347 ///
348 /// - `items` generic generic should be of the correct type.
349 /// - `options` generic should be of the correct type.
350 #[unsafe(method(setItems:options:))]
351 #[unsafe(method_family = none)]
352 pub unsafe fn setItems_options(
353 &self,
354 items: &NSArray<NSDictionary<NSString, AnyObject>>,
355 options: &NSDictionary<UIPasteboardOption, AnyObject>,
356 );
357
358 /// This property is not atomic.
359 ///
360 /// # Safety
361 ///
362 /// This might not be thread-safe.
363 #[unsafe(method(string))]
364 #[unsafe(method_family = none)]
365 pub unsafe fn string(&self) -> Option<Retained<NSString>>;
366
367 /// Setter for [`string`][Self::string].
368 ///
369 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
370 ///
371 /// # Safety
372 ///
373 /// This might not be thread-safe.
374 #[unsafe(method(setString:))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn setString(&self, string: Option<&NSString>);
377
378 /// This property is not atomic.
379 ///
380 /// # Safety
381 ///
382 /// This might not be thread-safe.
383 #[unsafe(method(strings))]
384 #[unsafe(method_family = none)]
385 pub unsafe fn strings(&self) -> Option<Retained<NSArray<NSString>>>;
386
387 /// Setter for [`strings`][Self::strings].
388 ///
389 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
390 ///
391 /// # Safety
392 ///
393 /// This might not be thread-safe.
394 #[unsafe(method(setStrings:))]
395 #[unsafe(method_family = none)]
396 pub unsafe fn setStrings(&self, strings: Option<&NSArray<NSString>>);
397
398 /// This property is not atomic.
399 ///
400 /// # Safety
401 ///
402 /// This might not be thread-safe.
403 #[unsafe(method(URL))]
404 #[unsafe(method_family = none)]
405 pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
406
407 /// Setter for [`URL`][Self::URL].
408 ///
409 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
410 ///
411 /// # Safety
412 ///
413 /// This might not be thread-safe.
414 #[unsafe(method(setURL:))]
415 #[unsafe(method_family = none)]
416 pub unsafe fn setURL(&self, url: Option<&NSURL>);
417
418 /// This property is not atomic.
419 ///
420 /// # Safety
421 ///
422 /// This might not be thread-safe.
423 #[unsafe(method(URLs))]
424 #[unsafe(method_family = none)]
425 pub unsafe fn URLs(&self) -> Option<Retained<NSArray<NSURL>>>;
426
427 /// Setter for [`URLs`][Self::URLs].
428 ///
429 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
430 ///
431 /// # Safety
432 ///
433 /// This might not be thread-safe.
434 #[unsafe(method(setURLs:))]
435 #[unsafe(method_family = none)]
436 pub unsafe fn setURLs(&self, ur_ls: Option<&NSArray<NSURL>>);
437
438 #[cfg(feature = "UIImage")]
439 /// This property is not atomic.
440 ///
441 /// # Safety
442 ///
443 /// This might not be thread-safe.
444 #[unsafe(method(image))]
445 #[unsafe(method_family = none)]
446 pub unsafe fn image(&self) -> Option<Retained<UIImage>>;
447
448 #[cfg(feature = "UIImage")]
449 /// Setter for [`image`][Self::image].
450 ///
451 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
452 ///
453 /// # Safety
454 ///
455 /// This might not be thread-safe.
456 #[unsafe(method(setImage:))]
457 #[unsafe(method_family = none)]
458 pub unsafe fn setImage(&self, image: Option<&UIImage>);
459
460 #[cfg(feature = "UIImage")]
461 /// This property is not atomic.
462 ///
463 /// # Safety
464 ///
465 /// This might not be thread-safe.
466 #[unsafe(method(images))]
467 #[unsafe(method_family = none)]
468 pub unsafe fn images(&self) -> Option<Retained<NSArray<UIImage>>>;
469
470 #[cfg(feature = "UIImage")]
471 /// Setter for [`images`][Self::images].
472 ///
473 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
474 ///
475 /// # Safety
476 ///
477 /// This might not be thread-safe.
478 #[unsafe(method(setImages:))]
479 #[unsafe(method_family = none)]
480 pub unsafe fn setImages(&self, images: Option<&NSArray<UIImage>>);
481
482 #[cfg(feature = "UIColor")]
483 /// This property is not atomic.
484 ///
485 /// # Safety
486 ///
487 /// This might not be thread-safe.
488 #[unsafe(method(color))]
489 #[unsafe(method_family = none)]
490 pub unsafe fn color(&self) -> Option<Retained<UIColor>>;
491
492 #[cfg(feature = "UIColor")]
493 /// Setter for [`color`][Self::color].
494 ///
495 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
496 ///
497 /// # Safety
498 ///
499 /// This might not be thread-safe.
500 #[unsafe(method(setColor:))]
501 #[unsafe(method_family = none)]
502 pub unsafe fn setColor(&self, color: Option<&UIColor>);
503
504 #[cfg(feature = "UIColor")]
505 /// This property is not atomic.
506 ///
507 /// # Safety
508 ///
509 /// This might not be thread-safe.
510 #[unsafe(method(colors))]
511 #[unsafe(method_family = none)]
512 pub unsafe fn colors(&self) -> Option<Retained<NSArray<UIColor>>>;
513
514 #[cfg(feature = "UIColor")]
515 /// Setter for [`colors`][Self::colors].
516 ///
517 /// This is [copied][objc2_foundation::NSCopying::copy] when set.
518 ///
519 /// # Safety
520 ///
521 /// This might not be thread-safe.
522 #[unsafe(method(setColors:))]
523 #[unsafe(method_family = none)]
524 pub unsafe fn setColors(&self, colors: Option<&NSArray<UIColor>>);
525
526 /// This property is not atomic.
527 ///
528 /// # Safety
529 ///
530 /// This might not be thread-safe.
531 #[unsafe(method(hasStrings))]
532 #[unsafe(method_family = none)]
533 pub unsafe fn hasStrings(&self) -> bool;
534
535 /// This property is not atomic.
536 ///
537 /// # Safety
538 ///
539 /// This might not be thread-safe.
540 #[unsafe(method(hasURLs))]
541 #[unsafe(method_family = none)]
542 pub unsafe fn hasURLs(&self) -> bool;
543
544 /// This property is not atomic.
545 ///
546 /// # Safety
547 ///
548 /// This might not be thread-safe.
549 #[unsafe(method(hasImages))]
550 #[unsafe(method_family = none)]
551 pub unsafe fn hasImages(&self) -> bool;
552
553 /// This property is not atomic.
554 ///
555 /// # Safety
556 ///
557 /// This might not be thread-safe.
558 #[unsafe(method(hasColors))]
559 #[unsafe(method_family = none)]
560 pub unsafe fn hasColors(&self) -> bool;
561
562 #[cfg(feature = "block2")]
563 /// Detects patterns in the first pasteboard item.
564 ///
565 ///
566 /// Parameter `patterns`: Detect only these patterns.
567 ///
568 /// Parameter `completionHandler`: Receives which patterns were detected, or an error.
569 #[unsafe(method(detectPatternsForPatterns:completionHandler:))]
570 #[unsafe(method_family = none)]
571 pub fn detectPatternsForPatterns_completionHandler(
572 &self,
573 patterns: &NSSet<UIPasteboardDetectionPattern>,
574 completion_handler: &block2::DynBlock<
575 dyn Fn(*mut NSSet<UIPasteboardDetectionPattern>, *mut NSError),
576 >,
577 );
578
579 #[cfg(feature = "block2")]
580 /// Detects patterns in the specified pasteboard items.
581 ///
582 ///
583 /// Parameter `patterns`: Detect only these patterns.
584 ///
585 /// Parameter `itemSet`: Specifies which pasteboard items by their position. Nil means all items.
586 ///
587 /// Parameter `completionHandler`: Receives which patterns were detected per item specified,
588 /// or an error.
589 #[unsafe(method(detectPatternsForPatterns:inItemSet:completionHandler:))]
590 #[unsafe(method_family = none)]
591 pub fn detectPatternsForPatterns_inItemSet_completionHandler(
592 &self,
593 patterns: &NSSet<UIPasteboardDetectionPattern>,
594 item_set: Option<&NSIndexSet>,
595 completion_handler: &block2::DynBlock<
596 dyn Fn(*mut NSArray<NSSet<UIPasteboardDetectionPattern>>, *mut NSError),
597 >,
598 );
599
600 #[cfg(feature = "block2")]
601 /// Detects patterns and corresponding values in the first pasteboard item.
602 ///
603 ///
604 /// Parameter `patterns`: Detect only these patterns.
605 ///
606 /// Parameter `completionHandler`: Receives which patterns and values were detected, or an error.
607 #[unsafe(method(detectValuesForPatterns:completionHandler:))]
608 #[unsafe(method_family = none)]
609 pub fn detectValuesForPatterns_completionHandler(
610 &self,
611 patterns: &NSSet<UIPasteboardDetectionPattern>,
612 completion_handler: &block2::DynBlock<
613 dyn Fn(*mut NSDictionary<UIPasteboardDetectionPattern, AnyObject>, *mut NSError),
614 >,
615 );
616
617 #[cfg(feature = "block2")]
618 /// Detects patterns and corresponding values in the specified pasteboard items.
619 ///
620 ///
621 /// Parameter `patterns`: Detect only these patterns.
622 ///
623 /// Parameter `itemSet`: Specifies which pasteboard items by their position. Nil means all items.
624 ///
625 /// Parameter `completionHandler`: Receives which patterns and values were detected per item specified,
626 /// or an error.
627 #[unsafe(method(detectValuesForPatterns:inItemSet:completionHandler:))]
628 #[unsafe(method_family = none)]
629 pub fn detectValuesForPatterns_inItemSet_completionHandler(
630 &self,
631 patterns: &NSSet<UIPasteboardDetectionPattern>,
632 item_set: Option<&NSIndexSet>,
633 completion_handler: &block2::DynBlock<
634 dyn Fn(
635 *mut NSArray<NSDictionary<UIPasteboardDetectionPattern, AnyObject>>,
636 *mut NSError,
637 ),
638 >,
639 );
640 );
641}
642
643/// Methods declared on superclass `NSObject`.
644impl UIPasteboard {
645 extern_methods!(
646 #[unsafe(method(init))]
647 #[unsafe(method_family = init)]
648 pub fn init(this: Allocated<Self>) -> Retained<Self>;
649
650 #[unsafe(method(new))]
651 #[unsafe(method_family = new)]
652 pub fn new() -> Retained<Self>;
653 );
654}
655
656impl DefaultRetained for UIPasteboard {
657 #[inline]
658 fn default_retained() -> Retained<Self> {
659 Self::new()
660 }
661}
662
663extern "C" {
664 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardchangednotification?language=objc)
665 pub static UIPasteboardChangedNotification: &'static NSNotificationName;
666}
667
668extern "C" {
669 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardchangedtypesaddedkey?language=objc)
670 pub static UIPasteboardChangedTypesAddedKey: &'static NSString;
671}
672
673extern "C" {
674 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardchangedtypesremovedkey?language=objc)
675 pub static UIPasteboardChangedTypesRemovedKey: &'static NSString;
676}
677
678extern "C" {
679 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardremovednotification?language=objc)
680 pub static UIPasteboardRemovedNotification: &'static NSNotificationName;
681}
682
683extern "C" {
684 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardtypeliststring?language=objc)
685 pub static UIPasteboardTypeListString: &'static NSArray<NSString>;
686}
687
688extern "C" {
689 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardtypelisturl?language=objc)
690 pub static UIPasteboardTypeListURL: &'static NSArray<NSString>;
691}
692
693extern "C" {
694 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardtypelistimage?language=objc)
695 pub static UIPasteboardTypeListImage: &'static NSArray<NSString>;
696}
697
698extern "C" {
699 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardtypelistcolor?language=objc)
700 pub static UIPasteboardTypeListColor: &'static NSArray<NSString>;
701}
702
703extern "C" {
704 /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipasteboardtypeautomatic?language=objc)
705 pub static UIPasteboardTypeAutomatic: &'static NSString;
706}