//! 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"
))]
extern_conformance!(
    unsafe impl NSAccessibility for NSTableCellView {}
);

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

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

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

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

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

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

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

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

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

        #[cfg(all(feature = "NSControl", feature = "NSTextField"))]
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[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].
        ///
        /// # Safety
        ///
        /// This is unretained, you must ensure the object is kept alive while in use.
        #[unsafe(method(setTextField:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTextField(&self, text_field: Option<&NSTextField>);

        #[cfg(all(feature = "NSControl", feature = "NSImageView"))]
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[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].
        ///
        /// # Safety
        ///
        /// This is unretained, you must ensure the object is kept alive while in use.
        #[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 fn backgroundStyle(&self) -> NSBackgroundStyle;

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

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

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

        #[cfg(feature = "NSDraggingItem")]
        #[unsafe(method(draggingImageComponents))]
        #[unsafe(method_family = none)]
        pub 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 fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[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 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 fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
