home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / WMCLOSE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  640 b   |  32 lines

  1. /* wmclose.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
  2.  
  3. #include <stdlib.h>
  4. #include <sys/winmgr.h>
  5. #include "winmgr2.h"
  6.  
  7. void wm_close (wm_handle wh)
  8. {
  9.   int i;
  10.   wm_handle p;
  11.  
  12.   if (wh->used != WM_USED)
  13.     return;
  14.   if (wh->open)
  15.     {
  16.       _wm_unhide1 (wh, NULL);
  17.       wh->open = FALSE;
  18.       wh->display = FALSE;
  19.       _wm_hide1 ();
  20.       for (i = 0; i < _wm_count; ++i)
  21.         {
  22.           p = _wm_idx[i];
  23.           if (p == wh)
  24.             break;
  25.           if (p->open && _wm_jam1 (p, wh))
  26.             _wm_put1 (p);
  27.         }
  28.       wh->visible = FALSE;
  29.       _wm_cursor1 ();
  30.     }
  31. }
  32.