objc2_ui_kit/generated/
UICollectionViewTransitionLayout.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicollectionviewtransitionlayout?language=objc)
14    #[unsafe(super(UICollectionViewLayout, NSObject))]
15    #[thread_kind = MainThreadOnly]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "UICollectionViewLayout")]
18    pub struct UICollectionViewTransitionLayout;
19);
20
21#[cfg(feature = "UICollectionViewLayout")]
22extern_conformance!(
23    unsafe impl NSCoding for UICollectionViewTransitionLayout {}
24);
25
26#[cfg(feature = "UICollectionViewLayout")]
27extern_conformance!(
28    unsafe impl NSObjectProtocol for UICollectionViewTransitionLayout {}
29);
30
31#[cfg(feature = "UICollectionViewLayout")]
32impl UICollectionViewTransitionLayout {
33    extern_methods!(
34        #[cfg(feature = "objc2-core-foundation")]
35        #[unsafe(method(transitionProgress))]
36        #[unsafe(method_family = none)]
37        pub fn transitionProgress(&self) -> CGFloat;
38
39        #[cfg(feature = "objc2-core-foundation")]
40        /// Setter for [`transitionProgress`][Self::transitionProgress].
41        #[unsafe(method(setTransitionProgress:))]
42        #[unsafe(method_family = none)]
43        pub fn setTransitionProgress(&self, transition_progress: CGFloat);
44
45        #[unsafe(method(currentLayout))]
46        #[unsafe(method_family = none)]
47        pub fn currentLayout(&self) -> Retained<UICollectionViewLayout>;
48
49        #[unsafe(method(nextLayout))]
50        #[unsafe(method_family = none)]
51        pub fn nextLayout(&self) -> Retained<UICollectionViewLayout>;
52
53        #[unsafe(method(initWithCurrentLayout:nextLayout:))]
54        #[unsafe(method_family = init)]
55        pub fn initWithCurrentLayout_nextLayout(
56            this: Allocated<Self>,
57            current_layout: &UICollectionViewLayout,
58            new_layout: &UICollectionViewLayout,
59        ) -> Retained<Self>;
60
61        /// # Safety
62        ///
63        /// `coder` possibly has further requirements.
64        #[unsafe(method(initWithCoder:))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn initWithCoder(
67            this: Allocated<Self>,
68            coder: &NSCoder,
69        ) -> Option<Retained<Self>>;
70
71        #[unsafe(method(init))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75        #[cfg(feature = "objc2-core-foundation")]
76        #[unsafe(method(updateValue:forAnimatedKey:))]
77        #[unsafe(method_family = none)]
78        pub fn updateValue_forAnimatedKey(&self, value: CGFloat, key: &NSString);
79
80        #[cfg(feature = "objc2-core-foundation")]
81        #[unsafe(method(valueForAnimatedKey:))]
82        #[unsafe(method_family = none)]
83        pub fn valueForAnimatedKey(&self, key: &NSString) -> CGFloat;
84    );
85}
86
87/// Methods declared on superclass `NSObject`.
88#[cfg(feature = "UICollectionViewLayout")]
89impl UICollectionViewTransitionLayout {
90    extern_methods!(
91        #[unsafe(method(new))]
92        #[unsafe(method_family = new)]
93        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
94    );
95}