objc2_ui_kit/generated/
UIDragPreview.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidragpreview?language=objc)
11    #[unsafe(super(NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct UIDragPreview;
15);
16
17extern_conformance!(
18    unsafe impl NSCopying for UIDragPreview {}
19);
20
21unsafe impl CopyingHelper for UIDragPreview {
22    type Result = Self;
23}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for UIDragPreview {}
27);
28
29impl UIDragPreview {
30    extern_methods!(
31        #[cfg(all(
32            feature = "UIDragPreviewParameters",
33            feature = "UIPreviewParameters",
34            feature = "UIResponder",
35            feature = "UIView"
36        ))]
37        #[unsafe(method(initWithView:parameters:))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn initWithView_parameters(
40            this: Allocated<Self>,
41            view: &UIView,
42            parameters: &UIDragPreviewParameters,
43        ) -> Retained<Self>;
44
45        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
46        #[unsafe(method(initWithView:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithView(this: Allocated<Self>, view: &UIView) -> Retained<Self>;
49
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
57
58        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
59        #[unsafe(method(view))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn view(&self) -> Retained<UIView>;
62
63        #[cfg(all(feature = "UIDragPreviewParameters", feature = "UIPreviewParameters"))]
64        #[unsafe(method(parameters))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn parameters(&self) -> Retained<UIDragPreviewParameters>;
67    );
68}