dwm.h
changeset 49 466591c2f967
parent 46 58307ad56ec1
child 50 148f25ed0ad7
--- a/dwm.h	Thu Jul 13 14:33:22 2006 +0200
+++ b/dwm.h	Thu Jul 13 17:09:35 2006 +0200
@@ -22,6 +22,12 @@
 typedef struct Client Client;
 typedef struct Fnt Fnt;
 typedef struct Key Key;
+typedef union Arg Arg;
+
+union Arg {
+	const char **argv;
+	int i;
+};
 
 /* atoms */
 enum { WMProtocols, WMDelete, WMLast };
@@ -62,14 +68,14 @@
 	Window trans;
 	Window title;
 	Client *next;
-	Client *snext;
+	Client *prev;
 };
 
 struct Key {
 	unsigned long mod;
 	KeySym keysym;
-	void (*func)(void *aux);
-	void *aux;
+	void (*func)(Arg *arg);
+	Arg arg;
 };
 
 extern Display *dpy;
@@ -83,7 +89,7 @@
 extern char stext[1024], *tags[TLast];
 
 extern DC dc;
-extern Client *clients, *stack;
+extern Client *cstart, *cend, *csel;
 
 /* client.c */
 extern void manage(Window w, XWindowAttributes *wa);
@@ -97,11 +103,13 @@
 extern Client *gettitle(Window w);
 extern void craise(Client *c);
 extern void lower(Client *c);
-extern void ckill(void *aux);
-extern void sel(void *aux);
-extern void max(void *aux);
-extern void floating(void *aux);
-extern void tiling(void *aux);
+extern void ckill(Arg *arg);
+extern void nextc(Arg *arg);
+extern void prevc(Arg *arg);
+extern void max(Arg *arg);
+extern void floating(Arg *arg);
+extern void tiling(Arg *arg);
+void tag(Arg *arg);
 extern void gravitate(Client *c, Bool invert);
 
 /* draw.c */
@@ -125,7 +133,7 @@
 extern int error_handler(Display *dsply, XErrorEvent *e);
 extern void send_message(Window w, Atom a, long value);
 extern int win_proto(Window w);
-extern void quit(void *aux);
+extern void quit(Arg *arg);
 
 /* util.c */
 extern void error(const char *errstr, ...);
@@ -133,5 +141,5 @@
 extern void *emalloc(unsigned int size);
 extern void *erealloc(void *ptr, unsigned int size);
 extern char *estrdup(const char *str);
-extern void spawn(char *argv[]);
+extern void spawn(Arg *arg);
 extern void swap(void **p1, void **p2);