Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test script for curses using NativeCall for later usage

  • Loading branch information...
commit 8826c466ee0e5db18316577fb43817e7ab4148cb 1 parent 3e7cba3
@azawawi authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 test_curses.p6
View
21 test_curses.p6
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.