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

use crate::*;

extern "C" {
    pub static kCIAttributeFilterName: &'static NSString;
}

extern "C" {
    pub static kCIAttributeFilterDisplayName: &'static NSString;
}

extern "C" {
    pub static kCIAttributeDescription: &'static NSString;
}

extern "C" {
    pub static kCIAttributeFilterAvailable_Mac: &'static NSString;
}

extern "C" {
    pub static kCIAttributeFilterAvailable_iOS: &'static NSString;
}

extern "C" {
    pub static kCIAttributeReferenceDocumentation: &'static NSString;
}

extern "C" {
    pub static kCIAttributeFilterCategories: &'static NSString;
}

extern "C" {
    pub static kCIAttributeClass: &'static NSString;
}

extern "C" {
    pub static kCIAttributeType: &'static NSString;
}

extern "C" {
    pub static kCIAttributeMin: &'static NSString;
}

extern "C" {
    pub static kCIAttributeMax: &'static NSString;
}

extern "C" {
    pub static kCIAttributeSliderMin: &'static NSString;
}

extern "C" {
    pub static kCIAttributeSliderMax: &'static NSString;
}

extern "C" {
    pub static kCIAttributeDefault: &'static NSString;
}

extern "C" {
    pub static kCIAttributeIdentity: &'static NSString;
}

extern "C" {
    pub static kCIAttributeName: &'static NSString;
}

extern "C" {
    pub static kCIAttributeDisplayName: &'static NSString;
}

extern "C" {
    pub static kCIUIParameterSet: &'static NSString;
}

extern "C" {
    pub static kCIUISetBasic: &'static NSString;
}

extern "C" {
    pub static kCIUISetIntermediate: &'static NSString;
}

extern "C" {
    pub static kCIUISetAdvanced: &'static NSString;
}

extern "C" {
    pub static kCIUISetDevelopment: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeTime: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeScalar: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeDistance: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeAngle: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeBoolean: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeInteger: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeCount: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypePosition: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeOffset: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypePosition3: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeRectangle: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeOpaqueColor: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeColor: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeGradient: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeImage: &'static NSString;
}

extern "C" {
    pub static kCIAttributeTypeTransform: &'static NSString;
}

extern "C" {
    pub static kCICategoryDistortionEffect: &'static NSString;
}

extern "C" {
    pub static kCICategoryGeometryAdjustment: &'static NSString;
}

extern "C" {
    pub static kCICategoryCompositeOperation: &'static NSString;
}

extern "C" {
    pub static kCICategoryHalftoneEffect: &'static NSString;
}

extern "C" {
    pub static kCICategoryColorAdjustment: &'static NSString;
}

extern "C" {
    pub static kCICategoryColorEffect: &'static NSString;
}

extern "C" {
    pub static kCICategoryTransition: &'static NSString;
}

extern "C" {
    pub static kCICategoryTileEffect: &'static NSString;
}

extern "C" {
    pub static kCICategoryGenerator: &'static NSString;
}

extern "C" {
    pub static kCICategoryReduction: &'static NSString;
}

extern "C" {
    pub static kCICategoryGradient: &'static NSString;
}

extern "C" {
    pub static kCICategoryStylize: &'static NSString;
}

extern "C" {
    pub static kCICategorySharpen: &'static NSString;
}

extern "C" {
    pub static kCICategoryBlur: &'static NSString;
}

extern "C" {
    pub static kCICategoryVideo: &'static NSString;
}

extern "C" {
    pub static kCICategoryStillImage: &'static NSString;
}

extern "C" {
    pub static kCICategoryInterlaced: &'static NSString;
}

extern "C" {
    pub static kCICategoryNonSquarePixels: &'static NSString;
}

extern "C" {
    pub static kCICategoryHighDynamicRange: &'static NSString;
}

extern "C" {
    pub static kCICategoryBuiltIn: &'static NSString;
}

extern "C" {
    pub static kCICategoryFilterGenerator: &'static NSString;
}

extern "C" {
    pub static kCIApplyOptionExtent: &'static NSString;
}

extern "C" {
    pub static kCIApplyOptionDefinition: &'static NSString;
}

extern "C" {
    pub static kCIApplyOptionUserInfo: &'static NSString;
}

extern "C" {
    pub static kCIApplyOptionColorSpace: &'static NSString;
}

extern "C" {
    pub static kCIOutputImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputBackgroundImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputDepthImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputDisparityImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputAmountKey: &'static NSString;
}

extern "C" {
    pub static kCIInputTimeKey: &'static NSString;
}

extern "C" {
    pub static kCIInputTransformKey: &'static NSString;
}

extern "C" {
    pub static kCIInputScaleKey: &'static NSString;
}

extern "C" {
    pub static kCIInputAspectRatioKey: &'static NSString;
}

extern "C" {
    pub static kCIInputCenterKey: &'static NSString;
}

extern "C" {
    pub static kCIInputRadiusKey: &'static NSString;
}

extern "C" {
    pub static kCIInputAngleKey: &'static NSString;
}

extern "C" {
    pub static kCIInputRefractionKey: &'static NSString;
}

extern "C" {
    pub static kCIInputWidthKey: &'static NSString;
}

extern "C" {
    pub static kCIInputSharpnessKey: &'static NSString;
}

extern "C" {
    pub static kCIInputIntensityKey: &'static NSString;
}

extern "C" {
    pub static kCIInputEVKey: &'static NSString;
}

extern "C" {
    pub static kCIInputSaturationKey: &'static NSString;
}

extern "C" {
    pub static kCIInputColorKey: &'static NSString;
}

extern "C" {
    pub static kCIInputBrightnessKey: &'static NSString;
}

extern "C" {
    pub static kCIInputContrastKey: &'static NSString;
}

extern "C" {
    pub static kCIInputBiasKey: &'static NSString;
}

extern "C" {
    pub static kCIInputWeightsKey: &'static NSString;
}

extern "C" {
    pub static kCIInputGradientImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputMaskImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputMatteImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputShadingImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputTargetImageKey: &'static NSString;
}

extern "C" {
    pub static kCIInputExtentKey: &'static NSString;
}

extern "C" {
    pub static kCIInputVersionKey: &'static NSString;
}

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

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

unsafe impl NSCoding for CIFilter {}

unsafe impl NSCopying for CIFilter {}

unsafe impl NSObjectProtocol for CIFilter {}

unsafe impl NSSecureCoding for CIFilter {}

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

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

        #[method(setName:)]
        pub unsafe fn setName(&self, name: &NSString);

        #[method(isEnabled)]
        pub unsafe fn isEnabled(&self) -> bool;

        #[method(setEnabled:)]
        pub unsafe fn setEnabled(&self, enabled: bool);

        #[method_id(@__retain_semantics Other inputKeys)]
        pub unsafe fn inputKeys(&self) -> Retained<NSArray<NSString>>;

        #[method_id(@__retain_semantics Other outputKeys)]
        pub unsafe fn outputKeys(&self) -> Retained<NSArray<NSString>>;

        #[method(setDefaults)]
        pub unsafe fn setDefaults(&self);

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

        #[cfg(all(feature = "CIImage", feature = "CIKernel"))]
        #[method_id(@__retain_semantics Other apply:arguments:options:)]
        pub unsafe fn apply_arguments_options(
            &self,
            k: &CIKernel,
            args: Option<&NSArray>,
            dict: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Option<Retained<CIImage>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl CIFilter {
        #[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>;
    }
);

extern_protocol!(
    pub unsafe trait CIFilterProtocol {
        #[cfg(feature = "CIImage")]
        #[method_id(@__retain_semantics Other outputImage)]
        unsafe fn outputImage(&self) -> Option<Retained<CIImage>>;

        #[optional]
        #[method_id(@__retain_semantics Other customAttributes)]
        unsafe fn customAttributes() -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
    }

    unsafe impl ProtocolType for dyn CIFilterProtocol {
        const NAME: &'static str = "CIFilter";
    }
);

extern_methods!(
    /// CIFilterRegistry
    unsafe impl CIFilter {
        #[method_id(@__retain_semantics Other filterWithName:)]
        pub unsafe fn filterWithName(name: &NSString) -> Option<Retained<CIFilter>>;

        #[method_id(@__retain_semantics Other filterWithName:withInputParameters:)]
        pub unsafe fn filterWithName_withInputParameters(
            name: &NSString,
            params: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Option<Retained<CIFilter>>;

        #[method_id(@__retain_semantics Other filterNamesInCategory:)]
        pub unsafe fn filterNamesInCategory(
            category: Option<&NSString>,
        ) -> Retained<NSArray<NSString>>;

        #[method_id(@__retain_semantics Other filterNamesInCategories:)]
        pub unsafe fn filterNamesInCategories(
            categories: Option<&NSArray<NSString>>,
        ) -> Retained<NSArray<NSString>>;

        #[cfg(feature = "CIFilterConstructor")]
        #[method(registerFilterName:constructor:classAttributes:)]
        pub unsafe fn registerFilterName_constructor_classAttributes(
            name: &NSString,
            an_object: &ProtocolObject<dyn CIFilterConstructor>,
            attributes: &NSDictionary<NSString, AnyObject>,
        );

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

        #[method_id(@__retain_semantics Other localizedNameForCategory:)]
        pub unsafe fn localizedNameForCategory(category: &NSString) -> Retained<NSString>;

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

        #[method_id(@__retain_semantics Other localizedReferenceDocumentationForFilterName:)]
        pub unsafe fn localizedReferenceDocumentationForFilterName(
            filter_name: &NSString,
        ) -> Option<Retained<NSURL>>;
    }
);

extern_methods!(
    /// CIFilterXMPSerialization
    unsafe impl CIFilter {
        #[deprecated]
        #[method_id(@__retain_semantics Other serializedXMPFromFilters:inputImageExtent:)]
        pub unsafe fn serializedXMPFromFilters_inputImageExtent(
            filters: &NSArray<CIFilter>,
            extent: CGRect,
        ) -> Option<Retained<NSData>>;
    }
);
