#pragma once #include #include #include /* cursors */ enum { CurNormal, CurResize, CurMove, CurLast }; /* color schemes */ enum { SchemeNorm, SchemeSel }; /* EWMH atoms */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* XEmbed */ enum { Manager, Xembed, XembedInfo, XLast }; /* ICCCM */ enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* clicks */ enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, ClkRootWin, ClkLast }; /* generic argument */ typedef union { int i; unsigned int ui; float f; const void *v; } Arg; /* input */ typedef struct { unsigned int click; unsigned int mask; unsigned int button; void (*func)(const Arg *arg); const Arg arg; } Button; typedef struct { unsigned int mod; KeySym keysym; void (*func)(const Arg *); const Arg arg; } Key; /* forward decls */ typedef struct Client Client; typedef struct Monitor Monitor; /* layout */ typedef struct { const char *symbol; void (*arrange)(Monitor *); } Layout; /* client */ struct Client { char name[256]; float mina, maxa; int basew, baseh, incw, inch, maxw, maxh, minw, minh; int hintsvalid; int x, y, w, h; int oldx, oldy, oldw, oldh; int bw, oldbw; unsigned int tags; int isfixed, isfloating, isurgent, neverfocus; int oldstate, isfullscreen; int isterminal, noswallow; pid_t pid; Client *next; Client *snext; Client *swallowing; Monitor *mon; Window win; }; /* monitor */ struct Monitor { char ltsymbol[16]; float mfact; int nmaster; int num; int mx, my, mw, mh; int wx, wy, ww, wh; int by; int gappih, gappiv; int gappoh, gappov; unsigned int seltags; unsigned int sellt; unsigned int tagset[2]; int showbar; int topbar; Client *clients; Client *sel; Client *stack; Monitor *next; Window barwin; const Layout *lt[2]; }; /* rules */ typedef struct { const char *class; const char *instance; const char *title; unsigned int tags; int isfloating; int isterminal; int noswallow; int monitor; } Rule; /* systray */ typedef struct Systray { Window win; Client *icons; } Systray;