comparison draw.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 e5018cae273f
children
comparison
equal deleted inserted replaced
25:e238dc4844d7 26:e8f627998d6f
18 }; 18 };
19 19
20 struct Brush { 20 struct Brush {
21 GC gc; 21 GC gc;
22 Drawable drawable; 22 Drawable drawable;
23 XRectangle rect; 23 int x, y, w, h;
24 Fnt font; 24 Fnt font;
25 unsigned long bg; 25 unsigned long bg;
26 unsigned long fg; 26 unsigned long fg;
27 unsigned long border; 27 unsigned long border;
28 }; 28 };
29 29
30 extern void draw(Display *dpy, Brush *b, Bool border, const char *text); 30 extern void draw(Display *dpy, Brush *b, Bool border, const char *text);
31 extern void loadcolors(Display *dpy, int screen, Brush *b, 31 extern void loadcolors(Display *dpy, int screen, Brush *b,
32 const char *bg, const char *fg, const char *bo); 32 const char *bg, const char *fg, const char *bo);
33 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr); 33 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);
34 extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len); 34 extern unsigned int textnw(Fnt *font, char *text, unsigned int len);
35 extern unsigned int textwidth(Fnt *font, char *text); 35 extern unsigned int textw(Fnt *font, char *text);
36 extern unsigned int labelheight(Fnt *font); 36 extern unsigned int texth(Fnt *font);