dwm-meillo

view wm.h @ 20:4560e0882c1d

made code more readable
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 22:49:09 +0200
parents b5510d0c6d43
children bd3a44353916
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 typedef struct Client Client;
15 typedef struct Key Key;
17 /* atoms */
18 enum { WMProtocols, WMDelete, WMLast };
19 enum { NetSupported, NetWMName, NetLast };
21 /* cursor */
22 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
24 struct Client {
25 char name[256], tag[256];
26 int proto;
27 int x, y, w, h;
28 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
29 long flags;
30 Window win;
31 Window trans;
32 Window title;
33 Client *next;
34 Client *snext;
35 };
37 struct Key {
38 unsigned long mod;
39 KeySym keysym;
40 void (*func)(void *aux);
41 void *aux;
42 };
44 extern Display *dpy;
45 extern Window root, barwin;
46 extern Atom wm_atom[WMLast], net_atom[NetLast];
47 extern Cursor cursor[CurLast];
48 extern XRectangle rect, barrect;
49 extern Bool running, sel_screen, grid;
50 extern void (*handler[LASTEvent]) (XEvent *);
52 extern int screen;
53 extern char statustext[1024], tag[256];
55 extern Brush brush;
56 extern Client *clients, *stack;
58 /* bar.c */
59 extern void draw_bar();
61 /* cmd.c */
62 extern void run(void *aux);
63 extern void quit(void *aux);
64 extern void kill(void *aux);
66 /* client.c */
67 extern void manage(Window w, XWindowAttributes *wa);
68 extern void unmanage(Client *c);
69 extern Client *getclient(Window w);
70 extern void focus(Client *c);
71 extern void update_name(Client *c);
72 extern void draw_client(Client *c);
73 extern void resize(Client *c);
74 extern void update_size(Client *c);
76 /* event.c */
77 extern unsigned int discard_events(long even_mask);
79 /* key.c */
80 extern void update_keys();
81 extern void keypress(XEvent *e);
83 /* mouse.c */
84 extern void mresize(Client *c);
85 extern void mmove(Client *c);
87 /* wm.c */
88 extern int error_handler(Display *dpy, XErrorEvent *error);
89 extern void send_message(Window w, Atom a, long value);
90 extern int win_proto(Window w);