summaryrefslogtreecommitdiffstats
path: root/dwm.h
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-10-16 19:04:49 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-10-16 19:04:49 +0200
commit5a04edecb1eb3a49f659938f7d2eba11d42760ae (patch)
treeffebf04ac2208c7348e0e29275727e466562c4a3 /dwm.h
parentsmall comment (diff)
downloaddwm-5a04edecb1eb3a49f659938f7d2eba11d42760ae.tar.gz
dwm-5a04edecb1eb3a49f659938f7d2eba11d42760ae.zip
cleaned up dwm.c/dwm.h somewhat that it allows easier integration of patches
Diffstat (limited to 'dwm.h')
-rw-r--r--dwm.h114
1 files changed, 114 insertions, 0 deletions
diff --git a/dwm.h b/dwm.h
index 10834f5..ff50d47 100644
--- a/dwm.h
+++ b/dwm.h
@@ -1,6 +1,13 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2#include <X11/Xlib.h> 2#include <X11/Xlib.h>
3 3
4/* enums */
5enum { BarTop, BarBot, BarOff }; /* bar position */
6enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
7enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
8enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
9enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
10
4/* typedefs */ 11/* typedefs */
5typedef struct Client Client; 12typedef struct Client Client;
6struct Client { 13struct Client {
@@ -18,3 +25,110 @@ struct Client {
18 Client *snext; 25 Client *snext;
19 Window win; 26 Window win;
20}; 27};
28
29typedef struct {
30 int x, y, w, h;
31 unsigned long norm[ColLast];
32 unsigned long sel[ColLast];
33 Drawable drawable;
34 GC gc;
35 struct {
36 int ascent;
37 int descent;
38 int height;
39 XFontSet set;
40 XFontStruct *xfont;
41 } font;
42} DC; /* draw context */
43
44typedef struct {
45 unsigned long mod;
46 KeySym keysym;
47 void (*func)(const char *arg);
48 const char *arg;
49} Key;
50
51typedef struct {
52 const char *symbol;
53 void (*arrange)(void);
54} Layout;
55
56/* functions */
57void applyrules(Client *c);
58void arrange(void);
59void attach(Client *c);
60void attachstack(Client *c);
61void ban(Client *c);
62void buttonpress(XEvent *e);
63void checkotherwm(void);
64void cleanup(void);
65void compileregs(void);
66void configure(Client *c);
67void configurenotify(XEvent *e);
68void configurerequest(XEvent *e);
69void destroynotify(XEvent *e);
70void detach(Client *c);
71void detachstack(Client *c);
72void drawbar(void);
73void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
74void drawtext(const char *text, unsigned long col[ColLast]);
75void *emallocz(unsigned int size);
76void enternotify(XEvent *e);
77void eprint(const char *errstr, ...);
78void expose(XEvent *e);
79void floating(void); /* default floating layout */
80void focus(Client *c);
81void focusnext(const char *arg);
82void focusprev(const char *arg);
83Client *getclient(Window w);
84unsigned long getcolor(const char *colstr);
85long getstate(Window w);
86Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
87void grabbuttons(Client *c, Bool focused);
88unsigned int idxoftag(const char *tag);
89void initfont(const char *fontstr);
90Bool isarrange(void (*func)());
91Bool isoccupied(unsigned int t);
92Bool isprotodel(Client *c);
93Bool isvisible(Client *c);
94void keypress(XEvent *e);
95void killclient(const char *arg);
96void leavenotify(XEvent *e);
97void manage(Window w, XWindowAttributes *wa);
98void mappingnotify(XEvent *e);
99void maprequest(XEvent *e);
100void movemouse(Client *c);
101Client *nexttiled(Client *c);
102void propertynotify(XEvent *e);
103void quit(const char *arg);
104void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
105void resizemouse(Client *c);
106void restack(void);
107void run(void);
108void scan(void);
109void setclientstate(Client *c, long state);
110void setlayout(const char *arg);
111void setmwfact(const char *arg);
112void setup(void);
113void spawn(const char *arg);
114void tag(const char *arg);
115unsigned int textnw(const char *text, unsigned int len);
116unsigned int textw(const char *text);
117void tile(void);
118void togglebar(const char *arg);
119void togglefloating(const char *arg);
120void togglemax(const char *arg);
121void toggletag(const char *arg);
122void toggleview(const char *arg);
123void unban(Client *c);
124void unmanage(Client *c);
125void unmapnotify(XEvent *e);
126void updatebarpos(void);
127void updatesizehints(Client *c);
128void updatetitle(Client *c);
129void view(const char *arg);
130void viewprevtag(const char *arg); /* views previous selected tags */
131int xerror(Display *dpy, XErrorEvent *ee);
132int xerrordummy(Display *dsply, XErrorEvent *ee);
133int xerrorstart(Display *dsply, XErrorEvent *ee);
134void zoom(const char *arg);