use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
pub type UITransitionContextViewControllerKey = NSString;
pub type UITransitionContextViewKey = NSString;
extern_protocol!(
pub unsafe trait UIViewControllerTransitionCoordinatorContext:
NSObjectProtocol + MainThreadOnly
{
#[unsafe(method(isAnimated))]
#[unsafe(method_family = none)]
fn isAnimated(&self) -> bool;
#[cfg(feature = "UIViewController")]
#[unsafe(method(presentationStyle))]
#[unsafe(method_family = none)]
fn presentationStyle(&self) -> UIModalPresentationStyle;
#[unsafe(method(initiallyInteractive))]
#[unsafe(method_family = none)]
fn initiallyInteractive(&self) -> bool;
#[unsafe(method(isInterruptible))]
#[unsafe(method_family = none)]
fn isInterruptible(&self) -> bool;
#[unsafe(method(isInteractive))]
#[unsafe(method_family = none)]
fn isInteractive(&self) -> bool;
#[unsafe(method(isCancelled))]
#[unsafe(method_family = none)]
fn isCancelled(&self) -> bool;
#[unsafe(method(transitionDuration))]
#[unsafe(method_family = none)]
fn transitionDuration(&self) -> NSTimeInterval;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(percentComplete))]
#[unsafe(method_family = none)]
fn percentComplete(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(completionVelocity))]
#[unsafe(method_family = none)]
fn completionVelocity(&self) -> CGFloat;
#[cfg(feature = "UIView")]
#[unsafe(method(completionCurve))]
#[unsafe(method_family = none)]
fn completionCurve(&self) -> UIViewAnimationCurve;
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[unsafe(method(viewControllerForKey:))]
#[unsafe(method_family = none)]
fn viewControllerForKey(
&self,
key: &UITransitionContextViewControllerKey,
) -> Option<Retained<UIViewController>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[unsafe(method(viewForKey:))]
#[unsafe(method_family = none)]
fn viewForKey(&self, key: &UITransitionContextViewKey) -> Option<Retained<UIView>>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[unsafe(method(containerView))]
#[unsafe(method_family = none)]
fn containerView(&self) -> Retained<UIView>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(targetTransform))]
#[unsafe(method_family = none)]
fn targetTransform(&self) -> CGAffineTransform;
}
);
extern_protocol!(
pub unsafe trait UIViewControllerTransitionCoordinator:
UIViewControllerTransitionCoordinatorContext + MainThreadOnly
{
#[cfg(feature = "block2")]
#[unsafe(method(animateAlongsideTransition:completion:))]
#[unsafe(method_family = none)]
fn animateAlongsideTransition_completion(
&self,
animation: Option<
&block2::DynBlock<
dyn Fn(
NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
),
>,
>,
completion: Option<
&block2::DynBlock<
dyn Fn(
NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
),
>,
>,
) -> bool;
#[cfg(all(feature = "UIResponder", feature = "UIView", feature = "block2"))]
#[unsafe(method(animateAlongsideTransitionInView:animation:completion:))]
#[unsafe(method_family = none)]
fn animateAlongsideTransitionInView_animation_completion(
&self,
view: Option<&UIView>,
animation: Option<
&block2::DynBlock<
dyn Fn(
NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
),
>,
>,
completion: Option<
&block2::DynBlock<
dyn Fn(
NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
),
>,
>,
) -> bool;
#[cfg(feature = "block2")]
#[deprecated]
#[unsafe(method(notifyWhenInteractionEndsUsingBlock:))]
#[unsafe(method_family = none)]
fn notifyWhenInteractionEndsUsingBlock(
&self,
handler: &block2::DynBlock<
dyn Fn(NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>),
>,
);
#[cfg(feature = "block2")]
#[unsafe(method(notifyWhenInteractionChangesUsingBlock:))]
#[unsafe(method_family = none)]
fn notifyWhenInteractionChangesUsingBlock(
&self,
handler: &block2::DynBlock<
dyn Fn(NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>),
>,
);
}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIViewController {
extern_methods!(
#[unsafe(method(transitionCoordinator))]
#[unsafe(method_family = none)]
pub fn transitionCoordinator(
&self,
) -> Option<Retained<ProtocolObject<dyn UIViewControllerTransitionCoordinator>>>;
);
}