objc2_pass_kit/generated/
PKPaymentAuthorizationViewController.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::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymentauthorizationviewcontroller?language=objc)
15    #[unsafe(super(NSViewController, NSResponder, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "objc2-app-kit")]
18    #[cfg(target_os = "macos")]
19    pub struct PKPaymentAuthorizationViewController;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25    unsafe impl NSCoding for PKPaymentAuthorizationViewController {}
26);
27
28#[cfg(feature = "objc2-app-kit")]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31    unsafe impl NSEditor for PKPaymentAuthorizationViewController {}
32);
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37    unsafe impl NSObjectProtocol for PKPaymentAuthorizationViewController {}
38);
39
40#[cfg(feature = "objc2-app-kit")]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43    unsafe impl NSSeguePerforming for PKPaymentAuthorizationViewController {}
44);
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49    unsafe impl NSUserInterfaceItemIdentification for PKPaymentAuthorizationViewController {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54impl PKPaymentAuthorizationViewController {
55    extern_methods!(
56        #[unsafe(method(canMakePayments))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn canMakePayments(mtm: MainThreadMarker) -> bool;
59
60        #[cfg(feature = "PKConstants")]
61        #[unsafe(method(canMakePaymentsUsingNetworks:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn canMakePaymentsUsingNetworks(
64            supported_networks: &NSArray<PKPaymentNetwork>,
65            mtm: MainThreadMarker,
66        ) -> bool;
67
68        #[cfg(all(feature = "PKConstants", feature = "PKPaymentRequest"))]
69        #[unsafe(method(canMakePaymentsUsingNetworks:capabilities:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn canMakePaymentsUsingNetworks_capabilities(
72            supported_networks: &NSArray<PKPaymentNetwork>,
73            capabilties: PKMerchantCapability,
74            mtm: MainThreadMarker,
75        ) -> bool;
76
77        #[cfg(feature = "PKPaymentAuthorizationViewControllerDelegate")]
78        #[unsafe(method(delegate))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn delegate(
81            &self,
82        ) -> Option<Retained<ProtocolObject<dyn PKPaymentAuthorizationViewControllerDelegate>>>;
83
84        #[cfg(feature = "PKPaymentAuthorizationViewControllerDelegate")]
85        /// Setter for [`delegate`][Self::delegate].
86        ///
87        /// This is a [weak property][objc2::topics::weak_property].
88        #[unsafe(method(setDelegate:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setDelegate(
91            &self,
92            delegate: Option<&ProtocolObject<dyn PKPaymentAuthorizationViewControllerDelegate>>,
93        );
94
95        #[cfg(feature = "PKPaymentRequest")]
96        #[unsafe(method(initWithPaymentRequest:))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn initWithPaymentRequest(
99            this: Allocated<Self>,
100            request: &PKPaymentRequest,
101        ) -> Option<Retained<Self>>;
102
103        #[unsafe(method(supportsDisbursements))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn supportsDisbursements(mtm: MainThreadMarker) -> bool;
106
107        #[cfg(feature = "PKConstants")]
108        #[unsafe(method(supportsDisbursementsUsingNetworks:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn supportsDisbursementsUsingNetworks(
111            supported_networks: &NSArray<PKPaymentNetwork>,
112            mtm: MainThreadMarker,
113        ) -> bool;
114
115        #[cfg(all(feature = "PKConstants", feature = "PKPaymentRequest"))]
116        #[unsafe(method(supportsDisbursementsUsingNetworks:capabilities:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn supportsDisbursementsUsingNetworks_capabilities(
119            supported_networks: &NSArray<PKPaymentNetwork>,
120            capabilities: PKMerchantCapability,
121            mtm: MainThreadMarker,
122        ) -> bool;
123
124        #[cfg(feature = "PKDisbursementRequest")]
125        #[unsafe(method(initWithDisbursementRequest:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithDisbursementRequest(
128            this: Allocated<Self>,
129            request: &PKDisbursementRequest,
130        ) -> Retained<Self>;
131    );
132}
133
134/// Methods declared on superclass `NSViewController`.
135#[cfg(feature = "objc2-app-kit")]
136#[cfg(target_os = "macos")]
137impl PKPaymentAuthorizationViewController {
138    extern_methods!(
139        #[unsafe(method(initWithNibName:bundle:))]
140        #[unsafe(method_family = init)]
141        pub unsafe fn initWithNibName_bundle(
142            this: Allocated<Self>,
143            nib_name_or_nil: Option<&NSNibName>,
144            nib_bundle_or_nil: Option<&NSBundle>,
145        ) -> Retained<Self>;
146
147        /// # Safety
148        ///
149        /// `coder` possibly has further requirements.
150        #[unsafe(method(initWithCoder:))]
151        #[unsafe(method_family = init)]
152        pub unsafe fn initWithCoder(
153            this: Allocated<Self>,
154            coder: &NSCoder,
155        ) -> Option<Retained<Self>>;
156    );
157}
158
159/// Methods declared on superclass `NSResponder`.
160#[cfg(feature = "objc2-app-kit")]
161#[cfg(target_os = "macos")]
162impl PKPaymentAuthorizationViewController {
163    extern_methods!(
164        #[unsafe(method(init))]
165        #[unsafe(method_family = init)]
166        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
167    );
168}
169
170/// Methods declared on superclass `NSObject`.
171#[cfg(feature = "objc2-app-kit")]
172#[cfg(target_os = "macos")]
173impl PKPaymentAuthorizationViewController {
174    extern_methods!(
175        #[unsafe(method(new))]
176        #[unsafe(method_family = new)]
177        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
178    );
179}