objc2_ui_kit/generated/
UITextDragURLPreviews.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
9/// URLPreviews.
10#[cfg(feature = "UIDragPreview")]
11impl UIDragPreview {
12    extern_methods!(
13        #[unsafe(method(previewForURL:))]
14        #[unsafe(method_family = none)]
15        pub fn previewForURL(url: &NSURL, mtm: MainThreadMarker) -> Retained<Self>;
16
17        #[unsafe(method(previewForURL:title:))]
18        #[unsafe(method_family = none)]
19        pub fn previewForURL_title(
20            url: &NSURL,
21            title: Option<&NSString>,
22            mtm: MainThreadMarker,
23        ) -> Retained<Self>;
24    );
25}
26
27/// URLPreviews.
28#[cfg(all(feature = "UITargetedDragPreview", feature = "UITargetedPreview"))]
29impl UITargetedDragPreview {
30    extern_methods!(
31        #[unsafe(method(previewForURL:target:))]
32        #[unsafe(method_family = none)]
33        pub fn previewForURL_target(url: &NSURL, target: &UIDragPreviewTarget) -> Retained<Self>;
34
35        #[unsafe(method(previewForURL:title:target:))]
36        #[unsafe(method_family = none)]
37        pub fn previewForURL_title_target(
38            url: &NSURL,
39            title: Option<&NSString>,
40            target: &UIDragPreviewTarget,
41        ) -> Retained<Self>;
42    );
43}