dwm-meillo

annotate 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
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);