use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type NSStoryboardSegueIdentifier = NSString;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSStoryboardSegue;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSStoryboardSegue {}
);
impl NSStoryboardSegue {
extern_methods!(
#[cfg(feature = "block2")]
#[unsafe(method(segueWithIdentifier:source:destination:performHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn segueWithIdentifier_source_destination_performHandler(
identifier: &NSStoryboardSegueIdentifier,
source_controller: &AnyObject,
destination_controller: &AnyObject,
perform_handler: &block2::DynBlock<dyn Fn()>,
) -> Retained<Self>;
#[unsafe(method(initWithIdentifier:source:destination:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier_source_destination(
this: Allocated<Self>,
identifier: &NSStoryboardSegueIdentifier,
source_controller: &AnyObject,
destination_controller: &AnyObject,
) -> Retained<Self>;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub fn identifier(&self) -> Option<Retained<NSStoryboardSegueIdentifier>>;
#[unsafe(method(sourceController))]
#[unsafe(method_family = none)]
pub fn sourceController(&self) -> Retained<AnyObject>;
#[unsafe(method(destinationController))]
#[unsafe(method_family = none)]
pub fn destinationController(&self) -> Retained<AnyObject>;
#[unsafe(method(perform))]
#[unsafe(method_family = none)]
pub fn perform(&self);
);
}
impl NSStoryboardSegue {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSStoryboardSegue {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_protocol!(
pub unsafe trait NSSeguePerforming: NSObjectProtocol + MainThreadOnly {
#[optional]
#[unsafe(method(prepareForSegue:sender:))]
#[unsafe(method_family = none)]
unsafe fn prepareForSegue_sender(
&self,
segue: &NSStoryboardSegue,
sender: Option<&AnyObject>,
);
#[optional]
#[unsafe(method(performSegueWithIdentifier:sender:))]
#[unsafe(method_family = none)]
unsafe fn performSegueWithIdentifier_sender(
&self,
identifier: &NSStoryboardSegueIdentifier,
sender: Option<&AnyObject>,
);
#[optional]
#[unsafe(method(shouldPerformSegueWithIdentifier:sender:))]
#[unsafe(method_family = none)]
unsafe fn shouldPerformSegueWithIdentifier_sender(
&self,
identifier: &NSStoryboardSegueIdentifier,
sender: Option<&AnyObject>,
) -> bool;
}
);