Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
MotionSpec.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
8#include <PhosphorAnimation/phosphoranimation_export.h>
9
10#include <functional>
11
12namespace PhosphorAnimation {
13
14class IMotionClock;
15
22template<typename T>
24{
26
28 IMotionClock* clock = nullptr;
29
31
34 std::function<void(const T&)> onValueChanged;
35
37 std::function<void()> onComplete;
38};
39
40} // namespace PhosphorAnimation
Abstract clock interface for the motion runtime.
Definition IMotionClock.h:18
Configuration for a single animation event.
Definition Profile.h:33
Definition AnimatedValue.h:31
RetargetPolicy
How an in-flight AnimatedValue<T> reshapes on retarget().
Definition RetargetPolicy.h:9
@ PreserveVelocity
Carry velocity across the segment boundary, re-scaled to the new distance. Default.
Runtime call-site bundle for starting an AnimatedValue<T>.
Definition MotionSpec.h:24
std::function< void(const T &)> onValueChanged
Fired every advance() that changes value().
Definition MotionSpec.h:34
Profile profile
Definition MotionSpec.h:25
RetargetPolicy retargetPolicy
Definition MotionSpec.h:30
std::function< void()> onComplete
Fired once on completion. Not fired on cancel().
Definition MotionSpec.h:37
IMotionClock * clock
Non-owning; non-null required.
Definition MotionSpec.h:28