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