//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MTLIOCompressionStatus(pub NSInteger);
impl MTLIOCompressionStatus {
    #[doc(alias = "MTLIOCompressionStatusComplete")]
    pub const Complete: Self = Self(0);
    #[doc(alias = "MTLIOCompressionStatusError")]
    pub const Error: Self = Self(1);
}

unsafe impl Encode for MTLIOCompressionStatus {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for MTLIOCompressionStatus {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

pub type MTLIOCompressionContext = *mut c_void;

extern "C" {
    pub fn MTLIOCompressionContextDefaultChunkSize() -> usize;
}

extern "C" {
    #[cfg(feature = "MTLDevice")]
    pub fn MTLIOCreateCompressionContext(
        path: NonNull<c_char>,
        r#type: MTLIOCompressionMethod,
        chunk_size: usize,
    ) -> MTLIOCompressionContext;
}

extern "C" {
    pub fn MTLIOCompressionContextAppendData(
        context: MTLIOCompressionContext,
        data: NonNull<c_void>,
        size: usize,
    );
}

extern "C" {
    pub fn MTLIOFlushAndDestroyCompressionContext(
        context: MTLIOCompressionContext,
    ) -> MTLIOCompressionStatus;
}
