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(UIPreviewTarget, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UITargetedPreview")]
pub struct UIDragPreviewTarget;
);
#[cfg(feature = "UITargetedPreview")]
extern_conformance!(
unsafe impl NSCopying for UIDragPreviewTarget {}
);
#[cfg(feature = "UITargetedPreview")]
unsafe impl CopyingHelper for UIDragPreviewTarget {
type Result = Self;
}
#[cfg(feature = "UITargetedPreview")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIDragPreviewTarget {}
);
#[cfg(feature = "UITargetedPreview")]
impl UIDragPreviewTarget {
extern_methods!();
}
#[cfg(feature = "UITargetedPreview")]
impl UIDragPreviewTarget {
extern_methods!(
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-core-foundation"
))]
#[unsafe(method(initWithContainer:center:transform:))]
#[unsafe(method_family = init)]
pub fn initWithContainer_center_transform(
this: Allocated<Self>,
container: &UIView,
center: CGPoint,
transform: CGAffineTransform,
) -> Retained<Self>;
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-core-foundation"
))]
#[unsafe(method(initWithContainer:center:))]
#[unsafe(method_family = init)]
pub fn initWithContainer_center(
this: Allocated<Self>,
container: &UIView,
center: CGPoint,
) -> Retained<Self>;
#[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>;
);
}
extern_class!(
#[unsafe(super(UITargetedPreview, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UITargetedPreview")]
pub struct UITargetedDragPreview;
);
#[cfg(feature = "UITargetedPreview")]
extern_conformance!(
unsafe impl NSCopying for UITargetedDragPreview {}
);
#[cfg(feature = "UITargetedPreview")]
unsafe impl CopyingHelper for UITargetedDragPreview {
type Result = Self;
}
#[cfg(feature = "UITargetedPreview")]
extern_conformance!(
unsafe impl NSObjectProtocol for UITargetedDragPreview {}
);
#[cfg(feature = "UITargetedPreview")]
impl UITargetedDragPreview {
extern_methods!(
#[unsafe(method(retargetedPreviewWithTarget:))]
#[unsafe(method_family = none)]
pub unsafe fn retargetedPreviewWithTarget(
&self,
new_target: &UIDragPreviewTarget,
) -> Retained<UITargetedDragPreview>;
);
}
#[cfg(feature = "UITargetedPreview")]
impl UITargetedDragPreview {
extern_methods!(
#[cfg(all(
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UIView"
))]
#[unsafe(method(initWithView:parameters:target:))]
#[unsafe(method_family = init)]
pub fn initWithView_parameters_target(
this: Allocated<Self>,
view: &UIView,
parameters: &UIPreviewParameters,
target: &UIPreviewTarget,
) -> Retained<Self>;
#[cfg(all(
feature = "UIPreviewParameters",
feature = "UIResponder",
feature = "UIView"
))]
#[unsafe(method(initWithView:parameters:))]
#[unsafe(method_family = init)]
pub fn initWithView_parameters(
this: Allocated<Self>,
view: &UIView,
parameters: &UIPreviewParameters,
) -> Retained<Self>;
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
#[unsafe(method(initWithView:))]
#[unsafe(method_family = init)]
pub fn initWithView(this: Allocated<Self>, view: &UIView) -> Retained<Self>;
#[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>;
);
}