home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / extensions / server / PEX / include / ddpex.h next >
Encoding:
C/C++ Source or Header  |  1993-07-21  |  17.4 KB  |  657 lines

  1. /* $XConsortium: ddpex.h,v 5.12 92/11/17 17:26:04 hersh Exp $ */
  2.  
  3. /***********************************************************
  4. Copyright (c) 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission 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 names of Sun Microsystems,
  13. the X Consortium, and MIT not be used in advertising or publicity 
  14. pertaining to distribution of the software without specific, written 
  15. prior permission.  
  16.  
  17. SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
  18. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
  19. SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  20. DAMAGES OR 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. #include "X.h"
  29. #include "PEX.h"
  30. #include "pixmapstr.h"
  31. #include "dix.h"
  32.  
  33. #ifndef DDPEX_H
  34. #define DDPEX_H
  35.  
  36. /* Basic data types */
  37. /* Many of the typdefs in this file look like the protocol structures 
  38.  * This is intentional.  The protocol structures specify bit fields
  39.  * and the SI ddpex does not use bit fields.  Therefore, ddpex uses its
  40.  * own data definitions, not the ones used by the protocol.
  41.  ****************************************************************************
  42.  * THE SIZE AND ALIGNMENT OF THESE STRUCTURES IS EXPECTED MATCH THE PROTOCOL
  43.  ****************************************************************************
  44.  * This is VERY important.  Although ddpex does not use bit fields, it does
  45.  * assume that short ints are 16 bits, int/long ints are 32 bits.  Pads and
  46.  * unused fields have been kept in the ddpex structures so that they match
  47.  * the protocol structures exactly, allowing type casting and fast copies
  48.  * between the structures.  
  49.  * ddFLOAT is for server internal floating point representations
  50.  */
  51.  
  52. typedef char    ddCHAR;
  53. typedef short   ddSHORT;
  54. typedef long    ddLONG;
  55. typedef float   ddFLOAT;
  56.  
  57. typedef unsigned char   ddUCHAR;
  58. typedef unsigned short  ddUSHORT;
  59. typedef unsigned long   ddULONG;
  60.  
  61. typedef unsigned char    *ddPointer;
  62. typedef unsigned char   ddBYTE;
  63. typedef unsigned char   ddBOOL;
  64.  
  65. /* Let the default font that gets opened up be Monospaced Roman */
  66. #define DEFAULT_PEX_FONT_NAME    "Roman_M"
  67.  
  68. /* Resource structures passed between dipex and ddpex. Most of the resources
  69.  * data is kept in dd structures which are opaque to dipex.  Info needed by
  70.  * dipex is kept visible to it in these structures
  71.  */
  72. typedef struct {
  73.     XID    id;
  74.     ddPointer    deviceData;
  75. } ddWKSResource;
  76.  
  77. typedef struct {
  78.     XID    id;
  79.     ddUSHORT    lutType;
  80.     ddPointer    deviceData;
  81. } ddLUTResource;
  82.  
  83. typedef ddWKSResource ddStructResource;
  84. typedef ddWKSResource ddNSResource;
  85. typedef ddWKSResource ddFontResource;
  86. typedef ddWKSResource ddPMResource;
  87.  
  88. #define GetNSId(HANDLE) HANDLE->id
  89.  
  90. #define GetLUTId(HANDLE) HANDLE->id
  91.  
  92. typedef ddWKSResource        *diWKSHandle;
  93. typedef ddLUTResource        *diLUTHandle;
  94. typedef ddStructResource    *diStructHandle;
  95. typedef ddNSResource        *diNSHandle;
  96. typedef ddFontResource        *diFontHandle;
  97. typedef ddPMResource        *diPMHandle;
  98. typedef ddPointer        diResourceHandle;
  99.  
  100. /* PEXprotost.h equivalents */
  101.  
  102. typedef ddULONG        ddBitmask;
  103. typedef    ddUSHORT    ddBitmaskShort;
  104. typedef    ddSHORT        ddEnumTypeIndex;
  105. typedef    XID        ddResourceId;
  106. typedef    ddBYTE        ddSwitch;
  107. typedef    ddUSHORT    ddTableIndex;
  108.  
  109. typedef struct {
  110.     ddFLOAT    x;
  111.     ddFLOAT    y;
  112. } ddVector2D;
  113.  
  114. typedef struct {
  115.     ddFLOAT    x;
  116.     ddFLOAT    y;
  117.     ddFLOAT    z;
  118. } ddVector3D;
  119.  
  120. typedef struct {
  121.     ddFLOAT    x;
  122.     ddFLOAT    y;
  123. } ddCoord2D;
  124.  
  125. typedef struct {
  126.     ddLONG    x;
  127.     ddLONG    y;
  128. } ddCoord2DL;
  129.  
  130. typedef struct {
  131.     ddSHORT    x;
  132.     ddSHORT    y;
  133. } ddCoord2DS;
  134.  
  135. typedef struct {
  136.     ddFLOAT    x;
  137.     ddFLOAT    y;
  138.     ddFLOAT    z;
  139. } ddCoord3D;
  140.  
  141. typedef struct {
  142.     ddLONG    x;
  143.     ddLONG    y;
  144.     ddLONG    z;
  145. } ddCoord3DL;
  146.  
  147. typedef struct {
  148.     ddSHORT    x;
  149.     ddSHORT    y;
  150.     ddSHORT    z;
  151. } ddCoord3DS;
  152.  
  153. typedef struct {
  154.     ddFLOAT    x;
  155.     ddFLOAT    y;
  156.     ddFLOAT    z;
  157.     ddFLOAT    w;
  158. } ddCoord4D;
  159.  
  160. typedef struct {
  161.     ddSHORT        x;
  162.     ddSHORT     y;
  163.     ddFLOAT     z;
  164. } ddDeviceCoord;
  165.  
  166. typedef struct {
  167.     ddSHORT        xmin;
  168.     ddSHORT        ymin;
  169.     ddSHORT        xmax;
  170.     ddSHORT        ymax;
  171. } ddDeviceRect;
  172.  
  173. typedef struct {
  174.         ddFLOAT         xmin;
  175.         ddFLOAT         ymin;
  176.         ddFLOAT         zmin;
  177.         ddFLOAT         wmin;
  178.         ddFLOAT         xmax;
  179.         ddFLOAT         ymax;
  180.         ddFLOAT         zmax;
  181.         ddFLOAT         wmax;
  182. } ddListBounds;
  183.  
  184. typedef struct {
  185.     ddSHORT        approxMethod;
  186.     ddUSHORT        unused;
  187.     ddFLOAT        tolerance;
  188. } ddCurveApprox;
  189.  
  190. typedef struct {
  191.     ddSHORT        approxMethod;
  192.     ddUSHORT        unused;
  193.     ddFLOAT        uTolerance;
  194.     ddFLOAT        vTolerance;
  195. } ddSurfaceApprox;
  196.  
  197. typedef struct {
  198.     ddUSHORT        vertical;
  199.     ddUSHORT        horizontal;
  200. } ddTextAlignmentData;
  201.  
  202. typedef struct {
  203.     ddDeviceCoord    minval;
  204.     ddDeviceCoord    maxval;
  205.     ddUCHAR        useDrawable;
  206.     ddBYTE        pad[3];
  207. } ddViewport;
  208.  
  209. typedef struct {
  210.     ddCoord2DS      position;
  211.     ddFLOAT         distance;
  212. } ddDC_HitBox;
  213.  
  214. typedef struct {
  215.     ddCoord3D    minval;
  216.     ddCoord3D    maxval;
  217. } ddNpcSubvolume;
  218.  
  219. typedef  ddNpcSubvolume ddNPC_HitVolume;
  220.  
  221. typedef struct {
  222.     ddUSHORT    clipFlags;
  223.     ddUSHORT    unused;
  224.     ddNpcSubvolume    clipLimits;
  225.     ddFLOAT        orientation[4][4];
  226.     ddFLOAT        mapping[4][4];
  227. } ddViewEntry;
  228.  
  229. typedef struct {
  230.     ddUSHORT    definableEntries;
  231.     ddUSHORT    numPredefined;
  232.     ddUSHORT    predefinedMin;
  233.     ddUSHORT    predefinedMax;
  234. } ddTableInfo;
  235.  
  236.  
  237. typedef struct {
  238.         diStructHandle    structure;    /* the structure id is replaced with */
  239.         ddULONG         offset;        /* the handle */
  240. } ddElementRef;
  241.  
  242. typedef struct {
  243.         ddCoord4D       orig_point;    /* original PEX ref point */
  244.         ddCoord4D       point;
  245.         ddVector3D      orig_vector;    /* original PEX ref vector*/    
  246.         ddVector3D      vector;        /* normalized vector */
  247.     ddFLOAT        dist;        /* Hessian form distance func */
  248. } ddHalfSpace;                 
  249.  
  250. typedef struct {
  251.         diStructHandle    structure;    /* the structure id is replaced with the */
  252.         ddULONG         offset;        /* handle by diPEX */
  253.         ddULONG         pickid;
  254. } ddPickPath;
  255.  
  256. typedef struct {
  257.     ddULONG        sid;
  258.     ddULONG             offset;
  259.     ddULONG             pickid;
  260. } ddPickElementRef;
  261.  
  262. typedef struct {
  263.       ddUSHORT        pickType;
  264.       union {
  265.       ddDC_HitBox        DC_HitBox;
  266.       ddNPC_HitVolume    NPC_HitVolume;
  267.       } hit_box;
  268. } ddPickRecord;
  269.  
  270. typedef struct {
  271.     ddUSHORT    elementType;
  272.     ddUSHORT    length;
  273. } ddElementInfo;
  274.  
  275. /* Colour structures */
  276. typedef struct {
  277.     ddFLOAT    red;
  278.     ddFLOAT    green;
  279.     ddFLOAT    blue;
  280. } ddRgbFloatColour;
  281.  
  282. typedef struct {
  283.     ddFLOAT    hue;
  284.     ddFLOAT    saturation;
  285.     ddFLOAT    value;
  286. } ddHsvColour;
  287.  
  288. typedef struct {
  289.     ddFLOAT    hue;
  290.     ddFLOAT    lightness;
  291.     ddFLOAT    saturation;
  292. } ddHlsColour;
  293.  
  294. typedef struct {
  295.     ddFLOAT    x;
  296.     ddFLOAT    y;
  297.     ddFLOAT    z;
  298. } ddCieColour;
  299.  
  300. typedef struct {
  301.     ddUCHAR    red;
  302.     ddUCHAR    green;
  303.     ddUCHAR    blue;
  304.     ddUCHAR    pad;
  305. } ddRgb8Colour;
  306.  
  307. typedef struct {
  308.     ddUSHORT    red;
  309.     ddUSHORT    green;
  310.     ddUSHORT    blue;
  311.     ddUSHORT    pad;
  312. } ddRgb16Colour;
  313.  
  314. typedef struct {
  315.     ddUSHORT        index;
  316.     ddUSHORT        pad;
  317. } ddIndexedColour;
  318.  
  319. typedef struct {
  320.     ddSHORT       colourType;
  321.     ddSHORT       unused;
  322.     union {
  323.     ddIndexedColour        indexed;
  324.     ddRgb8Colour           rgb8;
  325.     ddRgb16Colour          rgb16;
  326.     ddRgbFloatColour           rgbFloat;
  327.     ddCieColour            cieFloat;
  328.     ddHlsColour            hlsFloat;
  329.     ddHsvColour            hsvFloat;
  330.     }  colour;
  331. } ddColourSpecifier;
  332.  
  333. typedef union {
  334.     ddRgb8Colour           rgb8;
  335.     ddRgb16Colour          rgb16;
  336.     ddRgbFloatColour           rgbFloat;
  337.     ddCieColour            cieFloat;
  338.     ddHlsColour            hlsFloat;
  339.     ddHsvColour            hsvFloat;
  340. }  ddDirectColour;
  341.  
  342. typedef struct {
  343.     ddFLOAT        ambient;
  344.     ddFLOAT        diffuse;
  345.     ddFLOAT        specular;
  346.     ddFLOAT        specularConc;
  347.     ddFLOAT        transmission;  /* 0.0 = opaque, 1.0 = transparent */
  348.     ddColourSpecifier  specularColour;        
  349. } ddReflectionAttr;
  350.  
  351. /* end of PEXprotost.h equivalent structures */
  352.  
  353. /* error return values */
  354. typedef int ddpex4rtn;
  355. typedef int ddpex43rtn;
  356. typedef int ddpex3rtn;
  357. typedef int ddpex2rtn;
  358. typedef int ddpex1rtn;
  359.  
  360. /* ddBuffer is used to pass variable length data from ddpex to dipex 
  361.  * there is a utility called miBuffRealloc which can be used by either
  362.  * dipex or ddpex to reallocate space in the buffer.
  363.  * The buffer itself is just an array of bytes.  The beginning of the
  364.  * buffer is pointed to by pHead.  ddpex copies the info into the
  365.  * buffer beginning at the location pointed to by pBuf.  This allows
  366.  * dipex to control where in the buffer the data is located.  dipex
  367.  * sets pBuf, pHead and bufSize before calling the ddpex procedure.
  368.  * ddpex copies data into the buffer starting at pBuf and puts the
  369.  * number of bytes of data copied into dataSize.  ddpex does not change
  370.  * pHead, pBuf, or data Size (pBuf continues pointing to the beginning
  371.  * of the info ddpex copies to the buffer).  ddpex MUST check that the
  372.  * buffer is large enough to hold the data (macro DD_BUF_TOO_SMALL is
  373.  * useful for this) and should call miBufRealloc to increase the buffer
  374.  * size if it's too small.  pHead, pBuf and bufSize will be adjusted
  375.  * for the realloc correctly in that procedure.
  376.  */
  377. typedef struct {
  378.     ddULONG    bufSize;    /* number of total bytes in buffer */
  379.     ddULONG    dataSize;    /* number of bytes used by the new data */
  380.     ddPointer   pBuf;        /* pointer to buffer where new data starts */
  381.     ddPointer   pHead;        /* pointer to true head of buffer */
  382. } ddBuffer, *ddBufferPtr;
  383.  
  384. /* lists of objects are needed in several places in the SI server.  The following
  385.  * data structure are intended to be used for those lists. The enum type defines
  386.  * what the possible objects in a list are.  listofObj defines the list itself.
  387.  * The list is an array of objects.  Procedures for doing operations on these
  388.  * lists are provided in server/dipex/utilities.  Declarations of the procedures and
  389.  * useful macros are defined in server/include/pexUtils.h.
  390.  * dipex and ddpex both use these lists.  The lists are not intended
  391.  * to be opaque.  dipex and ddpex can use them directly, although we've tried
  392.  * to use the macros and procedures as much as possible.  
  393.  * More info is given with the procedures.
  394.  */
  395. typedef enum {
  396.         DD_ELEMENT_REF=0,
  397.         DD_HALF_SPACE=1,
  398.         DD_PICK_PATH=2,
  399.         DD_RENDERER=3,
  400.         DD_WKS=4,
  401.         DD_NS=5,
  402.     DD_STRUCT=6,
  403.         DD_DEVICE_RECT=7,
  404.     DD_NAME=8,
  405.     DD_INDEX=9,
  406.         DD_LIST_OF_LIST=10,
  407.     DD_NUM_TYPES=11
  408. } ddListType;
  409.  
  410. typedef struct {
  411.         ddListType      type;
  412.         ddLONG     numObj;
  413.         ddLONG     misc;
  414.         ddLONG     maxObj;
  415.         ddPointer  pList;
  416.         /* pList is an array of foos (see ddListType for possible foos)
  417.          * it is allocated as an array of footypes and reallocated as needed
  418.          * in multiples of a defined size.
  419.      * footypes and array sizes are stated explicitely in
  420.      * server/dipex/dispatch/pexUtils.c
  421.          * yes, this could be a union, but by using a generic char *,
  422.          * the list can be handled generically and not have to be 
  423.          * specified differently for each type if it isn't necessary
  424.          */
  425. } listofObj;
  426.  
  427. /* Pipeline Context and Renderer Resource structures: shared by dipex and ddpex */
  428.  
  429. typedef    struct {
  430.     ddUSHORT    placementType;
  431.     ddUSHORT    numUcurves;
  432.     ddUSHORT    numVcurves;
  433. } ddPSC_IsoparametricCurves;
  434.  
  435. typedef    struct {
  436.     ddCoord3D    origin;
  437.     ddVector3D    direction;
  438.     ddUSHORT    numberIntersections;
  439.     ddFLOAT     *pPoints;
  440. } ddPSC_LevelCurves;
  441.  
  442. typedef struct {
  443.     ddEnumTypeIndex        type;
  444.     union {
  445.         char                none;
  446.         char                impDep;
  447.         ddPSC_IsoparametricCurves    isoCurves;    
  448.         ddPSC_LevelCurves        mcLevelCurves;    
  449.         ddPSC_LevelCurves        wcLevelCurves;
  450.     } data;
  451. } ddPSurfaceChars;
  452.  
  453.     
  454. typedef struct {
  455.     ddEnumTypeIndex        markerType;
  456.     ddFLOAT            markerScale;
  457.     ddColourSpecifier    markerColour;
  458.     ddUSHORT        markerIndex;
  459.     ddUSHORT        textFont;
  460.     ddUSHORT        textPrecision;
  461.     ddFLOAT            charExpansion;
  462.     ddFLOAT            charSpacing;
  463.     ddColourSpecifier    textColour;
  464.     ddFLOAT            charHeight;
  465.     ddVector2D        charUp;
  466.     ddUSHORT        textPath;
  467.     ddTextAlignmentData    textAlignment;
  468.     ddFLOAT            atextHeight;
  469.     ddVector2D        atextUp;
  470.     ddUSHORT        atextPath;
  471.     ddTextAlignmentData    atextAlignment;
  472.     ddEnumTypeIndex        atextStyle;
  473.     ddUSHORT        textIndex;
  474.     ddEnumTypeIndex        lineType;
  475.     ddFLOAT            lineWidth;
  476.     ddColourSpecifier    lineColour;
  477.     ddCurveApprox        curveApprox;
  478.     ddEnumTypeIndex        lineInterp;
  479.     ddUSHORT        lineIndex;
  480.     ddEnumTypeIndex        intStyle;
  481.     ddSHORT            intStyleIndex;
  482.     ddColourSpecifier    surfaceColour;
  483.     ddReflectionAttr    reflAttr;
  484.     ddEnumTypeIndex        reflModel;
  485.     ddEnumTypeIndex        surfInterp;
  486.     ddEnumTypeIndex        bfIntStyle;
  487.     ddSHORT            bfIntStyleIndex;
  488.     ddColourSpecifier    bfSurfColour;
  489.     ddReflectionAttr    bfReflAttr;
  490.     ddEnumTypeIndex        bfReflModel;
  491.     ddEnumTypeIndex        bfSurfInterp;
  492.     ddSurfaceApprox        surfApprox;
  493.     ddUSHORT        cullMode;
  494.     ddBOOL            distFlag;
  495.     ddCoord2D        patternSize;
  496.     ddCoord3D        patternRefPt;
  497.     ddVector3D        patternRefV1;
  498.     ddVector3D        patternRefV2;
  499.     ddUSHORT        intIndex;
  500.     ddUSHORT        edges;
  501.     ddEnumTypeIndex        edgeType;
  502.     ddFLOAT            edgeWidth;
  503.     ddColourSpecifier    edgeColour;
  504.     ddUSHORT        edgeIndex;
  505.     ddFLOAT            localMat[4][4];
  506.     ddFLOAT            globalMat[4][4];
  507.     ddUSHORT        modelClip;
  508.     listofObj        *modelClipVolume;
  509.     ddUSHORT        viewIndex;
  510.     listofObj        *lightState;
  511.     ddUSHORT        depthCueIndex;
  512.     ddUSHORT        colourApproxIndex;
  513.     ddSHORT            rdrColourModel;
  514.     ddPSurfaceChars        psc;
  515.     ddULONG            asfs;
  516.     ddULONG            pickId;
  517.     ddULONG            hlhsrType;
  518.     diNSHandle        pCurrentNS;    /* handle to name set */
  519. } ddPCAttr;
  520.  
  521. typedef struct {
  522.     ddULONG            PCid;
  523.     listofObj        *rendRefs;
  524.     ddPCAttr        *pPCAttr;
  525. } ddPCStr, *ddPCPtr;
  526.  
  527. /*    Output Command Procedure Vector    used in renderer */
  528. /*    The index of a procedure is the output command number    */
  529. #define OCTABLE_LENGTH (PEXMaxOC+1)
  530. #define SEPROC_VECTOR_LENGTH (PEXMaxOC+1)
  531.  
  532. typedef    ddpex2rtn    (*ocTableType)();
  533.  
  534. typedef struct {
  535.     ddBYTE        type;    /* drawable type: pixmap, window, undrawable_window? */
  536.     ddBYTE        class;    
  537.     ddBYTE        depth;    
  538.     ddBYTE        bitsPerPixel;    
  539.     ddBYTE        rootDepth;
  540.     ddULONG        rootVisual;
  541. } ddDrawableInfo;
  542.  
  543. typedef enum {
  544.     DD_HIGH_INCL_NS=0,
  545.     DD_HIGH_EXCL_NS=1,
  546.     DD_INVIS_INCL_NS=2,
  547.     DD_INVIS_EXCL_NS=3,
  548.     DD_PICK_INCL_NS=4,
  549.     DD_PICK_EXCL_NS=5,
  550.     DD_MAX_FILTERS=6
  551. } ddNSFilters; 
  552.  
  553. /* pick state for Renderer picking */
  554. #define DD_PICK_ONE 1
  555. #define DD_PICK_ALL 2
  556. #define DD_SERVER    1
  557. #define DD_CLIENT    2
  558. #define DD_NEITHER    3
  559.  
  560. typedef struct {
  561.     ddUSHORT      state;        /* pick state one or all */
  562.     ddUSHORT      server;       /* client or server traversal */
  563.     ddSHORT           pick_method;
  564.     ddBOOL            send_event;
  565.     ddULONG           max_hits;
  566.     ddULONG           more_hits;
  567.     ClientPtr         client;       /* need to send the event */
  568.         diStructHandle    strHandle;    /* struct handle for PickOne */
  569.     diPMHandle      pseudoPM;      /* fake PM for Renderer Pick */
  570.     listofObj      *list;    /* list of list for pick all */
  571.     listofObj      *fakeStrlist;    /* list of fake struct handle for
  572.                        picking */
  573.     listofObj      *sIDlist;    /* list of IDs, struct handles  and
  574.                        offsets for reverse mapping
  575.                        BeginStructures when picking */
  576. } ddRdrPickStr, *ddRdrPickPtr;       /* need to send the event */ 
  577.  
  578. typedef struct {
  579.     ddULONG         rendId;        /* renderer id */
  580.     ddPCPtr            pPC;        /* pipeline context handle */
  581.     ddDrawableInfo        drawExample;    /* info from drawable example */
  582.     DrawablePtr        pDrawable;    /* rendering drawable */
  583.     ddULONG            drawableId;    /* id of rendering drawable */
  584.     listofObj        *curPath;    /* current path */
  585.     ddUSHORT        state;        /* renderer state */
  586.     diLUTHandle        lut[PEXMaxTableType+1];/* lookup table handles */
  587.     diNSHandle        ns[DD_MAX_FILTERS];/* name set handles */
  588.     ddSHORT            hlhsrMode;    /* you guessed it */
  589.     ddNpcSubvolume        npcSubvolume;
  590.     ddViewport        viewport;
  591.     listofObj        *clipList;     /* clip list */
  592.                          /* Begin 5.1 additions */
  593.                          /* pick_inclusion is in ns */
  594.                          /* pick_exclusion is in ns */
  595.     listofObj        *pickStartPath;     /* pick start path */
  596.     ddColourSpecifier    backgroundColour;
  597.     ddBOOL            clearI;
  598.     ddBOOL            clearZ;
  599.     ddUSHORT        echoMode;
  600.     ddColourSpecifier    echoColour;
  601.                          /* End 5.1 additions */
  602.     ddBitmask        tablesMask;    /* renderer dynamics */
  603.     ddBitmask        namesetsMask;    /* renderer dynamics */
  604.     ddBitmask        attrsMask;    /* renderer dynamics */
  605.     ddBitmask        tablesChanges;    /* changed attributes */
  606.     ddBitmask        namesetsChanges;/* changed attributes */
  607.     ddBitmask        attrsChanges;    /* changed attributes */
  608.     ocTableType        executeOCs[OCTABLE_LENGTH];    
  609.     ddBOOL            immediateMode;
  610.     ddUSHORT        render_mode;
  611.     ddPointer        pDDContext;    /* device dependent attribute context */
  612.     ddRdrPickStr        pickstr;
  613. } ddRendererStr, *ddRendererPtr;
  614.  
  615. typedef struct {
  616.     ddULONG            numElRefs;    /* number of element refs */
  617.     listofObj        *Path;        /* path */
  618. } ddAccStStr, *ddAccStPtr;
  619.  
  620. /* render_mode values */
  621. #define    MI_REND_DRAWING 0
  622. #define    MI_REND_PICKING 1
  623. #define    MI_REND_SEARCHING 2
  624.  
  625.     /* enum type for specifying resources  */
  626. typedef enum { 
  627.     WORKSTATION_RESOURCE=0,
  628.     STRUCTURE_RESOURCE=1,
  629.     PARENT_STRUCTURE_RESOURCE=2,
  630.     CHILD_STRUCTURE_RESOURCE=3,
  631.     SEARCH_CONTEXT_RESOURCE=4,
  632.     PICK_RESOURCE=5,
  633.     LOOKUP_TABLE_RESOURCE=6,
  634.     NAME_SET_RESOURCE=7,
  635.     FONT_RESOURCE=8,
  636.     RENDERER_RESOURCE=9,
  637.     PIPELINE_CONTEXT_RESOURCE=10
  638. } ddResourceType;
  639.  
  640. typedef enum {
  641.     ADD=0,
  642.     REMOVE=1
  643. } ddAction;
  644.  
  645. typedef enum {
  646.     X_WINDOW_RESOURCE=0,
  647.     X_DRAWABLE_RESOURCE=1,
  648.     X_FONT_RESOURCE=2,
  649.     X_PIXMAP_RESOURCE=3,
  650.     X_CURSOR_RESOURCE=4,
  651.     X_COLORMAP_RESOURCE=5,
  652.     X_GCONTEXT_RESOURCE=6,
  653.     X_KEYSYM=7
  654. } ddXResourceType;
  655.  
  656. #endif  /* DDPEX_H */
  657.