Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ncurses = FFI::cdef(<<< CDEF
- void initscr();
- void *newwin(int width, int height, int start, ...);
- void box(void *win, char text, ...);
- void refresh();
- void touchwin(void *win);
- void wrefresh(void *win);
- void getchar();
- void endwin();
- CDEF,
- 'libncurses.so.5');
- $ncurses->initscr();
- $window = $ncurses->newwin(10, 10, 1, 1);
- $ncurses->box(($window), '*', '*');
- $ncurses->refresh();
- $ncurses->touchwin(($window));
- $ncurses->getchar();
- $ncurses->endwin();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement