JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed several stuff (gridwm gets better and better)
[dwm.git] / wm.h
1 /*
2  * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3  * See LICENSE file for license details.
4  */
5
6 #include "config.h"
7 #include "draw.h"
8 #include "util.h"
9
10 #include <X11/Xutil.h>
11
12 /* atoms */
13 enum { NetSupported, NetWMName, NetLast };
14
15 /* cursor */
16 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
17
18 /* rects */
19 enum { RFloat, RGrid, RLast };
20
21 typedef struct Client Client;
22 typedef struct Key Key;
23
24 struct Client {
25         char name[256];
26         char tag[256];
27         unsigned int border;
28         Bool fixedsize;
29         Window win;
30         Window trans;
31         Window title;
32         XSizeHints size;
33         XRectangle r[RLast];
34         Client *next;
35         Client *snext;
36 };
37
38 struct Key {
39         unsigned long mod;
40         KeySym keysym;
41         void (*func)(char *arg);
42         char *arg;
43 };
44
45 extern Display *dpy;
46 extern Window root, barwin;
47 extern Atom net_atom[NetLast];
48 extern Cursor cursor[CurLast];
49 extern XRectangle rect, barrect;
50 extern Bool running;
51 extern Bool grid;
52 extern void (*handler[LASTEvent]) (XEvent *);
53
54 extern int screen, sel_screen;
55 extern char *bartext, tag[256];
56
57 extern Brush brush;
58 extern Client *clients;
59
60 /* bar.c */
61 extern void draw_bar();
62
63 /* cmd.c */
64 extern void run(char *arg);
65 extern void quit(char *arg);
66
67 /* client.c */
68 extern Client *create_client(Window w, XWindowAttributes *wa);
69 extern void manage(Client *c);
70 extern Client * getclient(Window w);
71
72 /* key.c */
73 extern void update_keys();
74 extern void keypress(XEvent *e);
75
76 /* wm.c */