dmenu for lunch applications in dwm
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.

30 lines
830 B

  1. #include <X11/Xlib.h>
  2. #include <draw.h>
  3. #include "config.h"
  4. /* macros */
  5. #define INRECT(X,Y,RX,RY,RW,RH) ((X) >= (RX) && (X) < (RX) + (RW) && (Y) >= (RY) && (Y) < (RY) + (RH))
  6. #define MIN(a, b) ((a) < (b) ? (a) : (b))
  7. #define MAX(a, b) ((a) > (b) ? (a) : (b))
  8. #define IS_UTF8_1ST_CHAR(c) ((((c) & 0xc0) == 0xc0) || !((c) & 0x80))
  9. /* forward declarations */
  10. void drawbar(void);
  11. void grabkeyboard(void);
  12. void kpress(XKeyEvent *e);
  13. void run(void);
  14. void setup(unsigned int lines);
  15. /* variables */
  16. extern char *prompt;
  17. extern char text[4096];
  18. extern int promptw;
  19. extern int screen;
  20. extern unsigned int numlockmask;
  21. extern unsigned int mw, mh;
  22. extern unsigned long normcol[ColLast];
  23. extern unsigned long selcol[ColLast];
  24. extern Bool topbar;
  25. extern DC dc;
  26. extern Display *dpy;
  27. extern Window win, root;