//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspdfinfo?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSPDFInfo;
);

unsafe impl NSCoding for NSPDFInfo {}

unsafe impl NSCopying for NSPDFInfo {}

unsafe impl CopyingHelper for NSPDFInfo {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSPDFInfo {}

impl NSPDFInfo {
    extern_methods!(
        #[unsafe(method(URL))]
        #[unsafe(method_family = none)]
        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`URL`][Self::URL].
        #[unsafe(method(setURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setURL(&self, url: Option<&NSURL>);

        #[unsafe(method(isFileExtensionHidden))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFileExtensionHidden(&self) -> bool;

        /// Setter for [`isFileExtensionHidden`][Self::isFileExtensionHidden].
        #[unsafe(method(setFileExtensionHidden:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFileExtensionHidden(&self, file_extension_hidden: bool);

        #[unsafe(method(tagNames))]
        #[unsafe(method_family = none)]
        pub unsafe fn tagNames(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`tagNames`][Self::tagNames].
        #[unsafe(method(setTagNames:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTagNames(&self, tag_names: &NSArray<NSString>);

        #[cfg(feature = "NSPrintInfo")]
        #[unsafe(method(orientation))]
        #[unsafe(method_family = none)]
        pub unsafe fn orientation(&self) -> NSPaperOrientation;

        #[cfg(feature = "NSPrintInfo")]
        /// Setter for [`orientation`][Self::orientation].
        #[unsafe(method(setOrientation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation);

        #[unsafe(method(paperSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn paperSize(&self) -> NSSize;

        /// Setter for [`paperSize`][Self::paperSize].
        #[unsafe(method(setPaperSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPaperSize(&self, paper_size: NSSize);

        #[cfg(feature = "NSPrintInfo")]
        #[unsafe(method(attributes))]
        #[unsafe(method_family = none)]
        pub unsafe fn attributes(
            &self,
        ) -> Retained<NSMutableDictionary<NSPrintInfoAttributeKey, AnyObject>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSPDFInfo {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
