You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
850 B

19 years ago
  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include <X11/Xlib.h>
  6. #include <X11/Xlocale.h>
  7. typedef struct Brush Brush;
  8. typedef struct Fnt Fnt;
  9. struct Fnt {
  10. XFontStruct *xfont;
  11. XFontSet set;
  12. int ascent;
  13. int descent;
  14. int height;
  15. };
  16. struct Brush {
  17. GC gc;
  18. Drawable drawable;
  19. int x, y, w, h;
  20. Fnt font;
  21. unsigned long bg;
  22. unsigned long fg;
  23. unsigned long border;
  24. };
  25. extern void draw(Display *dpy, Brush *b, Bool border, const char *text);
  26. extern void loadcolors(Display *dpy, int screen, Brush *b,
  27. const char *bg, const char *fg, const char *bo);
  28. extern void loadfont(Display *dpy, Fnt *font, const char *fontstr);
  29. extern unsigned int textnw(Fnt *font, char *text, unsigned int len);
  30. extern unsigned int textw(Fnt *font, char *text);
  31. extern unsigned int texth(Fnt *font);