objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

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

extern_conformance!(
    unsafe impl NSObjectProtocol for UIPrintPaper {}
);

impl UIPrintPaper {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(bestPaperForPageSize:withPapersFromArray:))]
        #[unsafe(method_family = none)]
        pub fn bestPaperForPageSize_withPapersFromArray(
            content_size: CGSize,
            paper_list: &NSArray<UIPrintPaper>,
        ) -> Retained<UIPrintPaper>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(paperSize))]
        #[unsafe(method_family = none)]
        pub fn paperSize(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(printableRect))]
        #[unsafe(method_family = none)]
        pub fn printableRect(&self) -> CGRect;
    );
}

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

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

impl DefaultRetained for UIPrintPaper {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// Deprecated_Nonfunctional.
impl UIPrintPaper {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(printRect))]
        #[unsafe(method_family = none)]
        pub fn printRect(&self) -> CGRect;
    );
}