dwm-meillo
diff draw.h @ 3:e969f3575b7a
several new changes, made gridmenu working
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Mon, 10 Jul 2006 19:46:24 +0200 |
parents | a79188fe4a40 |
children | e5018cae273f |
line diff
1.1 --- a/draw.h Mon Jul 10 18:35:39 2006 +0200 1.2 +++ b/draw.h Mon Jul 10 19:46:24 2006 +0200 1.3 @@ -3,4 +3,33 @@ 1.4 * See LICENSE file for license details. 1.5 */ 1.6 1.7 -extern void error(char *errstr, ...); 1.8 +#include <X11/Xlib.h> 1.9 +#include <X11/Xlocale.h> 1.10 + 1.11 +typedef struct Brush Brush; 1.12 +typedef struct Fnt Fnt; 1.13 + 1.14 +struct Fnt { 1.15 + XFontStruct *xfont; 1.16 + XFontSet set; 1.17 + int ascent; 1.18 + int descent; 1.19 + int height; 1.20 +}; 1.21 + 1.22 +struct Brush { 1.23 + GC gc; 1.24 + Drawable drawable; 1.25 + XRectangle rect; 1.26 + Fnt font; 1.27 + unsigned long bg; 1.28 + unsigned long fg; 1.29 + unsigned long border; 1.30 +}; 1.31 + 1.32 +extern void draw(Display *dpy, Brush *b, Bool border, const char *text); 1.33 +extern void loadcolors(Display *dpy, int screen, Brush *b, 1.34 + const char *bg, const char *fg, const char *bo); 1.35 +extern void loadfont(Display *dpy, Fnt *font, const char *fontstr); 1.36 +extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len); 1.37 +extern unsigned int textwidth(Fnt *font, char *text);