ptr>> swap window-params ffi:derwin
] [
window-params ffi:newwin
- ] if* [ curses-error ] keep >>ptr &dispose
+ ] if* curses-pointer-error >>ptr &dispose
] [ apply-window-options ] bi ;
: with-window ( window quot -- )
'[
ffi:initscr curses-pointer-error
>>ptr
- [ apply-global-options ] [ apply-window-options ] [ ] tri
-
- ffi:erase curses-error
+ {
+ [ apply-global-options ]
+ [ apply-window-options ]
+ [ ptr>> ffi:wclear curses-error ]
+ [ ptr>> ffi:wrefresh curses-error ]
+ [ ]
+ } cleave
init-colors
_ with-window
: ccolor ( foreground background -- )
current-window get wccolor ;
+
+: wccbox ( window -- )
+ ptr>> 0 0 ffi:box curses-error ;
+: cbox ( -- )
+ current-window get wccbox ;
+
FUNCTION: bool mouse_trafo ( int* pY, int* pX, bool to_screen ) ;
FUNCTION: bool wmouse_trafo ( WINDOW* win, int* pY, int* pX, bool to_screen ) ;
FUNCTION: int mouseinterval ( int erval ) ;
+
+FUNCTION: int wborder ( WINDOW* win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br ) ;
+FUNCTION: int box ( WINDOW* win, chtype verch, chtype horch ) ;
+FUNCTION: int whline ( WINDOW* win, chtype ch, int n ) ;
+FUNCTION: int wvline ( WINDOW* win, chtype ch, int n ) ;