objc2-pdf-kit 0.3.2

Bindings to the PDFKit framework
Documentation
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
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
//! 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::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdflinestyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFLineStyle(pub NSInteger);
impl PDFLineStyle {
    #[doc(alias = "kPDFLineStyleNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "kPDFLineStyleSquare")]
    pub const Square: Self = Self(1);
    #[doc(alias = "kPDFLineStyleCircle")]
    pub const Circle: Self = Self(2);
    #[doc(alias = "kPDFLineStyleDiamond")]
    pub const Diamond: Self = Self(3);
    #[doc(alias = "kPDFLineStyleOpenArrow")]
    pub const OpenArrow: Self = Self(4);
    #[doc(alias = "kPDFLineStyleClosedArrow")]
    pub const ClosedArrow: Self = Self(5);
}

unsafe impl Encode for PDFLineStyle {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PDFLineStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdftextannotationicontype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFTextAnnotationIconType(pub NSInteger);
impl PDFTextAnnotationIconType {
    #[doc(alias = "kPDFTextAnnotationIconComment")]
    pub const Comment: Self = Self(0);
    #[doc(alias = "kPDFTextAnnotationIconKey")]
    pub const Key: Self = Self(1);
    #[doc(alias = "kPDFTextAnnotationIconNote")]
    pub const Note: Self = Self(2);
    #[doc(alias = "kPDFTextAnnotationIconHelp")]
    pub const Help: Self = Self(3);
    #[doc(alias = "kPDFTextAnnotationIconNewParagraph")]
    pub const NewParagraph: Self = Self(4);
    #[doc(alias = "kPDFTextAnnotationIconParagraph")]
    pub const Paragraph: Self = Self(5);
    #[doc(alias = "kPDFTextAnnotationIconInsert")]
    pub const Insert: Self = Self(6);
}

unsafe impl Encode for PDFTextAnnotationIconType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PDFTextAnnotationIconType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfmarkuptype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFMarkupType(pub NSInteger);
impl PDFMarkupType {
    #[doc(alias = "kPDFMarkupTypeHighlight")]
    pub const Highlight: Self = Self(0);
    #[doc(alias = "kPDFMarkupTypeStrikeOut")]
    pub const StrikeOut: Self = Self(1);
    #[doc(alias = "kPDFMarkupTypeUnderline")]
    pub const Underline: Self = Self(2);
    #[doc(alias = "kPDFMarkupTypeRedact")]
    pub const Redact: Self = Self(3);
}

unsafe impl Encode for PDFMarkupType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PDFMarkupType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfwidgetcontroltype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFWidgetControlType(pub NSInteger);
impl PDFWidgetControlType {
    #[doc(alias = "kPDFWidgetUnknownControl")]
    pub const UnknownControl: Self = Self(-1);
    #[doc(alias = "kPDFWidgetPushButtonControl")]
    pub const PushButtonControl: Self = Self(0);
    #[doc(alias = "kPDFWidgetRadioButtonControl")]
    pub const RadioButtonControl: Self = Self(1);
    #[doc(alias = "kPDFWidgetCheckBoxControl")]
    pub const CheckBoxControl: Self = Self(2);
}

unsafe impl Encode for PDFWidgetControlType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PDFWidgetControlType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfwidgetcellstate?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFWidgetCellState(pub NSInteger);
impl PDFWidgetCellState {
    #[doc(alias = "kPDFWidgetMixedState")]
    pub const MixedState: Self = Self(-1);
    #[doc(alias = "kPDFWidgetOffState")]
    pub const OffState: Self = Self(0);
    #[doc(alias = "kPDFWidgetOnState")]
    pub const OnState: Self = Self(1);
}

unsafe impl Encode for PDFWidgetCellState {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for PDFWidgetCellState {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypetext?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeText: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypelink?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeLink: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypefreetext?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeFreeText: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypeline?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeLine: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypesquare?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeSquare: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypecircle?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeCircle: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypehighlight?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeHighlight: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypeunderline?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeUnderline: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypestrikeout?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeStrikeOut: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypeink?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeInk: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypestamp?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeStamp: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypepopup?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypePopup: &'static PDFAnnotationSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationsubtypewidget?language=objc)
    #[cfg(feature = "PDFAnnotation")]
    pub static PDFAnnotationSubtypeWidget: &'static PDFAnnotationSubtype;
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationwidgetsubtype?language=objc)
// NS_TYPED_ENUM
pub type PDFAnnotationWidgetSubtype = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationwidgetsubtypebutton?language=objc)
    pub static PDFAnnotationWidgetSubtypeButton: &'static PDFAnnotationWidgetSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationwidgetsubtypechoice?language=objc)
    pub static PDFAnnotationWidgetSubtypeChoice: &'static PDFAnnotationWidgetSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationwidgetsubtypesignature?language=objc)
    pub static PDFAnnotationWidgetSubtypeSignature: &'static PDFAnnotationWidgetSubtype;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationwidgetsubtypetext?language=objc)
    pub static PDFAnnotationWidgetSubtypeText: &'static PDFAnnotationWidgetSubtype;
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstyle?language=objc)
// NS_TYPED_ENUM
pub type PDFAnnotationLineEndingStyle = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstylenone?language=objc)
    pub static PDFAnnotationLineEndingStyleNone: &'static PDFAnnotationLineEndingStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstylesquare?language=objc)
    pub static PDFAnnotationLineEndingStyleSquare: &'static PDFAnnotationLineEndingStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstylecircle?language=objc)
    pub static PDFAnnotationLineEndingStyleCircle: &'static PDFAnnotationLineEndingStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstylediamond?language=objc)
    pub static PDFAnnotationLineEndingStyleDiamond: &'static PDFAnnotationLineEndingStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstyleopenarrow?language=objc)
    pub static PDFAnnotationLineEndingStyleOpenArrow: &'static PDFAnnotationLineEndingStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlineendingstyleclosedarrow?language=objc)
    pub static PDFAnnotationLineEndingStyleClosedArrow: &'static PDFAnnotationLineEndingStyle;
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontype?language=objc)
// NS_TYPED_ENUM
pub type PDFAnnotationTextIconType = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypecomment?language=objc)
    pub static PDFAnnotationTextIconTypeComment: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypekey?language=objc)
    pub static PDFAnnotationTextIconTypeKey: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypenote?language=objc)
    pub static PDFAnnotationTextIconTypeNote: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypehelp?language=objc)
    pub static PDFAnnotationTextIconTypeHelp: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypenewparagraph?language=objc)
    pub static PDFAnnotationTextIconTypeNewParagraph: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypeparagraph?language=objc)
    pub static PDFAnnotationTextIconTypeParagraph: &'static PDFAnnotationTextIconType;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationtexticontypeinsert?language=objc)
    pub static PDFAnnotationTextIconTypeInsert: &'static PDFAnnotationTextIconType;
}

/// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationhighlightingmode?language=objc)
// NS_TYPED_ENUM
pub type PDFAnnotationHighlightingMode = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationhighlightingmodenone?language=objc)
    pub static PDFAnnotationHighlightingModeNone: &'static PDFAnnotationHighlightingMode;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationhighlightingmodeinvert?language=objc)
    pub static PDFAnnotationHighlightingModeInvert: &'static PDFAnnotationHighlightingMode;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationhighlightingmodeoutline?language=objc)
    pub static PDFAnnotationHighlightingModeOutline: &'static PDFAnnotationHighlightingMode;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationhighlightingmodepush?language=objc)
    pub static PDFAnnotationHighlightingModePush: &'static PDFAnnotationHighlightingMode;
}

/// PDFAnnotationUtilities.
#[cfg(feature = "PDFAnnotation")]
impl PDFAnnotation {
    extern_methods!(
        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(font))]
        #[unsafe(method_family = none)]
        pub unsafe fn font(&self) -> Option<Retained<NSFont>>;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// Setter for [`font`][Self::font].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFont:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFont(&self, font: Option<&NSFont>);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(fontColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontColor(&self) -> Option<Retained<NSColor>>;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// Setter for [`fontColor`][Self::fontColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFontColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFontColor(&self, font_color: Option<&NSColor>);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(interiorColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn interiorColor(&self) -> Option<Retained<NSColor>>;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// Setter for [`interiorColor`][Self::interiorColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setInteriorColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setInteriorColor(&self, interior_color: Option<&NSColor>);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(alignment))]
        #[unsafe(method_family = none)]
        pub unsafe fn alignment(&self) -> NSTextAlignment;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// Setter for [`alignment`][Self::alignment].
        #[unsafe(method(setAlignment:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAlignment(&self, alignment: NSTextAlignment);

        #[unsafe(method(startPoint))]
        #[unsafe(method_family = none)]
        pub unsafe fn startPoint(&self) -> NSPoint;

        /// Setter for [`startPoint`][Self::startPoint].
        #[unsafe(method(setStartPoint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setStartPoint(&self, start_point: NSPoint);

        #[unsafe(method(endPoint))]
        #[unsafe(method_family = none)]
        pub unsafe fn endPoint(&self) -> NSPoint;

        /// Setter for [`endPoint`][Self::endPoint].
        #[unsafe(method(setEndPoint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEndPoint(&self, end_point: NSPoint);

        #[unsafe(method(startLineStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn startLineStyle(&self) -> PDFLineStyle;

        /// Setter for [`startLineStyle`][Self::startLineStyle].
        #[unsafe(method(setStartLineStyle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setStartLineStyle(&self, start_line_style: PDFLineStyle);

        #[unsafe(method(endLineStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn endLineStyle(&self) -> PDFLineStyle;

        /// Setter for [`endLineStyle`][Self::endLineStyle].
        #[unsafe(method(setEndLineStyle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEndLineStyle(&self, end_line_style: PDFLineStyle);

        #[unsafe(method(lineStyleFromName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn lineStyleFromName(name: &NSString) -> PDFLineStyle;

        #[unsafe(method(nameForLineStyle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn nameForLineStyle(style: PDFLineStyle) -> Retained<NSString>;

        #[unsafe(method(iconType))]
        #[unsafe(method_family = none)]
        pub unsafe fn iconType(&self) -> PDFTextAnnotationIconType;

        /// Setter for [`iconType`][Self::iconType].
        #[unsafe(method(setIconType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setIconType(&self, icon_type: PDFTextAnnotationIconType);

        #[unsafe(method(quadrilateralPoints))]
        #[unsafe(method_family = none)]
        pub unsafe fn quadrilateralPoints(&self) -> Option<Retained<NSArray<NSValue>>>;

        /// Setter for [`quadrilateralPoints`][Self::quadrilateralPoints].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setQuadrilateralPoints:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setQuadrilateralPoints(
            &self,
            quadrilateral_points: Option<&NSArray<NSValue>>,
        );

        #[unsafe(method(markupType))]
        #[unsafe(method_family = none)]
        pub unsafe fn markupType(&self) -> PDFMarkupType;

        /// Setter for [`markupType`][Self::markupType].
        #[unsafe(method(setMarkupType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMarkupType(&self, markup_type: PDFMarkupType);

        #[unsafe(method(widgetFieldType))]
        #[unsafe(method_family = none)]
        pub unsafe fn widgetFieldType(&self) -> Retained<PDFAnnotationWidgetSubtype>;

        /// Setter for [`widgetFieldType`][Self::widgetFieldType].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setWidgetFieldType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setWidgetFieldType(&self, widget_field_type: &PDFAnnotationWidgetSubtype);

        #[unsafe(method(widgetControlType))]
        #[unsafe(method_family = none)]
        pub unsafe fn widgetControlType(&self) -> PDFWidgetControlType;

        /// Setter for [`widgetControlType`][Self::widgetControlType].
        #[unsafe(method(setWidgetControlType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setWidgetControlType(&self, widget_control_type: PDFWidgetControlType);

        #[unsafe(method(isMultiline))]
        #[unsafe(method_family = none)]
        pub unsafe fn isMultiline(&self) -> bool;

        /// Setter for [`isMultiline`][Self::isMultiline].
        #[unsafe(method(setMultiline:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMultiline(&self, multiline: bool);

        #[unsafe(method(isActivatableTextField))]
        #[unsafe(method_family = none)]
        pub unsafe fn isActivatableTextField(&self) -> bool;

        #[unsafe(method(isPasswordField))]
        #[unsafe(method_family = none)]
        pub unsafe fn isPasswordField(&self) -> bool;

        #[unsafe(method(hasComb))]
        #[unsafe(method_family = none)]
        pub unsafe fn hasComb(&self) -> bool;

        /// Setter for [`hasComb`][Self::hasComb].
        #[unsafe(method(setComb:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setComb(&self, comb: bool);

        #[unsafe(method(maximumLength))]
        #[unsafe(method_family = none)]
        pub unsafe fn maximumLength(&self) -> NSInteger;

        /// Setter for [`maximumLength`][Self::maximumLength].
        #[unsafe(method(setMaximumLength:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaximumLength(&self, maximum_length: NSInteger);

        #[unsafe(method(widgetStringValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn widgetStringValue(&self) -> Option<Retained<NSString>>;

        /// Setter for [`widgetStringValue`][Self::widgetStringValue].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setWidgetStringValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setWidgetStringValue(&self, widget_string_value: Option<&NSString>);

        #[unsafe(method(widgetDefaultStringValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn widgetDefaultStringValue(&self) -> Option<Retained<NSString>>;

        /// Setter for [`widgetDefaultStringValue`][Self::widgetDefaultStringValue].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setWidgetDefaultStringValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setWidgetDefaultStringValue(
            &self,
            widget_default_string_value: Option<&NSString>,
        );

        #[unsafe(method(allowsToggleToOff))]
        #[unsafe(method_family = none)]
        pub unsafe fn allowsToggleToOff(&self) -> bool;

        /// Setter for [`allowsToggleToOff`][Self::allowsToggleToOff].
        #[unsafe(method(setAllowsToggleToOff:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAllowsToggleToOff(&self, allows_toggle_to_off: bool);

        #[unsafe(method(radiosInUnison))]
        #[unsafe(method_family = none)]
        pub unsafe fn radiosInUnison(&self) -> bool;

        /// Setter for [`radiosInUnison`][Self::radiosInUnison].
        #[unsafe(method(setRadiosInUnison:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRadiosInUnison(&self, radios_in_unison: bool);

        #[unsafe(method(isReadOnly))]
        #[unsafe(method_family = none)]
        pub unsafe fn isReadOnly(&self) -> bool;

        /// Setter for [`isReadOnly`][Self::isReadOnly].
        #[unsafe(method(setReadOnly:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setReadOnly(&self, read_only: bool);

        #[unsafe(method(isListChoice))]
        #[unsafe(method_family = none)]
        pub unsafe fn isListChoice(&self) -> bool;

        /// Setter for [`isListChoice`][Self::isListChoice].
        #[unsafe(method(setListChoice:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setListChoice(&self, list_choice: bool);

        #[unsafe(method(choices))]
        #[unsafe(method_family = none)]
        pub unsafe fn choices(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`choices`][Self::choices].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setChoices:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setChoices(&self, choices: Option<&NSArray<NSString>>);

        #[unsafe(method(values))]
        #[unsafe(method_family = none)]
        pub unsafe fn values(&self) -> Option<Retained<NSArray<NSString>>>;

        /// Setter for [`values`][Self::values].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setValues:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setValues(&self, values: Option<&NSArray<NSString>>);

        #[unsafe(method(buttonWidgetState))]
        #[unsafe(method_family = none)]
        pub unsafe fn buttonWidgetState(&self) -> PDFWidgetCellState;

        /// Setter for [`buttonWidgetState`][Self::buttonWidgetState].
        #[unsafe(method(setButtonWidgetState:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setButtonWidgetState(&self, button_widget_state: PDFWidgetCellState);

        #[unsafe(method(buttonWidgetStateString))]
        #[unsafe(method_family = none)]
        pub unsafe fn buttonWidgetStateString(&self) -> Retained<NSString>;

        /// Setter for [`buttonWidgetStateString`][Self::buttonWidgetStateString].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setButtonWidgetStateString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setButtonWidgetStateString(&self, button_widget_state_string: &NSString);

        #[unsafe(method(isOpen))]
        #[unsafe(method_family = none)]
        pub unsafe fn isOpen(&self) -> bool;

        /// Setter for [`isOpen`][Self::isOpen].
        #[unsafe(method(setOpen:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOpen(&self, open: bool);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(paths))]
        #[unsafe(method_family = none)]
        pub unsafe fn paths(&self) -> Option<Retained<NSArray<NSBezierPath>>>;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(addBezierPath:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addBezierPath(&self, path: &NSBezierPath);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(removeBezierPath:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeBezierPath(&self, path: &NSBezierPath);

        #[cfg(feature = "PDFDestination")]
        #[unsafe(method(destination))]
        #[unsafe(method_family = none)]
        pub unsafe fn destination(&self) -> Option<Retained<PDFDestination>>;

        #[cfg(feature = "PDFDestination")]
        /// Setter for [`destination`][Self::destination].
        #[unsafe(method(setDestination:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDestination(&self, destination: Option<&PDFDestination>);

        #[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.
        #[unsafe(method(setURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setURL(&self, url: Option<&NSURL>);

        #[unsafe(method(fieldName))]
        #[unsafe(method_family = none)]
        pub unsafe fn fieldName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`fieldName`][Self::fieldName].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setFieldName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFieldName(&self, field_name: Option<&NSString>);

        #[unsafe(method(caption))]
        #[unsafe(method_family = none)]
        pub unsafe fn caption(&self) -> Option<Retained<NSString>>;

        /// Setter for [`caption`][Self::caption].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCaption:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCaption(&self, caption: Option<&NSString>);

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        #[unsafe(method(backgroundColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;

        #[cfg(feature = "objc2-app-kit")]
        #[cfg(target_os = "macos")]
        /// Setter for [`backgroundColor`][Self::backgroundColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setBackgroundColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);

        #[unsafe(method(stampName))]
        #[unsafe(method_family = none)]
        pub unsafe fn stampName(&self) -> Option<Retained<NSString>>;

        /// Setter for [`stampName`][Self::stampName].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setStampName:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setStampName(&self, stamp_name: Option<&NSString>);
    );
}