objc2_ui_kit/generated/
UIPrintPaper.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiprintpaper?language=objc)
13    #[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
44/// Methods declared on superclass `NSObject`.
45impl 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
57/// Deprecated_Nonfunctional.
58impl 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}