objc2_app_kit/generated/
NSPDFImageRep.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspdfimagerep?language=objc)
12    #[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        /// Setter for [`currentPage`][Self::currentPage].
65        #[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/// Methods declared on superclass `NSImageRep`.
76#[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/// Methods declared on superclass `NSObject`.
93#[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}