//! 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/uikit/uicollectionviewtransitionlayout?language=objc)
    #[unsafe(super(UICollectionViewLayout, NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UICollectionViewLayout")]
    pub struct UICollectionViewTransitionLayout;
);

#[cfg(feature = "UICollectionViewLayout")]
extern_conformance!(
    unsafe impl NSCoding for UICollectionViewTransitionLayout {}
);

#[cfg(feature = "UICollectionViewLayout")]
extern_conformance!(
    unsafe impl NSObjectProtocol for UICollectionViewTransitionLayout {}
);

#[cfg(feature = "UICollectionViewLayout")]
impl UICollectionViewTransitionLayout {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(transitionProgress))]
        #[unsafe(method_family = none)]
        pub fn transitionProgress(&self) -> CGFloat;

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

        #[unsafe(method(currentLayout))]
        #[unsafe(method_family = none)]
        pub fn currentLayout(&self) -> Retained<UICollectionViewLayout>;

        #[unsafe(method(nextLayout))]
        #[unsafe(method_family = none)]
        pub fn nextLayout(&self) -> Retained<UICollectionViewLayout>;

        #[unsafe(method(initWithCurrentLayout:nextLayout:))]
        #[unsafe(method_family = init)]
        pub fn initWithCurrentLayout_nextLayout(
            this: Allocated<Self>,
            current_layout: &UICollectionViewLayout,
            new_layout: &UICollectionViewLayout,
        ) -> 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>>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(updateValue:forAnimatedKey:))]
        #[unsafe(method_family = none)]
        pub fn updateValue_forAnimatedKey(&self, value: CGFloat, key: &NSString);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(valueForAnimatedKey:))]
        #[unsafe(method_family = none)]
        pub fn valueForAnimatedKey(&self, key: &NSString) -> CGFloat;
    );
}

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