X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.h;h=5a714f2433c376d33e15c69f886924cf9051342e;hp=e43301c752647ef0b47c02ee058ff144e493d31e;hb=1f9614f82e14fa3a46e0db05346b41d6be611f88;hpb=f60c597d653bd7eab6c620fc53d732ca75f6a880 diff --git a/dwm.h b/dwm.h index e43301c..5a714f2 100644 --- a/dwm.h +++ b/dwm.h @@ -25,8 +25,9 @@ enum { Tscratch, Tdev, Twww, Twork, TLast }; /********** CUSTOMIZE **********/ typedef union Arg Arg; -typedef struct DC DC; typedef struct Client Client; +typedef enum Corner Corner; +typedef struct DC DC; typedef struct Fnt Fnt; typedef struct Key Key; typedef struct Rule Rule; @@ -37,52 +38,56 @@ 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 }; + +enum Corner { TopLeft, TopRight, BotLeft, BotRight }; 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 { char name[256]; char *tags[TLast]; int proto; - int x, y, w, h; - int tx, ty, tw, th; + int *x, *y, *w, *h; /* current geom */ + int bx, by, bw, bh; /* title bar */ + int fx, fy, fw, fh; /* floating geom */ + int tx, ty, tw, th; /* tiled geom */ int basew, baseh, incw, inch, maxw, maxh, minw, minh; int grav; unsigned int border; long flags; - Bool dofloat; - Window win; - Window title; + Bool isfloat; Client *next; Client *revert; + Window win; + Window title; }; struct Rule { const char *class; const char *instance; char *tags[TLast]; - Bool dofloat; + Bool isfloat; }; struct Key { @@ -92,20 +97,18 @@ struct Key { 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 Key key[]; +extern Window root, barwin; /* client.c */ extern void ban(Client *c); @@ -120,7 +123,9 @@ 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 pop(Client *c); +extern void resize(Client *c, Bool inc, Corner sticky); +extern void setgeom(Client *c); extern void setsize(Client *c); extern void settitle(Client *c); extern void unmanage(Client *c); @@ -147,7 +152,8 @@ extern int xerror(Display *dsply, XErrorEvent *ee); extern void appendtag(Arg *arg); extern void dofloat(Arg *arg); extern void dotile(Arg *arg); -extern Client *getnext(Client *c); +extern Client *getnext(Client *c, unsigned int t); +extern void heretag(Arg *arg); extern void replacetag(Arg *arg); extern void settags(Client *c); extern void view(Arg *arg);