diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-08-07 13:35:19 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-08-07 13:36:14 +0200 |
| commit | 261c3307f70d14e5bbc7d4113b4ee6dac9e4b627 (patch) | |
| tree | 4e1f5aa70bd571c4f5bc90724f2de2c7b566ddbe /src/helpers | |
| parent | 6e53c47e68c1d15032b755270568eb5485f2c684 (diff) | |
internal: cleanup headers in helpers/
Diffstat (limited to 'src/helpers')
| -rw-r--r-- | src/helpers/AnimatedVariable.hpp | 18 | ||||
| -rw-r--r-- | src/helpers/BezierCurve.cpp | 3 | ||||
| -rw-r--r-- | src/helpers/BezierCurve.hpp | 4 | ||||
| -rw-r--r-- | src/helpers/Color.cpp | 6 | ||||
| -rw-r--r-- | src/helpers/MiscFunctions.hpp | 5 | ||||
| -rw-r--r-- | src/helpers/Splashes.hpp | 4 | ||||
| -rw-r--r-- | src/helpers/SubsurfaceTree.hpp | 6 | ||||
| -rw-r--r-- | src/helpers/Timer.hpp | 2 | ||||
| -rw-r--r-- | src/helpers/Vector2D.hpp | 2 | ||||
| -rw-r--r-- | src/helpers/WLListener.hpp | 9 | ||||
| -rw-r--r-- | src/helpers/WLSurface.hpp | 15 | ||||
| -rw-r--r-- | src/helpers/Workspace.hpp | 7 |
12 files changed, 50 insertions, 31 deletions
diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index d234dce2..e8bb2774 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -1,18 +1,20 @@ #pragma once -#include "../defines.hpp" +#include <functional> #include <any> +#include <chrono> +#include "Vector2D.hpp" +#include "Color.hpp" +#include "../macros.hpp" -enum ANIMATEDVARTYPE -{ +enum ANIMATEDVARTYPE { AVARTYPE_INVALID = -1, AVARTYPE_FLOAT, AVARTYPE_VECTOR, AVARTYPE_COLOR }; -enum AVARDAMAGEPOLICY -{ +enum AVARDAMAGEPOLICY { AVARDAMAGE_NONE = -1, AVARDAMAGE_ENTIRE = 0, AVARDAMAGE_BORDER, @@ -32,10 +34,10 @@ class CAnimatedVariable { void create(ANIMATEDVARTYPE, SAnimationPropertyConfig*, void* pWindow, AVARDAMAGEPOLICY); void create(ANIMATEDVARTYPE, std::any val, SAnimationPropertyConfig*, void* pWindow, AVARDAMAGEPOLICY); - CAnimatedVariable(const CAnimatedVariable&) = delete; - CAnimatedVariable(CAnimatedVariable&&) = delete; + CAnimatedVariable(const CAnimatedVariable&) = delete; + CAnimatedVariable(CAnimatedVariable&&) = delete; CAnimatedVariable& operator=(const CAnimatedVariable&) = delete; - CAnimatedVariable& operator=(CAnimatedVariable&&) = delete; + CAnimatedVariable& operator=(CAnimatedVariable&&) = delete; ~CAnimatedVariable(); diff --git a/src/helpers/BezierCurve.cpp b/src/helpers/BezierCurve.cpp index e018811c..08190117 100644 --- a/src/helpers/BezierCurve.cpp +++ b/src/helpers/BezierCurve.cpp @@ -1,5 +1,8 @@ #include "BezierCurve.hpp" +#include "../debug/Log.hpp" +#include "../macros.hpp" +#include <chrono> #include <algorithm> void CBezierCurve::setup(std::vector<Vector2D>* pVec) { diff --git a/src/helpers/BezierCurve.hpp b/src/helpers/BezierCurve.hpp index 540d33a7..461e6142 100644 --- a/src/helpers/BezierCurve.hpp +++ b/src/helpers/BezierCurve.hpp @@ -1,7 +1,9 @@ #pragma once -#include "../defines.hpp" #include <deque> +#include <array> +#include <vector> +#include "Vector2D.hpp" constexpr int BAKEDPOINTS = 255; constexpr float INVBAKEDPOINTS = 1.f / BAKEDPOINTS; diff --git a/src/helpers/Color.cpp b/src/helpers/Color.cpp index ecd5a33c..77e0d530 100644 --- a/src/helpers/Color.cpp +++ b/src/helpers/Color.cpp @@ -1,5 +1,9 @@ #include "Color.hpp" -#include "../defines.hpp" + +#define ALPHA(c) ((double)(((c) >> 24) & 0xff) / 255.0) +#define RED(c) ((double)(((c) >> 16) & 0xff) / 255.0) +#define GREEN(c) ((double)(((c) >> 8) & 0xff) / 255.0) +#define BLUE(c) ((double)(((c)) & 0xff) / 255.0) CColor::CColor() {} diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index a5f21313..90ac6d78 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -1,6 +1,9 @@ #pragma once -#include "../includes.hpp" +#include <string> +#include <wayland-server.h> +#include <wlr/util/box.h> +#include "Vector2D.hpp" std::string absolutePath(const std::string&, const std::string&); void addWLSignal(wl_signal*, wl_listener*, void* pOwner, const std::string& ownerString); diff --git a/src/helpers/Splashes.hpp b/src/helpers/Splashes.hpp index 32bef813..f5990506 100644 --- a/src/helpers/Splashes.hpp +++ b/src/helpers/Splashes.hpp @@ -1,9 +1,10 @@ #pragma once -#include <array> +#include <vector> #include <string> inline const std::vector<std::string> SPLASHES = { + // clang-format off "Woo, animations!", "It's like Hypr, but better.", "Release 1.0 when?", @@ -60,4 +61,5 @@ inline const std::vector<std::string> SPLASHES = { "Thanks ThatOneCalculator!", "The AUR packages always work, except for the times they don't.", "Funny animation compositor woo" + // clang-format on };
\ No newline at end of file diff --git a/src/helpers/SubsurfaceTree.hpp b/src/helpers/SubsurfaceTree.hpp index 7a0968fd..d6f04a58 100644 --- a/src/helpers/SubsurfaceTree.hpp +++ b/src/helpers/SubsurfaceTree.hpp @@ -26,7 +26,8 @@ struct SSurfaceTreeNode { void* globalOffsetData; CWindow* pWindowOwner = nullptr; - bool operator==(const SSurfaceTreeNode& rhs) const { + // + bool operator==(const SSurfaceTreeNode& rhs) const { return pSurface == rhs.pSurface; } }; @@ -43,7 +44,8 @@ struct SSubsurface { CWindow* pWindowOwner = nullptr; - bool operator==(const SSubsurface& rhs) const { + // + bool operator==(const SSubsurface& rhs) const { return pSubsurface == rhs.pSubsurface; } }; diff --git a/src/helpers/Timer.hpp b/src/helpers/Timer.hpp index 4ab0d294..e55f4ebf 100644 --- a/src/helpers/Timer.hpp +++ b/src/helpers/Timer.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../defines.hpp" +#include <chrono> class CTimer { public: diff --git a/src/helpers/Vector2D.hpp b/src/helpers/Vector2D.hpp index 3ba06de7..d23b3fbe 100644 --- a/src/helpers/Vector2D.hpp +++ b/src/helpers/Vector2D.hpp @@ -1,6 +1,6 @@ #pragma once -#include <math.h> +#include <cmath> class Vector2D { public: diff --git a/src/helpers/WLListener.hpp b/src/helpers/WLListener.hpp index 8327e945..d5d925b0 100644 --- a/src/helpers/WLListener.hpp +++ b/src/helpers/WLListener.hpp @@ -1,7 +1,8 @@ #pragma once -#include "../includes.hpp" +#include <string> #include <functional> +#include <wayland-server.h> class CHyprWLListener { public: @@ -9,10 +10,10 @@ class CHyprWLListener { CHyprWLListener(); ~CHyprWLListener(); - CHyprWLListener(const CHyprWLListener&) = delete; - CHyprWLListener(CHyprWLListener&&) = delete; + CHyprWLListener(const CHyprWLListener&) = delete; + CHyprWLListener(CHyprWLListener&&) = delete; CHyprWLListener& operator=(const CHyprWLListener&) = delete; - CHyprWLListener& operator=(CHyprWLListener&&) = delete; + CHyprWLListener& operator=(CHyprWLListener&&) = delete; void initCallback(wl_signal*, std::function<void(void*, void*)>, void* owner, std::string author = ""); diff --git a/src/helpers/WLSurface.hpp b/src/helpers/WLSurface.hpp index e3325f99..c5cdd37f 100644 --- a/src/helpers/WLSurface.hpp +++ b/src/helpers/WLSurface.hpp @@ -1,7 +1,6 @@ #pragma once #include "../defines.hpp" - class CWLSurface { public: CWLSurface() = default; @@ -11,20 +10,20 @@ class CWLSurface { void assign(wlr_surface* pSurface); void unassign(); - CWLSurface(const CWLSurface&) = delete; - CWLSurface(CWLSurface&&) = delete; + CWLSurface(const CWLSurface&) = delete; + CWLSurface(CWLSurface&&) = delete; CWLSurface& operator=(const CWLSurface&) = delete; - CWLSurface& operator=(CWLSurface&&) = delete; + CWLSurface& operator=(CWLSurface&&) = delete; wlr_surface* wlr() const; bool exists() const; CWLSurface& operator=(wlr_surface* pSurface) { - destroy(); - m_pWLRSurface = pSurface; - init(); + destroy(); + m_pWLRSurface = pSurface; + init(); - return *this; + return *this; } bool operator==(const CWLSurface& other) const { diff --git a/src/helpers/Workspace.hpp b/src/helpers/Workspace.hpp index b9de76d5..a7ee0e7a 100644 --- a/src/helpers/Workspace.hpp +++ b/src/helpers/Workspace.hpp @@ -1,10 +1,11 @@ #pragma once -#include "../defines.hpp" #include "AnimatedVariable.hpp" +#include <string> +#include "../defines.hpp" +#include "../wlrunstable/wlr_ext_workspace_v1.hpp" -enum eFullscreenMode : uint8_t -{ +enum eFullscreenMode : uint8_t { FULLSCREEN_FULL = 0, FULLSCREEN_MAXIMIZED }; |
