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.
 
 
 
 
 
 

35 lines
807 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. unsigned long norm[ColLast];
  8. unsigned long sel[ColLast];
  9. Drawable drawable;
  10. Display *dpy;
  11. GC gc;
  12. struct {
  13. XFontStruct *xfont;
  14. XFontSet set;
  15. int ascent;
  16. int descent;
  17. int height;
  18. } font;
  19. } DC; /* draw context */
  20. /* forward declarations */
  21. void cleanupdraw(DC *dc);
  22. void setupdraw(DC *dc, Window w);
  23. void drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
  24. void eprint(const char *fmt, ...);
  25. unsigned long getcolor(DC *dc, const char *colstr);
  26. void initfont(DC *dc, const char *fontstr);
  27. int textnw(DC *dc, const char *text, unsigned int len);
  28. int textw(DC *dc, const char *text);
  29. /* variables */
  30. extern const char *progname;