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