dwm-meillo

annotate wm.h @ 26:e8f627998d6f

simplified several portions of code through replacing rect structs with x,y,h,w counterparts (much more readable)
author Anselm R. Garbe <garbeam@wmii.de>
date Wed, 12 Jul 2006 15:17:22 +0200
parents 95ffdfd0a819
children f96fb3fd8203
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@20 30 long flags;
garbeam@0 31 Window win;
garbeam@0 32 Window trans;
garbeam@0 33 Window title;
garbeam@0 34 Client *next;
garbeam@5 35 Client *snext;
garbeam@0 36 };
garbeam@0 37
garbeam@8 38 struct Key {
garbeam@8 39 unsigned long mod;
garbeam@8 40 KeySym keysym;
garbeam@14 41 void (*func)(void *aux);
garbeam@14 42 void *aux;
garbeam@8 43 };
garbeam@8 44
garbeam@0 45 extern Display *dpy;
garbeam@5 46 extern Window root, barwin;
garbeam@13 47 extern Atom wm_atom[WMLast], net_atom[NetLast];
garbeam@0 48 extern Cursor cursor[CurLast];
garbeam@13 49 extern Bool running, sel_screen, grid;
garbeam@5 50 extern void (*handler[LASTEvent]) (XEvent *);
garbeam@0 51
garbeam@26 52 extern int screen, sx, sy, sw, sh, bx, by, bw, bh;
garbeam@16 53 extern char statustext[1024], tag[256];
garbeam@3 54
garbeam@3 55 extern Brush brush;
garbeam@13 56 extern Client *clients, *stack;
garbeam@3 57
garbeam@5 58 /* bar.c */
garbeam@5 59 extern void draw_bar();
garbeam@5 60
garbeam@8 61 /* cmd.c */
garbeam@14 62 extern void run(void *aux);
garbeam@14 63 extern void quit(void *aux);
garbeam@14 64 extern void kill(void *aux);
garbeam@23 65 extern void sel(void *aux);
garbeam@8 66
garbeam@5 67 /* client.c */
garbeam@10 68 extern void manage(Window w, XWindowAttributes *wa);
garbeam@13 69 extern void unmanage(Client *c);
garbeam@13 70 extern Client *getclient(Window w);
garbeam@13 71 extern void focus(Client *c);
garbeam@13 72 extern void update_name(Client *c);
garbeam@16 73 extern void draw_client(Client *c);
garbeam@18 74 extern void resize(Client *c);
garbeam@20 75 extern void update_size(Client *c);
garbeam@23 76 extern Client *gettitle(Window w);
garbeam@26 77 extern void raise(Client *c);
garbeam@26 78 extern void lower(Client *c);
garbeam@13 79
garbeam@13 80 /* event.c */
garbeam@26 81 extern void discard_events(long even_mask);
garbeam@5 82
garbeam@8 83 /* key.c */
garbeam@8 84 extern void update_keys();
garbeam@9 85 extern void keypress(XEvent *e);
garbeam@8 86
garbeam@18 87 /* mouse.c */
garbeam@18 88 extern void mresize(Client *c);
garbeam@18 89 extern void mmove(Client *c);
garbeam@18 90
garbeam@0 91 /* wm.c */
garbeam@10 92 extern int error_handler(Display *dpy, XErrorEvent *error);
garbeam@13 93 extern void send_message(Window w, Atom a, long value);
garbeam@13 94 extern int win_proto(Window w);