home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / mi / mibstorest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-12  |  2.8 KB  |  81 lines

  1. /*
  2.  * mibstorest.h
  3.  *
  4.  * internal structure definitions for mi backing store
  5.  */
  6.  
  7. /* $XConsortium: mibstorest.h,v 5.8 90/06/12 19:18:09 rws Exp $ */
  8.  
  9. /*
  10. Copyright 1989 by the Massachusetts Institute of Technology
  11.  
  12. Permission to use, copy, modify, and distribute this software and its
  13. documentation for any purpose and without fee is hereby granted,
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in
  16. supporting documentation, and that the name of M.I.T. not be used in
  17. advertising or publicity pertaining to distribution of the software
  18. without specific, written prior permission.  M.I.T. makes no
  19. representations about the suitability of this software for any
  20. purpose.  It is provided "as is" without express or implied warranty.
  21. */
  22.  
  23. #include "mibstore.h"
  24. #include "regionstr.h"
  25.  
  26. /*
  27.  * One of these structures is allocated per GC used with a backing-store
  28.  * drawable.
  29.  */
  30.  
  31. typedef struct {
  32.     GCPtr        pBackingGC;        /* Copy of the GC but with graphicsExposures
  33.                      * set FALSE and the clientClip set to
  34.                      * clip output to the valid regions of the
  35.                      * backing pixmap. */
  36.     int            guarantee;      /* GuaranteeNothing, etc. */
  37.     unsigned long   serialNumber;   /* clientClip computed time */
  38.     unsigned long   stateChanges;   /* changes in parent gc since last copy */
  39.     GCOps        *wrapOps;        /* wrapped ops */
  40.     GCFuncs        *wrapFuncs;        /* wrapped funcs */
  41. } miBSGCRec, *miBSGCPtr;
  42.  
  43. /*
  44.  * one of these structures is allocated per Window with backing store
  45.  */
  46.  
  47. typedef struct {
  48.     PixmapPtr      pBackingPixmap;   /* Pixmap for saved areas */
  49.     short      x;            /* origin of pixmap relative to window */
  50.     short      y;
  51.     RegionRec      SavedRegion;        /* Valid area in pBackingPixmap */
  52.     char          viewable;         /* Tracks pWin->viewable so SavedRegion may
  53.                      * be initialized correctly when the window
  54.                      * is first mapped */
  55.     char          status;            /* StatusNoPixmap, etc. */
  56.     char      backgroundState;  /* background type */
  57.     PixUnion      background;        /* background pattern */
  58. } miBSWindowRec, *miBSWindowPtr;
  59.  
  60. #define StatusNoPixmap    1    /* pixmap has not been created */
  61. #define StatusVirtual    2    /* pixmap is virtual, tiled with background */
  62. #define StatusVDirty    3    /* pixmap is virtual, visiblt has contents */
  63. #define StatusBadAlloc    4    /* pixmap create failed, do not try again */
  64. #define StatusContents    5    /* pixmap is created, has valid contents */
  65.  
  66. typedef struct {
  67.     /*
  68.      * screen func wrappers
  69.      */
  70.     Bool        (*CloseScreen)();
  71.     void        (*GetImage)();
  72.     void        (*GetSpans)();
  73.     Bool        (*ChangeWindowAttributes)();
  74.     Bool        (*CreateGC)();
  75.     Bool        (*DestroyWindow)();
  76.     /*
  77.      * pointer to vector of device-specific backing store functions
  78.      */
  79.     miBSFuncPtr        funcs;
  80. } miBSScreenRec, *miBSScreenPtr;
  81.