#[cfg(feature = "block2")]
use block2::*;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
pub type PHLivePhotoRequestID = i32;
pub static PHLivePhotoRequestIDInvalid: PHLivePhotoRequestID = 0;
extern "C" {
pub static PHLivePhotoInfoErrorKey: &'static NSString;
}
extern "C" {
pub static PHLivePhotoInfoIsDegradedKey: &'static NSString;
}
extern "C" {
pub static PHLivePhotoInfoCancelledKey: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PHLivePhoto;
unsafe impl ClassType for PHLivePhoto {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for PHLivePhoto {}
unsafe impl NSCopying for PHLivePhoto {}
unsafe impl NSObjectProtocol for PHLivePhoto {}
unsafe impl NSSecureCoding for PHLivePhoto {}
extern_methods!(
unsafe impl PHLivePhoto {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method(size)]
pub unsafe fn size(&self) -> CGSize;
#[cfg(all(feature = "PhotosTypes", feature = "block2", feature = "objc2-app-kit"))]
#[method(requestLivePhotoWithResourceFileURLs:placeholderImage:targetSize:contentMode:resultHandler:)]
pub unsafe fn requestLivePhotoWithResourceFileURLs_placeholderImage_targetSize_contentMode_resultHandler(
file_ur_ls: &NSArray<NSURL>,
image: Option<&NSImage>,
target_size: CGSize,
content_mode: PHImageContentMode,
result_handler: &Block<dyn Fn(*mut PHLivePhoto, NonNull<NSDictionary>)>,
) -> PHLivePhotoRequestID;
#[method(cancelLivePhotoRequestWithRequestID:)]
pub unsafe fn cancelLivePhotoRequestWithRequestID(request_id: PHLivePhotoRequestID);
}
);
extern_methods!(
unsafe impl PHLivePhoto {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_methods!(
unsafe impl PHLivePhoto {}
);
unsafe impl NSItemProviderReading for PHLivePhoto {}