curses: Add some more api calls. Allow a getch that doesn't throw on errors because you need it for window resize.

db4
Doug Coleman 2014-08-25 14:48:15 -07:00
parent 7609ab6eda
commit a8173daca2
2 changed files with 7 additions and 0 deletions

View File

@ -322,6 +322,9 @@ PRIVATE>
: wgetch ( window -- key ) ptr>> (wgetch) ; : wgetch ( window -- key ) ptr>> (wgetch) ;
: getch ( -- key ) current-window get wgetch ; : getch ( -- key ) current-window get wgetch ;
: wgetch-err ( window -- key ) ptr>> ffi:wgetch ;
: getch-err ( -- key ) current-window get wgetch-err ;
: waddch ( ch window -- ) ptr>> (waddch) ; : waddch ( ch window -- ) ptr>> (waddch) ;
: addch ( ch -- ) current-window get waddch ; : addch ( ch -- ) current-window get waddch ;

View File

@ -280,3 +280,7 @@ FUNCTION: int wborder ( WINDOW* win, chtype ls, chtype rs, chtype ts, chtype bs,
FUNCTION: int box ( WINDOW* win, chtype verch, chtype horch ) ; FUNCTION: int box ( WINDOW* win, chtype verch, chtype horch ) ;
FUNCTION: int whline ( WINDOW* win, chtype ch, int n ) ; FUNCTION: int whline ( WINDOW* win, chtype ch, int n ) ;
FUNCTION: int wvline ( WINDOW* win, chtype ch, int n ) ; FUNCTION: int wvline ( WINDOW* win, chtype ch, int n ) ;
FUNCTION: bool is_term_resized ( int lines, int columns ) ;
FUNCTION: int resize_term ( int lines, int columns ) ;
FUNCTION: int resizeterm ( int lines, int columns ) ;