use crate::common::*;
use crate::AppKit::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::PhotoKit::*;
pub type PHLivePhotoRequestID = i32;
extern_static!(PHLivePhotoRequestIDInvalid: PHLivePhotoRequestID = 0);
extern_static!(PHLivePhotoInfoErrorKey: &'static NSString);
extern_static!(PHLivePhotoInfoIsDegradedKey: &'static NSString);
extern_static!(PHLivePhotoInfoCancelledKey: &'static NSString);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "PhotoKit_PHLivePhoto")]
pub struct PHLivePhoto;
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl ClassType for PHLivePhoto {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl NSCoding for PHLivePhoto {}
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl NSCopying for PHLivePhoto {}
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl NSObjectProtocol for PHLivePhoto {}
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl NSSecureCoding for PHLivePhoto {}
extern_methods!(
#[cfg(feature = "PhotoKit_PHLivePhoto")]
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 = "AppKit_NSImage",
feature = "Foundation_NSArray",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSURL"
))]
#[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<(*mut PHLivePhoto, NonNull<NSDictionary>), ()>,
) -> PHLivePhotoRequestID;
#[method(cancelLivePhotoRequestWithRequestID:)]
pub unsafe fn cancelLivePhotoRequestWithRequestID(request_id: PHLivePhotoRequestID);
}
);
extern_methods!(
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl PHLivePhoto {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl PHLivePhoto {}
);
#[cfg(feature = "PhotoKit_PHLivePhoto")]
unsafe impl NSItemProviderReading for PHLivePhoto {}