use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct PHLivePhoto;
);
unsafe impl Send for PHLivePhoto {}
unsafe impl Sync for PHLivePhoto {}
extern_conformance!(
unsafe impl NSCoding for PHLivePhoto {}
);
extern_conformance!(
unsafe impl NSCopying for PHLivePhoto {}
);
unsafe impl CopyingHelper for PHLivePhoto {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for PHLivePhoto {}
);
extern_conformance!(
unsafe impl NSSecureCoding for PHLivePhoto {}
);
impl PHLivePhoto {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(size))]
#[unsafe(method_family = none)]
pub unsafe fn size(&self) -> CGSize;
#[cfg(all(
feature = "PhotosTypes",
feature = "block2",
feature = "objc2-app-kit",
feature = "objc2-core-foundation"
))]
#[cfg(target_os = "macos")]
#[unsafe(method(requestLivePhotoWithResourceFileURLs:placeholderImage:targetSize:contentMode:resultHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn requestLivePhotoWithResourceFileURLs_placeholderImage_targetSize_contentMode_resultHandler(
file_ur_ls: &NSArray<NSURL>,
image: Option<&NSImage>,
target_size: CGSize,
content_mode: PHImageContentMode,
result_handler: &block2::DynBlock<dyn Fn(*mut PHLivePhoto, NonNull<NSDictionary>)>,
) -> PHLivePhotoRequestID;
#[unsafe(method(cancelLivePhotoRequestWithRequestID:))]
#[unsafe(method_family = none)]
pub unsafe fn cancelLivePhotoRequestWithRequestID(request_id: PHLivePhotoRequestID);
);
}
impl PHLivePhoto {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
impl PHLivePhoto {
extern_methods!();
}
extern_conformance!(
unsafe impl NSItemProviderReading for PHLivePhoto {}
);