111 regex_t *propregex; |
111 regex_t *propregex; |
112 regex_t *tagregex; |
112 regex_t *tagregex; |
113 } Regs; |
113 } Regs; |
114 |
114 |
115 /* functions */ |
115 /* functions */ |
|
116 |
|
117 static void applyrules(Client *c); |
|
118 static void arrange(void); |
|
119 static void attach(Client *c); |
|
120 static void attachstack(Client *c); |
|
121 static void ban(Client *c); |
|
122 static void buttonpress(XEvent *e); |
|
123 static void cleanup(void); |
|
124 static void compileregs(void); |
|
125 static void configure(Client *c); |
|
126 static void configurenotify(XEvent *e); |
|
127 static void configurerequest(XEvent *e); |
|
128 static void destroynotify(XEvent *e); |
|
129 static void detach(Client *c); |
|
130 static void detachstack(Client *c); |
|
131 static void drawbar(void); |
|
132 static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]); |
|
133 static void drawtext(const char *text, unsigned long col[ColLast]); |
|
134 static void *emallocz(unsigned int size); |
|
135 static void enternotify(XEvent *e); |
116 static void eprint(const char *errstr, ...); |
136 static void eprint(const char *errstr, ...); |
117 static void *emallocz(unsigned int size); |
137 static void expose(XEvent *e); |
118 static void spawn(const char *arg); |
138 static void floating(void); /* default floating layout */ |
119 static void drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]); |
139 static void focus(Client *c); |
|
140 static void focusnext(const char *arg); |
|
141 static void focusprev(const char *arg); |
|
142 static Client *getclient(Window w); |
|
143 static long getstate(Window w); |
|
144 static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); |
|
145 static void grabbuttons(Client *c, Bool focused); |
|
146 static unsigned int idxoftag(const char *tag); |
|
147 static void initbar(void); |
120 static unsigned long initcolor(const char *colstr); |
148 static unsigned long initcolor(const char *colstr); |
121 static void initfont(const char *fontstr); |
149 static void initfont(const char *fontstr); |
|
150 static void initlayouts(void); |
|
151 static void initstyle(void); |
|
152 static Bool isarrange(void (*func)()); |
|
153 static Bool isfloating(void); |
122 static Bool isoccupied(unsigned int t); |
154 static Bool isoccupied(unsigned int t); |
123 static unsigned int textnw(const char *text, unsigned int len); |
|
124 static void drawtext(const char *text, unsigned long col[ColLast]); |
|
125 static void drawbar(void); |
|
126 static void initstyle(void); |
|
127 static void initbar(void); |
|
128 static unsigned int textw(const char *text); |
|
129 static void togglebar(const char *arg); |
|
130 static void updatebarpos(void); |
|
131 static void attachstack(Client *c); |
|
132 static void detachstack(Client *c); |
|
133 static void grabbuttons(Client *c, Bool focused); |
|
134 static Bool isprotodel(Client *c); |
155 static Bool isprotodel(Client *c); |
135 static void setclientstate(Client *c, long state); |
156 static Bool isvisible(Client *c); |
136 static int xerrordummy(Display *dsply, XErrorEvent *ee); |
157 static void keypress(XEvent *e); |
137 static void ban(Client *c); |
|
138 static void configure(Client *c); |
|
139 static void killclient(const char *arg); |
158 static void killclient(const char *arg); |
|
159 static void leavenotify(XEvent *e); |
140 static void manage(Window w, XWindowAttributes *wa); |
160 static void manage(Window w, XWindowAttributes *wa); |
141 static void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
|
142 static void unban(Client *c); |
|
143 static void unmanage(Client *c); |
|
144 static void updatesizehints(Client *c); |
|
145 static void updatetitle(Client *c); |
|
146 static Client *getclient(Window w); |
|
147 static void movemouse(Client *c); |
|
148 static void resizemouse(Client *c); |
|
149 static void buttonpress(XEvent *e); |
|
150 static void configurerequest(XEvent *e); |
|
151 static void configurenotify(XEvent *e); |
|
152 static void destroynotify(XEvent *e); |
|
153 static void enternotify(XEvent *e); |
|
154 static void expose(XEvent *e); |
|
155 static void keypress(XEvent *e); |
|
156 static void leavenotify(XEvent *e); |
|
157 static void mappingnotify(XEvent *e); |
161 static void mappingnotify(XEvent *e); |
158 static void maprequest(XEvent *e); |
162 static void maprequest(XEvent *e); |
|
163 static void movemouse(Client *c); |
|
164 static Client *nexttiled(Client *c); |
159 static void propertynotify(XEvent *e); |
165 static void propertynotify(XEvent *e); |
160 static void unmapnotify(XEvent *e); |
166 static void quit(const char *arg); |
161 static unsigned int idxoftag(const char *tag); |
167 static void resize(Client *c, int x, int y, int w, int h, Bool sizehints); |
162 static void floating(void); /* default floating layout */ |
168 static void resizemouse(Client *c); |
163 static void applyrules(Client *c); |
|
164 static void compileregs(void); |
|
165 static void focusnext(const char *arg); |
|
166 static void focusprev(const char *arg); |
|
167 static void initlayouts(void); |
|
168 static Bool isfloating(void); |
|
169 static Bool isvisible(Client *c); |
|
170 static void restack(void); |
169 static void restack(void); |
|
170 static void scan(void); |
|
171 static void setclientstate(Client *c, long state); |
171 static void setlayout(const char *arg); |
172 static void setlayout(const char *arg); |
|
173 static void setmwfact(const char *arg); |
|
174 static void setup(void); |
|
175 static void spawn(const char *arg); |
172 static void tag(const char *arg); |
176 static void tag(const char *arg); |
|
177 static unsigned int textnw(const char *text, unsigned int len); |
|
178 static unsigned int textw(const char *text); |
|
179 static void tile(void); |
|
180 static void togglebar(const char *arg); |
173 static void togglefloating(const char *arg); |
181 static void togglefloating(const char *arg); |
174 static void togglemax(const char *arg); |
182 static void togglemax(const char *arg); |
175 static void toggletag(const char *arg); |
183 static void toggletag(const char *arg); |
176 static void toggleview(const char *arg); |
184 static void toggleview(const char *arg); |
|
185 static void unban(Client *c); |
|
186 static void unmanage(Client *c); |
|
187 static void unmapnotify(XEvent *e); |
|
188 static void updatebarpos(void); |
|
189 static void updatesizehints(Client *c); |
|
190 static void updatetitle(Client *c); |
177 static void view(const char *arg); |
191 static void view(const char *arg); |
178 static void cleanup(void); |
192 static int xerror(Display *dpy, XErrorEvent *ee); |
179 static long getstate(Window w); |
193 static int xerrordummy(Display *dsply, XErrorEvent *ee); |
180 static void scan(void); |
|
181 static void setup(void); |
|
182 static int xerrorstart(Display *dsply, XErrorEvent *ee); |
194 static int xerrorstart(Display *dsply, XErrorEvent *ee); |
183 static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size); |
|
184 static void quit(const char *arg); |
|
185 static int xerror(Display *dpy, XErrorEvent *ee); |
|
186 static void arrange(void); |
|
187 static void attach(Client *c); |
|
188 static void detach(Client *c); |
|
189 static void focus(Client *c); |
|
190 static Bool isarrange(void (*func)()); |
|
191 static Client *nexttiled(Client *c); |
|
192 static void setmwfact(const char *arg); |
|
193 static void tile(void); |
|
194 static void zoom(const char *arg); |
195 static void zoom(const char *arg); |
195 |
196 |
196 #include "config.h" |
197 #include "config.h" |
197 |
198 |
198 /* variables */ |
199 /* variables */ |