dwm-meillo
view util.h @ 2:a79188fe4a40
added new stuff
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Mon, 10 Jul 2006 18:35:39 +0200 |
parents | |
children | e969f3575b7a |
line source
1 /*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
6 #include <X11/Xlib.h>
7 #include <X11/Xlocale.h>
9 typedef struct Brush Brush;
10 typedef struct Color Color;
11 typedef struct Fnt Fnt;
13 struct Color {
14 unsigned long bg;
15 unsigned long fg;
16 unsigned long border;
17 };
19 struct Fnt {
20 XFontStruct *xfont;
21 XFontSet set;
22 int ascent;
23 int descent;
24 };
26 struct Brush {
27 GC gc;
28 Drawable drawable;
29 XRectangle rect;
30 Bool border;
31 Fnt *font;
32 Color color;
33 const char *text;
34 };
36 extern void draw(Display *dpy, Brush *b);
37 extern void loadcolor(Display *dpy, int screen, Color *c,
38 const char *bg, const char *fg, const char *bo);
39 extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len);
40 extern unsigned int textwidth(Fnt *font, char *text);
41 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);