Bläddra i källkod

* New versions by Ramon Bosque

daniel 26 år sedan
förälder
incheckning
cc192abd33
3 ändrade filer med 1492 tillägg och 1781 borttagningar
  1. 10 10
      rtl/os2/os2def.pas
  2. 1204 1495
      rtl/os2/pmgpi.pas
  3. 278 276
      rtl/os2/pmwin.pas

+ 10 - 10
rtl/os2/os2def.pas

@@ -114,15 +114,15 @@ const
        PDEVOPENDATA = pshortint;           {Initially, ^PSZ}
 
        DEVOPENSTRUC = record
-	  pszLogAddress : pshortint;
-	  pszDriverName : pshortint;
+	  pszLogAddress : pchar;
+	  pszDriverName : pchar;
 	  pdriv : PDRIVDATA;
-	  pszDataType : pshortint;
-	  pszComment : pshortint;
-	  pszQueueProcName : pshortint;
-	  pszQueueProcParams : pshortint;
-	  pszSpoolerParams : pshortint;
-	  pszNetworkParams : pshortint;
+	  pszDataType : pchar;
+	  pszComment : pchar;
+	  pszQueueProcName : pchar;
+	  pszQueueProcParams : pchar;
+	  pszSpoolerParams : pchar;
+	  pszNetworkParams : pchar;
        end;
 
        PDEVOPENSTRUC = ^DEVOPENSTRUC;
@@ -130,11 +130,11 @@ const
        PRINTDEST = record
 	  cb : cardinal;
 	  lType : longint;
-	  pszToken : pshortint;
+	  pszToken : pchar;
 	  lCount : longint;
 	  pdopData : PDEVOPENDATA;
 	  fl : cardinal;
-	  pszPrinter : pshortint;
+	  pszPrinter : pchar;
        end;
 
        PPRINTDEST = ^PRINTDEST;

+ 1204 - 1495
rtl/os2/pmgpi.pas

@@ -1,1495 +1,1204 @@
-{****************************************************************************
-
-                   Copyright (c) 1993,94 by Florian Kl„mpfl
-                  
- ****************************************************************************}
-unit pmgpi;
-
-  interface
-  
-    uses
-       os2def,pmbitmap;
-
-    const
-       GPI_ERROR = 0;
-       GPI_OK = 1;
-       GPI_ALTERROR = (-1);
-
-    type
-       FIXED = LONG;
-
-       PFIXED = ^FIXED;
-
-       FIXED88 = USHORT;
-
-       FIXED114 = USHORT;
-
-       SIZEL = record
-          cx : LONG;
-          cy : LONG;
-       end;
-
-       PSIZEL = ^SIZEL;
-
-    const
-       CLR_NOINDEX = (-254);
-       PU_ARBITRARY = $0004;
-       PU_PELS = $0008;
-       PU_LOMETRIC = $000C;
-       PU_HIMETRIC = $0010;
-       PU_LOENGLISH = $0014;
-       PU_HIENGLISH = $0018;
-       PU_TWIPS = $001C;
-       GPIF_DEFAULT = 0;
-       GPIF_SHORT = $0100;
-       GPIF_LONG = $0200;
-       GPIT_NORMAL = 0;
-       GPIT_MICRO = $1000;
-       GPIA_NOASSOC = 0;
-       GPIA_ASSOC = $4000;
-       HDC_ERROR = -1;
-
-    function GpiCreatePS(hab : HAB;hdc : HDC;psizlSize : PSIZEL;flOptions : ULONG) : HPS;
-
-    function GpiDestroyPS(hps : HPS) : BOOL;
-
-    function GpiAssociate(hps : HPS;hdc : HDC) : BOOL;
-
-    function GpiRestorePS(hps : HPS;lPSid : LONG) : BOOL;
-
-    function GpiSavePS(hps : HPS) : LONG;
-
-    function GpiErase(hps : HPS) : BOOL;
-
-    function GpiQueryDevice(hps : HPS) : HDC;
-
-    const
-       GRES_ATTRS = $0001;
-       GRES_SEGMENTS = $0002;
-       GRES_ALL = $0004;
-       PS_UNITS = $00FC;
-       PS_FORMAT = $0F00;
-       PS_TYPE = $1000;
-       PS_MODE = $2000;
-       PS_ASSOCIATE = $4000;
-       PS_NORESET = $8000;
-       GPIE_SEGMENT = 0;
-       GPIE_ELEMENT = 1;
-       GPIE_DATA = 2;
-       DCTL_ERASE = 1;
-       DCTL_DISPLAY = 2;
-       DCTL_BOUNDARY = 3;
-       DCTL_DYNAMIC = 4;
-       DCTL_CORRELATE = 5;
-       DCTL_ERROR = -1;
-       DCTL_OFF = 0;
-       DCTL_ON = 1;
-       SDW_ERROR = -1;
-       SDW_OFF = 0;
-       SDW_ON = 1;
-       DM_ERROR = 0;
-       DM_DRAW = 1;
-       DM_RETAIN = 2;
-       DM_DRAWANDRETAIN = 3;
-
-    function GpiResetPS(hps : HPS;flOptions : ULONG) : BOOL;
-
-    function GpiSetPS(hps : HPS;psizlsize : PSIZEL;flOptions : ULONG) : BOOL;
-
-    function GpiQueryPS(hps : HPS;psizlSize : PSIZEL) : ULONG;
-
-    function GpiErrorSegmentData(hps : HPS;plSegment : PLONG;plContext : PLONG) : LONG;
-
-    function GpiQueryDrawControl(hps : HPS;lControl : LONG) : LONG;
-
-    function GpiSetDrawControl(hps : HPS;lControl : LONG;lValue : LONG) : BOOL;
-
-    function GpiQueryDrawingMode(hps : HPS) : LONG;
-
-    function GpiSetDrawingMode(hps : HPS;lMode : LONG) : BOOL;
-
-    function GpiQueryStopDraw(hps : HPS) : LONG;
-
-    function GpiSetStopDraw(hps : HPS;lValue : LONG) : BOOL;
-
-    const
-       PICKAP_DEFAULT = 0;
-       PICKAP_REC = 2;
-       PICKSEL_VISIBLE = 0;
-       PICKSEL_ALL = 1;
-       GPI_HITS = 2;
-
-    function GpiCorrelateChain(hps : HPS;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;pl2 : PLONG) : LONG;
-
-    function GpiQueryTag(hps : HPS;plTag : PLONG) : BOOL;
-
-    function GpiSetTag(hps : HPS;lTag : LONG) : BOOL;
-
-    function GpiQueryPickApertureSize(hps : HPS;psizlSize : PSIZEL) : BOOL;
-
-    function GpiSetPickApertureSize(hps : HPS;lOptions : LONG;psizlSize : PSIZEL) : BOOL;
-
-    function GpiQueryPickAperturePosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
-
-    function GpiSetPickAperturePosition(hps : HPS;pptlPick : PPOINTL) : BOOL;
-
-    function GpiQueryBoundaryData(hps : HPS;prclBoundary : PRECTL) : BOOL;
-
-    function GpiResetBoundaryData(hps : HPS) : BOOL;
-
-    function GpiCorrelateFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;plSegTag : PLONG) : LONG;
-
-    function GpiCorrelateSegment(hps : HPS;lSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;alSegTag : PLONG) : LONG;
-
-    const
-       DFORM_NOCONV = 0;
-       DFORM_S370SHORT = 1;
-       DFORM_PCSHORT = 2;
-       DFORM_PCLONG = 4;
-       ATTR_ERROR = (-1);
-       ATTR_DETECTABLE = 1;
-       ATTR_VISIBLE = 2;
-       ATTR_CHAINED = 6;
-       ATTR_DYNAMIC = 8;
-       ATTR_FASTCHAIN = 9;
-       ATTR_PROP_DETECTABLE = 10;
-       ATTR_PROP_VISIBLE = 11;
-       ATTR_OFF = 0;
-       ATTR_ON = 1;
-       LOWER_PRI = (-1);
-       HIGHER_PRI = 1;
-
-    function GpiOpenSegment(hps : HPS;lSegment : LONG) : BOOL;
-
-    function GpiCloseSegment(hps : HPS) : BOOL;
-
-    function GpiDeleteSegment(hps : HPS;lSegid : LONG) : BOOL;
-
-    function GpiQueryInitialSegmentAttrs(hps : HPS;lAttribute : LONG) : LONG;
-
-    function GpiSetInitialSegmentAttrs(hps : HPS;lAttribute : LONG;lValue : LONG) : BOOL;
-
-    function GpiQuerySegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG) : LONG;
-
-    function GpiSetSegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG;lValue : LONG) : BOOL;
-
-    function GpiQuerySegmentPriority(hps : HPS;lRefSegid : LONG;lOrder : LONG) : LONG;
-
-    function GpiSetSegmentPriority(hps : HPS;lSegid : LONG;lRefSegid : LONG;lOrder : LONG) : BOOL;
-
-    function GpiDeleteSegments(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;
-
-    function GpiQuerySegmentNames(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG;lMax : LONG;alSegids : PLONG) : LONG;
-
-    function GpiGetData(hps : HPS;lSegid : LONG;plOffset : PLONG;lFormat : LONG;lLength : LONG;pbData : PBYTE) : LONG;
-
-    function GpiPutData(hps : HPS;lFormat : LONG;plCount : PLONG;pbData : PBYTE) : LONG;
-
-    function GpiDrawChain(hps : HPS) : BOOL;
-
-    function GpiDrawFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;
-
-    function GpiDrawSegment(hps : HPS;lSegment : LONG) : BOOL;
-
-    function GpiDrawDynamics(hps : HPS) : BOOL;
-
-    function GpiRemoveDynamics(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG) : BOOL;
-
-    const
-       SEGEM_ERROR = 0;
-       SEGEM_INSERT = 1;
-       SEGEM_REPLACE = 2;
-
-    function GpiBeginElement(hps : HPS;lType : LONG;pszDesc : PSZ) : BOOL;
-
-    function GpiEndElement(hps : HPS) : BOOL;
-
-    function GpiLabel(hps : HPS;lLabel : LONG) : BOOL;
-
-    function GpiElement(hps : HPS;lType : LONG;pszDesc : PSZ;lLength : LONG;pbData : PBYTE) : LONG;
-
-    function GpiQueryElement(hps : HPS;lOff : LONG;lMaxLength : LONG;pbData : PBYTE) : LONG;
-
-    function GpiDeleteElement(hps : HPS) : BOOL;
-
-    function GpiDeleteElementRange(hps : HPS;lFirstElement : LONG;lLastElement : LONG) : BOOL;
-
-    function GpiDeleteElementsBetweenLabels(hps : HPS;lFirstLabel : LONG;lLastLabel : LONG) : BOOL;
-
-    function GpiQueryEditMode(hps : HPS) : LONG;
-
-    function GpiSetEditMode(hps : HPS;lMode : LONG) : BOOL;
-
-    function GpiQueryElementPointer(hps : HPS) : LONG;
-
-    function GpiSetElementPointer(hps : HPS;lElement : LONG) : BOOL;
-
-    function GpiOffsetElementPointer(hps : HPS;loffset : LONG) : BOOL;
-
-    function GpiQueryElementType(hps : HPS;plType : PLONG;lLength : LONG;pszData : PSZ) : LONG;
-
-    function GpiSetElementPointerAtLabel(hps : HPS;lLabel : LONG) : BOOL;
-
-    const
-       CVTC_WORLD = 1;
-       CVTC_MODEL = 2;
-       CVTC_DEFAULTPAGE = 3;
-       CVTC_PAGE = 4;
-       CVTC_DEVICE = 5;
-       TRANSFORM_REPLACE = 0;
-       TRANSFORM_ADD = 1;
-       TRANSFORM_PREEMPT = 2;
-
-    type
-       MATRIXLF = record
-          fxM11 : FIXED;
-          fxM12 : FIXED;
-          lM13 : LONG;
-          fxM21 : FIXED;
-          fxM22 : FIXED;
-          lM23 : LONG;
-          lM31 : LONG;
-          lM32 : LONG;
-          lM33 : LONG;
-       end;
-
-       PMATRIXLF = ^MATRIXLF;
-
-
-    function GpiQuerySegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
-
-    function GpiSetSegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;
-
-    function GpiConvert(hps : HPS;lSrc : LONG;lTarg : LONG;lCount : LONG;aptlPoints : PPOINTL) : BOOL;
-
-    function GpiConvertWithMatrix(hps : HPS;lCountp : LONG;aptlPoints : PPOINTL;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
-
-    function GpiQueryModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
-
-    function GpiSetModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;
-
-    function GpiCallSegmentMatrix(hps : HPS;lSegment : LONG;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : LONG;
-
-    function GpiQueryDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
-
-    function GpiSetDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;
-
-    function GpiQueryPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;
-
-    function GpiSetPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;
-
-    function GpiQueryViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;
-
-    function GpiSetViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;
-
-    function GpiTranslate(hps : HPS;pmatrixlf : PMATRIXLF;long : LONG;ppointl : PPOINTL) : BOOL;
-
-    function GpiScale(hps : HPS;p1 : PMATRIXLF;p2 : LONG;p3 : PFIXED;p4 : PPOINTL) : BOOL;
-
-    function GpiRotate(p1 : HPS;p2 : PMATRIXLF;p3 : LONG;p4 : FIXED;p5 : PPOINTL) : BOOL;
-
-    function GpiSetGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;
-
-    function GpiQueryGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;
-
-    function GpiSetViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
-
-    function GpiQueryViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
-
-    const
-       MPATH_STROKE = 6;
-       FPATH_ALTERNATE = 0;
-       FPATH_WINDING = 2;
-       FPATH_EXCL = 0;
-       FPATH_INCL = 8;
-       SCP_ALTERNATE = 0;
-       SCP_WINDING = 2;
-       SCP_AND = 4;
-       SCP_RESET = 0;
-       SCP_EXCL = 0;
-       SCP_INCL = 8;
-
-    function GpiBeginPath(hps : HPS;lPath : LONG) : BOOL;
-
-    function GpiEndPath(hps : HPS) : BOOL;
-
-    function GpiCloseFigure(hps : HPS) : BOOL;
-
-    function GpiModifyPath(hps : HPS;lPath : LONG;lMode : LONG) : BOOL;
-
-    function GpiFillPath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;
-
-    function GpiSetClipPath(hps : HPS;lPath : LONG;lOptions : LONG) : BOOL;
-
-    function GpiOutlinePath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;
-
-    function GpiPathToRegion(GpiH : HPS;lPath : LONG;lOptions : LONG) : HRGN;
-
-    function GpiStrokePath(hps : HPS;lPath : LONG;flOptions : ULONG) : LONG;
-
-    const
-       LCOL_RESET = $0001;
-       LCOL_REALIZABLE = $0002;
-       LCOL_PURECOLOR = $0004;
-       LCOL_OVERRIDE_DEFAULT_COLORS = $0008;
-       LCOL_REALIZED = $0010;
-       LCOLF_DEFAULT = 0;
-       LCOLF_INDRGB = 1;
-       LCOLF_CONSECRGB = 2;
-       LCOLF_RGB = 3;
-       LCOLF_PALETTE = 4;
-       LCOLOPT_REALIZED = $0001;
-       LCOLOPT_INDEX = $0002;
-       QLCT_ERROR = (-1);
-       QLCT_RGB = (-2);
-       QLCT_NOTLOADED = (-1);
-       QCD_LCT_FORMAT = 0;
-       QCD_LCT_LOINDEX = 1;
-       QCD_LCT_HIINDEX = 2;
-       QCD_LCT_OPTIONS = 3;
-       PAL_ERROR = (-1);
-       PC_RESERVED = $01;
-       PC_EXPLICIT = $02;
-       PC_NOCOLLAPSE = $04;
-
-    function GpiCreateLogColorTable(hps : HPS;flOptions : ULONG;lFormat : LONG;lStart : LONG;lCount : LONG;alTable : PLONG) : BOOL;
-
-    function GpiQueryColorData(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;
-
-    function GpiQueryLogColorTable(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alArray : PLONG) : LONG;
-
-    function GpiQueryRealColors(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alColors : PLONG) : LONG;
-
-    function GpiQueryNearestColor(hps : HPS;flOptions : ULONG;lRgbIn : LONG) : LONG;
-
-    function GpiQueryColorIndex(hps : HPS;flOptions : ULONG;lRgbColor : LONG) : LONG;
-
-    function GpiQueryRGBColor(hps : HPS;flOptions : ULONG;lColorIndex : LONG) : LONG;
-
-    function GpiCreatePalette(hab : HAB;flOptions : ULONG;ulFormat : ULONG;ulCount : ULONG;aulTable : PULONG) : HPAL;
-
-    function GpiDeletePalette(hpal : HPAL) : BOOL;
-
-    function GpiSelectPalette(hps : HPS;hpal : HPAL) : HPAL;
-
-    function GpiAnimatePalette(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : LONG;
-
-    function GpiSetPaletteEntries(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : BOOL;
-
-    function GpiQueryPalette(hps : HPS) : HPAL;
-
-    function GpiQueryPaletteInfo(hpal : HPAL;hps : HPS;flOptions : ULONG;ulStart : ULONG;ulCount : ULONG;aulArray : PULONG) : LONG;
-
-    const
-       CLR_FALSE = (-5);
-       CLR_TRUE = (-4);
-       CLR_ERROR = (-255);
-       CLR_DEFAULT = (-3);
-       CLR_WHITE = (-2);
-       CLR_BLACK = (-1);
-       CLR_BACKGROUND = 0;
-       CLR_BLUE = 1;
-       CLR_RED = 2;
-       CLR_PINK = 3;
-       CLR_GREEN = 4;
-       CLR_CYAN = 5;
-       CLR_YELLOW = 6;
-       CLR_NEUTRAL = 7;
-       CLR_DARKGRAY = 8;
-       CLR_DARKBLUE = 9;
-       CLR_DARKRED = 10;
-       CLR_DARKPINK = 11;
-       CLR_DARKGREEN = 12;
-       CLR_DARKCYAN = 13;
-       CLR_BROWN = 14;
-       CLR_PALEGRAY = 15;
-       RGB_ERROR = (-255);
-       RGB_BLACK = $00000000;
-       RGB_BLUE = $000000FF;
-       RGB_GREEN = $0000FF00;
-       RGB_CYAN = $0000FFFF;
-       RGB_RED = $00FF0000;
-       RGB_PINK = $00FF00FF;
-       RGB_YELLOW = $00FFFF00;
-       RGB_WHITE = $00FFFFFF;
-       BA_NOBOUNDARY = 0;
-       BA_BOUNDARY = $0001;
-       BA_ALTERNATE = 0;
-       BA_WINDING = $0002;
-       BA_EXCL = 0;
-       BA_INCL = 8;
-       DRO_FILL = 1;
-       DRO_OUTLINE = 2;
-       DRO_OUTLINEFILL = 3;
-       PATSYM_ERROR = (-1);
-       PATSYM_DEFAULT = 0;
-       PATSYM_DENSE1 = 1;
-       PATSYM_DENSE2 = 2;
-       PATSYM_DENSE3 = 3;
-       PATSYM_DENSE4 = 4;
-       PATSYM_DENSE5 = 5;
-       PATSYM_DENSE6 = 6;
-       PATSYM_DENSE7 = 7;
-       PATSYM_DENSE8 = 8;
-       PATSYM_VERT = 9;
-       PATSYM_HORIZ = 10;
-       PATSYM_DIAG1 = 11;
-       PATSYM_DIAG2 = 12;
-       PATSYM_DIAG3 = 13;
-       PATSYM_DIAG4 = 14;
-       PATSYM_NOSHADE = 15;
-       PATSYM_SOLID = 16;
-       PATSYM_HALFTONE = 17;
-       PATSYM_HATCH = 18;
-       PATSYM_DIAGHATCH = 19;
-       PATSYM_BLANK = 64;
-       LCID_ERROR = (-1);
-       LCID_DEFAULT = 0;
-
-    function GpiSetColor(hps : HPS;lColor : LONG) : BOOL;
-
-    function GpiQueryColor(hps : HPS) : LONG;
-
-    function GpiBox(hps : HPS;lControl : LONG;pptlPoint : PPOINTL;lHRound : LONG;lVRound : LONG) : LONG;
-
-    function GpiMove(hps : HPS;pptlPoint : PPOINTL) : BOOL;
-
-    function GpiLine(hps : HPS;pptlEndPoint : PPOINTL) : LONG;
-
-    function GpiPolyLine(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
-
-    function GpiPolyLineDisjoint(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
-
-    function GpiSetPattern(hps : HPS;lPatternSymbol : LONG) : BOOL;
-
-    function GpiQueryPattern(hps : HPS) : LONG;
-
-    function GpiBeginArea(hps : HPS;flOptions : ULONG) : BOOL;
-
-    function GpiEndArea(hps : HPS) : LONG;
-
-    function GpiCharString(hps : HPS;lCount : LONG;pchString : PCH) : LONG;
-
-    function GpiCharStringAt(hps : HPS;pptlPoint : PPOINTL;lCount : LONG;pchString : PCH) : LONG;
-
-    const
-       AM_ERROR = (-1);
-       AM_PRESERVE = 0;
-       AM_NOPRESERVE = 1;
-       FM_ERROR = (-1);
-       FM_DEFAULT = 0;
-       FM_OR = 1;
-       FM_OVERPAINT = 2;
-       FM_LEAVEALONE = 5;
-       FM_XOR = 4;
-       FM_AND = 6;
-       FM_SUBTRACT = 7;
-       FM_MASKSRCNOT = 8;
-       FM_ZERO = 9;
-       FM_NOTMERGESRC = 10;
-       FM_NOTXORSRC = 11;
-       FM_INVERT = 12;
-       FM_MERGESRCNOT = 13;
-       FM_NOTCOPYSRC = 14;
-       FM_MERGENOTSRC = 15;
-       FM_NOTMASKSRC = 16;
-       FM_ONE = 17;
-       BM_ERROR = (-1);
-       BM_DEFAULT = 0;
-       BM_OR = 1;
-       BM_OVERPAINT = 2;
-       BM_LEAVEALONE = 5;
-       BM_XOR = 4;
-       BM_AND = 6;
-       BM_SUBTRACT = 7;
-       BM_MASKSRCNOT = 8;
-       BM_ZERO = 9;
-       BM_NOTMERGESRC = 10;
-       BM_NOTXORSRC = 11;
-       BM_INVERT = 12;
-       BM_MERGESRCNOT = 13;
-       BM_NOTCOPYSRC = 14;
-       BM_MERGENOTSRC = 15;
-       BM_NOTMASKSRC = 16;
-       BM_ONE = 17;
-       BM_SRCTRANSPARENT = 18;
-       BM_DESTTRANSPARENT = 19;
-       LINETYPE_ERROR = (-1);
-       LINETYPE_DEFAULT = 0;
-       LINETYPE_DOT = 1;
-       LINETYPE_SHORTDASH = 2;
-       LINETYPE_DASHDOT = 3;
-       LINETYPE_DOUBLEDOT = 4;
-       LINETYPE_LONGDASH = 5;
-       LINETYPE_DASHDOUBLEDOT = 6;
-       LINETYPE_SOLID = 7;
-       LINETYPE_INVISIBLE = 8;
-       LINETYPE_ALTERNATE = 9;
-       LINEWIDTH_ERROR = (-1);
-       LINEWIDTH_DEFAULT = 0;
-       LINEWIDTH_NORMAL = $00010000;
-       LINEWIDTH_THICK = $00020000;
-       LINEWIDTHGEOM_ERROR = (-1);
-       LINEEND_ERROR = (-1);
-       LINEEND_DEFAULT = 0;
-       LINEEND_FLAT = 1;
-       LINEEND_SQUARE = 2;
-       LINEEND_ROUND = 3;
-       LINEJOIN_ERROR = (-1);
-       LINEJOIN_DEFAULT = 0;
-       LINEJOIN_BEVEL = 1;
-       LINEJOIN_ROUND = 2;
-       LINEJOIN_MITRE = 3;
-       CHDIRN_ERROR = (-1);
-       CHDIRN_DEFAULT = 0;
-       CHDIRN_LEFTRIGHT = 1;
-       CHDIRN_TOPBOTTOM = 2;
-       CHDIRN_RIGHTLEFT = 3;
-       CHDIRN_BOTTOMTOP = 4;
-       TA_NORMAL_HORIZ = $0001;
-       TA_LEFT = $0002;
-       TA_CENTER = $0003;
-       TA_RIGHT = $0004;
-       TA_STANDARD_HORIZ = $0005;
-       TA_NORMAL_VERT = $0100;
-       TA_TOP = $0200;
-       TA_HALF = $0300;
-       TA_BASE = $0400;
-       TA_BOTTOM = $0500;
-       TA_STANDARD_VERT = $0600;
-       CM_ERROR = (-1);
-       CM_DEFAULT = 0;
-       CM_MODE1 = 1;
-       CM_MODE2 = 2;
-       CM_MODE3 = 3;
-       MARKSYM_ERROR = (-1);
-       MARKSYM_DEFAULT = 0;
-       MARKSYM_CROSS = 1;
-       MARKSYM_PLUS = 2;
-       MARKSYM_DIAMOND = 3;
-       MARKSYM_SQUARE = 4;
-       MARKSYM_SIXPOINTSTAR = 5;
-       MARKSYM_EIGHTPOINTSTAR = 6;
-       MARKSYM_SOLIDDIAMOND = 7;
-       MARKSYM_SOLIDSQUARE = 8;
-       MARKSYM_DOT = 9;
-       MARKSYM_SMALLCIRCLE = 10;
-       MARKSYM_BLANK = 64;
-       CHS_OPAQUE = $0001;
-       CHS_VECTOR = $0002;
-       CHS_LEAVEPOS = $0008;
-       CHS_CLIP = $0010;
-       CHS_UNDERSCORE = $0200;
-       CHS_STRIKEOUT = $0400;
-       PRIM_LINE = 1;
-       PRIM_CHAR = 2;
-       PRIM_MARKER = 3;
-       PRIM_AREA = 4;
-       PRIM_IMAGE = 5;
-       LBB_COLOR = $0001;
-       LBB_BACK_COLOR = $0002;
-       LBB_MIX_MODE = $0004;
-       LBB_BACK_MIX_MODE = $0008;
-       LBB_WIDTH = $0010;
-       LBB_GEOM_WIDTH = $0020;
-       LBB_TYPE = $0040;
-       LBB_END = $0080;
-       LBB_JOIN = $0100;
-       CBB_COLOR = $0001;
-       CBB_BACK_COLOR = $0002;
-       CBB_MIX_MODE = $0004;
-       CBB_BACK_MIX_MODE = $0008;
-       CBB_SET = $0010;
-       CBB_MODE = $0020;
-       CBB_BOX = $0040;
-       CBB_ANGLE = $0080;
-       CBB_SHEAR = $0100;
-       CBB_DIRECTION = $0200;
-       CBB_TEXT_ALIGN = $0400;
-       CBB_EXTRA = $0800;
-       CBB_BREAK_EXTRA = $1000;
-       MBB_COLOR = $0001;
-       MBB_BACK_COLOR = $0002;
-       MBB_MIX_MODE = $0004;
-       MBB_BACK_MIX_MODE = $0008;
-       MBB_SET = $0010;
-       MBB_SYMBOL = $0020;
-       MBB_BOX = $0040;
-       ABB_COLOR = $0001;
-       ABB_BACK_COLOR = $0002;
-       ABB_MIX_MODE = $0004;
-       ABB_BACK_MIX_MODE = $0008;
-       ABB_SET = $0010;
-       ABB_SYMBOL = $0020;
-       ABB_REF_POINT = $0040;
-       IBB_COLOR = $0001;
-       IBB_BACK_COLOR = $0002;
-       IBB_MIX_MODE = $0004;
-       IBB_BACK_MIX_MODE = $0008;
-
-    type
-       ARCPARAMS = record
-          lP : LONG;
-          lQ : LONG;
-          lR : LONG;
-          lS : LONG;
-       end;
-
-       PARCPARAMS = ^ARCPARAMS;
-
-       SIZEF = record
-          cx : FIXED;
-          cy : FIXED;
-       end;
-
-       PSIZEF = ^SIZEF;
-
-       GRADIENTL = record
-          x : LONG;
-          y : LONG;
-       end;
-
-       PGRADIENTL = ^GRADIENTL;
-
-       LINEBUNDLE = record
-          lColor : LONG;
-          lBackColor : LONG;
-          usMixMode : USHORT;
-          usBackMixMode : USHORT;
-          fxWidth : FIXED;
-          lGeomWidth : LONG;
-          usType : USHORT;
-          usEnd : USHORT;
-          usJoin : USHORT;
-          usReserved : USHORT;
-       end;
-
-       PLINEBUNDLE = ^LINEBUNDLE;
-
-       CHARBUNDLE = record
-          lColor : LONG;
-          lBackColor : LONG;
-          usMixMode : USHORT;
-          usBackMixMode : USHORT;
-          usSet : USHORT;
-          usPrecision : USHORT;
-          sizfxCell : SIZEF;
-          ptlAngle : POINTL;
-          ptlShear : POINTL;
-          usDirection : USHORT;
-          usTextAlign : USHORT;
-          fxExtra : FIXED;
-          fxBreakExtra : FIXED;
-       end;
-
-       PCHARBUNDLE = ^CHARBUNDLE;
-
-       MARKERBUNDLE = record
-          lColor : LONG;
-          lBackColor : LONG;
-          usMixMode : USHORT;
-          usBackMixMode : USHORT;
-          usSet : USHORT;
-          usSymbol : USHORT;
-          sizfxCell : SIZEF;
-       end;
-
-       PMARKERBUNDLE = ^MARKERBUNDLE;
-
-       AREABUNDLE = record
-          lColor : LONG;
-          lBackColor : LONG;
-          usMixMode : USHORT;
-          usBackMixMode : USHORT;
-          usSet : USHORT;
-          usSymbol : USHORT;
-          ptlRefPoint : POINTL;
-       end;
-
-       PAREABUNDLE = ^AREABUNDLE;
-
-       IMAGEBUNDLE = record
-          lColor : LONG;
-          lBackColor : LONG;
-          usMixMode : USHORT;
-          usBackMixMode : USHORT;
-       end;
-
-       PIMAGEBUNDLE = ^IMAGEBUNDLE;
-
-       PBUNDLE = PVOID;
-
-    const
-       TXTBOX_TOPLEFT = 0;
-       TXTBOX_BOTTOMLEFT = 1;
-       TXTBOX_TOPRIGHT = 2;
-       TXTBOX_BOTTOMRIGHT = 3;
-       TXTBOX_CONCAT = 4;
-       TXTBOX_COUNT = 5;
-       PVIS_ERROR = 0;
-       PVIS_INVISIBLE = 1;
-       PVIS_VISIBLE = 2;
-       RVIS_ERROR = 0;
-       RVIS_INVISIBLE = 1;
-       RVIS_PARTIAL = 2;
-       RVIS_VISIBLE = 3;
-
-    function GpiSetAttrMode(hps : HPS;lMode : LONG) : BOOL;
-
-    function GpiQueryAttrMode(hps : HPS) : LONG;
-
-    function GpiSetAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;flDefMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
-
-    function GpiQueryAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : LONG;
-
-    function GpiSetBackColor(hps : HPS;lColor : LONG) : BOOL;
-
-    function GpiQueryBackColor(hps : HPS) : LONG;
-
-    function GpiSetMix(hps : HPS;lMixMode : LONG) : BOOL;
-
-    function GpiQueryMix(hps : HPS) : LONG;
-
-    function GpiSetBackMix(hps : HPS;lMixMode : LONG) : BOOL;
-
-    function GpiQueryBackMix(hps : HPS) : LONG;
-
-    function GpiSetLineType(hps : HPS;lLineType : LONG) : BOOL;
-
-    function GpiQueryLineType(hps : HPS) : LONG;
-
-    function GpiSetLineWidth(hps : HPS;fxLineWidth : FIXED) : BOOL;
-
-    function GpiQueryLineWidth(hps : HPS) : FIXED;
-
-    function GpiSetLineWidthGeom(hps : HPS;lLineWidth : LONG) : BOOL;
-
-    function GpiQueryLineWidthGeom(hps : HPS) : LONG;
-
-    function GpiSetLineEnd(hps : HPS;lLineEnd : LONG) : BOOL;
-
-    function GpiQueryLineEnd(hps : HPS) : LONG;
-
-    function GpiSetLineJoin(hps : HPS;lLineJoin : LONG) : BOOL;
-
-    function GpiQueryLineJoin(hps : HPS) : LONG;
-
-    function GpiSetCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
-
-    function GpiQueryCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;
-
-    function GpiSetArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
-
-    function GpiQueryArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
-
-    function GpiPointArc(hps : HPS;pptl2 : PPOINTL) : LONG;
-
-    function GpiFullArc(hps : HPS;lControl : LONG;fxMultiplier : FIXED) : LONG;
-
-    function GpiPartialArc(hps : HPS;pptlCenter : PPOINTL;fxMultiplier : FIXED;fxStartAngle : FIXED;fxSweepAngle : FIXED) : LONG;
-
-    function GpiPolyFillet(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
-
-    function GpiPolySpline(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
-
-    function GpiPolyFilletSharp(hps : HPS;lCount : LONG;aptlPoints : PPOINTL;afxPoints : PFIXED) : LONG;
-
-    function GpiSetPatternSet(hps : HPS;lSet : LONG) : BOOL;
-
-    function GpiQueryPatternSet(hps : HPS) : LONG;
-
-    function GpiSetPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;
-
-    function GpiQueryPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;
-
-    function GpiQueryCharStringPos(hps : HPS;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;
-
-    function GpiQueryCharStringPosAt(hps : HPS;pptlStart : PPOINTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;
-
-    function GpiQueryTextBox(hps : HPS;lCount1 : LONG;pchString : PCH;lCount2 : LONG;aptlPoints : PPOINTL) : BOOL;
-
-    function GpiQueryDefCharBox(hps : HPS;psizlSize : PSIZEL) : BOOL;
-
-    function GpiSetCharSet(hps : HPS;llcid : LONG) : BOOL;
-
-    function GpiQueryCharSet(hps : HPS) : LONG;
-
-    function GpiSetCharBox(hps : HPS;psizfxBox : PSIZEF) : BOOL;
-
-    function GpiQueryCharBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
-
-    function GpiSetCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;
-
-    function GpiQueryCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;
-
-    function GpiSetCharShear(hps : HPS;pptlAngle : PPOINTL) : BOOL;
-
-    function GpiQueryCharShear(hps : HPS;pptlShear : PPOINTL) : BOOL;
-
-    function GpiSetCharDirection(hps : HPS;lDirection : LONG) : BOOL;
-
-    function GpiQueryCharDirection(hps : HPS) : LONG;
-
-    function GpiSetCharMode(hps : HPS;lMode : LONG) : BOOL;
-
-    function GpiQueryCharMode(hps : HPS) : LONG;
-
-    function GpiSetTextAlignment(hps : HPS;lHoriz : LONG;lVert : LONG) : BOOL;
-
-    function GpiQueryTextAlignment(hps : HPS;plHoriz : PLONG;plVert : PLONG) : BOOL;
-
-    function GpiCharStringPos(hps : HPS;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;
-
-    function GpiCharStringPosAt(hps : HPS;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;
-
-    function GpiSetCharExtra(hps : HPS;Extra : FIXED) : BOOL;
-
-    function GpiSetCharBreakExtra(hps : HPS;BreakExtra : FIXED) : BOOL;
-
-    function GpiQueryCharExtra(hps : HPS;Extra : PFIXED) : BOOL;
-
-    function GpiQueryCharBreakExtra(hps : HPS;BreakExtra : PFIXED) : BOOL;
-
-    function GpiMarker(hps : HPS;pptlPoint : PPOINTL) : LONG;
-
-    function GpiPolyMarker(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;
-
-    function GpiSetMarker(hps : HPS;lSymbol : LONG) : BOOL;
-
-    function GpiSetMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
-
-    function GpiSetMarkerSet(hps : HPS;lSet : LONG) : BOOL;
-
-    function GpiQueryMarker(hps : HPS) : LONG;
-
-    function GpiQueryMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;
-
-    function GpiQueryMarkerSet(hps : HPS) : LONG;
-
-    function GpiImage(hps : HPS;lFormat : LONG;psizlImageSize : PSIZEL;lLength : LONG;pbData : PBYTE) : LONG;
-
-    function GpiPop(hps : HPS;lCount : LONG) : BOOL;
-
-    function GpiPtVisible(hps : HPS;pptlPoint : PPOINTL) : LONG;
-
-    function GpiRectVisible(hps : HPS;prclRectangle : PRECTL) : LONG;
-
-    function GpiComment(hps : HPS;lLength : LONG;pbData : PBYTE) : BOOL;
-
-    const
-       FONT_DEFAULT = 1;
-       FONT_MATCH = 2;
-       LCIDT_FONT = 6;
-       LCIDT_BITMAP = 7;
-       LCID_ALL = (-1);
-
-    type
-       KERNINGPAIRS = record
-          sFirstChar : SHORT;
-          sSecondChar : SHORT;
-          lKerningAmount : LONG;
-       end;
-
-       PKERNINGPAIRS = ^KERNINGPAIRS;
-
-       FACENAMEDESC = record
-          usSize : USHORT;
-          usWeightClass : USHORT;
-          usWidthClass : USHORT;
-          usReserved : USHORT;
-          flOptions : ULONG;
-       end;
-
-       PFACENAMEDESC = ^FACENAMEDESC;
-
-    const
-       FWEIGHT_DONT_CARE = 0;
-       FWEIGHT_ULTRA_LIGHT = 1;
-       FWEIGHT_EXTRA_LIGHT = 2;
-       FWEIGHT_LIGHT = 3;
-       FWEIGHT_SEMI_LIGHT = 4;
-       FWEIGHT_NORMAL = 5;
-       FWEIGHT_SEMI_BOLD = 6;
-       FWEIGHT_BOLD = 7;
-       FWEIGHT_EXTRA_BOLD = 8;
-       FWEIGHT_ULTRA_BOLD = 9;
-       FWIDTH_DONT_CARE = 0;
-       FWIDTH_ULTRA_CONDENSED = 1;
-       FWIDTH_EXTRA_CONDENSED = 2;
-       FWIDTH_CONDENSED = 3;
-       FWIDTH_SEMI_CONDENSED = 4;
-       FWIDTH_NORMAL = 5;
-       FWIDTH_SEMI_EXPANDED = 6;
-       FWIDTH_EXPANDED = 7;
-       FWIDTH_EXTRA_EXPANDED = 8;
-       FWIDTH_ULTRA_EXPANDED = 9;
-       FTYPE_ITALIC = $0001;
-       FTYPE_ITALIC_DONT_CARE = $0002;
-       FTYPE_OBLIQUE = $0004;
-       FTYPE_OBLIQUE_DONT_CARE = $0008;
-       FTYPE_ROUNDED = $0010;
-       FTYPE_ROUNDED_DONT_CARE = $0020;
-       QFA_PUBLIC = 1;
-       QFA_PRIVATE = 2;
-       QFA_ERROR = GPI_ALTERROR;
-       QF_PUBLIC = $0001;
-       QF_PRIVATE = $0002;
-       QF_NO_GENERIC = $0004;
-       QF_NO_DEVICE = $0008;
-
-    type
-       FFDESCS = array[0..1,0..FACESIZE-1] of char;
-    
-       PFFDESCS = ^FFDESCS;
-
-       FFDESCS2 = record
-          cbLength : ULONG;
-          cbFacenameOffset : ULONG;
-          abFamilyName : array[0..1-1] of BYTE;
-       end;
-
-       PFFDESCS2 = ^FFDESCS2;
-
-    function GpiCreateLogFont(hps : HPS;pName : PSTR8;lLcid : LONG;pfatAttrs : PFATTRS) : LONG;
-
-    function GpiDeleteSetId(hps : HPS;lLcid : LONG) : BOOL;
-
-    function GpiLoadFonts(hab : HAB;pszFilename : PSZ) : BOOL;
-
-    function GpiUnloadFonts(hab : HAB;pszFilename : PSZ) : BOOL;
-
-    function GpiQueryFonts(hps : HPS;flOptions : ULONG;pszFacename : PSZ;plReqFonts : PLONG;lMetricsLength : LONG;afmMetrics : PFONTMETRICS) : LONG;
-
-    function GpiQueryFontMetrics(hps : HPS;lMetricsLength : LONG;pfmMetrics : PFONTMETRICS) : BOOL;
-
-    function GpiQueryKerningPairs(hps : HPS;lCount : LONG;akrnprData : PKERNINGPAIRS) : LONG;
-
-    function GpiQueryWidthTable(hps : HPS;lFirstChar : LONG;lCount : LONG;alData : PLONG) : BOOL;
-
-    function GpiQueryNumberSetIds(hps : HPS) : LONG;
-
-    function GpiQuerySetIds(hps : HPS;lCount : LONG;alTypes : PLONG;aNames : PSTR8;allcids : PLONG) : BOOL;
-
-    function GpiQueryFaceString(PS : HPS;FamilyName : PSZ;attrs : PFACENAMEDESC;length : LONG;CompoundFaceName : PSZ) : ULONG;
-
-    function GpiQueryLogicalFont(PS : HPS;lcid : LONG;name : PSTR8;attrs : PFATTRS;length : LONG) : BOOL;
-
-    function GpiQueryFontAction(anchor : HAB;options : ULONG) : ULONG;
-
-    function GpiLoadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;
-
-    function GpiUnloadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;
-
-    function GpiSetCp(hps : HPS;ulCodePage : ULONG) : BOOL;
-
-    function GpiQueryCp(hps : HPS) : ULONG;
-
-    function GpiQueryFontFileDescriptions(hab : HAB;pszFilename : PSZ;plCount : PLONG;affdescsNames : PFFDESCS) : LONG;
-
-    function GpiQueryFullFontFileDescs(hab : HAB;pszFilename : PSZ;plCount : PLONG;pNames : PVOID;plNamesBuffLength : PLONG) : LONG;
-
-    const
-       ROP_SRCCOPY = $00CC;
-       ROP_SRCPAINT = $00EE;
-       ROP_SRCAND = $0088;
-       ROP_SRCINVERT = $0066;
-       ROP_SRCERASE = $0044;
-       ROP_NOTSRCCOPY = $0033;
-       ROP_NOTSRCERASE = $0011;
-       ROP_MERGECOPY = $00C0;
-       ROP_MERGEPAINT = $00BB;
-       ROP_PATCOPY = $00F0;
-       ROP_PATPAINT = $00FB;
-       ROP_PATINVERT = $005A;
-       ROP_DSTINVERT = $0055;
-       ROP_ZERO = $0000;
-       ROP_ONE = $00FF;
-       BBO_OR = 0;
-       BBO_AND = 1;
-       BBO_IGNORE = 2;
-       BBO_PAL_COLORS = 4;
-       BBO_NO_COLOR_INFO = 8;
-       FF_BOUNDARY = 0;
-       FF_SURFACE = 1;
-       HBM_ERROR = -1;
-
-    function GpiBitBlt(hpsTarget : HPS;hpsSource : HPS;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
-
-    function GpiDeleteBitmap(hbm : HBITMAP) : BOOL;
-
-    function GpiLoadBitmap(hps : HPS;Resource : HMODULE;idBitmap : ULONG;lWidth : LONG;lHeight : LONG) : HBITMAP;
-
-    function GpiSetBitmap(hps : HPS;hbm : HBITMAP) : HBITMAP;
-
-    function GpiWCBitBlt(hpsTarget : HPS;hbmSource : HBITMAP;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
-
-    const
-       CBM_INIT = $0004;
-       BMB_ERROR = (-1);
-
-    function GpiCreateBitmap(hps : HPS;pbmpNew : PBITMAPINFOHEADER2;flOptions : ULONG;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : HBITMAP;
-
-    function GpiSetBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;
-
-    function GpiSetBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;
-
-    function GpiSetBitmapId(hps : HPS;hbm : HBITMAP;lLcid : LONG) : BOOL;
-
-    function GpiQueryBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;
-
-    function GpiQueryBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;
-
-    function GpiQueryBitmapHandle(hps : HPS;lLcid : LONG) : HBITMAP;
-
-    function GpiQueryBitmapParameters(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER) : BOOL;
-
-    function GpiQueryBitmapInfoHeader(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER2) : BOOL;
-
-    function GpiQueryDeviceBitmapFormats(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;
-
-    function GpiSetPel(hps : HPS;pptlPoint : PPOINTL) : LONG;
-
-    function GpiQueryPel(hps : HPS;pptlPoint : PPOINTL) : LONG;
-
-    function GpiFloodFill(hps : HPS;lOptions : LONG;lColor : LONG) : LONG;
-
-    function GpiDrawBits(hps : HPS;pBits : PVOID;pbmiInfoTable : PBITMAPINFO2;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;
-
-    const
-       CRGN_OR = 1;
-       CRGN_COPY = 2;
-       CRGN_XOR = 4;
-       CRGN_AND = 6;
-       CRGN_DIFF = 7;
-       RECTDIR_LFRT_TOPBOT = 1;
-       RECTDIR_RTLF_TOPBOT = 2;
-       RECTDIR_LFRT_BOTTOP = 3;
-       RECTDIR_RTLF_BOTTOP = 4;
-
-    type
-       RGNRECT = record
-          ircStart : ULONG;
-          crc : ULONG;
-          crcReturned : ULONG;
-          ulDirection : ULONG;
-       end;
-
-       PRGNRECT = ^RGNRECT;
-
-    const
-       RGN_ERROR = 0;
-       RGN_NULL = 1;
-       RGN_RECT = 2;
-       RGN_COMPLEX = 3;
-       PRGN_ERROR = 0;
-       PRGN_OUTSIDE = 1;
-       PRGN_INSIDE = 2;
-       RRGN_ERROR = 0;
-       RRGN_OUTSIDE = 1;
-       RRGN_PARTIAL = 2;
-       RRGN_INSIDE = 3;
-       EQRGN_ERROR = 0;
-       EQRGN_NOTEQUAL = 1;
-       EQRGN_EQUAL = 2;
-       HRGN_ERROR = -1;
-
-    function GpiCombineRegion(hps : HPS;hrgnDest : HRGN;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN;lMode : LONG) : LONG;
-
-    function GpiCreateRegion(hps : HPS;lCount : LONG;arclRectangles : PRECTL) : HRGN;
-
-    function GpiDestroyRegion(hps : HPS;hrgn : HRGN) : BOOL;
-
-    function GpiEqualRegion(hps : HPS;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN) : LONG;
-
-    function GpiOffsetRegion(hps : HPS;Hrgn : HRGN;pptlOffset : PPOINTL) : BOOL;
-
-    function GpiPaintRegion(hps : HPS;hrgn : HRGN) : LONG;
-
-    function GpiFrameRegion(hps : HPS;hrgn : HRGN;thickness : PSIZEL) : LONG;
-
-    function GpiPtInRegion(hps : HPS;hrgn : HRGN;pptlPoint : PPOINTL) : LONG;
-
-    function GpiQueryRegionBox(hps : HPS;hrgn : HRGN;prclBound : PRECTL) : LONG;
-
-    function GpiQueryRegionRects(hps : HPS;hrgn : HRGN;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : BOOL;
-
-    function GpiRectInRegion(hps : HPS;hrgn : HRGN;prclRect : PRECTL) : LONG;
-
-    function GpiSetRegion(hps : HPS;hrgn : HRGN;lcount : LONG;arclRectangles : PRECTL) : BOOL;
-
-    function GpiSetClipRegion(hps : HPS;hrgn : HRGN;phrgnOld : PHRGN) : LONG;
-
-    function GpiQueryClipRegion(hps : HPS) : HRGN;
-
-    function GpiQueryClipBox(hps : HPS;prclBound : PRECTL) : LONG;
-
-    function GpiExcludeClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;
-
-    function GpiIntersectClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;
-
-    function GpiOffsetClipRegion(hps : HPS;pptlPoint : PPOINTL) : LONG;
-
-    const
-       PMF_SEGBASE = 0;
-       PMF_LOADTYPE = 1;
-       PMF_RESOLVE = 2;
-       PMF_LCIDS = 3;
-       PMF_RESET = 4;
-       PMF_SUPPRESS = 5;
-       PMF_COLORTABLES = 6;
-       PMF_COLORREALIZABLE = 7;
-       PMF_DEFAULTS = 8;
-       PMF_DELETEOBJECTS = 9;
-       RS_DEFAULT = 0;
-       RS_NODISCARD = 1;
-       LC_DEFAULT = 0;
-       LC_NOLOAD = 1;
-       LC_LOADDISC = 3;
-       LT_DEFAULT = 0;
-       LT_NOMODIFY = 1;
-       LT_ORIGINALVIEW = 4;
-       RES_DEFAULT = 0;
-       RES_NORESET = 1;
-       RES_RESET = 2;
-       SUP_DEFAULT = 0;
-       SUP_NOSUPPRESS = 1;
-       SUP_SUPPRESS = 2;
-       CTAB_DEFAULT = 0;
-       CTAB_NOMODIFY = 1;
-       CTAB_REPLACE = 3;
-       CTAB_REPLACEPALETTE = 4;
-       CREA_DEFAULT = 0;
-       CREA_REALIZE = 1;
-       CREA_NOREALIZE = 2;
-       CREA_DOREALIZE = 3;
-       DDEF_DEFAULT = 0;
-       DDEF_IGNORE = 1;
-       DDEF_LOADDISC = 3;
-       DOBJ_DEFAULT = 0;
-       DOBJ_NODELETE = 1;
-       DOBJ_DELETE = 2;
-       RSP_DEFAULT = 0;
-       RSP_NODISCARD = 1;
-
-    function GpiCopyMetaFile(hmf : HMF) : HMF;
-
-    function GpiDeleteMetaFile(hmf : HMF) : BOOL;
-
-    function GpiLoadMetaFile(hab : HAB;pszFilename : PSZ) : HMF;
-
-    function GpiPlayMetaFile(hps : HPS;hmf : HMF;lCount1 : LONG;alOptarray : PLONG;plSegCount : PLONG;lCount2 : LONG;pszDesc : PSZ) : LONG;
-
-    function GpiQueryMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbData : PBYTE) : BOOL;
-
-    function GpiQueryMetaFileLength(hmf : HMF) : LONG;
-
-    function GpiSaveMetaFile(hmf : HMF;pszFilename : PSZ) : BOOL;
-
-    function GpiSetMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbBuffer : PBYTE) : BOOL;
-
-    function GpiQueryDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
-
-    function GpiQueryDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
-
-    function GpiQueryDefTag(hps : HPS;plTag : PLONG) : BOOL;
-
-    function GpiQueryDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
-
-    function GpiSetDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;
-
-    function GpiSetDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;
-
-    function GpiSetDefTag(hps : HPS;lTag : LONG) : BOOL;
-
-    function GpiSetDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;
-
-    type
-       POLYGON = record
-          ulPoints : ULONG;
-          aPointl : PPOINTL;
-       end;
-
-       PPOLYGON = ^POLYGON;
-
-       POLYSET = record
-          ulPolys : ULONG;
-          aPolygon : array[0..1-1] of POLYGON;
-       end;
-
-       PPOLYSET = ^POLYSET;
-
-    const
-       POLYGON_NOBOUNDARY = 0;
-       POLYGON_BOUNDARY = $0001;
-       POLYGON_ALTERNATE = 0;
-       POLYGON_WINDING = $0002;
-       POLYGON_EXCL = 0;
-       POLYGON_INCL = $0008;
-
-    function GpiPolygons(hps : HPS;ulCount : ULONG;paplgn : PPOLYGON;flOptions : ULONG;flModel : ULONG) : LONG;
-
-  implementation
-
-    function GpiCreatePS(hab : HAB;hdc : HDC;psizlSize : PSIZEL;flOptions : ULONG) : HPS;[SYSTEM];
-    function GpiDestroyPS(hps : HPS) : BOOL;[SYSTEM];
-    function GpiAssociate(hps : HPS;hdc : HDC) : BOOL;[SYSTEM];
-    function GpiRestorePS(hps : HPS;lPSid : LONG) : BOOL;[SYSTEM];
-    function GpiSavePS(hps : HPS) : LONG;[SYSTEM];
-    function GpiErase(hps : HPS) : BOOL;[SYSTEM];
-    function GpiQueryDevice(hps : HPS) : HDC;[SYSTEM];
-    function GpiResetPS(hps : HPS;flOptions : ULONG) : BOOL;[SYSTEM];
-    function GpiSetPS(hps : HPS;psizlsize : PSIZEL;flOptions : ULONG) : BOOL;[SYSTEM];
-    function GpiQueryPS(hps : HPS;psizlSize : PSIZEL) : ULONG;[SYSTEM];
-    function GpiErrorSegmentData(hps : HPS;plSegment : PLONG;plContext : PLONG) : LONG;[SYSTEM];
-    function GpiQueryDrawControl(hps : HPS;lControl : LONG) : LONG;[SYSTEM];
-    function GpiSetDrawControl(hps : HPS;lControl : LONG;lValue : LONG) : BOOL;[SYSTEM];
-    function GpiQueryDrawingMode(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetDrawingMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryStopDraw(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetStopDraw(hps : HPS;lValue : LONG) : BOOL;[SYSTEM];
-    function GpiCorrelateChain(hps : HPS;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;pl2 : PLONG) : LONG;[SYSTEM];
-    function GpiQueryTag(hps : HPS;plTag : PLONG) : BOOL;[SYSTEM];
-    function GpiSetTag(hps : HPS;lTag : LONG) : BOOL;[SYSTEM];
-    function GpiQueryPickApertureSize(hps : HPS;psizlSize : PSIZEL) : BOOL;[SYSTEM];
-    function GpiSetPickApertureSize(hps : HPS;lOptions : LONG;psizlSize : PSIZEL) : BOOL;[SYSTEM];
-    function GpiQueryPickAperturePosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiSetPickAperturePosition(hps : HPS;pptlPick : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryBoundaryData(hps : HPS;prclBoundary : PRECTL) : BOOL;[SYSTEM];
-    function GpiResetBoundaryData(hps : HPS) : BOOL;[SYSTEM];
-    function GpiCorrelateFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;plSegTag : PLONG) : LONG;[SYSTEM];
-    function GpiCorrelateSegment(hps : HPS;lSegment : LONG;lType : LONG;pptlPick : PPOINTL;lMaxHits : LONG;lMaxDepth : LONG;alSegTag : PLONG) : LONG;[SYSTEM];
-    function GpiOpenSegment(hps : HPS;lSegment : LONG) : BOOL;[SYSTEM];
-    function GpiCloseSegment(hps : HPS) : BOOL;[SYSTEM];
-    function GpiDeleteSegment(hps : HPS;lSegid : LONG) : BOOL;[SYSTEM];
-    function GpiQueryInitialSegmentAttrs(hps : HPS;lAttribute : LONG) : LONG;[SYSTEM];
-    function GpiSetInitialSegmentAttrs(hps : HPS;lAttribute : LONG;lValue : LONG) : BOOL;[SYSTEM];
-    function GpiQuerySegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG) : LONG;[SYSTEM];
-    function GpiSetSegmentAttrs(hps : HPS;lSegid : LONG;lAttribute : LONG;lValue : LONG) : BOOL;[SYSTEM];
-    function GpiQuerySegmentPriority(hps : HPS;lRefSegid : LONG;lOrder : LONG) : LONG;[SYSTEM];
-    function GpiSetSegmentPriority(hps : HPS;lSegid : LONG;lRefSegid : LONG;lOrder : LONG) : BOOL;[SYSTEM];
-    function GpiDeleteSegments(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;[SYSTEM];
-    function GpiQuerySegmentNames(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG;lMax : LONG;alSegids : PLONG) : LONG;[SYSTEM];
-    function GpiGetData(hps : HPS;lSegid : LONG;plOffset : PLONG;lFormat : LONG;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
-    function GpiPutData(hps : HPS;lFormat : LONG;plCount : PLONG;pbData : PBYTE) : LONG;[SYSTEM];
-    function GpiDrawChain(hps : HPS) : BOOL;[SYSTEM];
-    function GpiDrawFrom(hps : HPS;lFirstSegment : LONG;lLastSegment : LONG) : BOOL;[SYSTEM];
-    function GpiDrawSegment(hps : HPS;lSegment : LONG) : BOOL;[SYSTEM];
-    function GpiDrawDynamics(hps : HPS) : BOOL;[SYSTEM];
-    function GpiRemoveDynamics(hps : HPS;lFirstSegid : LONG;lLastSegid : LONG) : BOOL;[SYSTEM];
-    function GpiBeginElement(hps : HPS;lType : LONG;pszDesc : PSZ) : BOOL;[SYSTEM];
-    function GpiEndElement(hps : HPS) : BOOL;[SYSTEM];
-    function GpiLabel(hps : HPS;lLabel : LONG) : BOOL;[SYSTEM];
-    function GpiElement(hps : HPS;lType : LONG;pszDesc : PSZ;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
-    function GpiQueryElement(hps : HPS;lOff : LONG;lMaxLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
-    function GpiDeleteElement(hps : HPS) : BOOL;[SYSTEM];
-    function GpiDeleteElementRange(hps : HPS;lFirstElement : LONG;lLastElement : LONG) : BOOL;[SYSTEM];
-    function GpiDeleteElementsBetweenLabels(hps : HPS;lFirstLabel : LONG;lLastLabel : LONG) : BOOL;[SYSTEM];
-    function GpiQueryEditMode(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetEditMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryElementPointer(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetElementPointer(hps : HPS;lElement : LONG) : BOOL;[SYSTEM];
-    function GpiOffsetElementPointer(hps : HPS;loffset : LONG) : BOOL;[SYSTEM];
-    function GpiQueryElementType(hps : HPS;plType : PLONG;lLength : LONG;pszData : PSZ) : LONG;[SYSTEM];
-    function GpiSetElementPointerAtLabel(hps : HPS;lLabel : LONG) : BOOL;[SYSTEM];
-    function GpiQuerySegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
-    function GpiSetSegmentTransformMatrix(hps : HPS;lSegid : LONG;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
-    function GpiConvert(hps : HPS;lSrc : LONG;lTarg : LONG;lCount : LONG;aptlPoints : PPOINTL) : BOOL;[SYSTEM];
-    function GpiConvertWithMatrix(hps : HPS;lCountp : LONG;aptlPoints : PPOINTL;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
-    function GpiQueryModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
-    function GpiSetModelTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
-    function GpiCallSegmentMatrix(hps : HPS;lSegment : LONG;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : LONG;[SYSTEM];
-    function GpiQueryDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
-    function GpiSetDefaultViewMatrix(hps : HPS;lCount : LONG;pmatlfarray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
-    function GpiQueryPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;[SYSTEM];
-    function GpiSetPageViewport(hps : HPS;prclViewport : PRECTL) : BOOL;[SYSTEM];
-    function GpiQueryViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF) : BOOL;[SYSTEM];
-    function GpiSetViewingTransformMatrix(hps : HPS;lCount : LONG;pmatlfArray : PMATRIXLF;lOptions : LONG) : BOOL;[SYSTEM];
-    function GpiTranslate(hps : HPS;pmatrixlf : PMATRIXLF;long : LONG;ppointl : PPOINTL) : BOOL;[SYSTEM];
-    function GpiScale(hps : HPS;p1 : PMATRIXLF;p2 : LONG;p3 : PFIXED;p4 : PPOINTL) : BOOL;[SYSTEM];
-    function GpiRotate(p1 : HPS;p2 : PMATRIXLF;p3 : LONG;p4 : FIXED;p5 : PPOINTL) : BOOL;[SYSTEM];
-    function GpiSetGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;[SYSTEM];
-    function GpiQueryGraphicsField(hps : HPS;prclField : PRECTL) : BOOL;[SYSTEM];
-    function GpiSetViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
-    function GpiQueryViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
-    function GpiBeginPath(hps : HPS;lPath : LONG) : BOOL;[SYSTEM];
-    function GpiEndPath(hps : HPS) : BOOL;[SYSTEM];
-    function GpiCloseFigure(hps : HPS) : BOOL;[SYSTEM];
-    function GpiModifyPath(hps : HPS;lPath : LONG;lMode : LONG) : BOOL;[SYSTEM];
-    function GpiFillPath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;[SYSTEM];
-    function GpiSetClipPath(hps : HPS;lPath : LONG;lOptions : LONG) : BOOL;[SYSTEM];
-    function GpiOutlinePath(hps : HPS;lPath : LONG;lOptions : LONG) : LONG;[SYSTEM];
-    function GpiPathToRegion(GpiH : HPS;lPath : LONG;lOptions : LONG) : HRGN;[SYSTEM];
-    function GpiStrokePath(hps : HPS;lPath : LONG;flOptions : ULONG) : LONG;[SYSTEM];
-    function GpiCreateLogColorTable(hps : HPS;flOptions : ULONG;lFormat : LONG;lStart : LONG;lCount : LONG;alTable : PLONG) : BOOL;[SYSTEM];
-    function GpiQueryColorData(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;[SYSTEM];
-    function GpiQueryLogColorTable(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alArray : PLONG) : LONG;[SYSTEM];
-    function GpiQueryRealColors(hps : HPS;flOptions : ULONG;lStart : LONG;lCount : LONG;alColors : PLONG) : LONG;[SYSTEM];
-    function GpiQueryNearestColor(hps : HPS;flOptions : ULONG;lRgbIn : LONG) : LONG;[SYSTEM];
-    function GpiQueryColorIndex(hps : HPS;flOptions : ULONG;lRgbColor : LONG) : LONG;[SYSTEM];
-    function GpiQueryRGBColor(hps : HPS;flOptions : ULONG;lColorIndex : LONG) : LONG;[SYSTEM];
-    function GpiCreatePalette(hab : HAB;flOptions : ULONG;ulFormat : ULONG;ulCount : ULONG;aulTable : PULONG) : HPAL;[SYSTEM];
-    function GpiDeletePalette(hpal : HPAL) : BOOL;[SYSTEM];
-    function GpiSelectPalette(hps : HPS;hpal : HPAL) : HPAL;[SYSTEM];
-    function GpiAnimatePalette(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : LONG;[SYSTEM];
-    function GpiSetPaletteEntries(hpal : HPAL;ulFormat : ULONG;ulStart : ULONG;ulCount : ULONG;aulTable : PULONG) : BOOL;[SYSTEM];
-    function GpiQueryPalette(hps : HPS) : HPAL;[SYSTEM];
-    function GpiQueryPaletteInfo(hpal : HPAL;hps : HPS;flOptions : ULONG;ulStart : ULONG;ulCount : ULONG;aulArray : PULONG) : LONG;[SYSTEM];
-    function GpiSetColor(hps : HPS;lColor : LONG) : BOOL;[SYSTEM];
-    function GpiQueryColor(hps : HPS) : LONG;[SYSTEM];
-    function GpiBox(hps : HPS;lControl : LONG;pptlPoint : PPOINTL;lHRound : LONG;lVRound : LONG) : LONG;[SYSTEM];
-    function GpiMove(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiLine(hps : HPS;pptlEndPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiPolyLine(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
-    function GpiPolyLineDisjoint(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
-    function GpiSetPattern(hps : HPS;lPatternSymbol : LONG) : BOOL;[SYSTEM];
-    function GpiQueryPattern(hps : HPS) : LONG;[SYSTEM];
-    function GpiBeginArea(hps : HPS;flOptions : ULONG) : BOOL;[SYSTEM];
-    function GpiEndArea(hps : HPS) : LONG;[SYSTEM];
-    function GpiCharString(hps : HPS;lCount : LONG;pchString : PCH) : LONG;[SYSTEM];
-    function GpiCharStringAt(hps : HPS;pptlPoint : PPOINTL;lCount : LONG;pchString : PCH) : LONG;[SYSTEM];
-    function GpiSetAttrMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryAttrMode(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;flDefMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
-    function GpiQueryAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : LONG;[SYSTEM];
-    function GpiSetBackColor(hps : HPS;lColor : LONG) : BOOL;[SYSTEM];
-    function GpiQueryBackColor(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetMix(hps : HPS;lMixMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryMix(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetBackMix(hps : HPS;lMixMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryBackMix(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetLineType(hps : HPS;lLineType : LONG) : BOOL;[SYSTEM];
-    function GpiQueryLineType(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetLineWidth(hps : HPS;fxLineWidth : FIXED) : BOOL;[SYSTEM];
-    function GpiQueryLineWidth(hps : HPS) : FIXED;[SYSTEM];
-    function GpiSetLineWidthGeom(hps : HPS;lLineWidth : LONG) : BOOL;[SYSTEM];
-    function GpiQueryLineWidthGeom(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetLineEnd(hps : HPS;lLineEnd : LONG) : BOOL;[SYSTEM];
-    function GpiQueryLineEnd(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetLineJoin(hps : HPS;lLineJoin : LONG) : BOOL;[SYSTEM];
-    function GpiQueryLineJoin(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryCurrentPosition(hps : HPS;pptlPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiSetArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
-    function GpiQueryArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
-    function GpiPointArc(hps : HPS;pptl2 : PPOINTL) : LONG;[SYSTEM];
-    function GpiFullArc(hps : HPS;lControl : LONG;fxMultiplier : FIXED) : LONG;[SYSTEM];
-    function GpiPartialArc(hps : HPS;pptlCenter : PPOINTL;fxMultiplier : FIXED;fxStartAngle : FIXED;fxSweepAngle : FIXED) : LONG;[SYSTEM];
-    function GpiPolyFillet(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
-    function GpiPolySpline(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
-    function GpiPolyFilletSharp(hps : HPS;lCount : LONG;aptlPoints : PPOINTL;afxPoints : PFIXED) : LONG;[SYSTEM];
-    function GpiSetPatternSet(hps : HPS;lSet : LONG) : BOOL;[SYSTEM];
-    function GpiQueryPatternSet(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryPatternRefPoint(hps : HPS;pptlRefPoint : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryCharStringPos(hps : HPS;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryCharStringPosAt(hps : HPS;pptlStart : PPOINTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alXincrements : PLONG;aptlPositions : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryTextBox(hps : HPS;lCount1 : LONG;pchString : PCH;lCount2 : LONG;aptlPoints : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryDefCharBox(hps : HPS;psizlSize : PSIZEL) : BOOL;[SYSTEM];
-    function GpiSetCharSet(hps : HPS;llcid : LONG) : BOOL;[SYSTEM];
-    function GpiQueryCharSet(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetCharBox(hps : HPS;psizfxBox : PSIZEF) : BOOL;[SYSTEM];
-    function GpiQueryCharBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
-    function GpiSetCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;[SYSTEM];
-    function GpiQueryCharAngle(hps : HPS;pgradlAngle : PGRADIENTL) : BOOL;[SYSTEM];
-    function GpiSetCharShear(hps : HPS;pptlAngle : PPOINTL) : BOOL;[SYSTEM];
-    function GpiQueryCharShear(hps : HPS;pptlShear : PPOINTL) : BOOL;[SYSTEM];
-    function GpiSetCharDirection(hps : HPS;lDirection : LONG) : BOOL;[SYSTEM];
-    function GpiQueryCharDirection(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetCharMode(hps : HPS;lMode : LONG) : BOOL;[SYSTEM];
-    function GpiQueryCharMode(hps : HPS) : LONG;[SYSTEM];
-    function GpiSetTextAlignment(hps : HPS;lHoriz : LONG;lVert : LONG) : BOOL;[SYSTEM];
-    function GpiQueryTextAlignment(hps : HPS;plHoriz : PLONG;plVert : PLONG) : BOOL;[SYSTEM];
-    function GpiCharStringPos(hps : HPS;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;[SYSTEM];
-    function GpiCharStringPosAt(hps : HPS;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : ULONG;lCount : LONG;pchString : PCH;alAdx : PLONG) : LONG;[SYSTEM];
-    function GpiSetCharExtra(hps : HPS;Extra : FIXED) : BOOL;[SYSTEM];
-    function GpiSetCharBreakExtra(hps : HPS;BreakExtra : FIXED) : BOOL;[SYSTEM];
-    function GpiQueryCharExtra(hps : HPS;Extra : PFIXED) : BOOL;[SYSTEM];
-    function GpiQueryCharBreakExtra(hps : HPS;BreakExtra : PFIXED) : BOOL;[SYSTEM];
-    function GpiMarker(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiPolyMarker(hps : HPS;lCount : LONG;aptlPoints : PPOINTL) : LONG;[SYSTEM];
-    function GpiSetMarker(hps : HPS;lSymbol : LONG) : BOOL;[SYSTEM];
-    function GpiSetMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
-    function GpiSetMarkerSet(hps : HPS;lSet : LONG) : BOOL;[SYSTEM];
-    function GpiQueryMarker(hps : HPS) : LONG;[SYSTEM];
-    function GpiQueryMarkerBox(hps : HPS;psizfxSize : PSIZEF) : BOOL;[SYSTEM];
-    function GpiQueryMarkerSet(hps : HPS) : LONG;[SYSTEM];
-    function GpiImage(hps : HPS;lFormat : LONG;psizlImageSize : PSIZEL;lLength : LONG;pbData : PBYTE) : LONG;[SYSTEM];
-    function GpiPop(hps : HPS;lCount : LONG) : BOOL;[SYSTEM];
-    function GpiPtVisible(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiRectVisible(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
-    function GpiComment(hps : HPS;lLength : LONG;pbData : PBYTE) : BOOL;[SYSTEM];
-    function GpiCreateLogFont(hps : HPS;pName : PSTR8;lLcid : LONG;pfatAttrs : PFATTRS) : LONG;[SYSTEM];
-    function GpiDeleteSetId(hps : HPS;lLcid : LONG) : BOOL;[SYSTEM];
-    function GpiLoadFonts(hab : HAB;pszFilename : PSZ) : BOOL;[SYSTEM];
-    function GpiUnloadFonts(hab : HAB;pszFilename : PSZ) : BOOL;[SYSTEM];
-    function GpiQueryFonts(hps : HPS;flOptions : ULONG;pszFacename : PSZ;plReqFonts : PLONG;lMetricsLength : LONG;afmMetrics : PFONTMETRICS) : LONG;[SYSTEM];
-    function GpiQueryFontMetrics(hps : HPS;lMetricsLength : LONG;pfmMetrics : PFONTMETRICS) : BOOL;[SYSTEM];
-    function GpiQueryKerningPairs(hps : HPS;lCount : LONG;akrnprData : PKERNINGPAIRS) : LONG;[SYSTEM];
-    function GpiQueryWidthTable(hps : HPS;lFirstChar : LONG;lCount : LONG;alData : PLONG) : BOOL;[SYSTEM];
-    function GpiQueryNumberSetIds(hps : HPS) : LONG;[SYSTEM];
-    function GpiQuerySetIds(hps : HPS;lCount : LONG;alTypes : PLONG;aNames : PSTR8;allcids : PLONG) : BOOL;[SYSTEM];
-    function GpiQueryFaceString(PS : HPS;FamilyName : PSZ;attrs : PFACENAMEDESC;length : LONG;CompoundFaceName : PSZ) : ULONG;[SYSTEM];
-    function GpiQueryLogicalFont(PS : HPS;lcid : LONG;name : PSTR8;attrs : PFATTRS;length : LONG) : BOOL;[SYSTEM];
-    function GpiQueryFontAction(anchor : HAB;options : ULONG) : ULONG;[SYSTEM];
-    function GpiLoadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;[SYSTEM];
-    function GpiUnloadPublicFonts(p1 : HAB;p2 : PSZ) : BOOL;[SYSTEM];
-    function GpiSetCp(hps : HPS;ulCodePage : ULONG) : BOOL;[SYSTEM];
-    function GpiQueryCp(hps : HPS) : ULONG;[SYSTEM];
-    function GpiQueryFontFileDescriptions(hab : HAB;pszFilename : PSZ;plCount : PLONG;affdescsNames : PFFDESCS) : LONG;[SYSTEM];
-    function GpiQueryFullFontFileDescs(hab : HAB;pszFilename : PSZ;plCount : PLONG;pNames : PVOID;plNamesBuffLength : PLONG) : LONG;[SYSTEM];
-    function GpiBitBlt(hpsTarget : HPS;hpsSource : HPS;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
-    function GpiDeleteBitmap(hbm : HBITMAP) : BOOL;[SYSTEM];
-    function GpiLoadBitmap(hps : HPS;Resource : HMODULE;idBitmap : ULONG;lWidth : LONG;lHeight : LONG) : HBITMAP;[SYSTEM];
-    function GpiSetBitmap(hps : HPS;hbm : HBITMAP) : HBITMAP;[SYSTEM];
-    function GpiWCBitBlt(hpsTarget : HPS;hbmSource : HBITMAP;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
-    function GpiCreateBitmap(hps : HPS;pbmpNew : PBITMAPINFOHEADER2;flOptions : ULONG;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : HBITMAP;[SYSTEM];
-    function GpiSetBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;[SYSTEM];
-    function GpiSetBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;[SYSTEM];
-    function GpiSetBitmapId(hps : HPS;hbm : HBITMAP;lLcid : LONG) : BOOL;[SYSTEM];
-    function GpiQueryBitmapBits(hps : HPS;lScanStart : LONG;lScans : LONG;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : LONG;[SYSTEM];
-    function GpiQueryBitmapDimension(hbm : HBITMAP;psizlBitmapDimension : PSIZEL) : BOOL;[SYSTEM];
-    function GpiQueryBitmapHandle(hps : HPS;lLcid : LONG) : HBITMAP;[SYSTEM];
-    function GpiQueryBitmapParameters(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER) : BOOL;[SYSTEM];
-    function GpiQueryBitmapInfoHeader(hbm : HBITMAP;pbmpData : PBITMAPINFOHEADER2) : BOOL;[SYSTEM];
-    function GpiQueryDeviceBitmapFormats(hps : HPS;lCount : LONG;alArray : PLONG) : BOOL;[SYSTEM];
-    function GpiSetPel(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiQueryPel(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiFloodFill(hps : HPS;lOptions : LONG;lColor : LONG) : LONG;[SYSTEM];
-    function GpiDrawBits(hps : HPS;pBits : PVOID;pbmiInfoTable : PBITMAPINFO2;lCount : LONG;aptlPoints : PPOINTL;lRop : LONG;flOptions : ULONG) : LONG;[SYSTEM];
-    function GpiCombineRegion(hps : HPS;hrgnDest : HRGN;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN;lMode : LONG) : LONG;[SYSTEM];
-    function GpiCreateRegion(hps : HPS;lCount : LONG;arclRectangles : PRECTL) : HRGN;[SYSTEM];
-    function GpiDestroyRegion(hps : HPS;hrgn : HRGN) : BOOL;[SYSTEM];
-    function GpiEqualRegion(hps : HPS;hrgnSrc1 : HRGN;hrgnSrc2 : HRGN) : LONG;[SYSTEM];
-    function GpiOffsetRegion(hps : HPS;Hrgn : HRGN;pptlOffset : PPOINTL) : BOOL;[SYSTEM];
-    function GpiPaintRegion(hps : HPS;hrgn : HRGN) : LONG;[SYSTEM];
-    function GpiFrameRegion(hps : HPS;hrgn : HRGN;thickness : PSIZEL) : LONG;[SYSTEM];
-    function GpiPtInRegion(hps : HPS;hrgn : HRGN;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiQueryRegionBox(hps : HPS;hrgn : HRGN;prclBound : PRECTL) : LONG;[SYSTEM];
-    function GpiQueryRegionRects(hps : HPS;hrgn : HRGN;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : BOOL;[SYSTEM];
-    function GpiRectInRegion(hps : HPS;hrgn : HRGN;prclRect : PRECTL) : LONG;[SYSTEM];
-    function GpiSetRegion(hps : HPS;hrgn : HRGN;lcount : LONG;arclRectangles : PRECTL) : BOOL;[SYSTEM];
-    function GpiSetClipRegion(hps : HPS;hrgn : HRGN;phrgnOld : PHRGN) : LONG;[SYSTEM];
-    function GpiQueryClipRegion(hps : HPS) : HRGN;[SYSTEM];
-    function GpiQueryClipBox(hps : HPS;prclBound : PRECTL) : LONG;[SYSTEM];
-    function GpiExcludeClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
-    function GpiIntersectClipRectangle(hps : HPS;prclRectangle : PRECTL) : LONG;[SYSTEM];
-    function GpiOffsetClipRegion(hps : HPS;pptlPoint : PPOINTL) : LONG;[SYSTEM];
-    function GpiCopyMetaFile(hmf : HMF) : HMF;[SYSTEM];
-    function GpiDeleteMetaFile(hmf : HMF) : BOOL;[SYSTEM];
-    function GpiLoadMetaFile(hab : HAB;pszFilename : PSZ) : HMF;[SYSTEM];
-    function GpiPlayMetaFile(hps : HPS;hmf : HMF;lCount1 : LONG;alOptarray : PLONG;plSegCount : PLONG;lCount2 : LONG;pszDesc : PSZ) : LONG;[SYSTEM];
-    function GpiQueryMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbData : PBYTE) : BOOL;[SYSTEM];
-    function GpiQueryMetaFileLength(hmf : HMF) : LONG;[SYSTEM];
-    function GpiSaveMetaFile(hmf : HMF;pszFilename : PSZ) : BOOL;[SYSTEM];
-    function GpiSetMetaFileBits(hmf : HMF;lOffset : LONG;lLength : LONG;pbBuffer : PBYTE) : BOOL;[SYSTEM];
-    function GpiQueryDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
-    function GpiQueryDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
-    function GpiQueryDefTag(hps : HPS;plTag : PLONG) : BOOL;[SYSTEM];
-    function GpiQueryDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
-    function GpiSetDefArcParams(hps : HPS;parcpArcParams : PARCPARAMS) : BOOL;[SYSTEM];
-    function GpiSetDefAttrs(hps : HPS;lPrimType : LONG;flAttrMask : ULONG;ppbunAttrs : PBUNDLE) : BOOL;[SYSTEM];
-    function GpiSetDefTag(hps : HPS;lTag : LONG) : BOOL;[SYSTEM];
-    function GpiSetDefViewingLimits(hps : HPS;prclLimits : PRECTL) : BOOL;[SYSTEM];
-    function GpiPolygons(hps : HPS;ulCount : ULONG;paplgn : PPOLYGON;flOptions : ULONG;flModel : ULONG) : LONG;[SYSTEM];
-
-end.
+{****************************************************************************
+
+                   Copyright (c) 1993,94 by Florian Kl„mpfl
+                  
+ ****************************************************************************}
+unit pmgpi;
+
+  interface
+  
+    uses
+       os2def,pmbitmap;
+
+    const
+       GPI_ERROR = 0;
+       GPI_OK = 1;
+       GPI_ALTERROR = (-1);
+
+       CLR_NOINDEX = (-254);
+       PU_ARBITRARY = $0004;
+       PU_PELS = $0008;
+       PU_LOMETRIC = $000C;
+       PU_HIMETRIC = $0010;
+       PU_LOENGLISH = $0014;
+       PU_HIENGLISH = $0018;
+       PU_TWIPS = $001C;
+       GPIF_DEFAULT = 0;
+       GPIF_SHORT = $0100;
+       GPIF_LONG = $0200;
+       GPIT_NORMAL = 0;
+       GPIT_MICRO = $1000;
+       GPIA_NOASSOC = 0;
+       GPIA_ASSOC = $4000;
+       HDC_ERROR = -1;
+
+       GRES_ATTRS = $0001;
+       GRES_SEGMENTS = $0002;
+       GRES_ALL = $0004;
+       PS_UNITS = $00FC;
+       PS_FORMAT = $0F00;
+       PS_TYPE = $1000;
+       PS_MODE = $2000;
+       PS_ASSOCIATE = $4000;
+       PS_NORESET = $8000;
+       GPIE_SEGMENT = 0;
+       GPIE_ELEMENT = 1;
+       GPIE_DATA = 2;
+       DCTL_ERASE = 1;
+       DCTL_DISPLAY = 2;
+       DCTL_BOUNDARY = 3;
+       DCTL_DYNAMIC = 4;
+       DCTL_CORRELATE = 5;
+       DCTL_ERROR = -1;
+       DCTL_OFF = 0;
+       DCTL_ON = 1;
+       SDW_ERROR = -1;
+       SDW_OFF = 0;
+       SDW_ON = 1;
+       DM_ERROR = 0;
+       DM_DRAW = 1;
+       DM_RETAIN = 2;
+       DM_DRAWANDRETAIN = 3;
+
+       PICKAP_DEFAULT = 0;
+       PICKAP_REC = 2;
+       PICKSEL_VISIBLE = 0;
+       PICKSEL_ALL = 1;
+       GPI_HITS = 2;
+
+       DFORM_NOCONV = 0;
+       DFORM_S370SHORT = 1;
+       DFORM_PCSHORT = 2;
+       DFORM_PCLONG = 4;
+       ATTR_ERROR = (-1);
+       ATTR_DETECTABLE = 1;
+       ATTR_VISIBLE = 2;
+       ATTR_CHAINED = 6;
+       ATTR_DYNAMIC = 8;
+       ATTR_FASTCHAIN = 9;
+       ATTR_PROP_DETECTABLE = 10;
+       ATTR_PROP_VISIBLE = 11;
+       ATTR_OFF = 0;
+       ATTR_ON = 1;
+       LOWER_PRI = (-1);
+       HIGHER_PRI = 1;
+
+       SEGEM_ERROR = 0;
+       SEGEM_INSERT = 1;
+       SEGEM_REPLACE = 2;
+
+       CVTC_WORLD = 1;
+       CVTC_MODEL = 2;
+       CVTC_DEFAULTPAGE = 3;
+       CVTC_PAGE = 4;
+       CVTC_DEVICE = 5;
+       TRANSFORM_REPLACE = 0;
+       TRANSFORM_ADD = 1;
+       TRANSFORM_PREEMPT = 2;
+
+       MPATH_STROKE = 6;
+       FPATH_ALTERNATE = 0;
+       FPATH_WINDING = 2;
+       FPATH_EXCL = 0;
+       FPATH_INCL = 8;
+       SCP_ALTERNATE = 0;
+       SCP_WINDING = 2;
+       SCP_AND = 4;
+       SCP_RESET = 0;
+       SCP_EXCL = 0;
+       SCP_INCL = 8;
+
+       LCOL_RESET = $0001;
+       LCOL_REALIZABLE = $0002;
+       LCOL_PURECOLOR = $0004;
+       LCOL_OVERRIDE_DEFAULT_COLORS = $0008;
+       LCOL_REALIZED = $0010;
+       LCOLF_DEFAULT = 0;
+       LCOLF_INDRGB = 1;
+       LCOLF_CONSECRGB = 2;
+       LCOLF_RGB = 3;
+       LCOLF_PALETTE = 4;
+       LCOLOPT_REALIZED = $0001;
+       LCOLOPT_INDEX = $0002;
+       QLCT_ERROR = (-1);
+       QLCT_RGB = (-2);
+       QLCT_NOTLOADED = (-1);
+       QCD_LCT_FORMAT = 0;
+       QCD_LCT_LOINDEX = 1;
+       QCD_LCT_HIINDEX = 2;
+       QCD_LCT_OPTIONS = 3;
+       PAL_ERROR = (-1);
+       PC_RESERVED = $01;
+       PC_EXPLICIT = $02;
+       PC_NOCOLLAPSE = $04;
+
+       CLR_FALSE = (-5);
+       CLR_TRUE = (-4);
+       CLR_ERROR = (-255);
+       CLR_DEFAULT = (-3);
+       CLR_WHITE = (-2);
+       CLR_BLACK = (-1);
+       CLR_BACKGROUND = 0;
+       CLR_BLUE = 1;
+       CLR_RED = 2;
+       CLR_PINK = 3;
+       CLR_GREEN = 4;
+       CLR_CYAN = 5;
+       CLR_YELLOW = 6;
+       CLR_NEUTRAL = 7;
+       CLR_DARKGRAY = 8;
+       CLR_DARKBLUE = 9;
+       CLR_DARKRED = 10;
+       CLR_DARKPINK = 11;
+       CLR_DARKGREEN = 12;
+       CLR_DARKCYAN = 13;
+       CLR_BROWN = 14;
+       CLR_PALEGRAY = 15;
+       RGB_ERROR = (-255);
+       RGB_BLACK = $00000000;
+       RGB_BLUE = $000000FF;
+       RGB_GREEN = $0000FF00;
+       RGB_CYAN = $0000FFFF;
+       RGB_RED = $00FF0000;
+       RGB_PINK = $00FF00FF;
+       RGB_YELLOW = $00FFFF00;
+       RGB_WHITE = $00FFFFFF;
+       BA_NOBOUNDARY = 0;
+       BA_BOUNDARY = $0001;
+       BA_ALTERNATE = 0;
+       BA_WINDING = $0002;
+       BA_EXCL = 0;
+       BA_INCL = 8;
+       DRO_FILL = 1;
+       DRO_OUTLINE = 2;
+       DRO_OUTLINEFILL = 3;
+       PATSYM_ERROR = (-1);
+       PATSYM_DEFAULT = 0;
+       PATSYM_DENSE1 = 1;
+       PATSYM_DENSE2 = 2;
+       PATSYM_DENSE3 = 3;
+       PATSYM_DENSE4 = 4;
+       PATSYM_DENSE5 = 5;
+       PATSYM_DENSE6 = 6;
+       PATSYM_DENSE7 = 7;
+       PATSYM_DENSE8 = 8;
+       PATSYM_VERT = 9;
+       PATSYM_HORIZ = 10;
+       PATSYM_DIAG1 = 11;
+       PATSYM_DIAG2 = 12;
+       PATSYM_DIAG3 = 13;
+       PATSYM_DIAG4 = 14;
+       PATSYM_NOSHADE = 15;
+       PATSYM_SOLID = 16;
+       PATSYM_HALFTONE = 17;
+       PATSYM_HATCH = 18;
+       PATSYM_DIAGHATCH = 19;
+       PATSYM_BLANK = 64;
+       LCID_ERROR = (-1);
+       LCID_DEFAULT = 0;
+
+       AM_ERROR = (-1);
+       AM_PRESERVE = 0;
+       AM_NOPRESERVE = 1;
+       FM_ERROR = (-1);
+       FM_DEFAULT = 0;
+       FM_OR = 1;
+       FM_OVERPAINT = 2;
+       FM_LEAVEALONE = 5;
+       FM_XOR = 4;
+       FM_AND = 6;
+       FM_SUBTRACT = 7;
+       FM_MASKSRCNOT = 8;
+       FM_ZERO = 9;
+       FM_NOTMERGESRC = 10;
+       FM_NOTXORSRC = 11;
+       FM_INVERT = 12;
+       FM_MERGESRCNOT = 13;
+       FM_NOTCOPYSRC = 14;
+       FM_MERGENOTSRC = 15;
+       FM_NOTMASKSRC = 16;
+       FM_ONE = 17;
+       BM_ERROR = (-1);
+       BM_DEFAULT = 0;
+       BM_OR = 1;
+       BM_OVERPAINT = 2;
+       BM_LEAVEALONE = 5;
+       BM_XOR = 4;
+       BM_AND = 6;
+       BM_SUBTRACT = 7;
+       BM_MASKSRCNOT = 8;
+       BM_ZERO = 9;
+       BM_NOTMERGESRC = 10;
+       BM_NOTXORSRC = 11;
+       BM_INVERT = 12;
+       BM_MERGESRCNOT = 13;
+       BM_NOTCOPYSRC = 14;
+       BM_MERGENOTSRC = 15;
+       BM_NOTMASKSRC = 16;
+       BM_ONE = 17;
+       BM_SRCTRANSPARENT = 18;
+       BM_DESTTRANSPARENT = 19;
+       LINETYPE_ERROR = (-1);
+       LINETYPE_DEFAULT = 0;
+       LINETYPE_DOT = 1;
+       LINETYPE_SHORTDASH = 2;
+       LINETYPE_DASHDOT = 3;
+       LINETYPE_DOUBLEDOT = 4;
+       LINETYPE_LONGDASH = 5;
+       LINETYPE_DASHDOUBLEDOT = 6;
+       LINETYPE_SOLID = 7;
+       LINETYPE_INVISIBLE = 8;
+       LINETYPE_ALTERNATE = 9;
+       LINEWIDTH_ERROR = (-1);
+       LINEWIDTH_DEFAULT = 0;
+       LINEWIDTH_NORMAL = $00010000;
+       LINEWIDTH_THICK = $00020000;
+       LINEWIDTHGEOM_ERROR = (-1);
+       LINEEND_ERROR = (-1);
+       LINEEND_DEFAULT = 0;
+       LINEEND_FLAT = 1;
+       LINEEND_SQUARE = 2;
+       LINEEND_ROUND = 3;
+       LINEJOIN_ERROR = (-1);
+       LINEJOIN_DEFAULT = 0;
+       LINEJOIN_BEVEL = 1;
+       LINEJOIN_ROUND = 2;
+       LINEJOIN_MITRE = 3;
+       CHDIRN_ERROR = (-1);
+       CHDIRN_DEFAULT = 0;
+       CHDIRN_LEFTRIGHT = 1;
+       CHDIRN_TOPBOTTOM = 2;
+       CHDIRN_RIGHTLEFT = 3;
+       CHDIRN_BOTTOMTOP = 4;
+       TA_NORMAL_HORIZ = $0001;
+       TA_LEFT = $0002;
+       TA_CENTER = $0003;
+       TA_RIGHT = $0004;
+       TA_STANDARD_HORIZ = $0005;
+       TA_NORMAL_VERT = $0100;
+       TA_TOP = $0200;
+       TA_HALF = $0300;
+       TA_BASE = $0400;
+       TA_BOTTOM = $0500;
+       TA_STANDARD_VERT = $0600;
+       CM_ERROR = (-1);
+       CM_DEFAULT = 0;
+       CM_MODE1 = 1;
+       CM_MODE2 = 2;
+       CM_MODE3 = 3;
+       MARKSYM_ERROR = (-1);
+       MARKSYM_DEFAULT = 0;
+       MARKSYM_CROSS = 1;
+       MARKSYM_PLUS = 2;
+       MARKSYM_DIAMOND = 3;
+       MARKSYM_SQUARE = 4;
+       MARKSYM_SIXPOINTSTAR = 5;
+       MARKSYM_EIGHTPOINTSTAR = 6;
+       MARKSYM_SOLIDDIAMOND = 7;
+       MARKSYM_SOLIDSQUARE = 8;
+       MARKSYM_DOT = 9;
+       MARKSYM_SMALLCIRCLE = 10;
+       MARKSYM_BLANK = 64;
+       CHS_OPAQUE = $0001;
+       CHS_VECTOR = $0002;
+       CHS_LEAVEPOS = $0008;
+       CHS_CLIP = $0010;
+       CHS_UNDERSCORE = $0200;
+       CHS_STRIKEOUT = $0400;
+       PRIM_LINE = 1;
+       PRIM_CHAR = 2;
+       PRIM_MARKER = 3;
+       PRIM_AREA = 4;
+       PRIM_IMAGE = 5;
+       LBB_COLOR = $0001;
+       LBB_BACK_COLOR = $0002;
+       LBB_MIX_MODE = $0004;
+       LBB_BACK_MIX_MODE = $0008;
+       LBB_WIDTH = $0010;
+       LBB_GEOM_WIDTH = $0020;
+       LBB_TYPE = $0040;
+       LBB_END = $0080;
+       LBB_JOIN = $0100;
+       CBB_COLOR = $0001;
+       CBB_BACK_COLOR = $0002;
+       CBB_MIX_MODE = $0004;
+       CBB_BACK_MIX_MODE = $0008;
+       CBB_SET = $0010;
+       CBB_MODE = $0020;
+       CBB_BOX = $0040;
+       CBB_ANGLE = $0080;
+       CBB_SHEAR = $0100;
+       CBB_DIRECTION = $0200;
+       CBB_TEXT_ALIGN = $0400;
+       CBB_EXTRA = $0800;
+       CBB_BREAK_EXTRA = $1000;
+       MBB_COLOR = $0001;
+       MBB_BACK_COLOR = $0002;
+       MBB_MIX_MODE = $0004;
+       MBB_BACK_MIX_MODE = $0008;
+       MBB_SET = $0010;
+       MBB_SYMBOL = $0020;
+       MBB_BOX = $0040;
+       ABB_COLOR = $0001;
+       ABB_BACK_COLOR = $0002;
+       ABB_MIX_MODE = $0004;
+       ABB_BACK_MIX_MODE = $0008;
+       ABB_SET = $0010;
+       ABB_SYMBOL = $0020;
+       ABB_REF_POINT = $0040;
+       IBB_COLOR = $0001;
+       IBB_BACK_COLOR = $0002;
+       IBB_MIX_MODE = $0004;
+       IBB_BACK_MIX_MODE = $0008;
+
+       TXTBOX_TOPLEFT = 0;
+       TXTBOX_BOTTOMLEFT = 1;
+       TXTBOX_TOPRIGHT = 2;
+       TXTBOX_BOTTOMRIGHT = 3;
+       TXTBOX_CONCAT = 4;
+       TXTBOX_COUNT = 5;
+       PVIS_ERROR = 0;
+       PVIS_INVISIBLE = 1;
+       PVIS_VISIBLE = 2;
+       RVIS_ERROR = 0;
+       RVIS_INVISIBLE = 1;
+       RVIS_PARTIAL = 2;
+       RVIS_VISIBLE = 3;
+
+       FONT_DEFAULT = 1;
+       FONT_MATCH = 2;
+       LCIDT_FONT = 6;
+       LCIDT_BITMAP = 7;
+       LCID_ALL = (-1);
+
+       FWEIGHT_DONT_CARE = 0;
+       FWEIGHT_ULTRA_LIGHT = 1;
+       FWEIGHT_EXTRA_LIGHT = 2;
+       FWEIGHT_LIGHT = 3;
+       FWEIGHT_SEMI_LIGHT = 4;
+       FWEIGHT_NORMAL = 5;
+       FWEIGHT_SEMI_BOLD = 6;
+       FWEIGHT_BOLD = 7;
+       FWEIGHT_EXTRA_BOLD = 8;
+       FWEIGHT_ULTRA_BOLD = 9;
+       FWIDTH_DONT_CARE = 0;
+       FWIDTH_ULTRA_CONDENSED = 1;
+       FWIDTH_EXTRA_CONDENSED = 2;
+       FWIDTH_CONDENSED = 3;
+       FWIDTH_SEMI_CONDENSED = 4;
+       FWIDTH_NORMAL = 5;
+       FWIDTH_SEMI_EXPANDED = 6;
+       FWIDTH_EXPANDED = 7;
+       FWIDTH_EXTRA_EXPANDED = 8;
+       FWIDTH_ULTRA_EXPANDED = 9;
+       FTYPE_ITALIC = $0001;
+       FTYPE_ITALIC_DONT_CARE = $0002;
+       FTYPE_OBLIQUE = $0004;
+       FTYPE_OBLIQUE_DONT_CARE = $0008;
+       FTYPE_ROUNDED = $0010;
+       FTYPE_ROUNDED_DONT_CARE = $0020;
+       QFA_PUBLIC = 1;
+       QFA_PRIVATE = 2;
+       QFA_ERROR = GPI_ALTERROR;
+       QF_PUBLIC = $0001;
+       QF_PRIVATE = $0002;
+       QF_NO_GENERIC = $0004;
+       QF_NO_DEVICE = $0008;
+
+       ROP_SRCCOPY = $00CC;
+       ROP_SRCPAINT = $00EE;
+       ROP_SRCAND = $0088;
+       ROP_SRCINVERT = $0066;
+       ROP_SRCERASE = $0044;
+       ROP_NOTSRCCOPY = $0033;
+       ROP_NOTSRCERASE = $0011;
+       ROP_MERGECOPY = $00C0;
+       ROP_MERGEPAINT = $00BB;
+       ROP_PATCOPY = $00F0;
+       ROP_PATPAINT = $00FB;
+       ROP_PATINVERT = $005A;
+       ROP_DSTINVERT = $0055;
+       ROP_ZERO = $0000;
+       ROP_ONE = $00FF;
+       BBO_OR = 0;
+       BBO_AND = 1;
+       BBO_IGNORE = 2;
+       BBO_PAL_COLORS = 4;
+       BBO_NO_COLOR_INFO = 8;
+       FF_BOUNDARY = 0;
+       FF_SURFACE = 1;
+       HBM_ERROR = -1;
+
+       {Bitmaps}
+       CBM_INIT = $0004;
+       BMB_ERROR = (-1);
+
+       {Regions}                                                                                                                                          
+       CRGN_OR = 1;
+       CRGN_COPY = 2;
+       CRGN_XOR = 4;
+       CRGN_AND = 6;
+       CRGN_DIFF = 7;
+       RECTDIR_LFRT_TOPBOT = 1;
+       RECTDIR_RTLF_TOPBOT = 2;
+       RECTDIR_LFRT_BOTTOP = 3;
+       RECTDIR_RTLF_BOTTOP = 4;
+       RGN_ERROR = 0;
+       RGN_NULL = 1;
+       RGN_RECT = 2;
+       RGN_COMPLEX = 3;
+       PRGN_ERROR = 0;
+       PRGN_OUTSIDE = 1;
+       PRGN_INSIDE = 2;
+       RRGN_ERROR = 0;
+       RRGN_OUTSIDE = 1;
+       RRGN_PARTIAL = 2;
+       RRGN_INSIDE = 3;
+       EQRGN_ERROR = 0;
+       EQRGN_NOTEQUAL = 1;
+       EQRGN_EQUAL = 2;
+       HRGN_ERROR = -1;
+       
+       {Metafiles}
+       PMF_SEGBASE = 0;
+       PMF_LOADTYPE = 1;
+       PMF_RESOLVE = 2;
+       PMF_LCIDS = 3;
+       PMF_RESET = 4;
+       PMF_SUPPRESS = 5;
+       PMF_COLORTABLES = 6;
+       PMF_COLORREALIZABLE = 7;
+       PMF_DEFAULTS = 8;
+       PMF_DELETEOBJECTS = 9;
+       RS_DEFAULT = 0;
+       RS_NODISCARD = 1;
+       LC_DEFAULT = 0;
+       LC_NOLOAD = 1;
+       LC_LOADDISC = 3;
+       LT_DEFAULT = 0;
+       LT_NOMODIFY = 1;
+       LT_ORIGINALVIEW = 4;
+       RES_DEFAULT = 0;
+       RES_NORESET = 1;
+       RES_RESET = 2;
+       SUP_DEFAULT = 0;
+       SUP_NOSUPPRESS = 1;
+       SUP_SUPPRESS = 2;
+       CTAB_DEFAULT = 0;
+       CTAB_NOMODIFY = 1;
+       CTAB_REPLACE = 3;
+       CTAB_REPLACEPALETTE = 4;
+       CREA_DEFAULT = 0;
+       CREA_REALIZE = 1;
+       CREA_NOREALIZE = 2;
+       CREA_DOREALIZE = 3;
+       DDEF_DEFAULT = 0;
+       DDEF_IGNORE = 1;
+       DDEF_LOADDISC = 3;
+       DOBJ_DEFAULT = 0;
+       DOBJ_NODELETE = 1;
+       DOBJ_DELETE = 2;
+       RSP_DEFAULT = 0;
+       RSP_NODISCARD = 1;
+       
+       {Polygons}
+       POLYGON_NOBOUNDARY = 0;
+       POLYGON_BOUNDARY = $0001;
+       POLYGON_ALTERNATE = 0;
+       POLYGON_WINDING = $0002;
+       POLYGON_EXCL = 0;
+       POLYGON_INCL = $0008;
+       
+    type
+       SIZEL = record
+          cx : longint;
+          cy : longint;
+       end;             
+       PSIZEL = ^SIZEL;
+
+       MATRIXLF = record
+          fxM11 : longint;
+          fxM12 : longint;
+          lM13 : longint;
+          fxM21 : longint;
+          fxM22 : longint;
+          lM23 : longint;
+          lM31 : longint;
+          lM32 : longint;
+          lM33 : longint;
+       end;
+
+       PMATRIXLF = ^MATRIXLF;
+
+       ARCPARAMS = record
+          lP : longint;
+          lQ : longint;
+          lR : longint;
+          lS : longint;
+       end;
+
+       PARCPARAMS = ^ARCPARAMS;
+
+       SIZEF = record
+          cx : longint;
+          cy : longint;
+       end;
+
+       PSIZEF = ^SIZEF;
+
+       GRADIENTL = record
+          x : longint;
+          y : longint;
+       end;
+
+       PGRADIENTL = ^GRADIENTL;
+
+       LINEBUNDLE = record
+          lColor : longint;
+          lBackColor : longint;
+          usMixMode : word;
+          usBackMixMode : word;
+          fxWidth : longint;
+          lGeomWidth : longint;
+          usType : word;
+          usEnd : word;
+          usJoin : word;
+          usReserved : word;
+       end;
+
+       PLINEBUNDLE = ^LINEBUNDLE;
+
+       CHARBUNDLE = record
+          lColor : longint;
+          lBackColor : longint;
+          usMixMode : word;
+          usBackMixMode : word;
+          usSet : word;
+          usPrecision : word;
+          sizfxCell : SIZEF;
+          ptlAngle : POINTL;
+          ptlShear : POINTL;
+          usDirection : word;
+          usTextAlign : word;
+          fxExtra : longint;
+          fxBreakExtra : longint;
+       end;
+
+       PCHARBUNDLE = ^CHARBUNDLE;
+
+       MARKERBUNDLE = record
+          lColor : longint;
+          lBackColor : longint;
+          usMixMode : word;
+          usBackMixMode : word;
+          usSet : word;
+          usSymbol : word;
+          sizfxCell : SIZEF;
+       end;
+
+       PMARKERBUNDLE = ^MARKERBUNDLE;
+
+       AREABUNDLE = record
+          lColor : longint;
+          lBackColor : longint;
+          usMixMode : word;
+          usBackMixMode : word;
+          usSet : word;
+          usSymbol : word;
+          ptlRefPoint : POINTL;
+       end;
+
+       PAREABUNDLE = ^AREABUNDLE;
+
+       IMAGEBUNDLE = record
+          lColor : longint;
+          lBackColor : longint;
+          usMixMode : word;
+          usBackMixMode : word;
+       end;
+
+       PIMAGEBUNDLE = ^IMAGEBUNDLE;
+
+       KERNINGPAIRS = record
+          sFirstChar : integer;
+          sSecondChar : integer;
+          lKerningAmount : longint;
+       end;
+
+       PKERNINGPAIRS = ^KERNINGPAIRS;
+
+       FACENAMEDESC = record
+          usSize : word;
+          usWeightClass : word;
+          usWidthClass : word;
+          usReserved : word;
+          flOptions : cardinal;
+       end;
+
+       PFACENAMEDESC = ^FACENAMEDESC;
+
+       FFDESCS = array[0..1,0..FACESIZE-1] of char;
+    
+       PFFDESCS = ^FFDESCS;
+
+       FFDESCS2 = record
+          cbLength : cardinal;
+          cbFacenameOffset : cardinal;
+          abFamilyName : array[0..1-1] of BYTE;
+       end;
+
+       PFFDESCS2 = ^FFDESCS2;
+
+       RGNRECT = record
+          ircStart : cardinal;
+          crc : cardinal;
+          crcReturned : cardinal;
+          ulDirection : cardinal;
+       end;
+
+       PRGNRECT = ^RGNRECT;
+       
+          POLYGON = record
+          ulPoints : cardinal;
+          aPointl : PPOINTL;
+       end;
+
+       PPOLYGON = ^POLYGON;
+
+       POLYSET = record
+          ulPolys : cardinal;
+          aPolygon : array[0..1-1] of POLYGON;
+       end;
+
+       PPOLYSET = ^POLYSET;
+       
+    function GpiCreatePS(hab,hdc : cardinal;psizlSize : PSIZEL;flOptions : cardinal) : cardinal;cdecl;          
+    function GpiDestroyPS(hps : cardinal) : longbool;cdecl;
+    function GpiAssociate(hps,hdc : cardinal) : longbool;cdecl;
+    function GpiRestorePS(hps : cardinal;lPSid : longint) : longbool;cdecl;
+    function GpiSavePS(hps : cardinal) : longint;cdecl;                
+    function GpiErase(hps : cardinal) : longbool;cdecl;                 
+    function GpiQueryDevice(hps : cardinal) : cardinal;cdecl;                
+    function GpiResetPS(hps,flOptions : cardinal) : longbool;cdecl; 
+    function GpiSetPS(hps : cardinal;psizlsize : PSIZEL;flOptions : cardinal) : longbool;cdecl;      
+    function GpiQueryPS(hps : cardinal;psizlSize : PSIZEL) : cardinal;cdecl;                 
+    function GpiErrorSegmentData(hps : cardinal;plSegment,plContext : plongint) : longint; cdecl;
+    function GpiQueryDrawControl(hps : cardinal;lControl : longint) : longint;cdecl;                     
+    function GpiSetDrawControl(hps : cardinal;lControl,lValue : longint) : longbool;cdecl;         
+    function GpiQueryDrawingMode(hps : cardinal) : longint;cdecl;                                     
+    function GpiSetDrawingMode(hps : cardinal;lMode : longint) : longbool;cdecl;
+    function GpiQueryStopDraw(hps : cardinal) : longint;cdecl;              
+    function GpiSetStopDraw(hps : cardinal;lValue : longint) : longbool;cdecl;                                      
+    function GpiCorrelateChain(hps : cardinal;lType : longint;pptlPick : PPOINTL;lMaxHits,lMaxDepth : longint;pl2 : plongint) : longint;cdecl;     
+    function GpiQueryTag(hps : cardinal;plTag : plongint) : longbool;cdecl;             
+    function GpiSetTag(hps : cardinal;lTag : longint) : longbool;cdecl;                 
+    function GpiQueryPickApertureSize(hps : cardinal;psizlSize : PSIZEL) : longbool; cdecl;                       
+    function GpiSetPickApertureSize(hps : cardinal;lOptions : longint;psizlSize : PSIZEL) : longbool; cdecl;         
+    function GpiQueryPickAperturePosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl;                  
+    function GpiSetPickAperturePosition(hps : cardinal;pptlPick : PPOINTL) : longbool; cdecl;                     
+    function GpiQueryBoundaryData(hps : cardinal;prclBoundary : PRECTL) : longbool; cdecl;                        
+    function GpiResetBoundaryData(hps : cardinal) : longbool; cdecl;                                              
+    function GpiCorrelateFrom(hps : cardinal;lFirstSegment,lLastSegment,lType : longint;pptlPick : PPOINTL;lMaxHits,lMaxDepth : longint;plSegTag : plongint) : longint; cdecl;                
+    function GpiCorrelateSegment(hps : cardinal;lSegment,lType : longint;pptlPick : PPOINTL;lMaxHits,lMaxDepth : longint;alSegTag : plongint) : longint; cdecl;                             
+    function GpiOpenSegment(hps : cardinal;lSegment : longint) : longbool; cdecl;     
+    function GpiCloseSegment(hps : cardinal) : longbool; cdecl;                    
+    function GpiDeleteSegment(hps : cardinal;lSegid : longint) : longbool; cdecl;     
+    function GpiQueryInitialSegmentAttrs(hps : cardinal;lAttribute : longint) : longint; cdecl;      
+    function GpiSetInitialSegmentAttrs(hps : cardinal;lAttribute,lValue : longint) : longbool; cdecl;          
+    function GpiQuerySegmentAttrs(hps : cardinal;lSegid,lAttribute : longint) : longint; cdecl;               
+    function GpiSetSegmentAttrs(hps : cardinal;lSegid,lAttribute,lValue : longint) : longbool; cdecl;   
+    function GpiQuerySegmentPriority(hps : cardinal;lRefSegid,lOrder : longint) : longint; cdecl;             
+    function GpiSetSegmentPriority(hps : cardinal;lSegid,lRefSegid,lOrder : longint) : longbool; cdecl; 
+    function GpiDeleteSegments(hps : cardinal;lFirstSegment,lLastSegment : longint) : longbool; cdecl;         
+    function GpiQuerySegmentNames(hps : cardinal;lFirstSegid,lLastSegid,lMax : longint;alSegids : plongint) : longint; cdecl;        
+    function GpiGetData(hps : cardinal;lSegid : longint;plOffset : plongint;lFormat,lLength : longint;pbData : PBYTE) : longint; cdecl;        
+    function GpiPutData(hps : cardinal;lFormat : longint;plCount : plongint;pbData : PBYTE) : longint; cdecl;  
+    function GpiDrawChain(hps : cardinal) : longbool; cdecl; 
+    function GpiDrawFrom(hps : cardinal;lFirstSegment,lLastSegment : longint) : longbool; cdecl;
+    function GpiDrawSegment(hps : cardinal;lSegment : longint) : longbool; cdecl;                      
+    function GpiDrawDynamics(hps : cardinal) : longbool; cdecl;                                     
+    function GpiRemoveDynamics(hps : cardinal;lFirstSegid,lLastSegid : longint) : longbool; cdecl;
+    function GpiBeginElement(hps : cardinal;lType : longint;pszDesc : pchar) : longbool; cdecl;  
+    function GpiEndElement(hps : cardinal) : longbool; cdecl;                               
+    function GpiLabel(hps : cardinal;lLabel : longint) : longbool; cdecl;                      
+    function GpiElement(hps : cardinal;lType : longint;pszDesc : pchar;lLength : longint;pbData : PBYTE) : longint; cdecl;  
+    function GpiQueryElement(hps : cardinal;lOff,lMaxLength : longint;pbData : PBYTE) : longint; cdecl;         
+    function GpiDeleteElement(hps : cardinal) : longbool; cdecl;                                                     
+    function GpiDeleteElementRange(hps : cardinal;lFirstElement,lLastElement : longint) : longbool; cdecl;       
+    function GpiDeleteElementsBetweenLabels(hps : cardinal;lFirstLabel,lLastLabel : longint) : longbool; cdecl;  
+    function GpiQueryEditMode(hps : cardinal) : longint; cdecl;                                                    
+    function GpiSetEditMode(hps : cardinal;lMode : longint) : longbool; cdecl;                                         
+    function GpiQueryElementPointer(hps : cardinal) : longint; cdecl;                                              
+    function GpiSetElementPointer(hps : cardinal;lElement : longint) : longbool; cdecl;                                
+    function GpiOffsetElementPointer(hps : cardinal;loffset : longint) : longbool; cdecl;                              
+    function GpiQueryElementType(hps : cardinal;plType : plongint;lLength : longint;pszData : pchar) : longint; cdecl;
+    function GpiSetElementPointerAtLabel(hps : cardinal;lLabel : longint) : longbool; cdecl;
+    function GpiQuerySegmentTransformMatrix(hps : cardinal;lSegid,lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl;  
+    function GpiSetSegmentTransformMatrix(hps : cardinal;lSegid,lCount : longint;pmatlfarray : PMATRIXLF;lOptions : longint) : longbool; cdecl;        
+    function GpiConvert(hps : cardinal;lSrc,lTarg,lCount : longint;aptlPoints : PPOINTL) : longbool; cdecl;                                  
+    function GpiConvertWithMatrix(hps : cardinal;lCountp : longint;aptlPoints : PPOINTL;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl;          
+    function GpiQueryModelTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl;                                      
+    function GpiSetModelTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longbool; cdecl;                        
+    function GpiCallSegmentMatrix(hps : cardinal;lSegment,lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longint; cdecl;              
+    function GpiQueryDefaultViewMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl;                                         
+    function GpiSetDefaultViewMatrix(hps : cardinal;lCount : longint;pmatlfarray : PMATRIXLF;lOptions : longint) : longbool; cdecl;                           
+    function GpiQueryPageViewport(hps : cardinal;prclViewport : PRECTL) : longbool; cdecl;
+    function GpiSetPageViewport(hps : cardinal;prclViewport : PRECTL) : longbool; cdecl;  
+    function GpiQueryViewingTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; 
+    function GpiSetViewingTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longbool; cdecl;   
+    function GpiTranslate(hps : cardinal;pmatrixlf : PMATRIXLF;long : longint;ppointl : PPOINTL) : longbool; cdecl;                     
+    function GpiScale(hps : cardinal;p1 : PMATRIXLF;p2 : longint;p3 : plongint;p4 : PPOINTL) : longbool; cdecl;                           
+    function GpiRotate(p1 : cardinal;p2 : PMATRIXLF;p3,p4 : longint;p5 : PPOINTL) : longbool; cdecl;                            
+    function GpiSetGraphicsField(hps : cardinal;prclField : PRECTL) : longbool; cdecl;                                               
+    function GpiQueryGraphicsField(hps : cardinal;prclField : PRECTL) : longbool; cdecl;                                             
+    function GpiSetViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl;                                              
+    function GpiQueryViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl;                                            
+    function GpiBeginPath(hps : cardinal;lPath : longint) : longbool; cdecl;
+    function GpiEndPath(hps : cardinal) : longbool; cdecl;               
+    function GpiCloseFigure(hps : cardinal) : longbool; cdecl;           
+    function GpiModifyPath(hps : cardinal;lPath,lMode : longint) : longbool; cdecl; 
+    function GpiFillPath(hps : cardinal;lPath,lOptions : longint) : longint; cdecl;
+    function GpiSetClipPath(hps : cardinal;lPath,lOptions : longint) : longbool; cdecl; 
+    function GpiOutlinePath(hps : cardinal;lPath,lOptions : longint) : longint; cdecl; 
+    function GpiPathToRegion(GpiH : cardinal;lPath,lOptions : longint) : cardinal; cdecl;
+    function GpiStrokePath(hps : cardinal;lPath : longint;flOptions : cardinal) : longint; cdecl; 
+    function GpiCreateLogColorTable(hps,flOptions : cardinal;lFormat,lStart,lCount : longint;alTable : plongint) : longbool; cdecl; 
+    function GpiQueryColorData(hps : cardinal;lCount : longint;alArray : plongint) : longbool; cdecl;                                                     
+    function GpiQueryLogColorTable(hps,flOptions : cardinal;lStart,lCount : longint;alArray : plongint) : longint; cdecl;                 
+    function GpiQueryRealColors(hps,flOptions : cardinal;lStart,lCount : longint;alColors : plongint) : longint; cdecl;                   
+    function GpiQueryNearestColor(hps,flOptions : cardinal;lRgbIn : longint) : longint; cdecl;                                                
+    function GpiQueryColorIndex(hps,flOptions : cardinal;lRgbColor : longint) : longint; cdecl;                                               
+    function GpiQueryRGBColor(hps,flOptions : cardinal;lColorIndex : longint) : longint; cdecl;                                               
+    function GpiCreatePalette(hab,flOptions,ulFormat,ulCount : cardinal;aulTable : pcardinal) : cardinal; cdecl;      
+    function GpiDeletePalette(hpal : cardinal) : longbool; cdecl;                                                                         
+    function GpiSelectPalette(hps,hpal : cardinal) : cardinal; cdecl;                                                               
+    function GpiAnimatePalette(hpal,ulFormat,ulStart,ulCount : cardinal;aulTable : pcardinal) : longint; cdecl;     
+    function GpiSetPaletteEntries(hpal,ulFormat,ulStart,ulCount : cardinal;aulTable : pcardinal) : longbool; cdecl;  
+    function GpiQueryPalette(hps : cardinal) : cardinal; cdecl;        
+    function GpiQueryPaletteInfo(hpal,hps,flOptions,ulStart,ulCount : cardinal;aulArray : pcardinal) : longint; cdecl;
+    function GpiSetColor(hps : cardinal;lColor : longint) : longbool; cdecl;  
+    function GpiQueryColor(hps : cardinal) : longint; cdecl;              
+    function GpiBox(hps : cardinal;lControl : longint;pptlPoint : PPOINTL;lHRound,lVRound : longint) : longint; cdecl;
+    function GpiMove(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl;                                             
+    function GpiLine(hps : cardinal;pptlEndPoint : PPOINTL) : longint; cdecl;                                          
+    function GpiPolyLine(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl;                          
+    function GpiPolyLineDisjoint(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl;                  
+    function GpiSetPattern(hps : cardinal;lPatternSymbol : longint) : longbool; cdecl;                                     
+    function GpiQueryPattern(hps : cardinal) : longint;  cdecl;                                                        
+    function GpiBeginArea(hps,flOptions : cardinal) : longbool; cdecl;                                          
+    function GpiEndArea(hps : cardinal) : longint; cdecl;                                                              
+    function GpiCharString(hps : cardinal;lCount : longint;pchString : pshortint) : longint; cdecl;                             
+    function GpiCharStringAt(hps : cardinal;pptlPoint : PPOINTL;lCount : longint;pchString : pshortint) : longint; cdecl;      
+    function GpiSetAttrMode(hps : cardinal;lMode : longint) : longbool; cdecl; 
+    function GpiQueryAttrMode(hps : cardinal) : longint; cdecl;            
+    function GpiSetAttrs(hps : cardinal;lPrimType : longint;flAttrMask,flDefMask : cardinal;ppbunAttrs : pointer) : longbool; cdecl;
+    function GpiQueryAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longint; cdecl;                
+    function GpiSetBackColor(hps : cardinal;lColor : longint) : longbool; cdecl;                                                         
+    function GpiQueryBackColor(hps : cardinal) : longint; cdecl;                                                                     
+    function GpiSetMix(hps : cardinal;lMixMode : longint) : longbool; cdecl;                                                             
+    function GpiQueryMix(hps : cardinal) : longint; cdecl;                                                                           
+    function GpiSetBackMix(hps : cardinal;lMixMode : longint) : longbool; cdecl;  
+    
+    function GpiQueryBackMix(hps : cardinal) : longint; cdecl;                
+    function GpiSetLineType(hps : cardinal;lLineType : longint) : longbool; cdecl; 
+    function GpiQueryLineType(hps : cardinal) : longint; cdecl;                
+    function GpiSetLineWidth(hps : cardinal;fxLineWidth : longint) : longbool; cdecl;
+    function GpiQueryLineWidth(hps : cardinal) : longint; cdecl;                 
+    function GpiSetLineWidthGeom(hps : cardinal;lLineWidth : longint) : longbool; cdecl; 
+    function GpiQueryLineWidthGeom(hps : cardinal) : longint; cdecl;                 
+    function GpiSetLineEnd(hps : cardinal;lLineEnd : longint) : longbool; cdecl;         
+    function GpiQueryLineEnd(hps : cardinal) : longint; cdecl;                       
+    function GpiSetLineJoin(hps : cardinal;lLineJoin : longint) : longbool; cdecl;       
+    function GpiQueryLineJoin(hps : cardinal) : longint; cdecl;                      
+    function GpiSetCurrentPosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl; 
+    function GpiQueryCurrentPosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl;
+    function GpiSetArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl;
+    function GpiQueryArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl; 
+    function GpiPointArc(hps : cardinal;pptl2 : PPOINTL) : longint; cdecl;                   
+    function GpiFullArc(hps : cardinal;lControl,fxMultiplier : longint) : longint; cdecl;  
+    function GpiPartialArc(hps : cardinal;pptlCenter : PPOINTL;fxMultiplier,fxStartAngle,fxSweepAngle : longint) : longint; cdecl;
+    function GpiPolyFillet(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl;                                                 
+    function GpiPolySpline(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl;                                                 
+    function GpiPolyFilletSharp(hps : cardinal;lCount : longint;aptlPoints : PPOINTL;afxPoints : plongint) : longint; cdecl;                         
+    function GpiSetPatternSet(hps : cardinal;lSet : longint) : longbool; cdecl;   
+    function GpiQueryPatternSet(hps : cardinal) : longint; cdecl;             
+    function GpiSetPatternRefPoint(hps : cardinal;pptlRefPoint : PPOINTL) : longbool; cdecl;   
+    function GpiQueryPatternRefPoint(hps : cardinal;pptlRefPoint : PPOINTL) : longbool; cdecl; 
+    function GpiQueryCharStringPos(hps,flOptions : cardinal;lCount : longint;pchString : pshortint;alXincrements : plongint;aptlPositions : PPOINTL) : longbool; cdecl;     
+    function GpiQueryCharStringPosAt(hps : cardinal;pptlStart : PPOINTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alXincrements : plongint;aptlPositions : PPOINTL) : longbool; cdecl; 
+    function GpiQueryTextBox(hps : cardinal;lCount1 : longint;pchString : pshortint;lCount2 : longint;aptlPoints : PPOINTL) : longbool; cdecl;                                                        
+    function GpiQueryDefCharBox(hps : cardinal;psizlSize : PSIZEL) : longbool; cdecl;                                                                                                     
+    function GpiSetCharSet(hps : cardinal;llcid : longint) : longbool; cdecl;                                                                                                                
+    function GpiQueryCharSet(hps : cardinal) : longint; cdecl;                                    
+    function GpiSetCharBox(hps : cardinal;psizfxBox : PSIZEF) : longbool; cdecl;                   
+    function GpiQueryCharBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl;                
+    function GpiSetCharAngle(hps : cardinal;pgradlAngle : PGRADIENTL) : longbool; cdecl;           
+    function GpiQueryCharAngle(hps : cardinal;pgradlAngle : PGRADIENTL) : longbool; cdecl;         
+    function GpiSetCharShear(hps : cardinal;pptlAngle : PPOINTL) : longbool; cdecl;                
+    function GpiQueryCharShear(hps : cardinal;pptlShear : PPOINTL) : longbool; cdecl;              
+    function GpiSetCharDirection(hps : cardinal;lDirection : longint) : longbool; cdecl;              
+    function GpiQueryCharDirection(hps : cardinal) : longint; cdecl;                              
+    function GpiSetCharMode(hps : cardinal;lMode : longint) : longbool; cdecl;                        
+    function GpiQueryCharMode(hps : cardinal) : longint; cdecl;                                   
+    function GpiSetTextAlignment(hps : cardinal;lHoriz,lVert : longint) : longbool; cdecl;     
+    function GpiQueryTextAlignment(hps : cardinal;plHoriz,plVert : plongint) : longbool; cdecl; 
+    function GpiCharStringPos(hps : cardinal;prclRect : PRECTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alAdx : plongint) : longint; cdecl;      
+    function GpiCharStringPosAt(hps : cardinal;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alAdx : plongint) : longint; cdecl;       
+    function GpiSetCharExtra(hps : cardinal;Extra : longint) : longbool;  cdecl;                 
+    function GpiSetCharBreakExtra(hps : cardinal;BreakExtra : longint) : longbool; cdecl;        
+    function GpiQueryCharExtra(hps : cardinal;Extra : plongint) : longbool; cdecl;               
+    function GpiQueryCharBreakExtra(hps : cardinal;BreakExtra : plongint) : longbool; cdecl;     
+    function GpiMarker(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                  
+    function GpiPolyMarker(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl;
+    function GpiSetMarker(hps : cardinal;lSymbol : longint) : longbool; cdecl;                     
+    function GpiSetMarkerBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl;             
+    function GpiSetMarkerSet(hps : cardinal;lSet : longint) : longbool; cdecl;                     
+    function GpiQueryMarker(hps : cardinal) : longint; cdecl;                                  
+    function GpiQueryMarkerBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl;           
+    function GpiQueryMarkerSet(hps : cardinal) : longint; cdecl;                               
+    function GpiImage(hps : cardinal;lFormat : longint;psizlImageSize : PSIZEL;lLength : longint;pbData : PBYTE) : longint; cdecl;     
+    function GpiPop(hps : cardinal;lCount : longint) : longbool; cdecl;                                                              
+    function GpiPtVisible(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                                                  
+    function GpiRectVisible(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl;                                             
+    function GpiComment(hps : cardinal;lLength : longint;pbData : PBYTE) : longbool; cdecl;
+    function GpiCreateLogFont(hps : cardinal;pName : PSTR8;lLcid : longint;pfatAttrs : PFATTRS) : longint; cdecl;   
+    function GpiDeleteSetId(hps : cardinal;lLcid : longint) : longbool; cdecl;                                       
+    function GpiLoadFonts(hab : cardinal;pszFilename : pchar) : longbool; cdecl;                                    
+    function GpiUnloadFonts(hab : cardinal;pszFilename : pchar) : longbool; cdecl;                                  
+    function GpiQueryFonts(hps,flOptions : cardinal;pszFacename : pchar;plReqFonts : plongint;lMetricsLength : longint;afmMetrics : PFONTMETRICS) : longint; cdecl;        
+    function GpiQueryFontMetrics(hps : cardinal;lMetricsLength : longint;pfmMetrics : PFONTMETRICS) : longbool; cdecl;                                                         
+    function GpiQueryKerningPairs(hps : cardinal;lCount : longint;akrnprData : PKERNINGPAIRS) : longint; cdecl;                                                               
+    function GpiQueryWidthTable(hps : cardinal;lFirstChar,lCount : longint;alData : plongint) : longbool; cdecl;                                                           
+    function GpiQueryNumberSetIds(hps : cardinal) : longint; cdecl;     
+    function GpiQuerySetIds(hps : cardinal;lCount : longint;alTypes : plongint;aNames : PSTR8;allcids : plongint) : longbool; cdecl;  
+    function GpiQueryFaceString(PS : cardinal;FamilyName : pchar;attrs : PFACENAMEDESC;length : longint;CompoundFaceName : pchar) : cardinal; cdecl;
+    function GpiQueryLogicalFont(PS : cardinal;lcid : longint;name : PSTR8;attrs : PFATTRS;length : longint) : longbool; cdecl; 
+    function GpiQueryFontAction(anchor,options : cardinal) : cardinal; cdecl;                                    
+    function GpiLoadPublicFonts(p1 : cardinal;p2 : pchar);longbool; cdecl;                                                
+    function GpiUnloadPublicFonts(p1 : cardinal;p2 : pchar) : longbool; cdecl;                                              
+    function GpiSetCp(hps,ulCodePage : cardinal) : longbool;  cdecl;                                              
+    function GpiQueryCp(hps : cardinal) : cardinal; cdecl;                                                               
+    function GpiQueryFontFileDescriptions(hab : cardinal;pszFilename : pchar;plCount : plongint;affdescsNames : PFFDESCS) : longint;  cdecl; 
+    function GpiQueryFullFontFileDescs(hab : cardinal;pszFilename : pchar;plCount : plongint;pNames : pointer;plNamesBuffLength : plongint) : longint; cdecl;  
+    function GpiBitBlt(hpsTarget,hpsSource : cardinal;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl;             
+    function GpiDeleteBitmap(hbm : cardinal) : longbool; cdecl;                                                                                          
+    function GpiLoadBitmap(hps,Resource,idBitmap : cardinal;lWidth,lHeight : longint) : cardinal; cdecl;                            
+    function GpiSetBitmap(hps,hbm : cardinal) : cardinal; cdecl; 
+    function GpiWCBitBlt(hpsTarget,hbmSource : cardinal;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl;
+    function GpiCreateBitmap(hps : cardinal;pbmpNew : PBITMAPINFOHEADER2;flOptions : cardinal;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : cardinal; cdecl;
+    function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : longint; cdecl;                   
+    function GpiSetBitmapDimension(hbm : cardinal;psizlBitmapDimension : PSIZEL) : longbool; cdecl;                                                          
+    function GpiSetBitmapId(hps,hbm : cardinal;lLcid : longint) : longbool; cdecl;                                                                        
+    function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : longint; cdecl;                 
+    function GpiQueryBitmapDimension(hbm : cardinal;psizlBitmapDimension : PSIZEL) : longbool; cdecl;                                                        
+    function GpiQueryBitmapHandle(hps : cardinal;lLcid : longint) : cardinal;  cdecl;                                                                            
+    function GpiQueryBitmapParameters(hbm : cardinal;pbmpData : PBITMAPINFOHEADER) : longbool; cdecl;                                                        
+    function GpiQueryBitmapInfoHeader(hbm : cardinal;pbmpData : PBITMAPINFOHEADER2) : longbool; cdecl;                                                       
+    function GpiQueryDeviceBitmapFormats(hps : cardinal;lCount : longint;alArray : plongint) : longbool; cdecl;                                                        
+    function GpiSetPel(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                                                                                    
+    function GpiQueryPel(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                                                                                  
+    function GpiFloodFill(hps : cardinal;lOptions,lColor : longint) : longint; cdecl;                                                                       
+    function GpiDrawBits(hps : cardinal;pBits : pointer;pbmiInfoTable : PBITMAPINFO2;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; 
+    function GpiCombineRegion(hps,hrgnDest,hrgnSrc1,hrgnSrc2 : cardinal;lMode : longint) : longint;  cdecl;
+    function GpiCreateRegion(hps : cardinal;lCount : longint;arclRectangles : PRECTL) : cardinal;  cdecl;                        
+    function GpiDestroyRegion(hps,hrgn : cardinal) : longbool;  cdecl;                                                 
+    function GpiEqualRegion(hps,hrgnSrc1,hrgnSrc2 : cardinal) : longint; cdecl;                                
+    function GpiOffsetRegion(hps,Hrgn : cardinal;pptlOffset : PPOINTL) : longbool; cdecl;                              
+    function GpiPaintRegion(hps,hrgn : cardinal) : longint; cdecl;                                                    
+    function GpiFrameRegion(hps,hrgn : cardinal;thickness : PSIZEL) : longint; cdecl;                                 
+    function GpiPtInRegion(hps,hrgn : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                                 
+    function GpiQueryRegionBox(hps,hrgn : cardinal;prclBound : PRECTL) : longint; cdecl;                              
+    function GpiQueryRegionRects(hps,hrgn : cardinal;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : longbool; cdecl;     
+    function GpiRectInRegion(hps,hrgn : cardinal;prclRect : PRECTL) : longint; cdecl;                                                     
+    function GpiSetRegion(hps,hrgn : cardinal;lcount : longint;arclRectangles : PRECTL) : longbool;cdecl;  
+    function GpiSetClipRegion(hps,hrgn : cardinal;phrgnOld : pcardinal) : longint; cdecl;                  
+    function GpiQueryClipRegion(hps : cardinal) : cardinal;  cdecl;                                            
+    function GpiQueryClipBox(hps : cardinal;prclBound : PRECTL) : longint; cdecl;                             
+    function GpiExcludeClipRectangle(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl;                 
+    function GpiIntersectClipRectangle(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl;               
+    function GpiOffsetClipRegion(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl;                        
+    function GpiCopyMetaFile(hmf : cardinal) : cardinal; cdecl;                       
+    function GpiDeleteMetaFile(hmf : cardinal) : longbool; cdecl;                    
+    function GpiLoadMetaFile(hab : cardinal;pszFilename : pchar) : cardinal; cdecl;     
+    function GpiPlayMetaFile(hps,hmf : cardinal;lCount1 : longint;alOptarray,plSegCount : plongint;lCount2 : longint;pszDesc : pchar) : longint;  cdecl;  
+    function GpiQueryMetaFileBits(hmf : cardinal;lOffset,lLength : longint;pbData : PBYTE) : longbool;  cdecl;                                            
+    function GpiQueryMetaFileLength(hmf : cardinal) : longint;  cdecl;                                                                                       
+    function GpiSaveMetaFile(hmf : cardinal;pszFilename : pchar) : longbool; cdecl;                                                                             
+    function GpiSetMetaFileBits(hmf : cardinal;lOffset,lLength : longint;pbBuffer : PBYTE) : longbool; cdecl;                                             
+    function GpiQueryDefArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl;                                                              
+    function GpiQueryDefAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longbool; cdecl;                                     
+    function GpiQueryDefTag(hps : cardinal;plTag : plongint) : longbool; cdecl;                                                                                  
+    function GpiQueryDefViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl;                                                                  
+    function GpiSetDefArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl;                                                                
+    function GpiSetDefAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longbool;cdecl;                                        
+    function GpiSetDefTag(hps : cardinal;lTag : longint) : longbool; cdecl;                                                                                      
+    function GpiSetDefViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl;                                          
+    function GpiPolygons(hps,ulCount : cardinal;paplgn : PPOLYGON;flOptions,flModel : cardinal) : longint; cdecl;
+
+  implementation
+
+    function GpiCreatePS(hab,hdc : cardinal;psizlSize : PSIZEL;flOptions : cardinal) : cardinal;cdecl;external;
+    function GpiDestroyPS(hps : cardinal) : longbool;cdecl;external;
+    function GpiAssociate(hps,hdc : cardinal) : longbool;cdecl;external;
+    function GpiRestorePS(hps : cardinal;lPSid : longint) : longbool;cdecl;external;
+    function GpiSavePS(hps : cardinal) : longint;cdecl;external;
+    function GpiErase(hps : cardinal) : longbool;cdecl;external;
+    function GpiQueryDevice(hps : cardinal) : cardinal;cdecl;external;
+    function GpiResetPS(hps,flOptions : cardinal) : longbool;cdecl;external;
+    function GpiSetPS(hps : cardinal;psizlsize : PSIZEL;flOptions : cardinal) : longbool;cdecl;external;
+    function GpiQueryPS(hps : cardinal;psizlSize : PSIZEL) : cardinal;cdecl;external;
+    function GpiErrorSegmentData(hps : cardinal;plSegment,plContext : plongint) : longint;cdecl;external;
+    function GpiQueryDrawControl(hps : cardinal;lControl : longint) : longint;cdecl;external;
+    function GpiSetDrawControl(hps : cardinal;lControl,lValue : longint) : longbool;cdecl;external;
+    function GpiQueryDrawingMode(hps : cardinal) : longint;cdecl;external;
+    function GpiSetDrawingMode(hps : cardinal;lMode : longint) : longbool;cdecl;external;
+    function GpiQueryStopDraw(hps : cardinal) : longint;cdecl; external;
+    function GpiSetStopDraw(hps : cardinal;lValue : longint) : longbool; cdecl; external;
+    function GpiCorrelateChain(hps : cardinal;lType : longint;pptlPick : PPOINTL;lMaxHits : longint;lMaxDepth : longint;pl2 : plongint) : longint; cdecl; external;
+    function GpiQueryTag(hps : cardinal;plTag : plongint) : longbool; cdecl; external;
+    function GpiSetTag(hps : cardinal;lTag : longint) : longbool; cdecl; external;
+    function GpiQueryPickApertureSize(hps : cardinal;psizlSize : PSIZEL) : longbool; cdecl; external;
+    function GpiSetPickApertureSize(hps : cardinal;lOptions : longint;psizlSize : PSIZEL) : longbool; cdecl; external;
+    function GpiQueryPickAperturePosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiSetPickAperturePosition(hps : cardinal;pptlPick : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryBoundaryData(hps : cardinal;prclBoundary : PRECTL) : longbool; cdecl; external;
+    function GpiResetBoundaryData(hps : cardinal) : longbool; cdecl; external;
+    function GpiCorrelateFrom(hps : cardinal;lFirstSegment,lLastSegment,lType : longint;pptlPick : PPOINTL;lMaxHits,lMaxDepth : longint;plSegTag : plongint) : longint; cdecl; external;
+    function GpiCorrelateSegment(hps : cardinal;lSegment,lType : longint;pptlPick : PPOINTL;lMaxHits,lMaxDepth : longint;alSegTag : plongint) : longint; cdecl; external;
+    function GpiOpenSegment(hps : cardinal;lSegment : longint) : longbool; cdecl; external;
+    function GpiCloseSegment(hps : cardinal) : longbool; cdecl; external;
+    function GpiDeleteSegment(hps : cardinal;lSegid : longint) : longbool; cdecl; external;
+    function GpiQueryInitialSegmentAttrs(hps : cardinal;lAttribute : longint) : longint; cdecl; external;
+    function GpiSetInitialSegmentAttrs(hps : cardinal;lAttribute,lValue : longint) : longbool; cdecl; external;
+    function GpiQuerySegmentAttrs(hps : cardinal;lSegid,lAttribute : longint) : longint; cdecl; external;
+    function GpiSetSegmentAttrs(hps : cardinal;lSegid,lAttribute,lValue : longint) : longbool; cdecl; external;
+    function GpiQuerySegmentPriority(hps : cardinal;lRefSegid,lOrder : longint) : longint; cdecl; external;
+    function GpiSetSegmentPriority(hps : cardinal;lSegid,lRefSegid,lOrder : longint) : longbool; cdecl; external;
+    function GpiDeleteSegments(hps : cardinal;lFirstSegment,lLastSegment : longint) : longbool; cdecl; external;
+    function GpiQuerySegmentNames(hps : cardinal;lFirstSegid,lLastSegid,lMax : longint;alSegids : plongint) : longint; cdecl; external;
+    function GpiGetData(hps : cardinal;lSegid : longint;plOffset : plongint;lFormat,lLength : longint;pbData : PBYTE) : longint; cdecl; external;
+    function GpiPutData(hps : cardinal;lFormat : longint;plCount : plongint;pbData : PBYTE) : longint; cdecl; external;
+    function GpiDrawChain(hps : cardinal) : longbool; cdecl; external;
+    function GpiDrawFrom(hps : cardinal;lFirstSegment,lLastSegment : longint) : longbool; cdecl; external;
+    function GpiDrawSegment(hps : cardinal;lSegment : longint) : longbool; cdecl; external;
+    function GpiDrawDynamics(hps : cardinal) : longbool; cdecl; external;
+    function GpiRemoveDynamics(hps : cardinal;lFirstSegid,lLastSegid : longint) : longbool; cdecl; external;
+    function GpiBeginElement(hps : cardinal;lType : longint;pszDesc : pchar) : longbool; cdecl; external;
+    function GpiEndElement(hps : cardinal) : longbool; cdecl; external;
+    function GpiLabel(hps : cardinal;lLabel : longint) : longbool; cdecl; external;
+    function GpiElement(hps : cardinal;lType : longint;pszDesc : pchar;lLength : longint;pbData : PBYTE) : longint; cdecl; external;
+    function GpiQueryElement(hps : cardinal;lOff,lMaxLength : longint;pbData : PBYTE) : longint; cdecl; external;
+    function GpiDeleteElement(hps : cardinal) : longbool; cdecl; external;
+    function GpiDeleteElementRange(hps : cardinal;lFirstElement,lLastElement : longint) : longbool; cdecl; external;
+    function GpiDeleteElementsBetweenLabels(hps : cardinal;lFirstLabel,lLastLabel : longint) : longbool; cdecl; external;
+    function GpiQueryEditMode(hps : cardinal) : longint; cdecl; external;
+    function GpiSetEditMode(hps : cardinal;lMode : longint) : longbool; cdecl; external;
+    function GpiQueryElementPointer(hps : cardinal) : longint; cdecl; external;
+    function GpiSetElementPointer(hps : cardinal;lElement : longint) : longbool; cdecl; external;
+    function GpiOffsetElementPointer(hps : cardinal;loffset : longint) : longbool; cdecl; external;
+    function GpiQueryElementType(hps : cardinal;plType : plongint;lLength : longint;pszData : pchar) : longint; cdecl; external;
+    function GpiSetElementPointerAtLabel(hps : cardinal;lLabel : longint) : longbool; cdecl; external;
+    function GpiQuerySegmentTransformMatrix(hps : cardinal;lSegid,lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; external;
+    function GpiSetSegmentTransformMatrix(hps : cardinal;lSegid,lCount : longint;pmatlfarray : PMATRIXLF;lOptions : longint) : longbool; cdecl; external;
+    function GpiConvert(hps : cardinal;lSrc,lTarg,lCount : longint;aptlPoints : PPOINTL) : longbool; cdecl; external;
+    function GpiConvertWithMatrix(hps : cardinal;lCountp : longint;aptlPoints : PPOINTL;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; external;
+    function GpiQueryModelTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; external;
+    function GpiSetModelTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longbool; cdecl; external;
+    function GpiCallSegmentMatrix(hps : cardinal;lSegment,lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longint; cdecl; external;
+    function GpiQueryDefaultViewMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; external;
+    function GpiSetDefaultViewMatrix(hps : cardinal;lCount : longint;pmatlfarray : PMATRIXLF;lOptions : longint) : longbool; cdecl; external;
+    function GpiQueryPageViewport(hps : cardinal;prclViewport : PRECTL) : longbool; cdecl; external;
+    function GpiSetPageViewport(hps : cardinal;prclViewport : PRECTL) : longbool; cdecl; external;
+    function GpiQueryViewingTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF) : longbool; cdecl; external;
+    function GpiSetViewingTransformMatrix(hps : cardinal;lCount : longint;pmatlfArray : PMATRIXLF;lOptions : longint) : longbool; cdecl; external;
+    function GpiTranslate(hps : cardinal;pmatrixlf : PMATRIXLF;long : longint;ppointl : PPOINTL) : longbool; cdecl; external;
+    function GpiScale(hps : cardinal;p1 : PMATRIXLF;p2 : longint;p3 : plongint;p4 : PPOINTL) : longbool; cdecl; external;
+    function GpiRotate(p1 : cardinal;p2 : PMATRIXLF;p3,p4 : longint;p5 : PPOINTL) : longbool; cdecl; external;
+    function GpiSetGraphicsField(hps : cardinal;prclField : PRECTL) : longbool; cdecl; external;
+    function GpiQueryGraphicsField(hps : cardinal;prclField : PRECTL) : longbool; cdecl; external;
+    function GpiSetViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl; external;
+    function GpiQueryViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl; external;
+    function GpiBeginPath(hps : cardinal;lPath : longint) : longbool; cdecl; external;
+    function GpiEndPath(hps : cardinal) : longbool; cdecl; external;
+    function GpiCloseFigure(hps : cardinal) : longbool; cdecl; external;
+    function GpiModifyPath(hps : cardinal;lPath,lMode : longint) : longbool; cdecl; external;
+    function GpiFillPath(hps : cardinal;lPath,lOptions : longint) : longint; cdecl; external;
+    function GpiSetClipPath(hps : cardinal;lPath,lOptions : longint) : longbool; cdecl; external;
+    function GpiOutlinePath(hps : cardinal;lPath,lOptions : longint) : longint; cdecl; external;
+    function GpiPathToRegion(GpiH : cardinal;lPath,lOptions : longint) : cardinal; cdecl; external;
+    function GpiStrokePath(hps : cardinal;lPath : longint;flOptions : cardinal) : longint; cdecl; external;
+    function GpiCreateLogColorTable(hps,flOptions : cardinal;lFormat,lStart,lCount : longint;alTable : plongint) : longbool; cdecl; external;
+    function GpiQueryColorData(hps : cardinal;lCount : longint;alArray : plongint) : longbool; cdecl; external;
+    function GpiQueryLogColorTable(hps,flOptions : cardinal;lStart,lCount : longint;alArray : plongint) : longint; cdecl; external;
+    function GpiQueryRealColors(hps,flOptions : cardinal;lStart,lCount : longint;alColors : plongint) : longint; cdecl; external;
+    function GpiQueryNearestColor(hps,flOptions : cardinal;lRgbIn : longint) : longint; cdecl; external;
+    function GpiQueryColorIndex(hps,flOptions : cardinal;lRgbColor : longint) : longint; cdecl; external;
+    function GpiQueryRGBColor(hps,flOptions : cardinal;lColorIndex : longint) : longint; cdecl; external;
+    function GpiCreatePalette(hab,flOptions,ulFormat,ulCount : cardinal;aulTable : pcardinal) : cardinal; cdecl; external;
+    function GpiDeletePalette(hpal : cardinal) : longbool; cdecl; external;
+    function GpiSelectPalette(hps,hpal : cardinal) : cardinal; cdecl; external;
+    function GpiAnimatePalette(hpal,ulFormat,ulStart,ulCount : cardinal;aulTable : pcardinal) : longint; cdecl; external;
+    function GpiSetPaletteEntries(hpal,ulFormat,ulStart,ulCount : cardinal;aulTable : pcardinal) : longbool; cdecl; external;
+    function GpiQueryPalette(hps : cardinal) : cardinal; cdecl; external;
+    function GpiQueryPaletteInfo(hpal,hps,flOptions,ulStart,ulCount : cardinal;aulArray : pcardinal) : longint; cdecl; external;
+    function GpiSetColor(hps : cardinal;lColor : longint) : longbool; cdecl; external;
+    function GpiQueryColor(hps : cardinal) : longint; cdecl; external;
+    function GpiBox(hps : cardinal;lControl : longint;pptlPoint : PPOINTL;lHRound,lVRound : longint) : longint; cdecl; external;
+    function GpiMove(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiLine(hps : cardinal;pptlEndPoint : PPOINTL) : longint; cdecl; external;
+    function GpiPolyLine(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl; external;
+    function GpiPolyLineDisjoint(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl; external;
+    function GpiSetPattern(hps : cardinal;lPatternSymbol : longint) : longbool; cdecl; external;
+    function GpiQueryPattern(hps : cardinal) : longint; cdecl; external;
+    function GpiBeginArea(hps,flOptions : cardinal) : longbool; cdecl; external;
+    function GpiEndArea(hps : cardinal) : longint; cdecl; external;
+    function GpiCharString(hps : cardinal;lCount : longint;pchString : pshortint) : longint; cdecl; external;
+    function GpiCharStringAt(hps : cardinal;pptlPoint : PPOINTL;lCount : longint;pchString : pshortint) : longint; cdecl; external;
+    function GpiSetAttrMode(hps : cardinal;lMode : longint) : longbool; cdecl; external;
+    function GpiQueryAttrMode(hps : cardinal) : longint; cdecl; external;
+    function GpiSetAttrs(hps : cardinal;lPrimType : longint;flAttrMask,flDefMask : cardinal;ppbunAttrs : pointer) : longbool; cdecl; external;
+    function GpiQueryAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longint; cdecl; external;
+    function GpiSetBackColor(hps : cardinal;lColor : longint) : longbool; cdecl; external;
+    function GpiQueryBackColor(hps : cardinal) : longint; cdecl; external;
+    function GpiSetMix(hps : cardinal;lMixMode : longint) : longbool; cdecl; external;
+    function GpiQueryMix(hps : cardinal) : longint; cdecl; external;
+    function GpiSetBackMix(hps : cardinal;lMixMode : longint) : longbool; cdecl; external;
+    
+    function GpiQueryBackMix(hps : cardinal) : longint; cdecl; external;
+    function GpiSetLineType(hps : cardinal;lLineType : longint) : longbool; cdecl; external;
+    function GpiQueryLineType(hps : cardinal) : longint; cdecl; external;
+    function GpiSetLineWidth(hps : cardinal;fxLineWidth : longint) : longbool; cdecl; external;
+    function GpiQueryLineWidth(hps : cardinal) : longint; cdecl; external;
+    function GpiSetLineWidthGeom(hps : cardinal;lLineWidth : longint) : longbool; cdecl; external;
+    function GpiQueryLineWidthGeom(hps : cardinal) : longint; cdecl; external;
+    function GpiSetLineEnd(hps : cardinal;lLineEnd : longint) : longbool; cdecl; external;
+    function GpiQueryLineEnd(hps : cardinal) : longint; cdecl; external;
+    function GpiSetLineJoin(hps : cardinal;lLineJoin : longint) : longbool; cdecl; external;
+    function GpiQueryLineJoin(hps : cardinal) : longint; cdecl; external;
+    function GpiSetCurrentPosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryCurrentPosition(hps : cardinal;pptlPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiSetArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl; external;
+    function GpiQueryArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl; external;
+    function GpiPointArc(hps : cardinal;pptl2 : PPOINTL) : longint; cdecl; external;
+    function GpiFullArc(hps : cardinal;lControl,fxMultiplier : longint) : longint; cdecl; external;
+    function GpiPartialArc(hps : cardinal;pptlCenter : PPOINTL;fxMultiplier,fxStartAngle,fxSweepAngle : longint) : longint; cdecl; external;
+    function GpiPolyFillet(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl; external;
+    function GpiPolySpline(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl; external;
+    function GpiPolyFilletSharp(hps : cardinal;lCount : longint;aptlPoints : PPOINTL;afxPoints : plongint) : longint; cdecl; external;
+    function GpiSetPatternSet(hps : cardinal;lSet : longint) : longbool; cdecl; external;
+    function GpiQueryPatternSet(hps : cardinal) : longint; cdecl; external;
+    function GpiSetPatternRefPoint(hps : cardinal;pptlRefPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryPatternRefPoint(hps : cardinal;pptlRefPoint : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryCharStringPos(hps,flOptions : cardinal;lCount : longint;pchString : pshortint;alXincrements : plongint;aptlPositions : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryCharStringPosAt(hps : cardinal;pptlStart : PPOINTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alXincrements : plongint;aptlPositions : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryTextBox(hps : cardinal;lCount1 : longint;pchString : pshortint;lCount2 : longint;aptlPoints : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryDefCharBox(hps : cardinal;psizlSize : PSIZEL) : longbool; cdecl; external;
+    function GpiSetCharSet(hps : cardinal;llcid : longint) : longbool; cdecl; external;
+    function GpiQueryCharSet(hps : cardinal) : longint; cdecl; external;
+    function GpiSetCharBox(hps : cardinal;psizfxBox : PSIZEF) : longbool; cdecl; external;
+    function GpiQueryCharBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl; external;
+    function GpiSetCharAngle(hps : cardinal;pgradlAngle : PGRADIENTL) : longbool; cdecl; external;
+    function GpiQueryCharAngle(hps : cardinal;pgradlAngle : PGRADIENTL) : longbool; cdecl; external;
+    function GpiSetCharShear(hps : cardinal;pptlAngle : PPOINTL) : longbool; cdecl; external;
+    function GpiQueryCharShear(hps : cardinal;pptlShear : PPOINTL) : longbool; cdecl; external;
+    function GpiSetCharDirection(hps : cardinal;lDirection : longint) : longbool; cdecl; external;
+    function GpiQueryCharDirection(hps : cardinal) : longint; cdecl; external;
+    function GpiSetCharMode(hps : cardinal;lMode : longint) : longbool; cdecl; external;
+    function GpiQueryCharMode(hps : cardinal) : longint; cdecl; external;
+    function GpiSetTextAlignment(hps : cardinal;lHoriz,lVert : longint) : longbool; cdecl; external;
+    function GpiQueryTextAlignment(hps : cardinal;plHoriz,plVert : plongint) : longbool; cdecl; external;
+    function GpiCharStringPos(hps : cardinal;prclRect : PRECTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alAdx : plongint) : longint; cdecl; external;
+    function GpiCharStringPosAt(hps : cardinal;pptlStart : PPOINTL;prclRect : PRECTL;flOptions : cardinal;lCount : longint;pchString : pshortint;alAdx : plongint) : longint; cdecl; external;
+    function GpiSetCharExtra(hps : cardinal;Extra : longint) : longbool; cdecl; external;
+    function GpiSetCharBreakExtra(hps : cardinal;BreakExtra : longint) : longbool; cdecl; external;
+    function GpiQueryCharExtra(hps : cardinal;Extra : plongint) : longbool; cdecl; external;
+    function GpiQueryCharBreakExtra(hps : cardinal;BreakExtra : plongint) : longbool; cdecl; external;
+    function GpiMarker(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiPolyMarker(hps : cardinal;lCount : longint;aptlPoints : PPOINTL) : longint; cdecl; external;
+    function GpiSetMarker(hps : cardinal;lSymbol : longint) : longbool; cdecl; external;
+    function GpiSetMarkerBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl; external;
+    function GpiSetMarkerSet(hps : cardinal;lSet : longint) : longbool; cdecl; external;
+    function GpiQueryMarker(hps : cardinal) : longint; cdecl; external;
+    function GpiQueryMarkerBox(hps : cardinal;psizfxSize : PSIZEF) : longbool; cdecl; external;
+    function GpiQueryMarkerSet(hps : cardinal) : longint; cdecl; external;
+    function GpiImage(hps : cardinal;lFormat : longint;psizlImageSize : PSIZEL;lLength : longint;pbData : PBYTE) : longint; cdecl; external;
+    function GpiPop(hps : cardinal;lCount : longint) : longbool; cdecl; external;
+    function GpiPtVisible(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiRectVisible(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl; external;
+    function GpiComment(hps : cardinal;lLength : longint;pbData : PBYTE) : longbool; cdecl; external;
+    function GpiCreateLogFont(hps : cardinal;pName : PSTR8;lLcid : longint;pfatAttrs : PFATTRS) : longint; cdecl; external;
+    function GpiDeleteSetId(hps : cardinal;lLcid : longint) : longbool; cdecl; external;
+    function GpiLoadFonts(hab : cardinal;pszFilename : pchar) : longbool; cdecl; external;
+    function GpiUnloadFonts(hab : cardinal;pszFilename : pchar) : longbool; cdecl; external;
+    function GpiQueryFonts(hps,flOptions : cardinal;pszFacename : pchar;plReqFonts : plongint;lMetricsLength : longint;afmMetrics : PFONTMETRICS) : longint; cdecl; external;
+    function GpiQueryFontMetrics(hps : cardinal;lMetricsLength : longint;pfmMetrics : PFONTMETRICS) : longbool; cdecl; external;
+    function GpiQueryKerningPairs(hps : cardinal;lCount : longint;akrnprData : PKERNINGPAIRS) : longint; cdecl; external;
+    function GpiQueryWidthTable(hps : cardinal;lFirstChar,lCount : longint;alData : plongint) : longbool; cdecl; external;
+    function GpiQueryNumberSetIds(hps : cardinal) : longint; cdecl; external;
+    function GpiQuerySetIds(hps : cardinal;lCount : longint;alTypes : plongint;aNames : PSTR8;allcids : plongint) : longbool; cdecl; external;
+    function GpiQueryFaceString(PS : cardinal;FamilyName : pchar;attrs : PFACENAMEDESC;length : longint;CompoundFaceName : pchar) : cardinal; cdecl; external;
+    function GpiQueryLogicalFont(PS : cardinal;lcid : longint;name : PSTR8;attrs : PFATTRS;length : longint) : longbool; cdecl; external;
+    function GpiQueryFontAction(anchor,options : cardinal) : cardinal; cdecl; external;
+    function GpiLoadPublicFonts(p1 : cardinal;p2 : pchar) : longbool; cdecl; external;
+    function GpiUnloadPublicFonts(p1 : cardinal;p2 : pchar) : longbool; cdecl; external;
+    function GpiSetCp(hps,ulCodePage : cardinal) : longbool; cdecl; external;
+    function GpiQueryCp(hps : cardinal) : cardinal; cdecl; external;
+    function GpiQueryFontFileDescriptions(hab : cardinal;pszFilename : pchar;plCount : plongint;affdescsNames : PFFDESCS) : longint; cdecl; external;
+    function GpiQueryFullFontFileDescs(hab : cardinal;pszFilename : pchar;plCount : plongint;pNames : pointer;plNamesBuffLength : plongint) : longint; cdecl; external;
+    function GpiBitBlt(hpsTarget,hpsSource : cardinal;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external;
+    function GpiDeleteBitmap(hbm : cardinal) : longbool; cdecl; external;
+    function GpiLoadBitmap(hps,Resource,idBitmap:cardinal;lWidth,lHeight : longint) : cardinal; cdecl; external;
+    function GpiSetBitmap(hps,hbm : cardinal) : cardinal; cdecl; external;
+    function GpiWCBitBlt(hpsTarget,hbmSource : cardinal;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external;
+    function GpiCreateBitmap(hps : cardinal;pbmpNew : PBITMAPINFOHEADER2;flOptions : cardinal;pbInitData : PBYTE;pbmiInfoTable : PBITMAPINFO2) : cardinal; cdecl; external;
+    function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : longint; cdecl; external;
+    function GpiSetBitmapDimension(hbm : cardinal;psizlBitmapDimension : PSIZEL) : longbool; cdecl; external;
+    function GpiSetBitmapId(hps,hbm : cardinal;lLcid : longint) : longbool; cdecl; external;
+    function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;pbBuffer : PBYTE;pbmiInfoTable : PBITMAPINFO2) : longint; cdecl; external;
+    function GpiQueryBitmapDimension(hbm : cardinal;psizlBitmapDimension : PSIZEL) : longbool; cdecl; external;
+    function GpiQueryBitmapHandle(hps : cardinal;lLcid : longint) : cardinal; cdecl; external;
+    function GpiQueryBitmapParameters(hbm : cardinal;pbmpData : PBITMAPINFOHEADER) : longbool; cdecl; external;
+    function GpiQueryBitmapInfoHeader(hbm : cardinal;pbmpData : PBITMAPINFOHEADER2) : longbool; cdecl; external;
+    function GpiQueryDeviceBitmapFormats(hps : cardinal;lCount : longint;alArray : plongint) : longbool; cdecl; external;
+    function GpiSetPel(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiQueryPel(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiFloodFill(hps : cardinal;lOptions,lColor : longint) : longint; cdecl; external;
+    function GpiDrawBits(hps : cardinal;pBits : pointer;pbmiInfoTable : PBITMAPINFO2;lCount : longint;aptlPoints : PPOINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external;
+    function GpiCombineRegion(hps,hrgnDest,hrgnSrc1,hrgnSrc2 : cardinal;lMode : longint) : longint; cdecl; external;
+    function GpiCreateRegion(hps : cardinal;lCount : longint;arclRectangles : PRECTL) : cardinal; cdecl; external;
+    function GpiDestroyRegion(hps,hrgn : cardinal) : longbool; cdecl; external;
+    function GpiEqualRegion(hps,hrgnSrc1,hrgnSrc2 : cardinal) : longint; cdecl; external;
+    function GpiOffsetRegion(hps,Hrgn : cardinal;pptlOffset : PPOINTL) : longbool; cdecl; external;
+    function GpiPaintRegion(hps,hrgn : cardinal) : longint; cdecl; external;
+    function GpiFrameRegion(hps,hrgn : cardinal;thickness : PSIZEL) : longint; cdecl; external;
+    function GpiPtInRegion(hps,hrgn : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiQueryRegionBox(hps,hrgn : cardinal;prclBound : PRECTL) : longint; cdecl; external;
+    function GpiQueryRegionRects(hps,hrgn : cardinal;prclBound : PRECTL;prgnrcControl : PRGNRECT;prclRect : PRECTL) : longbool; cdecl; external;
+    function GpiRectInRegion(hps,hrgn : cardinal;prclRect : PRECTL) : longint; cdecl; external;
+    function GpiSetRegion(hps,hrgn : cardinal;lcount : longint;arclRectangles : PRECTL) : longbool; cdecl; external;
+    function GpiSetClipRegion(hps,hrgn : cardinal;phrgnOld : pcardinal) : longint; cdecl; external;
+    function GpiQueryClipRegion(hps : cardinal) : cardinal; cdecl; external;
+    function GpiQueryClipBox(hps : cardinal;prclBound : PRECTL) : longint; cdecl; external;
+    function GpiExcludeClipRectangle(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl; external;
+    function GpiIntersectClipRectangle(hps : cardinal;prclRectangle : PRECTL) : longint; cdecl; external;
+    function GpiOffsetClipRegion(hps : cardinal;pptlPoint : PPOINTL) : longint; cdecl; external;
+    function GpiCopyMetaFile(hmf : cardinal) : cardinal; cdecl; external;
+    function GpiDeleteMetaFile(hmf : cardinal) : longbool; cdecl; external;
+    function GpiLoadMetaFile(hab : cardinal;pszFilename : pchar) : cardinal; cdecl; external;
+    function GpiPlayMetaFile(hps,hmf : cardinal;lCount1 : longint;alOptarray,plSegCount : plongint;lCount2 : longint;pszDesc : pchar) : longint; cdecl; external;
+    function GpiQueryMetaFileBits(hmf : cardinal;lOffset,lLength : longint;pbData : PBYTE) : longbool; cdecl; external;
+    function GpiQueryMetaFileLength(hmf : cardinal) : longint; cdecl; external;
+    function GpiSaveMetaFile(hmf : cardinal;pszFilename : pchar) : longbool; cdecl; external;
+    function GpiSetMetaFileBits(hmf : cardinal;lOffset,lLength : longint;pbBuffer : PBYTE) : longbool; cdecl; external;
+    function GpiQueryDefArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl; external;
+    function GpiQueryDefAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longbool; cdecl; external;
+    function GpiQueryDefTag(hps : cardinal;plTag : plongint) : longbool; cdecl; external;
+    function GpiQueryDefViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl; external;
+    function GpiSetDefArcParams(hps : cardinal;parcpArcParams : PARCPARAMS) : longbool; cdecl; external;
+    function GpiSetDefAttrs(hps : cardinal;lPrimType : longint;flAttrMask : cardinal;ppbunAttrs : pointer) : longbool; cdecl; external;
+    function GpiSetDefTag(hps : cardinal;lTag : longint) : longbool; cdecl; external;
+    function GpiSetDefViewingLimits(hps : cardinal;prclLimits : PRECTL) : longbool; cdecl; external;
+    function GpiPolygons(hps,ulCount : cardinal;paplgn : PPOLYGON;flOptions,flModel : cardinal) : longint; cdecl; external;
+
+end.
+

+ 278 - 276
rtl/os2/pmwin.pas

@@ -39,8 +39,8 @@ unit pmwin;
           y : longint;
           x : longint;
           flStyle : cardinal;
-          pszText : pshortint;
-          pszClass : pshortint;
+          pszText : pchar;
+          pszClass : pchar;
           hwndParent : cardinal;
        end;
        PCREATESTRUCT = ^CREATESTRUCT;
@@ -71,7 +71,7 @@ unit pmwin;
        WNDPARAMS = record
           fsStatus : cardinal;
           cchText : cardinal;
-          pszText : pshortint;
+          pszText : pchar;
           cbPresParams : cardinal;
           pPresParams : pointer;
           cbCtlData : cardinal;
@@ -169,8 +169,8 @@ unit pmwin;
        PCONVCONTEXT = ^CONVCONTEXT;
        DDEINIT = record
           cb : cardinal;
-          pszAppName : pshortint;
-          pszTopic : pshortint;
+          pszAppName : pchar;
+          pszTopic : pchar;
           offConvContext : cardinal;
        end;
        PDDEINIT = ^DDEINIT;
@@ -1586,7 +1586,7 @@ const
        WM_DBCSFIRST = $00b0;
        WM_DBCSLAST = $00cf;
 
-    function WinRegisterClass(hab : cardinal;pszClassName : pshortint;pfnWndProc : ppointer;flStyle,cbWindowData : cardinal) : longbool; cdecl;
+    function WinRegisterClass(hab : cardinal;pszClassName : pchar;pfnWndProc : ppointer;flStyle,cbWindowData : cardinal) : longbool; cdecl;
     function WinDefWindowProc(hwnd,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;
     function WinDestroyWindow(hwnd : cardinal) : longbool; cdecl;
     function WinShowWindow(hwnd : cardinal;fShow : longbool) : longbool;  cdecl;
@@ -1604,13 +1604,13 @@ const
     function WinInitialize(flOptions : cardinal) : cardinal; cdecl;
     function WinTerminate(hab : cardinal) : longbool; cdecl;      
     function WinQueryAnchorBlock(hwnd : cardinal) : cardinal; cdecl;
-    function WinCreateWindow(hwndParent : cardinal;pszClass,pszName : pshortint;flStyle : cardinal;x,y,cx,cy : longint;hwndOwner,hwndInsertBehind,id : cardinal;pCtlData,pPresParams : pointer) : cardinal; cdecl;
+    function WinCreateWindow(hwndParent : cardinal;pszClass,pszName : pchar;flStyle : cardinal;x,y,cx,cy : longint;hwndOwner,hwndInsertBehind,id : cardinal;pCtlData,pPresParams : pointer) : cardinal; cdecl;
     function WinEnableWindow(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;
     function WinIsWindowEnabled(hwnd : cardinal) : longbool; cdecl;
     function WinEnableWindowUpdate(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;
     function WinIsWindowVisible(hwnd : cardinal) : longbool; cdecl;
     function WinQueryWindowText(hwnd : cardinal;cchBufferMax : longint;pchBuffer : pshortint) : longint; cdecl;                                                                 
-    function WinSetWindowText(hwnd : cardinal;pszText : pshortint) : longbool; cdecl;
+    function WinSetWindowText(hwnd : cardinal;pszText : pchar) : longbool; cdecl;
     function WinQueryWindowTextLength(hwnd : cardinal) : longint; cdecl;
     function WinWindowFromID(hwndParent,id : cardinal) : cardinal; cdecl;
     function WinIsWindow(hab,hwnd : cardinal) : longbool; cdecl;
@@ -1632,12 +1632,12 @@ const
     function WinDrawBitmap(hpsDst,hbm : cardinal;pwrcSrc : PRECTL;pptlDst : PPOINTL;clrFore : longint;clrBack : longint;fl : cardinal) : longbool; cdecl;
     function WinDrawText(hps : cardinal;cchText : longint;lpchText : pshortint;prcl : PRECTL;clrFore,clrBack : longint;flCmd : cardinal) : longint; cdecl;
     function WinDrawBorder(hps : cardinal;prcl : PRECTL;cx,cy : longint;clrFore,clrBack : longint;flCmd : cardinal) : longbool; cdecl;
-    function WinLoadString(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pshortint) : longint; cdecl;
-    function WinLoadMessage(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pshortint) : longint; cdecl;
+    function WinLoadString(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pchar) : longint; cdecl;
+    function WinLoadMessage(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pchar) : longint; cdecl;
     function WinSetActiveWindow(hwndDesktop,hwnd : cardinal) : longbool; cdecl;
     function WinSubclassWindow(hwnd : cardinal;pfnwp : ppointer) : ppointer; cdecl;
     function WinQueryClassName(hwnd : cardinal;cchMax : longint;pch : pshortint) : longint; cdecl;
-    function WinQueryClassInfo(hab : cardinal;pszClassName : pshortint;pClassInfo : PCLASSINFO) : longbool; cdecl;
+    function WinQueryClassInfo(hab : cardinal;pszClassName : pchar;pClassInfo : PCLASSINFO) : longbool; cdecl;
     function WinQueryActiveWindow(hwndDesktop : cardinal) : cardinal; cdecl;
     function WinIsThreadActive(hab : cardinal) : longbool; cdecl;
     function WinQuerySysModalWindow(hwndDesktop : cardinal) : cardinal; cdecl;
@@ -1675,7 +1675,7 @@ const
     function WinPostMsg(hwnd,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;
     function WinRegisterUserMsg(hab,msgid : cardinal;datatype1,dir1,datatype2,dir2,datatyper : longint) : longbool; cdecl;
     function WinRegisterUserDatatype(hab : cardinal;datatype,count : longint;types : Plongint) : longbool; cdecl;
-    function WinSetMsgMode(hab : cardinal;classname : pshortint;control : longint) : longbool; cdecl;                      
+    function WinSetMsgMode(hab : cardinal;classname : pchar;control : longint) : longbool; cdecl;                      
     function WinSetSynchroMode(hab : cardinal;mode : longint) : longbool;  cdecl;                        
     function WinInSendMsg(hab : cardinal) : longbool; cdecl; 
     function WinBroadcastMsg(hwnd,msg : cardinal;mp1,mp2 : pointer;rgf : cardinal) : longbool; cdecl;
@@ -1688,7 +1688,7 @@ const
     function WinWaitMuxWaitSem(hmux,ulTimeout:cardinal;pulUser : pcardinal) : cardinal; cdecl;   
     function WinPostQueueMsg(hmq,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;  
     function WinSetMsgInterest(hwnd,msg_class : cardinal;control : longint) : longbool; cdecl;
-    function WinSetClassMsgInterest(hab : cardinal;pszClassName : pshortint;msg_class : cardinal;control : longint) : longbool; cdecl;     
+    function WinSetClassMsgInterest(hab : cardinal;pszClassName : pchar;msg_class : cardinal;control : longint) : longbool; cdecl;     
     function WinSetFocus(hwndDesktop,hwndSetFocus : cardinal) : longbool; cdecl;                                                
     function WinFocusChange(hwndDesktop,hwndSetFocus,flFocusChange : cardinal) : longbool; cdecl;                    
     function WinSetCapture(hwndDesktop,hwnd : cardinal) : longbool; cdecl; 
@@ -1705,24 +1705,24 @@ const
     function WinDismissDlg(hwndDlg,usResult : cardinal) : longbool; cdecl;  
     function WinQueryDlgItemShort(hwndDlg,idItem : cardinal;pResult : Pinteger;fSigned : longbool) : longbool; cdecl;  
     function WinSetDlgItemShort(hwndDlg,idItem : cardinal;usValue : word;fSigned : longbool) : longbool; cdecl;        
-    function WinSetDlgItemText(hwndDlg,idItem : cardinal;pszText : pshortint) : longbool; cdecl;
-    function WinQueryDlgItemText(hwndDlg,idItem : cardinal;cchBufferMax : longint;pchBuffer : pshortint) : cardinal; cdecl;       
+    function WinSetDlgItemText(hwndDlg,idItem : cardinal;pszText : pchar) : longbool; cdecl;
+    function WinQueryDlgItemText(hwndDlg,idItem : cardinal;cchBufferMax : longint;pchBuffer : pchar) : cardinal; cdecl;       
     function WinQueryDlgItemTextLength(hwndDlg,idItem : cardinal) : longint; cdecl;                                               
     function WinDefDlgProc(hwndDlg,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;                              
     function WinAlarm(hwndDesktop,rgfType : cardinal) : longbool; cdecl;
-    function WinMessageBox(hwndParent,hwndOwner : cardinal;pszText,pszCaption : pshortint;idWindow,flStyle : cardinal) : cardinal; cdecl;
+    function WinMessageBox(hwndParent,hwndOwner : cardinal;pszText,pszCaption : pchar;idWindow,flStyle : cardinal) : cardinal; cdecl;
     function WinProcessDlg(hwndDlg : cardinal) : cardinal; cdecl;
     function WinSendDlgItemMsg(hwndDlg,idItem,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;
     function WinMapDlgPoints(hwndDlg : cardinal;prgwptl : PPOINTL;cwpt : cardinal;fCalcWindowCoords : longbool) : longbool; cdecl;     
     function WinEnumDlgItem(hwndDlg,hwnd,code : cardinal) : cardinal; cdecl;                             
-    function WinSubstituteStrings(hwnd : cardinal;pszSrc : pshortint;cchDstMax : longint;pszDst : pshortint) : longint; cdecl;     
+    function WinSubstituteStrings(hwnd : cardinal;pszSrc : pchar;cchDstMax : longint;pszDst : pchar) : longint; cdecl;     
     function WinCreateDlg(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;pdlgt : PDLGTEMPLATE;pCreateParams : pointer) : cardinal; cdecl;
     function WinLoadMenu(hwndFrame,hmod,idMenu : cardinal) : cardinal; cdecl;
     function WinCreateMenu(hwndParent : cardinal;lpmt : pointer) : cardinal; cdecl; 
     function WinPopupMenu(hwndParent,hwndOwner,hwndMenu : cardinal;x,y,idItem : longint;fs : cardinal) : longbool; cdecl;
-    function WinCreateStdWindow(hwndParent,flStyle : cardinal;pflCreateFlags : pcardinal;pszClientClass,pszTitle : pshortint;styleClient,hmod,idResources : cardinal;phwndClient : pcardinal) : cardinal; cdecl;
+    function WinCreateStdWindow(hwndParent,flStyle : cardinal;pflCreateFlags : pcardinal;pszClientClass,pszTitle : pchar;styleClient,hmod,idResources : cardinal;phwndClient : pcardinal) : cardinal; cdecl;
     function WinFlashWindow(hwndFrame : cardinal;fFlash : longbool) : longbool; cdecl; 
-    function WinCreateFrameControls(hwndFrame : cardinal;pfcdata : PFRAMECDATA;pszTitle : pshortint) : longbool;  cdecl;    
+    function WinCreateFrameControls(hwndFrame : cardinal;pfcdata : PFRAMECDATA;pszTitle : pchar) : longbool;  cdecl;    
     function WinCalcFrameRect(hwndFrame : cardinal;prcl : PRECTL;fClient : longbool) : longbool; cdecl;                         
     function WinGetMinPosition(hwnd : cardinal;pswp : PSWP;pptl : PPOINTL) : longbool; cdecl;                               
     function WinGetMaxPosition(hwnd : cardinal;pswp : PSWP) : longbool; cdecl;                                              
@@ -1791,41 +1791,41 @@ const
     function WinSetHook(hab : cardinal;hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl;
     function WinReleaseHook(hab,hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl; 
     function WinCallMsgFilter(hab : cardinal;pqmsg : PQMSG;msgf : cardinal) : longbool; cdecl;         
-    function WinSetClassThunkProc(pszClassname : pshortint;pfnThunkProc : pointer) : longbool; cdecl;      
-    function WinQueryClassThunkProc(pszClassname : pshortint) : pointer; cdecl;                        
+    function WinSetClassThunkProc(pszClassname : pchar;pfnThunkProc : pointer) : longbool; cdecl;      
+    function WinQueryClassThunkProc(pszClassname : pchar) : pointer; cdecl;                        
     function WinSetWindowThunkProc(hwnd : cardinal;pfnThunkProc : pointer) : longbool; cdecl;              
     function WinQueryWindowThunkProc(hwnd : cardinal) : pointer; cdecl;                                
     function WinQueryWindowModel(hwnd : cardinal) : longint; cdecl;                                
     function WinQueryCp(hmq : cardinal) : cardinal; cdecl;                                         
     function WinSetCp(hmq,idCodePage : cardinal) : longbool; cdecl;                         
     function WinQueryCpList(hab,ccpMax : cardinal;prgcp : pcardinal) : cardinal; cdecl; 
-    function WinCpTranslateString(hab,cpSrc : cardinal;pszSrc : pshortint;cpDst,cchDestMax : cardinal;pchDest : pshortint) : longbool; cdecl; 
+    function WinCpTranslateString(hab,cpSrc : cardinal;pszSrc : pchar;cpDst,cchDestMax : cardinal;pchDest : pchar) : longbool; cdecl; 
     function WinCpTranslateChar(hab,cpSrc : cardinal;chSrc : byte;cpDst : cardinal) : byte; cdecl;                                                   
-    function WinUpper(hab,idcp,idcc : cardinal;psz : pshortint) : cardinal; cdecl;                                                        
+    function WinUpper(hab,idcp,idcc : cardinal;psz : pchar) : cardinal; cdecl;                                                        
     function WinUpperChar(hab,idcp,idcc,c : cardinal) : cardinal; cdecl;                                                       
-    function WinNextChar(hab,idcp,idcc : cardinal;psz : pshortint) : pshortint; cdecl;                                                    
-    function WinPrevChar(hab,idcp,idcc : cardinal;pszStart,psz : pshortint) : pshortint; cdecl;                               
-    function WinCompareStrings(hab,idcp,idcc : cardinal;psz1,psz2 : pshortint;reserved : cardinal) : cardinal; cdecl;         
+    function WinNextChar(hab,idcp,idcc : cardinal;psz : pchar) : pshortint; cdecl;                                                    
+    function WinPrevChar(hab,idcp,idcc : cardinal;pszStart,psz : pchar) : pshortint; cdecl;                               
+    function WinCompareStrings(hab,idcp,idcc : cardinal;psz1,psz2 : pchar;reserved : cardinal) : cardinal; cdecl;         
     function WinCreateAtomTable(cbInitial,cBuckets : cardinal) : cardinal; cdecl;         
     function WinDestroyAtomTable(hAtomTbl : cardinal) : cardinal; cdecl;                             
-    function WinAddAtom(hAtomTbl : cardinal;pszAtomName : pshortint) : cardinal; cdecl;              
-    function WinFindAtom(hAtomTbl : cardinal;pszAtomName : pshortint) : cardinal; cdecl;             
+    function WinAddAtom(hAtomTbl : cardinal;pszAtomName : pchar) : cardinal; cdecl;              
+    function WinFindAtom(hAtomTbl : cardinal;pszAtomName : pchar) : cardinal; cdecl;             
     function WinDeleteAtom(hAtomTbl,atom : cardinal) : cardinal; cdecl;                   
     function WinQueryAtomUsage(hAtomTbl,atom : cardinal) : cardinal; cdecl;               
     function WinQueryAtomLength(hAtomTbl,atom : cardinal) : cardinal; cdecl;              
-    function WinQueryAtomName(hAtomTbl,atom : cardinal;pchBuffer : pshortint;cchBufferMax : cardinal) : cardinal; cdecl;
+    function WinQueryAtomName(hAtomTbl,atom : cardinal;pchBuffer : pchar;cchBufferMax : cardinal) : cardinal; cdecl;
     function WinGetLastError(hab : cardinal) : cardinal; cdecl;
     function WinGetErrorInfo(hab : cardinal) : PERRINFO; cdecl;
     function WinFreeErrorInfo(perrinfo : PERRINFO) : longbool; cdecl;
     {DDE Functions}
-    function WinDdeInitiate(hwndClient : cardinal;pszAppName,pszTopicName : pshortint;pcctxt : PCONVCONTEXT) : longbool; cdecl;
-    function WinDdeRespond(hwndClient,hwndServer : cardinal;pszAppName,pszTopicName : pshortint;pcctxt : PCONVCONTEXT) : pointer; cdecl;
+    function WinDdeInitiate(hwndClient : cardinal;pszAppName,pszTopicName : pchar;pcctxt : PCONVCONTEXT) : longbool; cdecl;
+    function WinDdeRespond(hwndClient,hwndServer : cardinal;pszAppName,pszTopicName : pchar;pcctxt : PCONVCONTEXT) : pointer; cdecl;
     function WinDdePostMsg(hwndTo,hwndFrom,wm : cardinal;pddest : PDDESTRUCT;flOptions : cardinal) : longbool; cdecl;                        
     {Library related functions}
     function WinDeleteProcedure(hab : cardinal;wndproc : ppointer) : longbool; cdecl;
     function WinDeleteLibrary(hab,libhandle : cardinal) : longbool; cdecl;
-    function WinLoadProcedure(hab,libhandle : cardinal;procname : pshortint) : ppointer; cdecl; 
-    function WinLoadLibrary(hab : cardinal;libname : pshortint) : cardinal; cdecl;                      
+    function WinLoadProcedure(hab,libhandle : cardinal;procname : pchar) : ppointer; cdecl; 
+    function WinLoadLibrary(hab : cardinal;libname : pchar) : cardinal; cdecl;                      
     function WinSetDesktopBkgnd(hwndDesktop : cardinal;pdskNew : PDESKTOP) : cardinal; cdecl;
     function WinQueryDesktopBkgnd(hwndDesktop : cardinal;pdsk : PDESKTOP) : longbool; cdecl;    
     function WinRealizePalette(hwnd,hps : cardinal;pcclr : pcardinal) : longint; cdecl;
@@ -1835,257 +1835,259 @@ const
 
   implementation
 
-    function WinRegisterClass(hab : cardinal;pszClassName : pshortint;pfnWndProc : ppointer;flStyle,cbWindowData : cardinal) : longbool; cdecl;external;
-    function WinDefWindowProc(hwnd,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external;
-    function WinDestroyWindow(hwnd : cardinal) : longbool; cdecl;external;
-    function WinShowWindow(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external;
-    function WinQueryWindowRect(hwnd : cardinal;prclDest : PRECTL) : longbool; cdecl;external;
-    function WinGetPS(hwnd : cardinal) : cardinal; cdecl;external;
-    function WinReleasePS(hps : cardinal) : longbool; cdecl;external;
-    function WinEndPaint(hps : cardinal) : longbool; cdecl;external;
-    function WinGetClipPS(hwnd,hwndClip,fl : cardinal) : cardinal; cdecl;external;
-    function WinIsWindowShowing(hwnd : cardinal) : longbool; cdecl;external;
-    function WinBeginPaint(hwnd,hps : cardinal;prclPaint : PRECTL) : cardinal; cdecl;external;
-    function WinOpenWindowDC(hwnd : cardinal) : cardinal; cdecl;external;
-    function WinScrollWindow(hwnd : cardinal;dx,dy : longint;prclScroll,prclClip : PRECTL;hrgnUpdate : cardinal;prclUpdate : PRECTL;rgfsw : cardinal) : longint; cdecl;external;
-    function WinFillRect(hps : cardinal;prcl : PRECTL;lColor : longint) : longbool; cdecl;external;
-    function WinQueryVersion(hab : cardinal) : cardinal; cdecl;external;
-    function WinInitialize(flOptions : cardinal) : cardinal; cdecl;external;
-    function WinTerminate(hab : cardinal) : longbool; cdecl;external;
-    function WinQueryAnchorBlock(hwnd : cardinal) : cardinal; cdecl;external;
-    function WinCreateWindow(hwndParent : cardinal;pszClass,pszName : pshortint;flStyle : cardinal;x,y,cx,cy : longint;hwndOwner,hwndInsertBehind,id : cardinal;pCtlData,pPresParams : pointer) : cardinal; cdecl;external;
-    function WinEnableWindow(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;external;
-    function WinIsWindowEnabled(hwnd : cardinal) : longbool; cdecl;external;
-    function WinEnableWindowUpdate(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;external;
-    function WinIsWindowVisible(hwnd : cardinal) : longbool; cdecl;external;
-    function WinQueryWindowText(hwnd : cardinal;cchBufferMax : longint;pchBuffer : pshortint) : longint; cdecl;external;
-    function WinSetWindowText(hwnd : cardinal;pszText : pshortint) : longbool; cdecl;external;
-    function WinQueryWindowTextLength(hwnd : cardinal) : longint; cdecl;external;
-    function WinWindowFromID(hwndParent,id : cardinal) : cardinal; cdecl;external;
-    function WinIsWindow(hab,hwnd : cardinal) : longbool; cdecl;external;
-    function WinQueryWindow(hwnd : cardinal;cmd : longint) : cardinal; cdecl;external;
-    function WinMultWindowFromIDs(hwndParent : cardinal;prghwnd : pcardinal;idFirst,idLast : cardinal) : longint; cdecl;external;
-    function WinSetParent(hwnd,hwndNewParent : cardinal;fRedraw : longbool) : longbool; cdecl;external;
-    function WinIsChild(hwnd,hwndParent : cardinal) : longbool; cdecl;external;
-    function WinSetOwner(hwnd,hwndNewOwner : cardinal) : longbool; cdecl;external;
-    function WinQueryWindowProcess(hwnd : cardinal;ppid,ptid : pcardinal) : longbool; cdecl;external;
-    function WinQueryObjectWindow(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinQueryDesktopWindow(hab,hdc : cardinal) : cardinal; cdecl;external;
-    function WinSetWindowPos(hwnd,hwndInsertBehind : cardinal;x,y,cx,cy : longint;fl : cardinal) : longbool; cdecl;external;
-    function WinSetMultWindowPos(hab : cardinal;pswp : PSWP;cswp : cardinal) : longbool; cdecl;external;
-    function WinQueryWindowPos(hwnd : cardinal;pswp : PSWP) : longbool; cdecl;external;
-    function WinUpdateWindow(hwnd : cardinal) : longbool; cdecl;external;
-    function WinInvalidateRect(hwnd : cardinal;pwrc : PRECTL;fIncludeChildren : longbool) : longbool; cdecl;external;
-    function WinInvalidateRegion(hwnd,hrgn : cardinal;fIncludeChildren : longbool) : longbool; cdecl;external;
-    function WinInvertRect(hps : cardinal;prcl : PRECTL) : longbool; cdecl;external;
-    function WinDrawBitmap(hpsDst,hbm : cardinal;pwrcSrc : PRECTL;pptlDst : PPOINTL;clrFore,clrBack : longint;fl : cardinal) : longbool; cdecl;external;
-    function WinDrawText(hps : cardinal;cchText : longint;lpchText : pshortint;prcl : PRECTL;clrFore,clrBack : longint;flCmd : cardinal) : longint; cdecl;external;
-    function WinDrawBorder(hps : cardinal;prcl : PRECTL;cx,cy,clrFore,clrBack : longint;flCmd : cardinal) : longbool; cdecl;external; 
-    function WinLoadString(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pshortint) : longint; cdecl;external;
-    function WinLoadMessage(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pshortint) : longint; cdecl;external;
-    function WinSetActiveWindow(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external;
-    function WinSubclassWindow(hwnd : cardinal;pfnwp : ppointer) : ppointer; cdecl;external;
-    function WinQueryClassName(hwnd : cardinal;cchMax : longint;pch : pshortint) : longint; cdecl;external;
-    function WinQueryClassInfo(hab : cardinal;pszClassName : pshortint;pClassInfo : PCLASSINFO) : longbool; cdecl;external;
-    function WinQueryActiveWindow(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinIsThreadActive(hab : cardinal) : longbool; cdecl;external;
-    function WinQuerySysModalWindow(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinSetSysModalWindow(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external;
-    function WinQueryWindowUShort(hwnd : cardinal;index : longint) : word; cdecl;external;
-    function WinSetWindowUShort(hwnd : cardinal;index : longint;us : word) : longbool; cdecl;external;
-    function WinQueryWindowULong(hwnd : cardinal;index : longint) : cardinal; cdecl;external;
-    function WinSetWindowULong(hwnd : cardinal;index : longint;ul : cardinal) : longbool; cdecl;external;
-    function WinQueryWindowPtr(hwnd : cardinal;index : longint) : pointer; cdecl;external;
-    function WinSetWindowPtr(hwnd : cardinal;index : longint;p : pointer) : longbool; cdecl;external;
-    function WinSetWindowBits(hwnd : cardinal;index : longint;flData,flMask : cardinal) : longbool; cdecl;external;
-    function WinBeginEnumWindows(hwnd : cardinal) : cardinal; cdecl;external;
-    function WinGetNextWindow(henum : cardinal) : cardinal; cdecl;external;
-    function WinEndEnumWindows(henum : cardinal) : longbool; cdecl;external;
-    function WinWindowFromPoint(hwnd : cardinal;pptl : PPOINTL;fChildren : longbool) : cardinal; cdecl;external;
-    function WinMapWindowPoints(hwndFrom,hwndTo : cardinal;prgptl : PPOINTL;cwpt : longint) : longbool; cdecl;external;
-    function WinValidateRect(hwnd : cardinal;prcl : PRECTL;fIncludeChildren : longbool) : longbool; cdecl;external;
-    function WinValidateRegion(hwnd,hrgn : cardinal;fIncludeChildren : longbool) : longbool; cdecl;external;
-    function WinWindowFromDC(hdc : cardinal) : cardinal; cdecl;external;
-    function WinQueryWindowDC(hwnd : cardinal) : cardinal; cdecl;external;
-    function WinGetScreenPS(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinLockWindowUpdate(hwndDesktop,hwndLockUpdate : cardinal) : longbool; cdecl;external;
-    function WinLockVisRegions(hwndDesktop : cardinal;fLock : longbool) : longbool; cdecl;external;
-    function WinQueryUpdateRect(hwnd : cardinal;prcl : PRECTL) : longbool; cdecl;external;
-    function WinQueryUpdateRegion(hwnd,hrgn : cardinal) : longint; cdecl;external;
-    function WinExcludeUpdateRegion(hps,hwnd : cardinal) : longint; cdecl;external;
-    function WinSendMsg(hwnd,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external;
-    function WinCreateMsgQueue(hab : cardinal;cmsg : longint) : cardinal; cdecl;external;
-    function WinDestroyMsgQueue(hmq : cardinal) : longbool; cdecl;external;
-    function WinQueryQueueInfo(hmq : cardinal;pmqi : PMQINFO;cbCopy : cardinal) : longbool; cdecl;external;
-    function WinCancelShutdown(hmq : cardinal;fCancelAlways : longbool) : longbool; cdecl;external;
-    function WinGetMsg(hab : cardinal;pqmsg : PQMSG;hwndFilter,msgFilterFirst,msgFilterLast : cardinal) : longbool; cdecl;external; 
-    function WinPeekMsg(hab : cardinal;pqmsg : PQMSG;hwndFilter,msgFilterFirst,msgFilterLast,fl : cardinal) : longbool; cdecl;external;
-    function WinDispatchMsg(hab : cardinal;pqmsg : PQMSG) : pointer; cdecl;external;
-    function WinPostMsg(hwnd,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;external;
-    function WinRegisterUserMsg(hab,msgid : cardinal;datatype1,dir1,datatype2,dir2,datatyper : longint) : longbool; cdecl;external;
-    function WinRegisterUserDatatype(hab : cardinal;datatype,count : longint;types : Plongint) : longbool; cdecl;external;
-    function WinSetMsgMode(hab : cardinal;classname : pshortint;control : longint) : longbool; cdecl;external;
-    function WinSetSynchroMode(hab : cardinal;mode : longint) : longbool; cdecl;external;
-    function WinInSendMsg(hab : cardinal) : longbool; cdecl;external;
-    function WinBroadcastMsg(hwnd,msg : cardinal;mp1,mp2 : pointer;rgf : cardinal) : longbool; cdecl;external;
-    function WinWaitMsg(hab,msgFirst,msgLast : cardinal) : longbool; cdecl;external;
-    function WinQueryQueueStatus(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinQueryMsgPos(hab : cardinal;pptl : PPOINTL) : longbool; cdecl;external;
-    function WinQueryMsgTime(hab : cardinal) : cardinal; cdecl;external;
-    function WinWaitEventSem(hev,ulTimeout : cardinal) : cardinal; cdecl;external;
-    function WinRequestMutexSem(hmtx,ulTimeout : cardinal) : cardinal; cdecl;external;
-    function WinWaitMuxWaitSem(hmux,ulTimeout : cardinal;pulUser : pcardinal) : cardinal; cdecl;external;
-    function WinPostQueueMsg(hmq,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;external;
-    function WinSetMsgInterest(hwnd,msg_class : cardinal;control : longint) : longbool; cdecl;external;
-    function WinSetClassMsgInterest(hab : cardinal;pszClassName : pshortint;msg_class : cardinal;control : longint) : longbool; cdecl;external;
-    function WinSetFocus(hwndDesktop,hwndSetFocus : cardinal) : longbool; cdecl;external;
-    function WinFocusChange(hwndDesktop,hwndSetFocus,flFocusChange : cardinal) : longbool; cdecl;external;
-    function WinSetCapture(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external;
-    function WinQueryCapture(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinQueryFocus(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinGetKeyState(hwndDesktop : cardinal;vkey : longint) : longint; cdecl;external;
-    function WinGetPhysKeyState(hwndDesktop : cardinal;sc : longint) : longint; cdecl;external;
-    function WinEnablePhysInput(hwndDesktop : cardinal;fEnable : longbool) : longbool; cdecl;external;
-    function WinIsPhysInputEnabled(hwndDesktop : cardinal) : longbool; cdecl;external;
-    function WinSetKeyboardStateTable(hwndDesktop : cardinal;pKeyStateTable : PBYTE;fSet : longbool) : longbool; cdecl;external;
-    function WinGetDlgMsg(hwndDlg : cardinal;pqmsg : PQMSG) : longbool; cdecl;external;
-    function WinLoadDlg(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;hmod,idDlg : cardinal;pCreateParams : pointer) : cardinal; cdecl;external;
-    function WinDlgBox(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;hmod,idDlg : cardinal;pCreateParams : pointer) : cardinal; cdecl;external;
-    function WinDismissDlg(hwndDlg,usResult : cardinal) : longbool; cdecl;external;
-    function WinQueryDlgItemShort(hwndDlg,idItem : cardinal;pResult : Pinteger;fSigned : longbool) : longbool; cdecl;external;
-    function WinSetDlgItemShort(hwndDlg,idItem : cardinal;usValue : word;fSigned : longbool) : longbool; cdecl;external;
-    function WinSetDlgItemText(hwndDlg,idItem : cardinal;pszText : pshortint) : longbool; cdecl;external;
-    function WinQueryDlgItemText(hwndDlg,idItem : cardinal;cchBufferMax : longint;pchBuffer : pshortint) : cardinal; cdecl;external;
-    function WinQueryDlgItemTextLength(hwndDlg,idItem : cardinal) : longint; cdecl;external;
-    function WinDefDlgProc(hwndDlg,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external;
-    function WinAlarm(hwndDesktop,rgfType : cardinal) : longbool; cdecl;external;
-    function WinMessageBox(hwndParent,hwndOwner : cardinal;pszText,pszCaption : pshortint;idWindow,flStyle : cardinal) : cardinal; cdecl;external;
-    function WinProcessDlg(hwndDlg : cardinal) : cardinal; cdecl;external;
-    function WinSendDlgItemMsg(hwndDlg,idItem,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external;
-    function WinMapDlgPoints(hwndDlg : cardinal;prgwptl : PPOINTL;cwpt : cardinal;fCalcWindowCoords : longbool) : longbool; cdecl;external;
-    function WinEnumDlgItem(hwndDlg,hwnd,code : cardinal) : cardinal; cdecl;external;
-    function WinSubstituteStrings(hwnd : cardinal;pszSrc : pshortint;cchDstMax : longint;pszDst : pshortint) : longint; cdecl;external;
-    function WinCreateDlg(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;pdlgt : PDLGTEMPLATE;pCreateParams : pointer) : cardinal; cdecl;external;
-    function WinLoadMenu(hwndFrame,hmod,idMenu : cardinal) : cardinal; cdecl;external;
-    function WinCreateMenu(hwndParent : cardinal;lpmt : pointer) : cardinal; cdecl;external;
-    function WinPopupMenu(hwndParent,hwndOwner,hwndMenu : cardinal;x,y,idItem : longint;fs : cardinal) : longbool; cdecl;external;
-    function WinCreateStdWindow(hwndParent,flStyle : cardinal;pflCreateFlags : pcardinal;pszClientClass,pszTitle : pshortint;styleClient,hmod,idResources : cardinal;phwndClient : pcardinal) : cardinal; cdecl;external;
-    function WinFlashWindow(hwndFrame : cardinal;fFlash : longbool) : longbool; cdecl;external;
-    function WinCreateFrameControls(hwndFrame : cardinal;pfcdata : PFRAMECDATA;pszTitle : pshortint) : longbool; cdecl;external;
-    function WinCalcFrameRect(hwndFrame : cardinal;prcl : PRECTL;fClient : longbool) : longbool; cdecl;external;
-    function WinGetMinPosition(hwnd : cardinal;pswp : PSWP;pptl : PPOINTL) : longbool; cdecl;external;
-    function WinGetMaxPosition(hwnd : cardinal;pswp : PSWP) : longbool; cdecl;external;
-    function WinSaveWindowPos(hsvwp : cardinal;pswp : PSWP;cswp : cardinal) : longbool; cdecl;external;
-    function WinCopyRect(hab : cardinal;prclDst,prclSrc : PRECTL) : longbool; cdecl;external; 
-    function WinSetRect(hab : cardinal;prcl : PRECTL;xLeft,yBottom,xRight,yTop : longint) : longbool; cdecl;external;
-    function WinIsRectEmpty(hab : cardinal;prcl : PRECTL) : longbool; cdecl;external;
-    function WinEqualRect(hab : cardinal;prcl1,prcl2 : PRECTL) : longbool; cdecl;external;
-    function WinSetRectEmpty(hab : cardinal;prcl : PRECTL) : longbool; cdecl;external;
-    function WinOffsetRect(hab : cardinal;prcl : PRECTL;cx,cy : longint) : longbool; cdecl;external;
-    function WinInflateRect(hab : cardinal;prcl : PRECTL;cx,cy : longint) : longbool; cdecl;external;
-    function WinPtInRect(hab : cardinal;prcl : PRECTL;pptl : PPOINTL) : longbool; cdecl;external;
-    function WinIntersectRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external;
-    function WinUnionRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external;
-    function WinSubtractRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external;
-    function WinMakeRect(hab : cardinal;pwrc : PRECTL) : longbool; cdecl;external;
-    function WinMakePoints(hab : cardinal;pwpt : PPOINTL;cwpt : cardinal) : longbool; cdecl;external;
-    function WinQuerySysValue(hwndDesktop : cardinal;iSysValue : longint) : longint; cdecl;external;
-    function WinSetSysValue(hwndDesktop : cardinal;iSysValue,lValue : longint) : longbool; cdecl;external;
-    function WinSetPresParam(hwnd,id,cbParam : cardinal;pbParam : pointer) : longbool; cdecl;external;
-    function WinQueryPresParam(hwnd,id1,id2 : cardinal;pulId : pcardinal;cbBuf : cardinal;pbBuf : pointer;fs : cardinal) : cardinal; cdecl;external;
-    function WinRemovePresParam(hwnd,id : cardinal) : longbool; cdecl;external;
-    function WinQuerySysColor(hwndDesktop : cardinal;clr,lReserved : longint) : longint; cdecl;external;
-    function WinSetSysColors(hwndDesktop,flOptions,flFormat : cardinal;clrFirst : longint;cclr : cardinal;pclr : Plongint) : longbool; cdecl;external;
-    function WinStartTimer(hab,hwnd,idTimer,dtTimeout : cardinal) : cardinal; cdecl;external;
-    function WinStopTimer(hab,hwnd,idTimer : cardinal) : longbool; cdecl;external;
-    function WinGetCurrentTime(hab : cardinal) : cardinal; cdecl;external;
-    function WinLoadAccelTable(hab,hmod,idAccelTable : cardinal) : cardinal; cdecl;external;
-    function WinCopyAccelTable(haccel : cardinal;pAccelTable : PACCELTABLE;cbCopyMax : cardinal) : cardinal; cdecl;external;
-    function WinCreateAccelTable(hab : cardinal;pAccelTable : PACCELTABLE) : cardinal; cdecl;external;
-    function WinDestroyAccelTable(haccel : cardinal) : longbool; cdecl;external;
-    function WinTranslateAccel(hab,hwnd,haccel : cardinal;pqmsg : PQMSG) : longbool; cdecl;external;
-    function WinSetAccelTable(hab,haccel,hwndFrame : cardinal) : longbool; cdecl;external;
-    function WinQueryAccelTable(hab,hwndFrame : cardinal) : cardinal; cdecl;external;
-    function WinTrackRect(hwnd,hps : cardinal;pti : PTRACKINFO) : longbool; cdecl;external;
-    function WinShowTrackRect(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external;
-    function WinSetClipbrdOwner(hab,hwnd : cardinal) : longbool; cdecl;external;
-    function WinSetClipbrdData(hab,ulData,fmt,rgfFmtInfo : cardinal) : longbool; cdecl;external;
-    function WinQueryClipbrdData(hab,fmt : cardinal) : cardinal; cdecl;external;
-    function WinQueryClipbrdFmtInfo(hab,fmt : cardinal;prgfFmtInfo : pcardinal) : longbool; cdecl;external;
-    function WinSetClipbrdViewer(hab,hwndNewClipViewer : cardinal) : longbool; cdecl;external;
-    function WinEnumClipbrdFmts(hab,fmt : cardinal) : cardinal; cdecl;external;
-    function WinEmptyClipbrd(hab : cardinal) : longbool; cdecl;external;
-    function WinOpenClipbrd(hab : cardinal) : longbool; cdecl;external;
-    function WinCloseClipbrd(hab : cardinal) : longbool; cdecl;external;
-    function WinQueryClipbrdOwner(hab : cardinal) : cardinal; cdecl;external;
-    function WinQueryClipbrdViewer(hab : cardinal) : cardinal; cdecl;external;
-    function WinDestroyCursor(hwnd : cardinal) : longbool; cdecl;external;
-    function WinShowCursor(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external;
-    function WinCreateCursor(hwnd : cardinal;x,y,cx,cy : longint;fs : cardinal;prclClip : PRECTL) : longbool; cdecl;external;
-    function WinQueryCursorInfo(hwndDesktop : cardinal;pCursorInfo : PCURSORINFO) : longbool; cdecl;external;
-    function WinSetPointer(hwndDesktop,hptrNew : cardinal) : longbool; cdecl;external;
-    function WinSetPointerOwner(hptr,pid : cardinal;fDestroy : longbool) : longbool; cdecl;external;
-    function WinShowPointer(hwndDesktop : cardinal;fShow : longbool) : longbool; cdecl;external;
-    function WinQuerySysPointer(hwndDesktop : cardinal;iptr : longint;fLoad : longbool) : cardinal; cdecl;external;
-    function WinLoadPointer(hwndDesktop,hmod,idres : cardinal) : cardinal; cdecl;external;
-    function WinCreatePointer(hwndDesktop,hbmPointer : cardinal;fPointer : longbool;xHotspot,yHotspot : longint) : cardinal; cdecl;external;
-    function WinSetPointerPos(hwndDesktop : cardinal;x,y : longint) : longbool; cdecl;external;
-    function WinDestroyPointer(hptr : cardinal) : longbool; cdecl;external;
-    function WinQueryPointer(hwndDesktop : cardinal) : cardinal; cdecl;external;
-    function WinQueryPointerPos(hwndDesktop : cardinal;pptl : PPOINTL) : longbool; cdecl;external;
-    function WinCreatePointerIndirect(hwndDesktop : cardinal;pptri : PPOINTERINFO) : cardinal; cdecl;external;
-    function WinQueryPointerInfo(hptr : cardinal;pPointerInfo : PPOINTERINFO) : longbool; cdecl;external;
-    function WinDrawPointer(hps : cardinal;x,y : longint;hptr,fs : cardinal) : longbool; cdecl;external;
-    function WinGetSysBitmap(hwndDesktop,ibm : cardinal) : cardinal; cdecl;external;
-    function WinSetHook(hab,hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl;external;
-    function WinReleaseHook(hab,hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl;external;
-    function WinCallMsgFilter(hab : cardinal;pqmsg : PQMSG;msgf : cardinal) : longbool; cdecl;external;
-    function WinSetClassThunkProc(pszClassname : pshortint;pfnThunkProc : pointer) : longbool; cdecl;external;
-    function WinQueryClassThunkProc(pszClassname : pshortint) : pointer; cdecl;external;
-    function WinSetWindowThunkProc(hwnd : cardinal;pfnThunkProc : pointer) : longbool; cdecl;external;
-    function WinQueryWindowThunkProc(hwnd : cardinal) : pointer; cdecl;external;
-    function WinQueryWindowModel(hwnd : cardinal) : longint; cdecl;external;
-    function WinQueryCp(hmq : cardinal) : cardinal; cdecl;external;
-    function WinSetCp(hmq,idCodePage : cardinal) : longbool; cdecl;external;
-    function WinQueryCpList(hab,ccpMax : cardinal;prgcp : pcardinal) : cardinal; cdecl;external;
-    function WinCpTranslateString(hab,cpSrc : cardinal;pszSrc : pshortint;cpDst,cchDestMax : cardinal;pchDest : pshortint) : longbool; cdecl;external;
-    function WinCpTranslateChar(hab,cpSrc : cardinal;chSrc : byte;cpDst : cardinal) : byte; cdecl;external;
-    function WinUpper(hab,idcp,idcc : cardinal;psz : pshortint) : cardinal; cdecl;external;
-    function WinUpperChar(hab,idcp,idcc,c : cardinal) : cardinal; cdecl;external;
-    function WinNextChar(hab,idcp,idcc : cardinal;psz : pshortint) : pshortint; cdecl;external;
-    function WinPrevChar(hab,idcp,idcc : cardinal;pszStart,psz : pshortint) : pshortint; cdecl;external;
-    function WinCompareStrings(hab,idcp,idcc : cardinal;psz1,psz2 : pshortint;reserved : cardinal) : cardinal; cdecl;external;
-    function WinCreateAtomTable(cbInitial,cBuckets : cardinal) : cardinal; cdecl;external;
-    function WinDestroyAtomTable(hAtomTbl : cardinal) : cardinal; cdecl;external;
-    function WinAddAtom(hAtomTbl : cardinal;pszAtomName : pshortint) : cardinal; cdecl;external;
-    function WinFindAtom(hAtomTbl : cardinal;pszAtomName : pshortint) : cardinal; cdecl;external;
-    function WinDeleteAtom(hAtomTbl,atom : cardinal) : cardinal; cdecl;external;
-    function WinQueryAtomUsage(hAtomTbl,atom : cardinal) : cardinal; cdecl;external;
-    function WinQueryAtomLength(hAtomTbl,atom : cardinal) : cardinal; cdecl;external;
-    function WinQueryAtomName(hAtomTbl,atom : cardinal;pchBuffer : pshortint;cchBufferMax : cardinal) : cardinal; cdecl;external;
-    function WinGetLastError(hab : cardinal) : cardinal; cdecl;external;
-    function WinGetErrorInfo(hab : cardinal) : PERRINFO; cdecl;external;
-    function WinFreeErrorInfo(perrinfo : PERRINFO) : longbool; cdecl;external;
-    function WinDdeInitiate(hwndClient : cardinal;pszAppName,pszTopicName : pshortint;pcctxt : PCONVCONTEXT) : longbool; cdecl;external;
-    function WinDdeRespond(hwndClient,hwndServer : cardinal;pszAppName,pszTopicName : pshortint;pcctxt : PCONVCONTEXT) : pointer; cdecl;external;
-    function WinDdePostMsg(hwndTo,hwndFrom,wm : cardinal;pddest : PDDESTRUCT;flOptions : cardinal) : longbool; cdecl;external;
-    function WinDeleteProcedure(hab : cardinal;wndproc : ppointer) : longbool; cdecl;external;
-    function WinDeleteLibrary(hab,libhandle : cardinal) : longbool; cdecl;external;
-    function WinLoadProcedure(hab,libhandle : cardinal;procname : pshortint) : ppointer; cdecl;external;
-    function WinLoadLibrary(hab : cardinal;libname : pshortint) : cardinal; cdecl;external;
-    function WinSetDesktopBkgnd(hwndDesktop : cardinal;pdskNew : PDESKTOP) : cardinal; cdecl;external;
-    function WinQueryDesktopBkgnd(hwndDesktop : cardinal;pdsk : PDESKTOP) : longbool; cdecl;external;
-    function WinRealizePalette(hwnd,hps : cardinal;pcclr : pcardinal) : longint; cdecl;external;          
+    function WinRegisterClass(hab : cardinal;pszClassName : pchar;pfnWndProc : ppointer;flStyle,cbWindowData : cardinal) : longbool; cdecl;external 'pmwin' index 926;
+    function WinDefWindowProc(hwnd,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external 'pmwin' index 911;
+    function WinDestroyWindow(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 728;
+    function WinShowWindow(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external 'pmwin' index 883;
+    function WinQueryWindowRect(hwnd : cardinal;prclDest : PRECTL) : longbool; cdecl;external 'pmwin' index 840;
+    function WinGetPS(hwnd : cardinal) : cardinal; cdecl;external 'pmwin' index 757;
+    function WinReleasePS(hps : cardinal) : longbool; cdecl;external 'pmwin' index 848;
+    function WinEndPaint(hps : cardinal) : longbool; cdecl;external 'pmwin' index 738;
+    function WinGetClipPS(hwnd,hwndClip,fl : cardinal) : cardinal; cdecl;external 'pmwin' index 749;
+    function WinIsWindowShowing(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 774;
+    function WinBeginPaint(hwnd,hps : cardinal;prclPaint : PRECTL) : cardinal; cdecl;external 'pmwin' index 703;
+    function WinOpenWindowDC(hwnd : cardinal) : cardinal; cdecl;external 'pmwin' index 794;
+    function WinScrollWindow(hwnd : cardinal;dx,dy : longint;prclScroll,prclClip : PRECTL;hrgnUpdate : cardinal;prclUpdate : PRECTL;rgfsw : cardinal) : longint; cdecl;external 'pmwin' index 849;
+    function WinFillRect(hps : cardinal;prcl : PRECTL;lColor : longint) : longbool; cdecl;external 'pmwin' index 743;
+    function WinQueryVersion(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 833;
+    function WinInitialize(flOptions : cardinal) : cardinal; cdecl;external 'pmwin' index 763;
+    function WinTerminate(hab : cardinal) : longbool; cdecl;external 'pmwin' index 888;
+    function WinQueryAnchorBlock(hwnd : cardinal) : cardinal; cdecl;external 'pmwin' index 800;
+    function WinCreateWindow(hwndParent : cardinal;pszClass,pszName : pchar;flStyle : cardinal;x,y,cx,cy : longint;hwndOwner,hwndInsertBehind,id : cardinal;pCtlData,pPresParams : pointer) : cardinal; cdecl;external 'pmwin' index 909;
+    function WinEnableWindow(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;external 'pmwin' index 735;     
+    function WinIsWindowEnabled(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 773;
+    function WinEnableWindowUpdate(hwnd : cardinal;fEnable : longbool) : longbool; cdecl;external 'pmwin' index 736;
+    function WinIsWindowVisible(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 775;
+    function WinQueryWindowText(hwnd : cardinal;cchBufferMax : longint;pchBuffer : pshortint) : longint; cdecl;external 'pmwin' index 841;
+    function WinSetWindowText(hwnd : cardinal;pszText : pchar) : longbool; cdecl;external 'pmwin' index 877;
+    function WinQueryWindowTextLength(hwnd : cardinal) : longint; cdecl;external 'pmwin' index 842;
+    function WinWindowFromID(hwndParent,id : cardinal) : cardinal; cdecl;external 'pmwin' index 899;
+    function WinIsWindow(hab,hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 772;
+    function WinQueryWindow(hwnd : cardinal;cmd : longint) : cardinal; cdecl;external 'pmwin' index 834;
+    function WinMultWindowFromIDs(hwndParent : cardinal;prghwnd : pcardinal;idFirst,idLast : cardinal) : longint; cdecl;external 'pmwin' index 917;
+    function WinSetParent(hwnd,hwndNewParent : cardinal;fRedraw : longbool) : longbool; cdecl;external 'pmwin' index 865;
+    function WinIsChild(hwnd,hwndParent : cardinal) : longbool; cdecl;external 'pmwin' index 768;
+    function WinSetOwner(hwnd,hwndNewOwner : cardinal) : longbool; cdecl;external 'pmwin' index 864;
+    function WinQueryWindowProcess(hwnd : cardinal;ppid,ptid : pcardinal) : longbool; cdecl;external 'pmwin' index 838;
+    function WinQueryObjectWindow(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 820;
+    function WinQueryDesktopWindow(hab,hdc : cardinal) : cardinal; cdecl;external 'pmwin' index 813;
+    function WinSetWindowPos(hwnd,hwndInsertBehind : cardinal;x,y,cx,cy : longint;fl : cardinal) : longbool; cdecl;external 'pmwin' index 875;
+    function WinSetMultWindowPos(hab : cardinal;pswp : PSWP;cswp : cardinal) : longbool; cdecl;external 'pmwin' index 863;
+    function WinQueryWindowPos(hwnd : cardinal;pswp : PSWP) : longbool; cdecl;external 'pmwin' index 837;
+    function WinUpdateWindow(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 892;
+    function WinInvalidateRect(hwnd : cardinal;pwrc : PRECTL;fIncludeChildren : longbool) : longbool; cdecl;external 'pmwin' index 765;
+    function WinInvalidateRegion(hwnd,hrgn : cardinal;fIncludeChildren : longbool) : longbool; cdecl;external 'pmwin' index 766;
+    function WinInvertRect(hps : cardinal;prcl : PRECTL) : longbool; cdecl;external 'pmwin' index 767;
+    function WinDrawBitmap(hpsDst,hbm : cardinal;pwrcSrc : PRECTL;pptlDst : PPOINTL;clrFore,clrBack : longint;fl : cardinal) : longbool; cdecl;external 'pmwin' index 730;
+    function WinDrawText(hps : cardinal;cchText : longint;lpchText : pshortint;prcl : PRECTL;clrFore,clrBack : longint;flCmd : cardinal) : longint; cdecl;external 'pmwin' index 913;
+    function WinDrawBorder(hps : cardinal;prcl : PRECTL;cx,cy,clrFore,clrBack : longint;flCmd : cardinal) : longbool; cdecl;external 'pmwin' index 731; 
+    function WinLoadString(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pchar) : longint; cdecl;external 'pmwin' index 781;
+    function WinLoadMessage(hab,hmod,id : cardinal;cchMax : longint;pchBuffer : pchar) : longint; cdecl;external 'pmwin' index 779;
+    function WinSetActiveWindow(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 851;
+    function WinSubclassWindow(hwnd : cardinal;pfnwp : ppointer) : ppointer; cdecl;external 'pmwin' index 929;
+    function WinQueryClassName(hwnd : cardinal;cchMax : longint;pch : pshortint) : longint; cdecl;external 'pmwin' index 805;
+    function WinQueryClassInfo(hab : cardinal;pszClassName : pchar;pClassInfo : PCLASSINFO) : longbool; cdecl;external 'pmwin' index 925;
+    function WinQueryActiveWindow(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 799;
+    function WinIsThreadActive(hab : cardinal) : longbool; cdecl;external 'pmwin' index 771;
+    function WinQuerySysModalWindow(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 827;
+    function WinSetSysModalWindow(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 872;
+    function WinQueryWindowUShort(hwnd : cardinal;index : longint) : word; cdecl;external 'pmwin' index 844;
+    function WinSetWindowUShort(hwnd : cardinal;index : longint;us : word) : longbool; cdecl;external 'pmwin' index 879;
+    function WinQueryWindowULong(hwnd : cardinal;index : longint) : cardinal; cdecl;external 'pmwin' index 843;
+    function WinSetWindowULong(hwnd : cardinal;index : longint;ul : cardinal) : longbool; cdecl;external 'pmwin' index 878;
+    function WinQueryWindowPtr(hwnd : cardinal;index : longint) : pointer; cdecl;external 'pmwin' index 839;
+    function WinSetWindowPtr(hwnd : cardinal;index : longint;p : pointer) : longbool; cdecl;external 'pmwin' index 876;
+    function WinSetWindowBits(hwnd : cardinal;index : longint;flData,flMask : cardinal) : longbool; cdecl;external 'pmwin' index 874;  
+    function WinBeginEnumWindows(hwnd : cardinal) : cardinal; cdecl;external 'pmwin' index 702;
+    function WinGetNextWindow(henum : cardinal) : cardinal; cdecl;external 'pmwin' index 756;
+    function WinEndEnumWindows(henum : cardinal) : longbool; cdecl;external 'pmwin' index 737;
+    function WinWindowFromPoint(hwnd : cardinal;pptl : PPOINTL;fChildren : longbool) : cardinal; cdecl;external 'pmwin' index 900;
+    function WinMapWindowPoints(hwndFrom,hwndTo : cardinal;prgptl : PPOINTL;cwpt : longint) : longbool; cdecl;external 'pmwin' index 788;
+    function WinValidateRect(hwnd : cardinal;prcl : PRECTL;fIncludeChildren : longbool) : longbool; cdecl;external 'pmwin' index 895;
+    function WinValidateRegion(hwnd,hrgn : cardinal;fIncludeChildren : longbool) : longbool; cdecl;external 'pmwin' index 896;
+    function WinWindowFromDC(hdc : cardinal) : cardinal; cdecl;external 'pmwin' index 898;
+    function WinQueryWindowDC(hwnd : cardinal) : cardinal; cdecl;external 'pmwin' index 835;
+    function WinGetScreenPS(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 759;
+    function WinLockWindowUpdate(hwndDesktop,hwndLockUpdate : cardinal) : longbool; cdecl;external 'pmwin' index 784;
+    function WinLockVisRegions(hwndDesktop : cardinal;fLock : longbool) : longbool; cdecl;external 'pmwin' index 782;
+    function WinQueryUpdateRect(hwnd : cardinal;prcl : PRECTL) : longbool; cdecl;external 'pmwin' index 831;
+    function WinQueryUpdateRegion(hwnd,hrgn : cardinal) : longint; cdecl;external 'pmwin' index 832;
+    function WinExcludeUpdateRegion(hps,hwnd : cardinal) : longint; cdecl;external 'pmwin' index 742;
+    function WinSendMsg(hwnd,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external 'pmwin' index 920;
+    function WinCreateMsgQueue(hab : cardinal;cmsg : longint) : cardinal; cdecl;external 'pmwin' index 716;
+    function WinDestroyMsgQueue(hmq : cardinal) : longbool; cdecl;external 'pmwin' index 726;
+    function WinQueryQueueInfo(hmq : cardinal;pmqi : PMQINFO;cbCopy : cardinal) : longbool; cdecl;external 'pmwin' index 824;
+    function WinCancelShutdown(hmq : cardinal;fCancelAlways : longbool) : longbool; cdecl;external 'pmwin' index 705;
+    function WinGetMsg(hab : cardinal;pqmsg : PQMSG;hwndFilter,msgFilterFirst,msgFilterLast : cardinal) : longbool; cdecl;external 'pmwin' index 915; 
+    function WinPeekMsg(hab : cardinal;pqmsg : PQMSG;hwndFilter,msgFilterFirst,msgFilterLast,fl : cardinal) : longbool; cdecl;external 'pmwin' index 918;
+    function WinDispatchMsg(hab : cardinal;pqmsg : PQMSG) : pointer; cdecl;external 'pmwin' index 912;
+    function WinPostMsg(hwnd,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;external 'pmwin' index 919;
+    function WinRegisterUserMsg(hab,msgid : cardinal;datatype1,dir1,datatype2,dir2,datatyper : longint) : longbool; cdecl;external 'pmwin' index 846;
+    function WinRegisterUserDatatype(hab : cardinal;datatype,count : longint;types : Plongint) : longbool; cdecl;external 'pmwin' index 845;
+    function WinSetMsgMode(hab : cardinal;classname :pchar;control : longint) : longbool; cdecl;external 'pmwin' index 862;
+    function WinSetSynchroMode(hab : cardinal;mode : longint) : longbool; cdecl;external 'pmwin' index 870;
+    function WinInSendMsg(hab : cardinal) : longbool; cdecl;external 'pmwin' index 761;
+    function WinBroadcastMsg(hwnd,msg : cardinal;mp1,mp2 : pointer;rgf : cardinal) : longbool; cdecl;external 'pmwin' index 901;
+    function WinWaitMsg(hab,msgFirst,msgLast : cardinal) : longbool; cdecl;external 'pmwin' index 897;
+    function WinQueryQueueStatus(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 825;
+    function WinQueryMsgPos(hab : cardinal;pptl : PPOINTL) : longbool; cdecl;external 'pmwin' index 818;
+    function WinQueryMsgTime(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 819;
+    function WinWaitEventSem(hev,ulTimeout : cardinal) : cardinal; cdecl;external 'pmwin' index 978;
+    function WinRequestMutexSem(hmtx,ulTimeout : cardinal) : cardinal; cdecl;external 'pmwin' index 979;
+    function WinWaitMuxWaitSem(hmux,ulTimeout : cardinal;pulUser : pcardinal) : cardinal; cdecl;external 'pmwin' index 980;
+    function WinPostQueueMsg(hmq,msg : cardinal;mp1,mp2 : pointer) : longbool; cdecl;external 'pmwin' index 902;
+    function WinSetMsgInterest(hwnd,msg_class : cardinal;control : longint) : longbool; cdecl;external 'pmwin' index 861;
+    function WinSetClassMsgInterest(hab : cardinal;pszClassName : pchar;msg_class : cardinal;control : longint) : longbool; cdecl;external 'pmwin' index 853;
+    function WinSetFocus(hwndDesktop,hwndSetFocus : cardinal) : longbool; cdecl;external 'pmwin' index 860;
+    function WinFocusChange(hwndDesktop,hwndSetFocus,flFocusChange : cardinal) : longbool; cdecl;external 'pmwin' index 746;
+    function WinSetCapture(hwndDesktop,hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 852;
+    function WinQueryCapture(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 804;
+    function WinQueryFocus(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 817;
+    function WinGetKeyState(hwndDesktop : cardinal;vkey : longint) : longint; cdecl;external 'pmwin' index 752;
+    function WinGetPhysKeyState(hwndDesktop : cardinal;sc : longint) : longint; cdecl;external 'pmwin' index 758;
+    function WinEnablePhysInput(hwndDesktop : cardinal;fEnable : longbool) : longbool; cdecl;external 'pmwin' index 734;
+    function WinIsPhysInputEnabled(hwndDesktop : cardinal) : longbool; cdecl;external 'pmwin' index 769;
+    function WinSetKeyboardStateTable(hwndDesktop : cardinal;pKeyStateTable : PBYTE;fSet : longbool) : longbool; cdecl;external 'pmwin' index 921;
+    function WinGetDlgMsg(hwndDlg : cardinal;pqmsg : PQMSG) : longbool; cdecl;external 'pmwin' index 914;
+    function WinLoadDlg(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;hmod,idDlg : cardinal;pCreateParams : pointer) : cardinal; cdecl;external 'pmwin' index 924;
+    function WinDlgBox(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;hmod,idDlg : cardinal;pCreateParams : pointer) : cardinal; cdecl;external 'pmwin' index 923;
+    function WinDismissDlg(hwndDlg,usResult : cardinal) : longbool; cdecl;external 'pmwin' index 729;
+    function WinQueryDlgItemShort(hwndDlg,idItem : cardinal;pResult : Pinteger;fSigned : longbool) : longbool; cdecl;external 'pmwin' index 814;
+    function WinSetDlgItemShort(hwndDlg,idItem : cardinal;usValue : word;fSigned : longbool) : longbool; cdecl;external 'pmwin' index 858;
+    function WinSetDlgItemText(hwndDlg,idItem : cardinal;pszText : pchar) : longbool; cdecl;external 'pmwin' index 859;
+    function WinQueryDlgItemText(hwndDlg,idItem : cardinal;cchBufferMax : longint;pchBuffer : pchar) : cardinal; cdecl;external 'pmwin' index 815;
+    function WinQueryDlgItemTextLength(hwndDlg,idItem : cardinal) : longint; cdecl;external 'pmwin' index 816;
+    function WinDefDlgProc(hwndDlg,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external 'pmwin' index 910;
+    function WinAlarm(hwndDesktop,rgfType : cardinal) : longbool; cdecl;external 'pmwin' index 701;
+    function WinMessageBox(hwndParent,hwndOwner : cardinal;pszText,pszCaption : pchar;idWindow,flStyle : cardinal) : cardinal; cdecl;external 'pmwin' index 789;
+    function WinProcessDlg(hwndDlg : cardinal) : cardinal; cdecl;external 'pmwin' index 796;
+    function WinSendDlgItemMsg(hwndDlg,idItem,msg : cardinal;mp1,mp2 : pointer) : pointer; cdecl;external 'pmwin' index 903;
+    function WinMapDlgPoints(hwndDlg : cardinal;prgwptl : PPOINTL;cwpt : cardinal;fCalcWindowCoords : longbool) : longbool; cdecl;external 'pmwin' index 787;
+    function WinEnumDlgItem(hwndDlg,hwnd,code : cardinal) : cardinal; cdecl;external 'pmwin' index 740;
+    function WinSubstituteStrings(hwnd : cardinal;pszSrc : pchar;cchDstMax : longint;pszDst : pchar) : longint; cdecl;external 'pmwin' index 886;
+    function WinCreateDlg(hwndParent,hwndOwner : cardinal;pfnDlgProc : ppointer;pdlgt : PDLGTEMPLATE;pCreateParams : pointer) : cardinal; cdecl;external 'pmwin' index 922;
+    function WinLoadMenu(hwndFrame,hmod,idMenu : cardinal) : cardinal; cdecl;external 'pmwin' index 778;
+    function WinCreateMenu(hwndParent : cardinal;lpmt : pointer) : cardinal; cdecl;external 'pmwin' index 907;
+    function WinPopupMenu(hwndParent,hwndOwner,hwndMenu : cardinal;x,y,idItem : longint;fs : cardinal) : longbool; cdecl;external 'pmwin' index 937;
+    function WinCreateStdWindow(hwndParent,flStyle : cardinal;pflCreateFlags : pcardinal;pszClientClass,pszTitle : pchar;styleClient,hmod,idResources : cardinal;phwndClient : pcardinal) : cardinal; cdecl;external 'pmwin' index 908;
+    function WinFlashWindow(hwndFrame : cardinal;fFlash : longbool) : longbool; cdecl;external 'pmwin' index 745;
+    function WinCreateFrameControls(hwndFrame : cardinal;pfcdata : PFRAMECDATA;pszTitle : pchar) : longbool; cdecl;external 'pmwin' index 906;
+    function WinCalcFrameRect(hwndFrame : cardinal;prcl : PRECTL;fClient : longbool) : longbool; cdecl;external 'pmwin' index 704;
+    function WinGetMinPosition(hwnd : cardinal;pswp : PSWP;pptl : PPOINTL) : longbool; cdecl;external 'pmwin' index 755;
+    function WinGetMaxPosition(hwnd : cardinal;pswp : PSWP) : longbool; cdecl;external 'pmwin' index 754;
+    function WinSaveWindowPos(hsvwp : cardinal;pswp : PSWP;cswp : cardinal) : longbool; cdecl;external 'pmwin' index 943;
+    function WinCopyRect(hab : cardinal;prclDst,prclSrc : PRECTL) : longbool; cdecl;external 'pmwin' index 710;
+    
+    function WinSetRect(hab : cardinal;prcl : PRECTL;xLeft,yBottom,xRight,yTop : longint) : longbool; cdecl;external 'pmwin' index 868;
+    function WinIsRectEmpty(hab : cardinal;prcl : PRECTL) : longbool; cdecl;external 'pmwin' index 770;
+    function WinEqualRect(hab : cardinal;prcl1,prcl2 : PRECTL) : longbool; cdecl;external 'pmwin' index 741;
+    function WinSetRectEmpty(hab : cardinal;prcl : PRECTL) : longbool; cdecl;external 'pmwin' index 869;
+    function WinOffsetRect(hab : cardinal;prcl : PRECTL;cx,cy : longint) : longbool; cdecl;external 'pmwin' index 792;
+    function WinInflateRect(hab : cardinal;prcl : PRECTL;cx,cy : longint) : longbool; cdecl;external 'pmwin' index 762;
+    function WinPtInRect(hab : cardinal;prcl : PRECTL;pptl : PPOINTL) : longbool; cdecl;external 'pmwin' index 797;
+    function WinIntersectRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external 'pmwin' index 764;
+    function WinUnionRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external 'pmwin' index 891;
+    function WinSubtractRect(hab : cardinal;prclDst,prclSrc1,prclSrc2 : PRECTL) : longbool; cdecl;external 'pmwin' index 887;
+    function WinMakeRect(hab : cardinal;pwrc : PRECTL) : longbool; cdecl;external 'pmwin' index 786;
+    function WinMakePoints(hab : cardinal;pwpt : PPOINTL;cwpt : cardinal) : longbool; cdecl;external 'pmwin' index 785;
+    function WinQuerySysValue(hwndDesktop : cardinal;iSysValue : longint) : longint; cdecl;external 'pmwin' index 829;
+    function WinSetSysValue(hwndDesktop : cardinal;iSysValue,lValue : longint) : longbool; cdecl;external 'pmwin' index 873;
+    function WinSetPresParam(hwnd,id,cbParam : cardinal;pbParam : pointer) : longbool; cdecl;external 'pmwin' index 938;
+    function WinQueryPresParam(hwnd,id1,id2 : cardinal;pulId : pcardinal;cbBuf : cardinal;pbBuf : pointer;fs : cardinal) : cardinal; cdecl;external 'pmwin' index 939;
+    function WinRemovePresParam(hwnd,id : cardinal) : longbool; cdecl;external 'pmwin' index 940;
+    function WinQuerySysColor(hwndDesktop : cardinal;clr,lReserved : longint) : longint; cdecl;external 'pmwin' index 826;
+    function WinSetSysColors(hwndDesktop,flOptions,flFormat : cardinal;clrFirst : longint;cclr : cardinal;pclr : Plongint) : longbool; cdecl;external 'pmwin' index 871;
+    function WinStartTimer(hab,hwnd,idTimer,dtTimeout : cardinal) : cardinal; cdecl;external 'pmwin' index 884;
+    function WinStopTimer(hab,hwnd,idTimer : cardinal) : longbool; cdecl;external 'pmwin' index 885;
+    function WinGetCurrentTime(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 750;
+    function WinLoadAccelTable(hab,hmod,idAccelTable : cardinal) : cardinal; cdecl;external 'pmwin' index 776;
+    function WinCopyAccelTable(haccel : cardinal;pAccelTable : PACCELTABLE;cbCopyMax : cardinal) : cardinal; cdecl;external 'pmwin' index 709;
+    function WinCreateAccelTable(hab : cardinal;pAccelTable : PACCELTABLE) : cardinal; cdecl;external 'pmwin' index 713;
+    function WinDestroyAccelTable(haccel : cardinal) : longbool; cdecl;external 'pmwin' index 723;
+    function WinTranslateAccel(hab,hwnd,haccel : cardinal;pqmsg : PQMSG) : longbool; cdecl;external 'pmwin' index 904;
+    function WinSetAccelTable(hab,haccel,hwndFrame : cardinal) : longbool; cdecl;external 'pmwin' index 850;
+    function WinQueryAccelTable(hab,hwndFrame : cardinal) : cardinal; cdecl;external 'pmwin' index 798;
+    function WinTrackRect(hwnd,hps : cardinal;pti : PTRACKINFO) : longbool; cdecl;external 'pmwin' index 890;
+    function WinShowTrackRect(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external 'pmwin' index 882;
+    function WinSetClipbrdOwner(hab,hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 855;
+    function WinSetClipbrdData(hab,ulData,fmt,rgfFmtInfo : cardinal) : longbool; cdecl;external 'pmwin' index 854;
+    function WinQueryClipbrdData(hab,fmt : cardinal) : cardinal; cdecl;external 'pmwin' index 806;
+    function WinQueryClipbrdFmtInfo(hab,fmt : cardinal;prgfFmtInfo : pcardinal) : longbool; cdecl;external 'pmwin' index 807;
+    function WinSetClipbrdViewer(hab,hwndNewClipViewer : cardinal) : longbool; cdecl;external 'pmwin' index 856;
+    function WinEnumClipbrdFmts(hab,fmt : cardinal) : cardinal; cdecl;external 'pmwin' index 739;
+    function WinEmptyClipbrd(hab : cardinal) : longbool; cdecl;external 'pmwin' index 733;
+    function WinOpenClipbrd(hab : cardinal) : longbool; cdecl;external 'pmwin' index 793;
+    function WinCloseClipbrd(hab : cardinal) : longbool; cdecl;external 'pmwin' index 707;
+    function WinQueryClipbrdOwner(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 808;
+    function WinQueryClipbrdViewer(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 809;
+    function WinDestroyCursor(hwnd : cardinal) : longbool; cdecl;external 'pmwin' index 725;
+    function WinShowCursor(hwnd : cardinal;fShow : longbool) : longbool; cdecl;external 'pmwin' index 880;
+    function WinCreateCursor(hwnd : cardinal;x,y,cx,cy : longint;fs : cardinal;prclClip : PRECTL) : longbool; cdecl;external 'pmwin' index 715;
+    function WinQueryCursorInfo(hwndDesktop : cardinal;pCursorInfo : PCURSORINFO) : longbool; cdecl;external 'pmwin' index 812;
+    function WinSetPointer(hwndDesktop,hptrNew : cardinal) : longbool; cdecl;external 'pmwin' index 866;
+    function WinSetPointerOwner(hptr,pid : cardinal;fDestroy : longbool) : longbool; cdecl;external 'pmwin' index 971;
+    function WinShowPointer(hwndDesktop : cardinal;fShow : longbool) : longbool; cdecl;external 'pmwin' index 881;
+    function WinQuerySysPointer(hwndDesktop : cardinal;iptr : longint;fLoad : longbool) : cardinal; cdecl;external 'pmwin' index 828;
+    function WinLoadPointer(hwndDesktop,hmod,idres : cardinal) : cardinal; cdecl;external 'pmwin' index 780;
+    function WinCreatePointer(hwndDesktop,hbmPointer : cardinal;fPointer : longbool;xHotspot,yHotspot : longint) : cardinal; cdecl;external 'pmwin' index 717;
+    function WinSetPointerPos(hwndDesktop : cardinal;x,y : longint) : longbool; cdecl;external 'pmwin' index 867;
+    function WinDestroyPointer(hptr : cardinal) : longbool; cdecl;external 'pmwin' index 727;
+    function WinQueryPointer(hwndDesktop : cardinal) : cardinal; cdecl;external 'pmwin' index 821;
+    function WinQueryPointerPos(hwndDesktop : cardinal;pptl : PPOINTL) : longbool; cdecl;external 'pmwin' index 823;
+    function WinCreatePointerIndirect(hwndDesktop : cardinal;pptri : PPOINTERINFO) : cardinal; cdecl;external 'pmwin' index 942;
+    function WinQueryPointerInfo(hptr : cardinal;pPointerInfo : PPOINTERINFO) : longbool; cdecl;external 'pmwin' index 822;
+    function WinDrawPointer(hps : cardinal;x,y : longint;hptr,fs : cardinal) : longbool; cdecl;external 'pmwin' index 732;
+    function WinGetSysBitmap(hwndDesktop,ibm : cardinal) : cardinal; cdecl;external 'pmwin' index 760;
+    function WinSetHook(hab,hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl;external 'pmwin' index 928;
+    function WinReleaseHook(hab,hmq : cardinal;iHook : longint;pfnHook : pointer;hmod : cardinal) : longbool; cdecl;external 'pmwin' index 927;
+    function WinCallMsgFilter(hab : cardinal;pqmsg : PQMSG;msgf : cardinal) : longbool; cdecl;external 'pmwin' index 905;
+    function WinSetClassThunkProc(pszClassname : pchar;pfnThunkProc : pointer) : longbool; cdecl;external 'pmwin' index 959;
+    function WinQueryClassThunkProc(pszClassname : pchar) : pointer; cdecl;external 'pmwin' index 960;
+    function WinSetWindowThunkProc(hwnd : cardinal;pfnThunkProc : pointer) : longbool; cdecl;external 'pmwin' index 961;
+    function WinQueryWindowThunkProc(hwnd : cardinal) : pointer; cdecl;external 'pmwin' index 962;
+    function WinQueryWindowModel(hwnd : cardinal) : longint; cdecl;external 'pmwin' index 934;
+    function WinQueryCp(hmq : cardinal) : cardinal; cdecl;external 'pmwin' index 810;
+    function WinSetCp(hmq,idCodePage : cardinal) : longbool; cdecl;external 'pmwin' index 857;
+    function WinQueryCpList(hab,ccpMax : cardinal;prgcp : pcardinal) : cardinal; cdecl;external 'pmwin' index 811;
+    function WinCpTranslateString(hab,cpSrc : cardinal;pszSrc : pchar;cpDst,cchDestMax : cardinal;pchDest : pchar) : longbool; cdecl;external 'pmwin' index 712;
+    function WinCpTranslateChar(hab,cpSrc : cardinal;chSrc : byte;cpDst : cardinal) : byte; cdecl;external 'pmwin' index 711;
+    function WinUpper(hab,idcp,idcc : cardinal;psz : pchar) : cardinal; cdecl;external 'pmwin' index 893;
+    function WinUpperChar(hab,idcp,idcc,c : cardinal) : cardinal; cdecl;external 'pmwin' index 894;
+    function WinNextChar(hab,idcp,idcc : cardinal;psz : pchar) : pshortint; cdecl;external 'pmwin' index 791;
+    function WinPrevChar(hab,idcp,idcc : cardinal;pszStart,psz : pchar) : pshortint; cdecl;external 'pmwin' index 795;
+    function WinCompareStrings(hab,idcp,idcc : cardinal;psz1,psz2 : pchar;reserved : cardinal) : cardinal; cdecl;external 'pmwin' index 708;
+    function WinCreateAtomTable(cbInitial,cBuckets : cardinal) : cardinal; cdecl;external 'pmwin' index 714;
+    function WinDestroyAtomTable(hAtomTbl : cardinal) : cardinal; cdecl;external 'pmwin' index 724;
+    function WinAddAtom(hAtomTbl : cardinal;pszAtomName : pchar) : cardinal; cdecl;external 'pmwin' index 700;
+    function WinFindAtom(hAtomTbl : cardinal;pszAtomName : pchar) : cardinal; cdecl;external 'pmwin' index 744;
+    function WinDeleteAtom(hAtomTbl,atom : cardinal) : cardinal; cdecl;external 'pmwin' index 721;
+    function WinQueryAtomUsage(hAtomTbl,atom : cardinal) : cardinal; cdecl;external 'pmwin' index 803;
+    function WinQueryAtomLength(hAtomTbl,atom : cardinal) : cardinal; cdecl;external 'pmwin' index 801;
+    function WinQueryAtomName(hAtomTbl,atom : cardinal;pchBuffer : pchar;cchBufferMax : cardinal) : cardinal; cdecl;external 'pmwin' index 802;
+    function WinGetLastError(hab : cardinal) : cardinal; cdecl;external 'pmwin' index 753;
+    function WinGetErrorInfo(hab : cardinal) : PERRINFO; cdecl;external 'pmwin' index 751;
+    function WinFreeErrorInfo(perrinfo : PERRINFO) : longbool; cdecl;external 'pmwin' index 748;
+    function WinDdeInitiate(hwndClient : cardinal;pszAppName,pszTopicName : pchar;pcctxt : PCONVCONTEXT) : longbool; cdecl;external 'pmwin' index 718;
+    function WinDdeRespond(hwndClient,hwndServer : cardinal;pszAppName,pszTopicName : pchar;pcctxt : PCONVCONTEXT) : pointer; cdecl;external 'pmwin' index 720;
+    function WinDdePostMsg(hwndTo,hwndFrom,wm : cardinal;pddest : PDDESTRUCT;flOptions : cardinal) : longbool; cdecl;external 'pmwin' index 719;
+    function WinDeleteProcedure(hab : cardinal;wndproc : ppointer) : longbool; cdecl;external 'pmwin' index 987;
+    function WinDeleteLibrary(hab,libhandle : cardinal) : longbool; cdecl;external 'pmwin' index 722;
+    function WinLoadProcedure(hab,libhandle : cardinal;procname : pchar) : ppointer; cdecl;external 'pmwin' index 986;
+    function WinLoadLibrary(hab : cardinal;libname : pchar) : cardinal; cdecl;external 'pmwin' index 777;
+    function WinSetDesktopBkgnd(hwndDesktop : cardinal;pdskNew : PDESKTOP) : cardinal; cdecl;external 'pmwin' index 935;
+    function WinQueryDesktopBkgnd(hwndDesktop : cardinal;pdsk : PDESKTOP) : longbool; cdecl;external 'pmwin' index 936;
+    function WinRealizePalette(hwnd,hps : cardinal;pcclr : pcardinal) : longint; cdecl;external 'pmwin' index 941;          
     function cardinalFROMMP(mp : pointer) : cardinal;cdecl;
       begin
          cardinalFROMMP:=cardinal(mp);
       end;                                         
     function integer1FROMMP(mp : pointer) : word;cdecl;
       begin
-         integer1FROMMP:=lo(cardinal(mp));   
+         integer1FROMMP:=lo(cardinal(mp));
       end;                                             
     function integer2FROMMP(mp : pointer) : word;cdecl; 
       begin
-         integer2FROMMP:=hi(cardinal(mp));   
+         integer2FROMMP:=hi(cardinal(mp))
       end;                                             
 end.
+