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.
 
 
 
 
 
 

33 lines
748 B

  1. /* See LICENSE file for copyright and license details. */
  2. /* enums */
  3. enum { ColFG, ColBG, ColLast };
  4. /* typedefs */
  5. typedef struct {
  6. int x, y, w, h;
  7. Drawable drawable;
  8. Display *dpy;
  9. GC gc;
  10. struct {
  11. XFontStruct *xfont;
  12. XFontSet set;
  13. int ascent;
  14. int descent;
  15. int height;
  16. } font;
  17. } DC; /* draw context */
  18. /* forward declarations */
  19. void cleanupdraw(DC *dc);
  20. void setupdraw(DC *dc, Window w);
  21. void drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
  22. void eprint(const char *fmt, ...);
  23. unsigned long getcolor(DC *dc, const char *colstr);
  24. void initfont(DC *dc, const char *fontstr);
  25. int textnw(DC *dc, const char *text, unsigned int len);
  26. int textw(DC *dc, const char *text);
  27. /* variables */
  28. extern const char *progname;