use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(
feature = "UIAction",
feature = "UIMenuElement",
feature = "UIWindowSceneActivationConfiguration",
feature = "block2"
))]
pub type UIWindowSceneActivationActionConfigurationProvider = *mut block2::DynBlock<
dyn Fn(NonNull<UIWindowSceneActivationAction>) -> *mut UIWindowSceneActivationConfiguration,
>;
extern_class!(
#[unsafe(super(UIAction, UIMenuElement, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
pub struct UIWindowSceneActivationAction;
);
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
extern_conformance!(
unsafe impl NSCoding for UIWindowSceneActivationAction {}
);
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
extern_conformance!(
unsafe impl NSCopying for UIWindowSceneActivationAction {}
);
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
unsafe impl CopyingHelper for UIWindowSceneActivationAction {
type Result = Self;
}
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIWindowSceneActivationAction {}
);
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
extern_conformance!(
unsafe impl NSSecureCoding for UIWindowSceneActivationAction {}
);
#[cfg(all(
feature = "UIAction",
feature = "UIMenuElement",
feature = "UIMenuLeaf"
))]
extern_conformance!(
unsafe impl UIMenuLeaf for UIWindowSceneActivationAction {}
);
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
impl UIWindowSceneActivationAction {
extern_methods!(
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Retained<NSString>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub fn setTitle(&self, title: Option<&NSString>);
#[cfg(all(feature = "UIWindowSceneActivationConfiguration", feature = "block2"))]
#[unsafe(method(actionWithIdentifier:alternateAction:configurationProvider:))]
#[unsafe(method_family = none)]
pub unsafe fn actionWithIdentifier_alternateAction_configurationProvider(
identifier: Option<&UIActionIdentifier>,
alternate_action: Option<&UIAction>,
configuration_provider: UIWindowSceneActivationActionConfigurationProvider,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[unsafe(method(actionWithHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn actionWithHandler(
handler: UIActionHandler,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(all(feature = "UIImage", feature = "block2"))]
#[unsafe(method(actionWithTitle:image:identifier:handler:))]
#[unsafe(method_family = none)]
pub unsafe fn actionWithTitle_image_identifier_handler(
title: &NSString,
image: Option<&UIImage>,
identifier: Option<&UIActionIdentifier>,
handler: UIActionHandler,
mtm: MainThreadMarker,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
impl UIWindowSceneActivationAction {
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(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
impl UIWindowSceneActivationAction {
extern_methods!(
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}