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::*;
pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString;
extern_class!(
#[unsafe(super(NSCollectionViewLayout, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSCollectionViewLayout")]
pub struct NSCollectionViewTransitionLayout;
);
#[cfg(feature = "NSCollectionViewLayout")]
extern_conformance!(
unsafe impl NSCoding for NSCollectionViewTransitionLayout {}
);
#[cfg(feature = "NSCollectionViewLayout")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSCollectionViewTransitionLayout {}
);
#[cfg(feature = "NSCollectionViewLayout")]
impl NSCollectionViewTransitionLayout {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(transitionProgress))]
#[unsafe(method_family = none)]
pub fn transitionProgress(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[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<NSCollectionViewLayout>;
#[unsafe(method(nextLayout))]
#[unsafe(method_family = none)]
pub fn nextLayout(&self) -> Retained<NSCollectionViewLayout>;
#[unsafe(method(initWithCurrentLayout:nextLayout:))]
#[unsafe(method_family = init)]
pub fn initWithCurrentLayout_nextLayout(
this: Allocated<Self>,
current_layout: &NSCollectionViewLayout,
new_layout: &NSCollectionViewLayout,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(updateValue:forAnimatedKey:))]
#[unsafe(method_family = none)]
pub fn updateValue_forAnimatedKey(
&self,
value: CGFloat,
key: &NSCollectionViewTransitionLayoutAnimatedKey,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(valueForAnimatedKey:))]
#[unsafe(method_family = none)]
pub fn valueForAnimatedKey(
&self,
key: &NSCollectionViewTransitionLayoutAnimatedKey,
) -> CGFloat;
);
}
#[cfg(feature = "NSCollectionViewLayout")]
impl NSCollectionViewTransitionLayout {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}