X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=dwm.h;h=9d2d959bf8092089a4162727934558068f6dae47;hb=9833610356f7ce033589680fddf87000e5788774;hp=bb941dc64ce0d6993a900ffd7be55f1523483f1b;hpb=ee31e38dc75832a66cb0fc01bcf2f419ac96a20b;p=dwm.git diff --git a/dwm.h b/dwm.h index bb941dc..9d2d959 100644 --- a/dwm.h +++ b/dwm.h @@ -11,15 +11,10 @@ #define MOUSEMASK (BUTTONMASK | PointerMotionMask) #define PROTODELWIN 1 -typedef union Arg Arg; -typedef struct Client Client; -typedef struct DC DC; -typedef struct Fnt Fnt; - -union Arg { +typedef union { const char *cmd; int i; -}; +} Arg; /* atoms */ enum { NetSupported, NetWMName, NetLast }; @@ -28,18 +23,18 @@ enum { WMProtocols, WMDelete, WMLast }; /* cursor */ enum { CurNormal, CurResize, CurMove, CurLast }; -/* windowcorners */ +/* window corners */ typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner; -struct Fnt { +typedef struct { int ascent; int descent; int height; XFontSet set; XFontStruct *xfont; -}; +} Fnt; -struct DC { /* draw context */ +typedef struct { /* draw context */ int x, y, w, h; unsigned long bg; unsigned long fg; @@ -47,8 +42,9 @@ struct DC { /* draw context */ Drawable drawable; Fnt font; GC gc; -}; +} DC; +typedef struct Client Client; struct Client { char name[256]; int proto; @@ -64,7 +60,7 @@ struct Client { Client *next; Client *prev; Window win; - Window title; + Window twin; }; extern const char *tags[]; @@ -84,8 +80,6 @@ extern Window root, barwin; /* client.c */ extern void ban(Client *c); extern void focus(Client *c); -extern void focusnext(Arg *arg); -extern void focusprev(Arg *arg); extern Client *getclient(Window w); extern Client *getctitle(Window w); extern void gravitate(Client *c, Bool invert); @@ -96,7 +90,6 @@ 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); /* draw.c */ extern void drawall(); @@ -108,6 +101,7 @@ extern unsigned int textw(const char *text); /* event.c */ extern void grabkeys(); +extern void procevent(); /* main.c */ extern int getproto(Window w); @@ -116,22 +110,27 @@ extern void sendevent(Window w, Atom a, long value); extern int xerror(Display *dsply, XErrorEvent *ee); /* tag.c */ -extern void dofloat(Arg *arg); -extern void dotile(Arg *arg); extern void initrregs(); -extern Bool isvisible(Client *c); extern Client *getnext(Client *c); extern Client *getprev(Client *c); -extern void restack(); extern void settags(Client *c); extern void tag(Arg *arg); -extern void togglemode(Arg *arg); extern void toggletag(Arg *arg); -extern void toggleview(Arg *arg); -extern void view(Arg *arg); /* util.c */ extern void *emallocz(unsigned int size); extern void eprint(const char *errstr, ...); extern void *erealloc(void *ptr, unsigned int size); extern void spawn(Arg *arg); + +/* view.c */ +extern void dofloat(Arg *arg); +extern void dotile(Arg *arg); +extern void focusnext(Arg *arg); +extern void focusprev(Arg *arg); +extern Bool isvisible(Client *c); +extern void restack(); +extern void togglemode(Arg *arg); +extern void toggleview(Arg *arg); +extern void view(Arg *arg); +extern void zoom(Arg *arg);