home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / dec / qdss / qdvalidate.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-05  |  4.6 KB  |  133 lines

  1. /***********************************************************
  2. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24.  
  25. /*
  26.  * This scheme seems way too complex; I think it should be replaced with
  27.  * the one used for mfb.        dwm
  28.  */
  29. #ifdef QDVALIDATE
  30. ;-=+_*()))(({}{}}}}{{{{@#$@#$^%^*$%^&*!#$$^%&#($&%#(!@!!~```\';:",,":die!
  31. #else
  32. #define    QDVALIDATE
  33. #endif
  34.  
  35. extern void tlSolidSpans(), tlTiledSpans(), tlStipSpans(), tlOpStipSpans();
  36. extern void tlSolidRects(), tlTiledRects(), tlStipRects(), tlOpStipRects();
  37. extern void tlImageText();
  38. extern int tlPolyText(), tlPolyTextSolid();
  39. extern void qdFSPixSolid(), qdFSPixTiled(), qdFSPixStippleorOpaqueStip(),
  40.         qdFSPixStippleorOpaqueStip();
  41. extern void miPolyFillRect();
  42.  
  43. /* qdvalidate.h
  44.  *    validation lookup tables
  45.  */
  46.  
  47. #define    VECFillSpans        0
  48. #define    VECSetSpans        1
  49. #define    VECPutImage        2
  50. #define    VECCopyArea        3
  51. #define    VECCopyPlane        4
  52. #define    VECPolyPoint        5
  53. #define    VECPolylines        6
  54. #define    VECPolySegment        7
  55. #define    VECPolyRectangle    8
  56. #define    VECPolyArc        9
  57. #define    VECFillPolygon        10
  58. #define    VECPolyFillRect        11
  59. #define    VECPolyFillArc        12
  60. #define    VECPolyText8        13
  61. #define    VECPolyText16        14
  62. #define    VECImageText8        15
  63. #define    VECImageText16        16
  64. #define    VECImageGlyphBlt    17
  65. #define    VECPolyGlyphBlt        18
  66. #define    VECPushPixels        19
  67. #define    VECLineHelper        20
  68. /*    THESE MUST BE SET UP AT CREATE TIME
  69.  * #define    VECChangeClip        21
  70.  * #define    VECDestroyClip        22
  71.  */
  72. #define    VECMAX            21
  73. #define    VECNULL            21
  74.  
  75. #define    VECMOST    10    /* most vectors indexes in one entry */
  76.  
  77. /* indexed by GC field-changed bits
  78.  *    returns the index of the vector that may be changed.
  79.  */
  80. typedef struct _tlchangevecs
  81. {
  82.     char     pivec[VECMAX+1];
  83. }    tlchangevecs;
  84. tlchangevecs tlChangeVecs[] =
  85. {
  86. /* GCFunction */        {VECNULL},
  87. /* GCPlaneMask */        {VECNULL},
  88. /* GCForeground */        {VECNULL},
  89. /* GCBackground */        {VECNULL},
  90. /* GCLineWidth */        {VECPolylines, VECPolySegment, VECNULL},
  91. /* GCLineStyle */        {VECPolylines, VECPolySegment, VECNULL},
  92. /* GCCapStyle */        {VECNULL},
  93. /* GCJoinStyle */        {VECLineHelper, VECNULL},
  94. /* GCFillStyle */        {VECPolyText8, VECFillSpans,
  95.                  VECPolyFillRect, VECPolylines, VECPolySegment,
  96.                  VECPushPixels, VECNULL},
  97. /* GCFillRule */        {VECNULL},
  98. /* GCTile */            {VECFillSpans, VECPolyFillRect, VECPolylines,
  99.                  VECPolySegment, VECPolyText8, VECPushPixels,
  100.                  VECNULL},
  101. /* GCStipple */            {VECFillSpans, VECPolyFillRect, VECPolylines,
  102.                  VECPolySegment, VECPolyText8, VECPushPixels,
  103.                  VECNULL},
  104. /* GCTileStipXOrigin */        {VECNULL},
  105. /* GCTileStipYOrigin */        {VECNULL},
  106. /* GCFont */            {VECImageText8, VECPolyText8, VECNULL},
  107. /* GCSubwindowMode */        {VECNULL},
  108. /* GCGraphicsExposures */    {VECNULL},
  109. /* GCClipXOrigin */        {VECNULL},
  110. /* GCClipYOrigin */        {VECNULL},
  111. /* GCClipMask */        {VECNULL},
  112. /* GCDashOffset */        {VECNULL},
  113. /* GCDashList */        {VECPolylines, VECPolySegment, VECNULL},
  114. /* GCArcMode */            {VECNULL},
  115.     /* THESE ARE devPrivate->GCstate CHANGE BITS: */
  116. /* VSFullReset */
  117. {VECFillSpans, VECSetSpans, VECPutImage, VECCopyArea, VECCopyPlane,
  118.  VECPolyPoint, VECPolylines, VECPolySegment, VECPolyRectangle, VECPolyArc,
  119.  VECFillPolygon, VECPolyFillRect, VECPolyFillArc, VECPolyText8, VECPolyText16,
  120.  VECImageText8, VECImageText16, VECImageGlyphBlt, VECPolyGlyphBlt,
  121.  VECPushPixels, VECLineHelper, VECNULL},
  122. /* VSDest  */
  123. {VECPutImage, VECCopyArea, VECCopyPlane, VECFillPolygon, VECPolyFillRect,
  124.  VECImageText8, VECPolyText8, VECPushPixels, VECPolylines, VECPolySegment,
  125.  VECFillSpans, VECSetSpans, VECPutImage, VECNULL},
  126. };
  127.  
  128. /* indexed by vector indexes (VEC*)
  129.  *    returns a weird command language for validate
  130.  */
  131. typedef    void     (* PFN)();
  132.  
  133.