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

ns_enum!(
    #[underlying(NSInteger)]
    pub enum MTLFXSpatialScalerColorProcessingMode {
        MTLFXSpatialScalerColorProcessingModePerceptual = 0,
        MTLFXSpatialScalerColorProcessingModeLinear = 1,
        MTLFXSpatialScalerColorProcessingModeHDR = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MetalFX_MTLFXSpatialScalerDescriptor")]
    pub struct MTLFXSpatialScalerDescriptor;

    #[cfg(feature = "MetalFX_MTLFXSpatialScalerDescriptor")]
    unsafe impl ClassType for MTLFXSpatialScalerDescriptor {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MetalFX_MTLFXSpatialScalerDescriptor")]
unsafe impl NSObjectProtocol for MTLFXSpatialScalerDescriptor {}

extern_methods!(
    #[cfg(feature = "MetalFX_MTLFXSpatialScalerDescriptor")]
    unsafe impl MTLFXSpatialScalerDescriptor {
        #[method(colorTextureFormat)]
        pub unsafe fn colorTextureFormat(&self) -> MTLPixelFormat;

        #[method(setColorTextureFormat:)]
        pub unsafe fn setColorTextureFormat(&self, color_texture_format: MTLPixelFormat);

        #[method(outputTextureFormat)]
        pub unsafe fn outputTextureFormat(&self) -> MTLPixelFormat;

        #[method(setOutputTextureFormat:)]
        pub unsafe fn setOutputTextureFormat(&self, output_texture_format: MTLPixelFormat);

        #[method(inputWidth)]
        pub unsafe fn inputWidth(&self) -> NSUInteger;

        #[method(setInputWidth:)]
        pub unsafe fn setInputWidth(&self, input_width: NSUInteger);

        #[method(inputHeight)]
        pub unsafe fn inputHeight(&self) -> NSUInteger;

        #[method(setInputHeight:)]
        pub unsafe fn setInputHeight(&self, input_height: NSUInteger);

        #[method(outputWidth)]
        pub unsafe fn outputWidth(&self) -> NSUInteger;

        #[method(setOutputWidth:)]
        pub unsafe fn setOutputWidth(&self, output_width: NSUInteger);

        #[method(outputHeight)]
        pub unsafe fn outputHeight(&self) -> NSUInteger;

        #[method(setOutputHeight:)]
        pub unsafe fn setOutputHeight(&self, output_height: NSUInteger);

        #[method(colorProcessingMode)]
        pub unsafe fn colorProcessingMode(&self) -> MTLFXSpatialScalerColorProcessingMode;

        #[method(setColorProcessingMode:)]
        pub unsafe fn setColorProcessingMode(
            &self,
            color_processing_mode: MTLFXSpatialScalerColorProcessingMode,
        );

        #[method_id(@__retain_semantics New newSpatialScalerWithDevice:)]
        pub unsafe fn newSpatialScalerWithDevice(
            &self,
            device: &ProtocolObject<dyn MTLDevice>,
        ) -> Option<Id<ProtocolObject<dyn MTLFXSpatialScaler>>>;

        #[method(supportsDevice:)]
        pub unsafe fn supportsDevice(device: &ProtocolObject<dyn MTLDevice>) -> bool;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MetalFX_MTLFXSpatialScalerDescriptor")]
    unsafe impl MTLFXSpatialScalerDescriptor {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Option<Allocated<Self>>) -> Id<Self>;

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

extern_protocol!(
    pub unsafe trait MTLFXSpatialScaler: NSObjectProtocol {
        #[method(colorTextureUsage)]
        unsafe fn colorTextureUsage(&self) -> MTLTextureUsage;

        #[method(outputTextureUsage)]
        unsafe fn outputTextureUsage(&self) -> MTLTextureUsage;

        #[method(inputContentWidth)]
        unsafe fn inputContentWidth(&self) -> NSUInteger;

        #[method(setInputContentWidth:)]
        unsafe fn setInputContentWidth(&self, input_content_width: NSUInteger);

        #[method(inputContentHeight)]
        unsafe fn inputContentHeight(&self) -> NSUInteger;

        #[method(setInputContentHeight:)]
        unsafe fn setInputContentHeight(&self, input_content_height: NSUInteger);

        #[method_id(@__retain_semantics Other colorTexture)]
        unsafe fn colorTexture(&self) -> Option<Id<ProtocolObject<dyn MTLTexture>>>;

        #[method(setColorTexture:)]
        unsafe fn setColorTexture(&self, color_texture: Option<&ProtocolObject<dyn MTLTexture>>);

        #[method_id(@__retain_semantics Other outputTexture)]
        unsafe fn outputTexture(&self) -> Option<Id<ProtocolObject<dyn MTLTexture>>>;

        #[method(setOutputTexture:)]
        unsafe fn setOutputTexture(&self, output_texture: Option<&ProtocolObject<dyn MTLTexture>>);

        #[method(colorTextureFormat)]
        unsafe fn colorTextureFormat(&self) -> MTLPixelFormat;

        #[method(outputTextureFormat)]
        unsafe fn outputTextureFormat(&self) -> MTLPixelFormat;

        #[method(inputWidth)]
        unsafe fn inputWidth(&self) -> NSUInteger;

        #[method(inputHeight)]
        unsafe fn inputHeight(&self) -> NSUInteger;

        #[method(outputWidth)]
        unsafe fn outputWidth(&self) -> NSUInteger;

        #[method(outputHeight)]
        unsafe fn outputHeight(&self) -> NSUInteger;

        #[method(colorProcessingMode)]
        unsafe fn colorProcessingMode(&self) -> MTLFXSpatialScalerColorProcessingMode;

        #[method_id(@__retain_semantics Other fence)]
        unsafe fn fence(&self) -> Option<Id<ProtocolObject<dyn MTLFence>>>;

        #[method(setFence:)]
        unsafe fn setFence(&self, fence: Option<&ProtocolObject<dyn MTLFence>>);

        #[method(encodeToCommandBuffer:)]
        unsafe fn encodeToCommandBuffer(
            &self,
            command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
        );
    }

    unsafe impl ProtocolType for dyn MTLFXSpatialScaler {}
);
