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;
23
24struct Client {
25 char name[256];
26 char tag[256];
27 int proto;
28 unsigned int border;
29 Bool fixedsize;
30 Window win;
31 Window trans;
32 Window title;
33 XSizeHints size;
34 XRectangle r[RLast];
35 Client *next;
36 Client *snext;
37};
38
39extern Display *dpy;
40extern Window root, barwin;
41extern Atom wm_atom[WMLast], net_atom[NetLast];
42extern Cursor cursor[CurLast];
43extern XRectangle rect, barrect;
44extern Bool running;
45extern Bool grid;
46extern void (*handler[LASTEvent]) (XEvent *);
47
48extern int screen, sel_screen;
49extern unsigned int lock_mask, numlock_mask;
50extern char *bartext, tag[256];
51
52extern Brush brush;
53extern Client *client;
54
55/* bar.c */
56extern void draw_bar();
57
58/* client.c */
59extern Client *create_client(Window w, XWindowAttributes *wa);
60extern void manage(Client *c);
61
62/* wm.c */
63extern int win_proto(Window w);