objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// URLPreviews.
#[cfg(feature = "UIDragPreview")]
impl UIDragPreview {
    extern_methods!(
        #[unsafe(method(previewForURL:))]
        #[unsafe(method_family = none)]
        pub fn previewForURL(url: &NSURL, mtm: MainThreadMarker) -> Retained<Self>;

        #[unsafe(method(previewForURL:title:))]
        #[unsafe(method_family = none)]
        pub fn previewForURL_title(
            url: &NSURL,
            title: Option<&NSString>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;
    );
}

/// URLPreviews.
#[cfg(all(feature = "UITargetedDragPreview", feature = "UITargetedPreview"))]
impl UITargetedDragPreview {
    extern_methods!(
        #[unsafe(method(previewForURL:target:))]
        #[unsafe(method_family = none)]
        pub fn previewForURL_target(url: &NSURL, target: &UIDragPreviewTarget) -> Retained<Self>;

        #[unsafe(method(previewForURL:title:target:))]
        #[unsafe(method_family = none)]
        pub fn previewForURL_title_target(
            url: &NSURL,
            title: Option<&NSString>,
            target: &UIDragPreviewTarget,
        ) -> Retained<Self>;
    );
}