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
49class PHOSPHORLAYER_EXPORT ISurfaceAnimator
50{
51public:
55 using CompletionCallback = std::function<void()>;
56
57 ISurfaceAnimator() = default;
58 virtual ~ISurfaceAnimator() = default;
59 Q_DISABLE_COPY_MOVE(ISurfaceAnimator)
60
61
70 virtual void beginShow(Surface* surface, QQuickItem* rootItem, CompletionCallback onComplete) = 0;
71
81 virtual void beginHide(Surface* surface, QQuickItem* rootItem, CompletionCallback onComplete) = 0;
82
86 virtual void cancel(Surface* surface) = 0;
87};
88
89} // namespace PhosphorLayer
Hook point for show/hide transitions on Surfaces.
Definition ISurfaceAnimator.h:50
virtual ~ISurfaceAnimator()=default
std::function< void()> CompletionCallback
Invoked when a show/hide animation completes.
Definition ISurfaceAnimator.h:55
One layer-shell surface with a managed lifecycle.
Definition Surface.h:99
Definition SurfaceAnimator.h:26
constexpr const char * Surface
Definition LayerSurface.h:21