Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimation::MotionSpec< T > Struct Template Reference

Runtime call-site bundle for starting an AnimatedValue<T>. More...

#include <phosphor-animation/include/PhosphorAnimation/MotionSpec.h>

Public Attributes

Profile profile
 
IMotionClockclock = nullptr
 Non-owning; non-null required.
 
RetargetPolicy retargetPolicy = RetargetPolicy::PreserveVelocity
 
std::function< void(const T &)> onValueChanged
 Fired every advance() that changes value().
 
std::function< void()> onComplete
 Fired once on completion. Not fired on cancel().
 

Detailed Description

template<typename T>
struct PhosphorAnimation::MotionSpec< T >

Runtime call-site bundle for starting an AnimatedValue<T>.

Profile is the serializable config surface; MotionSpec adds per-animation runtime concerns: clock, retarget policy, callbacks. Clock is non-owning (outlives all AnimatedValues). Callbacks MUST NOT throw — the library does not catch exceptions out of them.

Member Data Documentation

◆ clock

template<typename T >
IMotionClock* PhosphorAnimation::MotionSpec< T >::clock = nullptr

Non-owning; non-null required.

◆ onComplete

template<typename T >
std::function<void()> PhosphorAnimation::MotionSpec< T >::onComplete

Fired once on completion. Not fired on cancel().

◆ onValueChanged

template<typename T >
std::function<void(const T&)> PhosphorAnimation::MotionSpec< T >::onValueChanged

Fired every advance() that changes value().

Wire damage/invalidation here. When using AnimationController, prefer its virtual hooks instead.

◆ profile

template<typename T >
Profile PhosphorAnimation::MotionSpec< T >::profile

◆ retargetPolicy


The documentation for this struct was generated from the following file: