home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / DISPREIN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.2 KB  |  54 lines

  1. /*
  2.     disprein.c
  3.  
  4.     % Display manager change-horses-in-midstream swapper.
  5.  
  6.     8/12/89  by Ted.
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1988, 1989 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14. */
  15. #include "oakhead.h"
  16. #include "disppriv.h"
  17.  
  18. /* -------------------------------------------------------------------------- */
  19.  
  20. boolean disp_ReInit(dmode)
  21.     dmode_fptr dmode;        /* Display mode initialization function */
  22. /*
  23.     Change display manager without changing windows or window manager.
  24. */
  25. {
  26.     boolean mouseon;
  27.  
  28.     mouseon = hard_IsMouseOn();
  29.  
  30.     if (mouseon) hard_DeinitMouse();
  31.  
  32.     /* Close fonts for all windows */
  33.  
  34.     /* Go back to initial mode so that new dmgr will have correct 'oldmode' */
  35.     disp_RestoreMode();
  36.  
  37.     /* Close down current DIG */
  38.     disp_CloseDIG();
  39.  
  40.     /* Initialize a new display manager and DIG. */
  41.     if (!dispsetup(dmode)) {
  42.         return(FALSE);
  43.     }
  44.  
  45.     /* Restore fonts for all windows */
  46.  
  47.     win_SetPixSize(disp_GetDispWin(), disp_GetPixWidth(), disp_GetPixHeight());
  48.     disp_Repaint();
  49.     if (mouseon) hard_InitMouse();
  50.     return(TRUE);
  51. }
  52. /* -------------------------------------------------------------------------- */
  53.  
  54.