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 unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
35
36 #[unsafe(method(URL))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn URL(&self) -> Retained<NSURL>;
39
40 #[unsafe(method(setURL:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setURL(&self, url: &NSURL);
44
45 #[unsafe(method(displayName))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn displayName(&self) -> Option<Retained<NSString>>;
48
49 #[unsafe(method(setDisplayName:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setDisplayName(&self, display_name: Option<&NSString>);
53
54 #[unsafe(method(txtRecord))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn txtRecord(&self) -> Option<Retained<NSData>>;
57
58 #[unsafe(method(setTxtRecord:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setTxtRecord(&self, txt_record: Option<&NSData>);
62 );
63}
64
65impl UIPrinterDestination {
67 extern_methods!(
68 #[unsafe(method(init))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72 #[unsafe(method(new))]
73 #[unsafe(method_family = new)]
74 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
75 );
76}
77
78extern_class!(
79 #[unsafe(super(NSObject))]
81 #[thread_kind = MainThreadOnly]
82 #[derive(Debug, PartialEq, Eq, Hash)]
83 pub struct UIPrintServiceExtension;
84);
85
86extern_conformance!(
87 unsafe impl NSObjectProtocol for UIPrintServiceExtension {}
88);
89
90impl UIPrintServiceExtension {
91 extern_methods!(
92 #[cfg(feature = "UIPrintInfo")]
93 #[unsafe(method(printerDestinationsForPrintInfo:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn printerDestinationsForPrintInfo(
96 &self,
97 print_info: &UIPrintInfo,
98 ) -> Retained<NSArray<UIPrinterDestination>>;
99 );
100}
101
102impl UIPrintServiceExtension {
104 extern_methods!(
105 #[unsafe(method(init))]
106 #[unsafe(method_family = init)]
107 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
108
109 #[unsafe(method(new))]
110 #[unsafe(method_family = new)]
111 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
112 );
113}