Mercurial > dwm-meillo
annotate wm.h @ 30:2e0fb4130bfb
new stuff, fixed several issues
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Wed, 12 Jul 2006 17:50:31 +0200 |
parents | 8ad86d0a6a53 |
children | 386649deb651 |
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 |
18
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
14 typedef struct Client Client; |
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
15 typedef struct Key Key; |
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
16 |
5 | 17 /* atoms */ |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
18 enum { WMProtocols, WMDelete, WMLast }; |
0 | 19 enum { NetSupported, NetWMName, NetLast }; |
20 | |
5 | 21 /* cursor */ |
0 | 22 enum { CurNormal, CurResize, CurMove, CurInput, CurLast }; |
23 | |
24 struct Client { | |
20 | 25 char name[256], tag[256]; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
26 int proto; |
20 | 27 int x, y, w, h; |
22
bd3a44353916
fixed several other stuff, coming closer to something useful
Anselm R. Garbe <garbeam@wmii.de>
parents:
20
diff
changeset
|
28 int tx, ty, tw, th; |
20 | 29 int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
29 | 30 int grav; |
31 unsigned int border; | |
20 | 32 long flags; |
0 | 33 Window win; |
34 Window trans; | |
35 Window title; | |
36 Client *next; | |
5 | 37 Client *snext; |
0 | 38 }; |
39 | |
8 | 40 struct Key { |
41 unsigned long mod; | |
42 KeySym keysym; | |
14 | 43 void (*func)(void *aux); |
44 void *aux; | |
8 | 45 }; |
46 | |
0 | 47 extern Display *dpy; |
5 | 48 extern Window root, barwin; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
49 extern Atom wm_atom[WMLast], net_atom[NetLast]; |
0 | 50 extern Cursor cursor[CurLast]; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
51 extern Bool running, sel_screen, grid; |
5 | 52 extern void (*handler[LASTEvent]) (XEvent *); |
0 | 53 |
26
e8f627998d6f
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Anselm R. Garbe <garbeam@wmii.de>
parents:
23
diff
changeset
|
54 extern int screen, sx, sy, sw, sh, bx, by, bw, bh; |
16
359b6e563b95
several changes, new stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
14
diff
changeset
|
55 extern char statustext[1024], tag[256]; |
3
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
56 |
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
57 extern Brush brush; |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
58 extern Client *clients, *stack; |
3
e969f3575b7a
several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents:
2
diff
changeset
|
59 |
5 | 60 /* bar.c */ |
61 extern void draw_bar(); | |
62 | |
63 /* client.c */ | |
10
703255003abb
changed how manage client works
Anselm R. Garbe <garbeam@wmii.de>
parents:
9
diff
changeset
|
64 extern void manage(Window w, XWindowAttributes *wa); |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
65 extern void unmanage(Client *c); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
66 extern Client *getclient(Window w); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
67 extern void focus(Client *c); |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
68 extern void update_name(Client *c); |
16
359b6e563b95
several changes, new stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
14
diff
changeset
|
69 extern void draw_client(Client *c); |
18
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
70 extern void resize(Client *c); |
20 | 71 extern void update_size(Client *c); |
23 | 72 extern Client *gettitle(Window w); |
26
e8f627998d6f
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Anselm R. Garbe <garbeam@wmii.de>
parents:
23
diff
changeset
|
73 extern void raise(Client *c); |
e8f627998d6f
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Anselm R. Garbe <garbeam@wmii.de>
parents:
23
diff
changeset
|
74 extern void lower(Client *c); |
27
f96fb3fd8203
added grid mode on Mod1Mask g
Anselm R. Garbe <garbeam@wmii.de>
parents:
26
diff
changeset
|
75 extern void kill(void *aux); |
f96fb3fd8203
added grid mode on Mod1Mask g
Anselm R. Garbe <garbeam@wmii.de>
parents:
26
diff
changeset
|
76 extern void sel(void *aux); |
28 | 77 extern void max(void *aux); |
29 | 78 extern void arrange(void *aux); |
79 extern void gravitate(Client *c, Bool invert); | |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
80 |
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
81 /* event.c */ |
26
e8f627998d6f
simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
Anselm R. Garbe <garbeam@wmii.de>
parents:
23
diff
changeset
|
82 extern void discard_events(long even_mask); |
5 | 83 |
8 | 84 /* key.c */ |
85 extern void update_keys(); | |
9
d567f430a81d
fixed several stuff (gridwm gets better and better)
Anselm R. Garbe <garbeam@wmii.de>
parents:
8
diff
changeset
|
86 extern void keypress(XEvent *e); |
8 | 87 |
18
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
88 /* mouse.c */ |
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
89 extern void mresize(Client *c); |
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
90 extern void mmove(Client *c); |
1efa34c6e1b6
added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents:
16
diff
changeset
|
91 |
0 | 92 /* wm.c */ |
10
703255003abb
changed how manage client works
Anselm R. Garbe <garbeam@wmii.de>
parents:
9
diff
changeset
|
93 extern int error_handler(Display *dpy, XErrorEvent *error); |
13
5cc5e55a132d
added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents:
10
diff
changeset
|
94 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
|
95 extern int win_proto(Window w); |
27
f96fb3fd8203
added grid mode on Mod1Mask g
Anselm R. Garbe <garbeam@wmii.de>
parents:
26
diff
changeset
|
96 extern void run(void *aux); |
f96fb3fd8203
added grid mode on Mod1Mask g
Anselm R. Garbe <garbeam@wmii.de>
parents:
26
diff
changeset
|
97 extern void quit(void *aux); |