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