dwm-meillo
view wm.h @ 31:386649deb651
before leaning things up
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Thu, 13 Jul 2006 01:04:38 +0200 |
parents | 8ad86d0a6a53 |
children | 082c75b937b5 |
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 "config.h"
7 #include "draw.h"
8 #include "util.h"
10 #include <X11/Xutil.h>
12 #define WM_PROTOCOL_DELWIN 1
14 typedef struct Client Client;
15 typedef struct Key Key;
17 /* atoms */
18 enum { WMProtocols, WMDelete, WMLast };
19 enum { NetSupported, NetWMName, NetLast };
21 /* cursor */
22 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
24 struct Client {
25 char name[256];
26 char *tags[TLast];
27 int proto;
28 int x, y, w, h;
29 int tx, ty, tw, th;
30 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
31 int grav;
32 unsigned int border;
33 long flags;
34 Window win;
35 Window trans;
36 Window title;
37 Client *next;
38 Client *snext;
39 };
41 struct Key {
42 unsigned long mod;
43 KeySym keysym;
44 void (*func)(void *aux);
45 void *aux;
46 };
48 extern Display *dpy;
49 extern Window root, barwin;
50 extern Atom wm_atom[WMLast], net_atom[NetLast];
51 extern Cursor cursor[CurLast];
52 extern Bool running, issel;
53 extern void (*handler[LASTEvent]) (XEvent *);
54 extern void (*arrange)(void *aux);
56 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh;
57 extern char stext[1024], *tags[TLast];
59 extern Brush brush;
60 extern Client *clients, *stack;
62 /* bar.c */
63 extern void draw_bar();
65 /* client.c */
66 extern void manage(Window w, XWindowAttributes *wa);
67 extern void unmanage(Client *c);
68 extern Client *getclient(Window w);
69 extern void focus(Client *c);
70 extern void update_name(Client *c);
71 extern void draw_client(Client *c);
72 extern void resize(Client *c);
73 extern void update_size(Client *c);
74 extern Client *gettitle(Window w);
75 extern void raise(Client *c);
76 extern void lower(Client *c);
77 extern void kill(void *aux);
78 extern void sel(void *aux);
79 extern void max(void *aux);
80 extern void floating(void *aux);
81 extern void grid(void *aux);
82 extern void gravitate(Client *c, Bool invert);
84 /* event.c */
85 extern void discard_events(long even_mask);
87 /* key.c */
88 extern void update_keys();
89 extern void keypress(XEvent *e);
91 /* mouse.c */
92 extern void mresize(Client *c);
93 extern void mmove(Client *c);
95 /* wm.c */
96 extern int error_handler(Display *dpy, XErrorEvent *error);
97 extern void send_message(Window w, Atom a, long value);
98 extern int win_proto(Window w);
99 extern void run(void *aux);
100 extern void quit(void *aux);