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        /// This is a [weak property][objc2::topics::weak_property].
86        /// Setter for [`delegate`][Self::delegate].
87        #[unsafe(method(setDelegate:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn setDelegate(
90            &self,
91            delegate: Option<&ProtocolObject<dyn PKPaymentAuthorizationViewControllerDelegate>>,
92        );
93
94        #[cfg(feature = "PKPaymentRequest")]
95        #[unsafe(method(initWithPaymentRequest:))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn initWithPaymentRequest(
98            this: Allocated<Self>,
99            request: &PKPaymentRequest,
100        ) -> Option<Retained<Self>>;
101
102        #[unsafe(method(supportsDisbursements))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn supportsDisbursements(mtm: MainThreadMarker) -> bool;
105
106        #[cfg(feature = "PKConstants")]
107        #[unsafe(method(supportsDisbursementsUsingNetworks:))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn supportsDisbursementsUsingNetworks(
110            supported_networks: &NSArray<PKPaymentNetwork>,
111            mtm: MainThreadMarker,
112        ) -> bool;
113
114        #[cfg(all(feature = "PKConstants", feature = "PKPaymentRequest"))]
115        #[unsafe(method(supportsDisbursementsUsingNetworks:capabilities:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn supportsDisbursementsUsingNetworks_capabilities(
118            supported_networks: &NSArray<PKPaymentNetwork>,
119            capabilities: PKMerchantCapability,
120            mtm: MainThreadMarker,
121        ) -> bool;
122
123        #[cfg(feature = "PKDisbursementRequest")]
124        #[unsafe(method(initWithDisbursementRequest:))]
125        #[unsafe(method_family = init)]
126        pub unsafe fn initWithDisbursementRequest(
127            this: Allocated<Self>,
128            request: &PKDisbursementRequest,
129        ) -> Retained<Self>;
130    );
131}
132
133/// Methods declared on superclass `NSViewController`.
134#[cfg(feature = "objc2-app-kit")]
135#[cfg(target_os = "macos")]
136impl PKPaymentAuthorizationViewController {
137    extern_methods!(
138        #[unsafe(method(initWithNibName:bundle:))]
139        #[unsafe(method_family = init)]
140        pub unsafe fn initWithNibName_bundle(
141            this: Allocated<Self>,
142            nib_name_or_nil: Option<&NSNibName>,
143            nib_bundle_or_nil: Option<&NSBundle>,
144        ) -> Retained<Self>;
145
146        #[unsafe(method(initWithCoder:))]
147        #[unsafe(method_family = init)]
148        pub unsafe fn initWithCoder(
149            this: Allocated<Self>,
150            coder: &NSCoder,
151        ) -> Option<Retained<Self>>;
152    );
153}
154
155/// Methods declared on superclass `NSResponder`.
156#[cfg(feature = "objc2-app-kit")]
157#[cfg(target_os = "macos")]
158impl PKPaymentAuthorizationViewController {
159    extern_methods!(
160        #[unsafe(method(init))]
161        #[unsafe(method_family = init)]
162        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
163    );
164}
165
166/// Methods declared on superclass `NSObject`.
167#[cfg(feature = "objc2-app-kit")]
168#[cfg(target_os = "macos")]
169impl PKPaymentAuthorizationViewController {
170    extern_methods!(
171        #[unsafe(method(new))]
172        #[unsafe(method_family = new)]
173        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
174    );
175}