dwm-meillo
view wm.h @ 29:8ad86d0a6a53
added gravity stuff
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Wed, 12 Jul 2006 17:17:15 +0200 |
parents | 3dceb132082d |
children | 386649deb651 |
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 tx, ty, tw, th;
29 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
30 int grav;
31 unsigned int border;
32 long flags;
33 Window win;
34 Window trans;
35 Window title;
36 Client *next;
37 Client *snext;
38 };
40 struct Key {
41 unsigned long mod;
42 KeySym keysym;
43 void (*func)(void *aux);
44 void *aux;
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 Bool running, sel_screen, grid;
52 extern void (*handler[LASTEvent]) (XEvent *);
54 extern int screen, sx, sy, sw, sh, bx, by, bw, bh;
55 extern char statustext[1024], tag[256];
57 extern Brush brush;
58 extern Client *clients, *stack;
60 /* bar.c */
61 extern void draw_bar();
63 /* client.c */
64 extern void manage(Window w, XWindowAttributes *wa);
65 extern void unmanage(Client *c);
66 extern Client *getclient(Window w);
67 extern void focus(Client *c);
68 extern void update_name(Client *c);
69 extern void draw_client(Client *c);
70 extern void resize(Client *c);
71 extern void update_size(Client *c);
72 extern Client *gettitle(Window w);
73 extern void raise(Client *c);
74 extern void lower(Client *c);
75 extern void kill(void *aux);
76 extern void sel(void *aux);
77 extern void max(void *aux);
78 extern void arrange(void *aux);
79 extern void gravitate(Client *c, Bool invert);
81 /* event.c */
82 extern void discard_events(long even_mask);
84 /* key.c */
85 extern void update_keys();
86 extern void keypress(XEvent *e);
88 /* mouse.c */
89 extern void mresize(Client *c);
90 extern void mmove(Client *c);
92 /* wm.c */
93 extern int error_handler(Display *dpy, XErrorEvent *error);
94 extern void send_message(Window w, Atom a, long value);
95 extern int win_proto(Window w);
96 extern void run(void *aux);
97 extern void quit(void *aux);