dwm-meillo

view wm.h @ 14:5c078b66347b

added bar event timer
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 11 Jul 2006 18:15:11 +0200
parents 5cc5e55a132d
children 359b6e563b95
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)(void *aux);
46 void *aux;
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(void *aux);
68 extern void quit(void *aux);
69 extern void kill(void *aux);
71 /* client.c */
72 extern void manage(Window w, XWindowAttributes *wa);
73 extern void unmanage(Client *c);
74 extern Client *getclient(Window w);
75 extern void focus(Client *c);
76 extern void update_name(Client *c);
78 /* event.c */
79 extern unsigned int flush_events(long even_mask);
81 /* key.c */
82 extern void update_keys();
83 extern void keypress(XEvent *e);
85 /* wm.c */
86 extern int error_handler(Display *dpy, XErrorEvent *error);
87 extern void send_message(Window w, Atom a, long value);
88 extern int win_proto(Window w);