objc2_shared_with_you/generated/
SWCollaborationHighlight.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#[cfg(feature = "objc2-uniform-type-identifiers")]
7use objc2_uniform_type_identifiers::*;
8
9use crate::*;
10
11extern_class!(
12    /// A SWHighlight object that represents an active collaboration
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/sharedwithyou/swcollaborationhighlight?language=objc)
15    #[unsafe(super(SWHighlight, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "SWHighlight")]
18    pub struct SWCollaborationHighlight;
19);
20
21#[cfg(feature = "SWHighlight")]
22extern_conformance!(
23    unsafe impl NSCoding for SWCollaborationHighlight {}
24);
25
26#[cfg(feature = "SWHighlight")]
27extern_conformance!(
28    unsafe impl NSCopying for SWCollaborationHighlight {}
29);
30
31#[cfg(feature = "SWHighlight")]
32unsafe impl CopyingHelper for SWCollaborationHighlight {
33    type Result = Self;
34}
35
36#[cfg(feature = "SWHighlight")]
37extern_conformance!(
38    unsafe impl NSObjectProtocol for SWCollaborationHighlight {}
39);
40
41#[cfg(feature = "SWHighlight")]
42extern_conformance!(
43    unsafe impl NSSecureCoding for SWCollaborationHighlight {}
44);
45
46#[cfg(feature = "SWHighlight")]
47impl SWCollaborationHighlight {
48    extern_methods!(
49        /// Unique identifier as provided by the app hosting the collaboration
50        ///
51        /// This identifier is unique across platforms and shares
52        #[unsafe(method(collaborationIdentifier))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn collaborationIdentifier(&self) -> Retained<NSString>;
55
56        /// Title of the collaboration highlight
57        ///
58        /// Title of the collaboration if provided by the app hosting the collaboration
59        #[unsafe(method(title))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
62
63        /// Date when the file was created
64        #[unsafe(method(creationDate))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn creationDate(&self) -> Retained<NSDate>;
67
68        #[cfg(feature = "objc2-uniform-type-identifiers")]
69        /// UTI type for this collaboration highlight
70        #[unsafe(method(contentType))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn contentType(&self) -> Retained<UTType>;
73    );
74}
75
76/// Methods declared on superclass `SWHighlight`.
77#[cfg(feature = "SWHighlight")]
78impl SWCollaborationHighlight {
79    extern_methods!(
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}