use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGImageAnimationStatus(pub OSStatus);
impl CGImageAnimationStatus {
#[doc(alias = "kCGImageAnimationStatus_ParameterError")]
pub const ParameterError: Self = Self(-22140);
#[doc(alias = "kCGImageAnimationStatus_CorruptInputImage")]
pub const CorruptInputImage: Self = Self(-22141);
#[doc(alias = "kCGImageAnimationStatus_UnsupportedFormat")]
pub const UnsupportedFormat: Self = Self(-22142);
#[doc(alias = "kCGImageAnimationStatus_IncompleteInputImage")]
pub const IncompleteInputImage: Self = Self(-22143);
#[doc(alias = "kCGImageAnimationStatus_AllocationFailure")]
pub const AllocationFailure: Self = Self(-22144);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for CGImageAnimationStatus {
const ENCODING: Encoding = OSStatus::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for CGImageAnimationStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static kCGImageAnimationStartIndex: &'static CFString;
}
extern "C" {
pub static kCGImageAnimationDelayTime: &'static CFString;
}
extern "C" {
pub static kCGImageAnimationLoopCount: &'static CFString;
}
#[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
pub type CGImageSourceAnimationBlock =
*mut block2::DynBlock<dyn Fn(usize, NonNull<CGImage>, NonNull<bool>)>;
extern "C-unwind" {
#[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
pub fn CGAnimateImageAtURLWithBlock(
url: &CFURL,
options: Option<&CFDictionary>,
block: CGImageSourceAnimationBlock,
) -> OSStatus;
}
extern "C-unwind" {
#[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
pub fn CGAnimateImageDataWithBlock(
data: &CFData,
options: Option<&CFDictionary>,
block: CGImageSourceAnimationBlock,
) -> OSStatus;
}