1 /* See LICENSE file for copyright and license details. */
5 enum { BarTop, BarBot, BarOff }; /* bar position */
6 enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
7 enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
8 enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
9 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
12 typedef struct Client Client;
16 int rx, ry, rw, rh; /* revert geometry */
17 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
18 int minax, maxax, minay, maxay;
20 unsigned int border, oldborder;
21 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
31 unsigned long norm[ColLast];
32 unsigned long sel[ColLast];
42 } DC; /* draw context */
47 void (*func)(const char *arg);
53 void (*arrange)(void);
57 void applyrules(Client *c);
59 void attach(Client *c);
60 void attachstack(Client *c);
62 void buttonpress(XEvent *e);
63 void checkotherwm(void);
65 void compileregs(void);
66 void configure(Client *c);
67 void configurenotify(XEvent *e);
68 void configurerequest(XEvent *e);
69 void destroynotify(XEvent *e);
70 void detach(Client *c);
71 void detachstack(Client *c);
73 void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]);
74 void drawtext(const char *text, unsigned long col[ColLast]);
75 void *emallocz(unsigned int size);
76 void enternotify(XEvent *e);
77 void eprint(const char *errstr, ...);
78 void expose(XEvent *e);
79 void floating(void); /* default floating layout */
80 void focus(Client *c);
81 void focusnext(const char *arg);
82 void focusprev(const char *arg);
83 Client *getclient(Window w);
84 unsigned long getcolor(const char *colstr);
85 long getstate(Window w);
86 Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
87 void grabbuttons(Client *c, Bool focused);
88 unsigned int idxoftag(const char *tag);
89 void initfont(const char *fontstr);
90 Bool isarrange(void (*func)());
91 Bool isoccupied(unsigned int t);
92 Bool isprotodel(Client *c);
93 Bool isvisible(Client *c);
94 void keypress(XEvent *e);
95 void killclient(const char *arg);
96 void leavenotify(XEvent *e);
97 void manage(Window w, XWindowAttributes *wa);
98 void mappingnotify(XEvent *e);
99 void maprequest(XEvent *e);
100 void movemouse(Client *c);
101 Client *nexttiled(Client *c);
102 void propertynotify(XEvent *e);
103 void quit(const char *arg);
104 void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
105 void resizemouse(Client *c);
109 void setclientstate(Client *c, long state);
110 void setlayout(const char *arg);
111 void setmwfact(const char *arg);
113 void spawn(const char *arg);
114 void tag(const char *arg);
115 unsigned int textnw(const char *text, unsigned int len);
116 unsigned int textw(const char *text);
118 void togglebar(const char *arg);
119 void togglefloating(const char *arg);
120 void togglemax(const char *arg);
121 void toggletag(const char *arg);
122 void toggleview(const char *arg);
123 void unban(Client *c);
124 void unmanage(Client *c);
125 void unmapnotify(XEvent *e);
126 void updatebarpos(void);
127 void updatesizehints(Client *c);
128 void updatetitle(Client *c);
129 void view(const char *arg);
130 void viewprevtag(const char *arg); /* views previous selected tags */
131 int xerror(Display *dpy, XErrorEvent *ee);
132 int xerrordummy(Display *dsply, XErrorEvent *ee);
133 int xerrorstart(Display *dsply, XErrorEvent *ee);
134 void zoom(const char *arg);