objc2_scene_kit/generated/
SCNCAAnimationExtensions.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#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15#[cfg(all(feature = "SCNAnimation", feature = "objc2-quartz-core"))]
16#[cfg(not(target_os = "watchos"))]
17unsafe impl SCNAnimationProtocol for CAAnimation {}
18
19mod private_CAAnimationSceneKitAdditions {
20    pub trait Sealed {}
21}
22
23/// Category "SceneKitAdditions" on [`CAAnimation`].
24#[doc(alias = "SceneKitAdditions")]
25/// Extends the CAAnimation class for SceneKit explicit animations.
26pub unsafe trait CAAnimationSceneKitAdditions:
27    ClassType + Sized + private_CAAnimationSceneKitAdditions::Sealed
28{
29    extern_methods!(
30        #[cfg(all(feature = "SCNAnimation", feature = "objc2-quartz-core"))]
31        #[cfg(not(target_os = "watchos"))]
32        /// Bridge with SCNAnimation
33        ///
34        /// Initializes a CoreAnimation animation from a SCNAnimation
35        #[unsafe(method(animationWithSCNAnimation:))]
36        #[unsafe(method_family = none)]
37        unsafe fn animationWithSCNAnimation(animation: &SCNAnimation) -> Retained<CAAnimation>;
38
39        /// Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
40        ///
41        /// A scene-time based animation is evaluated using the "sceneTime" value of the renderer that renders the scene.
42        #[unsafe(method(usesSceneTimeBase))]
43        #[unsafe(method_family = none)]
44        unsafe fn usesSceneTimeBase(&self) -> bool;
45
46        /// Setter for [`usesSceneTimeBase`][Self::usesSceneTimeBase].
47        #[unsafe(method(setUsesSceneTimeBase:))]
48        #[unsafe(method_family = none)]
49        unsafe fn setUsesSceneTimeBase(&self, uses_scene_time_base: bool);
50
51        #[cfg(feature = "objc2-core-foundation")]
52        /// Determines the receiver's fade-in duration.
53        ///
54        /// When the fadeInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
55        #[unsafe(method(fadeInDuration))]
56        #[unsafe(method_family = none)]
57        unsafe fn fadeInDuration(&self) -> CGFloat;
58
59        #[cfg(feature = "objc2-core-foundation")]
60        /// Setter for [`fadeInDuration`][Self::fadeInDuration].
61        #[unsafe(method(setFadeInDuration:))]
62        #[unsafe(method_family = none)]
63        unsafe fn setFadeInDuration(&self, fade_in_duration: CGFloat);
64
65        #[cfg(feature = "objc2-core-foundation")]
66        /// Determines the receiver's fade-out duration.
67        ///
68        /// When the fadeOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
69        #[unsafe(method(fadeOutDuration))]
70        #[unsafe(method_family = none)]
71        unsafe fn fadeOutDuration(&self) -> CGFloat;
72
73        #[cfg(feature = "objc2-core-foundation")]
74        /// Setter for [`fadeOutDuration`][Self::fadeOutDuration].
75        #[unsafe(method(setFadeOutDuration:))]
76        #[unsafe(method_family = none)]
77        unsafe fn setFadeOutDuration(&self, fade_out_duration: CGFloat);
78
79        #[cfg(feature = "SCNAnimation")]
80        /// Specifies the animation events attached to the receiver.
81        #[unsafe(method(animationEvents))]
82        #[unsafe(method_family = none)]
83        unsafe fn animationEvents(&self) -> Option<Retained<NSArray<SCNAnimationEvent>>>;
84
85        #[cfg(feature = "SCNAnimation")]
86        /// Setter for [`animationEvents`][Self::animationEvents].
87        #[unsafe(method(setAnimationEvents:))]
88        #[unsafe(method_family = none)]
89        unsafe fn setAnimationEvents(&self, animation_events: Option<&NSArray<SCNAnimationEvent>>);
90    );
91}
92
93#[cfg(feature = "objc2-quartz-core")]
94#[cfg(not(target_os = "watchos"))]
95impl private_CAAnimationSceneKitAdditions::Sealed for CAAnimation {}
96#[cfg(feature = "objc2-quartz-core")]
97#[cfg(not(target_os = "watchos"))]
98unsafe impl CAAnimationSceneKitAdditions for CAAnimation {}