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

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