Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimationLayer::SurfaceAnimator::Config Struct Reference

Per-role profile + scale tuning bundle. More...

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

Public Attributes

QString showProfile
 Path resolved via registry, e.g. "osd.show".
 
QString hideProfile
 Path resolved via registry, e.g. "osd.hide".
 
QString showScaleProfile
 Optional. Empty → no scale animation on show.
 
QString hideScaleProfile
 Optional. Empty → no scale animation on hide.
 
qreal showScaleFrom = 1.0
 Initial scale value when showScaleProfile is set.
 
qreal hideScaleTo = 1.0
 Final scale value when hideScaleProfile is set.
 
QString showShaderEffectId
 Phase 6: shader transition effect ids.
 
QString hideShaderEffectId
 
QString showShaderProfile
 Optional profile paths for the shader time curve.
 
QString hideShaderProfile
 
QVariantMap showShaderParameters
 Per-event shader parameter overrides forwarded to PhosphorRendering::ShaderEffect::setShaderParams on the shader leg.
 
QVariantMap hideShaderParameters
 

Detailed Description

Per-role profile + scale tuning bundle.

showProfile / hideProfile are Profile path strings (e.g. "osd.show", "popup"). They're resolved live through the registry on every dispatch so a settings-time profile reload affects the next animation.

showScaleProfile left empty disables the scale leg of the show animation — opacity-only fade-in. Set non-empty to enable a parallel scale animation from showScaleFrom → 1.0 driven by that profile's curve / duration. The same convention applies to hide: hideScaleTo == 1.0 (the default) disables the hide-side scale animation.

Profile resolution failures (typo, missing JSON) fall back to the library default Profile (150 ms OutCubic) — same fallback as PhosphorMotionAnimation in the QML bindings. The fallback is surfaced at qCWarning so a typo doesn't silently degrade the animation; the QML-side check-animation-profiles.py build-time lint catches QML references but cannot inspect C++ literals, so the runtime warning is the backstop for setupSurfaceAnimator- style registrations.

Note
Pre-1.0 ABI. Config is a plain aggregate exposed across the DSO boundary. Adding or reordering fields between releases is a binary-incompatible change until the library reaches 1.0 (SOVERSION 0 signals this). Consumers that aggregate-init by position must rebuild against each release; prefer named-member init (Config{.showProfile = ...}) for forward compatibility.

Member Data Documentation

◆ hideProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::hideProfile

Path resolved via registry, e.g. "osd.hide".

◆ hideScaleProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::hideScaleProfile

Optional. Empty → no scale animation on hide.

◆ hideScaleTo

qreal PhosphorAnimationLayer::SurfaceAnimator::Config::hideScaleTo = 1.0

Final scale value when hideScaleProfile is set.

◆ hideShaderEffectId

QString PhosphorAnimationLayer::SurfaceAnimator::Config::hideShaderEffectId

◆ hideShaderParameters

QVariantMap PhosphorAnimationLayer::SurfaceAnimator::Config::hideShaderParameters

◆ hideShaderProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::hideShaderProfile

◆ showProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::showProfile

Path resolved via registry, e.g. "osd.show".

◆ showScaleFrom

qreal PhosphorAnimationLayer::SurfaceAnimator::Config::showScaleFrom = 1.0

Initial scale value when showScaleProfile is set.

◆ showScaleProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::showScaleProfile

Optional. Empty → no scale animation on show.

◆ showShaderEffectId

QString PhosphorAnimationLayer::SurfaceAnimator::Config::showShaderEffectId

Phase 6: shader transition effect ids.

Looked up from AnimationShaderRegistry. Empty → no shader transition.

◆ showShaderParameters

QVariantMap PhosphorAnimationLayer::SurfaceAnimator::Config::showShaderParameters

Per-event shader parameter overrides forwarded to PhosphorRendering::ShaderEffect::setShaderParams on the shader leg.

Keys are the effect's declared parameter ids (e.g. direction, grain). Resolved by the consumer from ShaderProfile::effectiveParameters() at config-register time; the animator forwards them verbatim. Empty → shader runs with its declared defaults.

◆ showShaderProfile

QString PhosphorAnimationLayer::SurfaceAnimator::Config::showShaderProfile

Optional profile paths for the shader time curve.

When empty, the shader leg reuses the opacity profile's curve and duration.


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