X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=wm.h;h=a24b40d41f0b29ca972337551f78a781449a55a8;hb=a05beb6585713aeb661cf30c080e77fbfdb28867;hp=b9ba8f787c09d008b4cd2595343ca0c2fee17fa5;hpb=33996500763b04119a6867dfa4040a4236c21a41;p=dwm.git diff --git a/wm.h b/wm.h index b9ba8f7..a24b40d 100644 --- a/wm.h +++ b/wm.h @@ -11,6 +11,9 @@ #define WM_PROTOCOL_DELWIN 1 +typedef struct Client Client; +typedef struct Key Key; + /* atoms */ enum { WMProtocols, WMDelete, WMLast }; enum { NetSupported, NetWMName, NetLast }; @@ -18,23 +21,15 @@ enum { NetSupported, NetWMName, NetLast }; /* cursor */ enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; -/* rects */ -enum { RFloat, RGrid, RLast }; - -typedef struct Client Client; -typedef struct Key Key; - struct Client { - char name[256]; - char tag[256]; - unsigned int border; + char name[256], tag[256]; int proto; - Bool fixedsize; + int x, y, w, h; + int basew, baseh, incw, inch, maxw, maxh, minw, minh; + long flags; Window win; Window trans; Window title; - XSizeHints size; - XRectangle r[RLast]; Client *next; Client *snext; }; @@ -42,8 +37,8 @@ struct Client { struct Key { unsigned long mod; KeySym keysym; - void (*func)(char *arg); - char *arg; + void (*func)(void *aux); + void *aux; }; extern Display *dpy; @@ -55,7 +50,7 @@ extern Bool running, sel_screen, grid; extern void (*handler[LASTEvent]) (XEvent *); extern int screen; -extern char *bartext, tag[256]; +extern char statustext[1024], tag[256]; extern Brush brush; extern Client *clients, *stack; @@ -64,8 +59,9 @@ extern Client *clients, *stack; extern void draw_bar(); /* cmd.c */ -extern void run(char *arg); -extern void quit(char *arg); +extern void run(void *aux); +extern void quit(void *aux); +extern void kill(void *aux); /* client.c */ extern void manage(Window w, XWindowAttributes *wa); @@ -73,14 +69,21 @@ extern void unmanage(Client *c); extern Client *getclient(Window w); extern void focus(Client *c); extern void update_name(Client *c); +extern void draw_client(Client *c); +extern void resize(Client *c); +extern void update_size(Client *c); /* event.c */ -extern unsigned int flush_events(long even_mask); +extern unsigned int discard_events(long even_mask); /* key.c */ extern void update_keys(); extern void keypress(XEvent *e); +/* mouse.c */ +extern void mresize(Client *c); +extern void mmove(Client *c); + /* wm.c */ extern int error_handler(Display *dpy, XErrorEvent *error); extern void send_message(Window w, Atom a, long value);