use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static UIStateRestorationViewControllerStoryboardKey: &'static NSString;
}
extern "C" {
pub static UIApplicationStateRestorationBundleVersionKey: &'static NSString;
}
extern "C" {
pub static UIApplicationStateRestorationUserInterfaceIdiomKey: &'static NSString;
}
extern "C" {
pub static UIApplicationStateRestorationTimestampKey: &'static NSString;
}
extern "C" {
pub static UIApplicationStateRestorationSystemVersionKey: &'static NSString;
}
extern_protocol!(
pub unsafe trait UIViewControllerRestoration: IsMainThreadOnly {
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[method_id(@__retain_semantics Other viewControllerWithRestorationIdentifierPath:coder:)]
unsafe fn viewControllerWithRestorationIdentifierPath_coder(
identifier_components: &NSArray<NSString>,
coder: &NSCoder,
mtm: MainThreadMarker,
) -> Option<Retained<UIViewController>>;
}
unsafe impl ProtocolType for dyn UIViewControllerRestoration {}
);
extern_protocol!(
pub unsafe trait UIDataSourceModelAssociation: IsMainThreadOnly {
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[method_id(@__retain_semantics Other modelIdentifierForElementAtIndexPath:inView:)]
unsafe fn modelIdentifierForElementAtIndexPath_inView(
&self,
idx: &NSIndexPath,
view: &UIView,
) -> Option<Retained<NSString>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[method_id(@__retain_semantics Other indexPathForElementWithModelIdentifier:inView:)]
unsafe fn indexPathForElementWithModelIdentifier_inView(
&self,
identifier: &NSString,
view: &UIView,
) -> Option<Retained<NSIndexPath>>;
}
unsafe impl ProtocolType for dyn UIDataSourceModelAssociation {}
);
extern_protocol!(
pub unsafe trait UIStateRestoring: NSObjectProtocol + IsMainThreadOnly {
#[optional]
#[method_id(@__retain_semantics Other restorationParent)]
unsafe fn restorationParent(
&self,
) -> Option<Retained<ProtocolObject<dyn UIStateRestoring>>>;
#[optional]
#[method(objectRestorationClass)]
unsafe fn objectRestorationClass(&self) -> Option<&'static AnyClass>;
#[optional]
#[method(encodeRestorableStateWithCoder:)]
unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder);
#[optional]
#[method(decodeRestorableStateWithCoder:)]
unsafe fn decodeRestorableStateWithCoder(&self, coder: &NSCoder);
#[optional]
#[method(applicationFinishedRestoringState)]
unsafe fn applicationFinishedRestoringState(&self);
}
unsafe impl ProtocolType for dyn UIStateRestoring {}
);
extern_protocol!(
pub unsafe trait UIObjectRestoration: IsMainThreadOnly {
#[method_id(@__retain_semantics Other objectWithRestorationIdentifierPath:coder:)]
unsafe fn objectWithRestorationIdentifierPath_coder(
identifier_components: &NSArray<NSString>,
coder: &NSCoder,
mtm: MainThreadMarker,
) -> Option<Retained<ProtocolObject<dyn UIStateRestoring>>>;
}
unsafe impl ProtocolType for dyn UIObjectRestoration {}
);