aewl
view wm.h @ 19:b5510d0c6d43
added basic mouse support (actually we don't need more)
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 11 Jul 2006 21:41:49 +0200 |
parents | 1efa34c6e1b6 |
children | 4560e0882c1d |
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 /* rects */
25 enum { RFloat, RGrid, RLast };
27 struct Client {
28 char name[256];
29 char tag[256];
30 int proto;
31 Bool fixedsize;
32 Window win;
33 Window trans;
34 Window title;
35 XSizeHints size;
36 XRectangle r[RLast];
37 Client *next;
38 Client *snext;
39 };
41 struct Key {
42 unsigned long mod;
43 KeySym keysym;
44 void (*func)(void *aux);
45 void *aux;
46 };
48 extern Display *dpy;
49 extern Window root, barwin;
50 extern Atom wm_atom[WMLast], net_atom[NetLast];
51 extern Cursor cursor[CurLast];
52 extern XRectangle rect, barrect;
53 extern Bool running, sel_screen, grid;
54 extern void (*handler[LASTEvent]) (XEvent *);
56 extern int screen;
57 extern char statustext[1024], tag[256];
59 extern Brush brush;
60 extern Client *clients, *stack;
62 /* bar.c */
63 extern void draw_bar();
65 /* cmd.c */
66 extern void run(void *aux);
67 extern void quit(void *aux);
68 extern void kill(void *aux);
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);
76 extern void draw_client(Client *c);
77 extern void resize(Client *c);
79 /* event.c */
80 extern unsigned int discard_events(long even_mask);
82 /* key.c */
83 extern void update_keys();
84 extern void keypress(XEvent *e);
86 /* mouse.c */
87 extern void mresize(Client *c);
88 extern void mmove(Client *c);
90 /* wm.c */
91 extern int error_handler(Display *dpy, XErrorEvent *error);
92 extern void send_message(Window w, Atom a, long value);
93 extern int win_proto(Window w);