icrate/generated/AppKit/
NSPDFImageRep.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_class!(
9    #[derive(Debug, PartialEq, Eq, Hash)]
10    #[cfg(feature = "AppKit_NSPDFImageRep")]
11    pub struct NSPDFImageRep;
12
13    #[cfg(feature = "AppKit_NSPDFImageRep")]
14    unsafe impl ClassType for NSPDFImageRep {
15        #[inherits(NSObject)]
16        type Super = NSImageRep;
17        type Mutability = InteriorMutable;
18    }
19);
20
21#[cfg(feature = "AppKit_NSPDFImageRep")]
22unsafe impl NSCoding for NSPDFImageRep {}
23
24#[cfg(feature = "AppKit_NSPDFImageRep")]
25unsafe impl NSCopying for NSPDFImageRep {}
26
27#[cfg(feature = "AppKit_NSPDFImageRep")]
28unsafe impl NSObjectProtocol for NSPDFImageRep {}
29
30extern_methods!(
31    #[cfg(feature = "AppKit_NSPDFImageRep")]
32    unsafe impl NSPDFImageRep {
33        #[cfg(feature = "Foundation_NSData")]
34        #[method_id(@__retain_semantics Other imageRepWithData:)]
35        pub unsafe fn imageRepWithData(pdf_data: &NSData) -> Option<Id<Self>>;
36
37        #[cfg(feature = "Foundation_NSData")]
38        #[method_id(@__retain_semantics Init initWithData:)]
39        pub unsafe fn initWithData(this: Allocated<Self>, pdf_data: &NSData) -> Option<Id<Self>>;
40
41        #[cfg(feature = "Foundation_NSData")]
42        #[method_id(@__retain_semantics Other PDFRepresentation)]
43        pub unsafe fn PDFRepresentation(&self) -> Id<NSData>;
44
45        #[method(bounds)]
46        pub unsafe fn bounds(&self) -> NSRect;
47
48        #[method(currentPage)]
49        pub unsafe fn currentPage(&self) -> NSInteger;
50
51        #[method(setCurrentPage:)]
52        pub unsafe fn setCurrentPage(&self, current_page: NSInteger);
53
54        #[method(pageCount)]
55        pub unsafe fn pageCount(&self) -> NSInteger;
56    }
57);
58
59extern_methods!(
60    /// Methods declared on superclass `NSImageRep`
61    #[cfg(feature = "AppKit_NSPDFImageRep")]
62    unsafe impl NSPDFImageRep {
63        #[method_id(@__retain_semantics Init init)]
64        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
65
66        #[cfg(feature = "Foundation_NSCoder")]
67        #[method_id(@__retain_semantics Init initWithCoder:)]
68        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
69    }
70);
71
72extern_methods!(
73    /// Methods declared on superclass `NSObject`
74    #[cfg(feature = "AppKit_NSPDFImageRep")]
75    unsafe impl NSPDFImageRep {
76        #[method_id(@__retain_semantics New new)]
77        pub unsafe fn new() -> Id<Self>;
78    }
79);