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")]
22unsafe impl NSCoding for UICollectionViewTransitionLayout {}
23
24#[cfg(feature = "UICollectionViewLayout")]
25unsafe impl NSObjectProtocol for UICollectionViewTransitionLayout {}
26
27#[cfg(feature = "UICollectionViewLayout")]
28impl UICollectionViewTransitionLayout {
29    extern_methods!(
30        #[cfg(feature = "objc2-core-foundation")]
31        #[unsafe(method(transitionProgress))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn transitionProgress(&self) -> CGFloat;
34
35        #[cfg(feature = "objc2-core-foundation")]
36        /// Setter for [`transitionProgress`][Self::transitionProgress].
37        #[unsafe(method(setTransitionProgress:))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn setTransitionProgress(&self, transition_progress: CGFloat);
40
41        #[unsafe(method(currentLayout))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn currentLayout(&self) -> Retained<UICollectionViewLayout>;
44
45        #[unsafe(method(nextLayout))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn nextLayout(&self) -> Retained<UICollectionViewLayout>;
48
49        #[unsafe(method(initWithCurrentLayout:nextLayout:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithCurrentLayout_nextLayout(
52            this: Allocated<Self>,
53            current_layout: &UICollectionViewLayout,
54            new_layout: &UICollectionViewLayout,
55        ) -> Retained<Self>;
56
57        #[unsafe(method(initWithCoder:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithCoder(
60            this: Allocated<Self>,
61            coder: &NSCoder,
62        ) -> Option<Retained<Self>>;
63
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[cfg(feature = "objc2-core-foundation")]
69        #[unsafe(method(updateValue:forAnimatedKey:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn updateValue_forAnimatedKey(&self, value: CGFloat, key: &NSString);
72
73        #[cfg(feature = "objc2-core-foundation")]
74        #[unsafe(method(valueForAnimatedKey:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn valueForAnimatedKey(&self, key: &NSString) -> CGFloat;
77    );
78}
79
80/// Methods declared on superclass `NSObject`.
81#[cfg(feature = "UICollectionViewLayout")]
82impl UICollectionViewTransitionLayout {
83    extern_methods!(
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
87    );
88}