aewl

diff dwm.h @ 43:989178822938

changed default colors
author Anselm R. Garbe <garbeam@wmii.de>
date Thu, 13 Jul 2006 11:43:05 +0200
parents wm.h@040a7074d23c
children 58307ad56ec1
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dwm.h	Thu Jul 13 11:43:05 2006 +0200
     1.3 @@ -0,0 +1,136 @@
     1.4 +/*
     1.5 + * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
     1.6 + * See LICENSE file for license details.
     1.7 + */
     1.8 +
     1.9 +#include <X11/Xlib.h>
    1.10 +
    1.11 +/********** CUSTOMIZE **********/
    1.12 +
    1.13 +#define FONT		"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
    1.14 +#define BGCOLOR		"DarkSlateGrey"
    1.15 +#define FGCOLOR		"LightSteelBlue"
    1.16 +#define BORDERCOLOR	"SlateGray"
    1.17 +#define WM_PROTOCOL_DELWIN 1
    1.18 +
    1.19 +/* tags */
    1.20 +enum { Tscratch, Tdev, Tirc, Twww, Twork, TLast };
    1.21 +
    1.22 +/********** CUSTOMIZE **********/
    1.23 +
    1.24 +typedef struct DC DC;
    1.25 +typedef struct Client Client;
    1.26 +typedef struct Fnt Fnt;
    1.27 +typedef struct Key Key;
    1.28 +
    1.29 +/* atoms */
    1.30 +enum { WMProtocols, WMDelete, WMLast };
    1.31 +enum { NetSupported, NetWMName, NetLast };
    1.32 +
    1.33 +/* cursor */
    1.34 +enum { CurNormal, CurResize, CurMove, CurInput, CurLast };
    1.35 +
    1.36 +struct Fnt {
    1.37 +	XFontStruct *xfont;
    1.38 +	XFontSet set;
    1.39 +	int ascent;
    1.40 +	int descent;
    1.41 +	int height;
    1.42 +};
    1.43 +
    1.44 +struct DC { /* draw context */
    1.45 +	GC gc;
    1.46 +	Drawable drawable;
    1.47 +	int x, y, w, h;
    1.48 +	Fnt font;
    1.49 +	unsigned long bg;
    1.50 +	unsigned long fg;
    1.51 +	unsigned long border;
    1.52 +};
    1.53 +
    1.54 +struct Client {
    1.55 +	char name[256];
    1.56 +	char *tags[TLast];
    1.57 +	int proto;
    1.58 +	int x, y, w, h;
    1.59 +	int tx, ty, tw, th;
    1.60 +	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
    1.61 +	int grav;
    1.62 +	unsigned int border;
    1.63 +	long flags; 
    1.64 +	Window win;
    1.65 +	Window trans;
    1.66 +	Window title;
    1.67 +	Client *next;
    1.68 +	Client *snext;
    1.69 +};
    1.70 +
    1.71 +struct Key {
    1.72 +	unsigned long mod;
    1.73 +	KeySym keysym;
    1.74 +	void (*func)(void *aux);
    1.75 +	void *aux;
    1.76 +};
    1.77 +
    1.78 +extern Display *dpy;
    1.79 +extern Window root;
    1.80 +extern Atom wm_atom[WMLast], net_atom[NetLast];
    1.81 +extern Cursor cursor[CurLast];
    1.82 +extern Bool running, issel;
    1.83 +extern void (*handler[LASTEvent]) (XEvent *);
    1.84 +
    1.85 +extern int tsel, screen, sx, sy, sw, sh, th;
    1.86 +extern char stext[1024], *tags[TLast];
    1.87 +
    1.88 +extern DC dc;
    1.89 +extern Client *clients, *stack;
    1.90 +
    1.91 +/* client.c */
    1.92 +extern void manage(Window w, XWindowAttributes *wa);
    1.93 +extern void unmanage(Client *c);
    1.94 +extern Client *getclient(Window w);
    1.95 +extern void focus(Client *c);
    1.96 +extern void update_name(Client *c);
    1.97 +extern void draw_client(Client *c);
    1.98 +extern void resize(Client *c);
    1.99 +extern void update_size(Client *c);
   1.100 +extern Client *gettitle(Window w);
   1.101 +extern void craise(Client *c);
   1.102 +extern void lower(Client *c);
   1.103 +extern void ckill(void *aux);
   1.104 +extern void sel(void *aux);
   1.105 +extern void max(void *aux);
   1.106 +extern void toggle(void *aux);
   1.107 +extern void gravitate(Client *c, Bool invert);
   1.108 +
   1.109 +/* draw.c */
   1.110 +extern void draw(Bool border, const char *text);
   1.111 +extern unsigned long initcolor(const char *colstr);
   1.112 +extern void initfont(const char *fontstr);
   1.113 +extern unsigned int textnw(char *text, unsigned int len);
   1.114 +extern unsigned int textw(char *text);
   1.115 +extern unsigned int texth(void);
   1.116 +
   1.117 +/* event.c */
   1.118 +extern void discard_events(long even_mask);
   1.119 +
   1.120 +/* dev.c */
   1.121 +extern void update_keys(void);
   1.122 +extern void keypress(XEvent *e);
   1.123 +extern void mresize(Client *c);
   1.124 +extern void mmove(Client *c);
   1.125 +
   1.126 +/* main.c */
   1.127 +extern int error_handler(Display *dsply, XErrorEvent *e);
   1.128 +extern void send_message(Window w, Atom a, long value);
   1.129 +extern int win_proto(Window w);
   1.130 +extern void quit(void *aux);
   1.131 +
   1.132 +/* util.c */
   1.133 +extern void error(const char *errstr, ...);
   1.134 +extern void *emallocz(unsigned int size);
   1.135 +extern void *emalloc(unsigned int size);
   1.136 +extern void *erealloc(void *ptr, unsigned int size);
   1.137 +extern char *estrdup(const char *str);
   1.138 +extern void spawn(char *argv[]);
   1.139 +extern void swap(void **p1, void **p2);