Mercurial > aewl
comparison 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 |
comparison
equal
deleted
inserted
replaced
2:a79188fe4a40 | 3:e969f3575b7a |
---|---|
1 /* | 1 /* |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
3 * See LICENSE file for license details. | 3 * See LICENSE file for license details. |
4 */ | 4 */ |
5 | 5 |
6 extern void error(char *errstr, ...); | 6 #include <X11/Xlib.h> |
7 #include <X11/Xlocale.h> | |
8 | |
9 typedef struct Brush Brush; | |
10 typedef struct Fnt Fnt; | |
11 | |
12 struct Fnt { | |
13 XFontStruct *xfont; | |
14 XFontSet set; | |
15 int ascent; | |
16 int descent; | |
17 int height; | |
18 }; | |
19 | |
20 struct Brush { | |
21 GC gc; | |
22 Drawable drawable; | |
23 XRectangle rect; | |
24 Fnt font; | |
25 unsigned long bg; | |
26 unsigned long fg; | |
27 unsigned long border; | |
28 }; | |
29 | |
30 extern void draw(Display *dpy, Brush *b, Bool border, const char *text); | |
31 extern void loadcolors(Display *dpy, int screen, Brush *b, | |
32 const char *bg, const char *fg, const char *bo); | |
33 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr); | |
34 extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len); | |
35 extern unsigned int textwidth(Fnt *font, char *text); |