File indexing completed on 2025-02-16 05:03:07
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2011 Thomas Lübking <thomas.luebking@web.de> 0006 SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include "effect/animationeffect.h" 0014 #include "effect/effectwindow.h" 0015 #include "effect/timeline.h" 0016 0017 #include <QEasingCurve> 0018 0019 namespace KWin 0020 { 0021 0022 /** 0023 * Wraps effects->setActiveFullScreenEffect for the duration of it's lifespan 0024 */ 0025 class FullScreenEffectLock 0026 { 0027 public: 0028 FullScreenEffectLock(Effect *effect); 0029 ~FullScreenEffectLock(); 0030 0031 private: 0032 Q_DISABLE_COPY(FullScreenEffectLock) 0033 }; 0034 0035 class KWIN_EXPORT AniData 0036 { 0037 public: 0038 AniData(); 0039 AniData(AnimationEffect::Attribute a, int meta, const FPx2 &to, 0040 int delay, const FPx2 &from, bool waitAtSource, 0041 const std::shared_ptr<FullScreenEffectLock> &lock = nullptr, 0042 bool keepAlive = true, GLShader *shader = nullptr); 0043 0044 bool isActive() const; 0045 0046 inline bool isOneDimensional() const 0047 { 0048 return from[0] == from[1] && to[0] == to[1]; 0049 } 0050 0051 quint64 id{0}; 0052 QString debugInfo() const; 0053 AnimationEffect::Attribute attribute; 0054 int customCurve; 0055 FPx2 from, to; 0056 TimeLine timeLine; 0057 uint meta; 0058 qint64 frozenTime; 0059 qint64 startTime; 0060 std::shared_ptr<FullScreenEffectLock> fullScreenEffectLock; 0061 bool waitAtSource; 0062 bool keepAlive; 0063 EffectWindowDeletedRef deletedRef; 0064 EffectWindowVisibleRef visibleRef; 0065 AnimationEffect::TerminationFlags terminationFlags; 0066 GLShader *shader{nullptr}; 0067 }; 0068 0069 } // namespace 0070 0071 QDebug operator<<(QDebug dbg, const KWin::AniData &a);