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
17extern_conformance!(
18    unsafe impl NSCoding for NSPDFInfo {}
19);
20
21extern_conformance!(
22    unsafe impl NSCopying for NSPDFInfo {}
23);
24
25unsafe impl CopyingHelper for NSPDFInfo {
26    type Result = Self;
27}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for NSPDFInfo {}
31);
32
33impl NSPDFInfo {
34    extern_methods!(
35        #[unsafe(method(URL))]
36        #[unsafe(method_family = none)]
37        pub fn URL(&self) -> Option<Retained<NSURL>>;
38
39        /// Setter for [`URL`][Self::URL].
40        ///
41        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
42        #[unsafe(method(setURL:))]
43        #[unsafe(method_family = none)]
44        pub fn setURL(&self, url: Option<&NSURL>);
45
46        #[unsafe(method(isFileExtensionHidden))]
47        #[unsafe(method_family = none)]
48        pub fn isFileExtensionHidden(&self) -> bool;
49
50        /// Setter for [`isFileExtensionHidden`][Self::isFileExtensionHidden].
51        #[unsafe(method(setFileExtensionHidden:))]
52        #[unsafe(method_family = none)]
53        pub fn setFileExtensionHidden(&self, file_extension_hidden: bool);
54
55        #[unsafe(method(tagNames))]
56        #[unsafe(method_family = none)]
57        pub fn tagNames(&self) -> Retained<NSArray<NSString>>;
58
59        /// Setter for [`tagNames`][Self::tagNames].
60        ///
61        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
62        #[unsafe(method(setTagNames:))]
63        #[unsafe(method_family = none)]
64        pub fn setTagNames(&self, tag_names: &NSArray<NSString>);
65
66        #[cfg(feature = "NSPrintInfo")]
67        #[unsafe(method(orientation))]
68        #[unsafe(method_family = none)]
69        pub fn orientation(&self) -> NSPaperOrientation;
70
71        #[cfg(feature = "NSPrintInfo")]
72        /// Setter for [`orientation`][Self::orientation].
73        #[unsafe(method(setOrientation:))]
74        #[unsafe(method_family = none)]
75        pub fn setOrientation(&self, orientation: NSPaperOrientation);
76
77        #[unsafe(method(paperSize))]
78        #[unsafe(method_family = none)]
79        pub fn paperSize(&self) -> NSSize;
80
81        /// Setter for [`paperSize`][Self::paperSize].
82        #[unsafe(method(setPaperSize:))]
83        #[unsafe(method_family = none)]
84        pub fn setPaperSize(&self, paper_size: NSSize);
85
86        #[cfg(feature = "NSPrintInfo")]
87        /// # Safety
88        ///
89        /// The returned generic should be of the correct type.
90        #[unsafe(method(attributes))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn attributes(
93            &self,
94        ) -> Retained<NSMutableDictionary<NSPrintInfoAttributeKey, AnyObject>>;
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99impl NSPDFInfo {
100    extern_methods!(
101        #[unsafe(method(init))]
102        #[unsafe(method_family = init)]
103        pub fn init(this: Allocated<Self>) -> Retained<Self>;
104
105        #[unsafe(method(new))]
106        #[unsafe(method_family = new)]
107        pub fn new() -> Retained<Self>;
108    );
109}
110
111impl DefaultRetained for NSPDFInfo {
112    #[inline]
113    fn default_retained() -> Retained<Self> {
114        Self::new()
115    }
116}