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