home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bpos2-v2.zip / API-UNIT.ZIP / PMGPI.PAS < prev    next >
Pascal/Delphi Source File  |  1993-11-24  |  63KB  |  1,460 lines

  1. { **************************************************************************\
  2. *
  3. * Module Name: PMGPI.H
  4. *
  5. * OS/2 Presentation Manager GPI constants, types and function declarations
  6. *
  7. * Copyright (c) International Business Machines Corporation 1981, 1988-1990
  8. *
  9. * =============================================================================
  10. *
  11. * The following symbols are used in this file for conditional sections.
  12. *
  13. *   INCL_GPI                Include all of the GPI
  14. *   INCL_GPICONTROL         Basic PS control
  15. *   INCL_GPICORRELATION     Picking, Boundary and Correlation
  16. *   INCL_GPISEGMENTS        Segment Control and Drawing
  17. *   INCL_GPISEGEDITING      Segment Editing via Elements
  18. *   INCL_GPITRANSFORMS      Transform and Transform Conversion
  19. *   INCL_GPIPATHS           Paths and Clipping with Paths
  20. *   INCL_GPILOGCOLORTABLE   Logical Color Tables
  21. *   INCL_GPIPRIMITIVES      Drawing Primitives and Primitive Attributes
  22. *   INCL_GPILCIDS           Phyical and Logical Fonts with Lcids
  23. *   INCL_GPIBITMAPS         Bitmaps and Pel Operations
  24. *   INCL_GPIREGIONS         Regions and Clipping with Regions
  25. *   INCL_GPIMETAFILES       Metafiles
  26. *   INCL_GPIDEFAULTS        Default Primitive Attributes
  27. *   INCL_GPIERRORS          defined if INCL_ERRORS defined
  28. *
  29. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  30. * include only the definitions for the DDI. The programmer using the GPI
  31. * can ignore this symbol
  32. *
  33. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  34. * include only the definitions for the SAA. The programmer using the GPI
  35. * can ignore this symbol
  36. *
  37. \**************************************************************************}
  38. {| Version:   1.00
  39.  | Original translation: Peter Singer (PSi)
  40.  }
  41. Unit PmGPI;
  42. Interface
  43. Uses
  44.   Os2Def;
  45.  
  46. CONST
  47.  {  General GPI return values }
  48.    GPI_ERROR                   =   0;
  49.    GPI_OK                      =   1;
  50.    GPI_ALTERROR                =  -1;
  51.  
  52.  {  fixed point number - implicit binary point between 2 and 3 hex digits }
  53. TYPE
  54.    FIXED  = LONG;             { fx }
  55.    PFIXED = ^FIXED;
  56.  
  57.  {  fixed point number - implicit binary point between 1st and 2nd hex digits }
  58.    FIXED88 = USHORT;         { fx88 }
  59.  
  60.  {  fixed point signed number - implicit binary point between bits 14 and 13. }
  61.  {                              Bit 15 is the sign bit.                       }
  62.  {                              Thus 1.0 is represented by 16384 (0x4000)     }
  63.  {                              and -1.0 is represented by -16384 (0xc000)    }
  64.    FIXED114 = USHORT;         { fx114 }
  65.  
  66.  {  make FIXED number from SHORT integer part and USHORT fractional part }
  67. {***MC #define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart)}
  68.  {  extract fractional part from a fixed quantity }
  69. {****MC #define FIXEDFRAC(fx)                (LOUSHORT(fx))}
  70.  {  extract integer part from a fixed quantity }
  71. {****MV #define FIXEDINT(fx)                 ((SHORT)HIUSHORT(fx))}
  72.  
  73.  {  structure for size parameters e.g. for GpiCreatePS }
  74. TYPE
  75.     SIZEL = record            {  sizl }
  76.       cx,
  77.       cy: LONG;
  78.     end;
  79.     PSIZEL =^SIZEL;
  80.  
  81. CONST
  82.  {  return code on GpiQueryLogColorTable,GpiQueryRealColors and GpiQueryPel }
  83.  CLR_NOINDEX               =  -254;
  84.  
  85.  
  86.  {  units for GpiCreatePS and others }
  87.  PU_ARBITRARY              = $0004;
  88.  PU_PELS                   = $0008;
  89.  PU_LOMETRIC               = $000C;
  90.  PU_HIMETRIC               = $0010;
  91.  PU_LOENGLISH              = $0014;
  92.  PU_HIENGLISH              = $0018;
  93.  PU_TWIPS                  = $001C;
  94.  
  95.  {  format for GpiCreatePS }
  96.  GPIF_DEFAULT              =     0;
  97.  GPIF_SHORT                = $0100;
  98.  GPIF_LONG                 = $0200;
  99.  
  100.  
  101.  {  PS type for GpiCreatePS }
  102.  GPIT_NORMAL               =     0;
  103.  GPIT_MICRO                = $1000;
  104.  
  105.  
  106.  {  implicit associate flag for GpiCreatePS }
  107.  GPIA_NOASSOC              =     0;
  108.  GPIA_ASSOC                = $4000;
  109.  
  110.  {  return error for GpiQueryDevice }
  111.  HDC_ERROR                = HDC(-1);
  112.  
  113.  {  common GPICONTROL functions }
  114. Function GpiCreatePS(hab: HAB; hdc: HDC; psizlSize: PSIZEL; flOptions: ULONG): HPS;
  115. Function GpiDestroyPS(hps: HPS): BOOL;
  116. Function GpiAssociate(hps: HPS; hdc: HDC): BOOL;
  117. Function GpiRestorePS(hps: HPS; lPSid: LONG): BOOL;
  118. Function GpiSavePS(hps: HPS): LONG;
  119. Function GpiErase(hps: HPS): BOOL;
  120.  
  121. Function GpiQueryDevice(hps: HPS): HDC;
  122.  
  123. CONST
  124.  {  options for GpiResetPS }
  125.  GRES_ATTRS                = $0001;
  126.  GRES_SEGMENTS             = $0002;
  127.  GRES_ALL                  = $0004;
  128.  
  129.  {  option masks for PS options used by GpiQueryPs }
  130.  PS_UNITS                  = $00FC;
  131.  PS_FORMAT                 = $0F00;
  132.  PS_TYPE                   = $1000;
  133.  PS_MODE                   = $2000;
  134.  PS_ASSOCIATE              = $4000;
  135.  PS_NORESET                = $8000;
  136.  
  137.  
  138.  {  error context returned by GpiErrorSegmentData }
  139.  GPIE_SEGMENT              =     0;
  140.  GPIE_ELEMENT              =     1;
  141.  GPIE_DATA                 =     2;
  142.  
  143.  
  144.  {  control parameter for GpiSetDrawControl }
  145.  DCTL_ERASE                =     1;
  146.  DCTL_DISPLAY              =     2;
  147.  DCTL_BOUNDARY             =     3;
  148.  DCTL_DYNAMIC              =     4;
  149.  DCTL_CORRELATE            =     5;
  150.  
  151.  {  constants for GpiSet/QueryDrawControl }
  152.  DCTL_ERROR                =    -1;
  153.  DCTL_OFF                  =     0;
  154.  DCTL_ON                   =     1;
  155.  
  156.  {  constants for GpiSet/QueryStopDraw }
  157.  SDW_ERROR                 =    -1;
  158.  SDW_OFF                   =     0;
  159.  SDW_ON                    =     1;
  160.  
  161.  
  162.  {  drawing for GpiSet/QueryDrawingMode }
  163.  DM_ERROR                  =     0;
  164.  DM_DRAW                   =     1;
  165.  DM_RETAIN                 =     2;
  166.  DM_DRAWANDRETAIN          =     3;
  167.  
  168.  { ** other GPICONTROL functions }
  169. Function GpiResetPS(hps: HPS; flOptions: ULONG): BOOL;
  170.  
  171. Function GpiSetPS(hps: HPS; psizlsize: PSIZEL; flOptions: ULONG): BOOL;
  172.  
  173.  
  174. Function GpiQueryPS(hps: HPS; psizlSize: PSIZEL): ULONG;
  175. Function GpiErrorSegmentData(hps: HPS; plSegment, plContext: PLONG): LONG;
  176.  
  177. Function GpiQueryDrawControl(hps: HPS; lControl: LONG): LONG;
  178. Function GpiSetDrawControl(hps: HPS; lControl, lValue: LONG): BOOL;
  179.  
  180. Function GpiQueryDrawingMode(hps: HPS): LONG;
  181. Function GpiSetDrawingMode(hps: HPS; lMode: LONG): BOOL;
  182.  
  183. Function GpiQueryStopDraw(hps: HPS): LONG;
  184. Function GpiSetStopDraw(hps: HPS; lValue: LONG): BOOL;
  185.  
  186. CONST
  187.  {  options for GpiSetPickApertureSize }
  188.  PICKAP_DEFAULT              =   0;
  189.  PICKAP_REC                  =   2;
  190.  
  191.  {  type of correlation for GpiCorrelateChain }
  192.  PICKSEL_VISIBLE             =   0;
  193.  PICKSEL_ALL                 =   1;
  194.  
  195.  {  return code to indicate correlate hit(s) }
  196.  GPI_HITS                    =   2;
  197.  
  198.  { ** picking,  correlation and boundary functions }
  199. Function GpiCorrelateChain(hps: HPS; lType: LONG; pptlPick: PPOINTL;
  200.                            lMaxHits, lMaxDepth: LONG; pl2: PLONG): LONG;
  201. Function GpiQueryTag(hps: HPS; plTag: PLONG): BOOL;
  202. Function GpiSetTag(hps: HPS; lTag: LONG): BOOL;
  203. Function GpiQueryPickApertureSize(hps: HPS; psizlSize: PSIZEL): BOOL;
  204. Function GpiSetPickApertureSize(hps: HPS; lOptions: LONG; psizlSize: PSIZEL): BOOL;
  205.  
  206.  
  207. Function GpiQueryPickAperturePosition(hps: HPS; pptlPoint: PPOINTL): BOOL;
  208. Function GpiSetPickAperturePosition(hps: HPS; pptlPick: PPOINTL): BOOL;
  209. Function GpiQueryBoundaryData(hps: HPS; prclBoundary: PRECTL): BOOL;
  210. Function GpiResetBoundaryData(hps: HPS): BOOL;
  211.  
  212. Function GpiCorrelateFrom(hps: HPS; lFirstSegment, lLastSegment: LONG;
  213.                           lType: LONG; pptlPick: PPOINTL;
  214.                           lMaxHits, lMaxDepth: LONG; plSegTag: PLONG): LONG;
  215. Function GpiCorrelateSegment(hps: HPS; lSegment, lType: LONG;
  216.                              pptlPick: PPOINTL; lMaxHits, lMaxDepth: LONG;
  217.                              alSegTag: PLONG): LONG;
  218.  
  219. CONST
  220.  {  data formats for GpiPutData and GpiGetData }
  221.  DFORM_NOCONV                 =  0;
  222.  
  223.  
  224.  DFORM_S370SHORT              =  1;
  225.  DFORM_PCSHORT                =  2;
  226.  DFORM_PCLONG                 =  4;
  227.  
  228.  
  229.  {  segment attributes used by GpiSet/QuerySegmentAttrs and others }
  230.  ATTR_ERROR                   = -1;
  231.  ATTR_DETECTABLE              =  1;
  232.  ATTR_VISIBLE                 =  2;
  233.  ATTR_CHAINED                 =  6;
  234.  ATTR_DYNAMIC                 =  8;
  235.  ATTR_FASTCHAIN               =  9;
  236.  ATTR_PROP_DETECTABLE         = 10;
  237.  ATTR_PROP_VISIBLE            = 11;
  238.  
  239.  {  attribute on/off values }
  240.  ATTR_OFF                     =  0;
  241.  ATTR_ON                      =  1;
  242.  
  243.  {  segment priority used by GpiSetSegmentPriority and others }
  244.  LOWER_PRI                    = -1;
  245.  HIGHER_PRI                   =  1;
  246.  
  247.  { ** segment control functions }
  248. Function GpiOpenSegment(hps: HPS; lSegment: LONG): BOOL;
  249. Function GpiCloseSegment(hps: HPS): BOOL;
  250. Function GpiDeleteSegment(hps: HPS; lSegid: LONG): BOOL;
  251. Function GpiQueryInitialSegmentAttrs(hps: HPS; lAttribute: LONG): LONG;
  252. Function GpiSetInitialSegmentAttrs(hps: HPS; lAttribute, lValue: LONG): BOOL;
  253. Function GpiQuerySegmentAttrs(hps: HPS; lSegid, lAttribute: LONG): LONG;
  254. Function GpiSetSegmentAttrs(hps: HPS; lSegid, lAttribute: LONG;
  255.                             lValue: LONG): BOOL;
  256. Function GpiQuerySegmentPriority(hps: HPS; lRefSegid, lOrder: LONG): LONG;
  257. Function GpiSetSegmentPriority(hps: HPS; lSegid, lRefSegid: LONG;
  258.                                lOrder: LONG): BOOL;
  259. Function GpiDeleteSegments(hps: HPS; lFirstSegment, lLastSegment: LONG): BOOL;
  260. Function GpiQuerySegmentNames(hps: HPS; lFirstSegid, lLastSegid: LONG;
  261.                               lMax: LONG; alSegids: PLONG): LONG;
  262.  
  263.  { ** draw functions for segments }
  264. Function GpiGetData(hps: HPS; lSegid: LONG; plOffset: PLONG;
  265.                     lFormat, lLength: LONG; pbData: PBYTE): LONG;
  266. Function GpiPutData(hps: HPS; lFormat: LONG; plCount: PLONG; pbData: PBYTE): LONG;
  267. Function GpiDrawChain(hps: HPS): BOOL;
  268. Function GpiDrawFrom(hps: HPS; lFirstSegment, lLastSegment: LONG): BOOL;
  269. Function GpiDrawSegment(hps: HPS; lSegment: LONG): BOOL;
  270.  
  271.  
  272. Function GpiDrawDynamics(hps: HPS): BOOL;
  273. Function GpiRemoveDynamics(hps: HPS; lFirstSegid, lLastSegid: LONG): BOOL;
  274.  
  275. CONST
  276.  {  edit modes used by GpiSet/QueryEditMode }
  277.  SEGEM_ERROR                       = 0;
  278.  SEGEM_INSERT                      = 1;
  279.  SEGEM_REPLACE                     = 2;
  280.  
  281.  { ** segment editing by element functions }
  282. Function GpiBeginElement(hps: HPS; lType: LONG; pszDesc: PSZ): BOOL;
  283. Function GpiEndElement(hps: HPS): BOOL;
  284. Function GpiLabel(hps: HPS; lLabel: LONG): BOOL;
  285. Function GpiElement(hps: HPS; lType: LONG; pszDesc: PSZ; lLength: LONG;
  286.                     pbData: PBYTE): LONG;
  287. Function GpiQueryElement(hps: HPS; lOff, lMaxLength: LONG; pbData: PBYTE): LONG;
  288. Function GpiDeleteElement(hps: HPS): BOOL;
  289. Function GpiDeleteElementRange(hps: HPS; lFirstElement: LONG;
  290.                                lLastElement: LONG): BOOL;
  291. Function GpiDeleteElementsBetweenLabels(hps: HPS; lFirstLabel: LONG;
  292.                                         lLastLabel: LONG): BOOL;
  293. Function GpiQueryEditMode(hps: HPS): LONG;
  294. Function GpiSetEditMode(hps: HPS; lMode: LONG): BOOL;
  295. Function GpiQueryElementPointer(hps: HPS): LONG;
  296. Function GpiSetElementPointer(hps: HPS; lElement: LONG): BOOL;
  297. Function GpiOffsetElementPointer(hps: HPS; loffset: LONG): BOOL;
  298. Function GpiQueryElementType(hps: HPS; plType: PLONG; lLength: LONG;
  299.                              pszData: PSZ): LONG;
  300. Function GpiSetElementPointerAtLabel(hps: HPS; lLabel: LONG): BOOL;
  301.  
  302. CONST
  303.  {  co-ordinates space for GpiConvert }
  304.  CVTC_WORLD                    = 1;
  305.  CVTC_MODEL                    = 2;
  306.  CVTC_DEFAULTPAGE              = 3;
  307.  CVTC_PAGE                     = 4;
  308.  CVTC_DEVICE                   = 5;
  309.  
  310.  {  type of transformation for GpiSetSegmentTransformMatrix }
  311.  TRANSFORM_REPLACE             = 0;
  312.  TRANSFORM_ADD                 = 1;
  313.  TRANSFORM_PREEMPT             = 2;
  314.  
  315. TYPE
  316.  {  transform matrix }
  317.     MATRIXLF = record           {  matlf }
  318.       fxM11,
  319.       fxM12  : FIXED;
  320.       lM13   : LONG;
  321.       fxM21,
  322.       fxM22  : FIXED;
  323.       lM23,
  324.       lM31,
  325.       lM32,
  326.       lM33   : LONG;
  327.     end;
  328.     PMATRIXLF =^MATRIXLF;
  329.  
  330.  
  331.    {** transform and transform conversion functions }
  332. Function GpiQuerySegmentTransformMatrix(hps: HPS; lSegid, lCount: LONG;
  333.                                         pmatlfArray: PMATRIXLF): BOOL;
  334. Function GpiSetSegmentTransformMatrix(hps: HPS; lSegid, lCount: LONG;
  335.                                       pmatlfarray: PMATRIXLF; lOptions: LONG): BOOL;
  336. Function GpiConvert(hps: HPS; lSrc, lTarg, lCount: LONG;
  337.                     aptlPoints: PPOINTL): BOOL;
  338. Function GpiQueryModelTransformMatrix(hps: HPS; lCount: LONG;
  339.                                       pmatlfArray: PMATRIXLF): BOOL;
  340. Function GpiSetModelTransformMatrix(hps: HPS; lCount: LONG;
  341.                                     pmatlfArray: PMATRIXLF; lOptions: LONG): BOOL;
  342. Function GpiCallSegmentMatrix(hps: HPS; lSegment, lCount: LONG;
  343.                               pmatlfArray: PMATRIXLF; lOptions: LONG): LONG;
  344. Function GpiQueryDefaultViewMatrix(hps: HPS; lCount: LONG;
  345.                                    pmatlfArray: PMATRIXLF): BOOL;
  346. Function GpiSetDefaultViewMatrix(hps: HPS; lCount: LONG;
  347.                                  pmatlfarray: PMATRIXLF; lOptions: LONG): BOOL;
  348. Function GpiQueryPageViewport(hps: HPS; prclViewport: PRECTL): BOOL;
  349. Function GpiSetPageViewport(hps: HPS; prclViewport: PRECTL): BOOL;
  350. Function GpiQueryViewingTransformMatrix(hps: HPS; lCount: LONG;
  351.                                         pmatlfArray: PMATRIXLF): BOOL;
  352. Function GpiSetViewingTransformMatrix(hps: HPS; lCount: LONG;
  353.                                       pmatlfArray: PMATRIXLF; lOptions: LONG): BOOL;
  354.  
  355.  { ** transform helper routines }
  356. Function GpiTranslate(hps: HPS; pmatrixlf: PMATRIXLF; long: LONG; PPOINTL: PPOINTL): BOOL;
  357. Function GpiScale(hps: HPS; pmatrixlf: PMATRIXLF; long: LONG; pfixed: PFIXED; ppointl: PPOINTL): BOOL;
  358. Function GpiRotate(hps: HPS; pmatrixlf: PMATRIXLF; long: LONG; fixed: FIXED; ppointl: PPOINTL): BOOL;
  359.  
  360.  { ** general clipping functions }
  361. Function GpiSetGraphicsField(hps: HPS; prclField: PRECTL): BOOL;
  362. Function GpiQueryGraphicsField(hps: HPS; prclField: PRECTL): BOOL;
  363. Function GpiSetViewingLimits(hps: HPS; prclLimits: PRECTL): BOOL;
  364. Function GpiQueryViewingLimits(hps: HPS; prclLimits: PRECTL): BOOL;
  365.  
  366. CONST
  367.  {  modes for GpiModifyPath }
  368.  MPATH_STROKE                 =  6;
  369.  
  370.  {  modes for GpiFillPath }
  371.  FPATH_ALTERNATE              =  0;
  372.  FPATH_WINDING                =  2;
  373.  
  374.  {  modes for GpiSetClipPath }
  375.  SCP_ALTERNATE                =  0;
  376.  SCP_WINDING                  =  2;
  377.  SCP_AND                      =  4;
  378.  SCP_RESET                    =  0;
  379.  
  380.  
  381.  { ** Path and Clip Path functions }
  382. Function GpiBeginPath(hps: HPS; lPath: LONG): BOOL;
  383. Function GpiEndPath(hps: HPS): BOOL;
  384. Function GpiCloseFigure(hps: HPS): BOOL;
  385. Function GpiModifyPath(hps: HPS; lPath, lMode: LONG): BOOL;
  386. Function GpiFillPath(hps: HPS; lPath, lOptions: LONG): LONG;
  387. Function GpiSetClipPath(hps: HPS; lPath, lOptions: LONG): BOOL;
  388. Function GpiOutlinePath(hps: HPS; lPath, lOptions: LONG): LONG;
  389.  
  390. Function GpiStrokePath(hps: HPS; lPath: LONG; flOptions: ULONG): LONG;
  391.  
  392. CONST
  393.  {  options for GpiCreateLogColorTable and others }
  394.  LCOL_RESET                = $0001;
  395.  LCOL_REALIZABLE           = $0002;
  396.  LCOL_PURECOLOR            = $0004;
  397.  
  398.  {  format of logical lColor table for GpiCreateLogColorTable and others }
  399.  LCOLF_DEFAULT             =     0;
  400.  LCOLF_INDRGB              =     1;
  401.  LCOLF_CONSECRGB           =     2;
  402.  LCOLF_RGB                 =     3;
  403.  
  404.  {  options for GpiQueryRealColors and others }
  405.  LCOLOPT_REALIZED          = $0001;
  406.  LCOLOPT_INDEX             = $0002;
  407.  
  408.  
  409.  {  return codes from GpiQueryLogColorTable to indicate it is in RGB mode }
  410.  QLCT_ERROR                =    -1;
  411.  QLCT_RGB                  =    -2;
  412.  
  413.  {  GpiQueryLogColorTable index returned for colors not explicitly loaded }
  414.  QLCT_NOTLOADED            =    -1;
  415.  
  416.  
  417.  {  return codes for GpiQueryColorData }
  418.  QCD_LCT_FORMAT            =     0;
  419.  QCD_LCT_LOINDEX           =     1;
  420.  QCD_LCT_HIINDEX           =     2;
  421.  
  422.  
  423.  { ** logical lColor table functions }
  424. Function GpiCreateLogColorTable(hps: HPS; flOptions: ULONG; lFormat: LONG;
  425.                                 lStart, lCount: LONG; alTable: PLONG): BOOL;
  426. Function GpiRealizeColorTable(hps: HPS): BOOL;
  427. Function GpiUnrealizeColorTable(hps: HPS): BOOL;
  428. Function GpiQueryColorData(hps: HPS; lCount: LONG; alArray: PLONG): BOOL;
  429.  
  430. Function GpiQueryLogColorTable(hps: HPS; flOptions: ULONG; lStart: LONG;
  431.                                lCount: LONG; alArray: PLONG): LONG;
  432.  
  433. Function GpiQueryRealColors(hps: HPS; flOptions: ULONG; lStart: LONG;
  434.                             lCount: LONG; alColors: PLONG): LONG;
  435. Function GpiQueryNearestColor(hps: HPS; flOptions: ULONG; lRgbIn: LONG): LONG;
  436. Function GpiQueryColorIndex(hps: HPS; flOptions: ULONG; lRgbColor: LONG): LONG;
  437. Function GpiQueryRGBColor(hps: HPS; flOptions: ULONG; lColorIndex: LONG): LONG;
  438.  
  439.  
  440. CONST
  441.  {  default color table indices }
  442.  
  443.  CLR_FALSE             =        -5;
  444.  CLR_TRUE              =        -4;
  445.  
  446.  CLR_ERROR             =      -255;
  447.  CLR_DEFAULT           =        -3;
  448.  CLR_WHITE             =        -2;
  449.  CLR_BLACK             =        -1;
  450.  CLR_BACKGROUND        =         0;
  451.  CLR_BLUE              =         1;
  452.  CLR_RED               =         2;
  453.  CLR_PINK              =         3;
  454.  CLR_GREEN             =         4;
  455.  CLR_CYAN              =         5;
  456.  CLR_YELLOW            =         6;
  457.  CLR_NEUTRAL           =         7;
  458.  
  459.  CLR_DARKGRAY          =         8;
  460.  CLR_DARKBLUE          =         9;
  461.  CLR_DARKRED           =        10;
  462.  CLR_DARKPINK          =        11;
  463.  CLR_DARKGREEN         =        12;
  464.  CLR_DARKCYAN          =        13;
  465.  CLR_BROWN             =        14;
  466.  CLR_PALEGRAY          =        15;
  467.  
  468.  {  rgb colors }
  469.  RGB_ERROR             =      -255;
  470.  RGB_BLACK             = $00000000;
  471.  RGB_BLUE              = $000000FF;
  472.  RGB_GREEN             = $0000FF00;
  473.  RGB_CYAN              = $0000FFFF;
  474.  RGB_RED               = $00FF0000;
  475.  RGB_PINK              = $00FF00FF;
  476.  RGB_YELLOW            = $00FFFF00;
  477.  RGB_WHITE             = $00FFFFFF;
  478.  
  479.  {  control flags used by GpiBeginArea }
  480.  BA_NOBOUNDARY             =     0;
  481.  BA_BOUNDARY               = $0001;
  482.  
  483.  
  484.  BA_ALTERNATE              =     0;
  485.  BA_WINDING                = $0002;
  486.  
  487.  
  488.  {  fill options for GpiBox/GpiFullArc }
  489.  DRO_FILL                   =    1;
  490.  DRO_OUTLINE                =    2;
  491.  DRO_OUTLINEFILL            =    3;
  492.  
  493.  {  basic pattern symbols }
  494.  PATSYM_ERROR               =   -1;
  495.  PATSYM_DEFAULT             =    0;
  496.  PATSYM_DENSE1              =    1;
  497.  PATSYM_DENSE2              =    2;
  498.  PATSYM_DENSE3              =    3;
  499.  PATSYM_DENSE4              =    4;
  500.  PATSYM_DENSE5              =    5;
  501.  PATSYM_DENSE6              =    6;
  502.  PATSYM_DENSE7              =    7;
  503.  PATSYM_DENSE8              =    8;
  504.  PATSYM_VERT                =    9;
  505.  PATSYM_HORIZ               =   10;
  506.  PATSYM_DIAG1               =   11;
  507.  PATSYM_DIAG2               =   12;
  508.  PATSYM_DIAG3               =   13;
  509.  PATSYM_DIAG4               =   14;
  510.  PATSYM_NOSHADE             =   15;
  511.  PATSYM_SOLID               =   16;
  512.  PATSYM_BLANK               =   64;
  513.  PATSYM_HALFTONE            =   17;
  514.  
  515.  {  lcid values for GpiSet/QueryPattern and others }
  516.  LCID_ERROR                 =   -1;
  517.  LCID_DEFAULT               =    0;
  518.  
  519.  
  520.  { ** global primitive functions }
  521. Function GpiSetColor(hps: HPS; lColor: LONG): BOOL;
  522. Function GpiQueryColor(hps: HPS): LONG;
  523.  
  524.  { ** line primitive functions }
  525. Function GpiBox(hps: HPS; lControl: LONG; pptlPoint: PPOINTL;
  526.                 lHRound, lVRound: LONG): LONG;
  527.  
  528. Function GpiMove(hps: HPS; pptlPoint: PPOINTL): BOOL;
  529. Function GpiLine(hps: HPS; pptlEndPoint: PPOINTL): LONG;
  530. Function GpiPolyLine(hps: HPS; lCount: LONG; aptlPoints: PPOINTL): LONG;
  531.  
  532.  { ** area primitive functions }
  533. Function GpiSetPattern(hps: HPS; lPatternSymbol: LONG): BOOL;
  534. Function GpiQueryPattern(hps: HPS): LONG;
  535. Function GpiBeginArea(hps: HPS; flOptions: ULONG): BOOL;
  536. Function GpiEndArea(hps: HPS): LONG;
  537.  
  538.  { ** character primitive functions }
  539. Function GpiCharString(hps: HPS; lCount: LONG; pchString: PCH): LONG;
  540. Function GpiCharStringAt(hps: HPS; pptlPoint: PPOINTL; lCount: LONG;
  541.                          pchString: PCH): LONG;
  542.  
  543. CONST
  544.  {  mode for GpiSetAttrMode }
  545.  AM_ERROR                =      -1;
  546.  AM_PRESERVE             =       0;
  547.  AM_NOPRESERVE           =       1;
  548.  
  549.  {  foreground mixes }
  550.  FM_ERROR                =      -1;
  551.  FM_DEFAULT              =       0;
  552.  FM_OR                   =       1;
  553.  FM_OVERPAINT            =       2;
  554.  FM_LEAVEALONE           =       5;
  555.  
  556.  
  557.  FM_XOR                  =       4;
  558.  FM_AND                  =       6;
  559.  FM_SUBTRACT             =       7;
  560.  FM_MASKSRCNOT           =       8;
  561.  FM_ZERO                 =       9;
  562.  FM_NOTMERGESRC          =      10;
  563.  FM_NOTXORSRC            =      11;
  564.  FM_INVERT               =      12;
  565.  FM_MERGESRCNOT          =      13;
  566.  FM_NOTCOPYSRC           =      14;
  567.  FM_MERGENOTSRC          =      15;
  568.  FM_NOTMASKSRC           =      16;
  569.  FM_ONE                  =      17;
  570.  
  571.  
  572.  {  background mixes }
  573.  BM_ERROR                =      -1;
  574.  BM_DEFAULT              =       0;
  575.  BM_OVERPAINT            =       2;
  576.  BM_LEAVEALONE           =       5;
  577.  
  578.  
  579.  BM_OR                   =       1;
  580.  BM_XOR                  =       4;
  581.  
  582.  
  583.  {  basic line type styles }
  584.  LINETYPE_ERROR          =      -1;
  585.  LINETYPE_DEFAULT        =       0;
  586.  LINETYPE_DOT            =       1;
  587.  LINETYPE_SHORTDASH      =       2;
  588.  LINETYPE_DASHDOT        =       3;
  589.  LINETYPE_DOUBLEDOT      =       4;
  590.  LINETYPE_LONGDASH       =       5;
  591.  LINETYPE_DASHDOUBLEDOT  =       6;
  592.  LINETYPE_SOLID          =       7;
  593.  LINETYPE_INVISIBLE      =       8;
  594.  LINETYPE_ALTERNATE      =       9;
  595.  
  596.  {  cosmetic line widths }
  597.  LINEWIDTH_ERROR         =      -1;
  598.  LINEWIDTH_DEFAULT       =       0;
  599.  LINEWIDTH_NORMAL      = $00010000;    {  MAKEFIXED(1,0) }
  600.  
  601.  {  actual line widths }
  602.  LINEWIDTHGEOM_ERROR       =    -1;
  603.  
  604.  {  line end styles }
  605.  LINEEND_ERROR             =    -1;
  606.  LINEEND_DEFAULT           =     0;
  607.  LINEEND_FLAT              =     1;
  608.  LINEEND_SQUARE            =     2;
  609.  LINEEND_ROUND             =     3;
  610.  
  611.  {  line join styles }
  612.  LINEJOIN_ERROR            =    -1;
  613.  LINEJOIN_DEFAULT          =     0;
  614.  LINEJOIN_BEVEL            =     1;
  615.  LINEJOIN_ROUND            =     2;
  616.  LINEJOIN_MITRE            =     3;
  617.  
  618.  {  character directions }
  619.  CHDIRN_ERROR              =    -1;
  620.  CHDIRN_DEFAULT            =     0;
  621.  CHDIRN_LEFTRIGHT          =     1;
  622.  CHDIRN_TOPBOTTOM          =     2;
  623.  CHDIRN_RIGHTLEFT          =     3;
  624.  CHDIRN_BOTTOMTOP          =     4;
  625.  
  626.  {  character modes }
  627.  CM_ERROR                  =    -1;
  628.  CM_DEFAULT                =     0;
  629.  CM_MODE1                  =     1;
  630.  CM_MODE2                  =     2;
  631.  CM_MODE3                  =     3;
  632.  
  633.  {  basic marker symbols }
  634.  MARKSYM_ERROR             =    -1;
  635.  MARKSYM_DEFAULT           =     0;
  636.  MARKSYM_CROSS             =     1;
  637.  MARKSYM_PLUS              =     2;
  638.  MARKSYM_DIAMOND           =     3;
  639.  MARKSYM_SQUARE            =     4;
  640.  MARKSYM_SIXPOINTSTAR      =     5;
  641.  MARKSYM_EIGHTPOINTSTAR    =     6;
  642.  MARKSYM_SOLIDDIAMOND      =     7;
  643.  MARKSYM_SOLIDSQUARE       =     8;
  644.  MARKSYM_DOT               =     9;
  645.  MARKSYM_SMALLCIRCLE       =    10;
  646.  MARKSYM_BLANK             =    64;
  647.  
  648.  {  formatting options for GpiCharStringPosAt }
  649.  CHS_OPAQUE                = $0001;
  650.  CHS_VECTOR                = $0002;
  651.  CHS_LEAVEPOS              = $0008;
  652.  CHS_CLIP                  = $0010;
  653.  
  654.  {  bundle codes for GpiSetAttributes and GpiQueryAttributes }
  655.  PRIM_LINE                 =     1;
  656.  PRIM_CHAR                 =     2;
  657.  PRIM_MARKER               =     3;
  658.  PRIM_AREA                 =     4;
  659.  PRIM_IMAGE                =     5;
  660.  
  661.  {  line bundle mask bits }
  662.  LBB_COLOR                 = $0001;
  663.  LBB_MIX_MODE              = $0004;
  664.  LBB_WIDTH                 = $0010;
  665.  LBB_GEOM_WIDTH            = $0020;
  666.  LBB_TYPE                  = $0040;
  667.  LBB_END                   = $0080;
  668.  LBB_JOIN                  = $0100;
  669.  
  670.  {  character bundle mask bits }
  671.  CBB_COLOR                 = $0001;
  672.  CBB_BACK_COLOR            = $0002;
  673.  CBB_MIX_MODE              = $0004;
  674.  CBB_BACK_MIX_MODE         = $0008;
  675.  CBB_SET                   = $0010;
  676.  CBB_MODE                  = $0020;
  677.  CBB_BOX                   = $0040;
  678.  CBB_ANGLE                 = $0080;
  679.  CBB_SHEAR                 = $0100;
  680.  CBB_DIRECTION             = $0200;
  681.  
  682.  {  marker bundle mask bits }
  683.  MBB_COLOR                 = $0001;
  684.  MBB_BACK_COLOR            = $0002;
  685.  MBB_MIX_MODE              = $0004;
  686.  MBB_BACK_MIX_MODE         = $0008;
  687.  MBB_SET                   = $0010;
  688.  MBB_SYMBOL                = $0020;
  689.  MBB_BOX                   = $0040;
  690.  
  691.  {  pattern bundle mask bits }
  692.  ABB_COLOR                 = $0001;
  693.  ABB_BACK_COLOR            = $0002;
  694.  ABB_MIX_MODE              = $0004;
  695.  ABB_BACK_MIX_MODE         = $0008;
  696.  ABB_SET                   = $0010;
  697.  ABB_SYMBOL                = $0020;
  698.  ABB_REF_POINT             = $0040;
  699.  
  700.  {  image bundle mask bits }
  701.  IBB_COLOR                 = $0001;
  702.  IBB_BACK_COLOR            = $0002;
  703.  IBB_MIX_MODE              = $0004;
  704.  IBB_BACK_MIX_MODE         = $0008;
  705.  
  706. TYPE
  707.  {  structure for GpiSetArcParams and GpiQueryArcParams }
  708.     ARCPARAMS = record         {  arcp }
  709.       lP,
  710.       lQ,
  711.       lR,
  712.       lS: LONG;
  713.     end;
  714.     PARCPARAMS = ^ARCPARAMS;
  715.  
  716.  {  variation of SIZE used for FIXEDs }
  717.     SIZEF = record            {  sizfx }
  718.       cx,
  719.       cy: FIXED;
  720.     end;
  721.     PSIZEF = ^SIZEF;
  722.  
  723.  {  structure for gradient parameters e.g. for GpiSetCharAngle }
  724.     GRADIENTL = record          {  gradl }
  725.       x,
  726.       y: LONG;
  727.     end;
  728.     PGRADIENTL = ^GRADIENTL;
  729.  
  730.  {  line bundle for GpiSetAttributes and GpiQueryAttributes }
  731.     LINEBUNDLE = record         {  lbnd }
  732.       lColor,
  733.       lReserved: LONG;
  734.       usMixMode,
  735.       usReserved: USHORT;
  736.       fxWidth: FIXED;
  737.       lGeomWidth: LONG;
  738.       usType,
  739.       usEnd,
  740.       usJoin: USHORT
  741.     end;
  742.  
  743.  {  character bundle for GpiSetAttributes and GpiQueryAttributes }
  744.     CHARBUNDLE = record          {  cbnd }
  745.       lColor,
  746.       lBackColor: LONG;
  747.       usMixMode,
  748.       usBackMixMode,
  749.       usSet,
  750.       usPrecision: USHORT;
  751.       sizfxCell: SIZEF;
  752.       ptlAngle,
  753.       ptlShear: POINTL;
  754.       usDirection: USHORT;
  755.     end;
  756.  
  757.  {  marker bundle for GpiSetAttributes and GpiQueryAttributes }
  758.     MARKERBUNDLE = record        {  mbnd }
  759.       lColor,
  760.       lBackColor: LONG;
  761.       usMixMode,
  762.       usBackMixMode,
  763.       usSet,
  764.       usSymbol: USHORT;
  765.       sizfxCell: SIZEF;
  766.     end;
  767.  
  768.  {  pattern bundle for GpiSetAttributes and GpiQueryAttributes }
  769.     AREABUNDLE = record      {  pbnd }
  770.       lColor,
  771.       lBackColor: LONG;
  772.       usMixMode,
  773.       usBackMixMode,
  774.       usSet,
  775.       usSymbol: USHORT;
  776.       ptlRefPoint: POINTL;
  777.     end;
  778.  
  779.  {  image bundle for GpiSetAttributes and GpiQueryAttributes }
  780.     IMAGEBUNDLE = record         {  ibmd }
  781.       lColor,
  782.       lBackColor: LONG;
  783.       usMixMode,
  784.       usBackMixMode: USHORT;
  785.     end;
  786.  
  787.  {  pointer to any bundle used by GpiSet/QueryAttrs }
  788.     PBUNDLE = PVOID;
  789.  
  790. CONST
  791.  {  array indices for GpiQueryTextBox }
  792.  TXTBOX_TOPLEFT                = 0;
  793.  TXTBOX_BOTTOMLEFT             = 1;
  794.  TXTBOX_TOPRIGHT               = 2;
  795.  TXTBOX_BOTTOMRIGHT            = 3;
  796.  TXTBOX_CONCAT                 = 4;
  797.  {  array count for GpiQueryTextBox }
  798.  TXTBOX_COUNT                  = 5;
  799.  
  800.  {  return codes for GpiPtVisible }
  801.  PVIS_ERROR                    = 0;
  802.  PVIS_INVISIBLE                = 1;
  803.  PVIS_VISIBLE                  = 2;
  804.  
  805.  {  return codes for GpiRectVisible }
  806.  RVIS_ERROR                    = 0;
  807.  RVIS_INVISIBLE                = 1;
  808.  RVIS_PARTIAL                  = 2;
  809.  RVIS_VISIBLE                  = 3;
  810.  
  811.  
  812.  { ** attribute mode functions }
  813. Function GpiSetAttrMode(hps: HPS; lMode: LONG): BOOL;
  814. Function GpiQueryAttrMode(hps: HPS): LONG;
  815.  { ** bundle primitive functions }
  816. Function GpiSetAttrs(hps: HPS; lPrimType: LONG; flAttrMask: ULONG;
  817.                      flDefMask: ULONG; ppbunAttrs: PBUNDLE): BOOL;
  818.  
  819.  
  820. Function GpiQueryAttrs(hps: HPS; lPrimType: LONG; flAttrMask: ULONG;
  821.                        ppbunAttrs: PBUNDLE): LONG;
  822.  
  823.  
  824.  { ** global primitive functions }
  825. Function GpiSetBackColor(hps: HPS; lColor: LONG): BOOL;
  826. Function GpiQueryBackColor(hps: HPS): LONG;
  827. Function GpiSetMix(hps: HPS; lMixMode: LONG): BOOL;
  828. Function GpiQueryMix(hps: HPS): LONG;
  829. Function GpiSetBackMix(hps: HPS; lMixMode: LONG): BOOL;
  830. Function GpiQueryBackMix(hps: HPS): LONG;
  831.  
  832.  { ** line primitive functions }
  833. Function GpiSetLineType(hps: HPS; lLineType: LONG): BOOL;
  834. Function GpiQueryLineType(hps: HPS): LONG;
  835. Function GpiSetLineWidth(hps: HPS; fxLineWidth: FIXED): BOOL;
  836. Function GpiQueryLineWidth(hps: HPS): FIXED;
  837.  
  838. Function GpiSetLineWidthGeom(hps: HPS; lLineWidth: LONG): BOOL;
  839. Function GpiQueryLineWidthGeom(hps: HPS): LONG;
  840. Function GpiSetLineEnd(hps: HPS; lLineEnd: LONG): BOOL;
  841. Function GpiQueryLineEnd(hps: HPS): LONG;
  842. Function GpiSetLineJoin(hps: HPS; lLineJoin: LONG): BOOL;
  843. Function GpiQueryLineJoin(hps: HPS): LONG;
  844.  
  845. Function GpiSetCurrentPosition(hps: HPS; pptlPoint: PPOINTL): BOOL;
  846. Function GpiQueryCurrentPosition(hps: HPS; pptlPoint: PPOINTL): BOOL;
  847.  
  848.  { ** arc primitive functions }
  849. Function GpiSetArcParams(hps: HPS; parcpArcParams: PARCPARAMS): BOOL;
  850. Function GpiQueryArcParams(hps: HPS; parcpArcParams: PARCPARAMS): BOOL;
  851.  
  852. Function GpiPointArc(hps: HPS; pptl2: PPOINTL): LONG;
  853.  
  854. Function GpiFullArc(hps: HPS; lControl: LONG; fxMultiplier: FIXED): LONG;
  855. Function GpiPartialArc(hps: HPS; pptlCenter: PPOINTL; fxMultiplier: FIXED;
  856.                        fxStartAngle, fxSweepAngle: FIXED): LONG;
  857. Function GpiPolyFillet(hps: HPS; lCount: LONG; aptlPoints: PPOINTL): LONG;
  858. Function GpiPolySpline(hps: HPS; lCount: LONG; aptlPoints: PPOINTL): LONG;
  859. Function GpiPolyFilletSharp(hps: HPS; lCount: LONG; aptlPoints: PPOINTL;
  860.                             afxPoints: PFIXED): LONG;
  861.  
  862.  { ** area primitive functions }
  863. Function GpiSetPatternSet(hps: HPS; lSet: LONG): BOOL;
  864. Function GpiQueryPatternSet(hps: HPS): LONG;
  865. Function GpiSetPatternRefPoint(hps: HPS; pptlRefPoint: PPOINTL): BOOL;
  866. Function GpiQueryPatternRefPoint(hps: HPS; pptlRefPoint: PPOINTL): BOOL;
  867.  
  868.  { ** character primitive functions }
  869.  
  870. Function GpiQueryCharStringPos(hps: HPS; flOptions: ULONG; lCount: LONG;
  871.                                pchString: PCH; alXincrements: PLONG; aptlPositions: PPOINTL): BOOL;
  872. Function GpiQueryCharStringPosAt(hps: HPS; pptlStart: PPOINTL; flOptions: ULONG;
  873.                                  lCount: LONG; pchString: PCH; alXincrements: PLONG;
  874.                                  aptlPositions: PPOINTL): BOOL;
  875. Function GpiQueryTextBox(hps: HPS; lCount1: LONG; pchString: PCH;
  876.                          lCount2: LONG; aptlPoints: PPOINTL): BOOL;
  877. Function GpiQueryDefCharBox(hps: HPS; psizlSize: PSIZEL): BOOL;
  878. Function GpiSetCharSet(hps: HPS; llcid: LONG): BOOL;
  879. Function GpiQueryCharSet(hps: HPS): LONG;
  880. Function GpiSetCharBox(hps: HPS; psizfxBox: PSIZEF): BOOL;
  881. Function GpiQueryCharBox(hps: HPS; psizfxSize: PSIZEF): BOOL;
  882. Function GpiSetCharAngle(hps: HPS; pgradlAngle: PGRADIENTL): BOOL;
  883. Function GpiQueryCharAngle(hps: HPS; pgradlAngle: PGRADIENTL): BOOL;
  884. Function GpiSetCharShear(hps: HPS; pptlAngle: PPOINTL): BOOL;
  885. Function GpiQueryCharShear(hps: HPS; pptlShear: PPOINTL): BOOL;
  886. Function GpiSetCharDirection(hps: HPS; lDirection: LONG): BOOL;
  887. Function GpiQueryCharDirection(hps: HPS): LONG;
  888. Function GpiSetCharMode(hps: HPS; lMode: LONG): BOOL;
  889. Function GpiQueryCharMode(hps: HPS): LONG;
  890.  
  891. Function GpiCharStringPos(hps: HPS; prclRect: PRECTL; flOptions: ULONG;
  892.                           lCount: LONG; pchString: PCH; alAdx: PLONG): LONG;
  893. Function GpiCharStringPosAt(hps: HPS; pptlStart: PPOINTL; prclRect: PRECTL;
  894.                             flOptions: ULONG; lCount: LONG; pchString: PCH;
  895.                             alAdx: PLONG): LONG;
  896.  
  897.  { ** marker primitive functions  }
  898. Function GpiMarker(hps: HPS; pptlPoint: PPOINTL): LONG;
  899. Function GpiPolyMarker(hps: HPS; lCount: LONG; aptlPoints: PPOINTL): LONG;
  900. Function GpiSetMarker(hps: HPS; lSymbol: LONG): BOOL;
  901. Function GpiSetMarkerBox(hps: HPS; psizfxSize: PSIZEF): BOOL;
  902. Function GpiSetMarkerSet(hps: HPS; lSet: LONG): BOOL;
  903. Function GpiQueryMarker(hps: HPS): LONG;
  904. Function GpiQueryMarkerBox(hps: HPS; psizfxSize: PSIZEF): BOOL;
  905. Function GpiQueryMarkerSet(hps: HPS): LONG;
  906.  
  907.  { ** image primitive functions }
  908. Function GpiImage(hps: HPS; lFormat: LONG; psizlImageSize: PSIZEL;
  909.                   lLength: LONG; pbData: PBYTE): LONG;
  910.  
  911.  { ** miscellaneous primitive functions }
  912. Function GpiPop(hps: HPS; lCount: LONG): BOOL;
  913. Function GpiPtVisible(hps: HPS; pptlPoint: PPOINTL): LONG;
  914. Function GpiRectVisible(hps: HPS; prclRectangle: PRECTL): LONG;
  915. Function GpiComment(hps: HPS; lLength: LONG; pbData: PBYTE): BOOL;
  916.  
  917. CONST
  918.  {  return codes from GpiCreateLogFont }
  919.  FONT_DEFAULT                 =  1;
  920.  FONT_MATCH                   =  2;
  921.  
  922.  {  lcid type for GpiQuerySetIds }
  923.  LCIDT_FONT                   =  6;
  924.  
  925.  LCIDT_BITMAP                 =  7;
  926.  
  927.  {  constant used to delete all lcids by GpiDeleteSetId }
  928.  LCID_ALL                     = -1;
  929.  
  930. TYPE
  931.  {  kerning data returned by GpiQueryKerningPairs }
  932.     KERNINGPAIRS = record        {  krnpr }
  933.       sFirstChar,
  934.       sSecondChar,
  935.       sKerningAmount: SHORT;
  936.     end;
  937.     PKERNINGPAIRS = ^KERNINGPAIRS;
  938.  
  939. CONST
  940.  {  options for GpiQueryFonts }
  941.  QF_PUBLIC                 = $0001;
  942.  QF_PRIVATE                = $0002;
  943.  
  944. TYPE
  945.  {  font file descriptions for GpiQueryFontFileDescriptions }
  946.   FFDESCS = array[0..1, 0..FACESIZE-1] of char;  {  ffdescs }
  947.   PFFDESCS = ^FFDESCS;
  948.  
  949.  
  950.  { ** physical and logical font functions }
  951. Function GpiCreateLogFont(hps: HPS; pName: PSTR8; lLcid: LONG;
  952.                           pfatAttrs: PFATTRS): LONG;
  953. Function GpiDeleteSetId(hps: HPS; lLcid: LONG): BOOL;
  954. Function GpiLoadFonts(hab: HAB; pszFilename: PSZ): BOOL;
  955. Function GpiUnloadFonts(hab: HAB; pszFilename: PSZ): BOOL;
  956. Function GpiQueryFonts(hps: HPS; flOptions: ULONG; pszFacename: PSZ;
  957.                        plReqFonts: PLONG; lMetricsLength: LONG;
  958.                        afmMetrics: PFONTMETRICS): LONG;
  959. Function GpiQueryFontMetrics(hps: HPS; lMetricsLength: LONG;
  960.                              pfmMetrics: PFONTMETRICS): BOOL;
  961. Function GpiQueryKerningPairs(hps: HPS; lCount: LONG;
  962.                               akrnprData: PKERNINGPAIRS): LONG;
  963. Function GpiQueryWidthTable(hps: HPS; lFirstChar, lCount: LONG;
  964.                             alData: PLONG): BOOL;
  965. Function GpiQueryNumberSetIds(hps: HPS): LONG;
  966. Function GpiQuerySetIds(hps: HPS; lCount: LONG; alTypes: PLONG;
  967.                         aNames: PSTR8; allcids: PLONG): BOOL;
  968.  
  969. Function GpiSetCp(hps: HPS; usCodePage: USHORT): BOOL;
  970. Function GpiQueryCp(hps: HPS): USHORT;
  971. Function GpiQueryFontFileDescriptions(hab: HAB; pszFilename: PSZ;
  972.                                       plCount: PLONG; affdescsNames: PFFDESCS): LONG;
  973.  
  974. CONST
  975.  {  rastor operations defined for GpiBitBlt }
  976.  ROP_SRCCOPY               = $00CC;
  977.  ROP_SRCPAINT              = $00EE;
  978.  ROP_SRCAND                = $0088;
  979.  ROP_SRCINVERT             = $0066;
  980.  ROP_SRCERASE              = $0044;
  981.  ROP_NOTSRCCOPY            = $0033;
  982.  ROP_NOTSRCERASE           = $0011;
  983.  ROP_MERGECOPY             = $00C0;
  984.  ROP_MERGEPAINT            = $00BB;
  985.  ROP_PATCOPY               = $00F0;
  986.  ROP_PATPAINT              = $00FB;
  987.  ROP_PATINVERT             = $005A;
  988.  ROP_DSTINVERT             = $0055;
  989.  ROP_ZERO                  = $0000;
  990.  ROP_ONE                   = $00FF;
  991.  
  992.  {  Blt options for GpiBitBlt }
  993.  BBO_OR                    =     0;
  994.  BBO_AND                   =     1;
  995.  BBO_IGNORE                =     2;
  996.  
  997.  {  error return for GpiSetBitmap }
  998.  HBM_ERROR                 = HBITMAP(-1);
  999.  
  1000.  
  1001.  { ** bitmap and pel functions }
  1002. Function GpiBitBlt(hpsTarget, hpsSource: HPS; lCount: LONG;
  1003.                    aptlPoints: PPOINTL; lRop: LONG; flOptions: ULONG): LONG;
  1004. Function GpiDeleteBitmap(hbm: HBITMAP): BOOL;
  1005. Function GpiLoadBitmap(hps: HPS; Resource: HMODULE; idBitmap: USHORT;
  1006.                        lWidth, lHeight: LONG): HBITMAP;
  1007. Function GpiSetBitmap(hps: HPS; hbm: HBITMAP): HBITMAP;
  1008. Function GpiWCBitBlt(hpsTarget: HPS; hbmSource: HBITMAP; lCount: LONG;
  1009.                      aptlPoints: PPOINTL; lRop: LONG; flOptions: ULONG): LONG;
  1010.  
  1011. CONST
  1012.  {  usage flags for GpiCreateBitmap }
  1013.  CBM_INIT       = $0004;
  1014.  
  1015. TYPE
  1016.  {  bitmap parameterization used by GpiCreateBitmap and others }
  1017.     BITMAPINFOHEADER = record          {  bmp }
  1018.       cbFix: ULONG;
  1019.       cx,
  1020.       cy,
  1021.       cPlanes,
  1022.       cBitCount: USHORT;
  1023.     end;
  1024.     PBITMAPINFOHEADER = ^BITMAPINFOHEADER;
  1025.  
  1026.  {  RGB data for _BITMAPINFO struct }
  1027.     RGB = record                {  rgb }
  1028.       bBlue,
  1029.       bGreen,
  1030.       bRed: BYTE;
  1031.     end;
  1032.  
  1033.  {  bitmap data used by GpiSetBitmapBits and others }
  1034.     BITMAPINFO = record        {  bmi }
  1035.       cbFix: ULONG;
  1036.       cx,
  1037.       cy,
  1038.       cPlanes,
  1039.       cBitCount: USHORT;
  1040.       argbColor: array [0..0] of RGB;
  1041.     end;
  1042.     PBITMAPINFO = ^BITMAPINFO;
  1043.  
  1044. CONST
  1045.  {  error return code for GpiSet/QueryBitmapBits }
  1046.  BMB_ERROR                   =  -1;
  1047.  
  1048.  
  1049.  { ** bitmap and pel functions }
  1050. Function GpiCreateBitmap(hps: HPS; pbmpNew: PBITMAPINFOHEADER;
  1051.                          flOptions: ULONG; pbInitData: PBYTE;
  1052.                          pbmiInfoTable: PBITMAPINFO): HBITMAP;
  1053. Function GpiSetBitmapBits(hps: HPS; lScanStart, lScans: LONG;
  1054.                           pbBuffer: PBYTE; pbmiInfoTable: PBITMAPINFO): LONG;
  1055. Function GpiSetBitmapDimension(hbm: HBITMAP; psizlBitmapDimension: PSIZEL): BOOL;
  1056. Function GpiSetBitmapId(hps: HPS; hbm: HBITMAP; lLcid: LONG): BOOL;
  1057. Function GpiQueryBitmapBits(hps: HPS; lScanStart, lScans: LONG;
  1058.                             pbBuffer: PBYTE; pbmiInfoTable: PBITMAPINFO): LONG;
  1059. Function GpiQueryBitmapDimension(hbm: HBITMAP; psizlBitmapDimension: PSIZEL): BOOL;
  1060. Function GpiQueryBitmapHandle(hps: HPS; lLcid: LONG): HBITMAP;
  1061. Function GpiQueryBitmapParameters(hbm: HBITMAP; pbmpData: PBITMAPINFOHEADER): BOOL;
  1062. Function GpiQueryDeviceBitmapFormats(hps: HPS; lCount: LONG;
  1063.                                      alArray: PLONG): BOOL;
  1064.  
  1065. Function GpiSetPel(hps: HPS; pptlPoint: PPOINTL): LONG;
  1066. Function GpiQueryPel(hps: HPS; pptlPoint: PPOINTL): LONG;
  1067.  
  1068. CONST
  1069.  {  options for GpiCombineRegion }
  1070.  CRGN_OR                      =  1;
  1071.  CRGN_COPY                    =  2;
  1072.  CRGN_XOR                     =  4;
  1073.  CRGN_AND                     =  6;
  1074.  CRGN_DIFF                    =  7;
  1075.  
  1076.  {  usDirection of returned region data for GpiQueryRegionRects }
  1077.  RECTDIR_LFRT_TOPBOT          =  1;
  1078.  RECTDIR_RTLF_TOPBOT          =  2;
  1079.  RECTDIR_LFRT_BOTTOP          =  3;
  1080.  RECTDIR_RTLF_BOTTOP          =  4;
  1081.  
  1082. TYPE
  1083.  {  control data for GpiQueryRegionRects }
  1084.     RGNRECT = record            {  rgnrc }
  1085.       ircStart,
  1086.       crc,
  1087.       crcReturned,
  1088.       usDirection: USHORT;
  1089.     end;
  1090.     PRGNRECT = ^RGNRECT;
  1091.  
  1092. CONST
  1093.  {  return code to indicate type of region for GpiCombineRegion and others }
  1094.  RGN_ERROR                   =   0;
  1095.  RGN_NULL                    =   1;
  1096.  RGN_RECT                    =   2;
  1097.  RGN_COMPLEX                 =   3;
  1098.  
  1099.  {  return codes for GpiPtInRegion }
  1100.  PRGN_ERROR                  =   0;
  1101.  PRGN_OUTSIDE                =   1;
  1102.  PRGN_INSIDE                 =   2;
  1103.  
  1104.  {  return codes for GpiRectInRegion }
  1105.  RRGN_ERROR                  =   0;
  1106.  RRGN_OUTSIDE                =   1;
  1107.  RRGN_PARTIAL                =   2;
  1108.  RRGN_INSIDE                 =   3;
  1109.  
  1110.  {  return codes for GpiEqualRegion }
  1111.  EQRGN_ERROR                 =   0;
  1112.  EQRGN_NOTEQUAL              =   1;
  1113.  EQRGN_EQUAL                 =   2;
  1114.  
  1115.  {  error return code for GpiSetRegion }
  1116.  HRGN_ERROR                  = HRGN(-1);
  1117.  
  1118.  
  1119.  { ** main region functions }
  1120. Function GpiCombineRegion(hps: HPS; hrgnDest, hrgnSrc1: HRGN;
  1121.                           hrgnSrc2: HRGN; lMode: LONG): LONG;
  1122. Function GpiCreateRegion(hps: HPS; lCount: LONG; arclRectangles: PRECTL): HRGN;
  1123. Function GpiDestroyRegion(hps: HPS; hrgn: HRGN): BOOL;
  1124. Function GpiEqualRegion(hps: HPS; hrgnSrc1, hrgnSrc2: HRGN): LONG;
  1125. Function GpiOffsetRegion(hps: HPS; Hrgn: HRGN; pptlOffset: PPOINTL): BOOL;
  1126. Function GpiPaintRegion(hps: HPS; hrgn: HRGN): LONG;
  1127. Function GpiPtInRegion(hps: HPS; hrgn: HRGN; pptlPoint: PPOINTL): LONG;
  1128. Function GpiQueryRegionBox(hps: HPS; hrgn: HRGN; prclBound: PRECTL): LONG;
  1129. Function GpiQueryRegionRects(hps: HPS; hrgn: HRGN; prclBound: PRECTL;
  1130.                              prgnrcControl: PRGNRECT; prclRect: PRECTL): BOOL;
  1131. Function GpiRectInRegion(hps: HPS; hrgn: HRGN; prclRect: PRECTL): LONG;
  1132. Function GpiSetRegion(hps: HPS; hrgn: HRGN; lcount: LONG;
  1133.                       arclRectangles: PRECTL): BOOL;
  1134.  
  1135.  { ** clip region functions }
  1136. Function GpiSetClipRegion(hps: HPS; hrgn: HRGN; phrgnOld: PHRGN): LONG;
  1137.  
  1138. Function GpiQueryClipRegion(hps: HPS): HRGN;
  1139. Function GpiQueryClipBox(hps: HPS; prclBound: PRECTL): LONG;
  1140.  
  1141. Function GpiExcludeClipRectangle(hps: HPS; prclRectangle: PRECTL): LONG;
  1142. Function GpiIntersectClipRectangle(hps: HPS; prclRectangle: PRECTL): LONG;
  1143.  
  1144. Function GpiOffsetClipRegion(hps: HPS; pptlPoint: PPOINTL): LONG;
  1145.  
  1146. CONST
  1147.  {  constants for index values of options array for GpiPlayMetafile }
  1148.  PMF_SEGBASE                 =   0;
  1149.  PMF_LOADTYPE                =   1;
  1150.  PMF_RESOLVE                 =   2;
  1151.  PMF_LCIDS                   =   3;
  1152.  PMF_RESET                   =   4;
  1153.  PMF_SUPPRESS                =   5;
  1154.  PMF_COLORTABLES             =   6;
  1155.  PMF_COLORREALIZABLE         =   7;
  1156.  PMF_DEFAULTS                =   8;
  1157.  
  1158.  {  options for GpiPlayMetafile }
  1159.  RS_DEFAULT                  =   0;
  1160.  RS_NODISCARD                =   1;
  1161.  LC_DEFAULT                  =   0;
  1162.  LC_NOLOAD                   =   1;
  1163.  LC_LOADDISC                 =   3;
  1164.  LT_DEFAULT                  =   0;
  1165.  LT_NOMODIFY                 =   1;
  1166.  LT_ORIGINALVIEW             =   4;
  1167.  RES_DEFAULT                 =   0;
  1168.  RES_NORESET                 =   1;
  1169.  RES_RESET                   =   2;
  1170.  SUP_DEFAULT                 =   0;
  1171.  SUP_NOSUPPRESS              =   1;
  1172.  SUP_SUPPRESS                =   2;
  1173.  CTAB_DEFAULT                =   0;
  1174.  CTAB_NOMODIFY               =   1;
  1175.  CTAB_REPLACE                =   3;
  1176.  CREA_DEFAULT                =   0;
  1177.  CREA_REALIZE                =   1;
  1178.  CREA_NOREALIZE              =   2;
  1179.  
  1180.  
  1181.  DDEF_DEFAULT                =   0;
  1182.  DDEF_IGNORE                 =   1;
  1183.  DDEF_LOADDISC               =   3;
  1184.  RSP_DEFAULT                 =   0;
  1185.  RSP_NODISCARD               =   1;
  1186.  
  1187.  
  1188.  { ** metafile functions }
  1189. Function GpiCopyMetaFile(hmf: HMF): HMF;
  1190. Function GpiDeleteMetaFile(hmf: HMF): BOOL;
  1191. Function GpiLoadMetaFile(hab: HAB; pszFilename: PSZ): HMF;
  1192. Function GpiPlayMetaFile(hps: HPS; hmf: HMF; lCount1: LONG;
  1193.                          alOptarray, plSegCount: PLONG; lCount2: LONG;
  1194.                          pszDesc: PSZ): LONG;
  1195. Function GpiQueryMetaFileBits(hmf: HMF; lOffset, lLength: LONG;
  1196.                               pbData: PBYTE): BOOL;
  1197. Function GpiQueryMetaFileLength(hmf: HMF): LONG;
  1198. Function GpiSaveMetaFile(hmf: HMF; pszFilename: PSZ): BOOL;
  1199.  
  1200. Function GpiSetMetaFileBits(hmf: HMF; lOffset, lLength: LONG;
  1201.                             pbBuffer: PBYTE): BOOL;
  1202.  
  1203.  
  1204.  { ** default functions }
  1205. Function GpiQueryDefArcParams(hps: HPS; parcpArcParams: PARCPARAMS): BOOL;
  1206. Function GpiQueryDefAttrs(hps: HPS; lPrimType: LONG; flAttrMask: ULONG;
  1207.                           ppbunAttrs: PBUNDLE): BOOL;
  1208. Function GpiQueryDefTag(hps: HPS; plTag: PLONG): BOOL;
  1209. Function GpiQueryDefViewingLimits(hps: HPS; prclLimits: PRECTL): BOOL;
  1210.  
  1211. Function GpiSetDefArcParams(hps: HPS; parcpArcParams: PARCPARAMS): BOOL;
  1212. Function GpiSetDefAttrs(hps: HPS; lPrimType: LONG; flAttrMask: ULONG;
  1213.                         ppbunAttrs: PBUNDLE): BOOL;
  1214. Function GpiSetDefTag(hps: HPS; lTag: LONG): BOOL;
  1215. Function GpiSetDefViewingLimits(hps: HPS; prclLimits: PRECTL): BOOL;
  1216.  
  1217.  
  1218. {**** #include <pmerr.h>}
  1219. Implementation
  1220.  
  1221. Function GpiSetColor;                          External 'PMWIN' Index 108;
  1222. Function GpiQueryRGBColor;                     External 'PMWIN' Index 107;
  1223. Function GpiQueryColorIndex;                   External 'PMWIN' Index 106;
  1224. Function GpiQueryNearestColor;                 External 'PMWIN' Index 105;
  1225. Function GpiQueryRealColors;                   External 'PMWIN' Index 104;
  1226. Function GpiQueryLogColorTable;                External 'PMWIN' Index 103;
  1227. Function GpiQueryColorData;                    External 'PMWIN' Index 102;
  1228. Function GpiUnrealizeColorTable;               External 'PMWIN' Index 101;
  1229. Function GpiRealizeColorTable;                 External 'PMWIN' Index 100;
  1230. Function GpiCreateLogColorTable;               External 'PMWIN' Index 99;
  1231. Function GpiStrokePath;                        External 'PMWIN' Index 270;
  1232. Function GpiOutlinePath;                       External 'PMWIN' Index 274;
  1233. Function GpiSetClipPath;                       External 'PMWIN' Index 233;
  1234. Function GpiFillPath;                          External 'PMWIN' Index 238;
  1235. Function GpiModifyPath;                        External 'PMWIN' Index 237;
  1236. Function GpiCloseFigure;                       External 'PMWIN' Index 236  ;
  1237. Function GpiEndPath;                           External 'PMWIN' Index 235  ;
  1238. Function GpiBeginPath;                         External 'PMWIN' Index 234  ;
  1239. Function GpiQueryViewingLimits;                External 'PMWIN' Index 92   ;
  1240. Function GpiSetViewingLimits;                  External 'PMWIN' Index 91   ;
  1241. Function GpiQueryGraphicsField;                External 'PMWIN' Index 90   ;
  1242. Function GpiSetGraphicsField;                  External 'PMWIN' Index 89   ;
  1243. Function GpiRotate;                            External 'PMWIN' Index 285  ;
  1244. Function GpiScale;                             External 'PMWIN' Index 284  ;
  1245. Function GpiTranslate;                         External 'PMWIN' Index 283  ;
  1246. Function GpiSetViewingTransformMatrix;         External 'PMWIN' Index 87   ;
  1247. Function GpiQueryViewingTransformMatrix;       External 'PMWIN' Index 88   ;
  1248. Function GpiSetPageViewport;                   External 'PMWIN' Index 85   ;
  1249. Function GpiQueryPageViewport;                 External 'PMWIN' Index 86   ;
  1250. Function GpiSetDefaultViewMatrix;              External 'PMWIN' Index 83   ;
  1251. Function GpiQueryDefaultViewMatrix;            External 'PMWIN' Index 84   ;
  1252. Function GpiCallSegmentMatrix;                 External 'PMWIN' Index 82   ;
  1253. Function GpiSetModelTransformMatrix;           External 'PMWIN' Index 80   ;
  1254. Function GpiQueryModelTransformMatrix;         External 'PMWIN' Index 81   ;
  1255. Function GpiConvert;                           External 'PMWIN' Index 93   ;
  1256. Function GpiSetSegmentTransformMatrix;         External 'PMWIN' Index 78   ;
  1257. Function GpiQuerySegmentTransformMatrix;       External 'PMWIN' Index 79   ;
  1258. Function GpiSetElementPointerAtLabel;          External 'PMWIN' Index 65   ;
  1259. Function GpiQueryElementType;                  External 'PMWIN' Index 67   ;
  1260. Function GpiOffsetElementPointer;              External 'PMWIN' Index 61   ;
  1261. Function GpiSetElementPointer;                 External 'PMWIN' Index 59   ;
  1262. Function GpiQueryElementPointer;               External 'PMWIN' Index 60   ;
  1263. Function GpiSetEditMode;                       External 'PMWIN' Index 57   ;
  1264. Function GpiQueryEditMode;                     External 'PMWIN' Index 58   ;
  1265. Function GpiDeleteElementsBetweenLabels;       External 'PMWIN' Index 66   ;
  1266. Function GpiDeleteElementRange;                External 'PMWIN' Index 63   ;
  1267. Function GpiDeleteElement;                     External 'PMWIN' Index 62   ;
  1268. Function GpiQueryElement;                      External 'PMWIN' Index 60   ;
  1269. Function GpiElement;                           External 'PMWIN' Index 69   ;
  1270. Function GpiLabel;                             External 'PMWIN' Index 64   ;
  1271. Function GpiEndElement;                        External 'PMWIN' Index 71   ;
  1272. Function GpiBeginElement;                      External 'PMWIN' Index 70   ;
  1273. Function GpiRemoveDynamics;                    External 'PMWIN' Index 24   ;
  1274. Function GpiDrawDynamics;                      External 'PMWIN' Index 25   ;
  1275. Function GpiDrawSegment;                       External 'PMWIN' Index 21   ;
  1276. Function GpiDrawFrom;                          External 'PMWIN' Index 20   ;
  1277. Function GpiDrawChain;                         External 'PMWIN' Index 19   ;
  1278. Function GpiPutData;                           External 'PMWIN' Index 29   ;
  1279. Function GpiGetData;                           External 'PMWIN' Index 28   ;
  1280. Function GpiQuerySegmentNames;                 External 'PMWIN' Index 49   ;
  1281. Function GpiDeleteSegments;                    External 'PMWIN' Index 48   ;
  1282. Function GpiSetSegmentPriority;                External 'PMWIN' Index 55   ;
  1283. Function GpiQuerySegmentPriority;              External 'PMWIN' Index 56   ;
  1284. Function GpiSetSegmentAttrs;                   External 'PMWIN' Index 53   ;
  1285. Function GpiQuerySegmentAttrs;                 External 'PMWIN' Index 54   ;
  1286. Function GpiSetInitialSegmentAttrs;            External 'PMWIN' Index 51   ;
  1287. Function GpiQueryInitialSegmentAttrs;          External 'PMWIN' Index 52   ;
  1288. Function GpiDeleteSegment;                     External 'PMWIN' Index 47   ;
  1289. Function GpiCloseSegment;                      External 'PMWIN' Index 46   ;
  1290. Function GpiOpenSegment;                       External 'PMWIN' Index 44   ;
  1291. Function GpiCorrelateSegment;                  External 'PMWIN' Index 38   ;
  1292. Function GpiCorrelateFrom;                     External 'PMWIN' Index 37   ;
  1293. Function GpiResetBoundaryData;                 External 'PMWIN' Index 42   ;
  1294. Function GpiQueryBoundaryData;                 External 'PMWIN' Index 43   ;
  1295. Function GpiSetPickAperturePosition;           External 'PMWIN' Index 32   ;
  1296. Function GpiQueryPickAperturePosition;         External 'PMWIN' Index 33   ;
  1297. Function GpiSetPickApertureSize;               External 'PMWIN' Index 30   ;
  1298. Function GpiQueryPickApertureSize;             External 'PMWIN' Index 31   ;
  1299. Function GpiSetTag;                            External 'PMWIN' Index 34   ;
  1300. Function GpiQueryTag;                          External 'PMWIN' Index 35   ;
  1301. Function GpiCorrelateChain;                    External 'PMWIN' Index 36   ;
  1302. Function GpiSetStopDraw;                       External 'PMWIN' Index 22   ;
  1303. Function GpiQueryStopDraw;                     External 'PMWIN' Index 23   ;
  1304. Function GpiSetDrawingMode;                    External 'PMWIN' Index 26   ;
  1305. Function GpiQueryDrawingMode;                  External 'PMWIN' Index 27   ;
  1306. Function GpiSetDrawControl;                    External 'PMWIN' Index 17   ;
  1307. Function GpiQueryDrawControl;                  External 'PMWIN' Index 18   ;
  1308. Function GpiErrorSegmentData;                  External 'PMWIN' Index 15   ;
  1309. Function GpiQueryPS;                           External 'PMWIN' Index 9    ;
  1310. Function GpiSetPS;                             External 'PMWIN' Index 248  ;
  1311. Function GpiResetPS;                           External 'PMWIN' Index 11   ;
  1312. Function GpiQueryDevice;                       External 'PMWIN' Index 201  ;
  1313. Function GpiErase;                             External 'PMWIN' Index 16   ;
  1314. Function GpiSavePS;                            External 'PMWIN' Index 12   ;
  1315. Function GpiRestorePS;                         External 'PMWIN' Index 13   ;
  1316. Function GpiAssociate;                         External 'PMWIN' Index 14   ;
  1317. Function GpiDestroyPS;                         External 'PMWIN' Index 10   ;
  1318. Function GpiCreatePS;                          External 'PMWIN' Index 7    ;
  1319. Function GpiSetDefViewingLimits;               External 'PMWIN' Index 279  ;
  1320. Function GpiSetDefTag;                         External 'PMWIN' Index 275  ;
  1321. Function GpiSetDefAttrs;                       External 'PMWIN' Index 277  ;
  1322. Function GpiSetDefArcParams;                   External 'PMWIN' Index 281  ;
  1323. Function GpiQueryDefViewingLimits;             External 'PMWIN' Index 280  ;
  1324. Function GpiQueryDefTag;                       External 'PMWIN' Index 276  ;
  1325. Function GpiQueryDefAttrs;                     External 'PMWIN' Index 278  ;
  1326. Function GpiQueryDefArcParams;                 External 'PMWIN' Index 282  ;
  1327. Function GpiSetMetaFileBits;                   External 'PMWIN' Index 231  ;
  1328. Function GpiSaveMetaFile;                      External 'PMWIN' Index 228  ;
  1329. Function GpiQueryMetaFileLength;               External 'PMWIN' Index 232  ;
  1330. Function GpiQueryMetaFileBits;                 External 'PMWIN' Index 230  ;
  1331. Function GpiPlayMetaFile;                      External 'PMWIN' Index 227  ;
  1332. Function GpiLoadMetaFile;                      External 'PMWIN' Index 225  ;
  1333. Function GpiDeleteMetaFile;                    External 'PMWIN' Index 229  ;
  1334. Function GpiCopyMetaFile;                      External 'PMWIN' Index 226  ;
  1335. Function GpiOffsetClipRegion;                  External 'PMWIN' Index 223  ;
  1336. Function GpiIntersectClipRectangle;            External 'PMWIN' Index 221  ;
  1337. Function GpiExcludeClipRectangle;              External 'PMWIN' Index 222  ;
  1338. Function GpiQueryClipBox;                      External 'PMWIN' Index 220  ;
  1339. Function GpiQueryClipRegion;                   External 'PMWIN' Index 219  ;
  1340. Function GpiSetClipRegion;                     External 'PMWIN' Index 218  ;
  1341. Function GpiSetRegion;                         External 'PMWIN' Index 209  ;
  1342. Function GpiRectInRegion;                      External 'PMWIN' Index 215  ;
  1343. Function GpiQueryRegionRects;                  External 'PMWIN' Index 217  ;
  1344. Function GpiQueryRegionBox;                    External 'PMWIN' Index 216  ;
  1345. Function GpiPtInRegion;                        External 'PMWIN' Index 214  ;
  1346. Function GpiPaintRegion;                       External 'PMWIN' Index 224  ;
  1347. Function GpiOffsetRegion;                      External 'PMWIN' Index 213  ;
  1348. Function GpiEqualRegion;                       External 'PMWIN' Index 212  ;
  1349. Function GpiDestroyRegion;                     External 'PMWIN' Index 210  ;
  1350. Function GpiCreateRegion;                      External 'PMWIN' Index 208  ;
  1351. Function GpiCombineRegion;                     External 'PMWIN' Index 211  ;
  1352. Function GpiQueryPel;                          External 'PMWIN' Index 207  ;
  1353. Function GpiSetPel;                            External 'PMWIN' Index 206  ;
  1354. Function GpiQueryDeviceBitmapFormats;          External 'PMWIN' Index 201  ;
  1355. Function GpiQueryBitmapParameters;             External 'PMWIN' Index 202  ;
  1356. Function GpiQueryBitmapHandle;                 External 'PMWIN' Index 143  ;
  1357. Function GpiQueryBitmapDimension;              External 'PMWIN' Index 200  ;
  1358. Function GpiQueryBitmapBits;                   External 'PMWIN' Index 204  ;
  1359. Function GpiSetBitmapId;                       External 'PMWIN' Index 142  ;
  1360. Function GpiSetBitmapDimension;                External 'PMWIN' Index 199  ;
  1361. Function GpiSetBitmapBits;                     External 'PMWIN' Index 203  ;
  1362. Function GpiCreateBitmap;                      External 'PMWIN' Index 196  ;
  1363. Function GpiWCBitBlt;                          External 'PMWIN' Index 269  ;
  1364. Function GpiSetBitmap;                         External 'PMWIN' Index 142  ;
  1365. Function GpiLoadBitmap;                        External 'PMWIN' Index 156  ;
  1366. Function GpiDeleteBitmap;                      External 'PMWIN' Index 197  ;
  1367. Function GpiBitBlt;                            External 'PMWIN' Index 205  ;
  1368. Function GpiQueryFontFileDescriptions;         External 'PMWIN' Index 167  ;
  1369. Function GpiQueryCp;                           External 'PMWIN' Index 163  ;
  1370. Function GpiSetCp;                             External 'PMWIN' Index 162  ;
  1371. Function GpiQuerySetIds;                       External 'PMWIN' Index 157  ;
  1372. Function GpiQueryNumberSetIds;                 External 'PMWIN' Index 156  ;
  1373. Function GpiQueryWidthTable;                   External 'PMWIN' Index 161  ;
  1374. Function GpiQueryKerningPairs;                 External 'PMWIN' Index 160  ;
  1375. Function GpiQueryFontMetrics;                  External 'PMWIN' Index 159  ;
  1376. Function GpiQueryFonts;                        External 'PMWIN' Index 158  ;
  1377. Function GpiUnloadFonts;                       External 'PMWIN' Index 153  ;
  1378. Function GpiLoadFonts;                         External 'PMWIN' Index 152  ;
  1379. Function GpiDeleteSetId;                       External 'PMWIN' Index 155  ;
  1380. Function GpiCreateLogFont;                     External 'PMWIN' Index 154  ;
  1381. Function GpiComment;                           External 'PMWIN' Index 268  ;
  1382. Function GpiRectVisible;                       External 'PMWIN' Index 133  ;
  1383. Function GpiPtVisible;                         External 'PMWIN' Index 132  ;
  1384. Function GpiPop;                               External 'PMWIN' Index 96   ;
  1385. Function GpiImage;                             External 'PMWIN' Index 192  ;
  1386. Function GpiQueryMarkerSet;                    External 'PMWIN' Index 185  ;
  1387. Function GpiQueryMarkerBox;                    External 'PMWIN' Index 189  ;
  1388. Function GpiQueryMarker;                       External 'PMWIN' Index 185  ;
  1389. Function GpiSetMarkerSet;                      External 'PMWIN' Index 184  ;
  1390. Function GpiSetMarkerBox;                      External 'PMWIN' Index 188  ;
  1391. Function GpiSetMarker;                         External 'PMWIN' Index 184  ;
  1392. Function GpiPolyMarker;                        External 'PMWIN' Index 191  ;
  1393. Function GpiMarker;                            External 'PMWIN' Index 190  ;
  1394. Function GpiCharStringPosAt;                   External 'PMWIN' Index 183  ;
  1395. Function GpiCharStringPos;                     External 'PMWIN' Index 182  ;
  1396. Function GpiQueryCharMode;                     External 'PMWIN' Index 179  ;
  1397. Function GpiSetCharMode;                       External 'PMWIN' Index 178  ;
  1398. Function GpiQueryCharDirection;                External 'PMWIN' Index 177  ;
  1399. Function GpiSetCharDirection;                  External 'PMWIN' Index 176  ;
  1400. Function GpiQueryCharShear;                    External 'PMWIN' Index 175  ;
  1401. Function GpiSetCharShear;                      External 'PMWIN' Index 174  ;
  1402. Function GpiQueryCharAngle;                    External 'PMWIN' Index 173  ;
  1403. Function GpiSetCharAngle;                      External 'PMWIN' Index 172  ;
  1404. Function GpiQueryCharBox;                      External 'PMWIN' Index 171  ;
  1405. Function GpiSetCharBox;                        External 'PMWIN' Index 170  ;
  1406. Function GpiQueryCharSet;                      External 'PMWIN' Index 169  ;
  1407. Function GpiSetCharSet;                        External 'PMWIN' Index 168  ;
  1408. Function GpiQueryDefCharBox;                   External 'PMWIN' Index 166  ;
  1409. Function GpiQueryTextBox;                      External 'PMWIN' Index 164  ;
  1410. Function GpiQueryCharStringPosAt;              External 'PMWIN' Index 246  ;
  1411. Function GpiQueryCharStringPos;                External 'PMWIN' Index 245  ;
  1412. Function GpiQueryPatternRefPoint;              External 'PMWIN' Index 149  ;
  1413. Function GpiSetPatternRefPoint;                External 'PMWIN' Index 148  ;
  1414. Function GpiQueryPatternSet;                   External 'PMWIN' Index 145  ;
  1415. Function GpiSetPatternSet;                     External 'PMWIN' Index 144  ;
  1416. Function GpiPolyFilletSharp;                   External 'PMWIN' Index 140  ;
  1417. Function GpiPolySpline;                        External 'PMWIN' Index 141  ;
  1418. Function GpiPolyFillet;                        External 'PMWIN' Index 139  ;
  1419. Function GpiPartialArc;                        External 'PMWIN' Index 138  ;
  1420. Function GpiFullArc;                           External 'PMWIN' Index 137  ;
  1421. Function GpiPointArc;                          External 'PMWIN' Index 136  ;
  1422. Function GpiQueryArcParams;                    External 'PMWIN' Index 135  ;
  1423. Function GpiSetArcParams;                      External 'PMWIN' Index 134  ;
  1424. Function GpiQueryCurrentPosition;              External 'PMWIN' Index 127  ;
  1425. Function GpiSetCurrentPosition;                External 'PMWIN' Index 126  ;
  1426. Function GpiQueryLineJoin;                     External 'PMWIN' Index 125  ;
  1427. Function GpiSetLineJoin;                       External 'PMWIN' Index 124  ;
  1428. Function GpiQueryLineEnd;                      External 'PMWIN' Index 123  ;
  1429. Function GpiSetLineEnd;                        External 'PMWIN' Index 122  ;
  1430. Function GpiQueryLineWidthGeom;                External 'PMWIN' Index 121  ;
  1431. Function GpiSetLineWidthGeom;                  External 'PMWIN' Index 120  ;
  1432. Function GpiQueryLineWidth;                    External 'PMWIN' Index 119  ;
  1433. Function GpiSetLineWidth;                      External 'PMWIN' Index 118  ;
  1434. Function GpiQueryLineType;                     External 'PMWIN' Index 117  ;
  1435. Function GpiSetLineType;                       External 'PMWIN' Index 116  ;
  1436. Function GpiQueryBackMix;                      External 'PMWIN' Index 115  ;
  1437. Function GpiSetBackMix;                        External 'PMWIN' Index 114  ;
  1438. Function GpiQueryMix;                          External 'PMWIN' Index 113  ;
  1439. Function GpiSetMix;                            External 'PMWIN' Index 112  ;
  1440. Function GpiQueryBackColor;                    External 'PMWIN' Index 111  ;
  1441. Function GpiSetBackColor;                      External 'PMWIN' Index 110  ;
  1442. Function GpiQueryAttrs;                        External 'PMWIN' Index 98   ;
  1443. Function GpiSetAttrs;                          External 'PMWIN' Index 97   ;
  1444. Function GpiQueryAttrMode;                     External 'PMWIN' Index 95   ;
  1445. Function GpiSetAttrMode;                       External 'PMWIN' Index 94   ;
  1446. Function GpiCharStringAt;                      External 'PMWIN' Index 181  ;
  1447. Function GpiCharString;                        External 'PMWIN' Index 180  ;
  1448. Function GpiEndArea;                           External 'PMWIN' Index 151  ;
  1449. Function GpiBeginArea;                         External 'PMWIN' Index 150  ;
  1450. Function GpiQueryPattern;                      External 'PMWIN' Index 145  ;
  1451. Function GpiSetPattern;                        External 'PMWIN' Index 144  ;
  1452. Function GpiPolyLine;                          External 'PMWIN' Index 130  ;
  1453. Function GpiLine;                              External 'PMWIN' Index 129  ;
  1454. Function GpiMove;                              External 'PMWIN' Index 128  ;
  1455. Function GpiBox;                               External 'PMWIN' Index 131  ;
  1456. Function GpiQueryColor;                        External 'PMWIN' Index 102  ;
  1457.  
  1458. begin
  1459. end.
  1460.