home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / H / PMGPI.H < prev    next >
C/C++ Source or Header  |  1995-08-30  |  86KB  |  2,346 lines

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