rev |
line source |
garbeam@0
|
1 /*
|
garbeam@0
|
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
|
garbeam@0
|
3 * See LICENSE file for license details.
|
garbeam@0
|
4 */
|
garbeam@0
|
5
|
garbeam@3
|
6 #include "config.h"
|
garbeam@2
|
7 #include "draw.h"
|
garbeam@2
|
8 #include "util.h"
|
garbeam@2
|
9
|
garbeam@0
|
10 #include <X11/Xutil.h>
|
garbeam@0
|
11
|
garbeam@5
|
12 /* atoms */
|
garbeam@0
|
13 enum { WMState, WMProtocols, WMDelete, WMLast };
|
garbeam@0
|
14 enum { NetSupported, NetWMName, NetLast };
|
garbeam@0
|
15
|
garbeam@5
|
16 /* cursor */
|
garbeam@0
|
17 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
|
garbeam@0
|
18
|
garbeam@5
|
19 /* rects */
|
garbeam@0
|
20 enum { RFloat, RGrid, RLast };
|
garbeam@0
|
21
|
garbeam@0
|
22 typedef struct Client Client;
|
garbeam@0
|
23
|
garbeam@0
|
24 struct Client {
|
garbeam@0
|
25 char name[256];
|
garbeam@7
|
26 char tag[256];
|
garbeam@0
|
27 int proto;
|
garbeam@5
|
28 unsigned int border;
|
garbeam@5
|
29 Bool fixedsize;
|
garbeam@0
|
30 Window win;
|
garbeam@0
|
31 Window trans;
|
garbeam@0
|
32 Window title;
|
garbeam@0
|
33 XSizeHints size;
|
garbeam@0
|
34 XRectangle r[RLast];
|
garbeam@0
|
35 Client *next;
|
garbeam@5
|
36 Client *snext;
|
garbeam@0
|
37 };
|
garbeam@0
|
38
|
garbeam@0
|
39 extern Display *dpy;
|
garbeam@5
|
40 extern Window root, barwin;
|
garbeam@5
|
41 extern Atom wm_atom[WMLast], net_atom[NetLast];
|
garbeam@0
|
42 extern Cursor cursor[CurLast];
|
garbeam@5
|
43 extern XRectangle rect, barrect;
|
garbeam@5
|
44 extern Bool running;
|
garbeam@7
|
45 extern Bool grid;
|
garbeam@5
|
46 extern void (*handler[LASTEvent]) (XEvent *);
|
garbeam@0
|
47
|
garbeam@3
|
48 extern int screen, sel_screen;
|
garbeam@5
|
49 extern unsigned int lock_mask, numlock_mask;
|
garbeam@7
|
50 extern char *bartext, tag[256];
|
garbeam@3
|
51
|
garbeam@3
|
52 extern Brush brush;
|
garbeam@7
|
53 extern Client *client;
|
garbeam@3
|
54
|
garbeam@5
|
55 /* bar.c */
|
garbeam@5
|
56 extern void draw_bar();
|
garbeam@5
|
57
|
garbeam@5
|
58 /* client.c */
|
garbeam@5
|
59 extern Client *create_client(Window w, XWindowAttributes *wa);
|
garbeam@5
|
60 extern void manage(Client *c);
|
garbeam@5
|
61
|
garbeam@0
|
62 /* wm.c */
|
garbeam@5
|
63 extern int win_proto(Window w);
|