dwm-meillo

annotate draw.h @ 23:95ffdfd0a819

some more additions/fixes
author Anselm R. Garbe <garbeam@wmii.de>
date Wed, 12 Jul 2006 00:00:25 +0200
parents e969f3575b7a
children e8f627998d6f
rev   line source
garbeam@2 1 /*
garbeam@2 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
garbeam@2 3 * See LICENSE file for license details.
garbeam@2 4 */
garbeam@2 5
garbeam@3 6 #include <X11/Xlib.h>
garbeam@3 7 #include <X11/Xlocale.h>
garbeam@3 8
garbeam@3 9 typedef struct Brush Brush;
garbeam@3 10 typedef struct Fnt Fnt;
garbeam@3 11
garbeam@3 12 struct Fnt {
garbeam@3 13 XFontStruct *xfont;
garbeam@3 14 XFontSet set;
garbeam@3 15 int ascent;
garbeam@3 16 int descent;
garbeam@3 17 int height;
garbeam@3 18 };
garbeam@3 19
garbeam@3 20 struct Brush {
garbeam@3 21 GC gc;
garbeam@3 22 Drawable drawable;
garbeam@3 23 XRectangle rect;
garbeam@3 24 Fnt font;
garbeam@3 25 unsigned long bg;
garbeam@3 26 unsigned long fg;
garbeam@3 27 unsigned long border;
garbeam@3 28 };
garbeam@3 29
garbeam@3 30 extern void draw(Display *dpy, Brush *b, Bool border, const char *text);
garbeam@3 31 extern void loadcolors(Display *dpy, int screen, Brush *b,
garbeam@3 32 const char *bg, const char *fg, const char *bo);
garbeam@3 33 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);
garbeam@3 34 extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len);
garbeam@3 35 extern unsigned int textwidth(Fnt *font, char *text);
garbeam@5 36 extern unsigned int labelheight(Fnt *font);