00001 /*@A (C) 1992 Allen I. Holub */ 00002 #include "cur.h" 00003 00004 WINDOW *hidewin(WINDOW * win ) 00005 { 00006 /* Hide a window. Return NULL and do nothing if the image wasn't saved 00007 * originally or if it's already hidden, otherwise hide the window and 00008 * return the win argument. You may not write to a hidden window. 00009 */ 00010 00011 SBUF *image; 00012 00013 if( !win->image || win->hidden ) 00014 return NULL; 00015 00016 image = savescr(((SBUF*)(win->image))->left,((SBUF*)(win->image))->right, 00017 ((SBUF*)(win->image))->top, ((SBUF*)(win->image))->bottom ); 00018 00019 restore( (SBUF *) win->image ); 00020 freescr( (SBUF *) win->image ); 00021 win->image = image; 00022 win->hidden = 1; 00023 return( win ); 00024 }