dwm-meillo
view wm.h @ 8:7066ff2fe8bc
added key handling
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 11 Jul 2006 11:50:18 +0200 |
parents | 49e2fc9fb94f |
children | d567f430a81d |
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 /* atoms */
13 enum { WMState, WMProtocols, WMDelete, WMLast };
14 enum { NetSupported, NetWMName, NetLast };
16 /* cursor */
17 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
19 /* rects */
20 enum { RFloat, RGrid, RLast };
22 typedef struct Client Client;
23 typedef struct Key Key;
25 struct 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 };
40 struct Key {
41 unsigned long mod;
42 KeySym keysym;
43 void (*func)(char *arg);
44 char *arg;
45 };
47 extern Display *dpy;
48 extern Window root, barwin;
49 extern Atom wm_atom[WMLast], net_atom[NetLast];
50 extern Cursor cursor[CurLast];
51 extern XRectangle rect, barrect;
52 extern Bool running;
53 extern Bool grid;
54 extern void (*handler[LASTEvent]) (XEvent *);
56 extern int screen, sel_screen;
57 extern char *bartext, tag[256];
59 extern Brush brush;
60 extern Client *client;
62 /* bar.c */
63 extern void draw_bar();
65 /* cmd.c */
66 extern void run(char *arg);
68 /* client.c */
69 extern Client *create_client(Window w, XWindowAttributes *wa);
70 extern void manage(Client *c);
72 /* key.c */
73 extern void update_keys();
75 /* wm.c */
76 extern int win_proto(Window w);