Mercurial > aewl
comparison dwm.h @ 49:466591c2f967
implemented tagging a client
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Thu, 13 Jul 2006 17:09:35 +0200 |
parents | 58307ad56ec1 |
children | 148f25ed0ad7 |
comparison
equal
deleted
inserted
replaced
48:ceff29af8c7b | 49:466591c2f967 |
---|---|
20 | 20 |
21 typedef struct DC DC; | 21 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 }; |
28 enum { NetSupported, NetWMName, NetLast }; | 34 enum { NetSupported, NetWMName, NetLast }; |
29 | 35 |
60 long flags; | 66 long flags; |
61 Window win; | 67 Window win; |
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; |
76 extern Window root; | 82 extern Window root; |
77 extern Atom wm_atom[WMLast], net_atom[NetLast]; | 83 extern Atom wm_atom[WMLast], net_atom[NetLast]; |
81 | 87 |
82 extern int tsel, screen, sx, sy, sw, sh, th; | 88 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); |
90 extern void unmanage(Client *c); | 96 extern void unmanage(Client *c); |
91 extern Client *getclient(Window w); | 97 extern Client *getclient(Window w); |
95 extern void resize(Client *c); | 101 extern void resize(Client *c); |
96 extern void update_size(Client *c); | 102 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 */ |
108 extern void draw(Bool border, const char *text); | 116 extern void draw(Bool border, const char *text); |
109 extern unsigned long initcolor(const char *colstr); | 117 extern unsigned long initcolor(const char *colstr); |
123 | 131 |
124 /* main.c */ | 132 /* main.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, ...); |
132 extern void *emallocz(unsigned int size); | 140 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); |