From fb1f2a0a0e1a7f00f6e9f3d6c00609034594e0f8 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 5 Jun 2015 16:04:27 -0700 Subject: 1531 - enable termbox's mouse support --- termbox/termbox.c | 1 + termbox/x.cc | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 termbox/x.cc 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 +#include"termbox.h" + +int main() { + tb_event event; + tb_init(); + tb_poll_event(&event); + tb_shutdown(); + std::cerr << (int)event.type << '\n'; + return 0; +} -- cgit 1.4.1-2-gfad0