objc2_pdf_kit/generated/
PDFAnnotationLink.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
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfannotationlink?language=objc)
12    #[unsafe(super(PDFAnnotation, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "PDFAnnotation")]
15    #[deprecated]
16    pub struct PDFAnnotationLink;
17);
18
19#[cfg(feature = "PDFAnnotation")]
20extern_conformance!(
21    unsafe impl NSCoding for PDFAnnotationLink {}
22);
23
24#[cfg(feature = "PDFAnnotation")]
25extern_conformance!(
26    unsafe impl NSCopying for PDFAnnotationLink {}
27);
28
29#[cfg(feature = "PDFAnnotation")]
30unsafe impl CopyingHelper for PDFAnnotationLink {
31    type Result = Self;
32}
33
34#[cfg(feature = "PDFAnnotation")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for PDFAnnotationLink {}
37);
38
39#[cfg(feature = "PDFAnnotation")]
40impl PDFAnnotationLink {
41    extern_methods!(
42        #[cfg(feature = "PDFDestination")]
43        #[deprecated]
44        #[unsafe(method(destination))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn destination(&self) -> Option<Retained<PDFDestination>>;
47
48        #[cfg(feature = "PDFDestination")]
49        /// # Safety
50        ///
51        /// `destination` might not allow `None`.
52        #[deprecated]
53        #[unsafe(method(setDestination:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setDestination(&self, destination: Option<&PDFDestination>);
56
57        #[deprecated]
58        #[unsafe(method(URL))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
61
62        /// # Safety
63        ///
64        /// `url` might not allow `None`.
65        #[deprecated]
66        #[unsafe(method(setURL:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setURL(&self, url: Option<&NSURL>);
69    );
70}
71
72/// Methods declared on superclass `PDFAnnotation`.
73#[cfg(feature = "PDFAnnotation")]
74impl PDFAnnotationLink {
75    extern_methods!(
76        /// # Safety
77        ///
78        /// `properties` generic should be of the correct type.
79        #[unsafe(method(initWithBounds:forType:withProperties:))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn initWithBounds_forType_withProperties(
82            this: Allocated<Self>,
83            bounds: NSRect,
84            annotation_type: &PDFAnnotationSubtype,
85            properties: Option<&NSDictionary>,
86        ) -> Retained<Self>;
87    );
88}
89
90/// Methods declared on superclass `NSObject`.
91#[cfg(feature = "PDFAnnotation")]
92impl PDFAnnotationLink {
93    extern_methods!(
94        #[unsafe(method(init))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98        #[unsafe(method(new))]
99        #[unsafe(method_family = new)]
100        pub unsafe fn new() -> Retained<Self>;
101    );
102}