summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:40:22 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-03-31 21:40:22 +0000
commit2c5c3924c53bcf9d8685dff07904a8cbee8ed070 (patch)
tree2dadfa8b30605160f1de5c2004c059c5c31def85 /usr.bin/tmux/tmux.h
parent81afb95692ba9a0f41cf0644d854e921ba57625f (diff)
Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index a9706b8fdee..f088f5f0b5c 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.442 2014/03/31 21:39:59 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.443 2014/03/31 21:40:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1128,18 +1128,26 @@ struct tty_term {
};
LIST_HEAD(tty_terms, tty_term);
+/* Mouse button masks. */
+#define MOUSE_MASK_BUTTONS 3
+#define MOUSE_MASK_SHIFT 4
+#define MOUSE_MASK_META 8
+#define MOUSE_MASK_CTRL 16
+#define MOUSE_MASK_DRAG 32
+#define MOUSE_MASK_WHEEL 64
+
/* Mouse wheel states. */
#define MOUSE_WHEEL_UP 0
#define MOUSE_WHEEL_DOWN 1
-/* Mouse events. */
+/* Mouse event bits. */
#define MOUSE_EVENT_DOWN 0x1
#define MOUSE_EVENT_DRAG 0x2
#define MOUSE_EVENT_UP 0x4
#define MOUSE_EVENT_CLICK 0x8
#define MOUSE_EVENT_WHEEL 0x10
-/* Mouse flags. */
+/* Mouse flag bits. */
#define MOUSE_RESIZE_PANE 0x1
/*