//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-video")]
use objc2_core_video::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-image-io")]
use objc2_image_io::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion?language=objc)
// NS_TYPED_ENUM
pub type CIRAWDecoderVersion = NSString;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversionnone?language=objc)
    pub static CIRAWDecoderVersionNone: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion9?language=objc)
    pub static CIRAWDecoderVersion9: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion9dng?language=objc)
    pub static CIRAWDecoderVersion9DNG: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion8?language=objc)
    pub static CIRAWDecoderVersion8: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion8dng?language=objc)
    pub static CIRAWDecoderVersion8DNG: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion7?language=objc)
    pub static CIRAWDecoderVersion7: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion7dng?language=objc)
    pub static CIRAWDecoderVersion7DNG: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion6?language=objc)
    pub static CIRAWDecoderVersion6: &'static CIRAWDecoderVersion;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawdecoderversion6dng?language=objc)
    pub static CIRAWDecoderVersion6DNG: &'static CIRAWDecoderVersion;
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/coreimage/cirawfilter?language=objc)
    #[unsafe(super(CIFilter, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CIFilter")]
    pub struct CIRAWFilter;
);

#[cfg(feature = "CIFilter")]
extern_conformance!(
    unsafe impl NSCoding for CIRAWFilter {}
);

#[cfg(feature = "CIFilter")]
extern_conformance!(
    unsafe impl NSCopying for CIRAWFilter {}
);

#[cfg(feature = "CIFilter")]
unsafe impl CopyingHelper for CIRAWFilter {
    type Result = Self;
}

#[cfg(feature = "CIFilter")]
extern_conformance!(
    unsafe impl NSObjectProtocol for CIRAWFilter {}
);

#[cfg(feature = "CIFilter")]
extern_conformance!(
    unsafe impl NSSecureCoding for CIRAWFilter {}
);

#[cfg(feature = "CIFilter")]
impl CIRAWFilter {
    extern_methods!(
        #[unsafe(method(supportedCameraModels))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedCameraModels() -> Retained<NSArray<NSString>>;

        #[unsafe(method(supportedDecoderVersions))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedDecoderVersions(&self) -> Retained<NSArray<CIRAWDecoderVersion>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(nativeSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn nativeSize(&self) -> CGSize;

        #[unsafe(method(properties))]
        #[unsafe(method_family = none)]
        pub unsafe fn properties(&self) -> Retained<NSDictionary>;

        #[cfg(feature = "objc2-image-io")]
        #[unsafe(method(orientation))]
        #[unsafe(method_family = none)]
        pub unsafe fn orientation(&self) -> CGImagePropertyOrientation;

        #[cfg(feature = "objc2-image-io")]
        /// Setter for [`orientation`][Self::orientation].
        #[unsafe(method(setOrientation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOrientation(&self, orientation: CGImagePropertyOrientation);

        #[unsafe(method(isDraftModeEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDraftModeEnabled(&self) -> bool;

        /// Setter for [`isDraftModeEnabled`][Self::isDraftModeEnabled].
        #[unsafe(method(setDraftModeEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDraftModeEnabled(&self, draft_mode_enabled: bool);

        #[unsafe(method(decoderVersion))]
        #[unsafe(method_family = none)]
        pub unsafe fn decoderVersion(&self) -> Retained<CIRAWDecoderVersion>;

        /// Setter for [`decoderVersion`][Self::decoderVersion].
        #[unsafe(method(setDecoderVersion:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDecoderVersion(&self, decoder_version: &CIRAWDecoderVersion);

        #[unsafe(method(scaleFactor))]
        #[unsafe(method_family = none)]
        pub unsafe fn scaleFactor(&self) -> c_float;

        /// Setter for [`scaleFactor`][Self::scaleFactor].
        #[unsafe(method(setScaleFactor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setScaleFactor(&self, scale_factor: c_float);

        #[unsafe(method(exposure))]
        #[unsafe(method_family = none)]
        pub unsafe fn exposure(&self) -> c_float;

        /// Setter for [`exposure`][Self::exposure].
        #[unsafe(method(setExposure:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setExposure(&self, exposure: c_float);

        #[unsafe(method(baselineExposure))]
        #[unsafe(method_family = none)]
        pub unsafe fn baselineExposure(&self) -> c_float;

        /// Setter for [`baselineExposure`][Self::baselineExposure].
        #[unsafe(method(setBaselineExposure:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBaselineExposure(&self, baseline_exposure: c_float);

        #[unsafe(method(shadowBias))]
        #[unsafe(method_family = none)]
        pub unsafe fn shadowBias(&self) -> c_float;

        /// Setter for [`shadowBias`][Self::shadowBias].
        #[unsafe(method(setShadowBias:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setShadowBias(&self, shadow_bias: c_float);

        #[unsafe(method(boostAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn boostAmount(&self) -> c_float;

        /// Setter for [`boostAmount`][Self::boostAmount].
        #[unsafe(method(setBoostAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBoostAmount(&self, boost_amount: c_float);

        #[unsafe(method(boostShadowAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn boostShadowAmount(&self) -> c_float;

        /// Setter for [`boostShadowAmount`][Self::boostShadowAmount].
        #[unsafe(method(setBoostShadowAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBoostShadowAmount(&self, boost_shadow_amount: c_float);

        #[unsafe(method(isHighlightRecoverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isHighlightRecoverySupported(&self) -> bool;

        #[unsafe(method(isHighlightRecoveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isHighlightRecoveryEnabled(&self) -> bool;

        /// Setter for [`isHighlightRecoveryEnabled`][Self::isHighlightRecoveryEnabled].
        #[unsafe(method(setHighlightRecoveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHighlightRecoveryEnabled(&self, highlight_recovery_enabled: bool);

        #[unsafe(method(isGamutMappingEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isGamutMappingEnabled(&self) -> bool;

        /// Setter for [`isGamutMappingEnabled`][Self::isGamutMappingEnabled].
        #[unsafe(method(setGamutMappingEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGamutMappingEnabled(&self, gamut_mapping_enabled: bool);

        #[unsafe(method(isLensCorrectionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLensCorrectionSupported(&self) -> bool;

        #[unsafe(method(isLensCorrectionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLensCorrectionEnabled(&self) -> bool;

        /// Setter for [`isLensCorrectionEnabled`][Self::isLensCorrectionEnabled].
        #[unsafe(method(setLensCorrectionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLensCorrectionEnabled(&self, lens_correction_enabled: bool);

        #[unsafe(method(isLuminanceNoiseReductionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLuminanceNoiseReductionSupported(&self) -> bool;

        #[unsafe(method(luminanceNoiseReductionAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn luminanceNoiseReductionAmount(&self) -> c_float;

        /// Setter for [`luminanceNoiseReductionAmount`][Self::luminanceNoiseReductionAmount].
        #[unsafe(method(setLuminanceNoiseReductionAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLuminanceNoiseReductionAmount(
            &self,
            luminance_noise_reduction_amount: c_float,
        );

        #[unsafe(method(isColorNoiseReductionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isColorNoiseReductionSupported(&self) -> bool;

        #[unsafe(method(colorNoiseReductionAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn colorNoiseReductionAmount(&self) -> c_float;

        /// Setter for [`colorNoiseReductionAmount`][Self::colorNoiseReductionAmount].
        #[unsafe(method(setColorNoiseReductionAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setColorNoiseReductionAmount(&self, color_noise_reduction_amount: c_float);

        #[unsafe(method(isSharpnessSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isSharpnessSupported(&self) -> bool;

        #[unsafe(method(sharpnessAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn sharpnessAmount(&self) -> c_float;

        /// Setter for [`sharpnessAmount`][Self::sharpnessAmount].
        #[unsafe(method(setSharpnessAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSharpnessAmount(&self, sharpness_amount: c_float);

        #[unsafe(method(isContrastSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isContrastSupported(&self) -> bool;

        #[unsafe(method(contrastAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn contrastAmount(&self) -> c_float;

        /// Setter for [`contrastAmount`][Self::contrastAmount].
        #[unsafe(method(setContrastAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContrastAmount(&self, contrast_amount: c_float);

        #[unsafe(method(isDetailSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDetailSupported(&self) -> bool;

        #[unsafe(method(detailAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn detailAmount(&self) -> c_float;

        /// Setter for [`detailAmount`][Self::detailAmount].
        #[unsafe(method(setDetailAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDetailAmount(&self, detail_amount: c_float);

        #[unsafe(method(isMoireReductionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isMoireReductionSupported(&self) -> bool;

        #[unsafe(method(moireReductionAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn moireReductionAmount(&self) -> c_float;

        /// Setter for [`moireReductionAmount`][Self::moireReductionAmount].
        #[unsafe(method(setMoireReductionAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMoireReductionAmount(&self, moire_reduction_amount: c_float);

        #[unsafe(method(isLocalToneMapSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLocalToneMapSupported(&self) -> bool;

        #[unsafe(method(localToneMapAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn localToneMapAmount(&self) -> c_float;

        /// Setter for [`localToneMapAmount`][Self::localToneMapAmount].
        #[unsafe(method(setLocalToneMapAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLocalToneMapAmount(&self, local_tone_map_amount: c_float);

        #[unsafe(method(extendedDynamicRangeAmount))]
        #[unsafe(method_family = none)]
        pub unsafe fn extendedDynamicRangeAmount(&self) -> c_float;

        /// Setter for [`extendedDynamicRangeAmount`][Self::extendedDynamicRangeAmount].
        #[unsafe(method(setExtendedDynamicRangeAmount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setExtendedDynamicRangeAmount(&self, extended_dynamic_range_amount: c_float);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(neutralChromaticity))]
        #[unsafe(method_family = none)]
        pub unsafe fn neutralChromaticity(&self) -> CGPoint;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`neutralChromaticity`][Self::neutralChromaticity].
        #[unsafe(method(setNeutralChromaticity:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNeutralChromaticity(&self, neutral_chromaticity: CGPoint);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(neutralLocation))]
        #[unsafe(method_family = none)]
        pub unsafe fn neutralLocation(&self) -> CGPoint;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`neutralLocation`][Self::neutralLocation].
        #[unsafe(method(setNeutralLocation:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNeutralLocation(&self, neutral_location: CGPoint);

        #[unsafe(method(neutralTemperature))]
        #[unsafe(method_family = none)]
        pub unsafe fn neutralTemperature(&self) -> c_float;

        /// Setter for [`neutralTemperature`][Self::neutralTemperature].
        #[unsafe(method(setNeutralTemperature:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNeutralTemperature(&self, neutral_temperature: c_float);

        #[unsafe(method(neutralTint))]
        #[unsafe(method_family = none)]
        pub unsafe fn neutralTint(&self) -> c_float;

        /// Setter for [`neutralTint`][Self::neutralTint].
        #[unsafe(method(setNeutralTint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNeutralTint(&self, neutral_tint: c_float);

        #[unsafe(method(linearSpaceFilter))]
        #[unsafe(method_family = none)]
        pub unsafe fn linearSpaceFilter(&self) -> Option<Retained<CIFilter>>;

        /// Setter for [`linearSpaceFilter`][Self::linearSpaceFilter].
        #[unsafe(method(setLinearSpaceFilter:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLinearSpaceFilter(&self, linear_space_filter: Option<&CIFilter>);

        #[cfg(feature = "CIImage")]
        #[unsafe(method(previewImage))]
        #[unsafe(method_family = none)]
        pub unsafe fn previewImage(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(portraitEffectsMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn portraitEffectsMatte(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(semanticSegmentationSkinMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationSkinMatte(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(semanticSegmentationHairMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationHairMatte(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(semanticSegmentationGlassesMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationGlassesMatte(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(semanticSegmentationSkyMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationSkyMatte(&self) -> Option<Retained<CIImage>>;

        #[cfg(feature = "CIImage")]
        #[unsafe(method(semanticSegmentationTeethMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationTeethMatte(&self) -> Option<Retained<CIImage>>;

        #[unsafe(method(filterWithImageURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn filterWithImageURL(url: &NSURL) -> Option<Retained<Self>>;

        #[unsafe(method(filterWithImageData:identifierHint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn filterWithImageData_identifierHint(
            data: &NSData,
            identifier_hint: Option<&NSString>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "objc2-core-video")]
        /// # Safety
        ///
        /// `properties` generic should be of the correct type.
        #[unsafe(method(filterWithCVPixelBuffer:properties:))]
        #[unsafe(method_family = none)]
        pub unsafe fn filterWithCVPixelBuffer_properties(
            buffer: &CVPixelBuffer,
            properties: &NSDictionary,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "CIFilter")]
impl CIRAWFilter {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
