2021-11-18 18:04:09 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <unistd.h>
|
2021-11-21 17:40:02 +01:00
|
|
|
#include <xcb/randr.h>
|
2021-11-18 18:04:09 +01:00
|
|
|
#include <xcb/xcb.h>
|
2021-11-21 17:40:02 +01:00
|
|
|
#include <xcb/xcb_ewmh.h>
|
|
|
|
#include <xcb/xcb_icccm.h>
|
2021-11-18 18:04:09 +01:00
|
|
|
#include <xcb/xcb_keysyms.h>
|
|
|
|
|
2021-11-20 09:25:21 +01:00
|
|
|
#include <memory>
|
2021-11-21 17:40:02 +01:00
|
|
|
#include <string>
|
|
|
|
#include <algorithm>
|
2021-11-18 18:04:09 +01:00
|
|
|
|
|
|
|
#include "./helpers/Vector.hpp"
|
|
|
|
#include "./utilities/Debug.hpp"
|
|
|
|
|
|
|
|
#define EXPOSED_MEMBER(var, type, prefix) \
|
|
|
|
private: \
|
|
|
|
type m_##prefix##var; \
|
|
|
|
public: \
|
|
|
|
type get##var() { return this->m_##prefix##var; } \
|
|
|
|
void set##var(type value) { this->m_##prefix##var = value; }
|
|
|
|
|
|
|
|
|
|
|
|
#define EVENT(name) \
|
|
|
|
void event##name(xcb_generic_event_t* event);
|
|
|
|
|
2021-11-21 17:40:02 +01:00
|
|
|
#define STICKS(a, b) abs((a) - (b)) < 2
|
|
|
|
|
|
|
|
#define VECINRECT(vec, x1, y1, x2, y2) (vec.x >= (x1) && vec.x <= (x2) && vec.y >= (y1) && vec.y <= (y2))
|