objc2_app_kit/generated/
NSPDFImageRep.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSImageRep, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSImageRep")]
15 pub struct NSPDFImageRep;
16);
17
18#[cfg(feature = "NSImageRep")]
19extern_conformance!(
20 unsafe impl NSCoding for NSPDFImageRep {}
21);
22
23#[cfg(feature = "NSImageRep")]
24extern_conformance!(
25 unsafe impl NSCopying for NSPDFImageRep {}
26);
27
28#[cfg(feature = "NSImageRep")]
29unsafe impl CopyingHelper for NSPDFImageRep {
30 type Result = Self;
31}
32
33#[cfg(feature = "NSImageRep")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for NSPDFImageRep {}
36);
37
38#[cfg(feature = "NSImageRep")]
39impl NSPDFImageRep {
40 extern_methods!(
41 #[unsafe(method(imageRepWithData:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn imageRepWithData(pdf_data: &NSData) -> Option<Retained<Self>>;
44
45 #[unsafe(method(initWithData:))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn initWithData(
48 this: Allocated<Self>,
49 pdf_data: &NSData,
50 ) -> Option<Retained<Self>>;
51
52 #[unsafe(method(PDFRepresentation))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn PDFRepresentation(&self) -> Retained<NSData>;
55
56 #[unsafe(method(bounds))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn bounds(&self) -> NSRect;
59
60 #[unsafe(method(currentPage))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn currentPage(&self) -> NSInteger;
63
64 #[unsafe(method(setCurrentPage:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setCurrentPage(&self, current_page: NSInteger);
68
69 #[unsafe(method(pageCount))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn pageCount(&self) -> NSInteger;
72 );
73}
74
75#[cfg(feature = "NSImageRep")]
77impl NSPDFImageRep {
78 extern_methods!(
79 #[unsafe(method(init))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83 #[unsafe(method(initWithCoder:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithCoder(
86 this: Allocated<Self>,
87 coder: &NSCoder,
88 ) -> Option<Retained<Self>>;
89 );
90}
91
92#[cfg(feature = "NSImageRep")]
94impl NSPDFImageRep {
95 extern_methods!(
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new() -> Retained<Self>;
99 );
100}