From 4c90d1d9e4092f9ee0106d316829144653a276ea Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Tue, 30 Dec 2025 02:45:11 +0100 Subject: 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 --- src/ui/bar.h | 13 +++++++++++++ src/ui/input.h | 13 +++++++++++++ src/ui/systray.h | 12 ++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 src/ui/bar.h create mode 100644 src/ui/input.h create mode 100644 src/ui/systray.h (limited to 'src/ui') diff --git a/src/ui/bar.h b/src/ui/bar.h new file mode 100644 index 0000000..79e4912 --- /dev/null +++ b/src/ui/bar.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "../core/types.h" + +void drawbar(Monitor *m); +void drawbars(void); +void updatebars(void); +void updatestatus(void); +unsigned int getsystraywidth(void); + +extern char stext[256]; +extern int lrpad; diff --git a/src/ui/input.h b/src/ui/input.h new file mode 100644 index 0000000..54e3c58 --- /dev/null +++ b/src/ui/input.h @@ -0,0 +1,13 @@ + +#pragma once + +#include "../core/types.h" + +void grabkeys(void); +void grabbuttons(Client *c, int focused); + +void keypress(XEvent *e); +void buttonpress(XEvent *e); + +void movemouse(const Arg *arg); +void resizemouse(const Arg *arg); diff --git a/src/ui/systray.h b/src/ui/systray.h new file mode 100644 index 0000000..ad78f58 --- /dev/null +++ b/src/ui/systray.h @@ -0,0 +1,12 @@ + +#pragma once + +#include "../core/types.h" + +void updatesystray(void); +void removesystrayicon(Client *i); +void updatesystrayicongeom(Client *i, int w, int h); +void updatesystrayiconstate(Client *i, XPropertyEvent *ev); + +Client *wintosystrayicon(Window w); +Monitor *systraytomon(Monitor *m); -- cgit v1.2.3