objc2_pdf_kit/generated/
PDFDestination.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern "C" {
13    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/kpdfdestinationunspecifiedvalue?language=objc)
14    #[cfg(feature = "objc2-core-foundation")]
15    pub static kPDFDestinationUnspecifiedValue: CGFloat;
16}
17
18extern_class!(
19    /// [Apple's documentation](https://developer.apple.com/documentation/pdfkit/pdfdestination?language=objc)
20    #[unsafe(super(NSObject))]
21    #[derive(Debug, PartialEq, Eq, Hash)]
22    pub struct PDFDestination;
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for PDFDestination {}
27);
28
29unsafe impl CopyingHelper for PDFDestination {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for PDFDestination {}
35);
36
37impl PDFDestination {
38    extern_methods!(
39        #[cfg(feature = "PDFPage")]
40        #[unsafe(method(initWithPage:atPoint:))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn initWithPage_atPoint(
43            this: Allocated<Self>,
44            page: &PDFPage,
45            point: NSPoint,
46        ) -> Retained<Self>;
47
48        #[cfg(feature = "PDFPage")]
49        #[unsafe(method(page))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn page(&self) -> Option<Retained<PDFPage>>;
52
53        #[unsafe(method(point))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn point(&self) -> NSPoint;
56
57        #[cfg(feature = "objc2-core-foundation")]
58        #[unsafe(method(zoom))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn zoom(&self) -> CGFloat;
61
62        #[cfg(feature = "objc2-core-foundation")]
63        /// Setter for [`zoom`][Self::zoom].
64        #[unsafe(method(setZoom:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setZoom(&self, zoom: CGFloat);
67
68        #[unsafe(method(compare:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn compare(&self, destination: &PDFDestination) -> NSComparisonResult;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75impl PDFDestination {
76    extern_methods!(
77        #[unsafe(method(init))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81        #[unsafe(method(new))]
82        #[unsafe(method_family = new)]
83        pub unsafe fn new() -> Retained<Self>;
84    );
85}