objc2_pdf_kit/generated/
PDFDestination.rs1use 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 #[cfg(feature = "objc2-core-foundation")]
15 pub static kPDFDestinationUnspecifiedValue: CGFloat;
16}
17
18extern_class!(
19 #[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 #[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
74impl 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}