about summary refs log tree commit diff stats
path: root/termbox
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-27 15:57:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-27 15:57:38 -0700
commit0e120d8153a28f825a74d0c976c9d2f208e9e267 (patch)
treed034dc0ed6da5e07c629755b224a369b2ae25669 /termbox
parent7199af30e8fdcdc0848a2e2b90014b98f97998b3 (diff)
downloadmu-0e120d8153a28f825a74d0c976c9d2f208e9e267.tar.gz
1486 - repl: hitting enter now working
Diffstat (limited to 'termbox')
-rw-r--r--termbox/termbox.c5
-rw-r--r--termbox/termbox.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/termbox/termbox.c b/termbox/termbox.c
index 80aeb3a9..0e4d5a9f 100644
--- a/termbox/termbox.c
+++ b/termbox/termbox.c
@@ -153,6 +153,11 @@ void tb_shutdown(void)
   termw = termh = -1;
 }
 
+int tb_is_active(void)
+{
+  return termw != -1;
+}
+
 void tb_present(void)
 {
   int x,y,w,i;
diff --git a/termbox/termbox.h b/termbox/termbox.h
index 0bd55be9..ac31230a 100644
--- a/termbox/termbox.h
+++ b/termbox/termbox.h
@@ -44,6 +44,8 @@ int tb_init(void);
 /* Restore terminal mode. */
 void tb_shutdown(void);
 
+int tb_is_active(void);
+
 /* Size of the screen. Return negative values before tb_init() or after
  * tb_shutdown() */
 int tb_width(void);