diff options
| author | Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> | 2025-01-07 17:55:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 17:55:14 +0000 |
| commit | 5642ed331df56375c55cd8d56a14054af8bdf8f2 (patch) | |
| tree | 74a85b022b3319cdfad01343358eaf09a94841d1 /src/desktop/Window.hpp | |
| parent | c7086f936a06abebcc863c35f634760ca1ee90c0 (diff) | |
core: move parts of the animation system to hyprutils (#8868)
* core: change animation manager to use Hyprutils::Animation
* config: move animation config to hyprutils animation tree
* use g_pAnimationManager->createAnimation and the new PHLANIMVAR template
* core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks
* core: adapt animated variable usage (dereference the shared pointer)
* misc: bump CMakeLists to hyprutils 0.3.3
Diffstat (limited to 'src/desktop/Window.hpp')
| -rw-r--r-- | src/desktop/Window.hpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index 3ceaf594..37189a00 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -233,8 +233,8 @@ class CWindow { Vector2D m_vSize = Vector2D(0, 0); // this is the real position and size used to draw the thing - CAnimatedVariable<Vector2D> m_vRealPosition; - CAnimatedVariable<Vector2D> m_vRealSize; + PHLANIMVAR<Vector2D> m_vRealPosition; + PHLANIMVAR<Vector2D> m_vRealSize; // for not spamming the protocols Vector2D m_vReportedPosition; @@ -298,19 +298,19 @@ class CWindow { std::unique_ptr<CPopup> m_pPopupHead; // Animated border - CGradientValueData m_cRealBorderColor = {0}; - CGradientValueData m_cRealBorderColorPrevious = {0}; - CAnimatedVariable<float> m_fBorderFadeAnimationProgress; - CAnimatedVariable<float> m_fBorderAngleAnimationProgress; + CGradientValueData m_cRealBorderColor = {0}; + CGradientValueData m_cRealBorderColorPrevious = {0}; + PHLANIMVAR<float> m_fBorderFadeAnimationProgress; + PHLANIMVAR<float> m_fBorderAngleAnimationProgress; // Fade in-out - CAnimatedVariable<float> m_fAlpha; - bool m_bFadingOut = false; - bool m_bReadyToDelete = false; - Vector2D m_vOriginalClosedPos; // these will be used for calculations later on in - Vector2D m_vOriginalClosedSize; // drawing the closing animations - SBoxExtents m_eOriginalClosedExtents; - bool m_bAnimatingIn = false; + PHLANIMVAR<float> m_fAlpha; + bool m_bFadingOut = false; + bool m_bReadyToDelete = false; + Vector2D m_vOriginalClosedPos; // these will be used for calculations later on in + Vector2D m_vOriginalClosedSize; // drawing the closing animations + SBoxExtents m_eOriginalClosedExtents; + bool m_bAnimatingIn = false; // For pinned (sticky) windows bool m_bPinned = false; @@ -336,18 +336,18 @@ class CWindow { std::vector<std::unique_ptr<IWindowTransformer>> m_vTransformers; // for alpha - CAnimatedVariable<float> m_fActiveInactiveAlpha; - CAnimatedVariable<float> m_fMovingFromWorkspaceAlpha; + PHLANIMVAR<float> m_fActiveInactiveAlpha; + PHLANIMVAR<float> m_fMovingFromWorkspaceAlpha; // animated shadow color - CAnimatedVariable<CHyprColor> m_cRealShadowColor; + PHLANIMVAR<CHyprColor> m_cRealShadowColor; // animated tint - CAnimatedVariable<float> m_fDimPercent; + PHLANIMVAR<float> m_fDimPercent; // animate moving to an invisible workspace - int m_iMonitorMovedFrom = -1; // -1 means not moving - CAnimatedVariable<float> m_fMovingToWorkspaceAlpha; + int m_iMonitorMovedFrom = -1; // -1 means not moving + PHLANIMVAR<float> m_fMovingToWorkspaceAlpha; // swallowing PHLWINDOWREF m_pSwallowed; @@ -432,7 +432,7 @@ class CWindow { float getScrollTouchpad(); void updateWindowData(); void updateWindowData(const struct SWorkspaceRule&); - void onBorderAngleAnimEnd(void* ptr); + void onBorderAngleAnimEnd(WP<Hyprutils::Animation::CBaseAnimatedVariable> pav); bool isInCurvedCorner(double x, double y); bool hasPopupAt(const Vector2D& pos); int popupsCount(); @@ -467,7 +467,7 @@ class CWindow { Vector2D requestedMaxSize(); CBox getWindowMainSurfaceBox() const { - return {m_vRealPosition.value().x, m_vRealPosition.value().y, m_vRealSize.value().x, m_vRealSize.value().y}; + return {m_vRealPosition->value().x, m_vRealPosition->value().y, m_vRealSize->value().x, m_vRealSize->value().y}; } // listeners |
