summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index f705701..762b0bb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -23,9 +23,11 @@
#include <assert.h>
#include <curses.h>
+#include <stdbool.h>
#include <stdlib.h>
#include "clock.h"
+#include "speech.h"
struct screen {
WINDOW *win;
@@ -43,7 +45,7 @@ screen_new(void)
}
screen->win = initscr(); /* On failure, does not return. */
- if (noecho() == ERR || raw() == ERR) {
+ if (noecho() == ERR || raw() == ERR || nodelay(screen->win, TRUE)) {
free(screen);
return NULL;
}
@@ -58,14 +60,19 @@ screen_new(void)
return screen;
}
-void
-screen_draw(struct screen *screen)
+bool
+screen_main(struct screen *screen, struct speech *speech)
{
assert(screen);
+ assert(speech);
clock_draw(screen->clock);
refresh();
+
+ speech_play_time(speech);
+
+ return true;
}
struct screen *