dwm-meillo
annotate draw.h @ 31:386649deb651
before leaning things up
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Thu, 13 Jul 2006 01:04:38 +0200 |
parents | e5018cae273f |
children |
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@26 | 23 int x, y, w, h; |
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@26 | 34 extern unsigned int textnw(Fnt *font, char *text, unsigned int len); |
garbeam@26 | 35 extern unsigned int textw(Fnt *font, char *text); |
garbeam@26 | 36 extern unsigned int texth(Fnt *font); |