objc2_ui_kit/generated/
UIPrintPaper.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(NSObject))]
14 #[thread_kind = MainThreadOnly]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct UIPrintPaper;
17);
18
19unsafe impl NSObjectProtocol for UIPrintPaper {}
20
21impl UIPrintPaper {
22 extern_methods!(
23 #[cfg(feature = "objc2-core-foundation")]
24 #[unsafe(method(bestPaperForPageSize:withPapersFromArray:))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn bestPaperForPageSize_withPapersFromArray(
27 content_size: CGSize,
28 paper_list: &NSArray<UIPrintPaper>,
29 mtm: MainThreadMarker,
30 ) -> Retained<UIPrintPaper>;
31
32 #[cfg(feature = "objc2-core-foundation")]
33 #[unsafe(method(paperSize))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn paperSize(&self) -> CGSize;
36
37 #[cfg(feature = "objc2-core-foundation")]
38 #[unsafe(method(printableRect))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn printableRect(&self) -> CGRect;
41 );
42}
43
44impl UIPrintPaper {
46 extern_methods!(
47 #[unsafe(method(init))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51 #[unsafe(method(new))]
52 #[unsafe(method_family = new)]
53 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
54 );
55}
56
57impl UIPrintPaper {
59 extern_methods!(
60 #[cfg(feature = "objc2-core-foundation")]
61 #[unsafe(method(printRect))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn printRect(&self) -> CGRect;
64 );
65}