JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied Sanders max_and_focus.patch
[dwm.git] / dwm.h
diff --git a/dwm.h b/dwm.h
index b96facd..e1df6bc 100644 (file)
--- a/dwm.h
+++ b/dwm.h
 #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,27 +23,31 @@ enum { WMProtocols, WMDelete, WMLast };
 /* cursor */
 enum { CurNormal, CurResize, CurMove, CurLast };
 
-/* windowcorners */
+/* color */
+enum { ColFG, ColBG, ColLast };
+
+/* 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;
-       unsigned long border;
+       unsigned long norm[ColLast];
+       unsigned long sel[ColLast];
+       unsigned long status[ColLast];
        Drawable drawable;
        Fnt font;
        GC gc;
-};
+} DC;
 
+typedef struct Client Client;
 struct Client {
        char name[256];
        int proto;
@@ -57,24 +56,23 @@ struct Client {
        int basew, baseh, incw, inch, maxw, maxh, minw, minh;
        int grav;
        long flags; 
-       unsigned int border;
+       unsigned int border, weight;
        Bool isfloat;
-       Bool ismax;
        Bool *tags;
        Client *next;
        Client *prev;
        Window win;
-       Window title;
+       Window twin;
 };
 
 extern const char *tags[];
 extern char stext[1024];
-extern int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
+extern int bx, by, bw, bh, bmw, mw, screen, sx, sy, sw, sh;
 extern unsigned int ntags, numlockmask;
 extern void (*handler[LASTEvent])(XEvent *);
 extern void (*arrange)(Arg *);
 extern Atom wmatom[WMLast], netatom[NetLast];
-extern Bool running, issel, *seltag;
+extern Bool running, issel, maximized, *seltag;
 extern Client *clients, *sel;
 extern Cursor cursor[CurLast];
 extern DC dc;
@@ -128,6 +126,7 @@ extern void *erealloc(void *ptr, unsigned int size);
 extern void spawn(Arg *arg);
 
 /* view.c */
+extern void detach(Client *c);
 extern void dofloat(Arg *arg);
 extern void dotile(Arg *arg);
 extern void focusnext(Arg *arg);
@@ -137,4 +136,5 @@ extern void restack();
 extern void togglemode(Arg *arg);
 extern void toggleview(Arg *arg);
 extern void view(Arg *arg);
+extern void viewall(Arg *arg);
 extern void zoom(Arg *arg);