ncurses in Perl6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cannot locate native library '/usr/lib64/libncurses.so' | |
| in method postcircumfix:<( )> at lib/NativeCall.pm6:122 | |
| in at src/gen/BOOTSTRAP.pm:827 | |
| in any at src/gen/BOOTSTRAP.pm:811 | |
| in block at testcurse.p6:14 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # test app | |
| use v6; | |
| use NativeCall; | |
| class WINDOW is repr('CPointer') { } | |
| sub initscr() returns WINDOW is native('/usr/lib64/libncurses.so') { * } | |
| sub printw(Str) returns int32 is native('/usr/lib64/libncurses.so') { * } | |
| sub ncrefresh() returns WINDOW is native('/usr/lib64/libncurses.so') is symbol('refresh') { * } | |
| sub getch() returns int32 is native('/usr/lib64/libncurses.so') { * } | |
| sub endwin() returns int32 is native('/usr/lib64/libncurses.so') { * } | |
| initscr(); | |
| printw("Hello World!"); | |
| ncrefresh(); | |
| getch(); | |
| endwin(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment