mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 07:01:57 -07:00
🎉 Wrapped dynamic event handlers
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "includes.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "helpers/MiscFunctions.hpp"
|
||||
#include "helpers/WLListener.hpp"
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define ISDEBUG true
|
||||
@@ -11,7 +12,8 @@
|
||||
#define RIP(format, ... ) { fprintf(stderr, format "\n", ##__VA_ARGS__); exit(EXIT_FAILURE); }
|
||||
|
||||
#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 DYNLISTENFUNC(name) void listener_##name(void*, void*);
|
||||
#define DYNLISTENER(name) CHyprWLListener hyprListener_##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))
|
||||
|
Reference in New Issue
Block a user