objc2_ui_kit/generated/
UITargetedDragPreview.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::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidragpreviewtarget?language=objc)
13    #[unsafe(super(UIPreviewTarget, NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "UITargetedPreview")]
17    pub struct UIDragPreviewTarget;
18);
19
20#[cfg(feature = "UITargetedPreview")]
21extern_conformance!(
22    unsafe impl NSCopying for UIDragPreviewTarget {}
23);
24
25#[cfg(feature = "UITargetedPreview")]
26unsafe impl CopyingHelper for UIDragPreviewTarget {
27    type Result = Self;
28}
29
30#[cfg(feature = "UITargetedPreview")]
31extern_conformance!(
32    unsafe impl NSObjectProtocol for UIDragPreviewTarget {}
33);
34
35#[cfg(feature = "UITargetedPreview")]
36impl UIDragPreviewTarget {
37    extern_methods!();
38}
39
40/// Methods declared on superclass `UIPreviewTarget`.
41#[cfg(feature = "UITargetedPreview")]
42impl UIDragPreviewTarget {
43    extern_methods!(
44        #[cfg(all(
45            feature = "UIResponder",
46            feature = "UIView",
47            feature = "objc2-core-foundation"
48        ))]
49        #[unsafe(method(initWithContainer:center:transform:))]
50        #[unsafe(method_family = init)]
51        pub fn initWithContainer_center_transform(
52            this: Allocated<Self>,
53            container: &UIView,
54            center: CGPoint,
55            transform: CGAffineTransform,
56        ) -> Retained<Self>;
57
58        #[cfg(all(
59            feature = "UIResponder",
60            feature = "UIView",
61            feature = "objc2-core-foundation"
62        ))]
63        #[unsafe(method(initWithContainer:center:))]
64        #[unsafe(method_family = init)]
65        pub fn initWithContainer_center(
66            this: Allocated<Self>,
67            container: &UIView,
68            center: CGPoint,
69        ) -> Retained<Self>;
70
71        #[unsafe(method(init))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75        #[unsafe(method(new))]
76        #[unsafe(method_family = new)]
77        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
78    );
79}
80
81extern_class!(
82    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitargeteddragpreview?language=objc)
83    #[unsafe(super(UITargetedPreview, NSObject))]
84    #[thread_kind = MainThreadOnly]
85    #[derive(Debug, PartialEq, Eq, Hash)]
86    #[cfg(feature = "UITargetedPreview")]
87    pub struct UITargetedDragPreview;
88);
89
90#[cfg(feature = "UITargetedPreview")]
91extern_conformance!(
92    unsafe impl NSCopying for UITargetedDragPreview {}
93);
94
95#[cfg(feature = "UITargetedPreview")]
96unsafe impl CopyingHelper for UITargetedDragPreview {
97    type Result = Self;
98}
99
100#[cfg(feature = "UITargetedPreview")]
101extern_conformance!(
102    unsafe impl NSObjectProtocol for UITargetedDragPreview {}
103);
104
105#[cfg(feature = "UITargetedPreview")]
106impl UITargetedDragPreview {
107    extern_methods!(
108        #[unsafe(method(retargetedPreviewWithTarget:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn retargetedPreviewWithTarget(
111            &self,
112            new_target: &UIDragPreviewTarget,
113        ) -> Retained<UITargetedDragPreview>;
114    );
115}
116
117/// Methods declared on superclass `UITargetedPreview`.
118#[cfg(feature = "UITargetedPreview")]
119impl UITargetedDragPreview {
120    extern_methods!(
121        #[cfg(all(
122            feature = "UIPreviewParameters",
123            feature = "UIResponder",
124            feature = "UIView"
125        ))]
126        #[unsafe(method(initWithView:parameters:target:))]
127        #[unsafe(method_family = init)]
128        pub fn initWithView_parameters_target(
129            this: Allocated<Self>,
130            view: &UIView,
131            parameters: &UIPreviewParameters,
132            target: &UIPreviewTarget,
133        ) -> Retained<Self>;
134
135        #[cfg(all(
136            feature = "UIPreviewParameters",
137            feature = "UIResponder",
138            feature = "UIView"
139        ))]
140        #[unsafe(method(initWithView:parameters:))]
141        #[unsafe(method_family = init)]
142        pub fn initWithView_parameters(
143            this: Allocated<Self>,
144            view: &UIView,
145            parameters: &UIPreviewParameters,
146        ) -> Retained<Self>;
147
148        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
149        #[unsafe(method(initWithView:))]
150        #[unsafe(method_family = init)]
151        pub fn initWithView(this: Allocated<Self>, view: &UIView) -> Retained<Self>;
152
153        #[unsafe(method(init))]
154        #[unsafe(method_family = init)]
155        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157        #[unsafe(method(new))]
158        #[unsafe(method_family = new)]
159        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
160    );
161}