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::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-shared-with-you-core")]
use objc2_shared_with_you_core::*;

use crate::*;

extern_class!(
    /// A model object representing a mention event that has happened on some content.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/sharedwithyou/swhighlightmentionevent?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct SWHighlightMentionEvent;
);

extern_conformance!(
    unsafe impl NSCoding for SWHighlightMentionEvent {}
);

extern_conformance!(
    unsafe impl NSCopying for SWHighlightMentionEvent {}
);

unsafe impl CopyingHelper for SWHighlightMentionEvent {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for SWHighlightMentionEvent {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for SWHighlightMentionEvent {}
);

#[cfg(feature = "SWHighlightEvent")]
extern_conformance!(
    unsafe impl SWHighlightEvent for SWHighlightMentionEvent {}
);

impl SWHighlightMentionEvent {
    extern_methods!(
        /// The person being mentioned by the sender.
        #[unsafe(method(mentionedPersonHandle))]
        #[unsafe(method_family = none)]
        pub unsafe fn mentionedPersonHandle(&self) -> Retained<NSString>;

        #[cfg(feature = "SWHighlight")]
        /// Initializes a highlight mention event object when the sender mentions another participant.
        ///
        /// Parameter `highlight`: The object on which the event occurred.
        ///
        /// Parameter `handle`: The CloudKit handle of the person being mentioned by the sender.
        #[unsafe(method(initWithHighlight:mentionedPersonCloudKitShareHandle:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithHighlight_mentionedPersonCloudKitShareHandle(
            this: Allocated<Self>,
            highlight: &SWHighlight,
            handle: &NSString,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SWHighlight", feature = "objc2-shared-with-you-core"))]
        /// Initializes a highlight mention event object when the sender mentions another participant.
        ///
        /// Parameter `highlight`: The object on which the event occurred.
        ///
        /// Parameter `identity`: The identity of the person being mentioned by the sender.
        #[unsafe(method(initWithHighlight:mentionedPersonIdentity:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithHighlight_mentionedPersonIdentity(
            this: Allocated<Self>,
            highlight: &SWHighlight,
            identity: &SWPersonIdentity,
        ) -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}