home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / ibm / skyway / skySave.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-16  |  2.8 KB  |  120 lines

  1. /*
  2.  * $XConsortium: skySave.c,v 1.3 91/07/16 13:16:46 jap Exp $
  3.  *
  4.  * Copyright IBM Corporation 1987,1988,1989,1990,1991
  5.  *
  6.  * All Rights Reserved
  7.  *
  8.  * License to use, copy, modify, and distribute this software and its
  9.  * documentation for any purpose and without fee is hereby granted,
  10.  * provided that the above copyright notice appear in all copies and that
  11.  * both that copyright notice and this permission notice appear in
  12.  * supporting documentation, and that the name of IBM not be
  13.  * used in advertising or publicity pertaining to distribution of the
  14.  * software without specific, written prior permission.
  15.  *
  16.  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  17.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND 
  18.  * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
  19.  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23.  * SOFTWARE.
  24.  *
  25. */
  26.  
  27. /*
  28.  * skySave.c - save and restore functions
  29.  *             copied from gaiStub.c and gaiInit.c
  30.  */
  31.  
  32. #include <sys/types.h>
  33. #include <sys/rcm_win.h>
  34. #include <sys/aixgsc.h>
  35.  
  36. #include "X.h"
  37. #include "gcstruct.h"
  38. #include "windowstr.h"
  39. #include "screenint.h"
  40. #include "pixmapstr.h"
  41. #include "regionstr.h"
  42. #include "cursorstr.h"
  43. #include "scrnintstr.h"
  44. #include "dixfontstr.h"
  45.  
  46. #include "skyProcs.h"
  47. #include "ibmTrace.h"
  48.  
  49. #include "ibmScreen.h"
  50. extern Bool skyDisplayCursor();
  51.  
  52. extern unsigned int skyHandle ;
  53.  
  54. void
  55. skySaveState(pScreen,saveBits)
  56. ScreenPtr       pScreen;
  57. int             saveBits;
  58. {
  59.     int         index ;
  60.  
  61.     TRACE(("skySaveState(0x%x,%d)\n",pScreen,saveBits));
  62.  
  63.     index       = pScreen->myNum ;
  64.  
  65. }
  66.  
  67. void
  68. skyRestoreState(pScreen,restoreBits)
  69. ScreenPtr       pScreen;
  70. int             restoreBits;
  71. {
  72.     int         index ;
  73.  
  74.     TRACE(("skyRestoreState(0x%x,%d)\n",pScreen,restoreBits));
  75.  
  76.     index       = pScreen->myNum ;
  77.  
  78.     skyHdwrInit(index);
  79.     skyRefreshColormaps(pScreen);
  80.     skyDisplayCursor( pScreen, ibmCurrentCursor(index) );
  81. }
  82.  
  83. /*
  84.  * skyScreenClose
  85.  *      Screen is being destroyed. Release its resources.
  86.  */
  87.  
  88. Bool
  89. skyScreenClose( index, pScreen )
  90. register int        index;
  91. register ScreenPtr  pScreen;
  92. {
  93.     unmake_gp skyInfo ;
  94.  
  95.     TRACE(("skyScreenClose(index=%d, pScreen=0x%x)\n",index,pScreen));
  96.  
  97.     if (pScreen->devPrivate)
  98.     Xfree(pScreen->devPrivate);
  99.  
  100.     if (aixgsc (skyHandle, UNMAKE_GP, &skyInfo))
  101.     {
  102.         TRACE(("aixgsc UNMAKE_GP failed\n"));
  103.         return -1 ;
  104.     }
  105.  
  106.     return TRUE ;
  107. }
  108.  
  109.  
  110. /*
  111.  * rcmGiveUp
  112.  *      Someone is trying killing X. Release GAI resources for all screens.
  113.  *      Called from common/ibmUtils.c
  114.  */
  115.  
  116. void rcmGiveUp()
  117. {
  118.     TRACE(("rcmGiveUp()\n"));
  119. }
  120.