aboutsummaryrefslogtreecommitdiffstats
path: root/dmenu.h
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2010-07-02 07:49:05 +0200
committerConnor Lane Smith <cls@lubutu.com>2010-07-02 07:49:05 +0200
commit855a56631916bdff1438e11c232b88450f973648 (patch)
treec7ed1e1ae2aac45b3e3980cfa36bc45b9580e39e /dmenu.h
parent29e8faed6cf4b296382439651cf04596d276f080 (diff)
downloaddmenu-855a56631916bdff1438e11c232b88450f973648.tar.zst
added dmenu.h, common.c
Diffstat (limited to 'dmenu.h')
-rw-r--r--dmenu.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/dmenu.h b/dmenu.h
new file mode 100644
index 0000000..4cc13f4
--- /dev/null
+++ b/dmenu.h
@@ -0,0 +1,30 @@
+#include <X11/Xlib.h>
+#include <draw.h>
+#include "config.h"
+
+/* macros */
+#define INRECT(X,Y,RX,RY,RW,RH) ((X) >= (RX) && (X) < (RX) + (RW) && (Y) >= (RY) && (Y) < (RY) + (RH))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define IS_UTF8_1ST_CHAR(c) ((((c) & 0xc0) == 0xc0) || !((c) & 0x80))
+
+/* forward declarations */
+void drawbar(void);
+void grabkeyboard(void);
+void kpress(XKeyEvent *e);
+void run(void);
+void setup(unsigned int lines);
+
+/* variables */
+extern char *prompt;
+extern char text[4096];
+extern int promptw;
+extern int screen;
+extern unsigned int numlockmask;
+extern unsigned int mw, mh;
+extern unsigned long normcol[ColLast];
+extern unsigned long selcol[ColLast];
+extern Bool topbar;
+extern DC dc;
+extern Display *dpy;
+extern Window win, root;