summaryrefslogtreecommitdiff
path: root/src/defs.h
diff options
context:
space:
mode:
authoruint23 <[email protected]>2025-04-16 18:38:01 +0100
committeruint23 <[email protected]>2025-04-16 18:38:01 +0100
commitd1c02153202030c29c497636736483e0e2425bee (patch)
tree1b0d5f50c1b7ed9f644bb428cf4c966b3993dd88 /src/defs.h
parent27077232095c5c9142eb831274516b14ada0a85f (diff)
tiling complete
Diffstat (limited to 'src/defs.h')
-rw-r--r--src/defs.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/defs.h b/src/defs.h
index 2046bc3..cf911cf 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -1,6 +1,7 @@
#ifndef DEFS_H
#define DEFS_H
+#include <stdint.h>
#include <X11/Xlib.h>
#define SXWM_VERSION "sxwm ver. 0.1.0"
@@ -11,14 +12,13 @@
#define SUPER Mod4Mask
#define SHIFT ShiftMask
+#define LENGTH(X) (sizeof X / sizeof X[0])
#define BIND(mod, key, cmdstr) { (mod), XK_##key, { cmdstr }, 0 }
#define CALL(mod, key, fnptr) { (mod), XK_##key, { .fn = fnptr }, 1 }
#define MAXCLIENTS 64
-typedef void
-(*EventHandler)(XEvent *);
-
+typedef void (*EventHandler)(XEvent *);
typedef union {
const char **cmd;
void (*fn)(void);
@@ -32,12 +32,8 @@ typedef struct {
} Binding;
typedef struct Client{
- Window id;
- int x, y;
- unsigned int w, h;
- unsigned int bw;
- Bool isfocused;
- Bool isfloating;
+ Window win;
+ uint height, width;
struct Client *next;
} Client;