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

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIContentInsetsReference(pub NSInteger);
impl UIContentInsetsReference {
    #[doc(alias = "UIContentInsetsReferenceAutomatic")]
    pub const Automatic: Self = Self(0);
    #[doc(alias = "UIContentInsetsReferenceNone")]
    pub const None: Self = Self(1);
    #[doc(alias = "UIContentInsetsReferenceSafeArea")]
    pub const SafeArea: Self = Self(2);
    #[doc(alias = "UIContentInsetsReferenceLayoutMargins")]
    pub const LayoutMargins: Self = Self(3);
    #[doc(alias = "UIContentInsetsReferenceReadableContent")]
    pub const ReadableContent: Self = Self(4);
}

unsafe impl Encode for UIContentInsetsReference {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIContentInsetsReference {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICollectionViewCompositionalLayoutConfiguration;

    unsafe impl ClassType for UICollectionViewCompositionalLayoutConfiguration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for UICollectionViewCompositionalLayoutConfiguration {}

unsafe impl NSObjectProtocol for UICollectionViewCompositionalLayoutConfiguration {}

extern_methods!(
    unsafe impl UICollectionViewCompositionalLayoutConfiguration {
        #[cfg(feature = "UICollectionViewLayout")]
        #[method(scrollDirection)]
        pub unsafe fn scrollDirection(&self) -> UICollectionViewScrollDirection;

        #[cfg(feature = "UICollectionViewLayout")]
        #[method(setScrollDirection:)]
        pub unsafe fn setScrollDirection(&self, scroll_direction: UICollectionViewScrollDirection);

        #[method(interSectionSpacing)]
        pub unsafe fn interSectionSpacing(&self) -> CGFloat;

        #[method(setInterSectionSpacing:)]
        pub unsafe fn setInterSectionSpacing(&self, inter_section_spacing: CGFloat);

        #[method_id(@__retain_semantics Other boundarySupplementaryItems)]
        pub unsafe fn boundarySupplementaryItems(
            &self,
        ) -> Retained<NSArray<NSCollectionLayoutBoundarySupplementaryItem>>;

        #[method(setBoundarySupplementaryItems:)]
        pub unsafe fn setBoundarySupplementaryItems(
            &self,
            boundary_supplementary_items: &NSArray<NSCollectionLayoutBoundarySupplementaryItem>,
        );

        #[method(contentInsetsReference)]
        pub unsafe fn contentInsetsReference(&self) -> UIContentInsetsReference;

        #[method(setContentInsetsReference:)]
        pub unsafe fn setContentInsetsReference(
            &self,
            content_insets_reference: UIContentInsetsReference,
        );
    }
);

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

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

#[cfg(feature = "block2")]
pub type UICollectionViewCompositionalLayoutSectionProvider = *mut block2::Block<
    dyn Fn(
        NSInteger,
        NonNull<ProtocolObject<dyn NSCollectionLayoutEnvironment>>,
    ) -> *mut NSCollectionLayoutSection,
>;

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

    #[cfg(feature = "UICollectionViewLayout")]
    unsafe impl ClassType for UICollectionViewCompositionalLayout {
        #[inherits(NSObject)]
        type Super = UICollectionViewLayout;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(feature = "UICollectionViewLayout")]
unsafe impl NSCoding for UICollectionViewCompositionalLayout {}

#[cfg(feature = "UICollectionViewLayout")]
unsafe impl NSObjectProtocol for UICollectionViewCompositionalLayout {}

extern_methods!(
    #[cfg(feature = "UICollectionViewLayout")]
    unsafe impl UICollectionViewCompositionalLayout {
        #[method_id(@__retain_semantics Init initWithSection:)]
        pub unsafe fn initWithSection(
            this: Allocated<Self>,
            section: &NSCollectionLayoutSection,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithSection:configuration:)]
        pub unsafe fn initWithSection_configuration(
            this: Allocated<Self>,
            section: &NSCollectionLayoutSection,
            configuration: &UICollectionViewCompositionalLayoutConfiguration,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method_id(@__retain_semantics Init initWithSectionProvider:)]
        pub unsafe fn initWithSectionProvider(
            this: Allocated<Self>,
            section_provider: UICollectionViewCompositionalLayoutSectionProvider,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method_id(@__retain_semantics Init initWithSectionProvider:configuration:)]
        pub unsafe fn initWithSectionProvider_configuration(
            this: Allocated<Self>,
            section_provider: UICollectionViewCompositionalLayoutSectionProvider,
            configuration: &UICollectionViewCompositionalLayoutConfiguration,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other configuration)]
        pub unsafe fn configuration(
            &self,
        ) -> Retained<UICollectionViewCompositionalLayoutConfiguration>;

        #[method(setConfiguration:)]
        pub unsafe fn setConfiguration(
            &self,
            configuration: &UICollectionViewCompositionalLayoutConfiguration,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `UICollectionViewLayout`
    #[cfg(feature = "UICollectionViewLayout")]
    unsafe impl UICollectionViewCompositionalLayout {
        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    }
);

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UICollectionLayoutSectionOrthogonalScrollingBehavior(pub NSInteger);
impl UICollectionLayoutSectionOrthogonalScrollingBehavior {
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuous")]
    pub const Continuous: Self = Self(1);
    #[doc(
        alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary"
    )]
    pub const ContinuousGroupLeadingBoundary: Self = Self(2);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorPaging")]
    pub const Paging: Self = Self(3);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging")]
    pub const GroupPaging: Self = Self(4);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered")]
    pub const GroupPagingCentered: Self = Self(5);
}

unsafe impl Encode for UICollectionLayoutSectionOrthogonalScrollingBehavior {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UICollectionLayoutSectionOrthogonalScrollingBehavior {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

#[cfg(all(feature = "UIDynamicBehavior", feature = "block2"))]
pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = *mut block2::Block<
    dyn Fn(
        NonNull<NSArray<ProtocolObject<dyn NSCollectionLayoutVisibleItem>>>,
        CGPoint,
        NonNull<ProtocolObject<dyn NSCollectionLayoutEnvironment>>,
    ),
>;

// NS_TYPED_ENUM
pub type UICollectionLayoutSectionOrthogonalScrollingDecelerationRate = CGFloat;

extern "C" {
    pub static UICollectionLayoutSectionOrthogonalScrollingDecelerationRateAutomatic:
        UICollectionLayoutSectionOrthogonalScrollingDecelerationRate;
}

extern "C" {
    pub static UICollectionLayoutSectionOrthogonalScrollingDecelerationRateNormal:
        UICollectionLayoutSectionOrthogonalScrollingDecelerationRate;
}

extern "C" {
    pub static UICollectionLayoutSectionOrthogonalScrollingDecelerationRateFast:
        UICollectionLayoutSectionOrthogonalScrollingDecelerationRate;
}

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UICollectionLayoutSectionOrthogonalScrollingBounce(pub NSInteger);
impl UICollectionLayoutSectionOrthogonalScrollingBounce {
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBounceAutomatic")]
    pub const Automatic: Self = Self(0);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBounceAlways")]
    pub const Always: Self = Self(1);
    #[doc(alias = "UICollectionLayoutSectionOrthogonalScrollingBounceNever")]
    pub const Never: Self = Self(2);
}

unsafe impl Encode for UICollectionLayoutSectionOrthogonalScrollingBounce {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UICollectionLayoutSectionOrthogonalScrollingBounce {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICollectionLayoutSectionOrthogonalScrollingProperties;

    unsafe impl ClassType for UICollectionLayoutSectionOrthogonalScrollingProperties {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for UICollectionLayoutSectionOrthogonalScrollingProperties {}

unsafe impl NSObjectProtocol for UICollectionLayoutSectionOrthogonalScrollingProperties {}

extern_methods!(
    unsafe impl UICollectionLayoutSectionOrthogonalScrollingProperties {
        #[method(decelerationRate)]
        pub unsafe fn decelerationRate(
            &self,
        ) -> UICollectionLayoutSectionOrthogonalScrollingDecelerationRate;

        #[method(setDecelerationRate:)]
        pub unsafe fn setDecelerationRate(
            &self,
            deceleration_rate: UICollectionLayoutSectionOrthogonalScrollingDecelerationRate,
        );

        #[method(bounce)]
        pub unsafe fn bounce(&self) -> UICollectionLayoutSectionOrthogonalScrollingBounce;

        #[method(setBounce:)]
        pub unsafe fn setBounce(&self, bounce: UICollectionLayoutSectionOrthogonalScrollingBounce);
    }
);

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

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutSection;

    unsafe impl ClassType for NSCollectionLayoutSection {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutSection {}

unsafe impl NSObjectProtocol for NSCollectionLayoutSection {}

extern_methods!(
    unsafe impl NSCollectionLayoutSection {
        #[method_id(@__retain_semantics Other sectionWithGroup:)]
        pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method(contentInsets)]
        pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setContentInsets:)]
        pub unsafe fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets);

        #[method(interGroupSpacing)]
        pub unsafe fn interGroupSpacing(&self) -> CGFloat;

        #[method(setInterGroupSpacing:)]
        pub unsafe fn setInterGroupSpacing(&self, inter_group_spacing: CGFloat);

        #[method(contentInsetsReference)]
        pub unsafe fn contentInsetsReference(&self) -> UIContentInsetsReference;

        #[method(setContentInsetsReference:)]
        pub unsafe fn setContentInsetsReference(
            &self,
            content_insets_reference: UIContentInsetsReference,
        );

        #[method(supplementaryContentInsetsReference)]
        pub unsafe fn supplementaryContentInsetsReference(&self) -> UIContentInsetsReference;

        #[method(setSupplementaryContentInsetsReference:)]
        pub unsafe fn setSupplementaryContentInsetsReference(
            &self,
            supplementary_content_insets_reference: UIContentInsetsReference,
        );

        #[method(orthogonalScrollingBehavior)]
        pub unsafe fn orthogonalScrollingBehavior(
            &self,
        ) -> UICollectionLayoutSectionOrthogonalScrollingBehavior;

        #[method(setOrthogonalScrollingBehavior:)]
        pub unsafe fn setOrthogonalScrollingBehavior(
            &self,
            orthogonal_scrolling_behavior: UICollectionLayoutSectionOrthogonalScrollingBehavior,
        );

        #[method_id(@__retain_semantics Other orthogonalScrollingProperties)]
        pub unsafe fn orthogonalScrollingProperties(
            &self,
        ) -> Retained<UICollectionLayoutSectionOrthogonalScrollingProperties>;

        #[method_id(@__retain_semantics Other boundarySupplementaryItems)]
        pub unsafe fn boundarySupplementaryItems(
            &self,
        ) -> Retained<NSArray<NSCollectionLayoutBoundarySupplementaryItem>>;

        #[method(setBoundarySupplementaryItems:)]
        pub unsafe fn setBoundarySupplementaryItems(
            &self,
            boundary_supplementary_items: &NSArray<NSCollectionLayoutBoundarySupplementaryItem>,
        );

        #[cfg(all(feature = "UIDynamicBehavior", feature = "block2"))]
        #[method(visibleItemsInvalidationHandler)]
        pub unsafe fn visibleItemsInvalidationHandler(
            &self,
        ) -> NSCollectionLayoutSectionVisibleItemsInvalidationHandler;

        #[cfg(all(feature = "UIDynamicBehavior", feature = "block2"))]
        #[method(setVisibleItemsInvalidationHandler:)]
        pub unsafe fn setVisibleItemsInvalidationHandler(
            &self,
            visible_items_invalidation_handler: NSCollectionLayoutSectionVisibleItemsInvalidationHandler,
        );

        #[method_id(@__retain_semantics Other decorationItems)]
        pub unsafe fn decorationItems(&self)
            -> Retained<NSArray<NSCollectionLayoutDecorationItem>>;

        #[method(setDecorationItems:)]
        pub unsafe fn setDecorationItems(
            &self,
            decoration_items: &NSArray<NSCollectionLayoutDecorationItem>,
        );
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutItem;

    unsafe impl ClassType for NSCollectionLayoutItem {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutItem {}

unsafe impl NSObjectProtocol for NSCollectionLayoutItem {}

extern_methods!(
    unsafe impl NSCollectionLayoutItem {
        #[method_id(@__retain_semantics Other itemWithLayoutSize:)]
        pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Retained<Self>;

        #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)]
        pub unsafe fn itemWithLayoutSize_supplementaryItems(
            layout_size: &NSCollectionLayoutSize,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method(contentInsets)]
        pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(setContentInsets:)]
        pub unsafe fn setContentInsets(&self, content_insets: NSDirectionalEdgeInsets);

        #[method_id(@__retain_semantics Other edgeSpacing)]
        pub unsafe fn edgeSpacing(&self) -> Option<Retained<NSCollectionLayoutEdgeSpacing>>;

        #[method(setEdgeSpacing:)]
        pub unsafe fn setEdgeSpacing(&self, edge_spacing: Option<&NSCollectionLayoutEdgeSpacing>);

        #[method_id(@__retain_semantics Other layoutSize)]
        pub unsafe fn layoutSize(&self) -> Retained<NSCollectionLayoutSize>;

        #[method_id(@__retain_semantics Other supplementaryItems)]
        pub unsafe fn supplementaryItems(
            &self,
        ) -> Retained<NSArray<NSCollectionLayoutSupplementaryItem>>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutGroupCustomItem;

    unsafe impl ClassType for NSCollectionLayoutGroupCustomItem {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutGroupCustomItem {}

unsafe impl NSObjectProtocol for NSCollectionLayoutGroupCustomItem {}

extern_methods!(
    unsafe impl NSCollectionLayoutGroupCustomItem {
        #[method_id(@__retain_semantics Other customItemWithFrame:)]
        pub unsafe fn customItemWithFrame(frame: CGRect, mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other customItemWithFrame:zIndex:)]
        pub unsafe fn customItemWithFrame_zIndex(
            frame: CGRect,
            z_index: NSInteger,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(frame)]
        pub unsafe fn frame(&self) -> CGRect;

        #[method(zIndex)]
        pub unsafe fn zIndex(&self) -> NSInteger;
    }
);

#[cfg(feature = "block2")]
pub type NSCollectionLayoutGroupCustomItemProvider = *mut block2::Block<
    dyn Fn(
        NonNull<ProtocolObject<dyn NSCollectionLayoutEnvironment>>,
    ) -> NonNull<NSArray<NSCollectionLayoutGroupCustomItem>>,
>;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutGroup;

    unsafe impl ClassType for NSCollectionLayoutGroup {
        #[inherits(NSObject)]
        type Super = NSCollectionLayoutItem;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutGroup {}

unsafe impl NSObjectProtocol for NSCollectionLayoutGroup {}

extern_methods!(
    unsafe impl NSCollectionLayoutGroup {
        #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:repeatingSubitem:count:)]
        pub unsafe fn horizontalGroupWithLayoutSize_repeatingSubitem_count(
            layout_size: &NSCollectionLayoutSize,
            subitem: &NSCollectionLayoutItem,
            count: NSInteger,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitems:)]
        pub unsafe fn horizontalGroupWithLayoutSize_subitems(
            layout_size: &NSCollectionLayoutSize,
            subitems: &NSArray<NSCollectionLayoutItem>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:repeatingSubitem:count:)]
        pub unsafe fn verticalGroupWithLayoutSize_repeatingSubitem_count(
            layout_size: &NSCollectionLayoutSize,
            subitem: &NSCollectionLayoutItem,
            count: NSInteger,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitems:)]
        pub unsafe fn verticalGroupWithLayoutSize_subitems(
            layout_size: &NSCollectionLayoutSize,
            subitems: &NSArray<NSCollectionLayoutItem>,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method_id(@__retain_semantics Other customGroupWithLayoutSize:itemProvider:)]
        pub unsafe fn customGroupWithLayoutSize_itemProvider(
            layout_size: &NSCollectionLayoutSize,
            item_provider: NSCollectionLayoutGroupCustomItemProvider,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other supplementaryItems)]
        pub unsafe fn supplementaryItems(
            &self,
        ) -> Retained<NSArray<NSCollectionLayoutSupplementaryItem>>;

        #[method(setSupplementaryItems:)]
        pub unsafe fn setSupplementaryItems(
            &self,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        );

        #[method_id(@__retain_semantics Other interItemSpacing)]
        pub unsafe fn interItemSpacing(&self) -> Option<Retained<NSCollectionLayoutSpacing>>;

        #[method(setInterItemSpacing:)]
        pub unsafe fn setInterItemSpacing(
            &self,
            inter_item_spacing: Option<&NSCollectionLayoutSpacing>,
        );

        #[method_id(@__retain_semantics Other subitems)]
        pub unsafe fn subitems(&self) -> Retained<NSArray<NSCollectionLayoutItem>>;

        #[method_id(@__retain_semantics Other visualDescription)]
        pub unsafe fn visualDescription(&self) -> Retained<NSString>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSCollectionLayoutItem`
    unsafe impl NSCollectionLayoutGroup {
        #[method_id(@__retain_semantics Other itemWithLayoutSize:)]
        pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Retained<Self>;

        #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)]
        pub unsafe fn itemWithLayoutSize_supplementaryItems(
            layout_size: &NSCollectionLayoutSize,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        ) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutDimension;

    unsafe impl ClassType for NSCollectionLayoutDimension {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutDimension {}

unsafe impl NSObjectProtocol for NSCollectionLayoutDimension {}

extern_methods!(
    unsafe impl NSCollectionLayoutDimension {
        #[method_id(@__retain_semantics Other fractionalWidthDimension:)]
        pub unsafe fn fractionalWidthDimension(
            fractional_width: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other fractionalHeightDimension:)]
        pub unsafe fn fractionalHeightDimension(
            fractional_height: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other absoluteDimension:)]
        pub unsafe fn absoluteDimension(
            absolute_dimension: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other estimatedDimension:)]
        pub unsafe fn estimatedDimension(
            estimated_dimension: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other uniformAcrossSiblingsWithEstimate:)]
        pub unsafe fn uniformAcrossSiblingsWithEstimate(
            estimated_dimension: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(isFractionalWidth)]
        pub unsafe fn isFractionalWidth(&self) -> bool;

        #[method(isFractionalHeight)]
        pub unsafe fn isFractionalHeight(&self) -> bool;

        #[method(isAbsolute)]
        pub unsafe fn isAbsolute(&self) -> bool;

        #[method(isEstimated)]
        pub unsafe fn isEstimated(&self) -> bool;

        #[method(isUniformAcrossSiblings)]
        pub unsafe fn isUniformAcrossSiblings(&self) -> bool;

        #[method(dimension)]
        pub unsafe fn dimension(&self) -> CGFloat;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutSize;

    unsafe impl ClassType for NSCollectionLayoutSize {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutSize {}

unsafe impl NSObjectProtocol for NSCollectionLayoutSize {}

extern_methods!(
    unsafe impl NSCollectionLayoutSize {
        #[method_id(@__retain_semantics Other sizeWithWidthDimension:heightDimension:)]
        pub unsafe fn sizeWithWidthDimension_heightDimension(
            width: &NSCollectionLayoutDimension,
            height: &NSCollectionLayoutDimension,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other widthDimension)]
        pub unsafe fn widthDimension(&self) -> Retained<NSCollectionLayoutDimension>;

        #[method_id(@__retain_semantics Other heightDimension)]
        pub unsafe fn heightDimension(&self) -> Retained<NSCollectionLayoutDimension>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutSpacing;

    unsafe impl ClassType for NSCollectionLayoutSpacing {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutSpacing {}

unsafe impl NSObjectProtocol for NSCollectionLayoutSpacing {}

extern_methods!(
    unsafe impl NSCollectionLayoutSpacing {
        #[method_id(@__retain_semantics Other flexibleSpacing:)]
        pub unsafe fn flexibleSpacing(
            flexible_spacing: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other fixedSpacing:)]
        pub unsafe fn fixedSpacing(fixed_spacing: CGFloat, mtm: MainThreadMarker)
            -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(spacing)]
        pub unsafe fn spacing(&self) -> CGFloat;

        #[method(isFlexibleSpacing)]
        pub unsafe fn isFlexibleSpacing(&self) -> bool;

        #[method(isFixedSpacing)]
        pub unsafe fn isFixedSpacing(&self) -> bool;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutEdgeSpacing;

    unsafe impl ClassType for NSCollectionLayoutEdgeSpacing {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutEdgeSpacing {}

unsafe impl NSObjectProtocol for NSCollectionLayoutEdgeSpacing {}

extern_methods!(
    unsafe impl NSCollectionLayoutEdgeSpacing {
        #[method_id(@__retain_semantics Other spacingForLeading:top:trailing:bottom:)]
        pub unsafe fn spacingForLeading_top_trailing_bottom(
            leading: Option<&NSCollectionLayoutSpacing>,
            top: Option<&NSCollectionLayoutSpacing>,
            trailing: Option<&NSCollectionLayoutSpacing>,
            bottom: Option<&NSCollectionLayoutSpacing>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other leading)]
        pub unsafe fn leading(&self) -> Option<Retained<NSCollectionLayoutSpacing>>;

        #[method_id(@__retain_semantics Other top)]
        pub unsafe fn top(&self) -> Option<Retained<NSCollectionLayoutSpacing>>;

        #[method_id(@__retain_semantics Other trailing)]
        pub unsafe fn trailing(&self) -> Option<Retained<NSCollectionLayoutSpacing>>;

        #[method_id(@__retain_semantics Other bottom)]
        pub unsafe fn bottom(&self) -> Option<Retained<NSCollectionLayoutSpacing>>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutSupplementaryItem;

    unsafe impl ClassType for NSCollectionLayoutSupplementaryItem {
        #[inherits(NSObject)]
        type Super = NSCollectionLayoutItem;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutSupplementaryItem {}

unsafe impl NSObjectProtocol for NSCollectionLayoutSupplementaryItem {}

extern_methods!(
    unsafe impl NSCollectionLayoutSupplementaryItem {
        #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)]
        pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            container_anchor: &NSCollectionLayoutAnchor,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)]
        pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            container_anchor: &NSCollectionLayoutAnchor,
            item_anchor: &NSCollectionLayoutAnchor,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(zIndex)]
        pub unsafe fn zIndex(&self) -> NSInteger;

        #[method(setZIndex:)]
        pub unsafe fn setZIndex(&self, z_index: NSInteger);

        #[method_id(@__retain_semantics Other elementKind)]
        pub unsafe fn elementKind(&self) -> Retained<NSString>;

        #[method_id(@__retain_semantics Other containerAnchor)]
        pub unsafe fn containerAnchor(&self) -> Retained<NSCollectionLayoutAnchor>;

        #[method_id(@__retain_semantics Other itemAnchor)]
        pub unsafe fn itemAnchor(&self) -> Option<Retained<NSCollectionLayoutAnchor>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSCollectionLayoutItem`
    unsafe impl NSCollectionLayoutSupplementaryItem {
        #[method_id(@__retain_semantics Other itemWithLayoutSize:)]
        pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Retained<Self>;

        #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)]
        pub unsafe fn itemWithLayoutSize_supplementaryItems(
            layout_size: &NSCollectionLayoutSize,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        ) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutBoundarySupplementaryItem;

    unsafe impl ClassType for NSCollectionLayoutBoundarySupplementaryItem {
        #[inherits(NSCollectionLayoutItem, NSObject)]
        type Super = NSCollectionLayoutSupplementaryItem;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutBoundarySupplementaryItem {}

unsafe impl NSObjectProtocol for NSCollectionLayoutBoundarySupplementaryItem {}

extern_methods!(
    unsafe impl NSCollectionLayoutBoundarySupplementaryItem {
        #[cfg(feature = "UIGeometry")]
        #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)]
        pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            alignment: NSRectAlignment,
        ) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)]
        pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            alignment: NSRectAlignment,
            absolute_offset: CGPoint,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(extendsBoundary)]
        pub unsafe fn extendsBoundary(&self) -> bool;

        #[method(setExtendsBoundary:)]
        pub unsafe fn setExtendsBoundary(&self, extends_boundary: bool);

        #[method(pinToVisibleBounds)]
        pub unsafe fn pinToVisibleBounds(&self) -> bool;

        #[method(setPinToVisibleBounds:)]
        pub unsafe fn setPinToVisibleBounds(&self, pin_to_visible_bounds: bool);

        #[cfg(feature = "UIGeometry")]
        #[method(alignment)]
        pub unsafe fn alignment(&self) -> NSRectAlignment;

        #[method(offset)]
        pub unsafe fn offset(&self) -> CGPoint;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSCollectionLayoutSupplementaryItem`
    unsafe impl NSCollectionLayoutBoundarySupplementaryItem {
        #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)]
        pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            container_anchor: &NSCollectionLayoutAnchor,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)]
        pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor(
            layout_size: &NSCollectionLayoutSize,
            element_kind: &NSString,
            container_anchor: &NSCollectionLayoutAnchor,
            item_anchor: &NSCollectionLayoutAnchor,
        ) -> Retained<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSCollectionLayoutItem`
    unsafe impl NSCollectionLayoutBoundarySupplementaryItem {
        #[method_id(@__retain_semantics Other itemWithLayoutSize:)]
        pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Retained<Self>;

        #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)]
        pub unsafe fn itemWithLayoutSize_supplementaryItems(
            layout_size: &NSCollectionLayoutSize,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        ) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutDecorationItem;

    unsafe impl ClassType for NSCollectionLayoutDecorationItem {
        #[inherits(NSObject)]
        type Super = NSCollectionLayoutItem;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutDecorationItem {}

unsafe impl NSObjectProtocol for NSCollectionLayoutDecorationItem {}

extern_methods!(
    unsafe impl NSCollectionLayoutDecorationItem {
        #[method_id(@__retain_semantics Other backgroundDecorationItemWithElementKind:)]
        pub unsafe fn backgroundDecorationItemWithElementKind(
            element_kind: &NSString,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method(zIndex)]
        pub unsafe fn zIndex(&self) -> NSInteger;

        #[method(setZIndex:)]
        pub unsafe fn setZIndex(&self, z_index: NSInteger);

        #[method_id(@__retain_semantics Other elementKind)]
        pub unsafe fn elementKind(&self) -> Retained<NSString>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSCollectionLayoutItem`
    unsafe impl NSCollectionLayoutDecorationItem {
        #[method_id(@__retain_semantics Other itemWithLayoutSize:)]
        pub unsafe fn itemWithLayoutSize(layout_size: &NSCollectionLayoutSize) -> Retained<Self>;

        #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)]
        pub unsafe fn itemWithLayoutSize_supplementaryItems(
            layout_size: &NSCollectionLayoutSize,
            supplementary_items: &NSArray<NSCollectionLayoutSupplementaryItem>,
        ) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCollectionLayoutAnchor;

    unsafe impl ClassType for NSCollectionLayoutAnchor {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for NSCollectionLayoutAnchor {}

unsafe impl NSObjectProtocol for NSCollectionLayoutAnchor {}

extern_methods!(
    unsafe impl NSCollectionLayoutAnchor {
        #[cfg(feature = "UIGeometry")]
        #[method_id(@__retain_semantics Other layoutAnchorWithEdges:)]
        pub unsafe fn layoutAnchorWithEdges(
            edges: NSDirectionalRectEdge,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method_id(@__retain_semantics Other layoutAnchorWithEdges:absoluteOffset:)]
        pub unsafe fn layoutAnchorWithEdges_absoluteOffset(
            edges: NSDirectionalRectEdge,
            absolute_offset: CGPoint,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method_id(@__retain_semantics Other layoutAnchorWithEdges:fractionalOffset:)]
        pub unsafe fn layoutAnchorWithEdges_fractionalOffset(
            edges: NSDirectionalRectEdge,
            fractional_offset: CGPoint,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "UIGeometry")]
        #[method(edges)]
        pub unsafe fn edges(&self) -> NSDirectionalRectEdge;

        #[method(offset)]
        pub unsafe fn offset(&self) -> CGPoint;

        #[method(isAbsoluteOffset)]
        pub unsafe fn isAbsoluteOffset(&self) -> bool;

        #[method(isFractionalOffset)]
        pub unsafe fn isFractionalOffset(&self) -> bool;
    }
);

extern_protocol!(
    pub unsafe trait NSCollectionLayoutContainer:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[method(contentSize)]
        unsafe fn contentSize(&self) -> CGSize;

        #[method(effectiveContentSize)]
        unsafe fn effectiveContentSize(&self) -> CGSize;

        #[cfg(feature = "UIGeometry")]
        #[method(contentInsets)]
        unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets;

        #[cfg(feature = "UIGeometry")]
        #[method(effectiveContentInsets)]
        unsafe fn effectiveContentInsets(&self) -> NSDirectionalEdgeInsets;
    }

    unsafe impl ProtocolType for dyn NSCollectionLayoutContainer {}
);

extern_protocol!(
    pub unsafe trait NSCollectionLayoutEnvironment:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[method_id(@__retain_semantics Other container)]
        unsafe fn container(&self) -> Retained<ProtocolObject<dyn NSCollectionLayoutContainer>>;

        #[cfg(feature = "UITraitCollection")]
        #[method_id(@__retain_semantics Other traitCollection)]
        unsafe fn traitCollection(&self) -> Retained<UITraitCollection>;
    }

    unsafe impl ProtocolType for dyn NSCollectionLayoutEnvironment {}
);

extern_protocol!(
    #[cfg(feature = "UIDynamicBehavior")]
    pub unsafe trait NSCollectionLayoutVisibleItem:
        NSObjectProtocol + UIDynamicItem + IsMainThreadOnly
    {
        #[method(alpha)]
        unsafe fn alpha(&self) -> CGFloat;

        #[method(setAlpha:)]
        unsafe fn setAlpha(&self, alpha: CGFloat);

        #[method(zIndex)]
        unsafe fn zIndex(&self) -> NSInteger;

        #[method(setZIndex:)]
        unsafe fn setZIndex(&self, z_index: NSInteger);

        #[method(isHidden)]
        unsafe fn isHidden(&self) -> bool;

        #[method(setHidden:)]
        unsafe fn setHidden(&self, hidden: bool);

        #[method(center)]
        unsafe fn center(&self) -> CGPoint;

        #[method(setCenter:)]
        unsafe fn setCenter(&self, center: CGPoint);

        #[method(transform)]
        unsafe fn transform(&self) -> CGAffineTransform;

        #[method(setTransform:)]
        unsafe fn setTransform(&self, transform: CGAffineTransform);

        #[cfg(feature = "objc2-quartz-core")]
        #[cfg(not(target_os = "watchos"))]
        #[method(transform3D)]
        unsafe fn transform3D(&self) -> CATransform3D;

        #[cfg(feature = "objc2-quartz-core")]
        #[cfg(not(target_os = "watchos"))]
        #[method(setTransform3D:)]
        unsafe fn setTransform3D(&self, transform3_d: CATransform3D);

        #[method_id(@__retain_semantics Other name)]
        unsafe fn name(&self) -> Retained<NSString>;

        #[method_id(@__retain_semantics Other indexPath)]
        unsafe fn indexPath(&self) -> Retained<NSIndexPath>;

        #[method(frame)]
        unsafe fn frame(&self) -> CGRect;

        #[method(bounds)]
        unsafe fn bounds(&self) -> CGRect;

        #[cfg(feature = "UICollectionViewLayout")]
        #[method(representedElementCategory)]
        unsafe fn representedElementCategory(&self) -> UICollectionElementCategory;

        #[method_id(@__retain_semantics Other representedElementKind)]
        unsafe fn representedElementKind(&self) -> Option<Retained<NSString>>;
    }

    #[cfg(feature = "UIDynamicBehavior")]
    unsafe impl ProtocolType for dyn NSCollectionLayoutVisibleItem {}
);

extern_methods!(
    /// Deprecated
    unsafe impl NSCollectionLayoutSection {
        #[deprecated]
        #[method(supplementariesFollowContentInsets)]
        pub unsafe fn supplementariesFollowContentInsets(&self) -> bool;

        #[deprecated]
        #[method(setSupplementariesFollowContentInsets:)]
        pub unsafe fn setSupplementariesFollowContentInsets(
            &self,
            supplementaries_follow_content_insets: bool,
        );
    }
);

extern_methods!(
    /// Deprecated
    unsafe impl NSCollectionLayoutGroup {
        #[deprecated]
        #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitem:count:)]
        pub unsafe fn horizontalGroupWithLayoutSize_subitem_count(
            layout_size: &NSCollectionLayoutSize,
            subitem: &NSCollectionLayoutItem,
            count: NSInteger,
        ) -> Retained<Self>;

        #[deprecated]
        #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitem:count:)]
        pub unsafe fn verticalGroupWithLayoutSize_subitem_count(
            layout_size: &NSCollectionLayoutSize,
            subitem: &NSCollectionLayoutItem,
            count: NSInteger,
        ) -> Retained<Self>;
    }
);
