MCPcopy Create free account
hub / github.com/NetHack/NetHack / curses_destroy_nhwindow

Function curses_destroy_nhwindow

win/curses/cursmain.c:516–537  ·  view source on GitHub ↗

Destroy will dismiss the window if the window has not * already been dismissed. */

Source from the content-addressed store, hash-verified

514 * already been dismissed.
515*/
516void
517curses_destroy_nhwindow(winid wid)
518{
519 switch (wid) {
520 case MESSAGE_WIN:
521 curses_teardown_messages(); /* discard ^P message history data */
522 break;
523 case STATUS_WIN:
524 if (VIA_WINDOWPORT())
525 curses_status_finish(); /* discard cached status data */
526 break;
527 case INV_WIN:
528 curs_purge_perminv_data(TRUE);
529 iflags.perm_invent = 0; /* avoid unexpected update_inventory() */
530 break;
531 case MAP_WIN:
532 break;
533 default:
534 break;
535 }
536 curses_del_nhwin(wid);
537}
538
539/* Next output to window will start at (x,y), also moves
540 displayable cursor to (x,y). For backward compatibility,

Callers 1

curses_exit_nhwindowsFunction · 0.85

Calls 4

curses_teardown_messagesFunction · 0.85
curses_status_finishFunction · 0.85
curs_purge_perminv_dataFunction · 0.85
curses_del_nhwinFunction · 0.85

Tested by

no test coverage detected