summaryrefslogtreecommitdiffstats
path: root/dwm.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dwm.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/dwm.h b/dwm.h
index 1d672fd..cf51c36 100644
--- a/dwm.h
+++ b/dwm.h
@@ -22,6 +22,12 @@ typedef struct DC DC;
22typedef struct Client Client; 22typedef struct Client Client;
23typedef struct Fnt Fnt; 23typedef struct Fnt Fnt;
24typedef struct Key Key; 24typedef struct Key Key;
25typedef union Arg Arg;
26
27union Arg {
28 const char **argv;
29 int i;
30};
25 31
26/* atoms */ 32/* atoms */
27enum { WMProtocols, WMDelete, WMLast }; 33enum { WMProtocols, WMDelete, WMLast };
@@ -62,14 +68,14 @@ struct Client {
62 Window trans; 68 Window trans;
63 Window title; 69 Window title;
64 Client *next; 70 Client *next;
65 Client *snext; 71 Client *prev;
66}; 72};
67 73
68struct Key { 74struct Key {
69 unsigned long mod; 75 unsigned long mod;
70 KeySym keysym; 76 KeySym keysym;
71 void (*func)(void *aux); 77 void (*func)(Arg *arg);
72 void *aux; 78 Arg arg;
73}; 79};
74 80
75extern Display *dpy; 81extern Display *dpy;
@@ -83,7 +89,7 @@ extern int tsel, screen, sx, sy, sw, sh, th;
83extern char stext[1024], *tags[TLast]; 89extern char stext[1024], *tags[TLast];
84 90
85extern DC dc; 91extern DC dc;
86extern Client *clients, *stack; 92extern Client *cstart, *cend, *csel;
87 93
88/* client.c */ 94/* client.c */
89extern void manage(Window w, XWindowAttributes *wa); 95extern void manage(Window w, XWindowAttributes *wa);
@@ -97,11 +103,13 @@ extern void update_size(Client *c);
97extern Client *gettitle(Window w); 103extern Client *gettitle(Window w);
98extern void craise(Client *c); 104extern void craise(Client *c);
99extern void lower(Client *c); 105extern void lower(Client *c);
100extern void ckill(void *aux); 106extern void ckill(Arg *arg);
101extern void sel(void *aux); 107extern void nextc(Arg *arg);
102extern void max(void *aux); 108extern void prevc(Arg *arg);
103extern void floating(void *aux); 109extern void max(Arg *arg);
104extern void tiling(void *aux); 110extern void floating(Arg *arg);
111extern void tiling(Arg *arg);
112void tag(Arg *arg);
105extern void gravitate(Client *c, Bool invert); 113extern void gravitate(Client *c, Bool invert);
106 114
107/* draw.c */ 115/* draw.c */
@@ -125,7 +133,7 @@ extern void mmove(Client *c);
125extern int error_handler(Display *dsply, XErrorEvent *e); 133extern int error_handler(Display *dsply, XErrorEvent *e);
126extern void send_message(Window w, Atom a, long value); 134extern void send_message(Window w, Atom a, long value);
127extern int win_proto(Window w); 135extern int win_proto(Window w);
128extern void quit(void *aux); 136extern void quit(Arg *arg);
129 137
130/* util.c */ 138/* util.c */
131extern void error(const char *errstr, ...); 139extern void error(const char *errstr, ...);
@@ -133,5 +141,5 @@ extern void *emallocz(unsigned int size);
133extern void *emalloc(unsigned int size); 141extern void *emalloc(unsigned int size);
134extern void *erealloc(void *ptr, unsigned int size); 142extern void *erealloc(void *ptr, unsigned int size);
135extern char *estrdup(const char *str); 143extern char *estrdup(const char *str);
136extern void spawn(char *argv[]); 144extern void spawn(Arg *arg);
137extern void swap(void **p1, void **p2); 145extern void swap(void **p1, void **p2);