aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/SharedDefs.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-06-19 16:20:06 +0200
committerVaxry <[email protected]>2024-06-19 16:20:15 +0200
commitfb15b7aa2a9bba0f0693f84d0c65d386942583f8 (patch)
treed4403944b5d6a3e03d2262f03a7d0b3ed6ffae24 /src/SharedDefs.hpp
parent6e5804b53de753f24953d9d647940df66bc68f6d (diff)
downloadHyprland-fb15b7aa2a9bba0f0693f84d0c65d386942583f8.tar.gz
Hyprland-fb15b7aa2a9bba0f0693f84d0c65d386942583f8.zip
core: Move to hyprutils for Math
Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
Diffstat (limited to 'src/SharedDefs.hpp')
-rw-r--r--src/SharedDefs.hpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/SharedDefs.hpp b/src/SharedDefs.hpp
index 1b4876bb..2a1546c6 100644
--- a/src/SharedDefs.hpp
+++ b/src/SharedDefs.hpp
@@ -1,7 +1,11 @@
#pragma once
-#include "helpers/Vector2D.hpp"
+#include "helpers/math/Math.hpp"
#include <functional>
+#include <any>
+#include <hyprutils/math/Box.hpp>
+
+using namespace Hyprutils::Math;
enum eIcons {
ICON_WARNING = 0,
@@ -37,29 +41,6 @@ struct SCallbackInfo {
bool cancelled = false; /* on cancellable events, will cancel the event. */
};
-struct SWindowDecorationExtents {
- Vector2D topLeft;
- Vector2D bottomRight;
-
- //
- SWindowDecorationExtents operator*(const double& scale) const {
- return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
- }
-
- SWindowDecorationExtents round() {
- return {topLeft.round(), bottomRight.round()};
- }
-
- bool operator==(const SWindowDecorationExtents& other) const {
- return topLeft == other.topLeft && bottomRight == other.bottomRight;
- }
-
- void addExtents(const SWindowDecorationExtents& other) {
- topLeft = topLeft.getComponentMax(other.topLeft);
- bottomRight = bottomRight.getComponentMax(other.bottomRight);
- }
-};
-
enum eHyprCtlOutputFormat {
FORMAT_NORMAL = 0,
FORMAT_JSON