diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-20 12:35:47 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-20 12:36:05 -0700 |
commit | 54d48b25a08b5b238371b2d1bd0f594dad8dbeb9 (patch) | |
tree | 150507eb0c81dfbb26e7d79b16d71ff672b5369c /cpp/070console | |
parent | 07efdfd7072d84209b419e66e5a2b48a0c78b2ac (diff) | |
download | mu-54d48b25a08b5b238371b2d1bd0f594dad8dbeb9.tar.gz |
1111 - start adding ncurses primitives
Diffstat (limited to 'cpp/070console')
-rw-r--r-- | cpp/070console | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cpp/070console b/cpp/070console new file mode 100644 index 00000000..18faffb6 --- /dev/null +++ b/cpp/070console @@ -0,0 +1,34 @@ +//: Text-mode cursor primitives. Currently thin wrappers around ncurses calls. + +:(before "End Includes") +#include<ncurses.h> + +:(before "End Primitive Recipe Declarations") +CONSOLE_MODE, +:(before "End Primitive Recipe Numbers") +Recipe_number["console-mode"] = CONSOLE_MODE; +:(before "End Primitive Recipe Implementations") +case CONSOLE_MODE: { + initscr(); + break; +} + +:(before "End Primitive Recipe Declarations") +RETRO_MODE, +:(before "End Primitive Recipe Numbers") +Recipe_number["retro-mode"] = RETRO_MODE; +:(before "End Primitive Recipe Implementations") +case RETRO_MODE: { + endwin(); + break; +} + +:(before "End Primitive Recipe Declarations") +WAIT_FOR_KEY, +:(before "End Primitive Recipe Numbers") +Recipe_number["wait-for-key"] = WAIT_FOR_KEY; +:(before "End Primitive Recipe Implementations") +case WAIT_FOR_KEY: { + getch(); + break; +} |