home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / include / x11 / pex5 / pexproto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-17  |  56.9 KB  |  2,248 lines

  1. /* $XConsortium: PEXproto.h,v 1.9 94/04/17 20:22:25 mor Exp $ */
  2. /*
  3.  
  4. Copyright (c) 1992  X Consortium
  5.  
  6. Permission is hereby granted, free of charge, to any person obtaining
  7. a copy of this software and associated documentation files (the
  8. "Software"), to deal in the Software without restriction, including
  9. without limitation the rights to use, copy, modify, merge, publish,
  10. distribute, sublicense, and/or sell copies of the Software, and to
  11. permit persons to whom the Software is furnished to do so, subject to
  12. the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be included
  15. in all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  20. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
  21. OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  22. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23. OTHER DEALINGS IN THE SOFTWARE.
  24.  
  25. Except as contained in this notice, the name of the X Consortium shall
  26. not be used in advertising or otherwise to promote the sale, use or
  27. other dealings in this Software without prior written authorization
  28. from the X Consortium.
  29.  
  30. */
  31.  
  32. /******************************************************************************
  33. Copyright 1989, 1990, 1991 by Sun Microsystems, Inc.
  34.  
  35.                         All Rights Reserved
  36.  
  37. Permission to use, copy, modify, distribute, and sell this software and its
  38. documentation for any purpose is hereby granted without fee, provided that
  39. the above copyright notice appear in all copies and that both that copyright
  40. notice and this permission notice appear in supporting documentation, and that
  41. the name of Sun Microsystems not be used in advertising or publicity
  42. pertaining to distribution of the software without specific, written prior
  43. permission.  Sun Microsystems makes no representations about the
  44. suitability of this software for any purpose.  It is provided "as is" without
  45. express or implied warranty.
  46.  
  47. SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
  48. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
  49. SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  50. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  51. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  52. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  53. SOFTWARE.
  54. ******************************************************************************/
  55.  
  56. /* Definitions for the PEX used by server and c bindings */
  57.  
  58. /*
  59.  * This packet-construction scheme makes the following assumptions:
  60.  *
  61.  * 1. The compiler is able to generate code which addresses one- and two-byte
  62.  * quantities.  In the worst case, this would be done with bit-fields.  If 
  63.  * bit-fields are used it may be necessary to reorder the request fields in
  64.  * this file, depending on the order in which the machine assigns bit fields
  65.  * to machine words.  There may also be a problem with sign extension, as K+R 
  66.  * specify that bitfields are always unsigned.
  67.  *
  68.  * 2. 2- and 4-byte fields in packet structures must be ordered by hand such 
  69.  * that they are naturally-aligned, so that no compiler will ever insert 
  70.  * padding bytes.
  71.  *
  72.  * 3. All packets are hand-padded to a multiple of 4 bytes, for the same reason.
  73.  */
  74.  
  75. #ifndef _PEXPROTO_H_
  76. #define _PEXPROTO_H_
  77.  
  78. /* In the following typedefs, comments appear that say "LISTof Foo( numItems )",
  79.  * "CLIST of Foo()", and "SINGLE Foo()".   These are used when the protocol 
  80.  * specifies that a request or reply contains a variable length list of 
  81.  * (possibly variable types of) objects.
  82.  *
  83.  * A LISTof list is one for which we have already been given the length.
  84.  * The items in the list are of type "Foo". The number of items in the list
  85.  * appears parenthetically after the type.  ("numItems" in our example.)
  86.  * Any other information needed to parse the list is also passed in the
  87.  * parentheses. (E.g., "tableType" in a list of table entries.)
  88.  *
  89.  * A CLISTof list is the same, except that the first 4 bytes of the list
  90.  * indicate the number of items in the list.  The length may need to be
  91.  * byte-swapped.
  92.  *
  93.  * A SINGLE item of an indeterminate length is indicated in the same
  94.  * manner.  (E.g., a "SINGLE TableEntry()".) Any other information
  95.  * needed to parse the item is also passed in the parentheses.
  96.  * (E.g., "itemMask" in a set of pipeline context attributes.)
  97.  *
  98.  * If no information is given in the parentheses, then the size is
  99.  * implicit.
  100.  *
  101.  * Variable length padding is noted with a comment, with the number
  102.  * of bytes of padding required as calculated from the value in
  103.  * the parentheses.  (number of bytes of padding = n?(3-((n-1)%4):0 , where
  104.  * n is the parenthetical value.)
  105.  */
  106.  
  107. #define XID CARD32
  108. #define Drawable CARD32
  109.  
  110. #include <X11/PEX5/PEXprotost.h>
  111.  
  112. /* Matches revision 5.1C */
  113.  
  114. /****************************************************************
  115.  *          REPLIES                     *
  116.  ****************************************************************/
  117. typedef struct {
  118.     BYTE    type;            /* X_Reply */
  119.     CARD8    what;            /* unused */
  120.     CARD16    sequenceNumber    B16;
  121.     CARD32    length B32;        /* not 0 */
  122.     CARD16    majorVersion B16;
  123.     CARD16    minorVersion B16;
  124.     CARD32    release B32;
  125.     CARD32    lengthName B32;
  126.     CARD32    subsetInfo B32;
  127.     BYTE    pad[8];
  128.     /* LISTof CARD8 follows -- Don't swap */
  129.     /* pad */
  130.     } pexGetExtensionInfoReply;
  131.  
  132.  
  133. typedef struct {
  134.     BYTE    type;            /* X_Reply */
  135.     CARD8    what;            /* unused */
  136.     CARD16    sequenceNumber    B16;
  137.     CARD32    length B32;        /* NOT 0; this is an extra-large reply*/
  138.     CARD32    numLists B32;
  139.     BYTE    pad[20];        /* lists of lists begin afterwards */
  140.     /* LISTof CLISTof pexEnumTypeDesc( numLists ) */
  141.     /* pad */
  142.     } pexGetEnumTypeInfoReply;
  143.  
  144. typedef struct {
  145.     BYTE    type;            /* X_Reply */
  146.     CARD8    what;            /* unused */
  147.     CARD16    sequenceNumber    B16;
  148.     CARD32    length B32;        /* not 0 */
  149.     BYTE    pad[24];
  150.     /* LISTof VALUE() */
  151.     } pexGetImpDepConstantsReply;
  152.  
  153. typedef struct {
  154.     BYTE    type;            /* X_Reply */
  155.     CARD8    what;            /* unused */
  156.     CARD16    sequenceNumber    B16;
  157.     CARD32    length B32;        
  158.     CARD32    escapeID B32;
  159.     CARD8    escape_specific[20];
  160.     /* more escape specific data, treat as */
  161.     /* LISTof CARD8( length ) */
  162.     } pexEscapeWithReplyReply;
  163.  
  164.  
  165. typedef struct {
  166.     BYTE    type;            /* X_Reply */
  167.     CARD8    what;            /* unused */
  168.     CARD16    sequenceNumber    B16;
  169.     CARD32    length B32;        
  170.     BYTE    pad[24];
  171.     /* LISTof RENDERER_TARGET( ) */
  172.     } pexMatchRenderingTargetsReply;
  173.  
  174. typedef struct {
  175.     BYTE    type;            /* X_Reply */
  176.     CARD8    what;            /* unused */
  177.     CARD16    sequenceNumber    B16;
  178.     CARD32    length B32;        /* 0 */
  179.     CARD16    unused B16;
  180.     CARD16    definableEntries B16;
  181.     CARD16    numPredefined B16;
  182.     CARD16    predefinedMin B16;
  183.     CARD16    predefinedMax B16;
  184.     BYTE    pad[14];
  185.     } pexGetTableInfoReply;
  186.  
  187. typedef struct {
  188.     BYTE    type;            /* X_Reply */
  189.     CARD8    what;            /* unused */
  190.     CARD16    sequenceNumber    B16;
  191.     CARD32    length B32;        /* not 0 */
  192.     CARD32    unused B32;
  193.     CARD32    numEntries B32;
  194.     BYTE    pad[16];
  195.     /* LISTof TableEntry( numEntries, tableType ) */
  196.     } pexGetPredefinedEntriesReply;
  197.  
  198. typedef struct {
  199.     BYTE    type;            /* X_Reply */
  200.     CARD8    what;            /* unused */
  201.     CARD16    sequenceNumber    B16;
  202.     CARD32    length B32;        /* not 0 */
  203.     CARD32    numIndices B32;
  204.     BYTE    pad[20];
  205.     /* LISTof pexTableIndex( numIndices ) */
  206.     /* pad( numIndices ) */
  207.     } pexGetDefinedIndicesReply;
  208.  
  209. typedef struct {
  210.     BYTE    type;            /* X_Reply */
  211.     CARD8    what;            /* unused */
  212.     CARD16    sequenceNumber    B16;
  213.     CARD32    length B32;        /* not 0 */
  214.     CARD16    status B16;
  215.     CARD16    tableType B16;
  216.     BYTE    pad[20];
  217.     /* SINGLE TableEntry( tableType )  */
  218.     } pexGetTableEntryReply;
  219.  
  220. typedef struct {
  221.     BYTE    type;            /* X_Reply */
  222.     CARD8    what;            /* unused */
  223.     CARD16    sequenceNumber    B16;
  224.     CARD32    length B32;        /* not 0 */
  225.     CARD16    tableType B16;
  226.     CARD16    unused B16;
  227.     CARD32    numEntries B32;
  228.     BYTE    pad[16];
  229.     /* LISTof TableEntry( numEntries, tableType ) */
  230.     } pexGetTableEntriesReply;
  231.  
  232. typedef struct {
  233.     BYTE    type;            /* X_Reply */
  234.     CARD8    what;            /* unused */
  235.     CARD16    sequenceNumber    B16;
  236.     CARD32    length B32;        /* not 0 */
  237.     BYTE    pad[24];
  238.     /* SINGLE PipelineContextAttributes( itemMask )  */
  239.     } pexGetPipelineContextReply;
  240.  
  241.  
  242. typedef struct {
  243.     BYTE    type;            /* X_Reply */
  244.     CARD8    what;            /* unused */
  245.     CARD16    sequenceNumber    B16;
  246.     CARD32    length B32;        /* not 0 */
  247.     BYTE    pad[24];
  248.     /* SINGLE RendererAttributes( itemMask ) */
  249.     } pexGetRendererAttributesReply;
  250.  
  251. typedef struct {
  252.     BYTE    type;            /* X_Reply */
  253.     CARD8    what;            /* unused */
  254.     CARD16    sequenceNumber    B16;
  255.     CARD32    length B32;        /* 0 */
  256.     pexBitmask    tables B32;
  257.     pexBitmask    namesets B32;
  258.     pexBitmask    attributes B32;
  259.     BYTE    pad[12];
  260. } pexGetRendererDynamicsReply;
  261.  
  262. typedef struct {
  263.     BYTE    type;            /* X_Reply */
  264.     CARD8    what;            /* unused */
  265.     CARD16    sequenceNumber    B16;
  266.     CARD32    length B32;        /* 0 */
  267.     CARD16    editMode B16;
  268.     CARD16    unused    B16;
  269.     CARD32    elementPtr B32;
  270.     CARD32    numElements B32;
  271.     CARD32    lengthStructure B32;
  272.     CARD16    hasRefs B16;
  273.     BYTE    pad[6];
  274.     } pexGetStructureInfoReply;
  275.  
  276. typedef struct {
  277.     BYTE    type;            /* X_Reply */
  278.     CARD8    what;            /* unused */
  279.     CARD16    sequenceNumber    B16;
  280.     CARD32    length B32;        /* not 0 */
  281.     CARD32    numInfo B32;
  282.     BYTE    pad[20];
  283.     /* LISTof pexElementInfo( numInfo ) */
  284.     } pexGetElementInfoReply;
  285.  
  286. typedef struct {
  287.     BYTE        type;            /* X_Reply */
  288.     CARD8        what;            /* unused */
  289.     CARD16        sequenceNumber    B16;
  290.     CARD32        length B32;        /* not 0 */
  291.     CARD8        unused[8];
  292.     CARD32        numStructures B32;
  293.     BYTE        pad[12];
  294.     /* LISTof pexStructure( numStructures )  */
  295.     } pexGetStructuresInNetworkReply;
  296.  
  297. typedef struct {
  298.     BYTE        type;            /* X_Reply */
  299.     CARD8        what;            /* unused */
  300.     CARD16        sequenceNumber    B16;
  301.     CARD32        length B32;        /* not 0 */
  302.     CARD8        unused[12];
  303.     CARD32        numPaths B32;
  304.     BYTE        pad[8];
  305.     /* LISTof CLISTof pexElementRef( numPaths ) */
  306.     } pexGetAncestorsReply;
  307.  
  308. typedef pexGetAncestorsReply pexGetDescendantsReply;
  309.  
  310. typedef struct {
  311.     BYTE    type;            /* X_Reply */
  312.     CARD8    what;            /* unused */
  313.     CARD16    sequenceNumber    B16;
  314.     CARD32    length B32;        /* not 0 */
  315.     CARD32    numElements B32;
  316.     BYTE    pad[20];
  317.     /* LISTof OutputCommand( numElements ) */
  318.     } pexFetchElementsReply;
  319.  
  320. typedef struct {
  321.     BYTE    type;            /* X_Reply */
  322.     CARD8    what;            /* unused */
  323.     CARD16    sequenceNumber    B16;
  324.     CARD32    length B32;        /* 0 */
  325.     CARD16    status B16;
  326.     CARD16    unused B16;
  327.     CARD32    foundOffset B32;
  328.     BYTE    pad[16];
  329.     } pexElementSearchReply;
  330.  
  331. typedef struct {
  332.     BYTE    type;            /* X_Reply */
  333.     CARD8    what;            /* unused */
  334.     CARD16    sequenceNumber    B16;
  335.     CARD32    length B32;        /* not 0 */
  336.     CARD32    numNames B32;
  337.     BYTE    pad[20];
  338.     /* LISTof pexName( numNames ) */
  339.     } pexGetNameSetReply;
  340.  
  341.  
  342. typedef struct {
  343.     BYTE    type;            /* X_Reply */
  344.     CARD8    what;            /* unused */
  345.     CARD16    sequenceNumber    B16;
  346.     CARD32    length B32;        /* not 0 */
  347.     BYTE    pad[24];
  348.     /* SINGLE SearchContextAttributes( itemMask ) */
  349.     } pexGetSearchContextReply;
  350.  
  351. typedef struct {
  352.     BYTE    type;            /* X_Reply */
  353.     CARD8    what;            /* unused */
  354.     CARD16    sequenceNumber    B16;
  355.     CARD32    length B32;        /* not 0 */
  356.     CARD32    unused B32;
  357.     CARD32    numItems B32;
  358.     BYTE    pad[16];
  359.     /* LISTof pexElementRef( numItems ) */
  360.     } pexSearchNetworkReply;
  361.  
  362.  
  363. typedef struct {
  364.     BYTE    type;            /* X_Reply */
  365.     CARD8    what;            /* unused */
  366.     CARD16    sequenceNumber    B16;
  367.     CARD32    length B32;        /* not 0 */
  368.     BYTE    pad[24];
  369.     /* SINGLE WksInfo( itemMask ) */
  370.     } pexGetWorkstationAttributesReply;
  371.  
  372.  
  373. typedef struct {
  374.     BYTE        type;            /* X_Reply */
  375.     CARD8        what;            /* unused */
  376.     CARD16        sequenceNumber    B16;
  377.     CARD32        length B32;        /* 0 */
  378.     pexDynamicType    viewRep;
  379.     pexDynamicType    markerBundle;
  380.     pexDynamicType    textBundle;
  381.     pexDynamicType    lineBundle;
  382.     pexDynamicType    interiorBundle;
  383.     pexDynamicType    edgeBundle;
  384.     pexDynamicType    colorTable;
  385.     pexDynamicType    patternTable;
  386.     pexDynamicType    wksTransform;
  387.     pexDynamicType    highlightFilter;
  388.     pexDynamicType    invisibilityFilter;
  389.     pexDynamicType    HlhsrMode;
  390.     pexDynamicType    structureModify;
  391.     pexDynamicType    postStructure;
  392.     pexDynamicType    unpostStructure;
  393.     pexDynamicType    deleteStructure;
  394.     pexDynamicType    referenceModify;
  395.     pexDynamicType    bufferModify;
  396.     pexDynamicType    lightTable;
  397.     pexDynamicType    depthCueTable;
  398.     pexDynamicType    colorApproxTable;
  399.     CARD8        pad[3];
  400.     } pexGetWorkstationDynamicsReply;
  401.  
  402. typedef struct {
  403.     BYTE    type;            /* X_Reply */
  404.     CARD8    what;            /* unused */
  405.     CARD16    sequenceNumber    B16;
  406.     CARD32    length B32;        /* 4 + 76*fp/4 */
  407.     CARD16    viewUpdate B16;        /* Pending, NotPending */ 
  408.     BYTE    pad[22];
  409.     /* SINGLE pexViewRep()     requested */
  410.     /* SINGLE pexViewRep()     current */
  411.     } pexGetWorkstationViewRepReply;
  412.  
  413. typedef struct {
  414.     BYTE    type;            /* X_Reply */
  415.     CARD8    what;            /* unused */
  416.     CARD16    sequenceNumber    B16;
  417.     CARD32    length B32;        /* not 0 */
  418.     CARD16    viewIndex B16;
  419.     CARD16    unused B16;
  420.     CARD32    numCoords B32;
  421.     BYTE    pad[16];
  422.     /* LISTof pexCoord3D( numCoords ) */
  423.     } pexMapDCtoWCReply;
  424.  
  425. typedef struct {
  426.     BYTE    type;            /* X_Reply */
  427.     CARD8    what;            /* unused */
  428.     CARD16    sequenceNumber    B16;
  429.     CARD32    length B32;        /* not 0 */
  430.     CARD32    unused B32;
  431.     CARD32    numCoords B32;
  432.     BYTE    pad[16];
  433.     /* LISTof pexDeviceCoord( numCoords ) */
  434.     } pexMapWCtoDCReply;
  435.  
  436. typedef struct {
  437.     BYTE    type;            /* X_Reply */
  438.     CARD8    what;            /* unused */
  439.     CARD16    sequenceNumber    B16;
  440.     CARD32    length B32;        /* not 0 */
  441.     BYTE    pad[24];
  442.     /* LISTof pexPhigsWksID() */
  443.     } pexGetWorkstationPostingsReply;
  444.  
  445. typedef struct {
  446.     BYTE    type;            /* X_Reply */
  447.     CARD8    what;            /* unused */
  448.     CARD16    sequenceNumber    B16;
  449.     CARD32    length B32;        /* not 0 */
  450.     BYTE    pad[24];
  451.     /* SINGLE PickDeviceAttributes( itemMask ) */
  452.     } pexGetPickDeviceReply;
  453.  
  454. typedef struct {
  455.     BYTE    type;            /* X_Reply */
  456.     CARD8    what;            /* unused */
  457.     CARD16    sequenceNumber    B16;
  458.     CARD32    length B32;        /* not 0 */
  459.     BYTE    pad[24];
  460.     /* SINGLE pexPickMeasureAttributes( itemMask ) */
  461.     } pexGetPickMeasureReply;
  462.  
  463. typedef struct {
  464.     BYTE    type;            /* X_Reply */
  465.     CARD8    what;            /* unused */
  466.     CARD16    sequenceNumber    B16;
  467.     CARD32    length B32;        /* not 0 */
  468.     CARD32    numPickElRefs B32;    
  469.     pexEnumTypeIndex    pickStatus B16;
  470.     CARD8    betterPick;
  471.     BYTE    pad[17];
  472.     /* LISTof pexPickElementRef ( numPickElRefs ) */
  473.     } pexEndPickOneReply;
  474.  
  475. typedef struct {
  476.     BYTE    type;            /* X_Reply */
  477.     CARD8    what;            /* unused */
  478.     CARD16    sequenceNumber    B16;
  479.     CARD32    length B32;        /* not 0 */
  480.     CARD32    numPickElRefs B32;    
  481.     pexEnumTypeIndex    pickStatus B16;
  482.     CARD8    betterPick;
  483.     BYTE    pad[17];
  484.     /* LISTof pexPickElementRef ( numPickElRefs ) */
  485.     } pexPickOneReply;
  486.  
  487. typedef struct {
  488.     BYTE    type;            /* X_Reply */
  489.     CARD8    what;            /* unused */
  490.     CARD16    sequenceNumber    B16;
  491.     CARD32    length B32;        /* not 0 */
  492.     CARD32    numPicked     B32;    
  493.     pexEnumTypeIndex    pickStatus B16;
  494.     pexEnumTypeIndex    morePicks  B16;
  495.     BYTE    pad[16];
  496.     /* LISTof CLISTof pexPickElementRef ( numPicked ) */
  497.     } pexEndPickAllReply;
  498.  
  499. typedef struct {
  500.     BYTE    type;            /* X_Reply */
  501.     CARD8    what;            /* unused */
  502.     CARD16    sequenceNumber    B16;
  503.     CARD32    length B32;        /* not 0 */
  504.     CARD32    numPicked     B32;    
  505.     pexEnumTypeIndex    pickStatus B16;
  506.     pexEnumTypeIndex    morePicks  B16;
  507.     BYTE    pad[16];
  508.     /* LISTof CLISTof pexPickElementRef ( numPicked ) */
  509.     } pexPickAllReply;
  510.  
  511. typedef struct {
  512.     BYTE    type;            /* X_Reply */
  513.     CARD8    what;            /* unused */
  514.     CARD16    sequenceNumber    B16;
  515.     CARD32    length B32;        /* not 0 */
  516.     CARD32    lengthFontInfo B32;
  517.     CARD8    pad[20];
  518.     /* SINGLE pexFontInfo() */
  519.     } pexQueryFontReply;
  520.  
  521. typedef struct {
  522.     BYTE    type;            /* X_Reply */
  523.     CARD8    what;            /* unused */
  524.     CARD16    sequenceNumber    B16;
  525.     CARD32    length B32;        /* not 0 */
  526.     CARD32    numStrings B32;
  527.     BYTE    pad[20];
  528.     /* LISTof pexString( numStrings ) */
  529.     } pexListFontsReply;
  530.  
  531. typedef struct {
  532.     BYTE    type;            /* X_Reply */
  533.     CARD8    what;            /* unused */
  534.     CARD16    sequenceNumber    B16;
  535.     CARD32    length B32;        /* not 0 */
  536.     CARD32    numStrings B32;
  537.     BYTE    pad[20];
  538.     /* LISTof pexString( numStrings ) */
  539.     /* CLISTof pexFontInfo() */
  540.     } pexListFontsWithInfoReply;
  541.  
  542. typedef struct {
  543.     BYTE    type;            /* X_Reply */
  544.     CARD8    what;            /* unused */
  545.     CARD16    sequenceNumber    B16;
  546.     CARD32    length B32;        /* not 0 */
  547.     BYTE    pad[24];
  548.     /* LISTof ExtentInfo() */
  549.     } pexQueryTextExtentsReply;
  550.  
  551. /****************************************************************
  552.  *          REQUESTS                     *
  553.  ****************************************************************/
  554. /* Request structure */
  555.  
  556. typedef struct {
  557.     CARD8    reqType;
  558.     CARD8    opcode;        /* meaning depends on request type */
  559.     CARD16    length B16;        
  560.                 /* length in 4 bytes quantities */
  561.                                 /* of whole request, including this header */
  562. } pexReq;
  563.  
  564. /*****************************************************************
  565.  *  structures that follow request.
  566.  *****************************************************************/
  567.  
  568. /* ResourceReq is used for any request which has a resource ID
  569.    ( or Atom or Time ) as its one and only argument.  */
  570.  
  571. typedef struct {
  572.     CARD8    reqType;
  573.     CARD8    opcode;
  574.     CARD16    length B16;    /* 2 */
  575.     CARD32    id B32;        /* a Structure, Renderer, Font, LUT, etc. */
  576.     } pexResourceReq;
  577.  
  578.  
  579. /*****************************************************************
  580.  *  Specific Requests 
  581.  *****************************************************************/
  582.  
  583.  
  584. typedef struct {
  585.     CARD8    reqType;
  586.     CARD8    opcode;
  587.     CARD16    length B16;    /* 2 */
  588.     CARD16    clientProtocolMajor B16;
  589.     CARD16    clientProtocolMinor B16;
  590. } pexGetExtensionInfoReq;
  591.  
  592. typedef struct {
  593.     CARD8    reqType;
  594.     CARD8     opcode;
  595.     CARD16     length B16;
  596.     Drawable     drawable B32;
  597.     pexBitmask    itemMask B32;
  598.     CARD32    numEnums B32;
  599.     /* LISTof CARD16( numEnums ) */
  600.     /* pad( numEnums*2 ) */
  601. } pexGetEnumTypeInfoReq;
  602.  
  603. typedef struct {
  604.     CARD8        reqType;
  605.     CARD8        opcode;
  606.     CARD16        length B16;
  607.     pexEnumTypeIndex    fpFormat B16;
  608.     CARD16        unused B16;
  609.     Drawable        drawable B32;
  610.     CARD32        numNames B32;
  611.     /* LISTof pexImpDepConstantNames ( numNames )  */
  612.     /* pad */
  613. } pexGetImpDepConstantsReq;
  614.  
  615. typedef struct {
  616.     CARD8        reqType;
  617.     CARD8         opcode;
  618.     CARD16         length B16;    /* 5 */
  619.     Drawable        drawable B32;
  620.     CARD8         depth;
  621.     CARD8         unused;
  622.     CARD16        type B16;
  623.     CARD32        visualID B32;
  624.     CARD32        maxTriplets B32;
  625. } pexMatchRenderingTargetsReq;
  626.  
  627. typedef struct {
  628.     CARD8        reqType;
  629.     CARD8         opcode;
  630.     CARD16         length B16;    /* 2 + n */
  631.     CARD32        escapeID B32;
  632.     /* 4n bytes of additional escape data to skip */
  633. } pexEscapeReq;
  634.  
  635. typedef  pexEscapeReq   pexEscapeWithReplyReq;
  636.  
  637. typedef struct {
  638.     CARD8        reqType;
  639.     CARD8         opcode;
  640.     CARD16         length B16;    /* 4 */
  641.     Drawable        drawableExample B32;
  642.     pexLookupTable    lut B32;
  643.     pexTableType    tableType B16;
  644.     CARD16        unused B16;
  645. } pexCreateLookupTableReq;
  646.  
  647.  
  648. typedef struct {
  649.     CARD8        reqType;
  650.     CARD8        opcode;
  651.     CARD16        length B16;    /* 3 */
  652.     pexLookupTable    src B32;
  653.     pexLookupTable    dst B32;
  654. } pexCopyLookupTableReq;
  655.  
  656. typedef pexResourceReq pexFreeLookupTableReq;
  657.  
  658. typedef struct {
  659.     CARD8         reqType;
  660.     CARD8         opcode;
  661.     CARD16         length B16;    /* 3 */
  662.     Drawable        drawableExample B32;
  663.     pexTableType    tableType B16;
  664.     CARD16        unused B16;
  665. } pexGetTableInfoReq;
  666.  
  667.  
  668. typedef struct {
  669.     CARD8         reqType;
  670.     CARD8         opcode;
  671.     CARD16         length B16;    /* 5 */
  672.     pexEnumTypeIndex    fpFormat B16;
  673.     CARD16        unused B16;
  674.     Drawable        drawableExample B32;
  675.     pexTableType    tableType B16;
  676.     pexTableIndex    start B16;
  677.     CARD16        count B16;
  678.     CARD16        pad B16;
  679. } pexGetPredefinedEntriesReq;
  680.  
  681. typedef pexResourceReq pexGetDefinedIndicesReq;
  682.  
  683. typedef struct {
  684.     CARD8         reqType;
  685.     CARD8         opcode;
  686.     CARD16         length B16;    /* 4 */
  687.     pexEnumTypeIndex    fpFormat B16;
  688.     CARD16        valueType B16;
  689.     pexLookupTable    lut B32;
  690.     pexTableIndex    index B16;
  691.     CARD16        pad B16;
  692. } pexGetTableEntryReq;
  693.  
  694. typedef struct {
  695.     CARD8         reqType;
  696.     CARD8         opcode;
  697.     CARD16         length B16;    /* 4 */
  698.     pexEnumTypeIndex    fpFormat B16;
  699.     CARD16        valueType B16;
  700.     pexLookupTable    lut B32;
  701.     pexTableIndex    start B16;
  702.     CARD16        count B16;
  703. } pexGetTableEntriesReq;
  704.  
  705.  
  706. typedef struct {
  707.     CARD8         reqType;
  708.     CARD8         opcode;
  709.     CARD16         length B16;
  710.     pexEnumTypeIndex    fpFormat B16;
  711.     CARD16        unused B16;
  712.     pexLookupTable    lut B32;
  713.     pexTableIndex    start B16;
  714.     CARD16        count B16;
  715. /*    LISTof TableEntry( count ) */
  716. } pexSetTableEntriesReq;
  717.  
  718.  
  719. typedef struct {
  720.     CARD8         reqType;
  721.     CARD8         opcode;
  722.     CARD16         length B16;    /* 3 */
  723.     pexLookupTable    lut B32;
  724.     pexTableIndex    start B16;
  725.     CARD16        count B16;
  726. } pexDeleteTableEntriesReq;
  727.  
  728.  
  729. typedef struct {
  730.     CARD8        reqType;
  731.     CARD8        opcode;
  732.     CARD16        length B16;    /* 6 */
  733.     pexEnumTypeIndex    fpFormat B16;
  734.     CARD16        unused B16;
  735.     pexPC        pc B32;
  736.     pexBitmask        itemMask0 B32;
  737.     pexBitmask        itemMask1 B32;
  738.     pexBitmask        itemMask2 B32;
  739.     /* SINGLE PipelineContextAttributes( itemMask ) */
  740. } pexCreatePipelineContextReq;
  741.  
  742.  
  743. typedef struct {
  744.     CARD8     reqType;
  745.     CARD8     opcode;
  746.     CARD16     length B16;    /* 6 */
  747.     pexPC    src B32;
  748.     pexPC    dst B32;
  749.     pexBitmask    itemMask0 B32;
  750.     pexBitmask    itemMask1 B32;
  751.     pexBitmask    itemMask2 B32;
  752. } pexCopyPipelineContextReq;
  753.  
  754. typedef pexResourceReq  pexFreePipelineContextReq;
  755.  
  756. typedef struct {
  757.     CARD8        reqType;
  758.     CARD8        opcode;
  759.     CARD16        length B16;    /* 6 */
  760.     pexEnumTypeIndex    fpFormat B16;
  761.     CARD16        unused B16;
  762.     pexPC        pc B32;
  763.     pexBitmask        itemMask0 B32;
  764.     pexBitmask        itemMask1 B32;
  765.     pexBitmask        itemMask2 B32;
  766. } pexGetPipelineContextReq;
  767.  
  768. typedef struct {
  769.     CARD8        reqType;
  770.     CARD8        opcode;
  771.     CARD16        length B16;
  772.     pexEnumTypeIndex    fpFormat B16;
  773.     CARD16        unused B16;
  774.     pexPC        pc B32;
  775.     pexBitmask        itemMask0 B32;
  776.     pexBitmask        itemMask1 B32;
  777.     pexBitmask        itemMask2 B32;
  778.     /* SINGLE PipelineContextAttributes( itemMask ) */
  779. } pexChangePipelineContextReq;
  780.  
  781. typedef struct {
  782.     CARD8        reqType;
  783.     CARD8        opcode;
  784.     CARD16        length B16;
  785.     pexEnumTypeIndex    fpFormat B16;
  786.     CARD16        unused B16;
  787.     pexRenderer        rdr B32;
  788.     Drawable        drawable B32;
  789.     pexBitmask        itemMask B32;
  790.     /* SINGLE RendererAttributes( itemMask ) */
  791. } pexCreateRendererReq;
  792.  
  793. typedef pexResourceReq pexFreeRendererReq;
  794.  
  795. typedef struct {
  796.     CARD8        reqType;
  797.     CARD8        opcode;
  798.     CARD16        length B16;
  799.     pexEnumTypeIndex    fpFormat B16;
  800.     CARD16        unused B16;
  801.     pexRenderer        rdr B32;
  802.     pexBitmask        itemMask B32;
  803.     /* SINGLE RendererAttributes( itemMask ) */
  804. } pexChangeRendererReq;
  805.  
  806. typedef struct {
  807.     CARD8        reqType;
  808.     CARD8        opcode;
  809.     CARD16        length B16;    /* 4 */
  810.     pexEnumTypeIndex    fpFormat B16;
  811.     CARD16        unused B16;
  812.     pexRenderer        rdr B32;
  813.     pexBitmask        itemMask B32;
  814. } pexGetRendererAttributesReq;
  815.  
  816. typedef pexResourceReq pexGetRendererDynamicsReq;
  817.  
  818. typedef struct {
  819.     CARD8     reqType;
  820.     CARD8     opcode;
  821.     CARD16     length B16;    /* 3 */
  822.     pexRenderer    rdr B32;
  823.     Drawable    drawable B32;
  824. } pexBeginRenderingReq;
  825.  
  826. typedef struct {
  827.     CARD8     reqType;
  828.     CARD8     opcode;
  829.     CARD16     length B16;    /* 3 */
  830.     pexRenderer    rdr B32;
  831.     pexSwitch    flushFlag;
  832.     BYTE    pad[3];
  833. } pexEndRenderingReq;
  834.  
  835. typedef struct {
  836.     CARD8         reqType;
  837.     CARD8         opcode;
  838.     CARD16         length B16;    /* 3 */
  839.     pexRenderer        rdr B32;
  840.     pexStructure    sid B32;
  841. } pexBeginStructureReq;
  842.  
  843. typedef pexResourceReq pexEndStructureReq;
  844.  
  845. typedef struct {
  846.     CARD8        reqType;
  847.     CARD8        opcode;
  848.     CARD16        length B16;
  849.     pexEnumTypeIndex    fpFormat B16;
  850.     CARD16        unused B16;
  851.     pexRenderer        rdr B32;
  852.     CARD32        numCommands B32;
  853.     /* LISTof OutputCommand( numCommands ) */
  854. } pexRenderOutputCommandsReq;
  855. /* individual output commands may be found in the section "Output Commands" */
  856.  
  857.  
  858. typedef struct {
  859.     CARD8         reqType;
  860.     CARD8         opcode;
  861.     CARD16         length B16;    /* 7 */
  862.     pexRenderer        rdr B32;
  863.     pexStructure    sid B32;
  864.     CARD16        position1_whence B16;
  865.     CARD16        unused1 B16;
  866.     INT32        position1_offset B32;
  867.     CARD16        position2_whence B16;
  868.     CARD16        unused2 B16;
  869.     INT32        position2_offset B32;
  870. } pexRenderElementsReq;
  871.  
  872. typedef struct {
  873.     CARD8         reqType;
  874.     CARD8         opcode;
  875.     CARD16         length B16;    /* 3 + 2n */
  876.     pexRenderer        rdr B32;
  877.     CARD32              numElRefs B32;
  878.     /* LISTof pexElementRef( numElRefs ) */
  879. } pexAccumulateStateReq;
  880.  
  881. typedef struct {
  882.     CARD8         reqType;
  883.     CARD8         opcode;
  884.     CARD16         length B16;    /* 4 */
  885.     pexRenderer        rdr B32;
  886.     Drawable        drawable B32;
  887.     pexStructure    sid B32;
  888. } pexRenderNetworkReq;
  889.  
  890. typedef pexResourceReq pexCreateStructureReq;
  891.  
  892. typedef struct {
  893.     CARD8         reqType;
  894.     CARD8         opcode;
  895.     CARD16         length B16;    /* 3 */
  896.     pexStructure    src B32;
  897.     pexStructure    dst B32;
  898. } pexCopyStructureReq;
  899.  
  900. typedef struct {
  901.     CARD8     reqType;
  902.     CARD8     opcode;
  903.     CARD16     length B16;
  904.     CARD32    numStructures B32;
  905.     /* LISTof pexStructure( numStructures ) */
  906. } pexDestroyStructuresReq;
  907.  
  908. typedef struct {
  909.     CARD8         reqType;
  910.     CARD8         opcode;
  911.     CARD16         length B16;    /* 3 */
  912.     pexEnumTypeIndex    fpFormat B16;
  913.     CARD16        itemMask B16;
  914.     pexStructure    sid B32;
  915. } pexGetStructureInfoReq;
  916.  
  917. typedef struct {
  918.     CARD8         reqType;
  919.     CARD8         opcode;
  920.     CARD16         length B16;    /* 7 */
  921.     pexEnumTypeIndex    fpFormat B16;
  922.     CARD16        unused B16;
  923.     pexStructure    sid B32;
  924.     CARD16        position1_whence B16;
  925.     CARD16        unused1 B16;
  926.     INT32        position1_offset B32;
  927.     CARD16        position2_whence B16;
  928.     CARD16        unused2 B16;
  929.     INT32        position2_offset B32;
  930. } pexGetElementInfoReq;
  931.  
  932. typedef struct {
  933.     CARD8         reqType;
  934.     CARD8         opcode;
  935.     CARD16         length B16;    /* 3 */
  936.     pexStructure    sid B32;
  937.     CARD16        which B16;
  938.     CARD16        pad B16;
  939. } pexGetStructuresInNetworkReq;
  940.  
  941. typedef struct {
  942.     CARD8         reqType;
  943.     CARD8         opcode;
  944.     CARD16         length B16;    /* 4 */
  945.     pexStructure    sid B32;
  946.     CARD16        pathOrder B16;
  947.     CARD16        unused B16;
  948.     CARD32        pathDepth B32;
  949. } pexGetAncestorsReq;
  950.  
  951. typedef pexGetAncestorsReq pexGetDescendantsReq;
  952.  
  953. typedef struct {
  954.     CARD8         reqType;
  955.     CARD8         opcode;
  956.     CARD16         length B16;    /* 7 */
  957.     pexEnumTypeIndex    fpFormat B16;
  958.     CARD16        unused B16;
  959.     pexStructure    sid B32;
  960.     CARD16        position1_whence B16;
  961.     CARD16        unused1 B16;
  962.     INT32        position1_offset B32;
  963.     CARD16        position2_whence B16;
  964.     CARD16        unused2 B16;
  965.     INT32        position2_offset B32;
  966. } pexFetchElementsReq;
  967.  
  968. typedef struct {
  969.     CARD8         reqType;
  970.     CARD8         opcode;
  971.     CARD16         length B16;    /* 3 */
  972.     pexStructure    sid B32;
  973.     CARD16        mode B16;
  974.     CARD16        pad B16;
  975. } pexSetEditingModeReq;
  976.  
  977. typedef struct {
  978.     CARD8         reqType;
  979.     CARD8         opcode;
  980.     CARD16         length B16;    /* 4 */
  981.     pexStructure    sid B32;
  982.     CARD16        position_whence B16;
  983.     CARD16        unused B16;
  984.     INT32        position_offset B32;
  985. } pexSetElementPointerReq;
  986.  
  987. typedef struct {
  988.     CARD8         reqType;
  989.     CARD8         opcode;
  990.     CARD16         length B16;    /* 4 */
  991.     pexStructure    sid B32;
  992.     INT32        label B32;
  993.     INT32        offset B32;
  994. } pexSetElementPointerAtLabelReq;
  995.  
  996. typedef struct {
  997.     CARD8         reqType;
  998.     CARD8         opcode;
  999.     CARD16         length B16;
  1000.     pexStructure    sid B32;
  1001.     CARD16        position_whence B16;
  1002.     CARD16        unused B16;
  1003.     INT32        position_offset B32;
  1004.     CARD32        direction B32;
  1005.     CARD32        numIncls B32;
  1006.     CARD32        numExcls B32;
  1007.     /* LISTof CARD16( numIncls ) */
  1008.     /* pad( numIncls*2 ) */
  1009.     /* LISTof CARD16( numExcls ) */
  1010.     /* pad( numExcls*2 ) */
  1011. } pexElementSearchReq;
  1012.  
  1013. typedef struct {
  1014.     CARD8         reqType;
  1015.     CARD8         opcode;
  1016.     CARD16         length B16;
  1017.     pexEnumTypeIndex    fpFormat B16;
  1018.     CARD16        unused B16;
  1019.     pexStructure    sid B32;
  1020.     CARD32        numCommands B32;
  1021.     /* LISTof OutputCommand( numCommands ) */
  1022. } pexStoreElementsReq;
  1023.  
  1024. typedef struct {
  1025.     CARD8         reqType;
  1026.     CARD8         opcode;
  1027.     CARD16         length B16;    /* 6 */
  1028.     pexStructure    sid B32;
  1029.     CARD16        position1_whence B16;
  1030.     CARD16        unused1 B16;
  1031.     INT32        position1_offset B32;
  1032.     CARD16        position2_whence B16;
  1033.     CARD16        unused2 B16;
  1034.     INT32        position2_offset B32;
  1035. } pexDeleteElementsReq;
  1036.  
  1037. typedef struct {
  1038.     CARD8         reqType;
  1039.     CARD8         opcode;
  1040.     CARD16         length B16;    /* 5 */
  1041.     pexStructure    sid B32;
  1042.     CARD16        position_whence B16;
  1043.     CARD16        unused B16;
  1044.     INT32        position_offset B32;
  1045.     INT32        label B32;
  1046. } pexDeleteElementsToLabelReq;
  1047.  
  1048. typedef struct {
  1049.     CARD8         reqType;
  1050.     CARD8         opcode;
  1051.     CARD16         length B16;    /* 4 */
  1052.     pexStructure    sid B32;
  1053.     INT32        label1 B32;
  1054.     INT32        label2 B32;
  1055. } pexDeleteBetweenLabelsReq;
  1056.  
  1057. typedef struct {
  1058.     CARD8         reqType;
  1059.     CARD8         opcode;
  1060.     CARD16         length B16;    /* 9 */
  1061.     pexStructure    src B32;
  1062.     CARD16        srcPosition1_whence B16;
  1063.     CARD16        unused1 B16;
  1064.     INT32        srcPosition1_offset B32;
  1065.     CARD16        srcPosition2_whence B16;
  1066.     CARD16        unused2 B16;
  1067.     INT32        srcPosition2_offset B32;
  1068.     pexStructure    dst B32;
  1069.     CARD16        dstPosition_whence B16;
  1070.     CARD16        unused3 B16;
  1071.     INT32        dstPosition_offset B32;
  1072. } pexCopyElementsReq;
  1073.  
  1074. typedef struct {
  1075.     CARD8         reqType;
  1076.     CARD8         opcode;
  1077.     CARD16         length B16;    /* 3 */
  1078.     pexStructure    old_id B32;
  1079.     pexStructure    new_id B32;
  1080. } pexChangeStructureRefsReq;
  1081.  
  1082. typedef pexResourceReq pexCreateNameSetReq;
  1083.  
  1084. typedef struct {
  1085.     CARD8     reqType;
  1086.     CARD8     opcode;
  1087.     CARD16     length B16;        /* 3 */
  1088.     pexNameSet    src B32;
  1089.     pexNameSet    dst B32;
  1090. } pexCopyNameSetReq;
  1091.  
  1092. typedef pexResourceReq pexFreeNameSetReq;
  1093.  
  1094. typedef pexResourceReq pexGetNameSetReq;
  1095.  
  1096. typedef struct {
  1097.     CARD8     reqType;
  1098.     CARD8     opcode;
  1099.     CARD16     length B16;
  1100.     pexNameSet    ns B32;
  1101.     CARD16    action B16;
  1102.     CARD16    unused B16;
  1103.     /* LISTof pexName() */
  1104. } pexChangeNameSetReq;
  1105.  
  1106. typedef struct {
  1107.     CARD8        reqType;
  1108.     CARD8        opcode;
  1109.     CARD16        length B16;
  1110.     pexEnumTypeIndex    fpFormat B16;
  1111.     CARD16        unused B16;
  1112.     pexSC        sc B32;
  1113.     pexBitmask        itemMask B32;
  1114.     /* SINGLE SearchContextAttributes( itemMask ) */
  1115. } pexCreateSearchContextReq;
  1116.  
  1117. typedef struct {
  1118.     CARD8     reqType;
  1119.     CARD8     opcode;
  1120.     CARD16     length B16;        /* 4 */
  1121.     pexSC    src B32;
  1122.     pexSC    dst B32;
  1123.     pexBitmask    itemMask B32;
  1124. } pexCopySearchContextReq;
  1125.  
  1126. typedef pexResourceReq pexFreeSearchContextReq;
  1127.  
  1128. typedef struct {
  1129.     CARD8        reqType;
  1130.     CARD8        opcode;
  1131.     CARD16        length B16;    /* 4 */
  1132.     pexEnumTypeIndex    fpFormat B16;
  1133.     CARD16        unused B16;
  1134.     pexSC        sc B32;
  1135.     pexBitmask        itemMask B32;
  1136. } pexGetSearchContextReq;
  1137.  
  1138. typedef struct {
  1139.     CARD8        reqType;
  1140.     CARD8        opcode;
  1141.     CARD16        length B16;
  1142.     pexEnumTypeIndex    fpFormat B16;
  1143.     CARD16        unused B16;
  1144.     pexSC        sc B32;
  1145.     pexBitmask        itemMask B32;
  1146.     /* SINGLE SearchContextAttributes( itemMask ) */
  1147. } pexChangeSearchContextReq;
  1148.  
  1149. typedef pexResourceReq pexSearchNetworkReq;
  1150.  
  1151. typedef struct {
  1152.     CARD8         reqType;
  1153.     CARD8         opcode;
  1154.     CARD16         length B16;    /* 19 */
  1155.     pexPhigsWks        wks B32;
  1156.     Drawable        drawable B32;
  1157.     pexLookupTable    markerBundle B32;
  1158.     pexLookupTable    textBundle B32;
  1159.     pexLookupTable    lineBundle B32;
  1160.     pexLookupTable    interiorBundle B32;
  1161.     pexLookupTable    edgeBundle B32;
  1162.     pexLookupTable    colorTable B32;
  1163.     pexLookupTable    depthCueTable B32;
  1164.     pexLookupTable    lightTable B32;
  1165.     pexLookupTable    colorApproxTable B32;
  1166.     pexLookupTable    patternTable B32;
  1167.     pexLookupTable    textFontTable B32;
  1168.     pexNameSet        highlightIncl B32;
  1169.     pexNameSet        highlightExcl B32;
  1170.     pexNameSet        invisIncl B32;
  1171.     pexNameSet        invisExcl B32;
  1172.     CARD16        bufferMode B16;
  1173.     CARD16        pad B16;
  1174. } pexCreateWorkstationReq;
  1175.  
  1176. typedef pexResourceReq pexFreeWorkstationReq;
  1177.  
  1178. typedef struct {
  1179.     CARD8        reqType;
  1180.     CARD8        opcode;
  1181.     CARD16        length B16;    /* 5 */
  1182.     pexEnumTypeIndex    fpFormat B16;
  1183.     CARD16        unused B16;
  1184.     pexPhigsWks        wks B32;
  1185.     pexBitmask        itemMask0 B32;
  1186.     pexBitmask        itemMask1 B32;
  1187. } pexGetWorkstationAttributesReq;
  1188.  
  1189. typedef struct {
  1190.     CARD8     reqType;
  1191.     CARD8     opcode;
  1192.     CARD16     length B16;        /* 2 */
  1193.     Drawable    drawable B32;
  1194. } pexGetWorkstationDynamicsReq;
  1195.  
  1196. typedef struct {
  1197.     CARD8         reqType;
  1198.     CARD8         opcode;
  1199.     CARD16         length B16;    /* 3 */
  1200.     pexEnumTypeIndex    fpFormat B16;
  1201.     pexTableIndex    index B16;
  1202.     pexPhigsWks        wks B32;
  1203. } pexGetWorkstationViewRepReq;
  1204.  
  1205. typedef pexResourceReq pexRedrawAllStructuresReq;    
  1206.  
  1207. typedef pexResourceReq pexUpdateWorkstationReq;
  1208.  
  1209. typedef struct {
  1210.     CARD8         reqType;
  1211.     CARD8         opcode;
  1212.     CARD16         length B16;
  1213.     pexPhigsWks        wks B32;
  1214.     CARD32        numRects B32;
  1215.     /* LISTof pexDeviceRect( numRects ) */
  1216. } pexRedrawClipRegionReq;
  1217.  
  1218. typedef pexResourceReq pexExecuteDeferredActionsReq;
  1219.  
  1220. typedef struct {
  1221.     CARD8         reqType;
  1222.     CARD8         opcode;
  1223.     CARD16         length B16;    /* 4 */
  1224.     pexPhigsWks        wks B32;
  1225.     pexTableIndex    index1 B16;
  1226.     pexTableIndex    index2 B16;
  1227.     CARD16        priority B16;
  1228.     CARD16        pad B16;
  1229. } pexSetWorkstationViewPriorityReq;
  1230.  
  1231. typedef struct {
  1232.     CARD8         reqType;
  1233.     CARD8         opcode;
  1234.     CARD16         length B16;    /* 3 */
  1235.     pexPhigsWks        wks B32;
  1236.     pexEnumTypeIndex    displayUpdate B16;
  1237.     CARD16        pad B16;
  1238. } pexSetWorkstationDisplayUpdateModeReq;
  1239.  
  1240. typedef struct {
  1241.     CARD8        reqType;
  1242.     CARD8        opcode;
  1243.     CARD16        length B16;
  1244.     pexEnumTypeIndex    fpFormat B16;
  1245.     CARD16        unused B16;
  1246.     pexPhigsWks        wks B32;
  1247.     CARD32        numCoords B32;
  1248.     /* LISTof pexDeviceCoord( numCoords ) */
  1249. } pexMapDCtoWCReq;
  1250.  
  1251. typedef struct {
  1252.     CARD8        reqType;
  1253.     CARD8        opcode;
  1254.     CARD16        length B16;
  1255.     pexEnumTypeIndex    fpFormat B16;
  1256.     CARD16        index B16;
  1257.     pexPhigsWks        wks B32;
  1258.     CARD32        numCoords B32;
  1259.     /* LISTof pexCoord3D( numCoords ) */
  1260. } pexMapWCtoDCReq;
  1261.  
  1262. typedef struct {
  1263.     CARD8        reqType;
  1264.     CARD8        opcode;
  1265.     CARD16        length B16;    /* 43 */
  1266.     pexEnumTypeIndex    fpFormat B16;
  1267.     CARD16        unused1 B16;
  1268.     pexPhigsWks        wks B32;
  1269.     pexTableIndex    index B16;
  1270.     CARD16        unused2 B16;
  1271.     CARD16        clipFlags B16;
  1272.     CARD16        unused3 B16;
  1273.     PEXFLOAT        clipLimits_xmin B32;
  1274.     PEXFLOAT        clipLimits_ymin B32;
  1275.     PEXFLOAT        clipLimits_zmin B32;
  1276.     PEXFLOAT        clipLimits_xmax B32;
  1277.     PEXFLOAT        clipLimits_ymax B32;
  1278.     PEXFLOAT        clipLimits_zmax B32;
  1279.     pexMatrix        view_orientation;
  1280.     pexMatrix        view_mapping;
  1281. } pexSetWorkstationViewRepReq;
  1282.  
  1283. typedef struct {
  1284.     CARD8         reqType;
  1285.     CARD8         opcode;
  1286.     CARD16         length B16;    /* 9 */
  1287.     pexEnumTypeIndex    fpFormat B16;
  1288.     CARD16        unused B16;
  1289.     pexPhigsWks        wks B32;
  1290.     PEXFLOAT        npcSubvolume_xmin B32;
  1291.     PEXFLOAT        npcSubvolume_ymin B32;
  1292.     PEXFLOAT        npcSubvolume_zmin B32;
  1293.     PEXFLOAT        npcSubvolume_xmax B32;
  1294.     PEXFLOAT        npcSubvolume_ymax B32;
  1295.     PEXFLOAT        npcSubvolume_zmax B32;
  1296. } pexSetWorkstationWindowReq;
  1297.  
  1298. typedef struct {
  1299.     CARD8        reqType;
  1300.     CARD8        opcode;
  1301.     CARD16        length B16;    /* 8 */
  1302.     pexEnumTypeIndex    fpFormat B16;
  1303.     CARD16        unused B16;
  1304.     pexPhigsWks        wks B32;
  1305.     INT16        viewport_xmin B16;
  1306.     INT16        viewport_ymin B16;
  1307.     PEXFLOAT        viewport_zmin B32;
  1308.     INT16        viewport_xmax B16;
  1309.     INT16        viewport_ymax B16;
  1310.     PEXFLOAT        viewport_zmax B32;
  1311.     pexSwitch        useDrawable;
  1312.     BYTE        pad[3];
  1313. } pexSetWorkstationViewportReq;
  1314.  
  1315. typedef struct {
  1316.     CARD8         reqType;
  1317.     CARD8         opcode;
  1318.     CARD16         length B16;    /* 3 */
  1319.     pexPhigsWks        wks B32;
  1320.     pexEnumTypeIndex    mode B16;
  1321.     CARD16        pad B16;
  1322. } pexSetWorkstationHLHSRModeReq;
  1323.  
  1324. typedef struct {
  1325.     CARD8        reqType;
  1326.     CARD8        opcode;
  1327.     CARD16        length B16;    /* 3 */
  1328.     pexPhigsWks        wks B32;
  1329.     CARD16        bufferMode B16;
  1330.     CARD16        pad B16;
  1331. } pexSetWorkstationBufferModeReq;
  1332.  
  1333. typedef struct {
  1334.     CARD8         reqType;
  1335.     CARD8         opcode;
  1336.     CARD16         length B16;    /* 5 */
  1337.     pexEnumTypeIndex    fpFormat B16;
  1338.     CARD16        unused B16;
  1339.     pexPhigsWks        wks B32;
  1340.     pexStructure    sid B32;
  1341.     PEXFLOAT        priority B32;
  1342. } pexPostStructureReq;
  1343.  
  1344. typedef struct {
  1345.     CARD8         reqType;
  1346.     CARD8         opcode;
  1347.     CARD16         length B16;    /* 3 */
  1348.     pexPhigsWks        wks B32;
  1349.     pexStructure    sid B32;
  1350. } pexUnpostStructureReq;
  1351.  
  1352. typedef pexResourceReq pexUnpostAllStructuresReq;
  1353.  
  1354. typedef pexResourceReq pexGetWorkstationPostingsReq;
  1355.  
  1356. typedef struct {
  1357.     CARD8         reqType;
  1358.     CARD8         opcode;
  1359.     CARD16         length B16;    /* 4 */
  1360.     pexEnumTypeIndex    fpFormat B16;
  1361.     pexEnumTypeIndex    devType B16;
  1362.     pexPhigsWks        wks B32;
  1363.     pexBitmask        itemMask B32;
  1364. } pexGetPickDeviceReq;
  1365.  
  1366. typedef struct {
  1367.     CARD8         reqType;
  1368.     CARD8         opcode;
  1369.     CARD16         length B16;
  1370.     pexEnumTypeIndex    fpFormat B16;
  1371.     CARD16        unused B16;
  1372.     pexPhigsWks        wks B32;
  1373.     pexEnumTypeIndex    devType B16;
  1374.     CARD16        unused2 B16;
  1375.     pexBitmask        itemMask B32;
  1376.     /* SINGLE PickDeviceAttributes( itemMask ) */
  1377. } pexChangePickDeviceReq;
  1378.  
  1379. typedef struct {
  1380.     CARD8         reqType;
  1381.     CARD8         opcode;
  1382.     CARD16         length B16;    /* 4 */
  1383.     pexPhigsWks        wks B32;
  1384.     pexPickMeasure    pm B32;
  1385.     pexEnumTypeIndex    devType B16;
  1386.     CARD16          pad B16;
  1387. } pexCreatePickMeasureReq;
  1388.  
  1389. typedef pexResourceReq pexFreePickMeasureReq;
  1390.  
  1391. typedef struct {
  1392.     CARD8         reqType;
  1393.     CARD8         opcode;
  1394.     CARD16         length B16;    /* 3 */
  1395.     pexPickMeasure    pm B32;
  1396.     pexBitmask        itemMask B32;
  1397. } pexGetPickMeasureReq;
  1398.  
  1399. typedef struct {
  1400.     CARD8         reqType;
  1401.     CARD8         opcode;
  1402.     CARD16         length B16;
  1403.     pexPickMeasure    pm B32;
  1404.     CARD32        numBytes B32;
  1405.     /* LISTof CARD8( numBytes ) */
  1406.     /* pad( numBytes ) */
  1407. } pexUpdatePickMeasureReq;
  1408.  
  1409. typedef struct {
  1410.     CARD8         reqType;
  1411.     CARD8         opcode;
  1412.     CARD16         length B16;   /* 6 + n */
  1413.     pexEnumTypeIndex    fpFormat B16;
  1414.     pexEnumTypeIndex    method B16;
  1415.     pexRenderer        rdr B32;
  1416.     Drawable        drawable B32;
  1417.     INT32         sid B32;
  1418.     /* SINGLE PickRecord () */
  1419. } pexBeginPickOneReq;
  1420.  
  1421. typedef struct {
  1422.     CARD8         reqType;
  1423.     CARD8         opcode;
  1424.     CARD16         length B16;   /* 2 */
  1425.     pexRenderer        rdr B32;
  1426. } pexEndPickOneReq;
  1427.  
  1428. typedef struct {
  1429.     CARD8         reqType;
  1430.     CARD8         opcode;
  1431.     CARD16         length B16;   /* 6 + n */
  1432.     pexEnumTypeIndex    fpFormat B16;
  1433.     pexEnumTypeIndex    method B16;
  1434.     pexRenderer        rdr B32;
  1435.     Drawable        drawable B32;
  1436.     pexStructure    sid B32;
  1437.     /* SINGLE PickRecord () */
  1438. } pexPickOneReq;
  1439.  
  1440. typedef struct {
  1441.     CARD8         reqType;
  1442.     CARD8         opcode;
  1443.     CARD16         length B16;   /* 7 + n */
  1444.     pexEnumTypeIndex    fpFormat B16;
  1445.     pexEnumTypeIndex    method B16;
  1446.     CARD8         sendEvent;
  1447.     CARD8         unused[3];
  1448.     pexRenderer        rdr B32;
  1449.     Drawable        drawable B32;
  1450.     INT32        sid B32;
  1451.     CARD32              pickMaxHits B32;
  1452.     /* SINGLE PickRecord () */
  1453. } pexBeginPickAllReq;
  1454.  
  1455. typedef struct {
  1456.     CARD8         reqType;
  1457.     CARD8         opcode;
  1458.     CARD16         length B16;   /* 2 */
  1459.     pexRenderer        rdr B32;
  1460. } pexEndPickAllReq;
  1461.  
  1462. typedef struct {
  1463.     CARD8         reqType;
  1464.     CARD8         opcode;
  1465.     CARD16         length B16;   /* 6 + n */
  1466.     pexEnumTypeIndex    fpFormat B16;
  1467.     pexEnumTypeIndex    method B16;
  1468.     pexRenderer        rdr B32;
  1469.     Drawable        drawable B32;
  1470.     CARD32              pickMaxHits B32;
  1471.     /* SINGLE RendererPickRecord () */
  1472. } pexPickAllReq;
  1473.  
  1474. typedef struct {
  1475.     CARD8     reqType;
  1476.     CARD8     opcode;
  1477.     CARD16     length B16;
  1478.     pexFont    font B32;
  1479.     CARD32    numBytes B32;
  1480.     /* LISTof CARD8( numBytes ) -- don't swap */
  1481.     /* pad( numBytes ) */
  1482. } pexLoadFontReq;
  1483.  
  1484. typedef pexResourceReq pexUnloadFontReq;
  1485.  
  1486. typedef struct {
  1487.     CARD8        reqType;
  1488.     CARD8        opcode;
  1489.     CARD16        length B16;
  1490.     pexFont        font B32;
  1491. } pexQueryFontReq;
  1492.  
  1493. typedef struct {
  1494.     CARD8     reqType;
  1495.     CARD8     opcode;
  1496.     CARD16     length B16;
  1497.     CARD16    maxNames B16;
  1498.     CARD16    numChars B16;
  1499.     /* LISTof CARD8( numChars ) -- don't swap */
  1500.     /* pad( numBytes ) */
  1501. } pexListFontsReq;
  1502.  
  1503. typedef struct {
  1504.     CARD8        reqType;
  1505.     CARD8        opcode;
  1506.     CARD16        length B16;
  1507.     CARD16        unused B16;
  1508.     CARD16        maxNames B16;
  1509.     CARD16        numChars B16;
  1510.     CARD16        pad B16;
  1511.     /* LISTof CARD8( numChars )  */
  1512.     /* pad( numBytes ) */
  1513. } pexListFontsWithInfoReq;
  1514.  
  1515. typedef struct {
  1516.     CARD8            reqType;
  1517.     CARD8            opcode;
  1518.     CARD16            length B16;
  1519.     pexEnumTypeIndex        fpFormat B16;
  1520.     CARD16            textPath B16;
  1521.     pexTableIndex        fontGroupIndex  B16;
  1522.     CARD16            unused B16;
  1523.     XID                id B32;    /* renderer, wks, or text font lut */
  1524.     PEXFLOAT            charExpansion B32;
  1525.     PEXFLOAT            charSpacing B32;
  1526.     PEXFLOAT            charHeight B32;
  1527.     CARD16            alignment_vertical B16;
  1528.     CARD16            alignment_horizontal B16;
  1529.     CARD32            numStrings B32;
  1530.     /* LISTof LISTof MONO_ENCODINGS() */
  1531.     /* pad() */
  1532. }  pexQueryTextExtentsReq;
  1533.  
  1534. /*****************************************************************
  1535.  * Output Commands 
  1536.  *****************************************************************/
  1537.  
  1538. typedef struct {
  1539.     CARD16        oc_opcode B16;
  1540.     CARD16        oc_length B16;
  1541.     pexEnumTypeIndex    markerType B16;
  1542.     CARD16        pad B16;
  1543. } pexMarkerType;
  1544.  
  1545. typedef struct {
  1546.     CARD16        oc_opcode B16;
  1547.     CARD16        oc_length B16;
  1548.     PEXFLOAT        scale B32;
  1549. } pexMarkerScale;
  1550.  
  1551. typedef struct {
  1552.     CARD16        oc_opcode B16;
  1553.     CARD16        oc_length B16;
  1554.     pexTableIndex    index B16;
  1555.     CARD16        pad B16;
  1556. } pexMarkerBundleIndex;
  1557.  
  1558. typedef pexMarkerBundleIndex  pexMarkerColorIndex;
  1559. typedef pexMarkerBundleIndex  pexTextColorIndex;
  1560. typedef pexMarkerBundleIndex  pexLineColorIndex;
  1561. typedef pexMarkerBundleIndex  pexSurfaceColorIndex;
  1562. typedef pexMarkerBundleIndex  pexBFSurfaceColorIndex;
  1563. typedef pexMarkerBundleIndex  pexSurfaceEdgeColorIndex;
  1564.  
  1565. typedef pexMarkerBundleIndex pexTextFontIndex;
  1566.  
  1567. typedef struct {
  1568.     CARD16        oc_opcode B16;
  1569.     CARD16        oc_length B16;
  1570.     pexColorType    colorType B16;
  1571.     CARD16        unused B16;
  1572.     /* SINGLE COLOR(colorType) */
  1573. } pexMarkerColor;
  1574.  
  1575. typedef pexMarkerColor pexTextColor;
  1576. typedef pexMarkerColor pexLineColor;
  1577. typedef pexMarkerColor pexSurfaceColor;
  1578. typedef pexMarkerColor pexBFSurfaceColor;
  1579. typedef pexMarkerColor pexSurfaceEdgeColor;
  1580.  
  1581. typedef struct {
  1582.     CARD16        oc_opcode B16;
  1583.     CARD16        oc_length B16;
  1584.     pexEnumTypeIndex    style B16;
  1585.     CARD16        pad B16;
  1586. } pexATextStyle;
  1587.  
  1588. typedef pexMarkerBundleIndex pexTextBundleIndex;
  1589. typedef pexMarkerBundleIndex pexLineBundleIndex;
  1590. typedef pexMarkerBundleIndex pexInteriorBundleIndex;
  1591. typedef pexMarkerBundleIndex pexInteriorStyleIndex;
  1592. typedef pexMarkerBundleIndex pexBFInteriorStyleIndex;
  1593. typedef pexMarkerBundleIndex pexEdgeBundleIndex;
  1594. typedef pexMarkerBundleIndex pexViewIndex;
  1595. typedef pexMarkerBundleIndex pexDepthCueIndex;
  1596. typedef pexMarkerBundleIndex pexColorApproxIndex;
  1597.  
  1598. typedef struct {
  1599.     CARD16        oc_opcode B16;
  1600.     CARD16        oc_length B16;
  1601.     CARD16        precision B16;
  1602.     CARD16        pad B16;
  1603. } pexTextPrecision;
  1604.  
  1605. typedef struct {
  1606.     CARD16        oc_opcode B16;
  1607.     CARD16        oc_length B16;
  1608.     PEXFLOAT        expansion B32;
  1609. } pexCharExpansion;
  1610.  
  1611. typedef struct {
  1612.     CARD16        oc_opcode B16;
  1613.     CARD16        oc_length B16;
  1614.     PEXFLOAT        spacing B32;
  1615. } pexCharSpacing;
  1616.  
  1617. typedef struct {
  1618.     CARD16        oc_opcode B16;
  1619.     CARD16        oc_length B16;
  1620.     PEXFLOAT        height B32;
  1621. } pexCharHeight;
  1622. typedef pexCharHeight pexATextHeight;
  1623.  
  1624. typedef struct {
  1625.     CARD16        oc_opcode B16;
  1626.     CARD16        oc_length B16;
  1627.     PEXFLOAT        up_x B32;
  1628.     PEXFLOAT        up_y B32;
  1629. } pexCharUpVector;
  1630. typedef pexCharUpVector pexATextUpVector;
  1631.  
  1632. typedef struct {
  1633.     CARD16        oc_opcode B16;
  1634.     CARD16        oc_length B16;
  1635.     CARD16        path B16;
  1636.     CARD16        pad B16;
  1637. } pexTextPath;
  1638. typedef pexTextPath pexATextPath;
  1639.  
  1640. typedef struct {
  1641.     CARD16        oc_opcode B16;
  1642.     CARD16        oc_length B16;
  1643.     CARD16        alignment_vertical B16;
  1644.     CARD16        alignment_horizontal B16;
  1645. } pexTextAlignment;
  1646. typedef pexTextAlignment pexATextAlignment;
  1647.  
  1648. typedef struct {
  1649.     CARD16        oc_opcode B16;
  1650.     CARD16        oc_length B16;
  1651.     pexEnumTypeIndex    lineType B16;
  1652.     CARD16        pad B16;
  1653. } pexLineType;
  1654.  
  1655. typedef struct {
  1656.     CARD16        oc_opcode B16;
  1657.     CARD16        oc_length B16;
  1658.     PEXFLOAT        width B32;
  1659. } pexLineWidth;
  1660. typedef pexLineWidth    pexSurfaceEdgeWidth;
  1661.  
  1662. typedef struct {
  1663.     CARD16        oc_opcode B16;
  1664.     CARD16        oc_length B16;
  1665.     pexEnumTypeIndex    approxMethod B16;
  1666.     CARD16        unused B16;
  1667.     PEXFLOAT        tolerance B32;
  1668. } pexCurveApprox;
  1669.  
  1670. typedef struct {
  1671.     CARD16        oc_opcode B16;
  1672.     CARD16        oc_length B16;
  1673.     pexEnumTypeIndex    polylineInterp B16;
  1674.     CARD16        pad B16;
  1675. } pexPolylineInterpMethod;
  1676.  
  1677. typedef struct {
  1678.     CARD16        oc_opcode B16;
  1679.     CARD16        oc_length B16;
  1680.     pexEnumTypeIndex    interiorStyle B16;
  1681.     CARD16        pad B16;
  1682. } pexInteriorStyle;
  1683. typedef pexInteriorStyle pexBFInteriorStyle;
  1684.  
  1685. typedef struct {
  1686.     CARD16        oc_opcode B16;
  1687.     CARD16        oc_length B16;
  1688.     PEXFLOAT        ambient B32;
  1689.     PEXFLOAT        diffuse B32;
  1690.     PEXFLOAT        specular B32;
  1691.     PEXFLOAT        specularConc B32;
  1692.     PEXFLOAT        transmission B32;
  1693.     pexColorType    specular_colorType B16;
  1694.     CARD16        unused B16;
  1695.     /* SINGLE COLOR(specular_colorType) */
  1696. } pexReflectionAttributes;
  1697. typedef pexReflectionAttributes pexBFReflectionAttributes;
  1698.  
  1699. typedef struct {
  1700.     CARD16        oc_opcode B16;
  1701.     CARD16        oc_length B16;
  1702.     pexEnumTypeIndex    reflectionModel B16;
  1703.     CARD16        pad B16;
  1704. } pexReflectionModel;
  1705. typedef pexReflectionModel pexBFReflectionModel;
  1706.  
  1707. typedef struct {
  1708.     CARD16        oc_opcode B16;
  1709.     CARD16        oc_length B16;
  1710.     pexEnumTypeIndex    surfaceInterp B16;
  1711.     CARD16        pad B16;
  1712. } pexSurfaceInterpMethod;
  1713. typedef pexSurfaceInterpMethod pexBFSurfaceInterpMethod;
  1714.  
  1715. typedef struct {
  1716.     CARD16        oc_opcode B16;
  1717.     CARD16        oc_length B16;
  1718.     pexEnumTypeIndex    approxMethod B16;
  1719.     CARD16        unused B16;
  1720.     PEXFLOAT        uTolerance B32;
  1721.     PEXFLOAT        vTolerance B32;
  1722. } pexSurfaceApprox;
  1723.  
  1724. typedef struct {
  1725.     CARD16        oc_opcode B16;
  1726.     CARD16        oc_length B16;
  1727.     pexCullMode        cullMode B16;
  1728.     CARD16        pad B16;
  1729. } pexFacetCullingMode;
  1730.  
  1731. typedef struct {
  1732.     CARD16        oc_opcode B16;
  1733.     CARD16        oc_length B16;
  1734.     pexSwitch        distinguish;
  1735.     BYTE        pad[3];
  1736. } pexFacetDistinguishFlag;
  1737.  
  1738. typedef struct {
  1739.     CARD16        oc_opcode B16;
  1740.     CARD16        oc_length B16;
  1741.     PEXFLOAT        size_x B32;
  1742.     PEXFLOAT        size_y B32;
  1743. } pexPatternSize;
  1744.  
  1745. typedef struct {
  1746.     CARD16        oc_opcode B16;
  1747.     CARD16        oc_length B16;
  1748.     PEXFLOAT        point_x B32;
  1749.     PEXFLOAT        point_y B32;
  1750. } pexPatternAttributes2D;
  1751.  
  1752. typedef struct {
  1753.     CARD16        oc_opcode B16;
  1754.     CARD16        oc_length B16;
  1755.     PEXFLOAT        refPt_x B32;
  1756.     PEXFLOAT        refPt_y B32;
  1757.     PEXFLOAT        refPt_z B32;
  1758.     PEXFLOAT        vector1_x B32;
  1759.     PEXFLOAT        vector1_y B32;
  1760.     PEXFLOAT        vector1_z B32;
  1761.     PEXFLOAT        vector2_x B32;
  1762.     PEXFLOAT        vector2_y B32;
  1763.     PEXFLOAT        vector2_z B32;
  1764. } pexPatternAttributes;
  1765.  
  1766. typedef struct {
  1767.     CARD16        oc_opcode B16;
  1768.     CARD16        oc_length B16;
  1769.     pexSwitch        onoff;
  1770.     BYTE        pad[3];
  1771. } pexSurfaceEdgeFlag;
  1772.  
  1773. typedef struct {
  1774.     CARD16        oc_opcode B16;
  1775.     CARD16        oc_length B16;
  1776.     pexEnumTypeIndex    edgeType B16;
  1777.     CARD16        pad B16;
  1778. } pexSurfaceEdgeType;
  1779.  
  1780. typedef struct {
  1781.     CARD16        oc_opcode B16;
  1782.     CARD16        oc_length B16;
  1783.     pexAsfAttribute    attribute B32;
  1784.     pexAsfValue        source;
  1785.     BYTE        pad[3];
  1786. } pexIndividualASF;
  1787.  
  1788. typedef struct {
  1789.     CARD16        oc_opcode B16;
  1790.     CARD16        oc_length B16;
  1791.     pexComposition    compType B16;
  1792.     CARD16        unused B16;
  1793.     pexMatrix        matrix;
  1794. } pexLocalTransform;
  1795.  
  1796. typedef struct {
  1797.     CARD16        oc_opcode B16;
  1798.     CARD16        oc_length B16;
  1799.     pexComposition    compType B16;
  1800.     CARD16        unused B16;
  1801.     pexMatrix3X3    matrix3X3;
  1802. } pexLocalTransform2D;
  1803.  
  1804. typedef struct {
  1805.     CARD16        oc_opcode B16;
  1806.     CARD16        oc_length B16;
  1807.     pexMatrix        matrix;
  1808. } pexGlobalTransform;
  1809.  
  1810. typedef struct {
  1811.     CARD16        oc_opcode B16;
  1812.     CARD16        oc_length B16;
  1813.     pexMatrix3X3    matrix3X3;
  1814. } pexGlobalTransform2D;
  1815.  
  1816. typedef struct {
  1817.     CARD16        oc_opcode B16;
  1818.     CARD16        oc_length B16;
  1819.     pexSwitch        onoff;
  1820.     BYTE        pad[3];
  1821. } pexModelClipFlag;
  1822.  
  1823. typedef struct {
  1824.     CARD16        oc_opcode B16;
  1825.     CARD16        oc_length B16;
  1826.     pexEnumTypeIndex    modelClipOperator B16;
  1827.     CARD16        numHalfSpaces B16;
  1828.     /* LISTof pexHalfSpace( numHalfSpaces ) */
  1829. } pexModelClipVolume;
  1830.  
  1831. typedef struct {
  1832.     CARD16        oc_opcode B16;
  1833.     CARD16        oc_length B16;
  1834.     pexEnumTypeIndex    modelClipOperator B16;
  1835.     CARD16        numHalfSpaces B16;
  1836.     /* LISTof pexHalfSpace2D( numHalfSpaces ) */
  1837. } pexModelClipVolume2D;
  1838.  
  1839. typedef struct {
  1840.     CARD16        oc_opcode B16;
  1841.     CARD16        oc_length B16;
  1842. } pexRestoreModelClipVolume;
  1843.  
  1844. typedef struct {
  1845.     CARD16        oc_opcode B16;
  1846.     CARD16        oc_length B16;
  1847.     CARD16        numEnable B16;
  1848.     CARD16        numDisable B16;
  1849.     /* LISTof pexTableIndex( numEnable ) */
  1850.     /* pad( ( numEnable )*2 ) */
  1851.     /* LISTof pexTableIndex( numDisable ) */
  1852.     /* pad( ( numDisable )*2 ) */
  1853. } pexLightSourceState;
  1854.  
  1855. typedef struct {
  1856.     CARD16        oc_opcode B16;
  1857.     CARD16        oc_length B16;
  1858.     CARD32        pickId B32;
  1859. } pexPickID;
  1860.  
  1861. typedef struct {
  1862.     CARD16        oc_opcode B16;
  1863.     CARD16        oc_length B16;
  1864.     CARD32        hlhsrID B32;
  1865. } pexHLHSRID;
  1866.  
  1867. typedef struct {
  1868.     CARD16        oc_opcode B16;
  1869.     CARD16        oc_length B16;
  1870.     pexEnumTypeIndex    model B16;
  1871.     CARD16        pad B16;
  1872. } pexRenderingColorModel;
  1873.  
  1874. typedef struct {
  1875.     CARD16        oc_opcode B16;
  1876.     CARD16        oc_length B16;
  1877.     pexEnumTypeIndex    characteristics B16;
  1878.     CARD16        length B16;
  1879.     /* SINGLEof PARAMETRIC_SURFACE_CHARACTERISTICS */
  1880. } pexParaSurfCharacteristics;
  1881.  
  1882. typedef struct {
  1883.     CARD16        oc_opcode B16;
  1884.     CARD16        oc_length B16;
  1885.     /* LISTof pexName() */
  1886. } pexAddToNameSet;
  1887. typedef pexAddToNameSet pexRemoveFromNameSet;
  1888.  
  1889. typedef struct {
  1890.     CARD16        oc_opcode B16;
  1891.     CARD16        oc_length B16;
  1892.     pexStructure    id B32;
  1893. } pexExecuteStructure;
  1894.  
  1895. typedef struct {
  1896.     CARD16        oc_opcode B16;
  1897.     CARD16        oc_length B16;
  1898.     INT32        label B32;
  1899. } pexLabel;
  1900.  
  1901. typedef struct {
  1902.     CARD16        oc_opcode B16;
  1903.     CARD16        oc_length B16;
  1904.     CARD16        numElements B16;
  1905.     CARD16        unused B16;
  1906.     /* LISTof CARD8( numElements ) -- don't swap */
  1907.     /* pad( numElements ) */
  1908. } pexApplicationData;
  1909.     
  1910. typedef struct {
  1911.     CARD16        oc_opcode B16;
  1912.     CARD16        oc_length B16;
  1913.     CARD32        id B32;
  1914.     CARD16        numElements B16;
  1915.     CARD16        unused B16;
  1916.     /* LISTof CARD8( numElements ) -- don't swap */
  1917.     /* pad( numElements ) */
  1918. } pexGSE;
  1919.  
  1920. typedef struct {
  1921.     CARD16        oc_opcode B16;
  1922.     CARD16        oc_length B16;
  1923.     /* LISTof pexCoord3D() */
  1924. } pexMarkers;    
  1925.  
  1926. typedef struct {
  1927.     CARD16        oc_opcode B16;
  1928.     CARD16        oc_length B16;
  1929.     /* LISTof pexCoord2D() */
  1930. } pexMarkers2D;    
  1931.  
  1932. typedef struct {
  1933.     CARD16        oc_opcode B16;
  1934.     CARD16        oc_length B16;
  1935.     PEXFLOAT        origin_x B32;
  1936.     PEXFLOAT        origin_y B32;
  1937.     PEXFLOAT        origin_z B32;
  1938.     PEXFLOAT        vector1_x B32;
  1939.     PEXFLOAT        vector1_y B32;
  1940.     PEXFLOAT        vector1_z B32;
  1941.     PEXFLOAT        vector2_x B32;
  1942.     PEXFLOAT        vector2_y B32;
  1943.     PEXFLOAT        vector2_z B32;
  1944.     CARD16        numEncodings B16;
  1945.     CARD16        unused B16;
  1946.     /* LISTof pexMonoEncoding( numEncodings ) */
  1947. } pexText;
  1948.  
  1949. typedef struct {
  1950.     CARD16        oc_opcode B16;
  1951.     CARD16        oc_length B16;
  1952.     PEXFLOAT        origin_x B32;
  1953.     PEXFLOAT        origin_y B32;
  1954.     CARD16        numEncodings B16;
  1955.     CARD16        unused B16;
  1956.     /* LISTof pexMonoEncoding( numEncodings ) */
  1957. } pexText2D;
  1958.  
  1959. typedef struct {
  1960.     CARD16        oc_opcode B16;
  1961.     CARD16        oc_length B16;
  1962.     PEXFLOAT        origin_x B32;
  1963.     PEXFLOAT        origin_y B32;
  1964.     PEXFLOAT        origin_z B32;
  1965.     PEXFLOAT        offset_x B32;
  1966.     PEXFLOAT        offset_y B32;
  1967.     PEXFLOAT        offset_z B32;
  1968.     CARD16        numEncodings B16;
  1969.     CARD16        unused B16;
  1970.     /* LISTof pexMonoEncoding( numEncodings ) */
  1971. } pexAnnotationText;
  1972.  
  1973. typedef struct {
  1974.     CARD16        oc_opcode B16;
  1975.     CARD16        oc_length B16;
  1976.     PEXFLOAT        origin_x B32;
  1977.     PEXFLOAT        origin_y B32;
  1978.     PEXFLOAT        offset_x B32;
  1979.     PEXFLOAT        offset_y B32;
  1980.     CARD16        numEncodings B16;
  1981.     CARD16        unused B16;
  1982.     /* LISTof pexMonoEncoding( numEncodings ) */
  1983. } pexAnnotationText2D;
  1984.  
  1985. typedef struct {
  1986.     CARD16        oc_opcode B16;
  1987.     CARD16        oc_length B16;
  1988.     /* LISTof pexCoord3D() */
  1989. } pexPolyline;
  1990.  
  1991. typedef struct {
  1992.     CARD16        oc_opcode B16;
  1993.     CARD16        oc_length B16;
  1994.     /* LISTof pexCoord2D() */
  1995. } pexPolyline2D;
  1996.  
  1997. typedef struct {
  1998.     CARD16        oc_opcode B16;
  1999.     CARD16        oc_length B16;
  2000.     pexColorType    colorType B16;
  2001.     pexBitmaskShort    vertexAttribs B16;
  2002.     CARD32        numLists B32;
  2003.     /* LISTof CLISTof pexVertex( numLists, vertexAttribs, colorType ) */
  2004. } pexPolylineSetWithData;
  2005.  
  2006. typedef struct {
  2007.     CARD16        oc_opcode B16;
  2008.     CARD16        oc_length B16;
  2009.     CARD16        curveOrder B16;
  2010.     pexCoordType    coordType B16;
  2011.     PEXFLOAT        tmin B32;
  2012.     PEXFLOAT        tmax B32;
  2013.     CARD32        numKnots B32;
  2014.     CARD32        numPoints B32;
  2015.     /* LISTof FLOAT( numKnots ) */
  2016.     /* LISTof {pexCoord3D|pexCoord4D}( numPoints, coordType ) */
  2017. } pexNURBCurve;
  2018.  
  2019. typedef struct {
  2020.     CARD16        oc_opcode B16;
  2021.     CARD16        oc_length B16;
  2022.     CARD16        shape B16;
  2023.     pexSwitch        ignoreEdges;
  2024.     CARD8        pad;
  2025.     /* LISTof pexCoord3D() */
  2026. } pexFillArea;
  2027.  
  2028. typedef struct {
  2029.     CARD16        oc_opcode B16;
  2030.     CARD16        oc_length B16;
  2031.     CARD16        shape B16;
  2032.     pexSwitch        ignoreEdges;
  2033.     CARD8        unused;
  2034.     /* LISTof pexCoord2D() */
  2035. } pexFillArea2D;
  2036.  
  2037. typedef struct {
  2038.     CARD16        oc_opcode B16;
  2039.     CARD16        oc_length B16;
  2040.     CARD16        shape B16;
  2041.     pexSwitch        ignoreEdges;
  2042.     CARD8        unused;
  2043.     pexColorType    colorType B16;
  2044.     pexBitmaskShort    facetAttribs B16;
  2045.     pexBitmaskShort    vertexAttribs B16;
  2046.     CARD16        unused2 B16;
  2047.     /* SINGLE Facet( facetAttribs, vertexAttribs, colorType ) */
  2048. } pexFillAreaWithData;
  2049.  
  2050. typedef struct {
  2051.     CARD16        oc_opcode B16;
  2052.     CARD16        oc_length B16;
  2053.     CARD16        shape B16;
  2054.     pexSwitch        ignoreEdges;
  2055.     CARD8        contourHint;
  2056.     CARD32        numLists B32;
  2057.     /* LISTof CLISTof Coord3D( numLists ) */
  2058. } pexFillAreaSet;
  2059.  
  2060. typedef struct {
  2061.     CARD16        oc_opcode B16;
  2062.     CARD16        oc_length B16;
  2063.     CARD16        shape B16;
  2064.     pexSwitch        ignoreEdges;
  2065.     CARD8        contourHint;
  2066.     CARD32        numLists B32;
  2067.     /* LISTof CLISTof Coord2D( numLists ) */
  2068. } pexFillAreaSet2D;
  2069.  
  2070.  
  2071. typedef struct {
  2072.     CARD16        oc_opcode B16;
  2073.     CARD16        oc_length B16;
  2074.     CARD16        shape B16;
  2075.     pexSwitch        ignoreEdges;
  2076.     CARD8        contourHint;
  2077.     pexColorType    colorType B16;
  2078.     pexBitmaskShort    facetAttribs B16;
  2079.     pexBitmaskShort    vertexAttribs B16;
  2080.     CARD16        unused2 B16;
  2081.     CARD32        numLists B32;
  2082.     /* pexOptData( facetAttribs ) */
  2083.     /* LISTof CLISTof  pexVertex( numLists, vertexAttribs, colorType ) */
  2084. } pexFillAreaSetWithData;
  2085.  
  2086. typedef struct {
  2087.     CARD16        oc_opcode B16;
  2088.     CARD16        oc_length B16;
  2089.     pexColorType    colorType B16;
  2090.     pexBitmaskShort    facetAttribs B16;
  2091.     pexBitmaskShort    vertexAttribs B16;
  2092.     CARD16        unused B16;
  2093.     CARD32        numVertices B32;
  2094.     /* number of OptData is numVert - 2 */
  2095.     /* LISTof pexOptData( facetAttribs, colorType ) */
  2096.     /* LISTof pexVertex( numVertices, vertexAttribs, colorType ) */
  2097. } pexTriangleStrip;
  2098.  
  2099. typedef struct {
  2100.     CARD16        oc_opcode B16;
  2101.     CARD16        oc_length B16;
  2102.     pexColorType    colorType B16;
  2103.     CARD16        mPts B16;
  2104.     CARD16        nPts B16;
  2105.     pexBitmaskShort    facetAttribs B16;
  2106.     pexBitmaskShort    vertexAttribs B16;
  2107.     CARD16        shape B16;
  2108.     /* actually, there are (mPts-1)*(nPts-1) opt data entries */
  2109.     /* LISTof pexOptData( facetAttribs, colorType ) */
  2110.     /* LISTof pexVertex( mPts, nPts, vertexAttribs, colorType ) */
  2111. } pexQuadrilateralMesh;
  2112.  
  2113. typedef struct {
  2114.     CARD16        oc_opcode B16;
  2115.     CARD16        oc_length B16;
  2116.     CARD16        shape B16;
  2117.     pexColorType    colorType B16;
  2118.     CARD16        FAS_Attributes B16;
  2119.     CARD16        vertexAttributes B16;
  2120.     CARD16        edgeAttributes B16;
  2121.     CARD8        contourHint;
  2122.     pexSwitch        contourCountsFlag;
  2123.     CARD16        numFAS B16;
  2124.     CARD16        numVertices B16;
  2125.     CARD16        numEdges B16;
  2126.     CARD16        numContours B16;
  2127.     /* LISTof OPT_DATA( numFAS ) */
  2128.     /* LISTof pexVertex( numVertices ) */
  2129.     /* LISTof CARD8( numEdges ) */
  2130.     /* pad( numEdges ) */
  2131.     /* LISTof CLISTof CLISTof CARD16( numFAS, numContours, numEdges ) */
  2132.     /* pad */
  2133. } pexSetOfFillAreaSets;
  2134.  
  2135. typedef struct {
  2136.     CARD16        oc_opcode B16;
  2137.     CARD16        oc_length B16;
  2138.     pexCoordType     type B16;
  2139.     CARD16        uOrder B16;
  2140.     CARD16        vOrder B16;
  2141.     CARD16        unused B16;
  2142.     CARD32        numUknots B32;
  2143.     CARD32        numVknots B32;
  2144.     CARD16        mPts B16;
  2145.     CARD16        nPts B16;
  2146.     CARD32        numLists B32;
  2147.     /* LISTof FLOAT( numUknots ) */
  2148.     /* LISTof FLOAT( numVKnots ) */
  2149.     /* LISTof {pexCoord3D|pexCoord4D}( mPts, nPts, surfaceType ) */
  2150.     /* LISTof CLISTof pexTrimCurve( numLists ) */
  2151. } pexNURBSurface;
  2152.  
  2153. typedef struct {
  2154.     CARD16        oc_opcode B16;
  2155.     CARD16        oc_length B16;
  2156.     PEXFLOAT        point1_x B32;
  2157.     PEXFLOAT        point1_y B32;
  2158.     PEXFLOAT        point1_z B32;
  2159.     PEXFLOAT        point2_x B32;
  2160.     PEXFLOAT        point2_y B32;
  2161.     PEXFLOAT        point2_z B32;
  2162.     PEXFLOAT        point3_x B32;
  2163.     PEXFLOAT        point3_y B32;
  2164.     PEXFLOAT        point3_z B32;
  2165.     CARD32        dx B32;
  2166.     CARD32        dy B32;
  2167.     /* LISTof pexTableIndex( dx, dy ) */
  2168.     /* pad(  2*dx*dy ) */
  2169. } pexCellArray;
  2170.  
  2171. typedef struct {
  2172.     CARD16        oc_opcode B16;
  2173.     CARD16        oc_length B16;
  2174.     PEXFLOAT        point1_x B32;
  2175.     PEXFLOAT        point1_y B32;
  2176.     PEXFLOAT        point2_x B32;
  2177.     PEXFLOAT        point2_y B32;
  2178.     CARD32        dx B32;
  2179.     CARD32        dy B32;
  2180.     /* LISTof pexTableIndex( dx, dy ) */
  2181.     /* pad( 2*dx*dy ) */
  2182. } pexCellArray2D;
  2183.  
  2184. typedef struct {
  2185.     CARD16        oc_opcode B16;
  2186.     CARD16        oc_length B16;
  2187.     pexColorType    colorType B16;
  2188.     CARD16        unused B16;
  2189.     PEXFLOAT        point1_x B32;
  2190.     PEXFLOAT        point1_y B32;
  2191.     PEXFLOAT        point1_z B32;
  2192.     PEXFLOAT        point2_x B32;
  2193.     PEXFLOAT        point2_y B32;
  2194.     PEXFLOAT        point2_z B32;
  2195.     PEXFLOAT        point3_x B32;
  2196.     PEXFLOAT        point3_y B32;
  2197.     PEXFLOAT        point3_z B32;
  2198.     CARD32        dx B32;
  2199.     CARD32        dy B32;
  2200.     /* LISTof pexColorSpecifier( dx, dy ) */
  2201. } pexExtendedCellArray;
  2202.  
  2203. typedef struct {
  2204.     CARD16        oc_opcode B16;
  2205.     CARD16        oc_length B16;
  2206.     INT32        gdpId B32;
  2207.     CARD32        numPoints B32;
  2208.     CARD32        numBytes B32;
  2209.     /* LISTof pexCoord3D( numPoints ) */
  2210.     /* LISTof CARD8( numBytes ) -- don't swap */
  2211.     /* pad( numBytes ) */
  2212. } pexGDP;
  2213.  
  2214. typedef struct {
  2215.     CARD16        oc_opcode B16;
  2216.     CARD16        oc_length B16;
  2217.     INT32        gdpId B32;
  2218.     CARD32        numPoints B32;
  2219.     CARD32        numBytes B32;
  2220.     /* LISTof pexCoord2D( numPoints ) */
  2221.     /* LISTof CARD8( numBytes ) -- don't swap */
  2222.     /* pad( numBytes ) */
  2223. } pexGDP2D;
  2224.  
  2225. typedef struct {
  2226.     CARD16        oc_opcode B16;
  2227.     CARD16        oc_length B16;
  2228. } pexNoop;
  2229.  
  2230. /****************************************************************
  2231.  *          EVENTS                         *
  2232.  ****************************************************************/
  2233. /* Event structure */
  2234.  
  2235. typedef struct {
  2236.     BYTE    type;            /* X_Event */
  2237.     CARD8    what;            /* unused */
  2238.     CARD16    sequenceNumber    B16;
  2239.     CARD32    rdr B32;        
  2240.     BYTE    pad[24];
  2241. } pexMaxHitsReachedEvent;
  2242.  
  2243. #undef XID
  2244. #undef Drawable
  2245.  
  2246. #endif /* _PEXPROTO_H_ */
  2247.  
  2248.