Mercurial > dwm-meillo
annotate wm.h @ 16:359b6e563b95
several changes, new stuff
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 11 Jul 2006 18:53:41 +0200 |
parents | 5c078b66347b |
children | 1efa34c6e1b6 |
rev | line source |
---|---|
0 | 1 /* |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | |
3 * See LICENSE file for license details. | |
4 */ | |
5 | |
3
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
6 #include "config.h" |
2 | 7 #include "draw.h" |
8 #include "util.h" | |
9 | |
0 | 10 #include <X11/Xutil.h> |
11 | |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
12 #define WM_PROTOCOL_DELWIN 1 |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
13 |
5 | 14 /* atoms */ |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
15 enum { WMProtocols, WMDelete, WMLast }; |
0 | 16 enum { NetSupported, NetWMName, NetLast }; |
17 | |
5 | 18 /* cursor */ |
0 | 19 enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; |
20 | |
5 | 21 /* rects */ |
0 | 22 enum { RFloat, RGrid, RLast }; |
23 | |
24 typedef struct Client Client; | |
8 | 25 typedef struct Key Key; |
0 | 26 |
27 struct Client { | |
28 char name[256]; | |
7 | 29 char tag[256]; |
5 | 30 unsigned int border; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
31 int proto; |
5 | 32 Bool fixedsize; |
0 | 33 Window win; |
34 Window trans; | |
35 Window title; | |
36 XSizeHints size; | |
37 XRectangle r[RLast]; | |
38 Client *next; | |
5 | 39 Client *snext; |
0 | 40 }; |
41 | |
8 | 42 struct Key { |
43 unsigned long mod; | |
44 KeySym keysym; | |
14 | 45 void (*func)(void *aux); |
46 void *aux; | |
8 | 47 }; |
48 | |
0 | 49 extern Display *dpy; |
5 | 50 extern Window root, barwin; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
51 extern Atom wm_atom[WMLast], net_atom[NetLast]; |
0 | 52 extern Cursor cursor[CurLast]; |
5 | 53 extern XRectangle rect, barrect; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
54 extern Bool running, sel_screen, grid; |
5 | 55 extern void (*handler[LASTEvent]) (XEvent *); |
0 | 56 |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
57 extern int screen; |
16
359b6e563b95
several changes, new stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
14
diff
changeset
|
58 extern char statustext[1024], tag[256]; |
3
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
59 |
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
60 extern Brush brush; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
61 extern Client *clients, *stack; |
3
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
62 |
5 | 63 /* bar.c */ |
64 extern void draw_bar(); | |
65 | |
8 | 66 /* cmd.c */ |
14 | 67 extern void run(void *aux); |
68 extern void quit(void *aux); | |
69 extern void kill(void *aux); | |
8 | 70 |
5 | 71 /* client.c */ |
10
703255003abb
changed how manage client works
Anselm R. Garbe <garbeam@wmii.de>
parents:
9
diff
changeset
|
72 extern void manage(Window w, XWindowAttributes *wa); |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
73 extern void unmanage(Client *c); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
74 extern Client *getclient(Window w); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
75 extern void focus(Client *c); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
76 extern void update_name(Client *c); |
16
359b6e563b95
several changes, new stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
14
diff
changeset
|
77 extern void draw_client(Client *c); |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
78 |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
79 /* event.c */ |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
80 extern unsigned int flush_events(long even_mask); |
5 | 81 |
8 | 82 /* key.c */ |
83 extern void update_keys(); | |
9
d567f430a81d
fixed several stuff (gridwm gets better and better)
Anselm R. Garbe <garbeam@wmii.de>
parents:
8
diff
changeset
|
84 extern void keypress(XEvent *e); |
8 | 85 |
0 | 86 /* wm.c */ |
10
703255003abb
changed how manage client works
Anselm R. Garbe <garbeam@wmii.de>
parents:
9
diff
changeset
|
87 extern int error_handler(Display *dpy, XErrorEvent *error); |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
88 extern void send_message(Window w, Atom a, long value); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
89 extern int win_proto(Window w); |