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

use crate::*;

extern_category!(
    /// Category "UIAccessibilityContainer" on [`NSObject`].
    #[doc(alias = "UIAccessibilityContainer")]
    pub unsafe trait NSObjectUIAccessibilityContainer {
        #[method(accessibilityElementCount)]
        unsafe fn accessibilityElementCount(&self, mtm: MainThreadMarker) -> NSInteger;

        #[method_id(@__retain_semantics Other accessibilityElementAtIndex:)]
        unsafe fn accessibilityElementAtIndex(
            &self,
            index: NSInteger,
            mtm: MainThreadMarker,
        ) -> Option<Retained<AnyObject>>;

        #[method(indexOfAccessibilityElement:)]
        unsafe fn indexOfAccessibilityElement(
            &self,
            element: &AnyObject,
            mtm: MainThreadMarker,
        ) -> NSInteger;

        #[method_id(@__retain_semantics Other accessibilityElements)]
        unsafe fn accessibilityElements(&self, mtm: MainThreadMarker) -> Option<Retained<NSArray>>;

        #[method(setAccessibilityElements:)]
        unsafe fn setAccessibilityElements(
            &self,
            accessibility_elements: Option<&NSArray>,
            mtm: MainThreadMarker,
        );

        #[cfg(feature = "UIAccessibilityConstants")]
        #[method(accessibilityContainerType)]
        unsafe fn accessibilityContainerType(
            &self,
            mtm: MainThreadMarker,
        ) -> UIAccessibilityContainerType;

        #[cfg(feature = "UIAccessibilityConstants")]
        #[method(setAccessibilityContainerType:)]
        unsafe fn setAccessibilityContainerType(
            &self,
            accessibility_container_type: UIAccessibilityContainerType,
            mtm: MainThreadMarker,
        );

        #[method_id(@__retain_semantics Other automationElements)]
        unsafe fn automationElements(&self, mtm: MainThreadMarker) -> Option<Retained<NSArray>>;

        #[method(setAutomationElements:)]
        unsafe fn setAutomationElements(
            &self,
            automation_elements: Option<&NSArray>,
            mtm: MainThreadMarker,
        );
    }

    unsafe impl NSObjectUIAccessibilityContainer for NSObject {}
);

extern_protocol!(
    pub unsafe trait UIAccessibilityContainerDataTableCell:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[method(accessibilityRowRange)]
        unsafe fn accessibilityRowRange(&self) -> NSRange;

        #[method(accessibilityColumnRange)]
        unsafe fn accessibilityColumnRange(&self) -> NSRange;
    }

    unsafe impl ProtocolType for dyn UIAccessibilityContainerDataTableCell {}
);

extern_protocol!(
    pub unsafe trait UIAccessibilityContainerDataTable:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[method_id(@__retain_semantics Other accessibilityDataTableCellElementForRow:column:)]
        unsafe fn accessibilityDataTableCellElementForRow_column(
            &self,
            row: NSUInteger,
            column: NSUInteger,
        ) -> Option<Retained<ProtocolObject<dyn UIAccessibilityContainerDataTableCell>>>;

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

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

        #[optional]
        #[method_id(@__retain_semantics Other accessibilityHeaderElementsForRow:)]
        unsafe fn accessibilityHeaderElementsForRow(
            &self,
            row: NSUInteger,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn UIAccessibilityContainerDataTableCell>>>>;

        #[optional]
        #[method_id(@__retain_semantics Other accessibilityHeaderElementsForColumn:)]
        unsafe fn accessibilityHeaderElementsForColumn(
            &self,
            column: NSUInteger,
        ) -> Option<Retained<NSArray<ProtocolObject<dyn UIAccessibilityContainerDataTableCell>>>>;
    }

    unsafe impl ProtocolType for dyn UIAccessibilityContainerDataTable {}
);
