about summary refs log tree commit diff stats
path: root/termbox
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-05 16:04:27 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-05 16:06:16 -0700
commitfb1f2a0a0e1a7f00f6e9f3d6c00609034594e0f8 (patch)
treeb53b0083a75c324ce336f76f7becd88df248b19f /termbox
parent10a3b8cca2bc7b2d5871577ba260ad75c65672b4 (diff)
downloadmu-fb1f2a0a0e1a7f00f6e9f3d6c00609034594e0f8.tar.gz
1531 - enable termbox's mouse support
Diffstat (limited to 'termbox')
-rw-r--r--termbox/termbox.c1
-rw-r--r--termbox/x.cc11
2 files changed, 12 insertions, 0 deletions
diff --git a/termbox/termbox.c b/termbox/termbox.c
index 6bd14213..eed9681d 100644
--- a/termbox/termbox.c
+++ b/termbox/termbox.c
@@ -115,6 +115,7 @@ int tb_init(void)
   bytebuffer_puts(&output_buffer, funcs[T_ENTER_CA]);
   bytebuffer_puts(&output_buffer, funcs[T_ENTER_KEYPAD]);
   bytebuffer_puts(&output_buffer, funcs[T_HIDE_CURSOR]);
+  bytebuffer_puts(&output_buffer, funcs[T_ENTER_MOUSE]);
   send_clear();
 
   update_term_size();
diff --git a/termbox/x.cc b/termbox/x.cc
new file mode 100644
index 00000000..73373818
--- /dev/null
+++ b/termbox/x.cc
@@ -0,0 +1,11 @@
+#include<iostream>
+#include"termbox.h"
+
+int main() {
+  tb_event event;
+  tb_init();
+  tb_poll_event(&event);
+  tb_shutdown();
+  std::cerr << (int)event.type << '\n';
+  return 0;
+}