wm.h (view raw)
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 */
13enum { WMState, WMProtocols, WMDelete, WMLast };
14enum { NetSupported, NetWMName, NetLast };
15
16/* cursor */
17enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
18
19/* rects */
20enum { RFloat, RGrid, RLast };
21
22typedef struct Client Client;
23typedef struct Key Key;
24
25struct Client {
26 char name[256];
27 char tag[256];
28 int proto;
29 unsigned int border;
30 Bool fixedsize;
31 Window win;
32 Window trans;
33 Window title;
34 XSizeHints size;
35 XRectangle r[RLast];
36 Client *next;
37 Client *snext;
38};
39
40struct Key {
41 unsigned long mod;
42 KeySym keysym;
43 void (*func)(char *arg);
44 char *arg;
45};
46
47extern Display *dpy;
48extern Window root, barwin;
49extern Atom wm_atom[WMLast], net_atom[NetLast];
50extern Cursor cursor[CurLast];
51extern XRectangle rect, barrect;
52extern Bool running;
53extern Bool grid;
54extern void (*handler[LASTEvent]) (XEvent *);
55
56extern int screen, sel_screen;
57extern char *bartext, tag[256];
58
59extern Brush brush;
60extern Client *client;
61
62/* bar.c */
63extern void draw_bar();
64
65/* cmd.c */
66extern void run(char *arg);
67
68/* client.c */
69extern Client *create_client(Window w, XWindowAttributes *wa);
70extern void manage(Client *c);
71
72/* key.c */
73extern void update_keys();
74
75/* wm.c */
76extern int win_proto(Window w);