diff options
| author | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2025-12-30 02:45:11 +0100 |
| commit | 4c90d1d9e4092f9ee0106d316829144653a276ea (patch) | |
| tree | cba5e7697a1334da068c5fa5e5951e00696fb903 /src/x11 | |
| parent | 11b1ff4691ff3e0f8346e7431fa3f90cc846fc5d (diff) | |
| download | dwm-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 '')
| -rw-r--r-- | src/x11/xevents.h | 25 | ||||
| -rw-r--r-- | src/x11/xutil.h | 21 |
2 files changed, 46 insertions, 0 deletions
diff --git a/src/x11/xevents.h b/src/x11/xevents.h new file mode 100644 index 0000000..98129bb --- /dev/null +++ b/src/x11/xevents.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | |||
| 2 | #pragma once | ||
| 3 | |||
| 4 | #include <X11/Xlib.h> | ||
| 5 | |||
| 6 | void run(void); | ||
| 7 | void scan(void); | ||
| 8 | |||
| 9 | void buttonpress(XEvent *e); | ||
| 10 | void keypress(XEvent *e); | ||
| 11 | void maprequest(XEvent *e); | ||
| 12 | void configurerequest(XEvent *e); | ||
| 13 | void configurenotify(XEvent *e); | ||
| 14 | void destroynotify(XEvent *e); | ||
| 15 | void unmapnotify(XEvent *e); | ||
| 16 | void clientmessage(XEvent *e); | ||
| 17 | void propertynotify(XEvent *e); | ||
| 18 | void resizerequest(XEvent *e); | ||
| 19 | void mappingnotify(XEvent *e); | ||
| 20 | void motionnotify(XEvent *e); | ||
| 21 | void enternotify(XEvent *e); | ||
| 22 | void focusin(XEvent *e); | ||
| 23 | void expose(XEvent *e); | ||
| 24 | |||
| 25 | extern void (*handler[LASTEvent])(XEvent *); | ||
diff --git a/src/x11/xutil.h b/src/x11/xutil.h new file mode 100644 index 0000000..2e044e3 --- /dev/null +++ b/src/x11/xutil.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | |||
| 2 | #pragma once | ||
| 3 | |||
| 4 | #include "../core/types.h" | ||
| 5 | |||
| 6 | void checkotherwm(void); | ||
| 7 | |||
| 8 | Atom getatomprop(Client *c, Atom prop); | ||
| 9 | int getrootptr(int *x, int *y); | ||
| 10 | long getstate(Window w); | ||
| 11 | int gettextprop(Window w, Atom atom, char *text, unsigned int size); | ||
| 12 | |||
| 13 | int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, | ||
| 14 | long d4); | ||
| 15 | |||
| 16 | void setfocus(Client *c); | ||
| 17 | void updatenumlockmask(void); | ||
| 18 | |||
| 19 | int xerror(Display *dpy, XErrorEvent *ee); | ||
| 20 | int xerrordummy(Display *dpy, XErrorEvent *ee); | ||
| 21 | int xerrorstart(Display *dpy, XErrorEvent *ee); | ||
