objc2_ui_kit/generated/
UIPrintServiceExtension.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiprinterdestination?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UIPrinterDestination;
16);
17
18unsafe impl NSCoding for UIPrinterDestination {}
19
20unsafe impl NSObjectProtocol for UIPrinterDestination {}
21
22unsafe impl NSSecureCoding for UIPrinterDestination {}
23
24impl UIPrinterDestination {
25    extern_methods!(
26        #[unsafe(method(initWithURL:))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
29
30        #[unsafe(method(URL))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn URL(&self) -> Retained<NSURL>;
33
34        /// Setter for [`URL`][Self::URL].
35        #[unsafe(method(setURL:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setURL(&self, url: &NSURL);
38
39        #[unsafe(method(displayName))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn displayName(&self) -> Option<Retained<NSString>>;
42
43        /// Setter for [`displayName`][Self::displayName].
44        #[unsafe(method(setDisplayName:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setDisplayName(&self, display_name: Option<&NSString>);
47
48        #[unsafe(method(txtRecord))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn txtRecord(&self) -> Option<Retained<NSData>>;
51
52        /// Setter for [`txtRecord`][Self::txtRecord].
53        #[unsafe(method(setTxtRecord:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setTxtRecord(&self, txt_record: Option<&NSData>);
56    );
57}
58
59/// Methods declared on superclass `NSObject`.
60impl UIPrinterDestination {
61    extern_methods!(
62        #[unsafe(method(init))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65
66        #[unsafe(method(new))]
67        #[unsafe(method_family = new)]
68        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
69    );
70}
71
72extern_class!(
73    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiprintserviceextension?language=objc)
74    #[unsafe(super(NSObject))]
75    #[thread_kind = MainThreadOnly]
76    #[derive(Debug, PartialEq, Eq, Hash)]
77    pub struct UIPrintServiceExtension;
78);
79
80unsafe impl NSObjectProtocol for UIPrintServiceExtension {}
81
82impl UIPrintServiceExtension {
83    extern_methods!(
84        #[cfg(feature = "UIPrintInfo")]
85        #[unsafe(method(printerDestinationsForPrintInfo:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn printerDestinationsForPrintInfo(
88            &self,
89            print_info: &UIPrintInfo,
90        ) -> Retained<NSArray<UIPrinterDestination>>;
91    );
92}
93
94/// Methods declared on superclass `NSObject`.
95impl UIPrintServiceExtension {
96    extern_methods!(
97        #[unsafe(method(init))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
100
101        #[unsafe(method(new))]
102        #[unsafe(method_family = new)]
103        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
104    );
105}