home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / IBMH / PMGPI.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  84KB  |  2,257 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: PMGPI.H
  15. *
  16. * OS/2 Presentation Manager GPI constants, types and function declarations
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * The folowing symbols are used in this file for conditional sections.
  22. *
  23. *   #define:                To include:
  24. *
  25. *   INCL_GPI                Include all of the GPI
  26. *   INCL_GPIBITMAPS         Bitmaps and Pel Operations
  27. *   INCL_GPICONTROL         Basic PS control
  28. *   INCL_GPICORRELATION     Picking, Boundary and Correlation
  29. *   INCL_GPIDEFAULTS        Default Primitive Attributes
  30. *   INCL_GPIERRORS          defined if INCL_ERRORS defined
  31. *   INCL_GPILCIDS           Phyical and Logical Fonts with Lcids
  32. *   INCL_GPILOGCOLORTABLE   Logical Color Tables
  33. *   INCL_GPIMETAFILES       MetaFiles
  34. *   INCL_GPIPATHS           Paths and Clipping with Paths
  35. *   INCL_GPIPOLYGON         Polygons
  36. *   INCL_GPIPRIMITIVES      Drawing Primitives and Primitive Attributes
  37. *   INCL_GPIREGIONS         Regions and Clipping with Regions
  38. *   INCL_GPISEGEDITING      Segment Editing via Elements
  39. *   INCL_GPISEGMENTS        Segment Control and Drawing
  40. *   INCL_GPITRANSFORMS      Transform and Transform Conversion
  41. *
  42. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  43. * include only the definitions for the DDI. The programmer using the GPI
  44. * can ignore this symbol
  45. *
  46. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  47. * include only the definitions for the SAA. The programmer using the GPI
  48. * can ignore this symbol
  49. *
  50. * ===========================================================================
  51. *
  52. * Comments at the end of each typedef line give the name tags used in
  53. * the assembler include version of this file.
  54. *
  55. * The assembler include version of this file excludes lines between NOINC
  56. * and INC comments.
  57. *
  58. \***************************************************************************/
  59.  
  60. /* NOINC */
  61. #ifdef __IBMC__
  62.    #pragma checkout( suspend )
  63.    #ifndef __CHKHDR__
  64.       #pragma checkout( suspend )
  65.    #endif
  66.    #pragma checkout( resume )
  67. #endif
  68. /* INC */
  69.  
  70. #define GPI_INCLUDED
  71.  
  72.  
  73. #ifdef INCL_GPI /* include whole of the GPI */
  74.    #define INCL_GPIBITMAPS
  75.    #define INCL_GPICONTROL
  76.    #define INCL_GPICORRELATION
  77.    #define INCL_GPIDEFAULTS
  78.    #define INCL_GPILCIDS
  79.    #define INCL_GPILOGCOLORTABLE
  80.    #define INCL_GPIMETAFILES
  81.    #define INCL_GPIPATHS
  82.    #define INCL_GPIPOLYGON
  83.    #define INCL_GPIPRIMITIVES
  84.    #define INCL_GPIREGIONS
  85.    #define INCL_GPISEGEDITING
  86.    #define INCL_GPISEGMENTS
  87.    #define INCL_GPITRANSFORMS
  88. #endif /* INCL_GPI */
  89.  
  90.  
  91. #ifdef INCL_ERRORS /* if errors are required then allow GPI errors */
  92.    #define INCL_GPIERRORS
  93. #endif /* INCL_ERRORS */
  94.  
  95.  
  96. #ifdef INCL_DDIDEFS /* if only DDI required then enable DDI part of GPI */
  97.    #define INCL_GPIBITMAPS
  98.    #define INCL_GPIERRORS
  99.    #define INCL_GPILCIDS
  100.    #define INCL_GPILOGCOLORTABLE
  101.    #define INCL_GPIPATHS
  102.    #define INCL_GPIPOLYGON
  103.    #define INCL_GPIPRIMITIVES
  104.    #define INCL_GPIREGIONS
  105.    #define INCL_GPITRANSFORMS
  106. #endif /* INCL_DDIDEFS */
  107.  
  108.  
  109. #ifdef INCL_SAADEFS /* if only SAA required then enable SAA part of GPI */
  110.    #define INCL_GPIBITMAPS
  111.    #define INCL_GPICONTROL
  112.    #define INCL_GPICORRELATION
  113.    #define INCL_GPIERRORS
  114.    #define INCL_GPILCIDS
  115.    #define INCL_GPILOGCOLORTABLE
  116.    #define INCL_GPIMETAFILES
  117.    #define INCL_GPIPATHS
  118.    #define INCL_GPIPOLYGON
  119.    #define INCL_GPIPRIMITIVES
  120.    #define INCL_GPIREGIONS
  121.    #define INCL_GPISEGEDITING
  122.    #define INCL_GPISEGMENTS
  123.    #define INCL_GPITRANSFORMS
  124. #endif /* INCL_SAADEFS */
  125.  
  126. /* General GPI return values */
  127. #define GPI_ERROR                       0L
  128. #define GPI_OK                          1L
  129. #define GPI_ALTERROR                  (-1L)
  130.  
  131. /* fixed point number - implicit binary point between 2 and 3 hex digits */
  132. typedef  LONG FIXED;     /* fx */
  133. typedef  FIXED *PFIXED;
  134.  
  135. /* fixed point number - implicit binary point between 1st and 2nd hex digits */
  136. typedef  USHORT FIXED88;  /* fx88 */
  137.  
  138. /* fixed point signed number - implicit binary point between bits 14 and 13. */
  139. /*                             Bit 15 is the sign bit.                       */
  140. /*                             Thus 1.0 is represented by 16384 (0x4000)     */
  141. /*                             and -1.0 is represented by -16384 (0xc000)    */
  142. typedef  USHORT FIXED114; /* fx114 */
  143.  
  144. /* make FIXED number from SHORT integer part and USHORT fractional part */
  145. #define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart)
  146. /* extract fractional part from a fixed quantity */
  147. #define FIXEDFRAC(fx)                (LOUSHORT(fx))
  148. /* extract integer part from a fixed quantity */
  149. #define FIXEDINT(fx)                 ((SHORT)HIUSHORT(fx))
  150.  
  151. /* structure for size parameters e.g. for GpiCreatePS */
  152. typedef struct _SIZEL            /* sizl */
  153. {
  154.    LONG cx;
  155.    LONG cy;
  156. } SIZEL;
  157. typedef SIZEL *PSIZEL;
  158.  
  159. /* return code on GpiQueryLogColorTable,GpiQueryRealColors and GpiQueryPel */
  160. #define CLR_NOINDEX                  (-254L)
  161.  
  162. #if (defined(INCL_GPICONTROL) || !defined(INCL_NOCOMMON))
  163.    
  164.    /* units for GpiCreatePS and others */
  165.    #define PU_ARBITRARY               0x0004L
  166.    #define PU_PELS                    0x0008L
  167.    #define PU_LOMETRIC                0x000CL
  168.    #define PU_HIMETRIC                0x0010L
  169.    #define PU_LOENGLISH               0x0014L
  170.    #define PU_HIENGLISH               0x0018L
  171.    #define PU_TWIPS                   0x001CL
  172.    
  173.    /* format for GpiCreatePS */
  174.    #define GPIF_DEFAULT                    0L
  175.    #define GPIF_SHORT                 0x0100L
  176.    #define GPIF_LONG                  0x0200L
  177.    
  178.    
  179.    /* PS type for GpiCreatePS */
  180.    #define GPIT_NORMAL                     0L
  181.    #define GPIT_MICRO                 0x1000L
  182.    
  183.    
  184.    /* implicit associate flag for GpiCreatePS */
  185.    #define GPIA_NOASSOC                    0L
  186.    #define GPIA_ASSOC                 0x4000L
  187.    
  188.    /* PS Fill type for GpiCreatePS defect: 61035 RickT Add exclusive fill */
  189.    #define GPIM_AREAEXCL              0x8000L
  190.    
  191.    
  192.    #ifndef INCL_SAADEFS
  193.       /* return error for GpiQueryDevice */
  194.       #define HDC_ERROR                ((HDC)-1L)
  195.    #endif /* no INCL_SAADEFS */
  196.    
  197.    /* common GPICONTROL functions */
  198.    
  199.    HPS   APIENTRY GpiCreatePS(HAB hab,
  200.                               HDC hdc,
  201.                               PSIZEL psizlSize,
  202.                               ULONG flOptions);
  203.    
  204.    BOOL  APIENTRY GpiDestroyPS(HPS hps);
  205.    
  206.    BOOL  APIENTRY GpiAssociate(HPS hps,
  207.                                HDC hdc);
  208.    
  209.    BOOL  APIENTRY GpiRestorePS(HPS hps,
  210.                                LONG lPSid);
  211.    
  212.    LONG  APIENTRY GpiSavePS(HPS hps);
  213.    
  214.    BOOL  APIENTRY GpiErase(HPS hps);
  215.    
  216.    #ifndef INCL_SAADEFS
  217.       
  218.       HDC  APIENTRY GpiQueryDevice(HPS);
  219.    #endif /* no INCL_SAADEFS */
  220.    
  221. #endif /* common GPICONTROL */
  222. #ifdef INCL_GPICONTROL
  223.    
  224.    /* options for GpiResetPS */
  225.    #define GRES_ATTRS                 0x0001L
  226.    #define GRES_SEGMENTS              0x0002L
  227.    #define GRES_ALL                   0x0004L
  228.    
  229.    /* option masks for PS options used by GpiQueryPs */
  230.    #define PS_UNITS                   0x00FCL
  231.    #define PS_FORMAT                  0x0F00L
  232.    #define PS_TYPE                    0x1000L
  233.    #define PS_MODE                    0x2000L
  234.    #define PS_ASSOCIATE               0x4000L
  235.    #define PS_NORESET                 0x8000L
  236.    
  237.    
  238.    /* error context returned by GpiErrorSegmentData */
  239.    #define GPIE_SEGMENT                    0L
  240.    #define GPIE_ELEMENT                    1L
  241.    #define GPIE_DATA                       2L
  242.    
  243.    #ifndef INCL_SAADEFS
  244.       
  245.       /* control parameter for GpiSetDrawControl */
  246.       #define DCTL_ERASE                      1L
  247.       #define DCTL_DISPLAY                    2L
  248.       #define DCTL_BOUNDARY                   3L
  249.       #define DCTL_DYNAMIC                    4L
  250.       #define DCTL_CORRELATE                  5L
  251.       
  252.       /* constants for GpiSet/QueryDrawControl */
  253.       #define DCTL_ERROR                     -1L
  254.       #define DCTL_OFF                        0L
  255.       #define DCTL_ON                         1L
  256.       
  257.       /* constants for GpiSet/QueryStopDraw */
  258.       #define SDW_ERROR                      -1L
  259.       #define SDW_OFF                         0L
  260.       #define SDW_ON                          1L
  261.       
  262.    #endif /* no INCL_SAADEFS */
  263.    
  264.    /* drawing for GpiSet/QueryDrawingMode */
  265.    #define DM_ERROR                        0L
  266.    #define DM_DRAW                         1L
  267.    #define DM_RETAIN                       2L
  268.    #define DM_DRAWANDRETAIN                3L
  269.    
  270.    /*** other GPICONTROL functions */
  271.    
  272.    BOOL  APIENTRY GpiResetPS(HPS hps,
  273.                              ULONG flOptions);
  274.    
  275.    #ifndef INCL_SAADEFS
  276.       
  277.       
  278.       BOOL  APIENTRY GpiSetPS(HPS hps,
  279.                               PSIZEL psizlsize,
  280.                               ULONG flOptions);
  281.       
  282.    #endif /* no INCL_SAADEFS */
  283.    
  284.    
  285.    ULONG  APIENTRY GpiQueryPS(HPS hps,
  286.                               PSIZEL psizlSize);
  287.    
  288.    LONG   APIENTRY GpiErrorSegmentData(HPS hps,
  289.                                        PLONG plSegment,
  290.                                        PLONG plContext);
  291.    
  292.    #ifndef INCL_SAADEFS
  293.       
  294.       
  295.       LONG  APIENTRY GpiQueryDrawControl(HPS hps,
  296.                                          LONG lControl);
  297.       
  298.       BOOL  APIENTRY GpiSetDrawControl(HPS hps,
  299.                                        LONG lControl,
  300.                                        LONG lValue);
  301.       
  302.    #endif /* no INCL_SAADEFS */
  303.    
  304.    
  305.    LONG  APIENTRY GpiQueryDrawingMode(HPS hps);
  306.    
  307.    BOOL  APIENTRY GpiSetDrawingMode(HPS hps,
  308.                                     LONG lMode);
  309.    
  310.    #ifndef INCL_SAADEFS
  311.       
  312.       
  313.       LONG  APIENTRY GpiQueryStopDraw(HPS hps);
  314.       
  315.       BOOL  APIENTRY GpiSetStopDraw(HPS hps,
  316.                                     LONG lValue);
  317.       
  318.    #endif /* no INCL_SAADEFS */
  319.    
  320. #endif /* non-common GPICONTROL */
  321. #ifdef INCL_GPICORRELATION
  322.    
  323.    /* options for GpiSetPickApertureSize */
  324.    #define PICKAP_DEFAULT                  0L
  325.    #define PICKAP_REC                      2L
  326.    
  327.    /* type of correlation for GpiCorrelateChain */
  328.    #define PICKSEL_VISIBLE                 0L
  329.    #define PICKSEL_ALL                     1L
  330.    
  331.    /* return code to indicate correlate hit(s) */
  332.    #define GPI_HITS                        2L
  333.    
  334.    /*** picking,  correlation and boundary functions */
  335.    
  336.    LONG  APIENTRY GpiCorrelateChain(HPS hps,
  337.                                     LONG lType,
  338.                                     PPOINTL pptlPick,
  339.                                     LONG lMaxHits,
  340.                                     LONG lMaxDepth,
  341.                                     PLONG pl2);
  342.    
  343.    BOOL  APIENTRY GpiQueryTag(HPS hps,
  344.                               PLONG plTag);
  345.    
  346.    BOOL  APIENTRY GpiSetTag(HPS hps,
  347.                             LONG lTag);
  348.    
  349.    BOOL  APIENTRY GpiQueryPickApertureSize(HPS hps,
  350.                                            PSIZEL psizlSize);
  351.    
  352.    BOOL  APIENTRY GpiSetPickApertureSize(HPS hps,
  353.                                          LONG lOptions,
  354.                                          PSIZEL psizlSize);
  355.    
  356.    #ifndef INCL_SAADEFS
  357.       
  358.       BOOL  APIENTRY GpiQueryPickAperturePosition(HPS hps,
  359.                                                   PPOINTL pptlPoint);
  360.       
  361.       BOOL  APIENTRY GpiSetPickAperturePosition(HPS hps,
  362.                                                 PPOINTL pptlPick);
  363.       
  364.       BOOL  APIENTRY GpiQueryBoundaryData(HPS hps,
  365.                                           PRECTL prclBoundary);
  366.       
  367.       BOOL  APIENTRY GpiResetBoundaryData(HPS hps);
  368.       
  369.    #endif /* no INCL_SAADEFS */
  370.    
  371.    
  372.    LONG APIENTRY GpiCorrelateFrom(HPS hps,
  373.                                   LONG lFirstSegment,
  374.                                   LONG lLastSegment,
  375.                                   LONG lType,
  376.                                   PPOINTL pptlPick,
  377.                                   LONG lMaxHits,
  378.                                   LONG lMaxDepth,
  379.                                   PLONG plSegTag);
  380.    
  381.    LONG APIENTRY GpiCorrelateSegment(HPS hps,
  382.                                      LONG lSegment,
  383.                                      LONG lType,
  384.                                      PPOINTL pptlPick,
  385.                                      LONG lMaxHits,
  386.                                      LONG lMaxDepth,
  387.                                      PLONG alSegTag);
  388.    
  389. #endif /* non-common_GPICORRELATION */
  390. #ifdef INCL_GPISEGMENTS
  391.    
  392.    /* data formats for GpiPutData and GpiGetData */
  393.    #define DFORM_NOCONV                    0L
  394.    
  395.    #ifndef INCL_SAADEFS
  396.       
  397.       #define DFORM_S370SHORT                 1L
  398.       #define DFORM_PCSHORT                   2L
  399.       #define DFORM_PCLONG                    4L
  400.       
  401.    #endif /* no INCL_SAADEFS */
  402.    
  403.    /* segment attributes used by GpiSet/QuerySegmentAttrs and others */
  404.    #define ATTR_ERROR                    (-1L)
  405.    #define ATTR_DETECTABLE                 1L
  406.    #define ATTR_VISIBLE                    2L
  407.    #define ATTR_CHAINED                    6L
  408.    
  409.    #ifndef INCL_SAADEFS
  410.       
  411.       #define ATTR_DYNAMIC                    8L
  412.       
  413.    #endif /* no INCL_SAADEFS */
  414.    
  415.    #define ATTR_FASTCHAIN                  9L
  416.    #define ATTR_PROP_DETECTABLE           10L
  417.    #define ATTR_PROP_VISIBLE              11L
  418.    
  419.    /* attribute on/off values */
  420.    #define ATTR_OFF                        0L
  421.    #define ATTR_ON                         1L
  422.    
  423.    /* segment priority used by GpiSetSegmentPriority and others */
  424.    #define LOWER_PRI                     (-1L)
  425.    #define HIGHER_PRI                      1L
  426.    
  427.    /*** segment control functions */
  428.    
  429.    BOOL APIENTRY GpiOpenSegment(HPS hps,
  430.                                 LONG lSegment);
  431.    
  432.    BOOL APIENTRY GpiCloseSegment(HPS hps);
  433.    
  434.    BOOL APIENTRY GpiDeleteSegment(HPS hps,
  435.                                   LONG lSegid);
  436.    
  437.    LONG APIENTRY GpiQueryInitialSegmentAttrs(HPS hps,
  438.                                              LONG lAttribute);
  439.    
  440.    BOOL APIENTRY GpiSetInitialSegmentAttrs(HPS hps,
  441.                                            LONG lAttribute,
  442.                                            LONG lValue);
  443.    
  444.    LONG APIENTRY GpiQuerySegmentAttrs(HPS hps,
  445.                                       LONG lSegid,
  446.                                       LONG lAttribute);
  447.    
  448.    BOOL APIENTRY GpiSetSegmentAttrs(HPS hps,
  449.                                     LONG lSegid,
  450.                                     LONG lAttribute,
  451.                                     LONG lValue);
  452.    
  453.    LONG APIENTRY GpiQuerySegmentPriority(HPS hps,
  454.                                          LONG lRefSegid,
  455.                                          LONG lOrder);
  456.    
  457.    BOOL APIENTRY GpiSetSegmentPriority(HPS hps,
  458.                                        LONG lSegid,
  459.                                        LONG lRefSegid,
  460.                                        LONG lOrder);
  461.    
  462.    BOOL APIENTRY GpiDeleteSegments(HPS hps,
  463.                                    LONG lFirstSegment,
  464.                                    LONG lLastSegment);
  465.    
  466.    LONG APIENTRY GpiQuerySegmentNames(HPS hps,
  467.                                       LONG lFirstSegid,
  468.                                       LONG lLastSegid,
  469.                                       LONG lMax,
  470.                                       PLONG alSegids);
  471.    
  472.    /*** draw functions for segments */
  473.    LONG APIENTRY GpiGetData(HPS hps,
  474.                             LONG lSegid,
  475.                             PLONG plOffset,
  476.                             LONG lFormat,
  477.                             LONG lLength,
  478.                             PBYTE pbData);
  479.    
  480.    LONG APIENTRY GpiPutData(HPS hps,
  481.                             LONG lFormat,
  482.                             PLONG plCount,
  483.                             PBYTE pbData);
  484.    
  485.    BOOL APIENTRY GpiDrawChain(HPS hps);
  486.    
  487.    BOOL APIENTRY GpiDrawFrom(HPS hps,
  488.                              LONG lFirstSegment,
  489.                              LONG lLastSegment);
  490.    
  491.    BOOL APIENTRY GpiDrawSegment(HPS hps,
  492.                                 LONG lSegment);
  493.    
  494.    #ifndef INCL_SAADEFS
  495.       
  496.       
  497.       BOOL APIENTRY GpiDrawDynamics(HPS hps);
  498.       
  499.       BOOL APIENTRY GpiRemoveDynamics(HPS hps,
  500.                                       LONG lFirstSegid,
  501.                                       LONG lLastSegid);
  502.       
  503.    #endif /* no INCL_SAADEFS */
  504.    
  505. #endif /* non-common GPISEGMENTS */
  506. #ifdef INCL_GPISEGEDITING
  507.    
  508.    /* edit modes used by GpiSet/QueryEditMode */
  509.    #define SEGEM_ERROR                         0L
  510.    #define SEGEM_INSERT                        1L
  511.    #define SEGEM_REPLACE                       2L
  512.    
  513.    /*** segment editing by element functions */
  514.    
  515.    BOOL  APIENTRY GpiBeginElement(HPS hps,
  516.                                   LONG lType,
  517.                                   PSZ pszDesc);
  518.    
  519.    BOOL  APIENTRY GpiEndElement(HPS hps);
  520.    
  521.    BOOL  APIENTRY GpiLabel(HPS hps,
  522.                            LONG lLabel);
  523.    
  524.    LONG  APIENTRY GpiElement(HPS hps,
  525.                              LONG lType,
  526.                              PSZ pszDesc,
  527.                              LONG lLength,
  528.                              PBYTE pbData);
  529.    
  530.    LONG  APIENTRY GpiQueryElement(HPS hps,
  531.                                   LONG lOff,
  532.                                   LONG lMaxLength,
  533.                                   PBYTE pbData);
  534.    
  535.    BOOL  APIENTRY GpiDeleteElement(HPS hps);
  536.    
  537.    BOOL  APIENTRY GpiDeleteElementRange(HPS hps,
  538.                                         LONG lFirstElement,
  539.                                         LONG lLastElement);
  540.    
  541.    BOOL  APIENTRY GpiDeleteElementsBetweenLabels(HPS hps,
  542.                                                  LONG lFirstLabel,
  543.                                                  LONG lLastLabel);
  544.    
  545.    LONG  APIENTRY GpiQueryEditMode(HPS hps);
  546.    
  547.    BOOL  APIENTRY GpiSetEditMode(HPS hps,
  548.                                  LONG lMode);
  549.    
  550.    LONG  APIENTRY GpiQueryElementPointer(HPS hps);
  551.    
  552.    BOOL  APIENTRY GpiSetElementPointer(HPS hps,
  553.                                        LONG lElement);
  554.    
  555.    BOOL  APIENTRY GpiOffsetElementPointer(HPS hps,
  556.                                           LONG loffset);
  557.    
  558.    LONG  APIENTRY GpiQueryElementType(HPS hps,
  559.                                       PLONG plType,
  560.                                       LONG lLength,
  561.                                       PSZ pszData);
  562.    
  563.    BOOL  APIENTRY GpiSetElementPointerAtLabel(HPS hps,
  564.                                               LONG lLabel);
  565.    
  566. #endif /* non-common GPISEGEDITING */
  567. #ifdef INCL_GPITRANSFORMS
  568.    
  569.    /* co-ordinates space for GpiConvert */
  570.    #define CVTC_WORLD                      1L
  571.    #define CVTC_MODEL                      2L
  572.    #define CVTC_DEFAULTPAGE                3L
  573.    #define CVTC_PAGE                       4L
  574.    #define CVTC_DEVICE                     5L
  575.    
  576.    /* type of transformation for GpiSetSegmentTransformMatrix */
  577.    #define TRANSFORM_REPLACE               0L
  578.    #define TRANSFORM_ADD                   1L
  579.    #define TRANSFORM_PREEMPT               2L
  580.    
  581.    /* transform matrix */
  582.    typedef struct _MATRIXLF        /* matlf */
  583.    {
  584.       FIXED fxM11;
  585.       FIXED fxM12;
  586.       LONG  lM13;
  587.       FIXED fxM21;
  588.       FIXED fxM22;
  589.       LONG  lM23;
  590.       LONG  lM31;
  591.       LONG  lM32;
  592.       LONG  lM33;
  593.    } MATRIXLF;
  594.    typedef MATRIXLF *PMATRIXLF;
  595.    
  596.    #ifndef INCL_DDIDEFS
  597.       
  598.       
  599.       /*** transform and transform conversion functions */
  600.       BOOL  APIENTRY GpiQuerySegmentTransformMatrix(HPS hps,
  601.                                                     LONG lSegid,
  602.                                                     LONG lCount,
  603.                                                     PMATRIXLF pmatlfArray);
  604.       
  605.       BOOL  APIENTRY GpiSetSegmentTransformMatrix(HPS hps,
  606.                                                   LONG lSegid,
  607.                                                   LONG lCount,
  608.                                                   PMATRIXLF pmatlfarray,
  609.                                                   LONG lOptions);
  610.       
  611.       BOOL  APIENTRY GpiConvert(HPS hps,
  612.                                 LONG lSrc,
  613.                                 LONG lTarg,
  614.                                 LONG lCount,
  615.                                 PPOINTL aptlPoints);
  616.       
  617.       BOOL  APIENTRY GpiConvertWithMatrix(HPS hps,
  618.                                           LONG lCountp,
  619.                                           PPOINTL aptlPoints,
  620.                                           LONG lCount,
  621.                                           PMATRIXLF pmatlfArray);
  622.       
  623.       BOOL  APIENTRY GpiQueryModelTransformMatrix(HPS hps,
  624.                                                   LONG lCount,
  625.                                                   PMATRIXLF pmatlfArray);
  626.       
  627.       BOOL  APIENTRY GpiSetModelTransformMatrix(HPS hps,
  628.                                                 LONG lCount,
  629.                                                 PMATRIXLF pmatlfArray,
  630.                                                 LONG lOptions);
  631.       
  632.       LONG  APIENTRY GpiCallSegmentMatrix(HPS hps,
  633.                                           LONG lSegment,
  634.                                           LONG lCount,
  635.                                           PMATRIXLF pmatlfArray,
  636.                                           LONG lOptions);
  637.       
  638.       BOOL  APIENTRY GpiQueryDefaultViewMatrix(HPS hps,
  639.                                                LONG lCount,
  640.                                                PMATRIXLF pmatlfArray);
  641.       
  642.       BOOL  APIENTRY GpiSetDefaultViewMatrix(HPS hps,
  643.                                              LONG lCount,
  644.                                              PMATRIXLF pmatlfarray,
  645.                                              LONG lOptions);
  646.       
  647.       BOOL  APIENTRY GpiQueryPageViewport(HPS hps,
  648.                                           PRECTL prclViewport);
  649.       
  650.       BOOL  APIENTRY GpiSetPageViewport(HPS hps,
  651.                                         PRECTL prclViewport);
  652.       
  653.       BOOL  APIENTRY GpiQueryViewingTransformMatrix(HPS hps,
  654.                                                     LONG lCount,
  655.                                                     PMATRIXLF pmatlfArray);
  656.       
  657.       BOOL  APIENTRY GpiSetViewingTransformMatrix(HPS hps,
  658.                                                   LONG lCount,
  659.                                                   PMATRIXLF pmatlfArray,
  660.                                                   LONG lOptions);
  661.       
  662.       /*** transform helper routines */
  663.       BOOL APIENTRY GpiTranslate(HPS,
  664.                                  PMATRIXLF,
  665.                                  LONG,
  666.                                  PPOINTL);
  667.       
  668.       BOOL APIENTRY GpiScale(HPS,
  669.                              PMATRIXLF,
  670.                              LONG,
  671.                              PFIXED,
  672.                              PPOINTL);
  673.       
  674.       BOOL APIENTRY GpiRotate(HPS,
  675.                               PMATRIXLF,
  676.                               LONG,
  677.                               FIXED,
  678.                               PPOINTL);
  679.       
  680.       /*** general clipping functions */
  681.       BOOL APIENTRY GpiSetGraphicsField(HPS hps,
  682.                                         PRECTL prclField);
  683.       
  684.       BOOL APIENTRY GpiQueryGraphicsField(HPS hps,
  685.                                           PRECTL prclField);
  686.       
  687.       BOOL APIENTRY GpiSetViewingLimits(HPS hps,
  688.                                         PRECTL prclLimits);
  689.       
  690.       BOOL APIENTRY GpiQueryViewingLimits(HPS hps,
  691.                                           PRECTL prclLimits);
  692.       
  693.    #endif /* no INCL_DDIDEFS */
  694.    
  695. #endif /* non-common GPITRANSFORMS */
  696. #ifdef INCL_GPIPATHS
  697.    
  698.    /* modes for GpiModifyPath */
  699.    #define MPATH_STROKE                    6L
  700.    
  701.    /* modes for GpiFillPath */
  702.    #define FPATH_ALTERNATE                 0L
  703.    #define FPATH_WINDING                   2L
  704.    #define FPATH_INCL                      0L
  705.    #define FPATH_EXCL                      8L
  706.    
  707.    /* modes for GpiSetClipPath */
  708.    #define SCP_ALTERNATE                   0L
  709.    #define SCP_WINDING                     2L
  710.    #define SCP_AND                         4L
  711.    #define SCP_RESET                       0L
  712.    #define SCP_INCL                        0L
  713.    #define SCP_EXCL                        8L
  714.    
  715.    #ifndef INCL_DDIDEFS
  716.       
  717.       /*** Path and Clip Path functions */
  718.       
  719.       BOOL  APIENTRY GpiBeginPath(HPS hps,
  720.                                   LONG lPath);
  721.       
  722.       BOOL  APIENTRY GpiEndPath(HPS hps);
  723.       
  724.       BOOL  APIENTRY GpiCloseFigure(HPS hps);
  725.       
  726.       BOOL  APIENTRY GpiModifyPath(HPS hps,
  727.                                    LONG lPath,
  728.                                    LONG lMode);
  729.       
  730.       LONG  APIENTRY GpiFillPath(HPS hps,
  731.                                  LONG lPath,
  732.                                  LONG lOptions);
  733.       
  734.       BOOL  APIENTRY GpiSetClipPath(HPS hps,
  735.                                     LONG lPath,
  736.                                     LONG lOptions);
  737.       
  738.       LONG  APIENTRY GpiOutlinePath(HPS hps,
  739.                                     LONG lPath,
  740.                                     LONG lOptions);
  741.       
  742.       HRGN  APIENTRY GpiPathToRegion(HPS GpiH,
  743.                                      LONG lPath,
  744.                                      LONG lOptions);
  745.       
  746.       #ifndef INCL_SAADEFS
  747.          
  748.          
  749.          LONG  APIENTRY GpiStrokePath(HPS hps,
  750.                                       LONG lPath,
  751.                                       ULONG flOptions);
  752.          
  753.       #endif /* no INCL_SAADEFS */
  754.       
  755.    #endif /* no INCL_DDIDEFS */
  756.    
  757. #endif /* non-common GPIPATHS */
  758. #ifdef INCL_GPILOGCOLORTABLE
  759.    
  760.    #ifndef INCL_GPIBITMAPS
  761.       #define INCL_GPIBITMAPS
  762.    #endif /* INCL_GPIBITMAPS */
  763.    
  764.    /* options for GpiCreateLogColorTable and others */
  765.    #define LCOL_RESET                   0x0001L
  766.    #define LCOL_REALIZABLE              0x0002L
  767.    #define LCOL_PURECOLOR               0x0004L
  768.    #define LCOL_OVERRIDE_DEFAULT_COLORS 0x0008L
  769.    #define LCOL_REALIZED                0x0010L
  770.    
  771.    /* format of logical lColor table for GpiCreateLogColorTable and others */
  772.    #define LCOLF_DEFAULT                   0L
  773.    #define LCOLF_INDRGB                    1L
  774.    #define LCOLF_CONSECRGB                 2L
  775.    #define LCOLF_RGB                       3L
  776.    #define LCOLF_PALETTE                   4L
  777.    
  778.    /* options for GpiQueryRealColors and others */
  779.    #define LCOLOPT_REALIZED           0x0001L
  780.    #define LCOLOPT_INDEX              0x0002L
  781.    
  782.    #ifndef INCL_SAADEFS
  783.       
  784.       /* return codes from GpiQueryLogColorTable to indicate it is in RGB mode */
  785.       #define QLCT_ERROR                    (-1L)
  786.       #define QLCT_RGB                      (-2L)
  787.       
  788.       /* GpiQueryLogColorTable index returned for colors not explicitly loaded */
  789.       #define QLCT_NOTLOADED                (-1L)
  790.       
  791.    #endif /* no INCL_SAADEFS */
  792.    
  793.    /* return codes for GpiQueryColorData */
  794.    #define QCD_LCT_FORMAT                  0L
  795.    #define QCD_LCT_LOINDEX                 1L
  796.    #define QCD_LCT_HIINDEX                 2L
  797.    #define QCD_LCT_OPTIONS                 3L
  798.    
  799.    /* Palette manager return values */
  800.    #define PAL_ERROR                     (-1L)
  801.    
  802.    /* color flags for GpiCreatePalette and others */
  803.    #define PC_RESERVED                   0x01
  804.    #define PC_EXPLICIT                   0x02
  805.    #define PC_NOCOLLAPSE                 0x04
  806.    
  807.    #ifndef INCL_DDIDEFS
  808.       
  809.       /*** logical lColor table functions */
  810.       
  811.       BOOL  APIENTRY GpiCreateLogColorTable(HPS hps,
  812.                                             ULONG flOptions,
  813.                                             LONG lFormat,
  814.                                             LONG lStart,
  815.                                             LONG lCount,
  816.                                             PLONG alTable);
  817.       
  818.       BOOL  APIENTRY GpiQueryColorData(HPS hps,
  819.                                        LONG lCount,
  820.                                        PLONG alArray);
  821.       
  822.       #ifndef INCL_SAADEFS
  823.          
  824.          
  825.          LONG  APIENTRY GpiQueryLogColorTable(HPS hps,
  826.                                               ULONG flOptions,
  827.                                               LONG lStart,
  828.                                               LONG lCount,
  829.                                               PLONG alArray);
  830.          
  831.       #endif /* no INCL_SAADEFS */
  832.       
  833.       
  834.       LONG  APIENTRY GpiQueryRealColors(HPS hps,
  835.                                         ULONG flOptions,
  836.                                         LONG lStart,
  837.                                         LONG lCount,
  838.                                         PLONG alColors);
  839.       
  840.       LONG  APIENTRY GpiQueryNearestColor(HPS hps,
  841.                                           ULONG flOptions,
  842.                                           LONG lRgbIn);
  843.       
  844.       LONG  APIENTRY GpiQueryColorIndex(HPS hps,
  845.                                         ULONG flOptions,
  846.                                         LONG lRgbColor);
  847.       
  848.       LONG  APIENTRY GpiQueryRGBColor(HPS hps,
  849.                                       ULONG flOptions,
  850.                                       LONG lColorIndex);
  851.       
  852.       #ifndef INCL_SAADEFS
  853.          
  854.          /*Palette manager functions */
  855.          
  856.          HPAL APIENTRY GpiCreatePalette(HAB hab,
  857.                                         ULONG flOptions,
  858.                                         ULONG ulFormat,
  859.                                         ULONG ulCount,
  860.                                         PULONG aulTable);
  861.          
  862.          BOOL APIENTRY GpiDeletePalette(HPAL hpal);
  863.          
  864.          HPAL APIENTRY GpiSelectPalette(HPS hps,
  865.                                         HPAL hpal);
  866.          
  867.          LONG APIENTRY GpiAnimatePalette(HPAL hpal,
  868.                                          ULONG ulFormat,
  869.                                          ULONG ulStart,
  870.                                          ULONG ulCount,
  871.                                          PULONG aulTable);
  872.          
  873.          BOOL APIENTRY GpiSetPaletteEntries(HPAL hpal,
  874.                                             ULONG ulFormat,
  875.                                             ULONG ulStart,
  876.                                             ULONG ulCount,
  877.                                             PULONG aulTable);
  878.          
  879.          HPAL APIENTRY GpiQueryPalette(HPS hps);
  880.          
  881.          LONG APIENTRY GpiQueryPaletteInfo(HPAL hpal,
  882.                                            HPS  hps,
  883.                                            ULONG flOptions,
  884.                                            ULONG ulStart,
  885.                                            ULONG ulCount,
  886.                                            PULONG aulArray);
  887.          
  888.       #endif /* no INCL_SAADEFS */
  889.       
  890.    #endif /* no INCL_DDIDEFS */
  891.    
  892. #endif /* non-common GPILOGCOLORTABLE */
  893. #if (defined(INCL_GPIPRIMITIVES) || !defined(INCL_NOCOMMON))
  894.    
  895.    /* default color table indices */
  896.    
  897.    #define CLR_FALSE                     (-5L)
  898.    #define CLR_TRUE                      (-4L)
  899.    
  900.    #define CLR_ERROR                   (-255L)
  901.    #define CLR_DEFAULT                   (-3L)
  902.    #define CLR_WHITE                     (-2L)
  903.    #define CLR_BLACK                     (-1L)
  904.    #define CLR_BACKGROUND                  0L
  905.    #define CLR_BLUE                        1L
  906.    #define CLR_RED                         2L
  907.    #define CLR_PINK                        3L
  908.    #define CLR_GREEN                       4L
  909.    #define CLR_CYAN                        5L
  910.    #define CLR_YELLOW                      6L
  911.    #define CLR_NEUTRAL                     7L
  912.    
  913.    #define CLR_DARKGRAY                    8L
  914.    #define CLR_DARKBLUE                    9L
  915.    #define CLR_DARKRED                    10L
  916.    #define CLR_DARKPINK                   11L
  917.    #define CLR_DARKGREEN                  12L
  918.    #define CLR_DARKCYAN                   13L
  919.    #define CLR_BROWN                      14L
  920.    #define CLR_PALEGRAY                   15L
  921.    
  922.    /* rgb colors */
  923.    #define RGB_ERROR                   (-255L)
  924.    #define RGB_BLACK              0x00000000L
  925.    #define RGB_BLUE               0x000000FFL
  926.    #define RGB_GREEN              0x0000FF00L
  927.    #define RGB_CYAN               0x0000FFFFL
  928.    #define RGB_RED                0x00FF0000L
  929.    #define RGB_PINK               0x00FF00FFL
  930.    #define RGB_YELLOW             0x00FFFF00L
  931.    #define RGB_WHITE              0x00FFFFFFL
  932.    
  933.    /* control flags used by GpiBeginArea */
  934.    #define BA_NOBOUNDARY                   0L
  935.    #define BA_BOUNDARY                0x0001L
  936.    
  937.    
  938.    #define BA_ALTERNATE                    0L
  939.    #define BA_WINDING                 0x0002L
  940.    
  941.    #define BA_INCL                         0L
  942.    #define BA_EXCL                         8L
  943.    
  944.    
  945.    /* fill options for GpiBox/GpiFullArc */
  946.    #define DRO_FILL                        1L
  947.    #define DRO_OUTLINE                     2L
  948.    #define DRO_OUTLINEFILL                 3L
  949.    
  950.    /* basic pattern symbols */
  951.    #define PATSYM_ERROR                  (-1L)
  952.    #define PATSYM_DEFAULT                  0L
  953.    #define PATSYM_DENSE1                   1L
  954.    #define PATSYM_DENSE2                   2L
  955.    #define PATSYM_DENSE3                   3L
  956.    #define PATSYM_DENSE4                   4L
  957.    #define PATSYM_DENSE5                   5L
  958.    #define PATSYM_DENSE6                   6L
  959.    #define PATSYM_DENSE7                   7L
  960.    #define PATSYM_DENSE8                   8L
  961.    #define PATSYM_VERT                     9L
  962.    #define PATSYM_HORIZ                   10L
  963.    #define PATSYM_DIAG1                   11L
  964.    #define PATSYM_DIAG2                   12L
  965.    #define PATSYM_DIAG3                   13L
  966.    #define PATSYM_DIAG4                   14L
  967.    #define PATSYM_NOSHADE                 15L
  968.    #define PATSYM_SOLID                   16L
  969.    #ifndef INCL_SAADEFS
  970.       #define PATSYM_HALFTONE                17L
  971.    #endif /* no INCL_SAADEFS */
  972.    #define PATSYM_HATCH                   18L
  973.    #define PATSYM_DIAGHATCH               19L
  974.    #define PATSYM_BLANK                   64L
  975.    
  976.    /* lcid values for GpiSet/QueryPattern and others */
  977.    #define LCID_ERROR                    (-1L)
  978.    #define LCID_DEFAULT                    0L
  979.    
  980.    #ifndef INCL_DDIDEFS
  981.       
  982.       
  983.       /*** global primitive functions */
  984.       BOOL  APIENTRY GpiSetColor(HPS hps,
  985.                                  LONG lColor);
  986.       
  987.       LONG  APIENTRY GpiQueryColor(HPS hps);
  988.       
  989.       /*** line primitive functions */
  990.       
  991.       LONG  APIENTRY GpiBox(HPS hps,
  992.                             LONG lControl,
  993.                             PPOINTL pptlPoint,
  994.                             LONG lHRound,
  995.                             LONG lVRound);
  996.       
  997.       BOOL  APIENTRY GpiMove(HPS hps,
  998.                              PPOINTL pptlPoint);
  999.       
  1000.       LONG  APIENTRY GpiLine(HPS hps,
  1001.                              PPOINTL pptlEndPoint);
  1002.       
  1003.       LONG  APIENTRY GpiPolyLine(HPS hps,
  1004.                                  LONG lCount,
  1005.                                  PPOINTL aptlPoints);
  1006.       
  1007.       LONG  APIENTRY GpiPolyLineDisjoint(HPS hps,
  1008.                                          LONG lCount,
  1009.                                          PPOINTL aptlPoints);
  1010.       
  1011.       /*** area primitive functions */
  1012.       BOOL  APIENTRY GpiSetPattern(HPS hps,
  1013.                                    LONG lPatternSymbol);
  1014.       
  1015.       LONG  APIENTRY GpiQueryPattern(HPS hps);
  1016.       
  1017.       BOOL  APIENTRY GpiBeginArea(HPS hps,
  1018.                                   ULONG flOptions);
  1019.       
  1020.       LONG  APIENTRY GpiEndArea(HPS hps);
  1021.       
  1022.       /*** character primitive functions */
  1023.       LONG  APIENTRY GpiCharString(HPS hps,
  1024.                                    LONG lCount,
  1025.                                    PCH pchString);
  1026.       
  1027.       LONG  APIENTRY GpiCharStringAt(HPS hps,
  1028.                                      PPOINTL pptlPoint,
  1029.                                      LONG lCount,
  1030.                                      PCH pchString);
  1031.       
  1032.    #endif /* no INCL_DDIDEFS */
  1033.    
  1034. #endif /* common GPIPRIMTIVES */
  1035. #ifdef INCL_GPIPRIMITIVES
  1036.    
  1037.    /* mode for GpiSetAttrMode */
  1038.    #define AM_ERROR                      (-1L)
  1039.    #define AM_PRESERVE                     0L
  1040.    #define AM_NOPRESERVE                   1L
  1041.    
  1042.    /* foreground mixes */
  1043.    #define FM_ERROR                      (-1L)
  1044.    #define FM_DEFAULT                      0L
  1045.    #define FM_OR                           1L
  1046.    #define FM_OVERPAINT                    2L
  1047.    #define FM_LEAVEALONE                   5L
  1048.    
  1049.    #define FM_XOR                          4L
  1050.    #define FM_AND                          6L
  1051.    #define FM_SUBTRACT                     7L
  1052.    #define FM_MASKSRCNOT                   8L
  1053.    #define FM_ZERO                         9L
  1054.    #define FM_NOTMERGESRC                 10L
  1055.    #define FM_NOTXORSRC                   11L
  1056.    #define FM_INVERT                      12L
  1057.    #define FM_MERGESRCNOT                 13L
  1058.    #define FM_NOTCOPYSRC                  14L
  1059.    #define FM_MERGENOTSRC                 15L
  1060.    #define FM_NOTMASKSRC                  16L
  1061.    #define FM_ONE                         17L
  1062.    
  1063.    
  1064.    /* background mixes */
  1065.    #define BM_ERROR                      (-1L)
  1066.    #define BM_DEFAULT                      0L
  1067.    #define BM_OR                           1L
  1068.    #define BM_OVERPAINT                    2L
  1069.    #define BM_LEAVEALONE                   5L
  1070.    
  1071.    #define BM_XOR                          4L
  1072.    #define BM_AND                          6L
  1073.    #define BM_SUBTRACT                     7L
  1074.    #define BM_MASKSRCNOT                   8L
  1075.    #define BM_ZERO                         9L
  1076.    #define BM_NOTMERGESRC                 10L
  1077.    #define BM_NOTXORSRC                   11L
  1078.    #define BM_INVERT                      12L
  1079.    #define BM_MERGESRCNOT                 13L
  1080.    #define BM_NOTCOPYSRC                  14L
  1081.    #define BM_MERGENOTSRC                 15L
  1082.    #define BM_NOTMASKSRC                  16L
  1083.    #define BM_ONE                         17L
  1084.    #define BM_SRCTRANSPARENT              18L
  1085.    #define BM_DESTTRANSPARENT             19L
  1086.    
  1087.    
  1088.    
  1089.    /* basic line type styles */
  1090.    #define LINETYPE_ERROR                (-1L)
  1091.    #define LINETYPE_DEFAULT                0L
  1092.    #define LINETYPE_DOT                    1L
  1093.    #define LINETYPE_SHORTDASH              2L
  1094.    #define LINETYPE_DASHDOT                3L
  1095.    #define LINETYPE_DOUBLEDOT              4L
  1096.    #define LINETYPE_LONGDASH               5L
  1097.    #define LINETYPE_DASHDOUBLEDOT          6L
  1098.    #define LINETYPE_SOLID                  7L
  1099.    #define LINETYPE_INVISIBLE              8L
  1100.    #ifndef INCL_SAADEFS
  1101.       #define LINETYPE_ALTERNATE              9L
  1102.    #endif /* no INCL_SAADEFS */
  1103.    
  1104.    /* cosmetic line widths */
  1105.    #define LINEWIDTH_ERROR               (-1L)
  1106.    #define LINEWIDTH_DEFAULT               0L
  1107.    #define LINEWIDTH_NORMAL       0x00010000L   /* MAKEFIXED(1,0) */
  1108.    #define LINEWIDTH_THICK        0x00020000L   /* MAKEFIXED(2,0) */
  1109.    
  1110.    /* actual line widths */
  1111.    #define LINEWIDTHGEOM_ERROR           (-1L)
  1112.    
  1113.    /* line end styles */
  1114.    #define LINEEND_ERROR                 (-1L)
  1115.    #define LINEEND_DEFAULT                 0L
  1116.    #define LINEEND_FLAT                    1L
  1117.    #define LINEEND_SQUARE                  2L
  1118.    #define LINEEND_ROUND                   3L
  1119.    
  1120.    /* line join styles */
  1121.    #define LINEJOIN_ERROR                (-1L)
  1122.    #define LINEJOIN_DEFAULT                0L
  1123.    #define LINEJOIN_BEVEL                  1L
  1124.    #define LINEJOIN_ROUND                  2L
  1125.    #define LINEJOIN_MITRE                  3L
  1126.    
  1127.    /* character directions */
  1128.    #define CHDIRN_ERROR                  (-1L)
  1129.    #define CHDIRN_DEFAULT                  0L
  1130.    #define CHDIRN_LEFTRIGHT                1L
  1131.    #define CHDIRN_TOPBOTTOM                2L
  1132.    #define CHDIRN_RIGHTLEFT                3L
  1133.    #define CHDIRN_BOTTOMTOP                4L
  1134.    
  1135.    /* character text alignments */
  1136.    #define TA_NORMAL_HORIZ     0x0001
  1137.    #define TA_LEFT             0x0002
  1138.    #define TA_CENTER           0x0003
  1139.    #define TA_RIGHT            0x0004
  1140.    #define TA_STANDARD_HORIZ   0x0005
  1141.    #define TA_NORMAL_VERT      0x0100
  1142.    #define TA_TOP              0x0200
  1143.    #define TA_HALF             0x0300
  1144.    #define TA_BASE             0x0400
  1145.    #define TA_BOTTOM           0x0500
  1146.    #define TA_STANDARD_VERT    0x0600
  1147.    
  1148.    /* character modes */
  1149.    #define CM_ERROR                      (-1L)
  1150.    #define CM_DEFAULT                      0L
  1151.    #define CM_MODE1                        1L
  1152.    #define CM_MODE2                        2L
  1153.    #define CM_MODE3                        3L
  1154.    
  1155.    /* basic marker symbols */
  1156.    #define MARKSYM_ERROR                 (-1L)
  1157.    #define MARKSYM_DEFAULT                 0L
  1158.    #define MARKSYM_CROSS                   1L
  1159.    #define MARKSYM_PLUS                    2L
  1160.    #define MARKSYM_DIAMOND                 3L
  1161.    #define MARKSYM_SQUARE                  4L
  1162.    #define MARKSYM_SIXPOINTSTAR            5L
  1163.    #define MARKSYM_EIGHTPOINTSTAR          6L
  1164.    #define MARKSYM_SOLIDDIAMOND            7L
  1165.    #define MARKSYM_SOLIDSQUARE             8L
  1166.    #define MARKSYM_DOT                     9L
  1167.    #define MARKSYM_SMALLCIRCLE            10L
  1168.    #define MARKSYM_BLANK                  64L
  1169.    
  1170.    /* formatting options for GpiCharStringPosAt */
  1171.    #define CHS_OPAQUE                 0x0001L
  1172.    #define CHS_VECTOR                 0x0002L
  1173.    #define CHS_LEAVEPOS               0x0008L
  1174.    #define CHS_CLIP                   0x0010L
  1175.    #define CHS_UNDERSCORE             0x0200L
  1176.    #define CHS_STRIKEOUT              0x0400L
  1177.    
  1178.    /* bundle codes for GpiSetAttributes and GpiQueryAttributes */
  1179.    #define PRIM_LINE                       1L
  1180.    #define PRIM_CHAR                       2L
  1181.    #define PRIM_MARKER                     3L
  1182.    #define PRIM_AREA                       4L
  1183.    #define PRIM_IMAGE                      5L
  1184.    
  1185.    /* line bundle mask bits */
  1186.    #define LBB_COLOR                  0x0001L
  1187.    #define LBB_BACK_COLOR             0x0002L
  1188.    #define LBB_MIX_MODE               0x0004L
  1189.    #define LBB_BACK_MIX_MODE          0x0008L
  1190.    #define LBB_WIDTH                  0x0010L
  1191.    #define LBB_GEOM_WIDTH             0x0020L
  1192.    #define LBB_TYPE                   0x0040L
  1193.    #define LBB_END                    0x0080L
  1194.    #define LBB_JOIN                   0x0100L
  1195.    
  1196.    /* character bundle mask bits */
  1197.    #define CBB_COLOR                  0x0001L
  1198.    #define CBB_BACK_COLOR             0x0002L
  1199.    #define CBB_MIX_MODE               0x0004L
  1200.    #define CBB_BACK_MIX_MODE          0x0008L
  1201.    #define CBB_SET                    0x0010L
  1202.    #define CBB_MODE                   0x0020L
  1203.    #define CBB_BOX                    0x0040L
  1204.    #define CBB_ANGLE                  0x0080L
  1205.    #define CBB_SHEAR                  0x0100L
  1206.    #define CBB_DIRECTION              0x0200L
  1207.    #define CBB_TEXT_ALIGN             0x0400L
  1208.    #define CBB_EXTRA                  0x0800L
  1209.    #define CBB_BREAK_EXTRA            0x1000L
  1210.    
  1211.    /* marker bundle mask bits */
  1212.    #define MBB_COLOR                  0x0001L
  1213.    #define MBB_BACK_COLOR             0x0002L
  1214.    #define MBB_MIX_MODE               0x0004L
  1215.    #define MBB_BACK_MIX_MODE          0x0008L
  1216.    #define MBB_SET                    0x0010L
  1217.    #define MBB_SYMBOL                 0x0020L
  1218.    #define MBB_BOX                    0x0040L
  1219.    
  1220.    /* pattern bundle mask bits */
  1221.    #define ABB_COLOR                  0x0001L
  1222.    #define ABB_BACK_COLOR             0x0002L
  1223.    #define ABB_MIX_MODE               0x0004L
  1224.    #define ABB_BACK_MIX_MODE          0x0008L
  1225.    #define ABB_SET                    0x0010L
  1226.    #define ABB_SYMBOL                 0x0020L
  1227.    #define ABB_REF_POINT              0x0040L
  1228.    
  1229.    /* image bundle mask bits */
  1230.    #define IBB_COLOR                  0x0001L
  1231.    #define IBB_BACK_COLOR             0x0002L
  1232.    #define IBB_MIX_MODE               0x0004L
  1233.    #define IBB_BACK_MIX_MODE          0x0008L
  1234.    
  1235.    /* structure for GpiSetArcParams and GpiQueryArcParams */
  1236.    typedef struct _ARCPARAMS       /* arcp */
  1237.    {
  1238.       LONG lP;
  1239.       LONG lQ;
  1240.       LONG lR;
  1241.       LONG lS;
  1242.    } ARCPARAMS;
  1243.    typedef ARCPARAMS *PARCPARAMS;
  1244.    
  1245.    /* variation of SIZE used for FIXEDs */
  1246.    typedef struct _SIZEF          /* sizfx */
  1247.    {
  1248.       FIXED cx;
  1249.       FIXED cy;
  1250.    } SIZEF;
  1251.    typedef SIZEF *PSIZEF;
  1252.    
  1253.    /* structure for gradient parameters e.g. for GpiSetCharAngle */
  1254.    typedef struct _GRADIENTL        /* gradl */
  1255.    {
  1256.       LONG x;
  1257.       LONG y;
  1258.    } GRADIENTL;
  1259.    typedef GRADIENTL *PGRADIENTL;
  1260.    
  1261.    /* line bundle for GpiSetAttributes and GpiQueryAttributes */
  1262.    typedef struct _LINEBUNDLE       /* lbnd */
  1263.    {
  1264.       LONG    lColor;
  1265.       LONG    lBackColor;
  1266.       USHORT  usMixMode;
  1267.       USHORT  usBackMixMode;
  1268.       FIXED   fxWidth;
  1269.       LONG    lGeomWidth;
  1270.       USHORT  usType;
  1271.       USHORT  usEnd;
  1272.       USHORT  usJoin;
  1273.       USHORT  usReserved;
  1274.    } LINEBUNDLE;
  1275.    typedef LINEBUNDLE *PLINEBUNDLE;
  1276.    
  1277.    /* character bundle for GpiSetAttributes and GpiQueryAttributes */
  1278.    typedef struct _CHARBUNDLE       /* cbnd */
  1279.    {
  1280.       LONG      lColor;
  1281.       LONG      lBackColor;
  1282.       USHORT    usMixMode;
  1283.       USHORT    usBackMixMode;
  1284.       USHORT    usSet;
  1285.       USHORT    usPrecision;
  1286.       SIZEF     sizfxCell;
  1287.       POINTL    ptlAngle;
  1288.       POINTL    ptlShear;
  1289.       USHORT    usDirection;
  1290.       USHORT    usTextAlign;
  1291.       FIXED     fxExtra;
  1292.       FIXED     fxBreakExtra;
  1293.    } CHARBUNDLE;
  1294.    typedef CHARBUNDLE *PCHARBUNDLE;
  1295.    
  1296.    /* marker bundle for GpiSetAttributes and GpiQueryAttributes */
  1297.    typedef struct _MARKERBUNDLE     /* mbnd */
  1298.    {
  1299.       LONG   lColor;
  1300.       LONG   lBackColor;
  1301.       USHORT usMixMode;
  1302.       USHORT usBackMixMode;
  1303.       USHORT usSet;
  1304.       USHORT usSymbol;
  1305.       SIZEF  sizfxCell;
  1306.    } MARKERBUNDLE;
  1307.    typedef MARKERBUNDLE *PMARKERBUNDLE;
  1308.    
  1309.    /* pattern bundle for GpiSetAttributes and GpiQueryAttributes */
  1310.    typedef struct _AREABUNDLE    /* pbnd */
  1311.    {
  1312.       LONG   lColor;
  1313.       LONG   lBackColor;
  1314.       USHORT usMixMode;
  1315.       USHORT usBackMixMode;
  1316.       USHORT usSet;
  1317.       USHORT usSymbol;
  1318.       POINTL ptlRefPoint ;
  1319.    } AREABUNDLE;
  1320.    typedef AREABUNDLE *PAREABUNDLE;
  1321.    
  1322.    /* image bundle for GpiSetAttributes and GpiQueryAttributes */
  1323.    typedef struct _IMAGEBUNDLE      /* ibmd */
  1324.    {
  1325.       LONG   lColor;
  1326.       LONG   lBackColor;
  1327.       USHORT usMixMode;
  1328.       USHORT usBackMixMode;
  1329.    } IMAGEBUNDLE;
  1330.    typedef IMAGEBUNDLE *PIMAGEBUNDLE;
  1331.    
  1332.    /* pointer to any bundle used by GpiSet/QueryAttrs */
  1333.    typedef PVOID PBUNDLE;
  1334.    
  1335.    /* array indices for GpiQueryTextBox */
  1336.    #define TXTBOX_TOPLEFT                  0L
  1337.    #define TXTBOX_BOTTOMLEFT               1L
  1338.    #define TXTBOX_TOPRIGHT                 2L
  1339.    #define TXTBOX_BOTTOMRIGHT              3L
  1340.    #define TXTBOX_CONCAT                   4L
  1341.    /* array count for GpiQueryTextBox */
  1342.    #define TXTBOX_COUNT                    5L
  1343.    
  1344.    /* return codes for GpiPtVisible */
  1345.    #define PVIS_ERROR                      0L
  1346.    #define PVIS_INVISIBLE                  1L
  1347.    #define PVIS_VISIBLE                    2L
  1348.    
  1349.    /* return codes for GpiRectVisible */
  1350.    #define RVIS_ERROR                      0L
  1351.    #define RVIS_INVISIBLE                  1L
  1352.    #define RVIS_PARTIAL                    2L
  1353.    #define RVIS_VISIBLE                    3L
  1354.    
  1355.    #ifndef INCL_DDIDEFS
  1356.       
  1357.       
  1358.       /*** attribute mode functions */
  1359.       BOOL  APIENTRY GpiSetAttrMode(HPS hps,
  1360.                                     LONG lMode);
  1361.       
  1362.       LONG  APIENTRY GpiQueryAttrMode(HPS hps);
  1363.       /*** bundle primitive functions */
  1364.       BOOL  APIENTRY GpiSetAttrs(HPS hps,
  1365.                                  LONG lPrimType,
  1366.                                  ULONG flAttrMask,
  1367.                                  ULONG flDefMask,
  1368.                                  PBUNDLE ppbunAttrs);
  1369.       #ifndef INCL_SAADEFS
  1370.          
  1371.          
  1372.          LONG  APIENTRY GpiQueryAttrs(HPS hps,
  1373.                                       LONG lPrimType,
  1374.                                       ULONG flAttrMask,
  1375.                                       PBUNDLE ppbunAttrs);
  1376.          
  1377.       #endif /* no INCL_SAADEFS */
  1378.       
  1379.       
  1380.       /*** global primitive functions */
  1381.       BOOL  APIENTRY GpiSetBackColor(HPS hps,
  1382.                                      LONG lColor);
  1383.       
  1384.       LONG  APIENTRY GpiQueryBackColor(HPS hps);
  1385.       
  1386.       BOOL  APIENTRY GpiSetMix(HPS hps,
  1387.                                LONG lMixMode);
  1388.       
  1389.       LONG  APIENTRY GpiQueryMix(HPS hps);
  1390.       
  1391.       BOOL  APIENTRY GpiSetBackMix(HPS hps,
  1392.                                    LONG lMixMode);
  1393.       
  1394.       LONG  APIENTRY GpiQueryBackMix(HPS hps);
  1395.       
  1396.       /*** line primitive functions */
  1397.       BOOL  APIENTRY GpiSetLineType(HPS hps,
  1398.                                     LONG lLineType);
  1399.       
  1400.       LONG  APIENTRY GpiQueryLineType(HPS hps);
  1401.       
  1402.       BOOL  APIENTRY GpiSetLineWidth(HPS hps,
  1403.                                      FIXED fxLineWidth);
  1404.       
  1405.       FIXED APIENTRY GpiQueryLineWidth(HPS hps);
  1406.       
  1407.       BOOL  APIENTRY GpiSetLineWidthGeom(HPS hps,
  1408.                                          LONG lLineWidth);
  1409.       
  1410.       LONG  APIENTRY GpiQueryLineWidthGeom(HPS hps);
  1411.       
  1412.       BOOL  APIENTRY GpiSetLineEnd(HPS hps,
  1413.                                    LONG lLineEnd);
  1414.       
  1415.       LONG  APIENTRY GpiQueryLineEnd(HPS hps);
  1416.       
  1417.       BOOL  APIENTRY GpiSetLineJoin(HPS hps,
  1418.                                     LONG lLineJoin);
  1419.       
  1420.       LONG  APIENTRY GpiQueryLineJoin(HPS hps);
  1421.       
  1422.       BOOL  APIENTRY GpiSetCurrentPosition(HPS hps,
  1423.                                            PPOINTL pptlPoint);
  1424.       
  1425.       BOOL  APIENTRY GpiQueryCurrentPosition(HPS hps,
  1426.                                              PPOINTL pptlPoint);
  1427.       
  1428.       /*** arc primitive functions */
  1429.       BOOL  APIENTRY GpiSetArcParams(HPS hps,
  1430.                                      PARCPARAMS parcpArcParams);
  1431.       
  1432.       BOOL  APIENTRY GpiQueryArcParams(HPS hps,
  1433.                                        PARCPARAMS parcpArcParams);
  1434.       
  1435.       LONG  APIENTRY GpiPointArc(HPS hps,
  1436.                                  PPOINTL pptl2);
  1437.       
  1438.       LONG  APIENTRY GpiFullArc(HPS hps,
  1439.                                 LONG lControl,
  1440.                                 FIXED fxMultiplier);
  1441.       
  1442.       LONG  APIENTRY GpiPartialArc(HPS hps,
  1443.                                    PPOINTL pptlCenter,
  1444.                                    FIXED fxMultiplier,
  1445.                                    FIXED fxStartAngle,
  1446.                                    FIXED fxSweepAngle);
  1447.       
  1448.       LONG  APIENTRY GpiPolyFillet(HPS hps,
  1449.                                    LONG lCount,
  1450.                                    PPOINTL aptlPoints);
  1451.       
  1452.       LONG  APIENTRY GpiPolySpline(HPS hps,
  1453.                                    LONG lCount,
  1454.                                    PPOINTL aptlPoints);
  1455.       
  1456.       LONG  APIENTRY GpiPolyFilletSharp(HPS hps,
  1457.                                         LONG lCount,
  1458.                                         PPOINTL aptlPoints,
  1459.                                         PFIXED afxPoints);
  1460.       
  1461.       /*** area primitive functions */
  1462.       BOOL  APIENTRY GpiSetPatternSet(HPS hps,
  1463.                                       LONG lSet);
  1464.       
  1465.       LONG  APIENTRY GpiQueryPatternSet(HPS hps);
  1466.       
  1467.       BOOL  APIENTRY GpiSetPatternRefPoint(HPS hps,
  1468.                                            PPOINTL pptlRefPoint);
  1469.       
  1470.       BOOL  APIENTRY GpiQueryPatternRefPoint(HPS hps,
  1471.                                              PPOINTL pptlRefPoint);
  1472.       
  1473.       /*** character primitive functions */
  1474.       BOOL  APIENTRY GpiQueryCharStringPos(HPS hps,
  1475.                                            ULONG flOptions,
  1476.                                            LONG lCount,
  1477.                                            PCH pchString,
  1478.                                            PLONG alXincrements,
  1479.                                            PPOINTL aptlPositions);
  1480.       
  1481.       BOOL  APIENTRY GpiQueryCharStringPosAt(HPS hps,
  1482.                                              PPOINTL pptlStart,
  1483.                                              ULONG flOptions,
  1484.                                              LONG lCount,
  1485.                                              PCH pchString,
  1486.                                              PLONG alXincrements,
  1487.                                              PPOINTL aptlPositions);
  1488.       
  1489.       BOOL  APIENTRY GpiQueryTextBox(HPS hps,
  1490.                                      LONG lCount1,
  1491.                                      PCH pchString,
  1492.                                      LONG lCount2,
  1493.                                      PPOINTL aptlPoints);
  1494.       
  1495.       BOOL  APIENTRY GpiQueryDefCharBox(HPS hps,
  1496.                                         PSIZEL psizlSize);
  1497.       
  1498.       BOOL  APIENTRY GpiSetCharSet(HPS hps,
  1499.                                    LONG llcid);
  1500.       
  1501.       LONG  APIENTRY GpiQueryCharSet(HPS hps);
  1502.       
  1503.       BOOL  APIENTRY GpiSetCharBox(HPS hps,
  1504.                                    PSIZEF psizfxBox);
  1505.       
  1506.       BOOL  APIENTRY GpiQueryCharBox(HPS hps,
  1507.                                      PSIZEF psizfxSize);
  1508.       
  1509.       BOOL  APIENTRY GpiSetCharAngle(HPS hps,
  1510.                                      PGRADIENTL pgradlAngle);
  1511.       
  1512.       BOOL  APIENTRY GpiQueryCharAngle(HPS hps,
  1513.                                        PGRADIENTL pgradlAngle);
  1514.       
  1515.       BOOL  APIENTRY GpiSetCharShear(HPS hps,
  1516.                                      PPOINTL pptlAngle);
  1517.       
  1518.       BOOL  APIENTRY GpiQueryCharShear(HPS hps,
  1519.                                        PPOINTL pptlShear);
  1520.       
  1521.       BOOL  APIENTRY GpiSetCharDirection(HPS hps,
  1522.                                          LONG lDirection);
  1523.       
  1524.       LONG  APIENTRY GpiQueryCharDirection(HPS hps);
  1525.       
  1526.       BOOL  APIENTRY GpiSetCharMode(HPS hps,
  1527.                                     LONG lMode);
  1528.       
  1529.       LONG  APIENTRY GpiQueryCharMode(HPS hps);
  1530.       
  1531.       BOOL  APIENTRY GpiSetTextAlignment(HPS hps,
  1532.                                          LONG lHoriz,
  1533.                                          LONG lVert);
  1534.       
  1535.       BOOL  APIENTRY GpiQueryTextAlignment(HPS hps,
  1536.                                            PLONG plHoriz,
  1537.                                            PLONG plVert);
  1538.       
  1539.       LONG  APIENTRY GpiCharStringPos(HPS hps,
  1540.                                       PRECTL prclRect,
  1541.                                       ULONG flOptions,
  1542.                                       LONG lCount,
  1543.                                       PCH pchString,
  1544.                                       PLONG alAdx);
  1545.       
  1546.       LONG  APIENTRY GpiCharStringPosAt(HPS hps,
  1547.                                         PPOINTL pptlStart,
  1548.                                         PRECTL prclRect,
  1549.                                         ULONG flOptions,
  1550.                                         LONG lCount,
  1551.                                         PCH pchString,
  1552.                                         PLONG alAdx);
  1553.       
  1554.       BOOL  APIENTRY GpiSetCharExtra(HPS hps,
  1555.                                      FIXED  Extra);
  1556.       
  1557.       BOOL  APIENTRY GpiSetCharBreakExtra(HPS hps,
  1558.                                           FIXED  BreakExtra);
  1559.       
  1560.       BOOL  APIENTRY GpiQueryCharExtra(HPS hps,
  1561.                                        PFIXED Extra);
  1562.       
  1563.       BOOL  APIENTRY GpiQueryCharBreakExtra(HPS hps,
  1564.                                             PFIXED BreakExtra);
  1565.       
  1566.       /*** marker primitive functions  */
  1567.       LONG  APIENTRY GpiMarker(HPS hps,
  1568.                                PPOINTL pptlPoint);
  1569.       
  1570.       LONG  APIENTRY GpiPolyMarker(HPS hps,
  1571.                                    LONG lCount,
  1572.                                    PPOINTL aptlPoints);
  1573.       
  1574.       BOOL  APIENTRY GpiSetMarker(HPS hps,
  1575.                                   LONG lSymbol);
  1576.       
  1577.       BOOL  APIENTRY GpiSetMarkerBox(HPS hps,
  1578.                                      PSIZEF psizfxSize);
  1579.       
  1580.       BOOL  APIENTRY GpiSetMarkerSet(HPS hps,
  1581.                                      LONG lSet);
  1582.       
  1583.       LONG  APIENTRY GpiQueryMarker(HPS hps);
  1584.       
  1585.       BOOL  APIENTRY GpiQueryMarkerBox(HPS hps,
  1586.                                        PSIZEF psizfxSize);
  1587.       
  1588.       LONG  APIENTRY GpiQueryMarkerSet(HPS hps);
  1589.       
  1590.       /*** image primitive functions */
  1591.       LONG  APIENTRY GpiImage(HPS hps,
  1592.                               LONG lFormat,
  1593.                               PSIZEL psizlImageSize,
  1594.                               LONG lLength,
  1595.                               PBYTE pbData);
  1596.       
  1597.       /*** miscellaneous primitive functions */
  1598.       BOOL  APIENTRY GpiPop(HPS hps,
  1599.                             LONG lCount);
  1600.       
  1601.       LONG  APIENTRY GpiPtVisible(HPS hps,
  1602.                                   PPOINTL pptlPoint);
  1603.       
  1604.       LONG  APIENTRY GpiRectVisible(HPS hps,
  1605.                                     PRECTL prclRectangle);
  1606.       
  1607.       BOOL  APIENTRY GpiComment(HPS hps,
  1608.                                 LONG lLength,
  1609.                                 PBYTE pbData);
  1610.       
  1611.    #endif /* no INCL_DDIDEFS */
  1612.    
  1613. #endif /* non-common GPIPRIMITIVES */
  1614. #ifdef INCL_GPILCIDS
  1615.    
  1616.    /* return codes from GpiCreateLogFont */
  1617.    #define FONT_DEFAULT                    1L
  1618.    #define FONT_MATCH                      2L
  1619.    
  1620.    /* lcid type for GpiQuerySetIds */
  1621.    #define LCIDT_FONT                      6L
  1622.    
  1623.    #define LCIDT_BITMAP                    7L
  1624.    
  1625.    /* constant used to delete all lcids by GpiDeleteSetId */
  1626.    #define LCID_ALL                      (-1L)
  1627.    
  1628.    /* kerning data returned by GpiQueryKerningPairs */
  1629.    typedef struct _KERNINGPAIRS     /* krnpr */
  1630.    {
  1631.       SHORT sFirstChar;
  1632.       SHORT sSecondChar;
  1633.       LONG  lKerningAmount;
  1634.    } KERNINGPAIRS;
  1635.    typedef KERNINGPAIRS *PKERNINGPAIRS;
  1636.    
  1637.    /* data required by GpiQueryFaceString */
  1638.    typedef struct _FACENAMEDESC     /* fnd */
  1639.    {
  1640.       USHORT usSize;
  1641.       USHORT usWeightClass;
  1642.       USHORT usWidthClass;
  1643.       USHORT usReserved;
  1644.       ULONG  flOptions;
  1645.    } FACENAMEDESC;
  1646.    typedef FACENAMEDESC *PFACENAMEDESC;
  1647.    
  1648.    /* FACENAMEDESC 'WeightClass' options for GpiQueryFaceString */
  1649.    #define FWEIGHT_DONT_CARE      0L
  1650.    #define FWEIGHT_ULTRA_LIGHT    1L
  1651.    #define FWEIGHT_EXTRA_LIGHT    2L
  1652.    #define FWEIGHT_LIGHT          3L
  1653.    #define FWEIGHT_SEMI_LIGHT     4L
  1654.    #define FWEIGHT_NORMAL         5L
  1655.    #define FWEIGHT_SEMI_BOLD      6L
  1656.    #define FWEIGHT_BOLD           7L
  1657.    #define FWEIGHT_EXTRA_BOLD     8L
  1658.    #define FWEIGHT_ULTRA_BOLD     9L
  1659.    
  1660.    /* FACENAMEDESC 'WidthClass' options for GpiQueryFaceString */
  1661.    #define FWIDTH_DONT_CARE       0L
  1662.    #define FWIDTH_ULTRA_CONDENSED 1L
  1663.    #define FWIDTH_EXTRA_CONDENSED 2L
  1664.    #define FWIDTH_CONDENSED       3L
  1665.    #define FWIDTH_SEMI_CONDENSED  4L
  1666.    #define FWIDTH_NORMAL          5L
  1667.    #define FWIDTH_SEMI_EXPANDED   6L
  1668.    #define FWIDTH_EXPANDED        7L
  1669.    #define FWIDTH_EXTRA_EXPANDED  8L
  1670.    #define FWIDTH_ULTRA_EXPANDED  9L
  1671.    
  1672.    /* FACENAMEDESC 'options' for GpiQueryFaceString */
  1673.    #define FTYPE_ITALIC            0x0001
  1674.    #define FTYPE_ITALIC_DONT_CARE  0x0002
  1675.    #define FTYPE_OBLIQUE           0x0004
  1676.    #define FTYPE_OBLIQUE_DONT_CARE 0x0008
  1677.    #define FTYPE_ROUNDED           0x0010
  1678.    #define FTYPE_ROUNDED_DONT_CARE 0x0020
  1679.    
  1680.    /* actions for GpiQueryFontAction */
  1681.    #define QFA_PUBLIC      1L
  1682.    #define QFA_PRIVATE     2L
  1683.    #define QFA_ERROR       GPI_ALTERROR
  1684.    
  1685.    /* options for GpiQueryFonts */
  1686.    #define QF_PUBLIC                  0x0001L
  1687.    #define QF_PRIVATE                 0x0002L
  1688.    #define QF_NO_GENERIC              0x0004L
  1689.    #define QF_NO_DEVICE               0x0008L
  1690.    
  1691.    #ifndef INCL_SAADEFS
  1692.       
  1693.       /* font file descriptions for GpiQueryFontFileDescriptions */
  1694.       typedef CHAR FFDESCS[2][FACESIZE]; /* ffdescs */
  1695.       typedef FFDESCS *PFFDESCS;
  1696.       typedef struct _FFDESCS2    /* ffdescs2 */
  1697.       {
  1698.          ULONG  cbLength;
  1699.          ULONG  cbFacenameOffset;
  1700.          BYTE   abFamilyName[1];
  1701.       } FFDESCS2;
  1702.       typedef FFDESCS2 *PFFDESCS2;
  1703.       
  1704.    #endif /* no INCL_SAADEFS */
  1705.    
  1706.    #ifndef INCL_DDIDEFS
  1707.       
  1708.       /*** physical and logical font functions */
  1709.       
  1710.       LONG  APIENTRY GpiCreateLogFont(HPS hps,
  1711.                                       PSTR8 pName,
  1712.                                       LONG lLcid,
  1713.                                       PFATTRS pfatAttrs);
  1714.       
  1715.       BOOL  APIENTRY GpiDeleteSetId(HPS hps,
  1716.                                     LONG lLcid);
  1717.       
  1718.       BOOL  APIENTRY GpiLoadFonts(HAB hab,
  1719.                                   PSZ pszFilename);
  1720.       
  1721.       BOOL  APIENTRY GpiUnloadFonts(HAB hab,
  1722.                                     PSZ pszFilename);
  1723.       
  1724.       LONG  APIENTRY GpiQueryFonts(HPS hps,
  1725.                                    ULONG flOptions,
  1726.                                    PSZ pszFacename,
  1727.                                    PLONG plReqFonts,
  1728.                                    LONG lMetricsLength,
  1729.                                    PFONTMETRICS afmMetrics);
  1730.       
  1731.       BOOL  APIENTRY GpiQueryFontMetrics(HPS hps,
  1732.                                          LONG lMetricsLength,
  1733.                                          PFONTMETRICS pfmMetrics);
  1734.       
  1735.       LONG  APIENTRY GpiQueryKerningPairs(HPS hps,
  1736.                                           LONG lCount,
  1737.                                           PKERNINGPAIRS akrnprData);
  1738.       
  1739.       BOOL  APIENTRY GpiQueryWidthTable(HPS hps,
  1740.                                         LONG lFirstChar,
  1741.                                         LONG lCount,
  1742.                                         PLONG alData);
  1743.       
  1744.       LONG  APIENTRY GpiQueryNumberSetIds(HPS hps);
  1745.       
  1746.       BOOL  APIENTRY GpiQuerySetIds(HPS hps,
  1747.                                     LONG lCount,
  1748.                                     PLONG alTypes,
  1749.                                     PSTR8 aNames,
  1750.                                     PLONG allcids);
  1751.       
  1752.       ULONG APIENTRY GpiQueryFaceString(HPS PS,
  1753.                                         PSZ FamilyName,
  1754.                                         PFACENAMEDESC attrs,
  1755.                                         LONG length,
  1756.                                         PSZ CompoundFaceName);
  1757.       
  1758.       BOOL  APIENTRY GpiQueryLogicalFont(HPS PS,
  1759.                                          LONG lcid,
  1760.                                          PSTR8 name,
  1761.                                          PFATTRS attrs,
  1762.                                          LONG length);
  1763.       
  1764.       ULONG APIENTRY GpiQueryFontAction(HAB anchor,
  1765.                                         ULONG options);
  1766.       
  1767.       BOOL  APIENTRY GpiLoadPublicFonts(HAB,
  1768.                                         PSZ);
  1769.       
  1770.       BOOL  APIENTRY GpiUnloadPublicFonts(HAB,
  1771.                                           PSZ);
  1772.       
  1773.       #ifndef INCL_SAADEFS
  1774.          
  1775.          BOOL    APIENTRY GpiSetCp(HPS hps,
  1776.                                    ULONG ulCodePage);
  1777.          
  1778.          ULONG   APIENTRY GpiQueryCp(HPS hps);
  1779.          
  1780.          LONG    APIENTRY GpiQueryFullFontFileDescs(HAB hab,
  1781.                                                     PSZ pszFilename,
  1782.                                                     PLONG plCount,
  1783.                                                     PVOID pNames,
  1784.                                                     PLONG plNamesBuffLength);
  1785.          
  1786.          LONG    APIENTRY GpiQueryFontFileDescriptions(HAB hab,
  1787.                                                        PSZ pszFilename,
  1788.                                                        PLONG plCount,
  1789.                                                        PFFDESCS affdescsNames);
  1790.          
  1791.       #endif /* no INCL_SAADEFS */
  1792.       
  1793.    #endif /* no INCL_DDIDEFS */
  1794.    
  1795. #endif /* non-common GPILCIDS */
  1796.  
  1797. #if (defined(INCL_GPIBITMAPS) || !defined(INCL_NOCOMMON))
  1798.    /* raster operations defined for GpiBitBlt */
  1799.    #define ROP_SRCCOPY                0x00CCL
  1800.    #define ROP_SRCPAINT               0x00EEL
  1801.    #define ROP_SRCAND                 0x0088L
  1802.    #define ROP_SRCINVERT              0x0066L
  1803.    #define ROP_SRCERASE               0x0044L
  1804.    #define ROP_NOTSRCCOPY             0x0033L
  1805.    #define ROP_NOTSRCERASE            0x0011L
  1806.    #define ROP_MERGECOPY              0x00C0L
  1807.    #define ROP_MERGEPAINT             0x00BBL
  1808.    #define ROP_PATCOPY                0x00F0L
  1809.    #define ROP_PATPAINT               0x00FBL
  1810.    #define ROP_PATINVERT              0x005AL
  1811.    #define ROP_DSTINVERT              0x0055L
  1812.    #define ROP_ZERO                   0x0000L
  1813.    #define ROP_ONE                    0x00FFL
  1814.    
  1815.    /* Blt options for GpiBitBlt */
  1816.    #define BBO_OR                          0L
  1817.    #define BBO_AND                         1L
  1818.    #define BBO_IGNORE                      2L
  1819.    #define BBO_PAL_COLORS                  4L
  1820.    #define BBO_NO_COLOR_INFO               8L
  1821.    
  1822.    /* Fill options for GpiFloodFill */
  1823.    #define FF_BOUNDARY                     0L
  1824.    #define FF_SURFACE                      1L
  1825.    
  1826.    /* error return for GpiSetBitmap */
  1827.    #define HBM_ERROR            ((HBITMAP)-1L)
  1828.    
  1829.    #ifndef INCL_DDIDEFS
  1830.       /*** bitmap and pel functions */
  1831.       
  1832.       LONG     APIENTRY GpiBitBlt(HPS hpsTarget,
  1833.                                   HPS hpsSource,
  1834.                                   LONG lCount,
  1835.                                   PPOINTL aptlPoints,
  1836.                                   LONG lRop,
  1837.                                   ULONG flOptions);
  1838.       
  1839.       BOOL     APIENTRY GpiDeleteBitmap(HBITMAP hbm);
  1840.       
  1841.       HBITMAP  APIENTRY GpiLoadBitmap(HPS hps,
  1842.                                       HMODULE Resource,
  1843.                                       ULONG idBitmap,
  1844.                                       LONG lWidth,
  1845.                                       LONG lHeight);
  1846.       
  1847.       HBITMAP  APIENTRY GpiSetBitmap(HPS hps,
  1848.                                      HBITMAP hbm);
  1849.       
  1850.       LONG     APIENTRY GpiWCBitBlt(HPS hpsTarget,
  1851.                                     HBITMAP hbmSource,
  1852.                                     LONG lCount,
  1853.                                     PPOINTL aptlPoints,
  1854.                                     LONG lRop,
  1855.                                     ULONG flOptions);
  1856.       
  1857.    #endif /* no INCL_DDIDEFS */
  1858.    
  1859. #endif /* common GPIBITMAPS */
  1860.  
  1861. #ifdef INCL_GPIBITMAPS
  1862.    
  1863.    /*** include bitmap structures and file formats *************************/
  1864.    #include <pmbitmap.h>
  1865.    
  1866.    /* usage flags for GpiCreateBitmap */
  1867.    #define CBM_INIT        0x0004L
  1868.    
  1869.    /* error return code for GpiSet/QueryBitmapBits */
  1870.    #define BMB_ERROR                     (-1L)
  1871.    
  1872.    #ifndef INCL_DDIDEFS
  1873.       
  1874.       /*** bitmap and pel functions */
  1875.       
  1876.       HBITMAP APIENTRY GpiCreateBitmap(HPS hps,
  1877.                                        PBITMAPINFOHEADER2 pbmpNew,
  1878.                                        ULONG flOptions,
  1879.                                        PBYTE pbInitData,
  1880.                                        PBITMAPINFO2 pbmiInfoTable);
  1881.       
  1882.       LONG    APIENTRY GpiSetBitmapBits(HPS hps,
  1883.                                         LONG lScanStart,
  1884.                                         LONG lScans,
  1885.                                         PBYTE pbBuffer,
  1886.                                         PBITMAPINFO2 pbmiInfoTable);
  1887.       
  1888.       BOOL    APIENTRY GpiSetBitmapDimension(HBITMAP hbm,
  1889.                                              PSIZEL psizlBitmapDimension);
  1890.       
  1891.       BOOL    APIENTRY GpiSetBitmapId(HPS hps,
  1892.                                       HBITMAP hbm,
  1893.                                       LONG lLcid);
  1894.       
  1895.       LONG    APIENTRY GpiQueryBitmapBits(HPS hps,
  1896.                                           LONG lScanStart,
  1897.                                           LONG lScans,
  1898.                                           PBYTE pbBuffer,
  1899.                                           PBITMAPINFO2 pbmiInfoTable);
  1900.       
  1901.       BOOL    APIENTRY GpiQueryBitmapDimension(HBITMAP hbm,
  1902.                                                PSIZEL psizlBitmapDimension);
  1903.       
  1904.       HBITMAP APIENTRY GpiQueryBitmapHandle(HPS hps,
  1905.                                             LONG lLcid);
  1906.       
  1907.       BOOL    APIENTRY GpiQueryBitmapParameters(HBITMAP hbm,
  1908.                                                 PBITMAPINFOHEADER pbmpData);
  1909.       
  1910.       BOOL    APIENTRY GpiQueryBitmapInfoHeader(HBITMAP hbm,
  1911.                                                 PBITMAPINFOHEADER2 pbmpData);
  1912.       
  1913.       BOOL    APIENTRY GpiQueryDeviceBitmapFormats(HPS hps,
  1914.                                                    LONG lCount,
  1915.                                                    PLONG alArray);
  1916.       
  1917.       LONG    APIENTRY GpiSetPel(HPS hps,
  1918.                                  PPOINTL pptlPoint);
  1919.       
  1920.       LONG    APIENTRY GpiQueryPel(HPS hps,
  1921.                                    PPOINTL pptlPoint);
  1922.       
  1923.       LONG    APIENTRY GpiFloodFill(HPS hps,
  1924.                                     LONG lOptions,
  1925.                                     LONG lColor);
  1926.       
  1927.       LONG    APIENTRY GpiDrawBits(HPS hps,
  1928.                                    PVOID pBits,
  1929.                                    PBITMAPINFO2 pbmiInfoTable,
  1930.                                    LONG lCount,
  1931.                                    PPOINTL aptlPoints,
  1932.                                    LONG lRop,
  1933.                                    ULONG flOptions);
  1934.       
  1935.    #endif /* no INCL_DDIDEFS */
  1936.    
  1937.    
  1938. #endif /* INCL_GPIBITMAPS */
  1939.  
  1940. #ifdef INCL_GPIREGIONS
  1941.    
  1942.    /* options for GpiCombineRegion */
  1943.    #define CRGN_OR                         1L
  1944.    #define CRGN_COPY                       2L
  1945.    #define CRGN_XOR                        4L
  1946.    #define CRGN_AND                        6L
  1947.    #define CRGN_DIFF                       7L
  1948.    
  1949.    /* usDirection of returned region data for GpiQueryRegionRects */
  1950.    #define RECTDIR_LFRT_TOPBOT             1L
  1951.    #define RECTDIR_RTLF_TOPBOT             2L
  1952.    #define RECTDIR_LFRT_BOTTOP             3L
  1953.    #define RECTDIR_RTLF_BOTTOP             4L
  1954.    
  1955.    /* control data for GpiQueryRegionRects */
  1956.    typedef struct _RGNRECT          /* rgnrc */
  1957.    {
  1958.       ULONG  ircStart;
  1959.       ULONG  crc;
  1960.       ULONG  crcReturned;
  1961.       ULONG  ulDirection;
  1962.    } RGNRECT;
  1963.    typedef RGNRECT *PRGNRECT;
  1964.    
  1965.    /* return code to indicate type of region for GpiCombineRegion and others */
  1966.    #define RGN_ERROR                       0L
  1967.    #define RGN_NULL                        1L
  1968.    #define RGN_RECT                        2L
  1969.    #define RGN_COMPLEX                     3L
  1970.    
  1971.    /* return codes for GpiPtInRegion */
  1972.    #define PRGN_ERROR                      0L
  1973.    #define PRGN_OUTSIDE                    1L
  1974.    #define PRGN_INSIDE                     2L
  1975.    
  1976.    /* return codes for GpiRectInRegion */
  1977.    #define RRGN_ERROR                      0L
  1978.    #define RRGN_OUTSIDE                    1L
  1979.    #define RRGN_PARTIAL                    2L
  1980.    #define RRGN_INSIDE                     3L
  1981.    
  1982.    /* return codes for GpiEqualRegion */
  1983.    #define EQRGN_ERROR                     0L
  1984.    #define EQRGN_NOTEQUAL                  1L
  1985.    #define EQRGN_EQUAL                     2L
  1986.    
  1987.    /* error return code for GpiSetRegion */
  1988.    #define HRGN_ERROR              ((HRGN)-1L)
  1989.    
  1990.    #ifndef INCL_DDIDEFS
  1991.       
  1992.       
  1993.       /*** main region functions */
  1994.       LONG  APIENTRY GpiCombineRegion(HPS hps,
  1995.                                       HRGN hrgnDest,
  1996.                                       HRGN hrgnSrc1,
  1997.                                       HRGN hrgnSrc2,
  1998.                                       LONG lMode);
  1999.       
  2000.       HRGN  APIENTRY GpiCreateRegion(HPS hps,
  2001.                                      LONG lCount,
  2002.                                      PRECTL arclRectangles);
  2003.       
  2004.       BOOL  APIENTRY GpiDestroyRegion(HPS hps,
  2005.                                       HRGN hrgn);
  2006.       
  2007.       LONG  APIENTRY GpiEqualRegion(HPS hps,
  2008.                                     HRGN hrgnSrc1,
  2009.                                     HRGN hrgnSrc2);
  2010.       
  2011.       BOOL  APIENTRY GpiOffsetRegion(HPS hps,
  2012.                                      HRGN Hrgn,
  2013.                                      PPOINTL pptlOffset);
  2014.       
  2015.       LONG  APIENTRY GpiPaintRegion(HPS hps,
  2016.                                     HRGN hrgn);
  2017.       
  2018.       LONG  APIENTRY GpiFrameRegion(HPS hps,
  2019.                                     HRGN hrgn,
  2020.                                     PSIZEL thickness);
  2021.       
  2022.       LONG  APIENTRY GpiPtInRegion(HPS hps,
  2023.                                    HRGN hrgn,
  2024.                                    PPOINTL pptlPoint);
  2025.       
  2026.       LONG  APIENTRY GpiQueryRegionBox(HPS hps,
  2027.                                        HRGN hrgn,
  2028.                                        PRECTL prclBound);
  2029.       
  2030.       BOOL  APIENTRY GpiQueryRegionRects(HPS hps,
  2031.                                          HRGN hrgn,
  2032.                                          PRECTL prclBound,
  2033.                                          PRGNRECT prgnrcControl,
  2034.                                          PRECTL prclRect);
  2035.       
  2036.       LONG  APIENTRY GpiRectInRegion(HPS hps,
  2037.                                      HRGN hrgn,
  2038.                                      PRECTL prclRect);
  2039.       
  2040.       BOOL  APIENTRY GpiSetRegion(HPS hps,
  2041.                                   HRGN hrgn,
  2042.                                   LONG lcount,
  2043.                                   PRECTL arclRectangles);
  2044.       
  2045.       /*** clip region functions */
  2046.       LONG  APIENTRY GpiSetClipRegion(HPS hps,
  2047.                                       HRGN hrgn,
  2048.                                       PHRGN phrgnOld);
  2049.       
  2050.       #ifndef INCL_SAADEFS
  2051.          
  2052.          
  2053.          HRGN  APIENTRY GpiQueryClipRegion(HPS hps);
  2054.          
  2055.          LONG  APIENTRY GpiQueryClipBox(HPS hps,
  2056.                                         PRECTL prclBound);
  2057.          
  2058.       #endif /* no INCL_SAADEFS */
  2059.       
  2060.       
  2061.       LONG  APIENTRY GpiExcludeClipRectangle(HPS hps,
  2062.                                              PRECTL prclRectangle);
  2063.       
  2064.       LONG  APIENTRY GpiIntersectClipRectangle(HPS hps,
  2065.                                                PRECTL prclRectangle);
  2066.       
  2067.       #ifndef INCL_SAADEFS
  2068.          
  2069.          
  2070.          LONG  APIENTRY GpiOffsetClipRegion(HPS hps,
  2071.                                             PPOINTL pptlPoint);
  2072.          
  2073.       #endif /* no INCL_SAADEFS */
  2074.       
  2075.    #endif /* no INCL_DDIDEFS */
  2076.    
  2077. #endif /* non-common GPIREGIONS */
  2078. #ifdef INCL_GPIMETAFILES
  2079.    
  2080.    #ifndef INCL_DDIDEFS
  2081.       
  2082.       /* constants for index values of options array for GpiPlayMetaFile */
  2083.       #define PMF_SEGBASE                     0
  2084.       #define PMF_LOADTYPE                    1
  2085.       #define PMF_RESOLVE                     2
  2086.       #define PMF_LCIDS                       3
  2087.       #define PMF_RESET                       4
  2088.       #define PMF_SUPPRESS                    5
  2089.       #define PMF_COLORTABLES                 6
  2090.       #define PMF_COLORREALIZABLE             7
  2091.       #define PMF_DEFAULTS                    8
  2092.       #define PMF_DELETEOBJECTS               9
  2093.       
  2094.       /* options for GpiPlayMetaFile */
  2095.       #define RS_DEFAULT                      0L
  2096.       #define RS_NODISCARD                    1L
  2097.       #define LC_DEFAULT                      0L
  2098.       #define LC_NOLOAD                       1L
  2099.       #define LC_LOADDISC                     3L
  2100.       #define LT_DEFAULT                      0L
  2101.       #define LT_NOMODIFY                     1L
  2102.       #define LT_ORIGINALVIEW                 4L
  2103.       #define RES_DEFAULT                     0L
  2104.       #define RES_NORESET                     1L
  2105.       #define RES_RESET                       2L
  2106.       #define SUP_DEFAULT                     0L
  2107.       #define SUP_NOSUPPRESS                  1L
  2108.       #define SUP_SUPPRESS                    2L
  2109.       #define CTAB_DEFAULT                    0L
  2110.       #define CTAB_NOMODIFY                   1L
  2111.       #define CTAB_REPLACE                    3L
  2112.       #define CTAB_REPLACEPALETTE             4L
  2113.       #define CREA_DEFAULT                    0L
  2114.       #define CREA_REALIZE                    1L
  2115.       #define CREA_NOREALIZE                  2L
  2116.       #define CREA_DOREALIZE                  3L
  2117.       
  2118.       #ifndef INCL_SAADEFS
  2119.          
  2120.          #define DDEF_DEFAULT                    0L
  2121.          #define DDEF_IGNORE                     1L
  2122.          #define DDEF_LOADDISC                   3L
  2123.          #define DOBJ_DEFAULT                    0L
  2124.          #define DOBJ_NODELETE                   1L
  2125.          #define DOBJ_DELETE                     2L
  2126.          #define RSP_DEFAULT                     0L
  2127.          #define RSP_NODISCARD                   1L
  2128.          
  2129.       #endif /* no INCL_SAADEFS */
  2130.       
  2131.       /*** MetaFile functions */
  2132.       
  2133.       HMF   APIENTRY GpiCopyMetaFile(HMF hmf);
  2134.       
  2135.       BOOL  APIENTRY GpiDeleteMetaFile(HMF hmf);
  2136.       
  2137.       HMF   APIENTRY GpiLoadMetaFile(HAB hab,
  2138.                                      PSZ pszFilename);
  2139.       
  2140.       LONG  APIENTRY GpiPlayMetaFile(HPS hps,
  2141.                                      HMF hmf,
  2142.                                      LONG lCount1,
  2143.                                      PLONG alOptarray,
  2144.                                      PLONG plSegCount,
  2145.                                      LONG lCount2,
  2146.                                      PSZ pszDesc);
  2147.       
  2148.       BOOL  APIENTRY GpiQueryMetaFileBits(HMF hmf,
  2149.                                           LONG lOffset,
  2150.                                           LONG lLength,
  2151.                                           PBYTE pbData);
  2152.       
  2153.       LONG  APIENTRY GpiQueryMetaFileLength(HMF hmf);
  2154.       
  2155.       BOOL  APIENTRY GpiSaveMetaFile(HMF hmf,
  2156.                                      PSZ pszFilename);
  2157.       
  2158.       #ifndef INCL_SAADEFS
  2159.          
  2160.          BOOL  APIENTRY GpiSetMetaFileBits(HMF hmf,
  2161.                                            LONG lOffset,
  2162.                                            LONG lLength,
  2163.                                            PBYTE pbBuffer);
  2164.       #endif /* no INCL_SAADEFS */
  2165.       
  2166.    #endif /* no INCL_DDIDEFS */
  2167.    
  2168. #endif /* non-common GPIMETAFILES */
  2169.  
  2170. #ifdef INCL_GPIDEFAULTS
  2171.    
  2172.    /*** default functions */
  2173.    
  2174.    BOOL  APIENTRY GpiQueryDefArcParams(HPS hps,
  2175.                                        PARCPARAMS parcpArcParams);
  2176.    
  2177.    BOOL  APIENTRY GpiQueryDefAttrs(HPS hps,
  2178.                                    LONG lPrimType,
  2179.                                    ULONG flAttrMask,
  2180.                                    PBUNDLE ppbunAttrs);
  2181.    
  2182.    BOOL  APIENTRY GpiQueryDefTag(HPS hps,
  2183.                                  PLONG plTag);
  2184.    
  2185.    BOOL  APIENTRY GpiQueryDefViewingLimits(HPS hps,
  2186.                                            PRECTL prclLimits);
  2187.    
  2188.    BOOL  APIENTRY GpiSetDefArcParams(HPS hps,
  2189.                                      PARCPARAMS parcpArcParams);
  2190.    
  2191.    BOOL  APIENTRY GpiSetDefAttrs(HPS hps,
  2192.                                  LONG lPrimType,
  2193.                                  ULONG flAttrMask,
  2194.                                  PBUNDLE ppbunAttrs);
  2195.    
  2196.    BOOL  APIENTRY GpiSetDefTag(HPS hps,
  2197.                                LONG lTag);
  2198.    
  2199.    BOOL  APIENTRY GpiSetDefViewingLimits(HPS hps,
  2200.                                          PRECTL prclLimits);
  2201.    
  2202.    
  2203. #endif /* GPIDEFAULTS */
  2204.  
  2205. #ifdef INCL_GPIPOLYGON
  2206.    typedef struct _POLYGON   /* plygn */
  2207.    {
  2208.       ULONG       ulPoints;
  2209.       PPOINTL     aPointl;
  2210.    } POLYGON;
  2211.    typedef POLYGON *PPOLYGON;
  2212.    
  2213.    typedef struct _POLYSET   /* plyst */
  2214.    {
  2215.       ULONG       ulPolys;
  2216.       POLYGON     aPolygon[1];
  2217.    } POLYSET;
  2218.    typedef POLYSET *PPOLYSET;
  2219.    
  2220.    /* control flags used by GpiPolygons */
  2221.    #define POLYGON_NOBOUNDARY                   0L
  2222.    #define POLYGON_BOUNDARY                0x0001L
  2223.    
  2224.    #define POLYGON_ALTERNATE                    0L
  2225.    #define POLYGON_WINDING                 0x0002L
  2226.    
  2227.    #define POLYGON_INCL                         0L
  2228.    #define POLYGON_EXCL                    0x0008L
  2229.    
  2230.    #ifndef INCL_DDIDEFS
  2231.       
  2232.       LONG APIENTRY GpiPolygons(HPS hps,
  2233.                                 ULONG ulCount,
  2234.                                 PPOLYGON paplgn,
  2235.                                 ULONG flOptions,
  2236.                                 ULONG flModel);
  2237.       
  2238.    #endif /* no INCL_DDIDEFS */
  2239. #endif /* non-common GPIPOLYGON */
  2240.  
  2241. #ifdef INCL_GPIERRORS
  2242.    #include <pmerr.h>
  2243. #endif /* GPIERRORS */
  2244.  
  2245.  
  2246. /* NOINC */
  2247. #ifdef __IBMC__
  2248.    #pragma checkout( suspend )
  2249.    #ifndef __CHKHDR__
  2250.       #pragma checkout( resume )
  2251.    #endif
  2252.    #pragma checkout( resume )
  2253. #endif
  2254. /* INC */
  2255.  
  2256. /**************************** end of file **********************************/
  2257.