all repos — dwm @ 3a69c5173cdd24959410870bec2a10a76272e034

fork of suckless dynamic window manager

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 Tag Tag;
24
25struct Client {
26	Tag *tag;
27	char name[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 Tag {
41	char name[256];
42	Client *stack;
43	XRectangle r;
44	Tag *next;
45	Tag *cnext;
46};
47
48extern Display *dpy;
49extern Window root, barwin;
50extern Atom wm_atom[WMLast], net_atom[NetLast];
51extern Cursor cursor[CurLast];
52extern XRectangle rect, barrect;
53extern Bool running;
54extern void (*handler[LASTEvent]) (XEvent *);
55
56extern int screen, sel_screen;
57extern unsigned int lock_mask, numlock_mask;
58extern char *bartext;
59
60extern Brush brush;
61
62/* bar.c */
63extern void draw_bar();
64
65/* client.c */
66extern Client *create_client(Window w, XWindowAttributes *wa);
67extern void manage(Client *c);
68
69/* wm.c */
70extern int win_proto(Window w);