//! 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::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstablecellview?language=objc)
    #[unsafe(super(NSView, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSResponder", feature = "NSView"))]
    pub struct NSTableCellView;
);

#[cfg(all(
    feature = "NSAccessibilityProtocols",
    feature = "NSResponder",
    feature = "NSView"
))]
unsafe impl NSAccessibility for NSTableCellView {}

#[cfg(all(
    feature = "NSAccessibilityProtocols",
    feature = "NSResponder",
    feature = "NSView"
))]
unsafe impl NSAccessibilityElementProtocol for NSTableCellView {}

#[cfg(all(feature = "NSAnimation", feature = "NSResponder", feature = "NSView"))]
unsafe impl NSAnimatablePropertyContainer for NSTableCellView {}

#[cfg(all(feature = "NSAppearance", feature = "NSResponder", feature = "NSView"))]
unsafe impl NSAppearanceCustomization for NSTableCellView {}

#[cfg(all(feature = "NSResponder", feature = "NSView"))]
unsafe impl NSCoding for NSTableCellView {}

#[cfg(all(feature = "NSDragging", feature = "NSResponder", feature = "NSView"))]
unsafe impl NSDraggingDestination for NSTableCellView {}

#[cfg(all(feature = "NSResponder", feature = "NSView"))]
unsafe impl NSObjectProtocol for NSTableCellView {}

#[cfg(all(
    feature = "NSResponder",
    feature = "NSUserInterfaceItemIdentification",
    feature = "NSView"
))]
unsafe impl NSUserInterfaceItemIdentification for NSTableCellView {}

#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSTableCellView {
    extern_methods!(
        #[unsafe(method(objectValue))]
        #[unsafe(method_family = none)]
        pub unsafe fn objectValue(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`objectValue`][Self::objectValue].
        #[unsafe(method(setObjectValue:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setObjectValue(&self, object_value: Option<&AnyObject>);

        #[cfg(all(feature = "NSControl", feature = "NSTextField"))]
        #[unsafe(method(textField))]
        #[unsafe(method_family = none)]
        pub unsafe fn textField(&self) -> Option<Retained<NSTextField>>;

        #[cfg(all(feature = "NSControl", feature = "NSTextField"))]
        /// Setter for [`textField`][Self::textField].
        #[unsafe(method(setTextField:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextField(&self, text_field: Option<&NSTextField>);

        #[cfg(all(feature = "NSControl", feature = "NSImageView"))]
        #[unsafe(method(imageView))]
        #[unsafe(method_family = none)]
        pub unsafe fn imageView(&self) -> Option<Retained<NSImageView>>;

        #[cfg(all(feature = "NSControl", feature = "NSImageView"))]
        /// Setter for [`imageView`][Self::imageView].
        #[unsafe(method(setImageView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setImageView(&self, image_view: Option<&NSImageView>);

        #[cfg(feature = "NSCell")]
        #[unsafe(method(backgroundStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle;

        #[cfg(feature = "NSCell")]
        /// Setter for [`backgroundStyle`][Self::backgroundStyle].
        #[unsafe(method(setBackgroundStyle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBackgroundStyle(&self, background_style: NSBackgroundStyle);

        #[cfg(feature = "NSTableView")]
        #[unsafe(method(rowSizeStyle))]
        #[unsafe(method_family = none)]
        pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle;

        #[cfg(feature = "NSTableView")]
        /// Setter for [`rowSizeStyle`][Self::rowSizeStyle].
        #[unsafe(method(setRowSizeStyle:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRowSizeStyle(&self, row_size_style: NSTableViewRowSizeStyle);

        #[cfg(feature = "NSDraggingItem")]
        #[unsafe(method(draggingImageComponents))]
        #[unsafe(method_family = none)]
        pub unsafe fn draggingImageComponents(&self)
            -> Retained<NSArray<NSDraggingImageComponent>>;
    );
}

/// Methods declared on superclass `NSView`.
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSTableCellView {
    extern_methods!(
        #[unsafe(method(initWithFrame:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;

        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSTableCellView {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSTableCellView {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
