objc2_app_kit/generated/
NSPDFInfo.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/nspdfinfo?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSPDFInfo;
15);
16
17unsafe impl NSCoding for NSPDFInfo {}
18
19unsafe impl NSCopying for NSPDFInfo {}
20
21unsafe impl CopyingHelper for NSPDFInfo {
22    type Result = Self;
23}
24
25unsafe impl NSObjectProtocol for NSPDFInfo {}
26
27impl NSPDFInfo {
28    extern_methods!(
29        #[unsafe(method(URL))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
32
33        /// Setter for [`URL`][Self::URL].
34        #[unsafe(method(setURL:))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn setURL(&self, url: Option<&NSURL>);
37
38        #[unsafe(method(isFileExtensionHidden))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn isFileExtensionHidden(&self) -> bool;
41
42        /// Setter for [`isFileExtensionHidden`][Self::isFileExtensionHidden].
43        #[unsafe(method(setFileExtensionHidden:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setFileExtensionHidden(&self, file_extension_hidden: bool);
46
47        #[unsafe(method(tagNames))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn tagNames(&self) -> Retained<NSArray<NSString>>;
50
51        /// Setter for [`tagNames`][Self::tagNames].
52        #[unsafe(method(setTagNames:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setTagNames(&self, tag_names: &NSArray<NSString>);
55
56        #[cfg(feature = "NSPrintInfo")]
57        #[unsafe(method(orientation))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn orientation(&self) -> NSPaperOrientation;
60
61        #[cfg(feature = "NSPrintInfo")]
62        /// Setter for [`orientation`][Self::orientation].
63        #[unsafe(method(setOrientation:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation);
66
67        #[unsafe(method(paperSize))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn paperSize(&self) -> NSSize;
70
71        /// Setter for [`paperSize`][Self::paperSize].
72        #[unsafe(method(setPaperSize:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn setPaperSize(&self, paper_size: NSSize);
75
76        #[cfg(feature = "NSPrintInfo")]
77        #[unsafe(method(attributes))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn attributes(
80            &self,
81        ) -> Retained<NSMutableDictionary<NSPrintInfoAttributeKey, AnyObject>>;
82    );
83}
84
85/// Methods declared on superclass `NSObject`.
86impl NSPDFInfo {
87    extern_methods!(
88        #[unsafe(method(init))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92        #[unsafe(method(new))]
93        #[unsafe(method_family = new)]
94        pub unsafe fn new() -> Retained<Self>;
95    );
96}