dwm-meillo
view dwm.h @ 126:1489f6b97714
added yet another CUTOMIZE tag
author | arg@10ksloc.org |
---|---|
date | Thu, 20 Jul 2006 15:40:41 +0200 |
parents | 75576e44c1d8 |
children | 1480e19f6377 |
line source
1 /*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
6 #include <X11/Xlib.h>
8 /* CUSTOMIZE */
10 #define FONT "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
11 #define BGCOLOR "#0a2c2d"
12 #define FGCOLOR "#ddeeee"
13 #define BORDERCOLOR "#176164"
14 #define MODKEY Mod1Mask /* Mod4Mask */
15 /*
16 #define BGCOLOR "#666699"
17 #define FGCOLOR "#eeeeee"
18 #define BORDERCOLOR "#9999CC"
19 */
20 #define MASTERW 52 /* percent */
21 #define WM_PROTOCOL_DELWIN 1
23 /* tags */
24 enum { Tscratch, Tdev, Twww, Twork, TLast };
26 /* END CUSTOMIZE */
28 typedef union Arg Arg;
29 typedef struct Client Client;
30 typedef enum Corner Corner;
31 typedef struct DC DC;
32 typedef struct Fnt Fnt;
34 union Arg {
35 const char **argv;
36 int i;
37 };
39 /* atoms */
40 enum { NetSupported, NetWMName, NetLast };
41 enum { WMProtocols, WMDelete, WMLast };
43 /* cursor */
44 enum { CurNormal, CurResize, CurMove, CurLast };
46 enum Corner { TopLeft, TopRight, BotLeft, BotRight };
48 struct Fnt {
49 int ascent;
50 int descent;
51 int height;
52 XFontSet set;
53 XFontStruct *xfont;
54 };
56 struct DC { /* draw context */
57 int x, y, w, h;
58 unsigned long bg;
59 unsigned long fg;
60 unsigned long border;
61 Drawable drawable;
62 Fnt font;
63 GC gc;
64 };
66 struct Client {
67 char name[256];
68 char *tags[TLast];
69 int proto;
70 int x, y, w, h;
71 int tx, ty, tw, th; /* title */
72 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
73 int grav;
74 unsigned int border;
75 long flags;
76 Bool isfloat;
77 Bool ismax;
78 Client *next;
79 Client *revert;
80 Window win;
81 Window title;
82 };
84 extern char *tags[TLast], stext[1024];
85 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
86 extern void (*handler[LASTEvent])(XEvent *);
87 extern void (*arrange)(Arg *);
88 extern Atom wmatom[WMLast], netatom[NetLast];
89 extern Bool running, issel;
90 extern Client *clients, *sel;
91 extern Cursor cursor[CurLast];
92 extern DC dc;
93 extern Display *dpy;
94 extern Window root, barwin;
96 /* client.c */
97 extern void ban(Client *c);
98 extern void focus(Client *c);
99 extern void focusnext(Arg *arg);
100 extern void focusprev(Arg *arg);
101 extern Client *getclient(Window w);
102 extern Client *getctitle(Window w);
103 extern void gravitate(Client *c, Bool invert);
104 extern void higher(Client *c);
105 extern void killclient(Arg *arg);
106 extern void lower(Client *c);
107 extern void manage(Window w, XWindowAttributes *wa);
108 extern void pop(Client *c);
109 extern void resize(Client *c, Bool inc, Corner sticky);
110 extern void setsize(Client *c);
111 extern void settitle(Client *c);
112 extern void togglemax(Arg *arg);
113 extern void unmanage(Client *c);
114 extern void zoom(Arg *arg);
116 /* draw.c */
117 extern void drawall();
118 extern void drawstatus();
119 extern void drawtitle(Client *c);
120 extern unsigned long getcolor(const char *colstr);
121 extern void setfont(const char *fontstr);
122 extern unsigned int textw(char *text);
124 /* event.c */
125 extern void grabkeys();
127 /* main.c */
128 extern int getproto(Window w);
129 extern void quit(Arg *arg);
130 extern void sendevent(Window w, Atom a, long value);
131 extern int xerror(Display *dsply, XErrorEvent *ee);
133 /* tag.c */
134 extern void appendtag(Arg *arg);
135 extern void dofloat(Arg *arg);
136 extern void dotile(Arg *arg);
137 extern Client *getnext(Client *c, unsigned int t);
138 extern void heretag(Arg *arg);
139 extern void replacetag(Arg *arg);
140 extern void settags(Client *c);
141 extern void togglemode(Arg *arg);
142 extern void view(Arg *arg);
144 /* util.c */
145 extern void *emallocz(unsigned int size);
146 extern void eprint(const char *errstr, ...);
147 extern void spawn(Arg *arg);