objc2-shared-with-you 0.3.2

Bindings to the SharedWithYou framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-shared-with-you-core")]
use objc2_shared_with_you_core::*;

use crate::*;

mod private_NSPasteboardItemSWCollaborationMetadata {
    pub trait Sealed {}
}

/// Category "SWCollaborationMetadata" on [`NSPasteboardItem`].
#[doc(alias = "SWCollaborationMetadata")]
pub unsafe trait NSPasteboardItemSWCollaborationMetadata:
    ClassType + Sized + private_NSPasteboardItemSWCollaborationMetadata::Sealed
{
    extern_methods!(
        #[cfg(feature = "objc2-shared-with-you-core")]
        /// Sets the collaboration metadata on the pasteboard item.
        #[unsafe(method(collaborationMetadata))]
        #[unsafe(method_family = none)]
        unsafe fn collaborationMetadata(&self) -> Option<Retained<SWCollaborationMetadata>>;

        #[cfg(feature = "objc2-shared-with-you-core")]
        /// Setter for [`collaborationMetadata`][Self::collaborationMetadata].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCollaborationMetadata:))]
        #[unsafe(method_family = none)]
        unsafe fn setCollaborationMetadata(
            &self,
            collaboration_metadata: Option<&SWCollaborationMetadata>,
        );
    );
}

#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl private_NSPasteboardItemSWCollaborationMetadata::Sealed for NSPasteboardItem {}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
unsafe impl NSPasteboardItemSWCollaborationMetadata for NSPasteboardItem {}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/sharedwithyou/nspasteboardtypecollaborationmetadata?language=objc)
    #[cfg(feature = "objc2-app-kit")]
    #[cfg(target_os = "macos")]
    pub static NSPasteboardTypeCollaborationMetadata: Option<&'static NSPasteboardType>;
}