objc2-app-kit 0.3.2

Bindings to the AppKit framework
Documentation
//! 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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

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

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

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

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

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

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

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

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

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

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

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

#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSTableRowView {
    extern_methods!(
        #[cfg(feature = "NSTableView")]
        #[unsafe(method(selectionHighlightStyle))]
        #[unsafe(method_family = none)]
        pub fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle;

        #[cfg(feature = "NSTableView")]
        /// Setter for [`selectionHighlightStyle`][Self::selectionHighlightStyle].
        #[unsafe(method(setSelectionHighlightStyle:))]
        #[unsafe(method_family = none)]
        pub fn setSelectionHighlightStyle(
            &self,
            selection_highlight_style: NSTableViewSelectionHighlightStyle,
        );

        #[unsafe(method(isEmphasized))]
        #[unsafe(method_family = none)]
        pub fn isEmphasized(&self) -> bool;

        /// Setter for [`isEmphasized`][Self::isEmphasized].
        #[unsafe(method(setEmphasized:))]
        #[unsafe(method_family = none)]
        pub fn setEmphasized(&self, emphasized: bool);

        #[unsafe(method(isGroupRowStyle))]
        #[unsafe(method_family = none)]
        pub fn isGroupRowStyle(&self) -> bool;

        /// Setter for [`isGroupRowStyle`][Self::isGroupRowStyle].
        #[unsafe(method(setGroupRowStyle:))]
        #[unsafe(method_family = none)]
        pub fn setGroupRowStyle(&self, group_row_style: bool);

        #[unsafe(method(isSelected))]
        #[unsafe(method_family = none)]
        pub fn isSelected(&self) -> bool;

        /// Setter for [`isSelected`][Self::isSelected].
        #[unsafe(method(setSelected:))]
        #[unsafe(method_family = none)]
        pub fn setSelected(&self, selected: bool);

        #[unsafe(method(isPreviousRowSelected))]
        #[unsafe(method_family = none)]
        pub fn isPreviousRowSelected(&self) -> bool;

        /// Setter for [`isPreviousRowSelected`][Self::isPreviousRowSelected].
        #[unsafe(method(setPreviousRowSelected:))]
        #[unsafe(method_family = none)]
        pub fn setPreviousRowSelected(&self, previous_row_selected: bool);

        #[unsafe(method(isNextRowSelected))]
        #[unsafe(method_family = none)]
        pub fn isNextRowSelected(&self) -> bool;

        /// Setter for [`isNextRowSelected`][Self::isNextRowSelected].
        #[unsafe(method(setNextRowSelected:))]
        #[unsafe(method_family = none)]
        pub fn setNextRowSelected(&self, next_row_selected: bool);

        #[unsafe(method(isFloating))]
        #[unsafe(method_family = none)]
        pub fn isFloating(&self) -> bool;

        /// Setter for [`isFloating`][Self::isFloating].
        #[unsafe(method(setFloating:))]
        #[unsafe(method_family = none)]
        pub fn setFloating(&self, floating: bool);

        #[unsafe(method(isTargetForDropOperation))]
        #[unsafe(method_family = none)]
        pub fn isTargetForDropOperation(&self) -> bool;

        /// Setter for [`isTargetForDropOperation`][Self::isTargetForDropOperation].
        #[unsafe(method(setTargetForDropOperation:))]
        #[unsafe(method_family = none)]
        pub fn setTargetForDropOperation(&self, target_for_drop_operation: bool);

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

        #[cfg(feature = "NSTableView")]
        /// Setter for [`draggingDestinationFeedbackStyle`][Self::draggingDestinationFeedbackStyle].
        #[unsafe(method(setDraggingDestinationFeedbackStyle:))]
        #[unsafe(method_family = none)]
        pub fn setDraggingDestinationFeedbackStyle(
            &self,
            dragging_destination_feedback_style: NSTableViewDraggingDestinationFeedbackStyle,
        );

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(indentationForDropOperation))]
        #[unsafe(method_family = none)]
        pub fn indentationForDropOperation(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`indentationForDropOperation`][Self::indentationForDropOperation].
        #[unsafe(method(setIndentationForDropOperation:))]
        #[unsafe(method_family = none)]
        pub fn setIndentationForDropOperation(&self, indentation_for_drop_operation: CGFloat);

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

        #[cfg(feature = "NSColor")]
        #[unsafe(method(backgroundColor))]
        #[unsafe(method_family = none)]
        pub fn backgroundColor(&self) -> Retained<NSColor>;

        #[cfg(feature = "NSColor")]
        /// Setter for [`backgroundColor`][Self::backgroundColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setBackgroundColor:))]
        #[unsafe(method_family = none)]
        pub fn setBackgroundColor(&self, background_color: &NSColor);

        #[unsafe(method(drawBackgroundInRect:))]
        #[unsafe(method_family = none)]
        pub fn drawBackgroundInRect(&self, dirty_rect: NSRect);

        #[unsafe(method(drawSelectionInRect:))]
        #[unsafe(method_family = none)]
        pub fn drawSelectionInRect(&self, dirty_rect: NSRect);

        #[unsafe(method(drawSeparatorInRect:))]
        #[unsafe(method_family = none)]
        pub fn drawSeparatorInRect(&self, dirty_rect: NSRect);

        #[unsafe(method(drawDraggingDestinationFeedbackInRect:))]
        #[unsafe(method_family = none)]
        pub fn drawDraggingDestinationFeedbackInRect(&self, dirty_rect: NSRect);

        #[unsafe(method(viewAtColumn:))]
        #[unsafe(method_family = none)]
        pub fn viewAtColumn(&self, column: NSInteger) -> Option<Retained<AnyObject>>;

        #[unsafe(method(numberOfColumns))]
        #[unsafe(method_family = none)]
        pub fn numberOfColumns(&self) -> NSInteger;
    );
}

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