objc2_store_kit/generated/
SKOverlay.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait SKOverlayDelegate: NSObjectProtocol {
13 #[optional]
14 #[unsafe(method(storeOverlay:didFailToLoadWithError:))]
15 #[unsafe(method_family = none)]
16 unsafe fn storeOverlay_didFailToLoadWithError(&self, overlay: &SKOverlay, error: &NSError);
17
18 #[cfg(feature = "SKOverlayTransitionContext")]
19 #[optional]
20 #[unsafe(method(storeOverlay:willStartPresentation:))]
21 #[unsafe(method_family = none)]
22 unsafe fn storeOverlay_willStartPresentation(
23 &self,
24 overlay: &SKOverlay,
25 transition_context: &SKOverlayTransitionContext,
26 );
27
28 #[cfg(feature = "SKOverlayTransitionContext")]
29 #[optional]
30 #[unsafe(method(storeOverlay:didFinishPresentation:))]
31 #[unsafe(method_family = none)]
32 unsafe fn storeOverlay_didFinishPresentation(
33 &self,
34 overlay: &SKOverlay,
35 transition_context: &SKOverlayTransitionContext,
36 );
37
38 #[cfg(feature = "SKOverlayTransitionContext")]
39 #[optional]
40 #[unsafe(method(storeOverlay:willStartDismissal:))]
41 #[unsafe(method_family = none)]
42 unsafe fn storeOverlay_willStartDismissal(
43 &self,
44 overlay: &SKOverlay,
45 transition_context: &SKOverlayTransitionContext,
46 );
47
48 #[cfg(feature = "SKOverlayTransitionContext")]
49 #[optional]
50 #[unsafe(method(storeOverlay:didFinishDismissal:))]
51 #[unsafe(method_family = none)]
52 unsafe fn storeOverlay_didFinishDismissal(
53 &self,
54 overlay: &SKOverlay,
55 transition_context: &SKOverlayTransitionContext,
56 );
57 }
58);
59
60extern_class!(
61 #[unsafe(super(NSObject))]
63 #[derive(Debug, PartialEq, Eq, Hash)]
64 pub struct SKOverlay;
65);
66
67unsafe impl NSObjectProtocol for SKOverlay {}
68
69impl SKOverlay {
70 extern_methods!(
71 #[unsafe(method(init))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75 #[unsafe(method(new))]
76 #[unsafe(method_family = new)]
77 pub unsafe fn new() -> Retained<Self>;
78
79 #[cfg(feature = "SKOverlayConfiguration")]
80 #[unsafe(method(initWithConfiguration:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithConfiguration(
86 this: Allocated<Self>,
87 configuration: &SKOverlayConfiguration,
88 ) -> Retained<Self>;
89
90 #[unsafe(method(delegate))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn SKOverlayDelegate>>>;
94
95 #[unsafe(method(setDelegate:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn SKOverlayDelegate>>);
100
101 #[cfg(feature = "SKOverlayConfiguration")]
102 #[unsafe(method(configuration))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn configuration(&self) -> Retained<SKOverlayConfiguration>;
106 );
107}