Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
ISurfaceAnimator.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 <PhosphorLayer/phosphorlayer_export.h>
7
8#include <QtGlobal>
9
10#include <functional>
11
12QT_BEGIN_NAMESPACE
13class QQuickItem;
14class QQuickWindow;
15QT_END_NAMESPACE
16
17namespace PhosphorLayer {
18
19class Surface;
20
50class PHOSPHORLAYER_EXPORT ISurfaceAnimator
51{
52public:
56 using CompletionCallback = std::function<void()>;
57
58 ISurfaceAnimator() = default;
59 virtual ~ISurfaceAnimator() = default;
60 Q_DISABLE_COPY_MOVE(ISurfaceAnimator)
61
62
75 virtual void beginShow(Surface* surface, QQuickItem* rootItem, CompletionCallback onComplete) = 0;
76
89 virtual void beginHide(Surface* surface, QQuickItem* rootItem, CompletionCallback onComplete) = 0;
90
96 virtual void cancel(Surface* surface) = 0;
97};
98
99} // namespace PhosphorLayer
virtual void beginShow(Surface *surface, QQuickItem *rootItem, CompletionCallback onComplete)=0
Begin a show transition for surface.
virtual ~ISurfaceAnimator()=default
virtual void beginHide(Surface *surface, QQuickItem *rootItem, CompletionCallback onComplete)=0
Begin a hide transition for surface.
virtual void cancel(Surface *surface)=0
Interrupt every in-flight animation for surface, on any item, not only the root.
std::function< void()> CompletionCallback
Invoked when a show/hide animation completes.
Definition ISurfaceAnimator.h:56
One layer-shell surface with a managed lifecycle.
Definition Surface.h:105
Definition SurfaceAnimator.h:26