Permalink
Browse files

Added test script for curses using NativeCall for later usage

  • Loading branch information...
1 parent 3e7cba3 commit 8826c466ee0e5db18316577fb43817e7ab4148cb @azawawi committed Nov 8, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 test_curses.p6
View
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl6
+use v6;
+
+use NativeCall;
+
+constant LIB = 'libncurses.so.5';
+
+sub initscr() is native(LIB) { ... };
+sub clear() is native(LIB) { ... };
+sub endwin() is native(LIB) { ... };
+sub printw(Str) is native(LIB) { ... };
+#sub NCURSEsrefresh() is native(LIB) { ... };
+sub getch() is native(LIB) { ... };
+
+initscr; # Start curses mode
+printw("Hello World !!!\n"); # Print Hello World
+printw("Wtf\n");
+printw("zzz\n");
+#NCURSEsrefresh; # Print it on to the real screen
+getch; # Wait for user input
+endwin; # End curses mode

0 comments on commit 8826c46

Please sign in to comment.