use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait SKOverlayDelegate: NSObjectProtocol {
#[optional]
#[unsafe(method(storeOverlay:didFailToLoadWithError:))]
#[unsafe(method_family = none)]
unsafe fn storeOverlay_didFailToLoadWithError(&self, overlay: &SKOverlay, error: &NSError);
#[cfg(feature = "SKOverlayTransitionContext")]
#[optional]
#[unsafe(method(storeOverlay:willStartPresentation:))]
#[unsafe(method_family = none)]
unsafe fn storeOverlay_willStartPresentation(
&self,
overlay: &SKOverlay,
transition_context: &SKOverlayTransitionContext,
);
#[cfg(feature = "SKOverlayTransitionContext")]
#[optional]
#[unsafe(method(storeOverlay:didFinishPresentation:))]
#[unsafe(method_family = none)]
unsafe fn storeOverlay_didFinishPresentation(
&self,
overlay: &SKOverlay,
transition_context: &SKOverlayTransitionContext,
);
#[cfg(feature = "SKOverlayTransitionContext")]
#[optional]
#[unsafe(method(storeOverlay:willStartDismissal:))]
#[unsafe(method_family = none)]
unsafe fn storeOverlay_willStartDismissal(
&self,
overlay: &SKOverlay,
transition_context: &SKOverlayTransitionContext,
);
#[cfg(feature = "SKOverlayTransitionContext")]
#[optional]
#[unsafe(method(storeOverlay:didFinishDismissal:))]
#[unsafe(method_family = none)]
unsafe fn storeOverlay_didFinishDismissal(
&self,
overlay: &SKOverlay,
transition_context: &SKOverlayTransitionContext,
);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKOverlay;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKOverlay {}
);
impl SKOverlay {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[cfg(feature = "SKOverlayConfiguration")]
#[unsafe(method(initWithConfiguration:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithConfiguration(
this: Allocated<Self>,
configuration: &SKOverlayConfiguration,
) -> Retained<Self>;
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn SKOverlayDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn SKOverlayDelegate>>);
#[cfg(feature = "SKOverlayConfiguration")]
#[unsafe(method(configuration))]
#[unsafe(method_family = none)]
pub unsafe fn configuration(&self) -> Retained<SKOverlayConfiguration>;
);
}