dwm-meillo

annotate 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
rev   line source
garbeam@0 1 /*
garbeam@0 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
garbeam@0 3 * See LICENSE file for license details.
garbeam@0 4 */
garbeam@0 5
garbeam@3 6 #include "config.h"
garbeam@2 7 #include "draw.h"
garbeam@2 8 #include "util.h"
garbeam@2 9
garbeam@0 10 #include <X11/Xutil.h>
garbeam@0 11
garbeam@13 12 #define WM_PROTOCOL_DELWIN 1
garbeam@13 13
garbeam@18 14 typedef struct Client Client;
garbeam@18 15 typedef struct Key Key;
garbeam@18 16
garbeam@5 17 /* atoms */
garbeam@13 18 enum { WMProtocols, WMDelete, WMLast };
garbeam@0 19 enum { NetSupported, NetWMName, NetLast };
garbeam@0 20
garbeam@5 21 /* cursor */
garbeam@0 22 enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
garbeam@0 23
garbeam@0 24 struct Client {
garbeam@20 25 char name[256], tag[256];
garbeam@13 26 int proto;
garbeam@20 27 int x, y, w, h;
garbeam@22 28 int tx, ty, tw, th;
garbeam@20 29 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
garbeam@29 30 int grav;
garbeam@29 31 unsigned int border;
garbeam@20 32 long flags;
garbeam@0 33 Window win;
garbeam@0 34 Window trans;
garbeam@0 35 Window title;
garbeam@0 36 Client *next;
garbeam@5 37 Client *snext;
garbeam@0 38 };
garbeam@0 39
garbeam@8 40 struct Key {
garbeam@8 41 unsigned long mod;
garbeam@8 42 KeySym keysym;
garbeam@14 43 void (*func)(void *aux);
garbeam@14 44 void *aux;
garbeam@8 45 };
garbeam@8 46
garbeam@0 47 extern Display *dpy;
garbeam@5 48 extern Window root, barwin;
garbeam@13 49 extern Atom wm_atom[WMLast], net_atom[NetLast];
garbeam@0 50 extern Cursor cursor[CurLast];
garbeam@13 51 extern Bool running, sel_screen, grid;
garbeam@5 52 extern void (*handler[LASTEvent]) (XEvent *);
garbeam@0 53
garbeam@26 54 extern int screen, sx, sy, sw, sh, bx, by, bw, bh;
garbeam@16 55 extern char statustext[1024], tag[256];
garbeam@3 56
garbeam@3 57 extern Brush brush;
garbeam@13 58 extern Client *clients, *stack;
garbeam@3 59
garbeam@5 60 /* bar.c */
garbeam@5 61 extern void draw_bar();
garbeam@5 62
garbeam@5 63 /* client.c */
garbeam@10 64 extern void manage(Window w, XWindowAttributes *wa);
garbeam@13 65 extern void unmanage(Client *c);
garbeam@13 66 extern Client *getclient(Window w);
garbeam@13 67 extern void focus(Client *c);
garbeam@13 68 extern void update_name(Client *c);
garbeam@16 69 extern void draw_client(Client *c);
garbeam@18 70 extern void resize(Client *c);
garbeam@20 71 extern void update_size(Client *c);
garbeam@23 72 extern Client *gettitle(Window w);
garbeam@26 73 extern void raise(Client *c);
garbeam@26 74 extern void lower(Client *c);
garbeam@27 75 extern void kill(void *aux);
garbeam@27 76 extern void sel(void *aux);
garbeam@28 77 extern void max(void *aux);
garbeam@29 78 extern void arrange(void *aux);
garbeam@29 79 extern void gravitate(Client *c, Bool invert);
garbeam@13 80
garbeam@13 81 /* event.c */
garbeam@26 82 extern void discard_events(long even_mask);
garbeam@5 83
garbeam@8 84 /* key.c */
garbeam@8 85 extern void update_keys();
garbeam@9 86 extern void keypress(XEvent *e);
garbeam@8 87
garbeam@18 88 /* mouse.c */
garbeam@18 89 extern void mresize(Client *c);
garbeam@18 90 extern void mmove(Client *c);
garbeam@18 91
garbeam@0 92 /* wm.c */
garbeam@10 93 extern int error_handler(Display *dpy, XErrorEvent *error);
garbeam@13 94 extern void send_message(Window w, Atom a, long value);
garbeam@13 95 extern int win_proto(Window w);
garbeam@27 96 extern void run(void *aux);
garbeam@27 97 extern void quit(void *aux);