35 const char **argv; |
35 const char **argv; |
36 int i; |
36 int i; |
37 }; |
37 }; |
38 |
38 |
39 /* atoms */ |
39 /* atoms */ |
|
40 enum { NetSupported, NetWMName, NetLast }; |
40 enum { WMProtocols, WMDelete, WMLast }; |
41 enum { WMProtocols, WMDelete, WMLast }; |
41 enum { NetSupported, NetWMName, NetLast }; |
|
42 |
42 |
43 /* cursor */ |
43 /* cursor */ |
44 enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; |
44 enum { CurNormal, CurResize, CurMove, CurLast }; |
45 |
45 |
46 struct Fnt { |
46 struct Fnt { |
47 XFontStruct *xfont; |
|
48 XFontSet set; |
|
49 int ascent; |
47 int ascent; |
50 int descent; |
48 int descent; |
51 int height; |
49 int height; |
|
50 XFontSet set; |
|
51 XFontStruct *xfont; |
52 }; |
52 }; |
53 |
53 |
54 struct DC { /* draw context */ |
54 struct DC { /* draw context */ |
55 GC gc; |
|
56 Drawable drawable; |
|
57 int x, y, w, h; |
55 int x, y, w, h; |
58 Fnt font; |
|
59 unsigned long bg; |
56 unsigned long bg; |
60 unsigned long fg; |
57 unsigned long fg; |
61 unsigned long border; |
58 unsigned long border; |
|
59 Drawable drawable; |
|
60 Fnt font; |
|
61 GC gc; |
62 }; |
62 }; |
63 |
63 |
64 struct Client { |
64 struct Client { |
65 char name[256]; |
65 char name[256]; |
66 char *tags[TLast]; |
66 char *tags[TLast]; |
90 KeySym keysym; |
90 KeySym keysym; |
91 void (*func)(Arg *arg); |
91 void (*func)(Arg *arg); |
92 Arg arg; |
92 Arg arg; |
93 }; |
93 }; |
94 |
94 |
95 extern Display *dpy; |
95 extern char *tags[TLast], stext[1024]; |
96 extern Window root, barwin; |
96 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; |
97 extern Atom wmatom[WMLast], netatom[NetLast]; |
|
98 extern Cursor cursor[CurLast]; |
|
99 extern Bool running, issel; |
|
100 extern void (*handler[LASTEvent])(XEvent *); |
97 extern void (*handler[LASTEvent])(XEvent *); |
101 extern void (*arrange)(Arg *); |
98 extern void (*arrange)(Arg *); |
|
99 extern Atom wmatom[WMLast], netatom[NetLast]; |
|
100 extern Bool running, issel; |
|
101 extern Client *clients, *sel; |
|
102 extern Cursor cursor[CurLast]; |
|
103 extern DC dc; |
|
104 extern Display *dpy; |
102 extern Key key[]; |
105 extern Key key[]; |
103 |
106 extern Window root, barwin; |
104 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw; |
|
105 extern char *tags[TLast], stext[1024]; |
|
106 |
|
107 extern DC dc; |
|
108 extern Client *clients, *sel; |
|
109 |
107 |
110 /* client.c */ |
108 /* client.c */ |
111 extern void ban(Client *c); |
109 extern void ban(Client *c); |
112 extern void focus(Client *c); |
110 extern void focus(Client *c); |
113 extern void focusnext(Arg *arg); |
111 extern void focusnext(Arg *arg); |