objc2-photos 0.3.2

Bindings to the Photos/PhotoKit 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::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/photos/phobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PHObject;
);

unsafe impl Send for PHObject {}

unsafe impl Sync for PHObject {}

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

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

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

impl PHObject {
    extern_methods!(
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(localIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn localIdentifier(&self) -> Retained<NSString>;
    );
}

/// Methods declared on superclass `NSObject`.
impl PHObject {
    extern_methods!(
        #[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>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/photos/phobjectplaceholder?language=objc)
    #[unsafe(super(PHObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PHObjectPlaceholder;
);

unsafe impl Send for PHObjectPlaceholder {}

unsafe impl Sync for PHObjectPlaceholder {}

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

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

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

impl PHObjectPlaceholder {
    extern_methods!();
}

/// Methods declared on superclass `NSObject`.
impl PHObjectPlaceholder {
    extern_methods!(
        #[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>;
    );
}