//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-metal")]
use objc2_metal::*;

use crate::*;

// NS_TYPED_ENUM
pub type CIFormat = c_int;

extern "C" {
    pub static kCIFormatARGB8: CIFormat;
}

extern "C" {
    pub static kCIFormatBGRA8: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBA8: CIFormat;
}

extern "C" {
    pub static kCIFormatABGR8: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBAh: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBA16: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBAf: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBX16: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBXh: CIFormat;
}

extern "C" {
    pub static kCIFormatRGBXf: CIFormat;
}

extern "C" {
    pub static kCIFormatRGB10: CIFormat;
}

extern "C" {
    pub static kCIFormatA8: CIFormat;
}

extern "C" {
    pub static kCIFormatA16: CIFormat;
}

extern "C" {
    pub static kCIFormatAh: CIFormat;
}

extern "C" {
    pub static kCIFormatAf: CIFormat;
}

extern "C" {
    pub static kCIFormatR8: CIFormat;
}

extern "C" {
    pub static kCIFormatR16: CIFormat;
}

extern "C" {
    pub static kCIFormatRh: CIFormat;
}

extern "C" {
    pub static kCIFormatRf: CIFormat;
}

extern "C" {
    pub static kCIFormatRG8: CIFormat;
}

extern "C" {
    pub static kCIFormatRG16: CIFormat;
}

extern "C" {
    pub static kCIFormatRGh: CIFormat;
}

extern "C" {
    pub static kCIFormatRGf: CIFormat;
}

extern "C" {
    pub static kCIFormatL8: CIFormat;
}

extern "C" {
    pub static kCIFormatL16: CIFormat;
}

extern "C" {
    pub static kCIFormatLh: CIFormat;
}

extern "C" {
    pub static kCIFormatLf: CIFormat;
}

extern "C" {
    pub static kCIFormatLA8: CIFormat;
}

extern "C" {
    pub static kCIFormatLA16: CIFormat;
}

extern "C" {
    pub static kCIFormatLAh: CIFormat;
}

extern "C" {
    pub static kCIFormatLAf: CIFormat;
}

// NS_TYPED_ENUM
pub type CIImageOption = NSString;

extern "C" {
    pub static kCIImageColorSpace: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageToneMapHDRtoSDR: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageExpandToHDR: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageNearestSampling: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageCacheImmediately: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageProperties: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageApplyOrientationProperty: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageTextureTarget: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageTextureFormat: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliaryDepth: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliaryDisparity: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliaryPortraitEffectsMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliarySemanticSegmentationSkinMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliarySemanticSegmentationHairMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliarySemanticSegmentationTeethMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliarySemanticSegmentationGlassesMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliarySemanticSegmentationSkyMatte: &'static CIImageOption;
}

extern "C" {
    pub static kCIImageAuxiliaryHDRGainMap: &'static CIImageOption;
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CIImage;

    unsafe impl ClassType for CIImage {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for CIImage {}

unsafe impl NSCopying for CIImage {}

unsafe impl NSObjectProtocol for CIImage {}

unsafe impl NSSecureCoding for CIImage {}

extern_methods!(
    unsafe impl CIImage {
        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
        #[method_id(@__retain_semantics Other imageWithTexture:size:flipped:options:)]
        pub unsafe fn imageWithTexture_size_flipped_options(
            name: c_uint,
            size: CGSize,
            flipped: bool,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Retained<CIImage>;

        #[cfg(feature = "objc2-metal")]
        #[method_id(@__retain_semantics Other imageWithMTLTexture:options:)]
        pub unsafe fn imageWithMTLTexture_options(
            texture: &ProtocolObject<dyn MTLTexture>,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<CIImage>>;

        #[method_id(@__retain_semantics Other imageWithContentsOfURL:)]
        pub unsafe fn imageWithContentsOfURL(url: &NSURL) -> Option<Retained<CIImage>>;

        #[method_id(@__retain_semantics Other imageWithContentsOfURL:options:)]
        pub unsafe fn imageWithContentsOfURL_options(
            url: &NSURL,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<CIImage>>;

        #[method_id(@__retain_semantics Other imageWithData:)]
        pub unsafe fn imageWithData(data: &NSData) -> Option<Retained<CIImage>>;

        #[method_id(@__retain_semantics Other imageWithData:options:)]
        pub unsafe fn imageWithData_options(
            data: &NSData,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIColor")]
        #[method_id(@__retain_semantics Other imageWithColor:)]
        pub unsafe fn imageWithColor(color: &CIColor) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other emptyImage)]
        pub unsafe fn emptyImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other blackImage)]
        pub unsafe fn blackImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other whiteImage)]
        pub unsafe fn whiteImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other grayImage)]
        pub unsafe fn grayImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other redImage)]
        pub unsafe fn redImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other greenImage)]
        pub unsafe fn greenImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other blueImage)]
        pub unsafe fn blueImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other cyanImage)]
        pub unsafe fn cyanImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other magentaImage)]
        pub unsafe fn magentaImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other yellowImage)]
        pub unsafe fn yellowImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other clearImage)]
        pub unsafe fn clearImage() -> Retained<CIImage>;

        #[method_id(@__retain_semantics Init initWithData:)]
        pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Option<Retained<Self>>;

        #[method_id(@__retain_semantics Init initWithData:options:)]
        pub unsafe fn initWithData_options(
            this: Allocated<Self>,
            data: &NSData,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<Self>>;

        #[deprecated = "Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)"]
        #[method_id(@__retain_semantics Init initWithTexture:size:flipped:options:)]
        pub unsafe fn initWithTexture_size_flipped_options(
            this: Allocated<Self>,
            name: c_uint,
            size: CGSize,
            flipped: bool,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-metal")]
        #[method_id(@__retain_semantics Init initWithMTLTexture:options:)]
        pub unsafe fn initWithMTLTexture_options(
            this: Allocated<Self>,
            texture: &ProtocolObject<dyn MTLTexture>,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<Self>>;

        #[method_id(@__retain_semantics Init initWithContentsOfURL:)]
        pub unsafe fn initWithContentsOfURL(
            this: Allocated<Self>,
            url: &NSURL,
        ) -> Option<Retained<Self>>;

        #[method_id(@__retain_semantics Init initWithContentsOfURL:options:)]
        pub unsafe fn initWithContentsOfURL_options(
            this: Allocated<Self>,
            url: &NSURL,
            options: Option<&NSDictionary<CIImageOption, AnyObject>>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "CIColor")]
        #[method_id(@__retain_semantics Init initWithColor:)]
        pub unsafe fn initWithColor(this: Allocated<Self>, color: &CIColor) -> Retained<Self>;

        #[method_id(@__retain_semantics Other imageByApplyingOrientation:)]
        pub unsafe fn imageByApplyingOrientation(&self, orientation: c_int) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByCompositingOverImage:)]
        pub unsafe fn imageByCompositingOverImage(&self, dest: &CIImage) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByCroppingToRect:)]
        pub unsafe fn imageByCroppingToRect(&self, rect: CGRect) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByClampingToExtent)]
        pub unsafe fn imageByClampingToExtent(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByClampingToRect:)]
        pub unsafe fn imageByClampingToRect(&self, rect: CGRect) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByApplyingFilter:withInputParameters:)]
        pub unsafe fn imageByApplyingFilter_withInputParameters(
            &self,
            filter_name: &NSString,
            params: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByApplyingFilter:)]
        pub unsafe fn imageByApplyingFilter(&self, filter_name: &NSString) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByPremultiplyingAlpha)]
        pub unsafe fn imageByPremultiplyingAlpha(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByUnpremultiplyingAlpha)]
        pub unsafe fn imageByUnpremultiplyingAlpha(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageBySettingAlphaOneInExtent:)]
        pub unsafe fn imageBySettingAlphaOneInExtent(&self, extent: CGRect) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByApplyingGaussianBlurWithSigma:)]
        pub unsafe fn imageByApplyingGaussianBlurWithSigma(
            &self,
            sigma: c_double,
        ) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageBySettingProperties:)]
        pub unsafe fn imageBySettingProperties(
            &self,
            properties: &NSDictionary,
        ) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageBySamplingLinear)]
        pub unsafe fn imageBySamplingLinear(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageBySamplingNearest)]
        pub unsafe fn imageBySamplingNearest(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByInsertingIntermediate)]
        pub unsafe fn imageByInsertingIntermediate(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByInsertingIntermediate:)]
        pub unsafe fn imageByInsertingIntermediate_(&self, cache: bool) -> Retained<CIImage>;

        #[method(extent)]
        pub unsafe fn extent(&self) -> CGRect;

        #[method_id(@__retain_semantics Other properties)]
        pub unsafe fn properties(&self) -> Retained<NSDictionary<NSString, AnyObject>>;

        #[cfg(feature = "CIFilterShape")]
        #[method_id(@__retain_semantics Other definition)]
        pub unsafe fn definition(&self) -> Retained<CIFilterShape>;

        #[method_id(@__retain_semantics Other url)]
        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;

        #[method(regionOfInterestForImage:inRect:)]
        pub unsafe fn regionOfInterestForImage_inRect(
            &self,
            image: &CIImage,
            rect: CGRect,
        ) -> CGRect;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl CIImage {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

// NS_TYPED_ENUM
pub type CIImageAutoAdjustmentOption = NSString;

extern "C" {
    pub static kCIImageAutoAdjustEnhance: &'static CIImageAutoAdjustmentOption;
}

extern "C" {
    pub static kCIImageAutoAdjustRedEye: &'static CIImageAutoAdjustmentOption;
}

extern "C" {
    pub static kCIImageAutoAdjustFeatures: &'static CIImageAutoAdjustmentOption;
}

extern "C" {
    pub static kCIImageAutoAdjustCrop: &'static CIImageAutoAdjustmentOption;
}

extern "C" {
    pub static kCIImageAutoAdjustLevel: &'static CIImageAutoAdjustmentOption;
}

extern_methods!(
    /// AutoAdjustment
    unsafe impl CIImage {
        #[cfg(feature = "CIFilter")]
        #[method_id(@__retain_semantics Other autoAdjustmentFilters)]
        pub unsafe fn autoAdjustmentFilters(&self) -> Retained<NSArray<CIFilter>>;

        #[cfg(feature = "CIFilter")]
        #[method_id(@__retain_semantics Other autoAdjustmentFiltersWithOptions:)]
        pub unsafe fn autoAdjustmentFiltersWithOptions(
            &self,
            options: Option<&NSDictionary<CIImageAutoAdjustmentOption, AnyObject>>,
        ) -> Retained<NSArray<CIFilter>>;
    }
);

extern_methods!(
    /// LabConversion
    unsafe impl CIImage {
        #[method_id(@__retain_semantics Other imageByConvertingWorkingSpaceToLab)]
        pub unsafe fn imageByConvertingWorkingSpaceToLab(&self) -> Retained<CIImage>;

        #[method_id(@__retain_semantics Other imageByConvertingLabToWorkingSpace)]
        pub unsafe fn imageByConvertingLabToWorkingSpace(&self) -> Retained<CIImage>;
    }
);
