dwm-meillo

annotate wm.h @ 31:386649deb651

before leaning things up
author Anselm R. Garbe <garbeam@wmii.de>
date Thu, 13 Jul 2006 01:04:38 +0200
parents 8ad86d0a6a53
children 082c75b937b5
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@31 25 char name[256];
garbeam@31 26 char *tags[TLast];
garbeam@13 27 int proto;
garbeam@20 28 int x, y, w, h;
garbeam@22 29 int tx, ty, tw, th;
garbeam@20 30 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
garbeam@29 31 int grav;
garbeam@29 32 unsigned int border;
garbeam@20 33 long flags;
garbeam@0 34 Window win;
garbeam@0 35 Window trans;
garbeam@0 36 Window title;
garbeam@0 37 Client *next;
garbeam@5 38 Client *snext;
garbeam@0 39 };
garbeam@0 40
garbeam@8 41 struct Key {
garbeam@8 42 unsigned long mod;
garbeam@8 43 KeySym keysym;
garbeam@14 44 void (*func)(void *aux);
garbeam@14 45 void *aux;
garbeam@8 46 };
garbeam@8 47
garbeam@0 48 extern Display *dpy;
garbeam@5 49 extern Window root, barwin;
garbeam@13 50 extern Atom wm_atom[WMLast], net_atom[NetLast];
garbeam@0 51 extern Cursor cursor[CurLast];
garbeam@31 52 extern Bool running, issel;
garbeam@5 53 extern void (*handler[LASTEvent]) (XEvent *);
garbeam@31 54 extern void (*arrange)(void *aux);
garbeam@0 55
garbeam@31 56 extern int tsel, screen, sx, sy, sw, sh, bx, by, bw, bh;
garbeam@31 57 extern char stext[1024], *tags[TLast];
garbeam@3 58
garbeam@3 59 extern Brush brush;
garbeam@13 60 extern Client *clients, *stack;
garbeam@3 61
garbeam@5 62 /* bar.c */
garbeam@5 63 extern void draw_bar();
garbeam@5 64
garbeam@5 65 /* client.c */
garbeam@10 66 extern void manage(Window w, XWindowAttributes *wa);
garbeam@13 67 extern void unmanage(Client *c);
garbeam@13 68 extern Client *getclient(Window w);
garbeam@13 69 extern void focus(Client *c);
garbeam@13 70 extern void update_name(Client *c);
garbeam@16 71 extern void draw_client(Client *c);
garbeam@18 72 extern void resize(Client *c);
garbeam@20 73 extern void update_size(Client *c);
garbeam@23 74 extern Client *gettitle(Window w);
garbeam@26 75 extern void raise(Client *c);
garbeam@26 76 extern void lower(Client *c);
garbeam@27 77 extern void kill(void *aux);
garbeam@27 78 extern void sel(void *aux);
garbeam@28 79 extern void max(void *aux);
garbeam@31 80 extern void floating(void *aux);
garbeam@31 81 extern void grid(void *aux);
garbeam@29 82 extern void gravitate(Client *c, Bool invert);
garbeam@13 83
garbeam@13 84 /* event.c */
garbeam@26 85 extern void discard_events(long even_mask);
garbeam@5 86
garbeam@8 87 /* key.c */
garbeam@8 88 extern void update_keys();
garbeam@9 89 extern void keypress(XEvent *e);
garbeam@8 90
garbeam@18 91 /* mouse.c */
garbeam@18 92 extern void mresize(Client *c);
garbeam@18 93 extern void mmove(Client *c);
garbeam@18 94
garbeam@0 95 /* wm.c */
garbeam@10 96 extern int error_handler(Display *dpy, XErrorEvent *error);
garbeam@13 97 extern void send_message(Window w, Atom a, long value);
garbeam@13 98 extern int win_proto(Window w);
garbeam@27 99 extern void run(void *aux);
garbeam@27 100 extern void quit(void *aux);