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
17unsafe impl NSCopying for UIDragPreview {}
18
19unsafe impl CopyingHelper for UIDragPreview {
20    type Result = Self;
21}
22
23unsafe impl NSObjectProtocol for UIDragPreview {}
24
25impl UIDragPreview {
26    extern_methods!(
27        #[cfg(all(
28            feature = "UIDragPreviewParameters",
29            feature = "UIPreviewParameters",
30            feature = "UIResponder",
31            feature = "UIView"
32        ))]
33        #[unsafe(method(initWithView:parameters:))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn initWithView_parameters(
36            this: Allocated<Self>,
37            view: &UIView,
38            parameters: &UIDragPreviewParameters,
39        ) -> Retained<Self>;
40
41        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
42        #[unsafe(method(initWithView:))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn initWithView(this: Allocated<Self>, view: &UIView) -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
53
54        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
55        #[unsafe(method(view))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn view(&self) -> Retained<UIView>;
58
59        #[cfg(all(feature = "UIDragPreviewParameters", feature = "UIPreviewParameters"))]
60        #[unsafe(method(parameters))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn parameters(&self) -> Retained<UIDragPreviewParameters>;
63    );
64}