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.
 
 
 
 
 
 

46 lines
934 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. GC gc;
  11. struct {
  12. XFontStruct *xfont;
  13. XFontSet set;
  14. int ascent;
  15. int descent;
  16. int height;
  17. } font;
  18. } DC; /* draw context */
  19. /* forward declarations */
  20. void drawcleanup(void);
  21. void drawsetup(void);
  22. void drawtext(const char *text, unsigned long col[ColLast]);
  23. void eprint(const char *errstr, ...);
  24. unsigned long getcolor(const char *colstr);
  25. void initfont(const char *fontstr);
  26. int textnw(const char *text, unsigned int len);
  27. int textw(const char *text);
  28. /* variables */
  29. Display *dpy;
  30. DC dc;
  31. int screen;
  32. unsigned int mw, mh;
  33. unsigned int spaceitem;
  34. Window parent;
  35. /* style */
  36. const char *font;
  37. const char *normbgcolor;
  38. const char *normfgcolor;
  39. const char *selbgcolor;
  40. const char *selfgcolor;