dwm-meillo

annotate 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
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@2 6 #include <X11/Xlib.h>
garbeam@2 7 #include <X11/Xlocale.h>
garbeam@2 8
garbeam@2 9 typedef struct Brush Brush;
garbeam@2 10 typedef struct Color Color;
garbeam@2 11 typedef struct Fnt Fnt;
garbeam@2 12
garbeam@2 13 struct Color {
garbeam@2 14 unsigned long bg;
garbeam@2 15 unsigned long fg;
garbeam@2 16 unsigned long border;
garbeam@2 17 };
garbeam@2 18
garbeam@2 19 struct Fnt {
garbeam@2 20 XFontStruct *xfont;
garbeam@2 21 XFontSet set;
garbeam@2 22 int ascent;
garbeam@2 23 int descent;
garbeam@2 24 };
garbeam@2 25
garbeam@2 26 struct Brush {
garbeam@2 27 GC gc;
garbeam@2 28 Drawable drawable;
garbeam@2 29 XRectangle rect;
garbeam@2 30 Bool border;
garbeam@2 31 Fnt *font;
garbeam@2 32 Color color;
garbeam@2 33 const char *text;
garbeam@2 34 };
garbeam@2 35
garbeam@2 36 extern void draw(Display *dpy, Brush *b);
garbeam@2 37 extern void loadcolor(Display *dpy, int screen, Color *c,
garbeam@2 38 const char *bg, const char *fg, const char *bo);
garbeam@2 39 extern unsigned int textwidth_l(Fnt *font, char *text, unsigned int len);
garbeam@2 40 extern unsigned int textwidth(Fnt *font, char *text);
garbeam@2 41 extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);