aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2025-12-30 02:45:11 +0100
committerFilip Wandzio <contact@philw.dev>2025-12-30 02:45:11 +0100
commit4c90d1d9e4092f9ee0106d316829144653a276ea (patch)
treecba5e7697a1334da068c5fa5e5951e00696fb903 /src/wm
parent11b1ff4691ff3e0f8346e7431fa3f90cc846fc5d (diff)
downloaddwm-4c90d1d9e4092f9ee0106d316829144653a276ea.tar.gz
dwm-4c90d1d9e4092f9ee0106d316829144653a276ea.zip
Split monolithic dwm.h into modular headers and group them by it's functionalities
The new plan of refactoring this project is to split entire monolithic codebase into separate, (kind of) independent modules. This will help with understanding the code by turning off modules and deciding which ones require some work. Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to 'src/wm')
-rw-r--r--src/wm/client.h26
-rw-r--r--src/wm/layout.h12
-rw-r--r--src/wm/monitor.h15
3 files changed, 53 insertions, 0 deletions
diff --git a/src/wm/client.h b/src/wm/client.h
new file mode 100644
index 0000000..8a2a05e
--- /dev/null
+++ b/src/wm/client.h
@@ -0,0 +1,26 @@
1
2#pragma once
3
4#include "../core/types.h"
5
6void manage(Window w, XWindowAttributes *wa);
7void unmanage(Client *c, int destroyed);
8
9void attach(Client *c);
10void detach(Client *c);
11void attachstack(Client *c);
12void detachstack(Client *c);
13
14void focus(Client *c);
15void unfocus(Client *c, int setfocus);
16
17void resize(Client *c, int x, int y, int w, int h, int interact);
18void resizeclient(Client *c, int x, int y, int w, int h);
19
20Client *nexttiled(Client *c);
21Client *wintoclient(Window w);
22
23/* swallow (optional) */
24Client *swallowingclient(Window w);
25Client *termforwin(const Client *c);
26pid_t winpid(Window w);
diff --git a/src/wm/layout.h b/src/wm/layout.h
new file mode 100644
index 0000000..5deab64
--- /dev/null
+++ b/src/wm/layout.h
@@ -0,0 +1,12 @@
1
2#pragma once
3
4#include "../core/types.h"
5
6void arrange(Monitor *m);
7void arrangemon(Monitor *m);
8void tile(Monitor *m);
9void restack(Monitor *m);
10void showhide(Client *c);
11void zoom(const Arg *arg);
12void setlayout(const Arg *arg);
diff --git a/src/wm/monitor.h b/src/wm/monitor.h
new file mode 100644
index 0000000..e09935e
--- /dev/null
+++ b/src/wm/monitor.h
@@ -0,0 +1,15 @@
1
2#pragma once
3
4#include "../core/types.h"
5
6Monitor *createmon(void);
7void cleanupmon(Monitor *mon);
8
9Monitor *recttomon(int x, int y, int w, int h);
10Monitor *wintomon(Window w);
11void sendmon(Client *c, Monitor *m);
12
13int updategeom(void);
14void updatebarpos(Monitor *m);
15void resizebarwin(Monitor *m);