Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
NoOpSurfaceAnimator.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
7#include <PhosphorLayer/phosphorlayer_export.h>
8
9namespace PhosphorLayer {
10
24class PHOSPHORLAYER_EXPORT NoOpSurfaceAnimator : public ISurfaceAnimator
25{
26public:
28 ~NoOpSurfaceAnimator() override = default;
29
30 void beginShow(Surface*, QQuickItem*, CompletionCallback onComplete) override
31 {
32 if (onComplete) {
33 onComplete();
34 }
35 }
36 void beginHide(Surface*, QQuickItem*, CompletionCallback onComplete) override
37 {
38 if (onComplete) {
39 onComplete();
40 }
41 }
42 void cancel(Surface*) override
43 {
44 }
45};
46
47} // namespace PhosphorLayer
Hook point for show/hide transitions on Surfaces.
Definition ISurfaceAnimator.h:50
std::function< void()> CompletionCallback
Invoked when a show/hide animation completes.
Definition ISurfaceAnimator.h:55
Pass-through ISurfaceAnimator — calls onComplete() synchronously.
Definition NoOpSurfaceAnimator.h:25
void beginHide(Surface *, QQuickItem *, CompletionCallback onComplete) override
Begin a hide transition for surface.
Definition NoOpSurfaceAnimator.h:36
void cancel(Surface *) override
Interrupt any in-flight animation for surface.
Definition NoOpSurfaceAnimator.h:42
~NoOpSurfaceAnimator() override=default
void beginShow(Surface *, QQuickItem *, CompletionCallback onComplete) override
Begin a show transition for surface.
Definition NoOpSurfaceAnimator.h:30
One layer-shell surface with a managed lifecycle.
Definition Surface.h:99
Definition SurfaceAnimator.h:26