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
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        /// Setter for [`URL`][Self::URL].
41        #[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        /// Setter for [`displayName`][Self::displayName].
50        #[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        /// Setter for [`txtRecord`][Self::txtRecord].
59        #[unsafe(method(setTxtRecord:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn setTxtRecord(&self, txt_record: Option<&NSData>);
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66impl 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    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiprintserviceextension?language=objc)
80    #[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
102/// Methods declared on superclass `NSObject`.
103impl 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}