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

use crate::*;

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

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

#[cfg(feature = "NSImageRep")]
unsafe impl NSCoding for NSCIImageRep {}

#[cfg(feature = "NSImageRep")]
unsafe impl NSCopying for NSCIImageRep {}

#[cfg(feature = "NSImageRep")]
unsafe impl NSObjectProtocol for NSCIImageRep {}

extern_methods!(
    #[cfg(feature = "NSImageRep")]
    unsafe impl NSCIImageRep {
        #[cfg(feature = "objc2-core-image")]
        #[cfg(target_vendor = "apple")]
        #[method_id(@__retain_semantics Other imageRepWithCIImage:)]
        pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Retained<Self>;

        #[cfg(feature = "objc2-core-image")]
        #[cfg(target_vendor = "apple")]
        #[method_id(@__retain_semantics Init initWithCIImage:)]
        pub unsafe fn initWithCIImage(this: Allocated<Self>, image: &CIImage) -> Retained<Self>;

        #[cfg(feature = "objc2-core-image")]
        #[cfg(target_vendor = "apple")]
        #[method_id(@__retain_semantics Other CIImage)]
        pub unsafe fn CIImage(&self) -> Retained<CIImage>;
    }
);

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

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "NSImageRep")]
    unsafe impl NSCIImageRep {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

extern_category!(
    /// Category "NSAppKitAdditions" on [`CIImage`].
    #[doc(alias = "NSAppKitAdditions")]
    pub unsafe trait CIImageNSAppKitAdditions {
        #[cfg(all(feature = "NSBitmapImageRep", feature = "NSImageRep"))]
        #[method_id(@__retain_semantics Init initWithBitmapImageRep:)]
        unsafe fn initWithBitmapImageRep(
            this: Allocated<Self>,
            bitmap_image_rep: &NSBitmapImageRep,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSGraphics")]
        #[method(drawInRect:fromRect:operation:fraction:)]
        unsafe fn drawInRect_fromRect_operation_fraction(
            &self,
            rect: NSRect,
            from_rect: NSRect,
            op: NSCompositingOperation,
            delta: CGFloat,
        );

        #[cfg(feature = "NSGraphics")]
        #[method(drawAtPoint:fromRect:operation:fraction:)]
        unsafe fn drawAtPoint_fromRect_operation_fraction(
            &self,
            point: NSPoint,
            from_rect: NSRect,
            op: NSCompositingOperation,
            delta: CGFloat,
        );
    }

    #[cfg(feature = "objc2-core-image")]
    #[cfg(target_vendor = "apple")]
    unsafe impl CIImageNSAppKitAdditions for CIImage {}
);
