My dmenu build
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.
 
 
 
 
 
 

48 lines
939 B

  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include "config.h"
  6. #include <X11/Xlib.h>
  7. #include <X11/Xlocale.h>
  8. #define SPACE 30 /* px */
  9. typedef struct Brush Brush;
  10. typedef struct DC DC;
  11. typedef struct Fnt Fnt;
  12. struct Fnt {
  13. XFontStruct *xfont;
  14. XFontSet set;
  15. int ascent;
  16. int descent;
  17. int height;
  18. };
  19. struct DC { /* draw context */
  20. int x, y, w, h;
  21. unsigned long bg;
  22. unsigned long fg;
  23. unsigned long border;
  24. Drawable drawable;
  25. Fnt font;
  26. GC gc;
  27. };
  28. extern int screen;
  29. extern Display *dpy;
  30. extern DC dc;
  31. /* draw.c */
  32. extern void drawtext(const char *text, Bool invert, Bool border);
  33. extern unsigned long getcolor(const char *colstr);
  34. extern void setfont(const char *fontstr);
  35. extern unsigned int textw(const char *text);
  36. /* util.c */
  37. extern void *emalloc(unsigned int size);
  38. extern void eprint(const char *errstr, ...);
  39. extern char *estrdup(const char *str);