X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.h;h=f7bebb05ef5899664b2d3ea452164afcda0eb58f;hp=e7ddaa7b1761d9af0a04d624bedbf8688d844e33;hb=a73a88280681acdab047bd11a9ba77d97d6a0b72;hpb=c09bf8da071e05e2c1d714f0d31d41fe944bc11b diff --git a/dwm.h b/dwm.h index e7ddaa7..f7bebb0 100644 --- a/dwm.h +++ b/dwm.h @@ -4,27 +4,16 @@ */ #include +#include CONFIG -/********** CUSTOMIZE **********/ - -#define FONT "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*" -#define BGCOLOR "#666699" -#define FGCOLOR "#eeeeee" -#define BORDERCOLOR "#9999CC" -#define MASTERW 52 /* percent */ -#define WM_PROTOCOL_DELWIN 1 - -/* tags */ -enum { Tscratch, Tdev, Twww, Twork, TLast }; - -/********** CUSTOMIZE **********/ +/* mask shorthands, used in event.c and client.c */ +#define ButtonMask (ButtonPressMask | ButtonReleaseMask) +#define MouseMask (ButtonMask | PointerMotionMask) typedef union Arg Arg; -typedef struct DC DC; typedef struct Client Client; +typedef struct DC DC; typedef struct Fnt Fnt; -typedef struct Key Key; -typedef struct Rule Rule; union Arg { const char **argv; @@ -32,28 +21,31 @@ union Arg { }; /* atoms */ -enum { WMProtocols, WMDelete, WMLast }; enum { NetSupported, NetWMName, NetLast }; +enum { WMProtocols, WMDelete, WMLast }; /* cursor */ -enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; +enum { CurNormal, CurResize, CurMove, CurLast }; + +/* windowcorners */ +typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner; struct Fnt { - XFontStruct *xfont; - XFontSet set; int ascent; int descent; int height; + XFontSet set; + XFontStruct *xfont; }; struct DC { /* draw context */ - GC gc; - Drawable drawable; int x, y, w, h; - Fnt font; unsigned long bg; unsigned long fg; unsigned long border; + Drawable drawable; + Fnt font; + GC gc; }; struct Client { @@ -61,46 +53,30 @@ struct Client { char *tags[TLast]; int proto; int x, y, w, h; - int tx, ty, tw, th; + int tx, ty, tw, th; /* title */ int basew, baseh, incw, inch, maxw, maxh, minw, minh; int grav; unsigned int border; long flags; - Bool dofloat; + Bool isfloat; + Bool ismax; + Client *next; + Client *prev; Window win; Window title; - Client *next; - Client *revert; }; -struct Rule { - const char *class; - const char *instance; - char *tags[TLast]; - Bool dofloat; -}; - -struct Key { - unsigned long mod; - KeySym keysym; - void (*func)(Arg *arg); - Arg arg; -}; - -extern Display *dpy; -extern Window root, barwin; -extern Atom wmatom[WMLast], netatom[NetLast]; -extern Cursor cursor[CurLast]; -extern Bool running, issel; +extern char *tags[TLast], stext[1024]; +extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; extern void (*handler[LASTEvent])(XEvent *); extern void (*arrange)(Arg *); -extern Key key[]; - -extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; -extern char *tags[TLast], stext[1024]; - -extern DC dc; +extern Atom wmatom[WMLast], netatom[NetLast]; +extern Bool running, issel; extern Client *clients, *sel; +extern Cursor cursor[CurLast]; +extern DC dc; +extern Display *dpy; +extern Window root, barwin; /* client.c */ extern void ban(Client *c); @@ -114,10 +90,10 @@ extern void higher(Client *c); extern void killclient(Arg *arg); extern void lower(Client *c); extern void manage(Window w, XWindowAttributes *wa); -extern void maximize(Arg *arg); -extern void resize(Client *c, Bool inc); +extern void resize(Client *c, Bool sizehints, Corner sticky); extern void setsize(Client *c); extern void settitle(Client *c); +extern void togglemax(Arg *arg); extern void unmanage(Client *c); extern void zoom(Arg *arg); @@ -143,9 +119,13 @@ extern void appendtag(Arg *arg); extern void dofloat(Arg *arg); extern void dotile(Arg *arg); extern Client *getnext(Client *c); +extern Client *getprev(Client *c); extern void replacetag(Arg *arg); extern void settags(Client *c); +extern void togglemode(Arg *arg); extern void view(Arg *arg); +extern void viewnext(Arg *arg); +extern void viewprev(Arg *arg); /* util.c */ extern void *emallocz(unsigned int size);