summaryrefslogtreecommitdiff
path: root/src/Window.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-23 14:16:02 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-23 14:16:02 +0200
commit0147975faf939db389bebaa95e3a12e5e5a8753f (patch)
treec6933763435812460ebdc9609ed90eae21110753 /src/Window.hpp
parentfa38dfd416b664033a96bb4af764fd54f7257d7b (diff)
New animation system
Diffstat (limited to 'src/Window.hpp')
-rw-r--r--src/Window.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Window.hpp b/src/Window.hpp
index 6969213a..ccd4efcf 100644
--- a/src/Window.hpp
+++ b/src/Window.hpp
@@ -3,6 +3,7 @@
#include "defines.hpp"
#include "events/Events.hpp"
#include "helpers/SubsurfaceTree.hpp"
+#include "helpers/AnimatedVariable.hpp"
struct SWindowSpecialRenderData {
float alpha = 1.f;
@@ -10,7 +11,7 @@ struct SWindowSpecialRenderData {
class CWindow {
public:
-
+ CWindow();
~CWindow();
DYNLISTENER(commitWindow);
@@ -36,8 +37,8 @@ public:
Vector2D m_vEffectiveSize = Vector2D(0,0);
// this is the real position and size used to draw the thing
- Vector2D m_vRealPosition = Vector2D(0,0);
- Vector2D m_vRealSize = Vector2D(0,0);
+ CAnimatedVariable m_vRealPosition;
+ CAnimatedVariable m_vRealSize;
// this is used for pseudotiling
bool m_bIsPseudotiled = false;
@@ -69,10 +70,10 @@ public:
SSurfaceTreeNode* m_pSurfaceTree = nullptr;
// Animated border
- CColor m_cRealBorderColor = CColor(0,0,0,0);
+ CAnimatedVariable m_cRealBorderColor;
// Fade in-out
- float m_fAlpha = 0.f;
+ CAnimatedVariable m_fAlpha;
bool m_bFadingOut = false;
bool m_bReadyToDelete = false;
@@ -84,7 +85,7 @@ public:
// For the list lookup
bool operator==(const CWindow& rhs) {
- return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && m_fAlpha == rhs.m_fAlpha && m_bFadingOut == rhs.m_bFadingOut;
+ return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && m_bFadingOut == rhs.m_bFadingOut;
}
}; \ No newline at end of file