aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authornicm <nicm>2014-03-31 21:40:21 +0000
committernicm <nicm>2014-03-31 21:40:21 +0000
commit46593e7aa26b83f0ba1b0d36a700d7158ac2b178 (patch)
treec810f8171fc213840522e026d459e1299b4eadaf /tmux.h
parentfcdae6925a08dc06860f9552ba7a300669f4a038 (diff)
downloadrtmux-46593e7aa26b83f0ba1b0d36a700d7158ac2b178.tar.gz
rtmux-46593e7aa26b83f0ba1b0d36a700d7158ac2b178.tar.bz2
rtmux-46593e7aa26b83f0ba1b0d36a700d7158ac2b178.zip
Add names for mouse button bits rather than using magic numbers, from
Marcel Partap.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/tmux.h b/tmux.h
index b7d53727..94eb5b8f 100644
--- a/tmux.h
+++ b/tmux.h
@@ -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
/*