aewl

view wm.h @ 13:5cc5e55a132d

added protocol killing stuff
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 16:14:22 +0200
parents 703255003abb
children 5c078b66347b
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 /* atoms */
15 enum { WMProtocols, WMDelete, WMLast };
16 enum { NetSupported, NetWMName, NetLast };
18 /* cursor */
19 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
21 /* rects */
22 enum { RFloat, RGrid, RLast };
24 typedef struct Client Client;
25 typedef struct Key Key;
27 struct Client {
28 char name[256];
29 char tag[256];
30 unsigned int border;
31 int proto;
32 Bool fixedsize;
33 Window win;
34 Window trans;
35 Window title;
36 XSizeHints size;
37 XRectangle r[RLast];
38 Client *next;
39 Client *snext;
40 };
42 struct Key {
43 unsigned long mod;
44 KeySym keysym;
45 void (*func)(char *arg);
46 char *arg;
47 };
49 extern Display *dpy;
50 extern Window root, barwin;
51 extern Atom wm_atom[WMLast], net_atom[NetLast];
52 extern Cursor cursor[CurLast];
53 extern XRectangle rect, barrect;
54 extern Bool running, sel_screen, grid;
55 extern void (*handler[LASTEvent]) (XEvent *);
57 extern int screen;
58 extern char *bartext, tag[256];
60 extern Brush brush;
61 extern Client *clients, *stack;
63 /* bar.c */
64 extern void draw_bar();
66 /* cmd.c */
67 extern void run(char *arg);
68 extern void quit(char *arg);
70 /* client.c */
71 extern void manage(Window w, XWindowAttributes *wa);
72 extern void unmanage(Client *c);
73 extern Client *getclient(Window w);
74 extern void focus(Client *c);
75 extern void update_name(Client *c);
77 /* event.c */
78 extern unsigned int flush_events(long even_mask);
80 /* key.c */
81 extern void update_keys();
82 extern void keypress(XEvent *e);
84 /* wm.c */
85 extern int error_handler(Display *dpy, XErrorEvent *error);
86 extern void send_message(Window w, Atom a, long value);
87 extern int win_proto(Window w);