summaryrefslogtreecommitdiff
path: root/src/defines.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-27 17:25:20 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-27 17:25:20 +0200
commitad36a9dc9ed032e6e34c06f78995bca0045f85b0 (patch)
tree933cfc71255a9cfbe1211f187d7d101a4e30ffc8 /src/defines.hpp
parent4c3b9ae207967bf06b973cc6b49db58887f1af6b (diff)
rework popups completely
Diffstat (limited to 'src/defines.hpp')
-rw-r--r--src/defines.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/defines.hpp b/src/defines.hpp
index 0be79cb6..ff7588e0 100644
--- a/src/defines.hpp
+++ b/src/defines.hpp
@@ -1,4 +1,5 @@
#include "includes.hpp"
+#include "debug/Log.hpp"
#ifndef NDEBUG
#define ISDEBUG true
@@ -10,6 +11,7 @@
#define LISTENER(name) void listener_##name(wl_listener*, void*); inline wl_listener listen_##name = { .notify = listener_##name };
#define DYNLISTENER(name) wl_listener listen_##name = { .notify = Events::listener_##name };
+#define DYNMULTILISTENER(name) wl_listener listen_##name;
#define VECINRECT(vec, x1, y1, x2, y2) (vec.x >= (x1) && vec.x <= (x2) && vec.y >= (y1) && vec.y <= (y2))
@@ -22,4 +24,8 @@
#define GREEN(c) ((double)(((c) >> 8) & 0xff) / 255.0)
#define BLUE(c) ((double)(((c)) & 0xff) / 255.0)
-#define HYPRATOM(name) {name, 0} \ No newline at end of file
+#define HYPRATOM(name) {name, 0}
+
+#define RASSERT(expr, reason) if (expr) { Debug::log(CRIT, "\n==========================================================================================\nASSERTION FAILED! \n\n%s\n\nat: line %s in %s", reason, __LINE__, __FILE__); RIP("Assertion failed! See the log in /tmp/hypr/hyprland.log for more info.");}
+
+#define ASSERT(expr) RASSERT(expr, "?") \ No newline at end of file