objc2_pass_kit/generated/
PKPaymentButton.rs1use 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::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(NSButton, NSControl, NSView, NSResponder, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "objc2-app-kit")]
20 #[cfg(target_os = "macos")]
21 pub struct PKPaymentButton;
22);
23
24#[cfg(feature = "objc2-app-kit")]
25#[cfg(target_os = "macos")]
26extern_conformance!(
27 unsafe impl NSAccessibility for PKPaymentButton {}
28);
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32extern_conformance!(
33 unsafe impl NSAccessibilityButton for PKPaymentButton {}
34);
35
36#[cfg(feature = "objc2-app-kit")]
37#[cfg(target_os = "macos")]
38extern_conformance!(
39 unsafe impl NSAccessibilityElementProtocol for PKPaymentButton {}
40);
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44extern_conformance!(
45 unsafe impl NSAnimatablePropertyContainer for PKPaymentButton {}
46);
47
48#[cfg(feature = "objc2-app-kit")]
49#[cfg(target_os = "macos")]
50extern_conformance!(
51 unsafe impl NSAppearanceCustomization for PKPaymentButton {}
52);
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56extern_conformance!(
57 unsafe impl NSCoding for PKPaymentButton {}
58);
59
60#[cfg(feature = "objc2-app-kit")]
61#[cfg(target_os = "macos")]
62extern_conformance!(
63 unsafe impl NSDraggingDestination for PKPaymentButton {}
64);
65
66#[cfg(feature = "objc2-app-kit")]
67#[cfg(target_os = "macos")]
68extern_conformance!(
69 unsafe impl NSObjectProtocol for PKPaymentButton {}
70);
71
72#[cfg(feature = "objc2-app-kit")]
73#[cfg(target_os = "macos")]
74extern_conformance!(
75 unsafe impl NSUserInterfaceCompression for PKPaymentButton {}
76);
77
78#[cfg(feature = "objc2-app-kit")]
79#[cfg(target_os = "macos")]
80extern_conformance!(
81 unsafe impl NSUserInterfaceItemIdentification for PKPaymentButton {}
82);
83
84#[cfg(feature = "objc2-app-kit")]
85#[cfg(target_os = "macos")]
86extern_conformance!(
87 unsafe impl NSUserInterfaceValidations for PKPaymentButton {}
88);
89
90#[cfg(feature = "objc2-app-kit")]
91#[cfg(target_os = "macos")]
92impl PKPaymentButton {
93 extern_methods!(
94 #[cfg(feature = "PKConstants")]
95 #[unsafe(method(buttonWithType:style:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn buttonWithType_style(
98 button_type: PKPaymentButtonType,
99 button_style: PKPaymentButtonStyle,
100 mtm: MainThreadMarker,
101 ) -> Retained<Self>;
102
103 #[cfg(feature = "PKConstants")]
104 #[unsafe(method(initWithPaymentButtonType:paymentButtonStyle:))]
105 #[unsafe(method_family = init)]
106 pub unsafe fn initWithPaymentButtonType_paymentButtonStyle(
107 this: Allocated<Self>,
108 r#type: PKPaymentButtonType,
109 style: PKPaymentButtonStyle,
110 ) -> Retained<Self>;
111
112 #[cfg(feature = "PKConstants")]
113 #[unsafe(method(buttonWithType:style:disableCardArt:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn buttonWithType_style_disableCardArt(
116 button_type: PKPaymentButtonType,
117 button_style: PKPaymentButtonStyle,
118 disable_card_art: bool,
119 mtm: MainThreadMarker,
120 ) -> Retained<Self>;
121
122 #[cfg(feature = "PKConstants")]
123 #[unsafe(method(initWithPaymentButtonType:paymentButtonStyle:disableCardArt:))]
124 #[unsafe(method_family = init)]
125 pub unsafe fn initWithPaymentButtonType_paymentButtonStyle_disableCardArt(
126 this: Allocated<Self>,
127 r#type: PKPaymentButtonType,
128 style: PKPaymentButtonStyle,
129 disable_card_art: bool,
130 ) -> Retained<Self>;
131
132 #[cfg(feature = "objc2-core-foundation")]
133 #[unsafe(method(cornerRadius))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn cornerRadius(&self) -> CGFloat;
136
137 #[cfg(feature = "objc2-core-foundation")]
138 #[unsafe(method(setCornerRadius:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setCornerRadius(&self, corner_radius: CGFloat);
142 );
143}
144
145#[cfg(feature = "objc2-app-kit")]
147#[cfg(target_os = "macos")]
148impl PKPaymentButton {
149 extern_methods!(
150 #[unsafe(method(buttonWithTitle:image:target:action:))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn buttonWithTitle_image_target_action(
169 title: &NSString,
170 image: &NSImage,
171 target: Option<&AnyObject>,
172 action: Option<Sel>,
173 mtm: MainThreadMarker,
174 ) -> Retained<Self>;
175
176 #[unsafe(method(buttonWithTitle:target:action:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn buttonWithTitle_target_action(
193 title: &NSString,
194 target: Option<&AnyObject>,
195 action: Option<Sel>,
196 mtm: MainThreadMarker,
197 ) -> Retained<Self>;
198
199 #[unsafe(method(buttonWithImage:target:action:))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn buttonWithImage_target_action(
216 image: &NSImage,
217 target: Option<&AnyObject>,
218 action: Option<Sel>,
219 mtm: MainThreadMarker,
220 ) -> Retained<Self>;
221
222 #[unsafe(method(checkboxWithTitle:target:action:))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn checkboxWithTitle_target_action(
239 title: &NSString,
240 target: Option<&AnyObject>,
241 action: Option<Sel>,
242 mtm: MainThreadMarker,
243 ) -> Retained<Self>;
244
245 #[unsafe(method(radioButtonWithTitle:target:action:))]
260 #[unsafe(method_family = none)]
261 pub unsafe fn radioButtonWithTitle_target_action(
262 title: &NSString,
263 target: Option<&AnyObject>,
264 action: Option<Sel>,
265 mtm: MainThreadMarker,
266 ) -> Retained<Self>;
267 );
268}
269
270#[cfg(feature = "objc2-app-kit")]
272#[cfg(target_os = "macos")]
273impl PKPaymentButton {
274 extern_methods!(
275 #[unsafe(method(initWithFrame:))]
276 #[unsafe(method_family = init)]
277 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
278
279 #[unsafe(method(initWithCoder:))]
283 #[unsafe(method_family = init)]
284 pub unsafe fn initWithCoder(
285 this: Allocated<Self>,
286 coder: &NSCoder,
287 ) -> Option<Retained<Self>>;
288 );
289}
290
291#[cfg(feature = "objc2-app-kit")]
293#[cfg(target_os = "macos")]
294impl PKPaymentButton {
295 extern_methods!(
296 #[unsafe(method(init))]
297 #[unsafe(method_family = init)]
298 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
299 );
300}
301
302#[cfg(feature = "objc2-app-kit")]
304#[cfg(target_os = "macos")]
305impl PKPaymentButton {
306 extern_methods!(
307 #[unsafe(method(new))]
308 #[unsafe(method_family = new)]
309 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
310 );
311}