summaryrefslogtreecommitdiff
path: root/src/managers/animation/DesktopAnimationManager.hpp
blob: fa86425ebc33d6c881e6d88fec2a49e086287f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "../../helpers/memory/Memory.hpp"
#include "../../desktop/DesktopTypes.hpp"
#include <string>

class CDesktopAnimationManager {
  public:
    enum eAnimationType : uint8_t {
        ANIMATION_TYPE_IN = 0,
        ANIMATION_TYPE_OUT,
    };

    void startAnimation(PHLWINDOW w, eAnimationType type, bool force = false);
    void startAnimation(PHLLS ls, eAnimationType type, bool instant = false);
    void startAnimation(PHLWORKSPACE ws, eAnimationType type, bool left = true, bool instant = false);

    void setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnimationType type);
    void setFullscreenFloatingFade(PHLWINDOW pWindow, float fade);
    void overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude = nullptr);

  private:
    void animationPopin(PHLWINDOW w, bool close = false, float minPerc = 0.f);
    void animationSlide(PHLWINDOW w, std::string force = "", bool close = false);
    void animationGnomed(PHLWINDOW w, bool close = false);
};

inline UP<CDesktopAnimationManager> g_pDesktopAnimationManager = makeUnique<CDesktopAnimationManager>();