Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ProfilePaths.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
6#include <PhosphorAnimation/phosphoranimation_export.h>
7
8#include <QString>
9#include <QStringList>
10
11namespace PhosphorAnimation {
12
33namespace ProfilePaths {
34
35// Root
36PHOSPHORANIMATION_EXPORT extern const QString Global;
37
38// window.* — runtime window-lifecycle animations driven by the
39// kwin-effect's OffscreenEffect via tryBeginShaderForEvent. The
40// snap/layout-switch leaves are window events triggered by zone
41// interaction (the WINDOW animates when it snaps into/out of a zone
42// or when a layout switch repositions it).
43PHOSPHORANIMATION_EXPORT extern const QString Window;
44// window.appearance.* — a window surface materialising / dissolving (the
45// appearance shader contract). WindowAppearance is the cascade parent.
46PHOSPHORANIMATION_EXPORT extern const QString WindowAppearance;
47PHOSPHORANIMATION_EXPORT extern const QString WindowOpen;
48PHOSPHORANIMATION_EXPORT extern const QString WindowClose;
49PHOSPHORANIMATION_EXPORT extern const QString WindowMinimize;
50PHOSPHORANIMATION_EXPORT extern const QString WindowFocus;
51// window.movement.* — a window changing geometry, old-rect → new-rect (the
52// geometry-morph shader contract). WindowMovement is the cascade parent.
53// WindowMove is the exception: the held interactive drag, its own opt-in
54// `move` class (see EventClassMove below). There are NO resize legs — the
55// interactive edge-drag resize and the never-routed snapResize were dropped
56// (see the rationale note in profilepaths.cpp); discrete resizes are
57// covered by snapIn / layoutSwitch / maximize.
58PHOSPHORANIMATION_EXPORT extern const QString WindowMovement;
59PHOSPHORANIMATION_EXPORT extern const QString WindowMaximize;
60PHOSPHORANIMATION_EXPORT extern const QString WindowMove;
61PHOSPHORANIMATION_EXPORT extern const QString WindowSnapIn;
62PHOSPHORANIMATION_EXPORT extern const QString WindowSnapOut;
63PHOSPHORANIMATION_EXPORT extern const QString WindowLayoutSwitch;
64
65// desktop.* — full-screen two-texture transitions driven by the kwin-effect's
66// screen-level paint pass. Unlike the per-window window.* events, these blend
67// two full-screen scene captures, so they use the desktop event class and its
68// own two-texture shader contract rather than the single-surface pipeline.
69// `switch` blends the OUTGOING desktop against the INCOMING desktop; `peek`
70// (show desktop) blends the windows scene against the bare desktop, and its
71// show-back leg reuses the same node, running the same blend with time
72// reversed so an asymmetric pack retraces its own motion.
73PHOSPHORANIMATION_EXPORT extern const QString Desktop;
74PHOSPHORANIMATION_EXPORT extern const QString DesktopSwitch;
75PHOSPHORANIMATION_EXPORT extern const QString DesktopPeek;
76
77// editor.* — Layout-editor-only zone manipulation animations
78// (fill-preview, drag-resize-preview). NOT triggered by runtime
79// window snapping — window-snap animations are KWin's
80// compositor-level domain. These paths only fire inside the
81// Phosphor layout editor.
82//
83// snapIn and snapOut are the two DIRECTIONS of one animator
84// (ZoneFillAnimation.qml), picked by whether the zone is taking space or
85// giving it up: snapIn on the fill preview and on a neighbour absorbing a
86// deleted zone, snapOut on the original half when a zone is split. They are
87// not two animators, so a caller that changes geometry gets the right leg by
88// direction rather than by naming one.
89PHOSPHORANIMATION_EXPORT extern const QString Editor;
90PHOSPHORANIMATION_EXPORT extern const QString EditorSnapIn;
91PHOSPHORANIMATION_EXPORT extern const QString EditorSnapOut;
92PHOSPHORANIMATION_EXPORT extern const QString EditorSnapResize;
93
94// scrolling.* — the scrolling strip's VIEW. `scrolling.view` is one leg for
95// the whole strip: the compositor springs it once per output and every column
96// rides that offset, rather than each column springing itself. It is its own
97// root rather than a window.movement.* leaf because its subject is the view
98// and not any window.
99// `scrolling.tabSwitch` shares the root for grouping only: its subject IS a
100// window (the tab arriving in the rect the outgoing one vacated), so it
101// carries its own opt-in `tab` class (see EventClassTab below), not the strip
102// class its siblings do.
103PHOSPHORANIMATION_EXPORT extern const QString Scrolling;
104PHOSPHORANIMATION_EXPORT extern const QString ScrollingView;
105PHOSPHORANIMATION_EXPORT extern const QString ScrollingTabSwitch;
106
107// shell.* — surfaces owned by the desktop shell rather than by an
108// application: today the Plasma applet popups (the launcher, the system tray
109// flyouts, any widget's expanded view). Appearance legs like the window ones,
110// driven by the same kwin-effect lifecycle hooks, but on their OWN root for
111// the reason the decoration tree gives them one: a foreign surface must not
112// inherit what the user chose for their windows. That is enforced in the
113// shader tree, where the whole subtree resolves inside itself
114// (shaderPathIsolationRoot) — engaging a pack HERE is the entire opt-in, and
115// an unconfigured shell surface animates exactly as it did before the root
116// existed. Show / hide rather than open / close: these are ephemeral
117// surfaces, the same family the osd and popup roots name that way.
118//
119// The isolation is the SHADER tree's alone. ProfileTree has no isolation arm, so
120// these legs take their duration and curve from the ordinary walk, `global`
121// included — deliberately, since the timing is inert until a pack is engaged and a
122// user who sets one duration for everything means it. Anything describing this
123// subtree to a user must scope the claim to the shader, or it is wrong about
124// timing.
125PHOSPHORANIMATION_EXPORT extern const QString Shell;
126PHOSPHORANIMATION_EXPORT extern const QString ShellAppletPopup;
127PHOSPHORANIMATION_EXPORT extern const QString ShellAppletPopupShow;
128PHOSPHORANIMATION_EXPORT extern const QString ShellAppletPopupHide;
129
130// osd.*
131PHOSPHORANIMATION_EXPORT extern const QString Osd;
132PHOSPHORANIMATION_EXPORT extern const QString OsdShow;
133PHOSPHORANIMATION_EXPORT extern const QString OsdPop;
134PHOSPHORANIMATION_EXPORT extern const QString OsdHide;
135
136// popup.* — transient overlays invoked by user action.
137// Per-leg .show/.hide leaves let show/hide shader effects diverge.
138PHOSPHORANIMATION_EXPORT extern const QString Popup;
139PHOSPHORANIMATION_EXPORT extern const QString PopupZoneSelector;
140PHOSPHORANIMATION_EXPORT extern const QString PopupZoneSelectorShow;
141PHOSPHORANIMATION_EXPORT extern const QString PopupZoneSelectorHide;
142PHOSPHORANIMATION_EXPORT extern const QString PopupLayoutPicker;
143PHOSPHORANIMATION_EXPORT extern const QString PopupLayoutPickerShow;
144PHOSPHORANIMATION_EXPORT extern const QString PopupLayoutPickerHide;
145PHOSPHORANIMATION_EXPORT extern const QString PopupSnapAssist;
146PHOSPHORANIMATION_EXPORT extern const QString PopupSnapAssistShow;
147PHOSPHORANIMATION_EXPORT extern const QString PopupSnapAssistHide;
148PHOSPHORANIMATION_EXPORT extern const QString PopupCheatsheet;
149PHOSPHORANIMATION_EXPORT extern const QString PopupCheatsheetShow;
150PHOSPHORANIMATION_EXPORT extern const QString PopupCheatsheetHide;
151
152// panel.* — persistent in-app side surfaces (settings nav rail, editor
153// property panel). Absorbs the former sidebar.* root — sidebars are panels.
154PHOSPHORANIMATION_EXPORT extern const QString Panel;
155PHOSPHORANIMATION_EXPORT extern const QString PanelSlideIn;
156PHOSPHORANIMATION_EXPORT extern const QString PanelSlideOut;
157PHOSPHORANIMATION_EXPORT extern const QString PanelFadeIn;
158PHOSPHORANIMATION_EXPORT extern const QString PanelFadeOut;
159
160// cursor.*
161PHOSPHORANIMATION_EXPORT extern const QString Cursor;
162PHOSPHORANIMATION_EXPORT extern const QString CursorHover;
163PHOSPHORANIMATION_EXPORT extern const QString CursorClick;
164
165// widget.* — per-archetype paths so library defaults preserve original motion.
166PHOSPHORANIMATION_EXPORT extern const QString Widget;
167PHOSPHORANIMATION_EXPORT extern const QString WidgetHover;
168PHOSPHORANIMATION_EXPORT extern const QString WidgetPress;
169PHOSPHORANIMATION_EXPORT extern const QString WidgetDim;
170PHOSPHORANIMATION_EXPORT extern const QString WidgetTint;
171PHOSPHORANIMATION_EXPORT extern const QString WidgetTintFast;
172PHOSPHORANIMATION_EXPORT extern const QString WidgetToggleOn;
173PHOSPHORANIMATION_EXPORT extern const QString WidgetToggleOff;
174PHOSPHORANIMATION_EXPORT extern const QString WidgetBadgeShow;
175PHOSPHORANIMATION_EXPORT extern const QString WidgetBadgeHide;
176PHOSPHORANIMATION_EXPORT extern const QString WidgetBadgePulse;
177PHOSPHORANIMATION_EXPORT extern const QString WidgetAccordionExpand;
178PHOSPHORANIMATION_EXPORT extern const QString WidgetAccordionCollapse;
179PHOSPHORANIMATION_EXPORT extern const QString WidgetFadeIn;
180PHOSPHORANIMATION_EXPORT extern const QString WidgetFadeOut;
181PHOSPHORANIMATION_EXPORT extern const QString WidgetReorder;
182PHOSPHORANIMATION_EXPORT extern const QString WidgetProgress;
183PHOSPHORANIMATION_EXPORT extern const QString WidgetPulse;
184PHOSPHORANIMATION_EXPORT extern const QString WidgetPulseFast;
185PHOSPHORANIMATION_EXPORT extern const QString WidgetPulseSlow;
186// Zone-rect widget (used by ZoneItem.qml,
187// ZonePreview.qml — i.e. the reusable QML zone-rectangle that gets
188// embedded in the runtime overlay, settings dialogs, layout
189// thumbnails, etc.). The animation lives with the widget; the
190// surface it's hosted on is incidental.
191PHOSPHORANIMATION_EXPORT extern const QString WidgetZoneHighlight;
192PHOSPHORANIMATION_EXPORT extern const QString WidgetZoneHighlightPop;
193PHOSPHORANIMATION_EXPORT extern const QString WidgetZoneHighlightBorder;
194// One-shot flash on the main zone-overlay surface when the active
195// layout changes mid-drag (ZoneOverlayContent.qml). A widget-level
196// content effect on the overlay, not a per-zone animation.
197PHOSPHORANIMATION_EXPORT extern const QString WidgetZoneOverlayFlash;
198
199// ── Event classes ───────────────────────────────────────────────────────
200// A coarse capability axis layered over the path taxonomy. Two of the six
201// classes are the general ones: an animation either reshapes a window's
202// GEOMETRY (it has a before-rect and an after-rect) or it changes a
203// surface's APPEARANCE (a single surface fading / scaling / glitching in or
204// out). A geometry-only shader such as window-morph cross-fades
205// `iFromRect → iToRect` and is a silent no-op on an appearance event, so a
206// shader declares which classes it supports (AnimationShaderEffect::appliesTo)
207// and the settings UI filters the rows it can't drive. The other four —
208// DESKTOP, MOVE, STRIP and TAB — each name a distinct uniform contract a
209// pack must opt into explicitly, and a universal (empty `appliesTo`) pack
210// never reaches them. These string tokens are the SSOT for that vocabulary —
211// matched verbatim against `appliesTo` entries and `eventClassForPath`.
212//
213// Adding a class token? It is not enough to declare it here. Every one of
214// these must be updated too, and the last three have each already shipped a
215// bug from being missed:
216// 1. `allEventClassTokens()` below — the exported vocabulary. `fromJson`
217// (animationshadereffect.cpp) validates `appliesTo` against it and the
218// pack validator's lint lists it in the diagnostic, so both follow for
219// free once it is here.
220// 2. `shaderEffectAppliesToEventPath` (AnimationShaderEffect.h) — an
221// opt-in class needs its own branch plus an exclusion in the
222// ambiguous-row fallback, or it silently behaves as universal.
223// 3. `shaderEffectIsCompositorOnly` (AnimationShaderEffect.h) hardcodes
224// "appearance is the only class that reaches a daemon surface" — a new
225// daemon-driven class must be added there, or its packs are silently
226// classified compositor-only and skipped by the daemon.
227// 4. `_typeCatalog` in ShaderBrowserPage.qml — the browser's type axis.
228// A missing entry ships an untranslated badge sorted last.
229// 5. `shaderPathResolvesInIsolation` (shaderprofiletree.cpp) — decide
230// whether the new class's leaves may inherit a shader from their
231// ancestors. A leaf whose ONLY ancestors carry other classes must join
232// the predicate, or it inherits packs the applicability gate then
233// refuses at install: the leaf animates nothing while settings shows an
234// inherited "current shader" that never runs (the tab class shipped
235// with exactly this hazard).
236// 6. `shaderConsumedLeafEventPaths` (animationshadersupportedpaths.h) —
237// the new class's consumed leaves must be registered, or the picker
238// hides the shader row and the prune drops stored overrides.
239// (The coverage chips in AnimationsMotionSetsPage.qml / DecorationSetsPage.qml
240// key on the path ROOT segment, not on class tokens — a new class needs a
241// case there only if it also introduces a new path root.)
242//
243// Adding a path ROOT? A different list, and longer than it looks. The `shell`
244// root needed every one of these:
245// 1. `allBuiltInPaths()` below — the taxonomy every UI and validity check
246// reads. It is NOT a persistence filter: the motion tree stores and
247// loads whatever path it is given (ProfileTree::setOverride/fromJson
248// reject only an empty one), so a path missing here is not dropped, it
249// just becomes unreachable from the UI and inert at resolve time. The
250// writer-side reject lives in AnimationsPageController::isValidEventPath.
251// 2. `eventClassForPath` — an unclassified root reads as the ambiguous-row
252// fallback in the pack pickers.
253// 3. `shaderConsumedLeafEventPaths` (animationshadersupportedpaths.h) — the
254// shader tree's admission list, per the note at the top of this file.
255// 4. An isolation decision: ordinary inheritance, a leaf in
256// `shaderPathResolvesInIsolation`, or a subtree in
257// `shaderPathIsolationRoot`. Deciding nothing means ordinary, which for a
258// foreign surface is usually wrong.
259// 5. `segmentLabel` (animationspagecontroller_paths.cpp) — every segment of the
260// built-in taxonomy is translated there; a miss ships untranslated English
261// through the mechanical humanizeSegment fallback.
262// 6. The coverage-chip `case` in BOTH AnimationsMotionSetsPage.qml and
263// DecorationSetsPage.qml, per the parenthetical above.
264// 7. A settings page plus its registration, topology, page scope and search
265// catalogue entries.
266// 8. `animationPageScope` — without an entry the page falls through to the
267// whole-tree branch and its Reset wipes every animation override there is.
268
271PHOSPHORANIMATION_EXPORT extern const QString EventClassGeometry;
272
275PHOSPHORANIMATION_EXPORT extern const QString EventClassAppearance;
276
285PHOSPHORANIMATION_EXPORT extern const QString EventClassDesktop;
286
296PHOSPHORANIMATION_EXPORT extern const QString EventClassMove;
297
313PHOSPHORANIMATION_EXPORT extern const QString EventClassStrip;
314
349PHOSPHORANIMATION_EXPORT extern const QString EventClassTab;
350
356PHOSPHORANIMATION_EXPORT QStringList allEventClassTokens();
357
371PHOSPHORANIMATION_EXPORT QString eventClassForPath(const QString& path);
372
413PHOSPHORANIMATION_EXPORT bool eventPathResolvesPerWindow(const QString& path);
414
416PHOSPHORANIMATION_EXPORT QStringList allBuiltInPaths();
417
420PHOSPHORANIMATION_EXPORT QString parentPath(const QString& path);
421
443PHOSPHORANIMATION_EXPORT QString defaultShaderEffectIdForPath(const QString& path);
444
445} // namespace ProfilePaths
446
447} // namespace PhosphorAnimation
PHOSPHORANIMATION_EXPORT const QString WidgetReorder
150 ms OutCubic (family seed)
PHOSPHORANIMATION_EXPORT const QString WidgetTintFast
120 ms (variant)
PHOSPHORANIMATION_EXPORT const QString WindowMovement
PHOSPHORANIMATION_EXPORT const QString PopupCheatsheetHide
PHOSPHORANIMATION_EXPORT const QString WidgetZoneHighlightPop
PHOSPHORANIMATION_EXPORT const QString Editor
PHOSPHORANIMATION_EXPORT const QString PanelSlideOut
PHOSPHORANIMATION_EXPORT const QString Panel
PHOSPHORANIMATION_EXPORT const QString WidgetBadgeShow
200 ms OutBack
PHOSPHORANIMATION_EXPORT const QString WidgetPress
100 ms OutCubic
PHOSPHORANIMATION_EXPORT const QString PanelFadeIn
PHOSPHORANIMATION_EXPORT const QString Scrolling
PHOSPHORANIMATION_EXPORT const QString EditorSnapOut
PHOSPHORANIMATION_EXPORT const QString EventClassGeometry
Geometry transitions: snapIn/snapOut, layoutSwitch, maximize — every leg that carries an old and new ...
PHOSPHORANIMATION_EXPORT const QString OsdPop
PHOSPHORANIMATION_EXPORT const QString DesktopSwitch
PHOSPHORANIMATION_EXPORT QStringList allBuiltInPaths()
Full list of built-in paths in taxonomy order.
PHOSPHORANIMATION_EXPORT const QString OsdHide
PHOSPHORANIMATION_EXPORT const QString WidgetBadgePulse
400 ms count-change pulse
PHOSPHORANIMATION_EXPORT const QString Popup
PHOSPHORANIMATION_EXPORT const QString Osd
PHOSPHORANIMATION_EXPORT const QString PopupSnapAssist
PHOSPHORANIMATION_EXPORT const QString ShellAppletPopupShow
PHOSPHORANIMATION_EXPORT const QString WindowSnapIn
PHOSPHORANIMATION_EXPORT const QString Widget
PHOSPHORANIMATION_EXPORT const QString EditorSnapResize
PHOSPHORANIMATION_EXPORT const QString WidgetToggleOn
250 ms OutBack (spring feel)
PHOSPHORANIMATION_EXPORT const QString EventClassDesktop
Desktop transitions: full-screen blends of two scene captures — the virtual-desktop switch (outgoing ...
PHOSPHORANIMATION_EXPORT const QString PanelSlideIn
PHOSPHORANIMATION_EXPORT const QString EventClassAppearance
Appearance transitions: open, close, minimize, focus, and every OSD / popup show/hide — a single surf...
PHOSPHORANIMATION_EXPORT const QString ShellAppletPopup
PHOSPHORANIMATION_EXPORT const QString PopupZoneSelectorHide
PHOSPHORANIMATION_EXPORT const QString WidgetToggleOff
250 ms OutBack
PHOSPHORANIMATION_EXPORT const QString PanelFadeOut
PHOSPHORANIMATION_EXPORT const QString Shell
PHOSPHORANIMATION_EXPORT const QString PopupSnapAssistShow
PHOSPHORANIMATION_EXPORT bool eventPathResolvesPerWindow(const QString &path)
True when path is resolved AGAINST A PARTICULAR WINDOW, so per-window state can reach it.
PHOSPHORANIMATION_EXPORT const QString PopupSnapAssistHide
PHOSPHORANIMATION_EXPORT const QString WidgetFadeIn
200 ms OutCubic
PHOSPHORANIMATION_EXPORT const QString WindowMaximize
PHOSPHORANIMATION_EXPORT const QString WidgetZoneHighlightBorder
PHOSPHORANIMATION_EXPORT const QString WidgetAccordionExpand
250 ms OutCubic
PHOSPHORANIMATION_EXPORT const QString WindowAppearance
PHOSPHORANIMATION_EXPORT QString parentPath(const QString &path)
Walk path up one level ("window.appearance.open" -> "window.appearance" -> "window" -> "global" -> ""...
PHOSPHORANIMATION_EXPORT const QString Cursor
PHOSPHORANIMATION_EXPORT const QString CursorClick
PHOSPHORANIMATION_EXPORT QString defaultShaderEffectIdForPath(const QString &path)
Built-in default shader effect id for an event path, or empty for none.
PHOSPHORANIMATION_EXPORT const QString WidgetPulseSlow
1500 ms
PHOSPHORANIMATION_EXPORT QString eventClassForPath(const QString &path)
Classify path into an event class, or empty string when the path has no single class (a mixed ancesto...
PHOSPHORANIMATION_EXPORT const QString ShellAppletPopupHide
PHOSPHORANIMATION_EXPORT const QString WidgetFadeOut
400 ms InCubic
PHOSPHORANIMATION_EXPORT const QString WindowLayoutSwitch
PHOSPHORANIMATION_EXPORT const QString WidgetZoneHighlight
PHOSPHORANIMATION_EXPORT const QString WidgetHover
150 ms OutCubic (family seed)
PHOSPHORANIMATION_EXPORT QStringList allEventClassTokens()
Every event-class token, in the order the classes are declared above.
PHOSPHORANIMATION_EXPORT const QString Global
PHOSPHORANIMATION_EXPORT const QString EventClassTab
Tab transitions: the swap inside a tabbed scrolling column (scrolling.tabSwitch).
PHOSPHORANIMATION_EXPORT const QString WidgetPulseFast
500 ms
PHOSPHORANIMATION_EXPORT const QString PopupLayoutPickerHide
PHOSPHORANIMATION_EXPORT const QString WidgetPulse
1000 ms sinusoidal (family root)
PHOSPHORANIMATION_EXPORT const QString WidgetAccordionCollapse
180 ms InCubic
PHOSPHORANIMATION_EXPORT const QString OsdShow
PHOSPHORANIMATION_EXPORT const QString WindowFocus
PHOSPHORANIMATION_EXPORT const QString CursorHover
PHOSPHORANIMATION_EXPORT const QString PopupZoneSelectorShow
PHOSPHORANIMATION_EXPORT const QString WidgetBadgeHide
150 ms InCubic
PHOSPHORANIMATION_EXPORT const QString WidgetTint
300 ms widget-out (family root)
PHOSPHORANIMATION_EXPORT const QString DesktopPeek
PHOSPHORANIMATION_EXPORT const QString WindowOpen
PHOSPHORANIMATION_EXPORT const QString WindowSnapOut
PHOSPHORANIMATION_EXPORT const QString PopupLayoutPickerShow
PHOSPHORANIMATION_EXPORT const QString PopupCheatsheetShow
PHOSPHORANIMATION_EXPORT const QString EditorSnapIn
PHOSPHORANIMATION_EXPORT const QString WindowMove
PHOSPHORANIMATION_EXPORT const QString PopupCheatsheet
PHOSPHORANIMATION_EXPORT const QString WidgetProgress
150 ms OutCubic (family seed)
PHOSPHORANIMATION_EXPORT const QString Desktop
PHOSPHORANIMATION_EXPORT const QString WindowMinimize
PHOSPHORANIMATION_EXPORT const QString WidgetZoneOverlayFlash
PHOSPHORANIMATION_EXPORT const QString Window
PHOSPHORANIMATION_EXPORT const QString PopupZoneSelector
PHOSPHORANIMATION_EXPORT const QString WindowClose
PHOSPHORANIMATION_EXPORT const QString ScrollingView
PHOSPHORANIMATION_EXPORT const QString EventClassStrip
Strip transitions: the scrolling strip's view leg (scrolling.view).
PHOSPHORANIMATION_EXPORT const QString WidgetDim
200 ms OutCubic
PHOSPHORANIMATION_EXPORT const QString ScrollingTabSwitch
PHOSPHORANIMATION_EXPORT const QString PopupLayoutPicker
PHOSPHORANIMATION_EXPORT const QString EventClassMove
Interactive-drag transitions: the window.movement.move leaf only.
Definition AnimatedValue.h:32