objc2_image_io/generated/
CGImageAnimation.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10
11use crate::*;
12
13#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct CGImageAnimationStatus(pub OSStatus);
18impl CGImageAnimationStatus {
19 #[doc(alias = "kCGImageAnimationStatus_ParameterError")]
20 pub const ParameterError: Self = Self(-22140);
21 #[doc(alias = "kCGImageAnimationStatus_CorruptInputImage")]
22 pub const CorruptInputImage: Self = Self(-22141);
23 #[doc(alias = "kCGImageAnimationStatus_UnsupportedFormat")]
24 pub const UnsupportedFormat: Self = Self(-22142);
25 #[doc(alias = "kCGImageAnimationStatus_IncompleteInputImage")]
26 pub const IncompleteInputImage: Self = Self(-22143);
27 #[doc(alias = "kCGImageAnimationStatus_AllocationFailure")]
28 pub const AllocationFailure: Self = Self(-22144);
29}
30
31#[cfg(feature = "objc2")]
32unsafe impl Encode for CGImageAnimationStatus {
33 const ENCODING: Encoding = OSStatus::ENCODING;
34}
35
36#[cfg(feature = "objc2")]
37unsafe impl RefEncode for CGImageAnimationStatus {
38 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41extern "C" {
42 pub static kCGImageAnimationStartIndex: &'static CFString;
44}
45
46extern "C" {
47 pub static kCGImageAnimationDelayTime: &'static CFString;
49}
50
51extern "C" {
52 pub static kCGImageAnimationLoopCount: &'static CFString;
54}
55
56#[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
58pub type CGImageSourceAnimationBlock =
59 *mut block2::DynBlock<dyn Fn(usize, NonNull<CGImage>, NonNull<bool>)>;
60
61extern "C-unwind" {
62 #[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
68 pub fn CGAnimateImageAtURLWithBlock(
69 url: &CFURL,
70 options: Option<&CFDictionary>,
71 block: CGImageSourceAnimationBlock,
72 ) -> OSStatus;
73}
74
75extern "C-unwind" {
76 #[cfg(all(feature = "block2", feature = "objc2-core-graphics"))]
82 pub fn CGAnimateImageDataWithBlock(
83 data: &CFData,
84 options: Option<&CFDictionary>,
85 block: CGImageSourceAnimationBlock,
86 ) -> OSStatus;
87}