use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[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;
);
}
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()
}
}
impl UIPrintPaper {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(printRect))]
#[unsafe(method_family = none)]
pub fn printRect(&self) -> CGRect;
);
}