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::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIZoomTransitionOptions;
);
extern_conformance!(
unsafe impl NSCopying for UIZoomTransitionOptions {}
);
unsafe impl CopyingHelper for UIZoomTransitionOptions {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIZoomTransitionOptions {}
);
impl UIZoomTransitionOptions {
extern_methods!(
#[cfg(feature = "block2")]
#[unsafe(method(interactiveDismissShouldBegin))]
#[unsafe(method_family = none)]
pub unsafe fn interactiveDismissShouldBegin(
&self,
) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>;
#[cfg(feature = "block2")]
#[unsafe(method(setInteractiveDismissShouldBegin:))]
#[unsafe(method_family = none)]
pub fn setInteractiveDismissShouldBegin(
&self,
interactive_dismiss_should_begin: Option<
&block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>,
>,
);
#[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
#[unsafe(method(alignmentRectProvider))]
#[unsafe(method_family = none)]
pub unsafe fn alignmentRectProvider(
&self,
) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>;
#[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
#[unsafe(method(setAlignmentRectProvider:))]
#[unsafe(method_family = none)]
pub fn setAlignmentRectProvider(
&self,
alignment_rect_provider: Option<
&block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>,
>,
);
#[cfg(feature = "UIColor")]
#[unsafe(method(dimmingColor))]
#[unsafe(method_family = none)]
pub fn dimmingColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setDimmingColor:))]
#[unsafe(method_family = none)]
pub fn setDimmingColor(&self, dimming_color: Option<&UIColor>);
#[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
#[unsafe(method(dimmingVisualEffect))]
#[unsafe(method_family = none)]
pub fn dimmingVisualEffect(&self, mtm: MainThreadMarker) -> Option<Retained<UIBlurEffect>>;
#[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
#[unsafe(method(setDimmingVisualEffect:))]
#[unsafe(method_family = none)]
pub fn setDimmingVisualEffect(&self, dimming_visual_effect: Option<&UIBlurEffect>);
);
}
impl UIZoomTransitionOptions {
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 UIZoomTransitionOptions {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIZoomTransitionInteractionContext;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIZoomTransitionInteractionContext {}
);
impl UIZoomTransitionInteractionContext {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(location))]
#[unsafe(method_family = none)]
pub fn location(&self) -> CGPoint;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(velocity))]
#[unsafe(method_family = none)]
pub fn velocity(&self) -> CGVector;
#[unsafe(method(willBegin))]
#[unsafe(method_family = none)]
pub fn willBegin(&self) -> bool;
);
}
impl UIZoomTransitionInteractionContext {
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 UIZoomTransitionInteractionContext {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIZoomTransitionAlignmentRectContext;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIZoomTransitionAlignmentRectContext {}
);
impl UIZoomTransitionAlignmentRectContext {
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[unsafe(method(sourceView))]
#[unsafe(method_family = none)]
pub fn sourceView(&self, mtm: MainThreadMarker) -> Retained<UIView>;
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[unsafe(method(zoomedViewController))]
#[unsafe(method_family = none)]
pub fn zoomedViewController(&self, mtm: MainThreadMarker) -> Retained<UIViewController>;
);
}
impl UIZoomTransitionAlignmentRectContext {
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 UIZoomTransitionAlignmentRectContext {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}