objc2_photos/generated/
PHProject.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
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/photos/phproject?language=objc)
11    #[unsafe(super(PHAssetCollection, PHCollection, PHObject, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(all(feature = "PHCollection", feature = "PHObject"))]
14    pub struct PHProject;
15);
16
17#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
18unsafe impl Send for PHProject {}
19
20#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
21unsafe impl Sync for PHProject {}
22
23#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
24extern_conformance!(
25    unsafe impl NSCopying for PHProject {}
26);
27
28#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
29unsafe impl CopyingHelper for PHProject {
30    type Result = Self;
31}
32
33#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for PHProject {}
36);
37
38#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
39impl PHProject {
40    extern_methods!(
41        /// This property is not atomic.
42        ///
43        /// # Safety
44        ///
45        /// This might not be thread-safe.
46        #[unsafe(method(projectExtensionData))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn projectExtensionData(&self) -> Retained<NSData>;
49
50        /// Property to determine if a project preview was previously set.
51        /// Use -[PHProjectChangeRequest setProjectPreviewImage:] to set a project preview.
52        ///
53        /// This property is not atomic.
54        ///
55        /// # Safety
56        ///
57        /// This might not be thread-safe.
58        #[unsafe(method(hasProjectPreview))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn hasProjectPreview(&self) -> bool;
61    );
62}
63
64/// Methods declared on superclass `NSObject`.
65#[cfg(all(feature = "PHCollection", feature = "PHObject"))]
66impl PHProject {
67    extern_methods!(
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new() -> Retained<Self>;
75    );
76}