objc2-photos 0.2.0

Bindings to the Photos/PhotoKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "PHChangeRequest")]
    pub struct PHProjectChangeRequest;

    #[cfg(feature = "PHChangeRequest")]
    unsafe impl ClassType for PHProjectChangeRequest {
        #[inherits(NSObject)]
        type Super = PHChangeRequest;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "PHChangeRequest")]
unsafe impl NSObjectProtocol for PHProjectChangeRequest {}

extern_methods!(
    #[cfg(feature = "PHChangeRequest")]
    unsafe impl PHProjectChangeRequest {
        #[cfg(all(feature = "PHCollection", feature = "PHObject", feature = "PHProject"))]
        #[method_id(@__retain_semantics Init initWithProject:)]
        pub unsafe fn initWithProject(this: Allocated<Self>, project: &PHProject) -> Id<Self>;

        #[method_id(@__retain_semantics Other title)]
        pub unsafe fn title(&self) -> Id<NSString>;

        #[method(setTitle:)]
        pub unsafe fn setTitle(&self, title: &NSString);

        #[method_id(@__retain_semantics Other projectExtensionData)]
        pub unsafe fn projectExtensionData(&self) -> Id<NSData>;

        #[method(setProjectExtensionData:)]
        pub unsafe fn setProjectExtensionData(&self, project_extension_data: &NSData);

        #[cfg(all(feature = "PHAsset", feature = "PHObject"))]
        #[deprecated]
        #[method(setKeyAsset:)]
        pub unsafe fn setKeyAsset(&self, key_asset: Option<&PHAsset>);

        #[cfg(feature = "objc2-app-kit")]
        #[method(setProjectPreviewImage:)]
        pub unsafe fn setProjectPreviewImage(&self, preview_image: &NSImage);

        #[method(removeAssets:)]
        pub unsafe fn removeAssets(&self, assets: &ProtocolObject<dyn NSFastEnumeration>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "PHChangeRequest")]
    unsafe impl PHProjectChangeRequest {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);