summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-10 18:35:39 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-10 18:35:39 +0200
commit8a34fa50f75f4d6d8af234ac0c4f6d40b988d700 (patch)
tree0c0a4b7ea57f506c524bb06955f12525ab4f2bb7 /util.h
parentadded gridmenu (diff)
downloaddwm-8a34fa50f75f4d6d8af234ac0c4f6d40b988d700.tar.gz
dwm-8a34fa50f75f4d6d8af234ac0c4f6d40b988d700.zip
added new stuff
Diffstat (limited to '')
-rw-r--r--util.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/util.h b/util.h
new file mode 100644
index 0000000..be296e8
--- /dev/null
+++ b/util.h
@@ -0,0 +1,41 @@
1/*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
4 */
5
6#include <X11/Xlib.h>
7#include <X11/Xlocale.h>
8
9typedef struct Brush Brush;
10typedef struct Color Color;
11typedef struct Fnt Fnt;
12
13struct Color {
14 unsigned long bg;
15 unsigned long fg;
16 unsigned long border;
17};
18
19struct Fnt {
20 XFontStruct *xfont;
21 XFontSet set;
22 int ascent;
23 int descent;
24};
25
26struct Brush {
27 GC gc;
28 Drawable drawable;
29 XRectangle rect;
30 Bool border;
31 Fnt *font;
32 Color color;
33 const char *text;
34};
35
36extern void draw(Display *dpy, Brush *b);
37extern void loadcolor(Display *dpy, int screen, Color *c,
38 const char *bg, const char *fg, const char *bo);
39extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len);
40extern unsigned int textwidth(Fnt *font, char *text);
41extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);