ferroui-base 0.2.0

The base library of FerroUI: the property system, layout, input, styling, media, text, animation, data binding and the compositor
Documentation
// @generated by scripts/generate_composition.py — do not edit

//! The key frame animation classes of the schema.

/// Calls `$callback!` with the key frame animation classes of the schema, one
/// parenthesised entry per class:
///
/// ```text
/// (class name, compositor factory method, value type, interpolator)
/// ```
///
/// The class of an entry is what upstream generates as
/// `{Name}KeyFrameAnimation : KeyFrameAnimation` together with
/// `Compositor.Create{Name}KeyFrameAnimation()`: a `KeyFrames<T>` list, the two
/// `InsertKeyFrame` overloads and a `CreateInstance` that builds a
/// `KeyFrameAnimationInstance<T>` with `{Name}Interpolator`. The callback, written
/// next to the key frame animation base class, expands each entry into that
/// class.
#[macro_export]
#[doc(hidden)]
macro_rules! __for_each_composition_key_frame_animation {
    ($callback:ident) => {
        $callback! {
            (ScalarKeyFrameAnimation, create_scalar_key_frame_animation, f32, $crate::rendering::composition::animations::ScalarInterpolator),
            (DoubleKeyFrameAnimation, create_double_key_frame_animation, f64, $crate::rendering::composition::animations::DoubleInterpolator),
            (BooleanKeyFrameAnimation, create_boolean_key_frame_animation, bool, $crate::rendering::composition::animations::BooleanInterpolator),
            (ColorKeyFrameAnimation, create_color_key_frame_animation, $crate::media::Color, $crate::rendering::composition::animations::ColorInterpolator),
            (VectorKeyFrameAnimation, create_vector_key_frame_animation, $crate::Vector, $crate::rendering::composition::animations::VectorInterpolator),
            (Vector2KeyFrameAnimation, create_vector2_key_frame_animation, $crate::numerics::Vector2, $crate::rendering::composition::animations::Vector2Interpolator),
            (Vector3KeyFrameAnimation, create_vector3_key_frame_animation, $crate::numerics::Vector3, $crate::rendering::composition::animations::Vector3Interpolator),
            (Vector3DKeyFrameAnimation, create_vector3d_key_frame_animation, $crate::Vector3D, $crate::rendering::composition::animations::Vector3DInterpolator),
            (Vector4KeyFrameAnimation, create_vector4_key_frame_animation, $crate::numerics::Vector4, $crate::rendering::composition::animations::Vector4Interpolator),
            (QuaternionKeyFrameAnimation, create_quaternion_key_frame_animation, $crate::numerics::Quaternion, $crate::rendering::composition::animations::QuaternionInterpolator),
            (RelativePointKeyFrameAnimation, create_relative_point_key_frame_animation, $crate::RelativePoint, $crate::rendering::composition::animations::RelativePointInterpolator),
            (RelativeScalarKeyFrameAnimation, create_relative_scalar_key_frame_animation, $crate::RelativeScalar, $crate::rendering::composition::animations::RelativeScalarInterpolator),
        }
    };
}

pub use crate::__for_each_composition_key_frame_animation as for_each_composition_key_frame_animation;

/// The key frame animations of the schema: (name, schema type).
pub const KEY_FRAME_ANIMATIONS: &[(&str, &str)] = &[
    ("Scalar", "float"),
    ("Double", "double"),
    ("Boolean", "bool"),
    ("Color", "Color"),
    ("Vector", "Vector"),
    ("Vector2", "Vector2"),
    ("Vector3", "Vector3"),
    ("Vector3D", "Vector3D"),
    ("Vector4", "Vector4"),
    ("Quaternion", "Quaternion"),
    ("RelativePoint", "RelativePoint"),
    ("RelativeScalar", "RelativeScalar"),
];