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
19extern_conformance!(
20 unsafe impl NSObjectProtocol for UIPrintPaper {}
21);
22
23impl UIPrintPaper {
24 extern_methods!(
25 #[cfg(feature = "objc2-core-foundation")]
26 #[unsafe(method(bestPaperForPageSize:withPapersFromArray:))]
27 #[unsafe(method_family = none)]
28 pub unsafe fn bestPaperForPageSize_withPapersFromArray(
29 content_size: CGSize,
30 paper_list: &NSArray<UIPrintPaper>,
31 mtm: MainThreadMarker,
32 ) -> Retained<UIPrintPaper>;
33
34 #[cfg(feature = "objc2-core-foundation")]
35 #[unsafe(method(paperSize))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn paperSize(&self) -> CGSize;
38
39 #[cfg(feature = "objc2-core-foundation")]
40 #[unsafe(method(printableRect))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn printableRect(&self) -> CGRect;
43 );
44}
45
46impl UIPrintPaper {
48 extern_methods!(
49 #[unsafe(method(init))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53 #[unsafe(method(new))]
54 #[unsafe(method_family = new)]
55 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
56 );
57}
58
59impl UIPrintPaper {
61 extern_methods!(
62 #[cfg(feature = "objc2-core-foundation")]
63 #[unsafe(method(printRect))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn printRect(&self) -> CGRect;
66 );
67}