objc2_ui_kit/generated/
UIPrintServiceExtension.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UIPrinterDestination;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for UIPrinterDestination {}
20);
21
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UIPrinterDestination {}
24);
25
26extern_conformance!(
27 unsafe impl NSSecureCoding for UIPrinterDestination {}
28);
29
30impl UIPrinterDestination {
31 extern_methods!(
32 #[unsafe(method(initWithURL:))]
33 #[unsafe(method_family = init)]
34 pub fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
35
36 #[unsafe(method(URL))]
37 #[unsafe(method_family = none)]
38 pub fn URL(&self) -> Retained<NSURL>;
39
40 #[unsafe(method(setURL:))]
44 #[unsafe(method_family = none)]
45 pub fn setURL(&self, url: &NSURL);
46
47 #[unsafe(method(displayName))]
48 #[unsafe(method_family = none)]
49 pub fn displayName(&self) -> Option<Retained<NSString>>;
50
51 #[unsafe(method(setDisplayName:))]
55 #[unsafe(method_family = none)]
56 pub fn setDisplayName(&self, display_name: Option<&NSString>);
57
58 #[unsafe(method(txtRecord))]
59 #[unsafe(method_family = none)]
60 pub fn txtRecord(&self) -> Option<Retained<NSData>>;
61
62 #[unsafe(method(setTxtRecord:))]
66 #[unsafe(method_family = none)]
67 pub fn setTxtRecord(&self, txt_record: Option<&NSData>);
68 );
69}
70
71impl UIPrinterDestination {
73 extern_methods!(
74 #[unsafe(method(init))]
75 #[unsafe(method_family = init)]
76 pub fn init(this: Allocated<Self>) -> Retained<Self>;
77
78 #[unsafe(method(new))]
79 #[unsafe(method_family = new)]
80 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
81 );
82}
83
84extern_class!(
85 #[unsafe(super(NSObject))]
87 #[thread_kind = MainThreadOnly]
88 #[derive(Debug, PartialEq, Eq, Hash)]
89 pub struct UIPrintServiceExtension;
90);
91
92extern_conformance!(
93 unsafe impl NSObjectProtocol for UIPrintServiceExtension {}
94);
95
96impl UIPrintServiceExtension {
97 extern_methods!(
98 #[cfg(feature = "UIPrintInfo")]
99 #[unsafe(method(printerDestinationsForPrintInfo:))]
100 #[unsafe(method_family = none)]
101 pub fn printerDestinationsForPrintInfo(
102 &self,
103 print_info: &UIPrintInfo,
104 ) -> Retained<NSArray<UIPrinterDestination>>;
105 );
106}
107
108impl UIPrintServiceExtension {
110 extern_methods!(
111 #[unsafe(method(init))]
112 #[unsafe(method_family = init)]
113 pub fn init(this: Allocated<Self>) -> Retained<Self>;
114
115 #[unsafe(method(new))]
116 #[unsafe(method_family = new)]
117 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
118 );
119}