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")]
19unsafe impl NSCoding for NSPDFImageRep {}
20
21#[cfg(feature = "NSImageRep")]
22unsafe impl NSCopying for NSPDFImageRep {}
23
24#[cfg(feature = "NSImageRep")]
25unsafe impl CopyingHelper for NSPDFImageRep {
26 type Result = Self;
27}
28
29#[cfg(feature = "NSImageRep")]
30unsafe impl NSObjectProtocol for NSPDFImageRep {}
31
32#[cfg(feature = "NSImageRep")]
33impl NSPDFImageRep {
34 extern_methods!(
35 #[unsafe(method(imageRepWithData:))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn imageRepWithData(pdf_data: &NSData) -> Option<Retained<Self>>;
38
39 #[unsafe(method(initWithData:))]
40 #[unsafe(method_family = init)]
41 pub unsafe fn initWithData(
42 this: Allocated<Self>,
43 pdf_data: &NSData,
44 ) -> Option<Retained<Self>>;
45
46 #[unsafe(method(PDFRepresentation))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn PDFRepresentation(&self) -> Retained<NSData>;
49
50 #[unsafe(method(bounds))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn bounds(&self) -> NSRect;
53
54 #[unsafe(method(currentPage))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn currentPage(&self) -> NSInteger;
57
58 #[unsafe(method(setCurrentPage:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setCurrentPage(&self, current_page: NSInteger);
62
63 #[unsafe(method(pageCount))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn pageCount(&self) -> NSInteger;
66 );
67}
68
69#[cfg(feature = "NSImageRep")]
71impl NSPDFImageRep {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(initWithCoder:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithCoder(
80 this: Allocated<Self>,
81 coder: &NSCoder,
82 ) -> Option<Retained<Self>>;
83 );
84}
85
86#[cfg(feature = "NSImageRep")]
88impl NSPDFImageRep {
89 extern_methods!(
90 #[unsafe(method(new))]
91 #[unsafe(method_family = new)]
92 pub unsafe fn new() -> Retained<Self>;
93 );
94}