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.
 
 
 
 
 
 

45 lines
980 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. extern Display *dpy;
  30. extern DC dc;
  31. extern int screen;
  32. extern unsigned int mw, mh;
  33. extern Window parent;
  34. /* style */
  35. extern const char *font;
  36. extern const char *normbgcolor;
  37. extern const char *normfgcolor;
  38. extern const char *selbgcolor;
  39. extern const char *selfgcolor;