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 fn imageRepWithData(pdf_data: &NSData) -> Option<Retained<Self>>;
44
45 #[unsafe(method(initWithData:))]
46 #[unsafe(method_family = init)]
47 pub fn initWithData(this: Allocated<Self>, pdf_data: &NSData) -> Option<Retained<Self>>;
48
49 #[unsafe(method(PDFRepresentation))]
50 #[unsafe(method_family = none)]
51 pub fn PDFRepresentation(&self) -> Retained<NSData>;
52
53 #[unsafe(method(bounds))]
54 #[unsafe(method_family = none)]
55 pub fn bounds(&self) -> NSRect;
56
57 #[unsafe(method(currentPage))]
58 #[unsafe(method_family = none)]
59 pub fn currentPage(&self) -> NSInteger;
60
61 #[unsafe(method(setCurrentPage:))]
63 #[unsafe(method_family = none)]
64 pub fn setCurrentPage(&self, current_page: NSInteger);
65
66 #[unsafe(method(pageCount))]
67 #[unsafe(method_family = none)]
68 pub fn pageCount(&self) -> NSInteger;
69 );
70}
71
72#[cfg(feature = "NSImageRep")]
74impl NSPDFImageRep {
75 extern_methods!(
76 #[unsafe(method(init))]
77 #[unsafe(method_family = init)]
78 pub fn init(this: Allocated<Self>) -> Retained<Self>;
79
80 #[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 fn new() -> Retained<Self>;
99 );
100}
101
102#[cfg(feature = "NSImageRep")]
103impl DefaultRetained for NSPDFImageRep {
104 #[inline]
105 fn default_retained() -> Retained<Self> {
106 Self::new()
107 }
108}