Module:    Win32-GDI
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

// This file is automatically generated from "wingdi.h"; do not edit.


// Adapted from:
/**************************************************************************
*                                                                         *
* wingdi.h -- GDI procedure declarations, constant definitions and macros *
*                                                                         *
* 
*                                                                         *
**************************************************************************/
define inline-only constant $R2-BLACK                   =    1;
define inline-only constant $R2-NOTMERGEPEN             =    2;
define inline-only constant $R2-MASKNOTPEN              =    3;
define inline-only constant $R2-NOTCOPYPEN              =    4;
define inline-only constant $R2-MASKPENNOT              =    5;
define inline-only constant $R2-NOT                     =    6;
define inline-only constant $R2-XORPEN                  =    7;
define inline-only constant $R2-NOTMASKPEN              =    8;
define inline-only constant $R2-MASKPEN                 =    9;
define inline-only constant $R2-NOTXORPEN               =   10;
define inline-only constant $R2-NOP                     =   11;
define inline-only constant $R2-MERGENOTPEN             =   12;
define inline-only constant $R2-COPYPEN                 =   13;
define inline-only constant $R2-MERGEPENNOT             =   14;
define inline-only constant $R2-MERGEPEN                =   15;
define inline-only constant $R2-WHITE                   =   16;
define inline-only constant $R2-LAST                    =   16;
define inline-only constant $SRCCOPY                    = #x00CC0020;
define inline-only constant $SRCPAINT                   = #x00EE0086;
define inline-only constant $SRCAND                     = #x008800C6;
define inline-only constant $SRCINVERT                  = #x00660046;
define inline-only constant $SRCERASE                   = #x00440328;
define inline-only constant $NOTSRCCOPY                 = #x00330008;
define inline-only constant $NOTSRCERASE                = #x001100A6;
define inline-only constant $MERGECOPY                  = #x00C000CA;
define inline-only constant $MERGEPAINT                 = #x00BB0226;
define inline-only constant $PATCOPY                    = #x00F00021;
define inline-only constant $PATPAINT                   = #x00FB0A09;
define inline-only constant $PATINVERT                  = #x005A0049;
define inline-only constant $DSTINVERT                  = #x00550009;
define inline-only constant $BLACKNESS                  = #x00000042;
define inline-only constant $WHITENESS                  = #x00FF0062;
define inline-only constant $GDI-ERROR                  = $FFFFFFFF;
define inline-only constant $HGDI-ERROR                 =
	make(<HANDLE>, address: lognot(0));
define inline-only constant $ERROR                      =    0;
define inline-only constant $NULLREGION                 =    1;
define inline-only constant $SIMPLEREGION               =    2;
define inline-only constant $COMPLEXREGION              =    3;
define inline-only constant $RGN-AND                    =    1;
define inline-only constant $RGN-OR                     =    2;
define inline-only constant $RGN-XOR                    =    3;
define inline-only constant $RGN-DIFF                   =    4;
define inline-only constant $RGN-COPY                   =    5;
define inline-only constant $BLACKONWHITE               =    1;
define inline-only constant $WHITEONBLACK               =    2;
define inline-only constant $COLORONCOLOR               =    3;
define inline-only constant $HALFTONE                   =    4;
define inline-only constant $MAXSTRETCHBLTMODE          =    4;
define inline-only constant $STRETCH-HALFTONE           = $HALFTONE;
define inline-only constant $ALTERNATE                  =    1;
define inline-only constant $WINDING                    =    2;
define inline-only constant $POLYFILL-LAST              =    2;
define inline-only constant $TA-NOUPDATECP              =    0;
define inline-only constant $TA-UPDATECP                =    1;
define inline-only constant $TA-LEFT                    =    0;
define inline-only constant $TA-RIGHT                   =    2;
define inline-only constant $TA-CENTER                  =    6;
define inline-only constant $TA-TOP                     =    0;
define inline-only constant $TA-BOTTOM                  =    8;
define inline-only constant $TA-BASELINE                =   24;
define inline-only constant $TA-RTLREADING              =  256;
define inline-only constant $ETO-OPAQUE                 = #x0002;
define inline-only constant $ETO-CLIPPED                = #x0004;
define inline-only constant $ETO-GLYPH-INDEX            = #x0010;
define inline-only constant $ETO-RTLREADING             = #x0080;
define inline-only constant $ETO-NUMERICSLOCAL          = #x0400;
define inline-only constant $ETO-NUMERICSLATIN          = #x0800;
define inline-only constant $ETO-IGNORELANGUAGE         = #x1000;
define inline-only constant $ASPECT-FILTERING           = #x0001;
define inline-only constant $DCB-RESET                  = #x0001;
define inline-only constant $DCB-ACCUMULATE             = #x0002;
define inline-only constant $DCB-SET                    =
	logior($DCB-RESET, $DCB-ACCUMULATE);
define inline-only constant $DCB-ENABLE                 = #x0004;
define inline-only constant $DCB-DISABLE                = #x0008;
define inline-only constant $META-SETBKCOLOR            = #x0201;
define inline-only constant $META-SETBKMODE             = #x0102;
define inline-only constant $META-SETMAPMODE            = #x0103;
define inline-only constant $META-SETROP2               = #x0104;
define inline-only constant $META-SETRELABS             = #x0105;
define inline-only constant $META-SETPOLYFILLMODE       = #x0106;
define inline-only constant $META-SETSTRETCHBLTMODE     = #x0107;
define inline-only constant $META-SETTEXTCHAREXTRA      = #x0108;
define inline-only constant $META-SETTEXTCOLOR          = #x0209;
define inline-only constant $META-SETTEXTJUSTIFICATION  = #x020A;
define inline-only constant $META-SETWINDOWORG          = #x020B;
define inline-only constant $META-SETWINDOWEXT          = #x020C;
define inline-only constant $META-SETVIEWPORTORG        = #x020D;
define inline-only constant $META-SETVIEWPORTEXT        = #x020E;
define inline-only constant $META-OFFSETWINDOWORG       = #x020F;
define inline-only constant $META-SCALEWINDOWEXT        = #x0410;
define inline-only constant $META-OFFSETVIEWPORTORG     = #x0211;
define inline-only constant $META-SCALEVIEWPORTEXT      = #x0412;
define inline-only constant $META-LINETO                = #x0213;
define inline-only constant $META-MOVETO                = #x0214;
define inline-only constant $META-EXCLUDECLIPRECT       = #x0415;
define inline-only constant $META-INTERSECTCLIPRECT     = #x0416;
define inline-only constant $META-ARC                   = #x0817;
define inline-only constant $META-ELLIPSE               = #x0418;
define inline-only constant $META-FLOODFILL             = #x0419;
define inline-only constant $META-PIE                   = #x081A;
define inline-only constant $META-RECTANGLE             = #x041B;
define inline-only constant $META-ROUNDRECT             = #x061C;
define inline-only constant $META-PATBLT                = #x061D;
define inline-only constant $META-SAVEDC                = #x001E;
define inline-only constant $META-SETPIXEL              = #x041F;
define inline-only constant $META-OFFSETCLIPRGN         = #x0220;
define inline-only constant $META-TEXTOUT               = #x0521;
define inline-only constant $META-BITBLT                = #x0922;
define inline-only constant $META-STRETCHBLT            = #x0B23;
define inline-only constant $META-POLYGON               = #x0324;
define inline-only constant $META-POLYLINE              = #x0325;
define inline-only constant $META-ESCAPE                = #x0626;
define inline-only constant $META-RESTOREDC             = #x0127;
define inline-only constant $META-FILLREGION            = #x0228;
define inline-only constant $META-FRAMEREGION           = #x0429;
define inline-only constant $META-INVERTREGION          = #x012A;
define inline-only constant $META-PAINTREGION           = #x012B;
define inline-only constant $META-SELECTCLIPREGION      = #x012C;
define inline-only constant $META-SELECTOBJECT          = #x012D;
define inline-only constant $META-SETTEXTALIGN          = #x012E;
define inline-only constant $META-CHORD                 = #x0830;
define inline-only constant $META-SETMAPPERFLAGS        = #x0231;
define inline-only constant $META-EXTTEXTOUT            = #x0a32;
define inline-only constant $META-SETDIBTODEV           = #x0d33;
define inline-only constant $META-SELECTPALETTE         = #x0234;
define inline-only constant $META-REALIZEPALETTE        = #x0035;
define inline-only constant $META-ANIMATEPALETTE        = #x0436;
define inline-only constant $META-SETPALENTRIES         = #x0037;
define inline-only constant $META-POLYPOLYGON           = #x0538;
define inline-only constant $META-RESIZEPALETTE         = #x0139;
define inline-only constant $META-DIBBITBLT             = #x0940;
define inline-only constant $META-DIBSTRETCHBLT         = #x0b41;
define inline-only constant $META-DIBCREATEPATTERNBRUSH = #x0142;
define inline-only constant $META-STRETCHDIB            = #x0f43;
define inline-only constant $META-EXTFLOODFILL          = #x0548;
define inline-only constant $META-DELETEOBJECT          = #x01f0;
define inline-only constant $META-CREATEPALETTE         = #x00f7;
define inline-only constant $META-CREATEPATTERNBRUSH    = #x01F9;
define inline-only constant $META-CREATEPENINDIRECT     = #x02FA;
define inline-only constant $META-CREATEFONTINDIRECT    = #x02FB;
define inline-only constant $META-CREATEBRUSHINDIRECT   = #x02FC;
define inline-only constant $META-CREATEREGION          = #x06FF;

define C-struct <DRAWPATRECT>
  sealed inline-only slot ptPosition-value :: <POINT>;
  sealed inline-only slot ptSize-value   :: <POINT>;
  sealed inline-only slot wStyle-value   :: <WORD>;
  sealed inline-only slot wPattern-value :: <WORD>;
  pointer-type-name: <LPDRAWPATRECT>;
  c-name: "struct _DRAWPATRECT";
end C-struct <DRAWPATRECT>;
define inline constant <PDRAWPATRECT> = <LPDRAWPATRECT>;
define inline-only constant $NEWFRAME                   =    1;
define inline-only constant $ABORTDOC                   =    2;
define inline-only constant $NEXTBAND                   =    3;
define inline-only constant $SETCOLORTABLE              =    4;
define inline-only constant $GETCOLORTABLE              =    5;
define inline-only constant $FLUSHOUTPUT                =    6;
define inline-only constant $DRAFTMODE                  =    7;
define inline-only constant $QUERYESCSUPPORT            =    8;
define inline-only constant $SETABORTPROC               =    9;
define inline-only constant $STARTDOC                   =   10;
define inline-only constant $ENDDOC                     =   11;
define inline-only constant $GETPHYSPAGESIZE            =   12;
define inline-only constant $GETPRINTINGOFFSET          =   13;
define inline-only constant $GETSCALINGFACTOR           =   14;
define inline-only constant $MFCOMMENT                  =   15;
define inline-only constant $GETPENWIDTH                =   16;
define inline-only constant $SETCOPYCOUNT               =   17;
define inline-only constant $SELECTPAPERSOURCE          =   18;
define inline-only constant $DEVICEDATA                 =   19;
define inline-only constant $PASSTHROUGH                =   19;
define inline-only constant $GETTECHNOLGY               =   20;
define inline-only constant $GETTECHNOLOGY              =   20;
define inline-only constant $SETLINECAP                 =   21;
define inline-only constant $SETLINEJOIN                =   22;
define inline-only constant $SETMITERLIMIT              =   23;
define inline-only constant $BANDINFO                   =   24;
define inline-only constant $DRAWPATTERNRECT            =   25;
define inline-only constant $GETVECTORPENSIZE           =   26;
define inline-only constant $GETVECTORBRUSHSIZE         =   27;
define inline-only constant $ENABLEDUPLEX               =   28;
define inline-only constant $GETSETPAPERBINS            =   29;
define inline-only constant $GETSETPRINTORIENT          =   30;
define inline-only constant $ENUMPAPERBINS              =   31;
define inline-only constant $SETDIBSCALING              =   32;
define inline-only constant $EPSPRINTING                =   33;
define inline-only constant $ENUMPAPERMETRICS           =   34;
define inline-only constant $GETSETPAPERMETRICS         =   35;
define inline-only constant $POSTSCRIPT-DATA            =   37;
define inline-only constant $POSTSCRIPT-IGNORE          =   38;
define inline-only constant $MOUSETRAILS                =   39;
define inline-only constant $GETDEVICEUNITS             =   42;
define inline-only constant $GETEXTENDEDTEXTMETRICS     =  256;
define inline-only constant $GETEXTENTTABLE             =  257;
define inline-only constant $GETPAIRKERNTABLE           =  258;
define inline-only constant $GETTRACKKERNTABLE          =  259;
define inline-only constant $EXTTEXTOUT                 =  512;
define inline-only constant $GETFACENAME                =  513;
define inline-only constant $DOWNLOADFACE               =  514;
define inline-only constant $ENABLERELATIVEWIDTHS       =  768;
define inline-only constant $ENABLEPAIRKERNING          =  769;
define inline-only constant $SETKERNTRACK               =  770;
define inline-only constant $SETALLJUSTVALUES           =  771;
define inline-only constant $SETCHARSET                 =  772;
define inline-only constant $STRETCHBLT                 = 2048;
define inline-only constant $GETSETSCREENPARAMS         = 3072;
define inline-only constant $QUERYDIBSUPPORT            = 3073;
define inline-only constant $BEGIN-PATH                 = 4096;
define inline-only constant $CLIP-TO-PATH               = 4097;
define inline-only constant $END-PATH                   = 4098;
define inline-only constant $EXT-DEVICE-CAPS            = 4099;
define inline-only constant $RESTORE-CTM                = 4100;
define inline-only constant $SAVE-CTM                   = 4101;
define inline-only constant $SET-ARC-DIRECTION          = 4102;
define inline-only constant $SET-BACKGROUND-COLOR       = 4103;
define inline-only constant $SET-POLY-MODE              = 4104;
define inline-only constant $SET-SCREEN-ANGLE           = 4105;
define inline-only constant $SET-SPREAD                 = 4106;
define inline-only constant $TRANSFORM-CTM              = 4107;
define inline-only constant $SET-CLIP-BOX               = 4108;
define inline-only constant $SET-BOUNDS                 = 4109;
define inline-only constant $SET-MIRROR-MODE            = 4110;
define inline-only constant $OPENCHANNEL                = 4110;
define inline-only constant $DOWNLOADHEADER             = 4111;
define inline-only constant $CLOSECHANNEL               = 4112;
define inline-only constant $POSTSCRIPT-PASSTHROUGH     = 4115;
define inline-only constant $ENCAPSULATED-POSTSCRIPT    = 4116;
define inline-only constant $POSTSCRIPT-IDENTIFY        = 4117;
define inline-only constant $POSTSCRIPT-INJECTION       = 4118;
define inline-only constant $PSIDENT-GDICENTRIC         =    0;
define inline-only constant $PSIDENT-PSCENTRIC          =    1;

define C-struct <PSINJECTDATA>
  sealed inline-only slot DataBytes-value :: <DWORD>;
  sealed inline-only slot InjectionPoint-value :: <DWORD>;
  sealed inline-only slot flags-value    :: <DWORD>;
  sealed inline-only slot Reserved       :: <DWORD>;
  pointer-type-name: <LPPSINJECTDATA>;
  c-name: "struct _PSINJECTDATA";
end C-struct <PSINJECTDATA>;
define inline constant <PPSINJECTDATA> = <LPPSINJECTDATA>;
define inline-only constant $PSINJECT-APPEND            =    0;
define inline-only constant $PSINJECT-REPLACE           =    1;
define inline-only constant $PSINJECT-BEGINSTREAM       =    0;
define inline-only constant $PSINJECT-PSADOBE           =    1;
define inline-only constant $PSINJECT-COMMENTS          =    2;
define inline-only constant $PSINJECT-BEGINDEFAULTS     =    3;
define inline-only constant $PSINJECT-ENDDEFAULTS       =    4;
define inline-only constant $PSINJECT-BEGINPROLOG       =    5;
define inline-only constant $PSINJECT-ENDPROLOG         =    6;
define inline-only constant $PSINJECT-BEGINSETUP        =    7;
define inline-only constant $PSINJECT-ENDSETUP          =    8;
define inline-only constant $PSINJECT-ENDPAGECOMMENTS   =    9;
define inline-only constant $PSINJECT-BEGINPAGESETUP    =   10;
define inline-only constant $PSINJECT-ENDPAGESETUP      =   11;
define inline-only constant $PSINJECT-SHOWPAGE          =   12;
define inline-only constant $PSINJECT-PAGETRAILER       =   13;
define inline-only constant $PSINJECT-TRAILER           =   14;
define inline-only constant $PSINJECT-EOF               =   15;
define inline-only constant $PSINJECT-ENDSTREAM         =   16;
define inline-only constant $PSINJECT-VMSAVE            =   17;
define inline-only constant $PSINJECT-VMRESTORE         =   18;
define inline-only constant $PSINJECT-DOCNEEDEDRES      =   19;
define inline-only constant $PSINJECT-DOCSUPPLIEDRES    =   20;
define inline-only constant $PSINJECT-PAGES             =   21;
define inline-only constant $PSINJECT-PAGEORDER         =   22;
define inline-only constant $PSINJECT-ORIENTATION       =   23;
define inline-only constant $PSINJECT-BOUNDINGBOX       =   24;
define inline-only constant $PSINJECT-PAGENUMBER        =   25;
define inline-only constant $PSINJECT-PAGEBBOX          =   26;
define inline-only constant $PSINJECT-MAX               =   27;
define inline-only constant $QDI-SETDIBITS              =    1;
define inline-only constant $QDI-GETDIBITS              =    2;
define inline-only constant $QDI-DIBTOSCREEN            =    4;
define inline-only constant $QDI-STRETCHDIB             =    8;
define inline-only constant $SP-NOTREPORTED             = #x4000;
define inline-only constant $SP-ERROR                   =   -1;
define inline-only constant $SP-APPABORT                =   -2;
define inline-only constant $SP-USERABORT               =   -3;
define inline-only constant $SP-OUTOFDISK               =   -4;
define inline-only constant $SP-OUTOFMEMORY             =   -5;
define inline-only constant $PR-JOBSTATUS               = #x0000;
define inline-only constant $OBJ-PEN                    =    1;
define inline-only constant $OBJ-BRUSH                  =    2;
define inline-only constant $OBJ-DC                     =    3;
define inline-only constant $OBJ-METADC                 =    4;
define inline-only constant $OBJ-PAL                    =    5;
define inline-only constant $OBJ-FONT                   =    6;
define inline-only constant $OBJ-BITMAP                 =    7;
define inline-only constant $OBJ-REGION                 =    8;
define inline-only constant $OBJ-METAFILE               =    9;
define inline-only constant $OBJ-MEMDC                  =   10;
define inline-only constant $OBJ-EXTPEN                 =   11;
define inline-only constant $OBJ-ENHMETADC              =   12;
define inline-only constant $OBJ-ENHMETAFILE            =   13;
define inline-only constant $MWT-IDENTITY               =    1;
define inline-only constant $MWT-LEFTMULTIPLY           =    2;
define inline-only constant $MWT-RIGHTMULTIPLY          =    3;

define C-struct <XFORM>
  sealed inline-only slot eM11-value     :: <C-FLOAT>;
  sealed inline-only slot eM12-value     :: <C-FLOAT>;
  sealed inline-only slot eM21-value     :: <C-FLOAT>;
  sealed inline-only slot eM22-value     :: <C-FLOAT>;
  sealed inline-only slot eDx-value      :: <C-FLOAT>;
  sealed inline-only slot eDy-value      :: <C-FLOAT>;
  pointer-type-name: <LPXFORM>;
  c-name: "struct tagXFORM";
end C-struct <XFORM>;
define inline constant <PXFORM> = <LPXFORM>;

define C-struct <BITMAP>
  sealed inline-only slot bmType-value   :: <LONG>;
  sealed inline-only slot bmWidth-value  :: <LONG>;
  sealed inline-only slot bmHeight-value :: <LONG>;
  sealed inline-only slot bmWidthBytes-value :: <LONG>;
  sealed inline-only slot bmPlanes-value :: <WORD>;
  sealed inline-only slot bmBitsPixel-value :: <WORD>;
  sealed inline-only slot bmBits-value   :: <LPVOID>;
  pointer-type-name: <LPBITMAP>;
  c-name: "struct tagBITMAP";
end C-struct <BITMAP>;
define inline constant <PBITMAP> = <LPBITMAP>;

define C-struct <RGBTRIPLE>
  sealed inline-only slot rgbtBlue-value :: <C-BYTE>;
  sealed inline-only slot rgbtGreen-value :: <C-BYTE>;
  sealed inline-only slot rgbtRed-value  :: <C-BYTE>;
  pack: 1;
  pointer-type-name: <LPRGBTRIPLE>;
  c-name: "struct tagRGBTRIPLE";
end C-struct <RGBTRIPLE>;

define C-struct <RGBQUAD>
  sealed inline-only slot rgbBlue-value  :: <C-BYTE>;
  sealed inline-only slot rgbGreen-value :: <C-BYTE>;
  sealed inline-only slot rgbRed-value   :: <C-BYTE>;
  sealed inline-only slot rgbReserved    :: <C-BYTE>;
  pointer-type-name: <LPRGBQUAD>;
  c-name: "struct tagRGBQUAD";
end C-struct <RGBQUAD>;
define inline-only constant $CS-ENABLE                  = #x00000001;
define inline-only constant $CS-DISABLE                 = #x00000002;
define inline-only constant $CS-DELETE-TRANSFORM        = #x00000003;
define inline constant <LCSCSTYPE> = <LONG>;
define inline-only constant $LCS-CALIBRATED-RGB         = #x00000000;
define inline-only constant $LCS-DEVICE-RGB             = #x00000001;
define inline-only constant $LCS-DEVICE-CMYK            = #x00000002;
define inline constant <LCSGAMUTMATCH> = <LONG>;
define inline-only constant $LCS-GM-BUSINESS            = #x00000001;
define inline-only constant $LCS-GM-GRAPHICS            = #x00000002;
define inline-only constant $LCS-GM-IMAGES              = #x00000004;
define inline-only constant $LCS-GM-ABS-COLORIMETRIC    = #x00000008;
define inline-only constant $CM-OUT-OF-GAMUT            =  255;
define inline-only constant $CM-IN-GAMUT                =    0;
define inline constant <FXPT16DOT16> = <C-both-long>;
define inline constant <LPFXPT16DOT16> = <C-both-long*>;
define inline constant <FXPT2DOT30> = <C-both-long>;
define inline constant <LPFXPT2DOT30> = <C-both-long*>;

define C-struct <CIEXYZ>
  sealed inline-only slot ciexyzX-value  :: <FXPT2DOT30>;
  sealed inline-only slot ciexyzY-value  :: <FXPT2DOT30>;
  sealed inline-only slot ciexyzZ-value  :: <FXPT2DOT30>;
  pointer-type-name: <LPCIEXYZ>;
  c-name: "struct tagCIEXYZ";
end C-struct <CIEXYZ>;

define C-struct <CIEXYZTRIPLE>
  sealed inline-only slot ciexyzRed-value :: <CIEXYZ>;
  sealed inline-only slot ciexyzGreen-value :: <CIEXYZ>;
  sealed inline-only slot ciexyzBlue-value :: <CIEXYZ>;
  pointer-type-name: <LPCIEXYZTRIPLE>;
  c-name: "struct tagICEXYZTRIPLE";
end C-struct <CIEXYZTRIPLE>;

define C-struct <LOGCOLORSPACEA>
  sealed inline-only slot lcsSignature-value :: <DWORD>;
  sealed inline-only slot lcsVersion-value :: <DWORD>;
  sealed inline-only slot lcsSize-value  :: <DWORD>;
  sealed inline-only slot lcsCSType-value :: <LCSCSTYPE>;
  sealed inline-only slot lcsIntent-value :: <LCSGAMUTMATCH>;
  sealed inline-only slot lcsEndpoints-value :: <CIEXYZTRIPLE>;
  sealed inline-only slot lcsGammaRed-value :: <DWORD>;
  sealed inline-only slot lcsGammaGreen-value :: <DWORD>;
  sealed inline-only slot lcsGammaBlue-value :: <DWORD>;
  sealed inline-only array slot lcsFilename-array :: <CHAR>,
	length: $MAX-PATH, address-getter: lcsFilename-value;
  pointer-type-name: <LPLOGCOLORSPACEA>;
  c-name: "struct tagLOGCOLORSPACEA";
end C-struct <LOGCOLORSPACEA>;
define inline constant <LOGCOLORSPACE> = <LOGCOLORSPACEA>;
define inline constant <LPLOGCOLORSPACE> = <LPLOGCOLORSPACEA>;

define C-struct <BITMAPCOREHEADER>
  sealed inline-only slot bcSize-value   :: <DWORD>;
  sealed inline-only slot bcWidth-value  :: <WORD>;
  sealed inline-only slot bcHeight-value :: <WORD>;
  sealed inline-only slot bcPlanes-value :: <WORD>;
  sealed inline-only slot bcBitCount-value :: <WORD>;
  pointer-type-name: <LPBITMAPCOREHEADER>;
  c-name: "struct tagBITMAPCOREHEADER";
end C-struct <BITMAPCOREHEADER>;
define inline constant <PBITMAPCOREHEADER> = <LPBITMAPCOREHEADER>;

define C-struct <BITMAPINFOHEADER>
  sealed inline-only slot biSize-value   :: <DWORD>;
  sealed inline-only slot biWidth-value  :: <LONG>;
  sealed inline-only slot biHeight-value :: <LONG>;
  sealed inline-only slot biPlanes-value :: <WORD>;
  sealed inline-only slot biBitCount-value :: <WORD>;
  sealed inline-only slot biCompression-value :: <DWORD>;
  sealed inline-only slot biSizeImage-value :: <DWORD>;
  sealed inline-only slot biXPelsPerMeter-value :: <LONG>;
  sealed inline-only slot biYPelsPerMeter-value :: <LONG>;
  sealed inline-only slot biClrUsed-value :: <DWORD>;
  sealed inline-only slot biClrImportant-value :: <DWORD>;
  pointer-type-name: <LPBITMAPINFOHEADER>;
  c-name: "struct tagBITMAPINFOHEADER";
end C-struct <BITMAPINFOHEADER>;
define inline constant <PBITMAPINFOHEADER> = <LPBITMAPINFOHEADER>;

define C-struct <BITMAPV4HEADER>
  sealed inline-only slot bV4Size-value  :: <DWORD>;
  sealed inline-only slot bV4Width-value :: <LONG>;
  sealed inline-only slot bV4Height-value :: <LONG>;
  sealed inline-only slot bV4Planes-value :: <WORD>;
  sealed inline-only slot bV4BitCount-value :: <WORD>;
  sealed inline-only slot bV4V4Compression-value :: <DWORD>;
  sealed inline-only slot bV4SizeImage-value :: <DWORD>;
  sealed inline-only slot bV4XPelsPerMeter-value :: <LONG>;
  sealed inline-only slot bV4YPelsPerMeter-value :: <LONG>;
  sealed inline-only slot bV4ClrUsed-value :: <DWORD>;
  sealed inline-only slot bV4ClrImportant-value :: <DWORD>;
  sealed inline-only slot bV4RedMask-value :: <DWORD>;
  sealed inline-only slot bV4GreenMask-value :: <DWORD>;
  sealed inline-only slot bV4BlueMask-value :: <DWORD>;
  sealed inline-only slot bV4AlphaMask-value :: <DWORD>;
  sealed inline-only slot bV4CSType-value :: <DWORD>;
  sealed inline-only slot bV4Endpoints-value :: <CIEXYZTRIPLE>;
  sealed inline-only slot bV4GammaRed-value :: <DWORD>;
  sealed inline-only slot bV4GammaGreen-value :: <DWORD>;
  sealed inline-only slot bV4GammaBlue-value :: <DWORD>;
  pointer-type-name: <LPBITMAPV4HEADER>;
end C-struct <BITMAPV4HEADER>;
define inline constant <PBITMAPV4HEADER> = <LPBITMAPV4HEADER>;
define inline-only constant $BI-RGB                     =    0;
define inline-only constant $BI-RLE8                    =    1;
define inline-only constant $BI-RLE4                    =    2;
define inline-only constant $BI-BITFIELDS               =    3;

define C-struct <BITMAPINFO>
  sealed inline-only slot bmiHeader-value :: <BITMAPINFOHEADER>;
  sealed inline-only array slot bmiColors-array :: <RGBQUAD>,
	length: 1, address-getter: bmiColors-value;
  pointer-type-name: <LPBITMAPINFO>;
  c-name: "struct tagBITMAPINFO";
end C-struct <BITMAPINFO>;
define inline constant <PBITMAPINFO> = <LPBITMAPINFO>;

define C-struct <BITMAPCOREINFO>
  sealed inline-only slot bmciHeader-value :: <BITMAPCOREHEADER>;
  sealed inline-only array slot bmciColors-array :: <RGBTRIPLE>,
	length: 1, address-getter: bmciColors-value;
  pointer-type-name: <LPBITMAPCOREINFO>;
  c-name: "struct tagBITMAPCOREINFO";
end C-struct <BITMAPCOREINFO>;
define inline constant <PBITMAPCOREINFO> = <LPBITMAPCOREINFO>;

define C-struct <BITMAPFILEHEADER>
  sealed inline-only slot bfType-value   :: <WORD>;
  sealed inline-only slot bfSize-value   :: <DWORD>;
  sealed inline-only slot bfReserved1    :: <WORD>;
  sealed inline-only slot bfReserved2    :: <WORD>;
  sealed inline-only slot bfOffBits-value :: <DWORD>;
  pack: 2;
  pointer-type-name: <LPBITMAPFILEHEADER>;
  c-name: "struct tagBITMAPFILEHEADER";
end C-struct <BITMAPFILEHEADER>;
define inline constant <PBITMAPFILEHEADER> = <LPBITMAPFILEHEADER>;

define C-struct <FONTSIGNATURE>
  sealed inline-only array slot fsUsb-array :: <DWORD>, length: 4,
	address-getter: fsUsb-value;
  sealed inline-only array slot fsCsb-array :: <DWORD>, length: 2,
	address-getter: fsCsb-value;
  pointer-type-name: <LPFONTSIGNATURE>;
  c-name: "struct tagFONTSIGNATURE";
end C-struct <FONTSIGNATURE>;
define inline constant <PFONTSIGNATURE> = <LPFONTSIGNATURE>;

define C-struct <CHARSETINFO>
  sealed inline-only slot ciCharset-value :: <UINT>;
  sealed inline-only slot ciACP-value    :: <UINT>;
  sealed inline-only slot fs-value       :: <FONTSIGNATURE>;
  pointer-type-name: <LPCHARSETINFO>;
  c-name: "struct tagCHARSETINFO";
end C-struct <CHARSETINFO>;
define inline constant <PCHARSETINFO> = <LPCHARSETINFO>;
define inline-only constant $TCI-SRCCHARSET             =    1;
define inline-only constant $TCI-SRCCODEPAGE            =    2;
define inline-only constant $TCI-SRCFONTSIG             =    3;

define C-struct <LOCALESIGNATURE>
  sealed inline-only array slot lsUsb-array :: <DWORD>, length: 4,
	address-getter: lsUsb-value;
  sealed inline-only array slot lsCsbDefault-array :: <DWORD>,
	length: 2, address-getter: lsCsbDefault-value;
  sealed inline-only array slot lsCsbSupported-array :: <DWORD>,
	length: 2, address-getter: lsCsbSupported-value;
  pointer-type-name: <LPLOCALESIGNATURE>;
  c-name: "struct tagLOCALESIGNATURE";
end C-struct <LOCALESIGNATURE>;
define inline constant <PLOCALESIGNATURE> = <LPLOCALESIGNATURE>;

define C-struct <HANDLETABLE>
  sealed inline-only array slot objectHandle-array :: <HGDIOBJ>,
	length: 1, address-getter: objectHandle-value;
  pointer-type-name: <LPHANDLETABLE>;
  c-name: "struct tagHANDLETABLE";
end C-struct <HANDLETABLE>;
define inline constant <PHANDLETABLE> = <LPHANDLETABLE>;

define C-struct <METARECORD>
  sealed inline-only slot rdSize-value   :: <DWORD>;
  sealed inline-only slot rdFunction-value :: <WORD>;
  sealed inline-only array slot rdParm-array :: <WORD>, length: 1,
	address-getter: rdParm-value;
  pointer-type-name: <LPMETARECORD>;
  c-name: "struct tagMETARECORD";
end C-struct <METARECORD>;
define inline constant <PMETARECORD> = <LPMETARECORD>;

define C-struct <METAFILEPICT>
  sealed inline-only slot mm-value       :: <LONG>;
  sealed inline-only slot xExt-value     :: <LONG>;
  sealed inline-only slot yExt-value     :: <LONG>;
  sealed inline-only slot hMF-value      :: <HMETAFILE>;
  pointer-type-name: <LPMETAFILEPICT>;
  c-name: "struct tagMETAFILEPICT";
end C-struct <METAFILEPICT>;

define C-struct <METAHEADER>
  sealed inline-only slot mtType-value   :: <WORD>;
  sealed inline-only slot mtHeaderSize-value :: <WORD>;
  sealed inline-only slot mtVersion-value :: <WORD>;
  sealed inline-only slot mtSize-value   :: <DWORD>;
  sealed inline-only slot mtNoObjects-value :: <WORD>;
  sealed inline-only slot mtMaxRecord-value :: <DWORD>;
  sealed inline-only slot mtNoParameters-value :: <WORD>;
  pack: 2;
  pointer-type-name: <LPMETAHEADER>;
  c-name: "struct tagMETAHEADER";
end C-struct <METAHEADER>;
define inline constant <PMETAHEADER> = <LPMETAHEADER>;

define C-struct <ENHMETARECORD>
  sealed inline-only slot iType-value    :: <DWORD>;
  sealed inline-only slot nSize-value    :: <DWORD>;
  sealed inline-only array slot dParm-array :: <DWORD>, length: 1,
	address-getter: dParm-value;
  pointer-type-name: <LPENHMETARECORD>;
  c-name: "struct tagENHMETARECORD";
end C-struct <ENHMETARECORD>;
define inline constant <PENHMETARECORD> = <LPENHMETARECORD>;

define C-struct <ENHMETAHEADER>
  sealed inline-only slot iType-value    :: <DWORD>;
  sealed inline-only slot nSize-value    :: <DWORD>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot rclFrame-value :: <RECTL>;
  sealed inline-only slot dSignature-value :: <DWORD>;
  sealed inline-only slot nVersion-value :: <DWORD>;
  sealed inline-only slot nBytes-value   :: <DWORD>;
  sealed inline-only slot nRecords-value :: <DWORD>;
  sealed inline-only slot nHandles-value :: <WORD>;
  sealed inline-only slot sReserved      :: <WORD>;
  sealed inline-only slot nDescription-value :: <DWORD>;
  sealed inline-only slot offDescription-value :: <DWORD>;
  sealed inline-only slot nPalEntries-value :: <DWORD>;
  sealed inline-only slot szlDevice-value :: <SIZEL>;
  sealed inline-only slot szlMillimeters-value :: <SIZEL>;
  sealed inline-only slot cbPixelFormat-value :: <DWORD>;
  sealed inline-only slot offPixelFormat-value :: <DWORD>;
  sealed inline-only slot bOpenGL-value  :: <DWORD>;
  pointer-type-name: <LPENHMETAHEADER>;
  c-name: "struct tagENHMETAHEADER";
end C-struct <ENHMETAHEADER>;
define inline constant <PENHMETAHEADER> = <LPENHMETAHEADER>;
define inline-only constant $TMPF-FIXED-PITCH           = #x01;
define inline-only constant $TMPF-VECTOR                = #x02;
define inline-only constant $TMPF-DEVICE                = #x08;
define inline-only constant $TMPF-TRUETYPE              = #x04;

define C-struct <TEXTMETRICA>
  sealed inline-only slot tmHeight-value :: <LONG>;
  sealed inline-only slot tmAscent-value :: <LONG>;
  sealed inline-only slot tmDescent-value :: <LONG>;
  sealed inline-only slot tmInternalLeading-value :: <LONG>;
  sealed inline-only slot tmExternalLeading-value :: <LONG>;
  sealed inline-only slot tmAveCharWidth-value :: <LONG>;
  sealed inline-only slot tmMaxCharWidth-value :: <LONG>;
  sealed inline-only slot tmWeight-value :: <LONG>;
  sealed inline-only slot tmOverhang-value :: <LONG>;
  sealed inline-only slot tmDigitizedAspectX-value :: <LONG>;
  sealed inline-only slot tmDigitizedAspectY-value :: <LONG>;
  sealed inline-only slot tmFirstChar-value :: <C-BYTE>;
  sealed inline-only slot tmLastChar-value :: <C-BYTE>;
  sealed inline-only slot tmDefaultChar-value :: <C-BYTE>;
  sealed inline-only slot tmBreakChar-value :: <C-BYTE>;
  sealed inline-only slot tmItalic-value :: <C-BYTE>;
  sealed inline-only slot tmUnderlined-value :: <C-BYTE>;
  sealed inline-only slot tmStruckOut-value :: <C-BYTE>;
  sealed inline-only slot tmPitchAndFamily-value :: <C-BYTE>;
  sealed inline-only slot tmCharSet-value :: <C-BYTE>;
  pointer-type-name: <LPTEXTMETRICA>;
  c-name: "struct tagTEXTMETRICA";
end C-struct <TEXTMETRICA>;
define inline constant <PTEXTMETRICA> = <LPTEXTMETRICA>;
define inline constant <TEXTMETRIC> = <TEXTMETRICA>;
define inline constant <PTEXTMETRIC> = <PTEXTMETRICA>;
define inline constant <LPTEXTMETRIC> = <LPTEXTMETRICA>;
define inline-only constant $NTM-REGULAR                = #x00000040;
define inline-only constant $NTM-BOLD                   = #x00000020;
define inline-only constant $NTM-ITALIC                 = #x00000001;
define inline-only constant $NTM-NONNEGATIVE-AC         = #x00010000;
define inline-only constant $NTM-OPENTYPE               = #x00020000;
define inline-only constant $NTM-MULTIPLEMASTER         = #x00040000;
define inline-only constant $NTM-MM-INSTANCE            = #x00080000;
define inline-only constant $NTM-TYPE1                  = #x00100000;
define inline-only constant $NTM-DSIG                   = #x00200000;

define C-struct <NEWTEXTMETRICA>
  sealed inline-only slot tmHeight-value :: <LONG>;
  sealed inline-only slot tmAscent-value :: <LONG>;
  sealed inline-only slot tmDescent-value :: <LONG>;
  sealed inline-only slot tmInternalLeading-value :: <LONG>;
  sealed inline-only slot tmExternalLeading-value :: <LONG>;
  sealed inline-only slot tmAveCharWidth-value :: <LONG>;
  sealed inline-only slot tmMaxCharWidth-value :: <LONG>;
  sealed inline-only slot tmWeight-value :: <LONG>;
  sealed inline-only slot tmOverhang-value :: <LONG>;
  sealed inline-only slot tmDigitizedAspectX-value :: <LONG>;
  sealed inline-only slot tmDigitizedAspectY-value :: <LONG>;
  sealed inline-only slot tmFirstChar-value :: <C-BYTE>;
  sealed inline-only slot tmLastChar-value :: <C-BYTE>;
  sealed inline-only slot tmDefaultChar-value :: <C-BYTE>;
  sealed inline-only slot tmBreakChar-value :: <C-BYTE>;
  sealed inline-only slot tmItalic-value :: <C-BYTE>;
  sealed inline-only slot tmUnderlined-value :: <C-BYTE>;
  sealed inline-only slot tmStruckOut-value :: <C-BYTE>;
  sealed inline-only slot tmPitchAndFamily-value :: <C-BYTE>;
  sealed inline-only slot tmCharSet-value :: <C-BYTE>;
  sealed inline-only slot ntmFlags-value :: <DWORD>;
  sealed inline-only slot ntmSizeEM-value :: <UINT>;
  sealed inline-only slot ntmCellHeight-value :: <UINT>;
  sealed inline-only slot ntmAvgWidth-value :: <UINT>;
  pack: 4;
  pointer-type-name: <LPNEWTEXTMETRICA>;
  c-name: "struct tagNEWTEXTMETRICA";
end C-struct <NEWTEXTMETRICA>;
define inline constant <PNEWTEXTMETRICA> = <LPNEWTEXTMETRICA>;
define inline constant <NEWTEXTMETRIC> = <NEWTEXTMETRICA>;
define inline constant <PNEWTEXTMETRIC> = <PNEWTEXTMETRICA>;
define inline constant <LPNEWTEXTMETRIC> = <LPNEWTEXTMETRICA>;

define C-struct <NEWTEXTMETRICEXA>
  sealed inline-only slot ntmTm-value    :: <NEWTEXTMETRICA>;
  sealed inline-only slot ntmFontSig-value :: <FONTSIGNATURE>;
  pointer-type-name: <LPNEWTEXTMETRICEXA>;
  c-name: "struct tagNEWTEXTMETRICEXA";
end C-struct <NEWTEXTMETRICEXA>;
define inline constant <NEWTEXTMETRICEX> = <NEWTEXTMETRICEXA>;

define C-struct <PELARRAY>
  sealed inline-only slot paXCount-value :: <LONG>;
  sealed inline-only slot paYCount-value :: <LONG>;
  sealed inline-only slot paXExt-value   :: <LONG>;
  sealed inline-only slot paYExt-value   :: <LONG>;
  sealed inline-only slot paRGBs-value   :: <C-BYTE>;
  pointer-type-name: <LPPELARRAY>;
  c-name: "struct tagPELARRAY";
end C-struct <PELARRAY>;
define inline constant <PPELARRAY> = <LPPELARRAY>;

define C-struct <LOGBRUSH>
  sealed inline-only slot lbStyle-value  :: <UINT>;
  sealed inline-only slot lbColor-value  :: <COLORREF>;
  sealed inline-only slot lbHatch-value  :: <LONG>;
  pointer-type-name: <LPLOGBRUSH>;
  c-name: "struct tagLOGBRUSH";
end C-struct <LOGBRUSH>;
define inline constant <PLOGBRUSH> = <LPLOGBRUSH>;
define inline constant <PATTERN> = <LOGBRUSH>;
define C-pointer-type <PPATTERN> => <PATTERN>;
define C-pointer-type <NPPATTERN> => <PATTERN>;
define C-pointer-type <LPPATTERN> => <PATTERN>;

define C-struct <LOGPEN>
  sealed inline-only slot lopnStyle-value :: <UINT>;
  sealed inline-only slot lopnWidth-value :: <POINT>;
  sealed inline-only slot lopnColor-value :: <COLORREF>;
  pointer-type-name: <LPLOGPEN>;
  c-name: "struct tagLOGPEN";
end C-struct <LOGPEN>;
define inline constant <PLOGPEN> = <LPLOGPEN>;

define C-struct <EXTLOGPEN>
  sealed inline-only slot elpPenStyle-value :: <DWORD>;
  sealed inline-only slot elpWidth-value :: <DWORD>;
  sealed inline-only slot elpBrushStyle-value :: <UINT>;
  sealed inline-only slot elpColor-value :: <COLORREF>;
  sealed inline-only slot elpHatch-value :: <LONG>;
  sealed inline-only slot elpNumEntries-value :: <DWORD>;
  sealed inline-only array slot elpStyleEntry-array :: <DWORD>,
	length: 1, address-getter: elpStyleEntry-value;
  pointer-type-name: <LPEXTLOGPEN>;
  c-name: "struct tagEXTLOGPEN";
end C-struct <EXTLOGPEN>;
define inline constant <PEXTLOGPEN> = <LPEXTLOGPEN>;

define C-struct <PALETTEENTRY>
  sealed inline-only slot peRed-value    :: <C-BYTE>;
  sealed inline-only slot peGreen-value  :: <C-BYTE>;
  sealed inline-only slot peBlue-value   :: <C-BYTE>;
  sealed inline-only slot peFlags-value  :: <C-BYTE>;
  pointer-type-name: <LPPALETTEENTRY>;
  c-name: "struct tagPALETTEENTRY";
end C-struct <PALETTEENTRY>;
define inline constant <PPALETTEENTRY> = <LPPALETTEENTRY>;

define C-struct <LOGPALETTE>
  sealed inline-only slot palVersion-value :: <WORD>;
  sealed inline-only slot palNumEntries-value :: <WORD>;
  sealed inline-only array slot palPalEntry-array :: <PALETTEENTRY>,
	length: 1, address-getter: palPalEntry-value;
  pointer-type-name: <LPLOGPALETTE>;
  c-name: "struct tagLOGPALETTE";
end C-struct <LOGPALETTE>;
define inline constant <PLOGPALETTE> = <LPLOGPALETTE>;
define inline-only constant $LF-FACESIZE                =   32;

define C-struct <LOGFONTA>
  sealed inline-only slot lfHeight-value :: <LONG>;
  sealed inline-only slot lfWidth-value  :: <LONG>;
  sealed inline-only slot lfEscapement-value :: <LONG>;
  sealed inline-only slot lfOrientation-value :: <LONG>;
  sealed inline-only slot lfWeight-value :: <LONG>;
  sealed inline-only slot lfItalic-value :: <C-BYTE>;
  sealed inline-only slot lfUnderline-value :: <C-BYTE>;
  sealed inline-only slot lfStrikeOut-value :: <C-BYTE>;
  sealed inline-only slot lfCharSet-value :: <C-BYTE>;
  sealed inline-only slot lfOutPrecision-value :: <C-BYTE>;
  sealed inline-only slot lfClipPrecision-value :: <C-BYTE>;
  sealed inline-only slot lfQuality-value :: <C-BYTE>;
  sealed inline-only slot lfPitchAndFamily-value :: <C-BYTE>;
  sealed inline-only array slot lfFaceName-array :: <CHAR>,
	length: $LF-FACESIZE, address-getter: lfFaceName-value;
  pointer-type-name: <LPLOGFONTA>;
  c-name: "struct tagLOGFONTA";
end C-struct <LOGFONTA>;
define inline constant <PLOGFONTA> = <LPLOGFONTA>;
define inline constant <LOGFONT> = <LOGFONTA>;
define inline constant <PLOGFONT> = <PLOGFONTA>;
define inline constant <LPLOGFONT> = <LPLOGFONTA>;
define inline-only constant $LF-FULLFACESIZE            =   64;

define C-struct <ENUMLOGFONTA>
  sealed inline-only slot elfLogFont-value :: <LOGFONTA>;
  sealed inline-only array slot elfFullName-array :: <C-BYTE>,
	length: $LF-FULLFACESIZE, address-getter: elfFullName-value;
  sealed inline-only array slot elfStyle-array :: <C-BYTE>,
	length: $LF-FACESIZE, address-getter: elfStyle-value;
  pointer-type-name: <LPENUMLOGFONTA>;
  c-name: "struct tagENUMLOGFONTA";
end C-struct <ENUMLOGFONTA>;
define inline constant <ENUMLOGFONT> = <ENUMLOGFONTA>;
define inline constant <LPENUMLOGFONT> = <LPENUMLOGFONTA>;

define C-struct <ENUMLOGFONTEXA>
  sealed inline-only slot elfLogFont-value :: <LOGFONTA>;
  sealed inline-only array slot elfFullName-array :: <C-BYTE>,
	length: $LF-FULLFACESIZE, address-getter: elfFullName-value;
  sealed inline-only array slot elfStyle-array :: <C-BYTE>,
	length: $LF-FACESIZE, address-getter: elfStyle-value;
  sealed inline-only array slot elfScript-array :: <C-BYTE>,
	length: $LF-FACESIZE, address-getter: elfScript-value;
  pointer-type-name: <LPENUMLOGFONTEXA>;
  c-name: "struct tagENUMLOGFONTEXA";
end C-struct <ENUMLOGFONTEXA>;
define inline constant <ENUMLOGFONTEX> = <ENUMLOGFONTEXA>;
define inline constant <LPENUMLOGFONTEX> = <LPENUMLOGFONTEXA>;
define inline-only constant $OUT-DEFAULT-PRECIS         =    0;
define inline-only constant $OUT-STRING-PRECIS          =    1;
define inline-only constant $OUT-CHARACTER-PRECIS       =    2;
define inline-only constant $OUT-STROKE-PRECIS          =    3;
define inline-only constant $OUT-TT-PRECIS              =    4;
define inline-only constant $OUT-DEVICE-PRECIS          =    5;
define inline-only constant $OUT-RASTER-PRECIS          =    6;
define inline-only constant $OUT-TT-ONLY-PRECIS         =    7;
define inline-only constant $OUT-OUTLINE-PRECIS         =    8;
define inline-only constant $OUT-SCREEN-OUTLINE-PRECIS  =    9;
define inline-only constant $CLIP-DEFAULT-PRECIS        =    0;
define inline-only constant $CLIP-CHARACTER-PRECIS      =    1;
define inline-only constant $CLIP-STROKE-PRECIS         =    2;
define inline-only constant $CLIP-MASK                  =  #xf;
define inline-only constant $CLIP-LH-ANGLES             = ash(1,4);
define inline-only constant $CLIP-TT-ALWAYS             = ash(2,4);
define inline-only constant $CLIP-EMBEDDED              = ash(8,4);
define inline-only constant $DEFAULT-QUALITY            =    0;
define inline-only constant $DRAFT-QUALITY              =    1;
define inline-only constant $PROOF-QUALITY              =    2;
define inline-only constant $NONANTIALIASED-QUALITY     =    3;
define inline-only constant $ANTIALIASED-QUALITY        =    4;
define inline-only constant $DEFAULT-PITCH              =    0;
define inline-only constant $FIXED-PITCH                =    1;
define inline-only constant $VARIABLE-PITCH             =    2;
define inline-only constant $MONO-FONT                  =    8;
define inline-only constant $ANSI-CHARSET               =    0;
define inline-only constant $DEFAULT-CHARSET            =    1;
define inline-only constant $SYMBOL-CHARSET             =    2;
define inline-only constant $SHIFTJIS-CHARSET           =  128;
define inline-only constant $HANGEUL-CHARSET            =  129;
define inline-only constant $HANGUL-CHARSET             =  129;
define inline-only constant $GB2312-CHARSET             =  134;
define inline-only constant $CHINESEBIG5-CHARSET        =  136;
define inline-only constant $OEM-CHARSET                =  255;
define inline-only constant $JOHAB-CHARSET              =  130;
define inline-only constant $HEBREW-CHARSET             =  177;
define inline-only constant $ARABIC-CHARSET             =  178;
define inline-only constant $GREEK-CHARSET              =  161;
define inline-only constant $TURKISH-CHARSET            =  162;
define inline-only constant $VIETNAMESE-CHARSET         =  163;
define inline-only constant $THAI-CHARSET               =  222;
define inline-only constant $EASTEUROPE-CHARSET         =  238;
define inline-only constant $RUSSIAN-CHARSET            =  204;
define inline-only constant $MAC-CHARSET                =   77;
define inline-only constant $BALTIC-CHARSET             =  186;
define inline-only constant $FS-LATIN1                  = #x00000001;
define inline-only constant $FS-LATIN2                  = #x00000002;
define inline-only constant $FS-CYRILLIC                = #x00000004;
define inline-only constant $FS-GREEK                   = #x00000008;
define inline-only constant $FS-TURKISH                 = #x00000010;
define inline-only constant $FS-HEBREW                  = #x00000020;
define inline-only constant $FS-ARABIC                  = #x00000040;
define inline-only constant $FS-BALTIC                  = #x00000080;
define inline-only constant $FS-VIETNAMESE              = #x00000100;
define inline-only constant $FS-THAI                    = #x00010000;
define inline-only constant $FS-JISJAPAN                = #x00020000;
define inline-only constant $FS-CHINESESIMP             = #x00040000;
define inline-only constant $FS-WANSUNG                 = #x00080000;
define inline-only constant $FS-CHINESETRAD             = #x00100000;
define inline-only constant $FS-JOHAB                   = #x00200000;
define inline-only constant $FS-SYMBOL                  =
	as(<machine-word>, #x80000000);
define inline-only constant $FF-DONTCARE                = ash(0,4);
define inline-only constant $FF-ROMAN                   = ash(1,4);
define inline-only constant $FF-SWISS                   = ash(2,4);
define inline-only constant $FF-MODERN                  = ash(3,4);
define inline-only constant $FF-SCRIPT                  = ash(4,4);
define inline-only constant $FF-DECORATIVE              = ash(5,4);
define inline-only constant $FW-DONTCARE                =    0;
define inline-only constant $FW-THIN                    =  100;
define inline-only constant $FW-EXTRALIGHT              =  200;
define inline-only constant $FW-LIGHT                   =  300;
define inline-only constant $FW-NORMAL                  =  400;
define inline-only constant $FW-MEDIUM                  =  500;
define inline-only constant $FW-SEMIBOLD                =  600;
define inline-only constant $FW-BOLD                    =  700;
define inline-only constant $FW-EXTRABOLD               =  800;
define inline-only constant $FW-HEAVY                   =  900;
define inline-only constant $PANOSE-COUNT               =   10;
define inline-only constant $PAN-FAMILYTYPE-INDEX       =    0;
define inline-only constant $PAN-SERIFSTYLE-INDEX       =    1;
define inline-only constant $PAN-WEIGHT-INDEX           =    2;
define inline-only constant $PAN-PROPORTION-INDEX       =    3;
define inline-only constant $PAN-CONTRAST-INDEX         =    4;
define inline-only constant $PAN-STROKEVARIATION-INDEX  =    5;
define inline-only constant $PAN-ARMSTYLE-INDEX         =    6;
define inline-only constant $PAN-LETTERFORM-INDEX       =    7;
define inline-only constant $PAN-MIDLINE-INDEX          =    8;
define inline-only constant $PAN-XHEIGHT-INDEX          =    9;
define inline-only constant $PAN-CULTURE-LATIN          =    0;

define C-struct <PANOSE>
  sealed inline-only slot bFamilyType-value :: <C-BYTE>;
  sealed inline-only slot bSerifStyle-value :: <C-BYTE>;
  sealed inline-only slot bWeight-value  :: <C-BYTE>;
  sealed inline-only slot bProportion-value :: <C-BYTE>;
  sealed inline-only slot bContrast-value :: <C-BYTE>;
  sealed inline-only slot bStrokeVariation-value :: <C-BYTE>;
  sealed inline-only slot bArmStyle-value :: <C-BYTE>;
  sealed inline-only slot bLetterform-value :: <C-BYTE>;
  sealed inline-only slot bMidline-value :: <C-BYTE>;
  sealed inline-only slot bXHeight-value :: <C-BYTE>;
  pointer-type-name: <LPPANOSE>;
  c-name: "struct tagPANOSE";
end C-struct <PANOSE>;
define inline-only constant $PAN-ANY                    =    0;
define inline-only constant $PAN-NO-FIT                 =    1;
define inline-only constant $PAN-FAMILY-TEXT-DISPLAY    =    2;
define inline-only constant $PAN-FAMILY-SCRIPT          =    3;
define inline-only constant $PAN-FAMILY-DECORATIVE      =    4;
define inline-only constant $PAN-FAMILY-PICTORIAL       =    5;
define inline-only constant $PAN-SERIF-COVE             =    2;
define inline-only constant $PAN-SERIF-OBTUSE-COVE      =    3;
define inline-only constant $PAN-SERIF-SQUARE-COVE      =    4;
define inline-only constant $PAN-SERIF-OBTUSE-SQUARE-COVE =    5;
define inline-only constant $PAN-SERIF-SQUARE           =    6;
define inline-only constant $PAN-SERIF-THIN             =    7;
define inline-only constant $PAN-SERIF-BONE             =    8;
define inline-only constant $PAN-SERIF-EXAGGERATED      =    9;
define inline-only constant $PAN-SERIF-TRIANGLE         =   10;
define inline-only constant $PAN-SERIF-NORMAL-SANS      =   11;
define inline-only constant $PAN-SERIF-OBTUSE-SANS      =   12;
define inline-only constant $PAN-SERIF-PERP-SANS        =   13;
define inline-only constant $PAN-SERIF-FLARED           =   14;
define inline-only constant $PAN-SERIF-ROUNDED          =   15;
define inline-only constant $PAN-WEIGHT-VERY-LIGHT      =    2;
define inline-only constant $PAN-WEIGHT-LIGHT           =    3;
define inline-only constant $PAN-WEIGHT-THIN            =    4;
define inline-only constant $PAN-WEIGHT-BOOK            =    5;
define inline-only constant $PAN-WEIGHT-MEDIUM          =    6;
define inline-only constant $PAN-WEIGHT-DEMI            =    7;
define inline-only constant $PAN-WEIGHT-BOLD            =    8;
define inline-only constant $PAN-WEIGHT-HEAVY           =    9;
define inline-only constant $PAN-WEIGHT-BLACK           =   10;
define inline-only constant $PAN-WEIGHT-NORD            =   11;
define inline-only constant $PAN-PROP-OLD-STYLE         =    2;
define inline-only constant $PAN-PROP-MODERN            =    3;
define inline-only constant $PAN-PROP-EVEN-WIDTH        =    4;
define inline-only constant $PAN-PROP-EXPANDED          =    5;
define inline-only constant $PAN-PROP-CONDENSED         =    6;
define inline-only constant $PAN-PROP-VERY-EXPANDED     =    7;
define inline-only constant $PAN-PROP-VERY-CONDENSED    =    8;
define inline-only constant $PAN-PROP-MONOSPACED        =    9;
define inline-only constant $PAN-CONTRAST-NONE          =    2;
define inline-only constant $PAN-CONTRAST-VERY-LOW      =    3;
define inline-only constant $PAN-CONTRAST-LOW           =    4;
define inline-only constant $PAN-CONTRAST-MEDIUM-LOW    =    5;
define inline-only constant $PAN-CONTRAST-MEDIUM        =    6;
define inline-only constant $PAN-CONTRAST-MEDIUM-HIGH   =    7;
define inline-only constant $PAN-CONTRAST-HIGH          =    8;
define inline-only constant $PAN-CONTRAST-VERY-HIGH     =    9;
define inline-only constant $PAN-STROKE-GRADUAL-DIAG    =    2;
define inline-only constant $PAN-STROKE-GRADUAL-TRAN    =    3;
define inline-only constant $PAN-STROKE-GRADUAL-VERT    =    4;
define inline-only constant $PAN-STROKE-GRADUAL-HORZ    =    5;
define inline-only constant $PAN-STROKE-RAPID-VERT      =    6;
define inline-only constant $PAN-STROKE-RAPID-HORZ      =    7;
define inline-only constant $PAN-STROKE-INSTANT-VERT    =    8;
define inline-only constant $PAN-STRAIGHT-ARMS-HORZ     =    2;
define inline-only constant $PAN-STRAIGHT-ARMS-WEDGE    =    3;
define inline-only constant $PAN-STRAIGHT-ARMS-VERT     =    4;
define inline-only constant $PAN-STRAIGHT-ARMS-SINGLE-SERIF =    5;
define inline-only constant $PAN-STRAIGHT-ARMS-DOUBLE-SERIF =    6;
define inline-only constant $PAN-BENT-ARMS-HORZ         =    7;
define inline-only constant $PAN-BENT-ARMS-WEDGE        =    8;
define inline-only constant $PAN-BENT-ARMS-VERT         =    9;
define inline-only constant $PAN-BENT-ARMS-SINGLE-SERIF =   10;
define inline-only constant $PAN-BENT-ARMS-DOUBLE-SERIF =   11;
define inline-only constant $PAN-LETT-NORMAL-CONTACT    =    2;
define inline-only constant $PAN-LETT-NORMAL-WEIGHTED   =    3;
define inline-only constant $PAN-LETT-NORMAL-BOXED      =    4;
define inline-only constant $PAN-LETT-NORMAL-FLATTENED  =    5;
define inline-only constant $PAN-LETT-NORMAL-ROUNDED    =    6;
define inline-only constant $PAN-LETT-NORMAL-OFF-CENTER =    7;
define inline-only constant $PAN-LETT-NORMAL-SQUARE     =    8;
define inline-only constant $PAN-LETT-OBLIQUE-CONTACT   =    9;
define inline-only constant $PAN-LETT-OBLIQUE-WEIGHTED  =   10;
define inline-only constant $PAN-LETT-OBLIQUE-BOXED     =   11;
define inline-only constant $PAN-LETT-OBLIQUE-FLATTENED =   12;
define inline-only constant $PAN-LETT-OBLIQUE-ROUNDED   =   13;
define inline-only constant $PAN-LETT-OBLIQUE-OFF-CENTER =   14;
define inline-only constant $PAN-LETT-OBLIQUE-SQUARE    =   15;
define inline-only constant $PAN-MIDLINE-STANDARD-TRIMMED =    2;
define inline-only constant $PAN-MIDLINE-STANDARD-POINTED =    3;
define inline-only constant $PAN-MIDLINE-STANDARD-SERIFED =    4;
define inline-only constant $PAN-MIDLINE-HIGH-TRIMMED   =    5;
define inline-only constant $PAN-MIDLINE-HIGH-POINTED   =    6;
define inline-only constant $PAN-MIDLINE-HIGH-SERIFED   =    7;
define inline-only constant $PAN-MIDLINE-CONSTANT-TRIMMED =    8;
define inline-only constant $PAN-MIDLINE-CONSTANT-POINTED =    9;
define inline-only constant $PAN-MIDLINE-CONSTANT-SERIFED =   10;
define inline-only constant $PAN-MIDLINE-LOW-TRIMMED    =   11;
define inline-only constant $PAN-MIDLINE-LOW-POINTED    =   12;
define inline-only constant $PAN-MIDLINE-LOW-SERIFED    =   13;
define inline-only constant $PAN-XHEIGHT-CONSTANT-SMALL =    2;
define inline-only constant $PAN-XHEIGHT-CONSTANT-STD   =    3;
define inline-only constant $PAN-XHEIGHT-CONSTANT-LARGE =    4;
define inline-only constant $PAN-XHEIGHT-DUCKING-SMALL  =    5;
define inline-only constant $PAN-XHEIGHT-DUCKING-STD    =    6;
define inline-only constant $PAN-XHEIGHT-DUCKING-LARGE  =    7;
define inline-only constant $ELF-VENDOR-SIZE            =    4;

define C-struct <EXTLOGFONTA>
  sealed inline-only slot elfLogFont-value :: <LOGFONTA>;
  sealed inline-only array slot elfFullName-array :: <C-BYTE>,
	length: $LF-FULLFACESIZE, address-getter: elfFullName-value;
  sealed inline-only array slot elfStyle-array :: <C-BYTE>,
	length: $LF-FACESIZE, address-getter: elfStyle-value;
  sealed inline-only slot elfVersion-value :: <DWORD>;
  sealed inline-only slot elfStyleSize-value :: <DWORD>;
  sealed inline-only slot elfMatch-value :: <DWORD>;
  sealed inline-only slot elfReserved    :: <DWORD>;
  sealed inline-only array slot elfVendorId-array :: <C-BYTE>,
	length: $ELF-VENDOR-SIZE, address-getter: elfVendorId-value;
  sealed inline-only slot elfCulture-value :: <DWORD>;
  sealed inline-only slot elfPanose-value :: <PANOSE>;
  pointer-type-name: <LPEXTLOGFONTA>;
  c-name: "struct tagEXTLOGFONTA";
end C-struct <EXTLOGFONTA>;
define inline constant <PEXTLOGFONTA> = <LPEXTLOGFONTA>;
define inline constant <EXTLOGFONT> = <EXTLOGFONTA>;
define inline constant <PEXTLOGFONT> = <PEXTLOGFONTA>;
define inline constant <LPEXTLOGFONT> = <LPEXTLOGFONTA>;
define inline-only constant $ELF-VERSION                =    0;
define inline-only constant $ELF-CULTURE-LATIN          =    0;
define inline-only constant $RASTER-FONTTYPE            = #x0001;
define inline-only constant $DEVICE-FONTTYPE            = #x002;
define inline-only constant $TRUETYPE-FONTTYPE          = #x004;
define inline-only constant $PC-RESERVED                = #x01;
define inline-only constant $PC-EXPLICIT                = #x02;
define inline-only constant $PC-NOCOLLAPSE              = #x04;
define inline-only constant $TRANSPARENT                =    1;
define inline-only constant $OPAQUE                     =    2;
define inline-only constant $BKMODE-LAST                =    2;
define inline-only constant $GM-COMPATIBLE              =    1;
define inline-only constant $GM-ADVANCED                =    2;
define inline-only constant $GM-LAST                    =    2;
define inline-only constant $PT-CLOSEFIGURE             = #x01;
define inline-only constant $PT-LINETO                  = #x02;
define inline-only constant $PT-BEZIERTO                = #x04;
define inline-only constant $PT-MOVETO                  = #x06;
define inline-only constant $MM-TEXT                    =    1;
define inline-only constant $MM-LOMETRIC                =    2;
define inline-only constant $MM-HIMETRIC                =    3;
define inline-only constant $MM-LOENGLISH               =    4;
define inline-only constant $MM-HIENGLISH               =    5;
define inline-only constant $MM-TWIPS                   =    6;
define inline-only constant $MM-ISOTROPIC               =    7;
define inline-only constant $MM-ANISOTROPIC             =    8;
define inline-only constant $ABSOLUTE                   =    1;
define inline-only constant $RELATIVE                   =    2;
define inline-only constant $WHITE-BRUSH                =    0;
define inline-only constant $LTGRAY-BRUSH               =    1;
define inline-only constant $GRAY-BRUSH                 =    2;
define inline-only constant $DKGRAY-BRUSH               =    3;
define inline-only constant $BLACK-BRUSH                =    4;
define inline-only constant $NULL-BRUSH                 =    5;
define inline-only constant $WHITE-PEN                  =    6;
define inline-only constant $BLACK-PEN                  =    7;
define inline-only constant $NULL-PEN                   =    8;
define inline-only constant $OEM-FIXED-FONT             =   10;
define inline-only constant $ANSI-FIXED-FONT            =   11;
define inline-only constant $ANSI-VAR-FONT              =   12;
define inline-only constant $SYSTEM-FONT                =   13;
define inline-only constant $DEVICE-DEFAULT-FONT        =   14;
define inline-only constant $DEFAULT-PALETTE            =   15;
define inline-only constant $DEFAULT-GUI-FONT           =   17;
define inline-only constant $STOCK-LAST                 =   17;
define inline-only constant $CLR-INVALID                = $FFFFFFFF;
define inline-only constant $BS-SOLID                   =    0;
define inline-only constant $BS-NULL                    =    1;
define inline-only constant $BS-HATCHED                 =    2;
define inline-only constant $BS-PATTERN                 =    3;
define inline-only constant $BS-INDEXED                 =    4;
define inline-only constant $BS-DIBPATTERN              =    5;
define inline-only constant $BS-DIBPATTERNPT            =    6;
define inline-only constant $BS-PATTERN8X8              =    7;
define inline-only constant $BS-DIBPATTERN8X8           =    8;
define inline-only constant $BS-MONOPATTERN             =    9;
define inline-only constant $HS-HORIZONTAL              =    0;
define inline-only constant $HS-VERTICAL                =    1;
define inline-only constant $HS-FDIAGONAL               =    2;
define inline-only constant $HS-BDIAGONAL               =    3;
define inline-only constant $HS-CROSS                   =    4;
define inline-only constant $HS-DIAGCROSS               =    5;
define inline-only constant $PS-SOLID                   =    0;
define inline-only constant $PS-DASH                    =    1;
define inline-only constant $PS-DOT                     =    2;
define inline-only constant $PS-DASHDOT                 =    3;
define inline-only constant $PS-DASHDOTDOT              =    4;
define inline-only constant $PS-NULL                    =    5;
define inline-only constant $PS-INSIDEFRAME             =    6;
define inline-only constant $PS-USERSTYLE               =    7;
define inline-only constant $PS-ALTERNATE               =    8;
define inline-only constant $PS-STYLE-MASK              = #x0000000F;
define inline-only constant $PS-ENDCAP-ROUND            = #x00000000;
define inline-only constant $PS-ENDCAP-SQUARE           = #x00000100;
define inline-only constant $PS-ENDCAP-FLAT             = #x00000200;
define inline-only constant $PS-ENDCAP-MASK             = #x00000F00;
define inline-only constant $PS-JOIN-ROUND              = #x00000000;
define inline-only constant $PS-JOIN-BEVEL              = #x00001000;
define inline-only constant $PS-JOIN-MITER              = #x00002000;
define inline-only constant $PS-JOIN-MASK               = #x0000F000;
define inline-only constant $PS-COSMETIC                = #x00000000;
define inline-only constant $PS-GEOMETRIC               = #x00010000;
define inline-only constant $PS-TYPE-MASK               = #x000F0000;
define inline-only constant $AD-COUNTERCLOCKWISE        =    1;
define inline-only constant $AD-CLOCKWISE               =    2;
define inline-only constant $DRIVERVERSION              =    0;
define inline-only constant $TECHNOLOGY                 =    2;
define inline-only constant $HORZSIZE                   =    4;
define inline-only constant $VERTSIZE                   =    6;
define inline-only constant $HORZRES                    =    8;
define inline-only constant $VERTRES                    =   10;
define inline-only constant $BITSPIXEL                  =   12;
define inline-only constant $PLANES                     =   14;
define inline-only constant $NUMBRUSHES                 =   16;
define inline-only constant $NUMPENS                    =   18;
define inline-only constant $NUMMARKERS                 =   20;
define inline-only constant $NUMFONTS                   =   22;
define inline-only constant $NUMCOLORS                  =   24;
define inline-only constant $PDEVICESIZE                =   26;
define inline-only constant $CURVECAPS                  =   28;
define inline-only constant $LINECAPS                   =   30;
define inline-only constant $POLYGONALCAPS              =   32;
define inline-only constant $TEXTCAPS                   =   34;
define inline-only constant $CLIPCAPS                   =   36;
define inline-only constant $RASTERCAPS                 =   38;
define inline-only constant $ASPECTX                    =   40;
define inline-only constant $ASPECTY                    =   42;
define inline-only constant $ASPECTXY                   =   44;
define inline-only constant $LOGPIXELSX                 =   88;
define inline-only constant $LOGPIXELSY                 =   90;
define inline-only constant $SIZEPALETTE                =  104;
define inline-only constant $NUMRESERVED                =  106;
define inline-only constant $COLORRES                   =  108;
define inline-only constant $PHYSICALWIDTH              =  110;
define inline-only constant $PHYSICALHEIGHT             =  111;
define inline-only constant $PHYSICALOFFSETX            =  112;
define inline-only constant $PHYSICALOFFSETY            =  113;
define inline-only constant $SCALINGFACTORX             =  114;
define inline-only constant $SCALINGFACTORY             =  115;
define inline-only constant $VREFRESH                   =  116;
define inline-only constant $DESKTOPVERTRES             =  117;
define inline-only constant $DESKTOPHORZRES             =  118;
define inline-only constant $BLTALIGNMENT               =  119;
define inline-only constant $DT-PLOTTER                 =    0;
define inline-only constant $DT-RASDISPLAY              =    1;
define inline-only constant $DT-RASPRINTER              =    2;
define inline-only constant $DT-RASCAMERA               =    3;
define inline-only constant $DT-CHARSTREAM              =    4;
define inline-only constant $DT-METAFILE                =    5;
define inline-only constant $DT-DISPFILE                =    6;
define inline-only constant $CC-NONE                    =    0;
define inline-only constant $CC-CIRCLES                 =    1;
define inline-only constant $CC-PIE                     =    2;
define inline-only constant $CC-CHORD                   =    4;
define inline-only constant $CC-ELLIPSES                =    8;
define inline-only constant $CC-WIDE                    =   16;
define inline-only constant $CC-STYLED                  =   32;
define inline-only constant $CC-WIDESTYLED              =   64;
define inline-only constant $CC-INTERIORS               =  128;
define inline-only constant $CC-ROUNDRECT               =  256;
define inline-only constant $LC-NONE                    =    0;
define inline-only constant $LC-POLYLINE                =    2;
define inline-only constant $LC-MARKER                  =    4;
define inline-only constant $LC-POLYMARKER              =    8;
define inline-only constant $LC-WIDE                    =   16;
define inline-only constant $LC-STYLED                  =   32;
define inline-only constant $LC-WIDESTYLED              =   64;
define inline-only constant $LC-INTERIORS               =  128;
define inline-only constant $PC-NONE                    =    0;
define inline-only constant $PC-POLYGON                 =    1;
define inline-only constant $PC-RECTANGLE               =    2;
define inline-only constant $PC-WINDPOLYGON             =    4;
define inline-only constant $PC-TRAPEZOID               =    4;
define inline-only constant $PC-SCANLINE                =    8;
define inline-only constant $PC-WIDE                    =   16;
define inline-only constant $PC-STYLED                  =   32;
define inline-only constant $PC-WIDESTYLED              =   64;
define inline-only constant $PC-INTERIORS               =  128;
define inline-only constant $PC-POLYPOLYGON             =  256;
define inline-only constant $PC-PATHS                   =  512;
define inline-only constant $CP-NONE                    =    0;
define inline-only constant $CP-RECTANGLE               =    1;
define inline-only constant $CP-REGION                  =    2;
define inline-only constant $TC-OP-CHARACTER            = #x00000001;
define inline-only constant $TC-OP-STROKE               = #x00000002;
define inline-only constant $TC-CP-STROKE               = #x00000004;
define inline-only constant $TC-CR-90                   = #x00000008;
define inline-only constant $TC-CR-ANY                  = #x00000010;
define inline-only constant $TC-SF-X-YINDEP             = #x00000020;
define inline-only constant $TC-SA-DOUBLE               = #x00000040;
define inline-only constant $TC-SA-INTEGER              = #x00000080;
define inline-only constant $TC-SA-CONTIN               = #x00000100;
define inline-only constant $TC-EA-DOUBLE               = #x00000200;
define inline-only constant $TC-IA-ABLE                 = #x00000400;
define inline-only constant $TC-UA-ABLE                 = #x00000800;
define inline-only constant $TC-SO-ABLE                 = #x00001000;
define inline-only constant $TC-RA-ABLE                 = #x00002000;
define inline-only constant $TC-VA-ABLE                 = #x00004000;
define inline-only constant $TC-RESERVED                = #x00008000;
define inline-only constant $TC-SCROLLBLT               = #x00010000;
define inline-only constant $RC-BITBLT                  =    1;
define inline-only constant $RC-BANDING                 =    2;
define inline-only constant $RC-SCALING                 =    4;
define inline-only constant $RC-BITMAP64                =    8;
define inline-only constant $RC-GDI20-OUTPUT            = #x0010;
define inline-only constant $RC-GDI20-STATE             = #x0020;
define inline-only constant $RC-SAVEBITMAP              = #x0040;
define inline-only constant $RC-DI-BITMAP               = #x0080;
define inline-only constant $RC-PALETTE                 = #x0100;
define inline-only constant $RC-DIBTODEV                = #x0200;
define inline-only constant $RC-BIGFONT                 = #x0400;
define inline-only constant $RC-STRETCHBLT              = #x0800;
define inline-only constant $RC-FLOODFILL               = #x1000;
define inline-only constant $RC-STRETCHDIB              = #x2000;
define inline-only constant $RC-OP-DX-OUTPUT            = #x4000;
define inline-only constant $RC-DEVBITS                 = #x8000;
define inline-only constant $DIB-RGB-COLORS             =    0;
define inline-only constant $DIB-PAL-COLORS             =    1;
define inline-only constant $SYSPAL-ERROR               =    0;
define inline-only constant $SYSPAL-STATIC              =    1;
define inline-only constant $SYSPAL-NOSTATIC            =    2;
define inline-only constant $SYSPAL-NOSTATIC256         =    3;
define inline-only constant $CBM-INIT                   = #x04;
define inline-only constant $FLOODFILLBORDER            =    0;
define inline-only constant $FLOODFILLSURFACE           =    1;
define inline-only constant $CCHDEVICENAME              =   32;
define inline-only constant $CCHFORMNAME                =   32;
define C-struct <s%1>
  sealed inline-only slot dmOrientation-value :: <C-short>;
  sealed inline-only slot dmPaperSize-value :: <C-short>;
  sealed inline-only slot dmPaperLength-value :: <C-short>;
  sealed inline-only slot dmPaperWidth-value :: <C-short>;
end;
define C-union <u%2>
  sealed inline-only slot u-value        :: <s%1>;
  sealed inline-only slot dmPosition-value :: <POINTL>;
end;

define C-struct <DEVMODEA>
  sealed inline-only array slot dmDeviceName-array :: <C-BYTE>,
	length: $CCHDEVICENAME, address-getter: dmDeviceName-value;
  sealed inline-only slot dmSpecVersion-value :: <WORD>;
  sealed inline-only slot dmDriverVersion-value :: <WORD>;
  sealed inline-only slot dmSize-value   :: <WORD>;
  sealed inline-only slot dmDriverExtra-value :: <WORD>;
  sealed inline-only slot dmFields-value :: <DWORD>;
  sealed inline-only slot u-value        :: <u%2>;
  sealed inline-only slot dmScale-value  :: <C-short>;
  sealed inline-only slot dmCopies-value :: <C-short>;
  sealed inline-only slot dmDefaultSource-value :: <C-short>;
  sealed inline-only slot dmPrintQuality-value :: <C-short>;
  sealed inline-only slot dmColor-value  :: <C-short>;
  sealed inline-only slot dmDuplex-value :: <C-short>;
  sealed inline-only slot dmYResolution-value :: <C-short>;
  sealed inline-only slot dmTTOption-value :: <C-short>;
  sealed inline-only slot dmCollate-value :: <C-short>;
  sealed inline-only array slot dmFormName-array :: <C-BYTE>,
	length: $CCHFORMNAME, address-getter: dmFormName-value;
  sealed inline-only slot dmLogPixels-value :: <WORD>;
  sealed inline-only slot dmBitsPerPel-value :: <DWORD>;
  sealed inline-only slot dmPelsWidth-value :: <DWORD>;
  sealed inline-only slot dmPelsHeight-value :: <DWORD>;
  sealed inline-only slot dmDisplayFlags-value :: <DWORD>;
  sealed inline-only slot dmDisplayFrequency-value :: <DWORD>;
  sealed inline-only slot dmICMMethod-value :: <DWORD>;
  sealed inline-only slot dmICMIntent-value :: <DWORD>;
  sealed inline-only slot dmMediaType-value :: <DWORD>;
  sealed inline-only slot dmDitherType-value :: <DWORD>;
  sealed inline-only slot dmReserved1    :: <DWORD>;
  sealed inline-only slot dmReserved2    :: <DWORD>;
  pointer-type-name: <LPDEVMODEA>;
  c-name: "struct _devicemodeA";
end C-struct <DEVMODEA>;
define inline constant <PDEVMODEA> = <LPDEVMODEA>;
define inline constant <DEVMODE> = <DEVMODEA>;
define inline constant <PDEVMODE> = <PDEVMODEA>;
define inline constant <LPDEVMODE> = <LPDEVMODEA>;
define inline-only constant $DM-SPECVERSION             = #x0400;
define inline-only constant $DM-ORIENTATION             = #x00000001;
define inline-only constant $DM-PAPERSIZE               = #x00000002;
define inline-only constant $DM-PAPERLENGTH             = #x00000004;
define inline-only constant $DM-PAPERWIDTH              = #x00000008;
define inline-only constant $DM-SCALE                   = #x00000010;
define inline-only constant $DM-COPIES                  = #x00000100;
define inline-only constant $DM-DEFAULTSOURCE           = #x00000200;
define inline-only constant $DM-PRINTQUALITY            = #x00000400;
define inline-only constant $DM-COLOR                   = #x00000800;
define inline-only constant $DM-DUPLEX                  = #x00001000;
define inline-only constant $DM-YRESOLUTION             = #x00002000;
define inline-only constant $DM-TTOPTION                = #x00004000;
define inline-only constant $DM-COLLATE                 = #x00008000;
define inline-only constant $DM-FORMNAME                = #x00010000;
define inline-only constant $DM-LOGPIXELS               = #x00020000;
define inline-only constant $DM-BITSPERPEL              = #x00040000;
define inline-only constant $DM-PELSWIDTH               = #x00080000;
define inline-only constant $DM-PELSHEIGHT              = #x00100000;
define inline-only constant $DM-DISPLAYFLAGS            = #x00200000;
define inline-only constant $DM-DISPLAYFREQUENCY        = #x00400000;
define inline-only constant $DM-ICMMETHOD               = #x00800000;
define inline-only constant $DM-ICMINTENT               = #x01000000;
define inline-only constant $DM-MEDIATYPE               = #x02000000;
define inline-only constant $DM-DITHERTYPE              = #x04000000;
define inline-only constant $DM-PANNINGWIDTH            = #x08000000;
define inline-only constant $DM-PANNINGHEIGHT           =
	as(<machine-word>, #x10000000);
define inline-only constant $DMORIENT-PORTRAIT          =    1;
define inline-only constant $DMORIENT-LANDSCAPE         =    2;
define inline-only constant $DMPAPER-LETTER             =    1;
define inline-only constant $DMPAPER-LETTERSMALL        =    2;
define inline-only constant $DMPAPER-TABLOID            =    3;
define inline-only constant $DMPAPER-LEDGER             =    4;
define inline-only constant $DMPAPER-LEGAL              =    5;
define inline-only constant $DMPAPER-STATEMENT          =    6;
define inline-only constant $DMPAPER-EXECUTIVE          =    7;
define inline-only constant $DMPAPER-A3                 =    8;
define inline-only constant $DMPAPER-A4                 =    9;
define inline-only constant $DMPAPER-A4SMALL            =   10;
define inline-only constant $DMPAPER-A5                 =   11;
define inline-only constant $DMPAPER-B4                 =   12;
define inline-only constant $DMPAPER-B5                 =   13;
define inline-only constant $DMPAPER-FOLIO              =   14;
define inline-only constant $DMPAPER-QUARTO             =   15;
define inline-only constant $DMPAPER-10X14              =   16;
define inline-only constant $DMPAPER-11X17              =   17;
define inline-only constant $DMPAPER-NOTE               =   18;
define inline-only constant $DMPAPER-ENV-9              =   19;
define inline-only constant $DMPAPER-ENV-10             =   20;
define inline-only constant $DMPAPER-ENV-11             =   21;
define inline-only constant $DMPAPER-ENV-12             =   22;
define inline-only constant $DMPAPER-ENV-14             =   23;
define inline-only constant $DMPAPER-CSHEET             =   24;
define inline-only constant $DMPAPER-DSHEET             =   25;
define inline-only constant $DMPAPER-ESHEET             =   26;
define inline-only constant $DMPAPER-ENV-DL             =   27;
define inline-only constant $DMPAPER-ENV-C5             =   28;
define inline-only constant $DMPAPER-ENV-C3             =   29;
define inline-only constant $DMPAPER-ENV-C4             =   30;
define inline-only constant $DMPAPER-ENV-C6             =   31;
define inline-only constant $DMPAPER-ENV-C65            =   32;
define inline-only constant $DMPAPER-ENV-B4             =   33;
define inline-only constant $DMPAPER-ENV-B5             =   34;
define inline-only constant $DMPAPER-ENV-B6             =   35;
define inline-only constant $DMPAPER-ENV-ITALY          =   36;
define inline-only constant $DMPAPER-ENV-MONARCH        =   37;
define inline-only constant $DMPAPER-ENV-PERSONAL       =   38;
define inline-only constant $DMPAPER-FANFOLD-US         =   39;
define inline-only constant $DMPAPER-FANFOLD-STD-GERMAN =   40;
define inline-only constant $DMPAPER-FANFOLD-LGL-GERMAN =   41;
define inline-only constant $DMPAPER-ISO-B4             =   42;
define inline-only constant $DMPAPER-JAPANESE-POSTCARD  =   43;
define inline-only constant $DMPAPER-9X11               =   44;
define inline-only constant $DMPAPER-10X11              =   45;
define inline-only constant $DMPAPER-15X11              =   46;
define inline-only constant $DMPAPER-ENV-INVITE         =   47;
define inline-only constant $DMPAPER-RESERVED-48        =   48;
define inline-only constant $DMPAPER-RESERVED-49        =   49;
define inline-only constant $DMPAPER-LETTER-EXTRA       =   50;
define inline-only constant $DMPAPER-LEGAL-EXTRA        =   51;
define inline-only constant $DMPAPER-TABLOID-EXTRA      =   52;
define inline-only constant $DMPAPER-A4-EXTRA           =   53;
define inline-only constant $DMPAPER-LETTER-TRANSVERSE  =   54;
define inline-only constant $DMPAPER-A4-TRANSVERSE      =   55;
define inline-only constant $DMPAPER-LETTER-EXTRA-TRANSVERSE =   56;
define inline-only constant $DMPAPER-A-PLUS             =   57;
define inline-only constant $DMPAPER-B-PLUS             =   58;
define inline-only constant $DMPAPER-LETTER-PLUS        =   59;
define inline-only constant $DMPAPER-A4-PLUS            =   60;
define inline-only constant $DMPAPER-A5-TRANSVERSE      =   61;
define inline-only constant $DMPAPER-B5-TRANSVERSE      =   62;
define inline-only constant $DMPAPER-A3-EXTRA           =   63;
define inline-only constant $DMPAPER-A5-EXTRA           =   64;
define inline-only constant $DMPAPER-B5-EXTRA           =   65;
define inline-only constant $DMPAPER-A2                 =   66;
define inline-only constant $DMPAPER-A3-TRANSVERSE      =   67;
define inline-only constant $DMPAPER-A3-EXTRA-TRANSVERSE =   68;
define inline-only constant $DMPAPER-USER               =  256;
define inline-only constant $DMBIN-UPPER                =    1;
define inline-only constant $DMBIN-ONLYONE              =    1;
define inline-only constant $DMBIN-LOWER                =    2;
define inline-only constant $DMBIN-MIDDLE               =    3;
define inline-only constant $DMBIN-MANUAL               =    4;
define inline-only constant $DMBIN-ENVELOPE             =    5;
define inline-only constant $DMBIN-ENVMANUAL            =    6;
define inline-only constant $DMBIN-AUTO                 =    7;
define inline-only constant $DMBIN-TRACTOR              =    8;
define inline-only constant $DMBIN-SMALLFMT             =    9;
define inline-only constant $DMBIN-LARGEFMT             =   10;
define inline-only constant $DMBIN-LARGECAPACITY        =   11;
define inline-only constant $DMBIN-CASSETTE             =   14;
define inline-only constant $DMBIN-FORMSOURCE           =   15;
define inline-only constant $DMBIN-USER                 =  256;
define inline-only constant $DMRES-DRAFT                =   -1;
define inline-only constant $DMRES-LOW                  =   -2;
define inline-only constant $DMRES-MEDIUM               =   -3;
define inline-only constant $DMRES-HIGH                 =   -4;
define inline-only constant $DMCOLOR-MONOCHROME         =    1;
define inline-only constant $DMCOLOR-COLOR              =    2;
define inline-only constant $DMDUP-SIMPLEX              =    1;
define inline-only constant $DMDUP-VERTICAL             =    2;
define inline-only constant $DMDUP-HORIZONTAL           =    3;
define inline-only constant $DMTT-BITMAP                =    1;
define inline-only constant $DMTT-DOWNLOAD              =    2;
define inline-only constant $DMTT-SUBDEV                =    3;
define inline-only constant $DMTT-DOWNLOAD-OUTLINE      =    4;
define inline-only constant $DMCOLLATE-FALSE            =    0;
define inline-only constant $DMCOLLATE-TRUE             =    1;
define inline-only constant $DMDISPLAYFLAGS-TEXTMODE    = #x00000004;
define inline-only constant $DMICMMETHOD-NONE           =    1;
define inline-only constant $DMICMMETHOD-SYSTEM         =    2;
define inline-only constant $DMICMMETHOD-DRIVER         =    3;
define inline-only constant $DMICMMETHOD-DEVICE         =    4;
define inline-only constant $DMICMMETHOD-USER           =  256;
define inline-only constant $DMICM-SATURATE             =    1;
define inline-only constant $DMICM-CONTRAST             =    2;
define inline-only constant $DMICM-COLORIMETRIC         =    3;
define inline-only constant $DMICM-ABS-COLORIMETRIC     =    4;
define inline-only constant $DMICM-USER                 =  256;
define inline-only constant $DMMEDIA-STANDARD           =    1;
define inline-only constant $DMMEDIA-TRANSPARENCY       =    2;
define inline-only constant $DMMEDIA-GLOSSY             =    3;
define inline-only constant $DMMEDIA-USER               =  256;
define inline-only constant $DMDITHER-NONE              =    1;
define inline-only constant $DMDITHER-COARSE            =    2;
define inline-only constant $DMDITHER-FINE              =    3;
define inline-only constant $DMDITHER-LINEART           =    4;
define inline-only constant $DMDITHER-ERRORDIFFUSION    =    5;
define inline-only constant $DMDITHER-RESERVED6         =    6;
define inline-only constant $DMDITHER-RESERVED7         =    7;
define inline-only constant $DMDITHER-RESERVED8         =    8;
define inline-only constant $DMDITHER-RESERVED9         =    9;
define inline-only constant $DMDITHER-GRAYSCALE         =   10;
define inline-only constant $DMDITHER-USER              =  256;

define C-struct <DISPLAY-DEVICEA>
  sealed inline-only slot cb-value       :: <DWORD>;
  sealed inline-only array slot DeviceName-array :: <C-BYTE>,
	length: 32, address-getter: DeviceName-value;
  sealed inline-only array slot DeviceString-array :: <C-BYTE>,
	length: 128, address-getter: DeviceString-value;
  sealed inline-only slot StateFlags-value :: <DWORD>;
  pointer-type-name: <LPDISPLAY-DEVICEA>;
  c-name: "struct _DISPLAY_DEVICEA";
end C-struct <DISPLAY-DEVICEA>;
define inline constant <PDISPLAY-DEVICEA> = <LPDISPLAY-DEVICEA>;
define inline constant <DISPLAY-DEVICE> = <DISPLAY-DEVICEA>;
define inline constant <PDISPLAY-DEVICE> = <PDISPLAY-DEVICEA>;
define inline constant <LPDISPLAY-DEVICE> = <LPDISPLAY-DEVICEA>;
define inline-only constant $DISPLAY-DEVICE-ATTACHED-TO-DESKTOP =
	#x00000001;
define inline-only constant $DISPLAY-DEVICE-MULTI-DRIVER =
	#x00000002;
define inline-only constant $DISPLAY-DEVICE-PRIMARY-DEVICE =
	#x00000004;
define inline-only constant $DISPLAY-DEVICE-MIRRORING-DRIVER =
	#x00000008;
define inline-only constant $DISPLAY-DEVICE-VGA-COMPATIBLE =
	#x00000010;
define inline-only constant $RDH-RECTANGLES             =    1;

define C-struct <RGNDATAHEADER>
  sealed inline-only slot dwSize-value   :: <DWORD>;
  sealed inline-only slot iType-value    :: <DWORD>;
  sealed inline-only slot nCount-value   :: <DWORD>;
  sealed inline-only slot nRgnSize-value :: <DWORD>;
  sealed inline-only slot rcBound-value  :: <RECT>;
  pointer-type-name: <LPRGNDATAHEADER>;
  c-name: "struct _RGNDATAHEADER";
end C-struct <RGNDATAHEADER>;
define inline constant <PRGNDATAHEADER> = <LPRGNDATAHEADER>;

define C-struct <RGNDATA>
  sealed inline-only slot rdh-value      :: <RGNDATAHEADER>;
  sealed inline-only array slot Buffer-array :: <C-char>, length: 1,
	address-getter: Buffer-value;
  pointer-type-name: <LPRGNDATA>;
  c-name: "struct _RGNDATA";
end C-struct <RGNDATA>;
define inline constant <PRGNDATA> = <LPRGNDATA>;

define C-struct <ABC>
  sealed inline-only slot abcA-value     :: <C-int>;
  sealed inline-only slot abcB-value     :: <UINT>;
  sealed inline-only slot abcC-value     :: <C-int>;
  pointer-type-name: <LPABC>;
  c-name: "struct _ABC";
end C-struct <ABC>;
define inline constant <PABC> = <LPABC>;

define C-struct <ABCFLOAT>
  sealed inline-only slot abcfA-value    :: <C-FLOAT>;
  sealed inline-only slot abcfB-value    :: <C-FLOAT>;
  sealed inline-only slot abcfC-value    :: <C-FLOAT>;
  pointer-type-name: <LPABCFLOAT>;
  c-name: "struct _ABCFLOAT";
end C-struct <ABCFLOAT>;
define inline constant <PABCFLOAT> = <LPABCFLOAT>;

define C-struct <OUTLINETEXTMETRICA>
  sealed inline-only slot otmSize-value  :: <UINT>;
  sealed inline-only slot otmTextMetrics-value :: <TEXTMETRICA>;
  sealed inline-only slot otmFiller-value :: <C-BYTE>;
  sealed inline-only slot otmPanoseNumber-value :: <PANOSE>;
  sealed inline-only slot otmfsSelection-value :: <UINT>;
  sealed inline-only slot otmfsType-value :: <UINT>;
  sealed inline-only slot otmsCharSlopeRise-value :: <C-int>;
  sealed inline-only slot otmsCharSlopeRun-value :: <C-int>;
  sealed inline-only slot otmItalicAngle-value :: <C-int>;
  sealed inline-only slot otmEMSquare-value :: <UINT>;
  sealed inline-only slot otmAscent-value :: <C-int>;
  sealed inline-only slot otmDescent-value :: <C-int>;
  sealed inline-only slot otmLineGap-value :: <UINT>;
  sealed inline-only slot otmsCapEmHeight-value :: <UINT>;
  sealed inline-only slot otmsXHeight-value :: <UINT>;
  sealed inline-only slot otmrcFontBox-value :: <RECT>;
  sealed inline-only slot otmMacAscent-value :: <C-int>;
  sealed inline-only slot otmMacDescent-value :: <C-int>;
  sealed inline-only slot otmMacLineGap-value :: <UINT>;
  sealed inline-only slot otmusMinimumPPEM-value :: <UINT>;
  sealed inline-only slot otmptSubscriptSize-value :: <POINT>;
  sealed inline-only slot otmptSubscriptOffset-value :: <POINT>;
  sealed inline-only slot otmptSuperscriptSize-value :: <POINT>;
  sealed inline-only slot otmptSuperscriptOffset-value :: <POINT>;
  sealed inline-only slot otmsStrikeoutSize-value :: <UINT>;
  sealed inline-only slot otmsStrikeoutPosition-value :: <C-int>;
  sealed inline-only slot otmsUnderscoreSize-value :: <C-int>;
  sealed inline-only slot otmsUnderscorePosition-value :: <C-int>;
  sealed inline-only slot otmpFamilyName-value :: <PSTR>;
  sealed inline-only slot otmpFaceName-value :: <PSTR>;
  sealed inline-only slot otmpStyleName-value :: <PSTR>;
  sealed inline-only slot otmpFullName-value :: <PSTR>;
  pointer-type-name: <LPOUTLINETEXTMETRICA>;
  c-name: "struct _OUTLINETEXTMETRICA";
end C-struct <OUTLINETEXTMETRICA>;
define inline constant <POUTLINETEXTMETRICA> = <LPOUTLINETEXTMETRICA>;
define inline constant <OUTLINETEXTMETRIC> = <OUTLINETEXTMETRICA>;
define inline constant <POUTLINETEXTMETRIC> = <POUTLINETEXTMETRICA>;
define inline constant <LPOUTLINETEXTMETRIC> = <LPOUTLINETEXTMETRICA>;

define C-struct <POLYTEXTA>
  sealed inline-only slot x-value        :: <C-int>;
  sealed inline-only slot y-value        :: <C-int>;
  sealed inline-only slot n-value        :: <UINT>;
  sealed inline-only slot lpstr-value    :: <LPCSTR>;
  sealed inline-only slot uiFlags-value  :: <UINT>;
  sealed inline-only slot rcl-value      :: <RECT>;
  sealed inline-only slot pdx-value      :: <C-int*>;
  pointer-type-name: <LPPOLYTEXTA>;
  c-name: "struct tagPOLYTEXTA";
end C-struct <POLYTEXTA>;
define inline constant <PPOLYTEXTA> = <LPPOLYTEXTA>;
define inline constant <POLYTEXT> = <POLYTEXTA>;
define inline constant <PPOLYTEXT> = <PPOLYTEXTA>;
define inline constant <LPPOLYTEXT> = <LPPOLYTEXTA>;

define C-struct <FIXED>
  sealed inline-only slot fract-value    :: <WORD>;
  sealed inline-only slot value-value    :: <C-short>;
  pointer-type-name: <LPFIXED>;
  c-name: "struct _FIXED";
end C-struct <FIXED>;

define C-struct <MAT2>
  sealed inline-only slot eM11-value     :: <FIXED>;
  sealed inline-only slot eM12-value     :: <FIXED>;
  sealed inline-only slot eM21-value     :: <FIXED>;
  sealed inline-only slot eM22-value     :: <FIXED>;
  pointer-type-name: <LPMAT2>;
  c-name: "struct _MAT2";
end C-struct <MAT2>;

define C-struct <GLYPHMETRICS>
  sealed inline-only slot gmBlackBoxX-value :: <UINT>;
  sealed inline-only slot gmBlackBoxY-value :: <UINT>;
  sealed inline-only slot gmptGlyphOrigin-value :: <POINT>;
  sealed inline-only slot gmCellIncX-value :: <C-short>;
  sealed inline-only slot gmCellIncY-value :: <C-short>;
  pointer-type-name: <LPGLYPHMETRICS>;
  c-name: "struct _GLYPHMETRICS";
end C-struct <GLYPHMETRICS>;
define inline-only constant $GGO-METRICS                =    0;
define inline-only constant $GGO-BITMAP                 =    1;
define inline-only constant $GGO-NATIVE                 =    2;
define inline-only constant $GGO-BEZIER                 =    3;
define inline-only constant $GGO-GRAY2-BITMAP           =    4;
define inline-only constant $GGO-GRAY4-BITMAP           =    5;
define inline-only constant $GGO-GRAY8-BITMAP           =    6;
define inline-only constant $GGO-GLYPH-INDEX            = #x0080;
define inline-only constant $TT-POLYGON-TYPE            =   24;
define inline-only constant $TT-PRIM-LINE               =    1;
define inline-only constant $TT-PRIM-QSPLINE            =    2;
define inline-only constant $TT-PRIM-CSPLINE            =    3;

define C-struct <POINTFX>
  sealed inline-only slot x-value        :: <FIXED>;
  sealed inline-only slot y-value        :: <FIXED>;
  pointer-type-name: <LPPOINTFX>;
  c-name: "struct tagPOINTFX";
end C-struct <POINTFX>;

define C-struct <TTPOLYCURVE>
  sealed inline-only slot wType-value    :: <WORD>;
  sealed inline-only slot cpfx-value     :: <WORD>;
  sealed inline-only array slot apfx-array :: <POINTFX>, length: 1,
	address-getter: apfx-value;
  pointer-type-name: <LPTTPOLYCURVE>;
  c-name: "struct tagTTPOLYCURVE";
end C-struct <TTPOLYCURVE>;

define C-struct <TTPOLYGONHEADER>
  sealed inline-only slot cb-value       :: <DWORD>;
  sealed inline-only slot dwType-value   :: <DWORD>;
  sealed inline-only slot pfxStart-value :: <POINTFX>;
  pointer-type-name: <LPTTPOLYGONHEADER>;
  c-name: "struct tagTTPOLYGONHEADER";
end C-struct <TTPOLYGONHEADER>;
define inline-only constant $GCP-DBCS                   = #x0001;
define inline-only constant $GCP-REORDER                = #x0002;
define inline-only constant $GCP-USEKERNING             = #x0008;
define inline-only constant $GCP-GLYPHSHAPE             = #x0010;
define inline-only constant $GCP-LIGATE                 = #x0020;
define inline-only constant $GCP-DIACRITIC              = #x0100;
define inline-only constant $GCP-KASHIDA                = #x0400;
define inline-only constant $GCP-ERROR                  = #x8000;
define inline-only constant $FLI-MASK                   = #x103B;
define inline-only constant $GCP-JUSTIFY                = #x00010000;
define inline-only constant $FLI-GLYPHS                 = #x00040000;
define inline-only constant $GCP-CLASSIN                = #x00080000;
define inline-only constant $GCP-MAXEXTENT              = #x00100000;
define inline-only constant $GCP-JUSTIFYIN              = #x00200000;
define inline-only constant $GCP-DISPLAYZWG             = #x00400000;
define inline-only constant $GCP-SYMSWAPOFF             = #x00800000;
define inline-only constant $GCP-NUMERICOVERRIDE        = #x01000000;
define inline-only constant $GCP-NEUTRALOVERRIDE        = #x02000000;
define inline-only constant $GCP-NUMERICSLATIN          = #x04000000;
define inline-only constant $GCP-NUMERICSLOCAL          = #x08000000;
define inline-only constant $GCPCLASS-LATIN             =    1;
define inline-only constant $GCPCLASS-HEBREW            =    2;
define inline-only constant $GCPCLASS-ARABIC            =    2;
define inline-only constant $GCPCLASS-NEUTRAL           =    3;
define inline-only constant $GCPCLASS-LOCALNUMBER       =    4;
define inline-only constant $GCPCLASS-LATINNUMBER       =    5;
define inline-only constant $GCPCLASS-LATINNUMERICTERMINATOR =    6;
define inline-only constant $GCPCLASS-LATINNUMERICSEPARATOR =    7;
define inline-only constant $GCPCLASS-NUMERICSEPARATOR  =    8;
define inline-only constant $GCPCLASS-PREBOUNDLTR       = #x80;
define inline-only constant $GCPCLASS-PREBOUNDRTL       = #x40;
define inline-only constant $GCPCLASS-POSTBOUNDLTR      = #x20;
define inline-only constant $GCPCLASS-POSTBOUNDRTL      = #x10;
define inline-only constant $GCPGLYPH-LINKBEFORE        = #x8000;
define inline-only constant $GCPGLYPH-LINKAFTER         = #x4000;

define C-struct <GCP-RESULTSA>
  sealed inline-only slot lStructSize-value :: <DWORD>;
  sealed inline-only slot lpOutString-value :: <LPSTR>;
  sealed inline-only slot lpOrder-value  :: <LPUINT>;
  sealed inline-only slot lpDx-value     :: <C-int*>;
  sealed inline-only slot lpCaretPos-value :: <C-int*>;
  sealed inline-only slot lpClass-value  :: <LPSTR>;
  sealed inline-only slot lpGlyphs-value :: <LPWSTR>;
  sealed inline-only slot nGlyphs-value  :: <UINT>;
  sealed inline-only slot nMaxFit-value  :: <C-int>;
  pointer-type-name: <LPGCP-RESULTSA>;
  c-name: "struct tagGCP_RESULTSA";
end C-struct <GCP-RESULTSA>;
define inline constant <GCP-RESULTS> = <GCP-RESULTSA>;
define inline constant <LPGCP-RESULTS> = <LPGCP-RESULTSA>;

define C-struct <RASTERIZER-STATUS>
  sealed inline-only slot nSize-value    :: <C-short>;
  sealed inline-only slot wFlags-value   :: <C-short>;
  sealed inline-only slot nLanguageID-value :: <C-short>;
  pointer-type-name: <LPRASTERIZER-STATUS>;
  c-name: "struct _RASTERIZER_STATUS";
end C-struct <RASTERIZER-STATUS>;
define inline-only constant $TT-AVAILABLE               = #x0001;
define inline-only constant $TT-ENABLED                 = #x0002;

define C-struct <PIXELFORMATDESCRIPTOR>
  sealed inline-only slot nSize-value    :: <WORD>;
  sealed inline-only slot nVersion-value :: <WORD>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iPixelType-value :: <C-BYTE>;
  sealed inline-only slot cColorBits-value :: <C-BYTE>;
  sealed inline-only slot cRedBits-value :: <C-BYTE>;
  sealed inline-only slot cRedShift-value :: <C-BYTE>;
  sealed inline-only slot cGreenBits-value :: <C-BYTE>;
  sealed inline-only slot cGreenShift-value :: <C-BYTE>;
  sealed inline-only slot cBlueBits-value :: <C-BYTE>;
  sealed inline-only slot cBlueShift-value :: <C-BYTE>;
  sealed inline-only slot cAlphaBits-value :: <C-BYTE>;
  sealed inline-only slot cAlphaShift-value :: <C-BYTE>;
  sealed inline-only slot cAccumBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumRedBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumGreenBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumBlueBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumAlphaBits-value :: <C-BYTE>;
  sealed inline-only slot cDepthBits-value :: <C-BYTE>;
  sealed inline-only slot cStencilBits-value :: <C-BYTE>;
  sealed inline-only slot cAuxBuffers-value :: <C-BYTE>;
  sealed inline-only slot iLayerType-value :: <C-BYTE>;
  sealed inline-only slot bReserved      :: <C-BYTE>;
  sealed inline-only slot dwLayerMask-value :: <DWORD>;
  sealed inline-only slot dwVisibleMask-value :: <DWORD>;
  sealed inline-only slot dwDamageMask-value :: <DWORD>;
  pointer-type-name: <LPPIXELFORMATDESCRIPTOR>;
  c-name: "struct tagPIXELFORMATDESCRIPTOR";
end C-struct <PIXELFORMATDESCRIPTOR>;
define inline constant <PPIXELFORMATDESCRIPTOR> = <LPPIXELFORMATDESCRIPTOR>;
define C-subtype <OLDFONTENUMPROCA> ( <C-function-pointer> ) end;
define inline constant <FONTENUMPROCA> = <OLDFONTENUMPROCA>;
define inline constant <FONTENUMPROC> = <FONTENUMPROCA>;
define C-subtype <GOBJENUMPROC> ( <C-function-pointer> ) end;
define C-subtype <LINEDDAPROC> ( <C-function-pointer> ) end;

define inline-only C-function AddFontResource
  parameter lpcstr1    :: <LPCSTR>;
  result value :: <C-int>;
  c-name: "AddFontResourceA", c-modifiers: "__stdcall";
end;

define inline-only C-function AnimatePalette
  parameter hpalette1  :: <HPALETTE>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lppaletteentry4 ::  /* const */ <LPPALETTEENTRY>;
  result value :: <BOOL>;
  c-name: "AnimatePalette", c-modifiers: "__stdcall";
end;

define inline-only C-function Arc
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Arc", c-modifiers: "__stdcall";
end;

define inline-only C-function BitBlt
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter hdc6       :: <HDC>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter dword9     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "BitBlt", c-modifiers: "__stdcall";
end;

define inline-only C-function Chord
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Chord", c-modifiers: "__stdcall";
end;

define inline-only C-function ChoosePixelFormat
  parameter hdc1       :: <HDC>;
  parameter lppixelformatdescriptor2 ::  /* const */ <LPPIXELFORMATDESCRIPTOR>;
  result value :: <C-int>;
  c-name: "ChoosePixelFormat", c-modifiers: "__stdcall";
end;

define inline-only C-function CloseMetaFile
  parameter hdc1       :: <HDC>;
  result value :: <HMETAFILE>;
  c-name: "CloseMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function CombineRgn
  parameter hrgn1      :: <HRGN>;
  parameter hrgn2      :: <HRGN>;
  parameter hrgn3      :: <HRGN>;
  parameter int4       :: <C-int>;
  result value :: <C-int>;
  c-name: "CombineRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyMetaFile
  parameter hmetafile1 :: <HMETAFILE>;
  parameter lpcstr2    :: <LPCSTR>;
  result value :: <HMETAFILE>;
  c-name: "CopyMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateBitmap
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter uint3      :: <UINT>;
  parameter uint4      :: <UINT>;
  parameter voidP5     ::  /* const */ <C-void*>;
  result value :: <HBITMAP>;
  c-name: "CreateBitmap", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateBitmapIndirect
  parameter lpbitmap1  ::  /* const */ <LPBITMAP>;
  result value :: <HBITMAP>;
  c-name: "CreateBitmapIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateBrushIndirect
  parameter lplogbrush1 ::  /* const */ <LPLOGBRUSH>;
  result value :: <HBRUSH>;
  c-name: "CreateBrushIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateCompatibleBitmap
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <HBITMAP>;
  c-name: "CreateCompatibleBitmap", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDiscardableBitmap
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <HBITMAP>;
  c-name: "CreateDiscardableBitmap", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateCompatibleDC
  parameter hdc1       :: <HDC>;
  result value :: <HDC>;
  c-name: "CreateCompatibleDC", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDC
  parameter lpcstr1    :: <LPCSTR>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter lpcstr3    :: <LPCSTR>;
  parameter lpdevmodea4 ::  /* const */ <LPDEVMODEA>;
  result value :: <HDC>;
  c-name: "CreateDCA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDIBitmap
  parameter hdc1       :: <HDC>;
  parameter lpbitmapinfoheader2 ::  /* const */ <LPBITMAPINFOHEADER>;
  parameter dword3     :: <DWORD>;
  parameter voidP4     ::  /* const */ <C-void*>;
  parameter lpbitmapinfo5 ::  /* const */ <LPBITMAPINFO>;
  parameter uint6      :: <UINT>;
  result value :: <HBITMAP>;
  c-name: "CreateDIBitmap", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDIBPatternBrush
  parameter hglobal1   :: <HGLOBAL>;
  parameter uint2      :: <UINT>;
  result value :: <HBRUSH>;
  c-name: "CreateDIBPatternBrush", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDIBPatternBrushPt
  parameter voidP1     ::  /* const */ <C-void*>;
  parameter uint2      :: <UINT>;
  result value :: <HBRUSH>;
  c-name: "CreateDIBPatternBrushPt", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateEllipticRgn
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  result value :: <HRGN>;
  c-name: "CreateEllipticRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateEllipticRgnIndirect
  parameter lprect1    ::  /* const */ <LPRECT>;
  result value :: <HRGN>;
  c-name: "CreateEllipticRgnIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateFontIndirect
  parameter lplogfonta1 ::  /* const */ <LPLOGFONTA>;
  result value :: <HFONT>;
  c-name: "CreateFontIndirectA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateFont
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter dword6     :: <DWORD>;
  parameter dword7     :: <DWORD>;
  parameter dword8     :: <DWORD>;
  parameter dword9     :: <DWORD>;
  parameter dword10    :: <DWORD>;
  parameter dword11    :: <DWORD>;
  parameter dword12    :: <DWORD>;
  parameter dword13    :: <DWORD>;
  parameter lpcstr14   :: <LPCSTR>;
  result value :: <HFONT>;
  c-name: "CreateFontA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateHatchBrush
  parameter int1       :: <C-int>;
  parameter colorref2  :: <COLORREF>;
  result value :: <HBRUSH>;
  c-name: "CreateHatchBrush", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateIC
  parameter lpcstr1    :: <LPCSTR>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter lpcstr3    :: <LPCSTR>;
  parameter lpdevmodea4 ::  /* const */ <LPDEVMODEA>;
  result value :: <HDC>;
  c-name: "CreateICA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateMetaFile
  parameter lpcstr1    :: <LPCSTR>;
  result value :: <HDC>;
  c-name: "CreateMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePalette
  parameter lplogpalette1 ::  /* const */ <LPLOGPALETTE>;
  result value :: <HPALETTE>;
  c-name: "CreatePalette", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePen
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter colorref3  :: <COLORREF>;
  result value :: <HPEN>;
  c-name: "CreatePen", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePenIndirect
  parameter lplogpen1  ::  /* const */ <LPLOGPEN>;
  result value :: <HPEN>;
  c-name: "CreatePenIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePolyPolygonRgn
  parameter lppoint1   ::  /* const */ <LPPOINT>;
  parameter lpint2     ::  /* const */ <LPINT>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  result value :: <HRGN>;
  c-name: "CreatePolyPolygonRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePatternBrush
  parameter hbitmap1   :: <HBITMAP>;
  result value :: <HBRUSH>;
  c-name: "CreatePatternBrush", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateRectRgn
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  result value :: <HRGN>;
  c-name: "CreateRectRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateRectRgnIndirect
  parameter lprect1    ::  /* const */ <LPRECT>;
  result value :: <HRGN>;
  c-name: "CreateRectRgnIndirect", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateRoundRectRgn
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  result value :: <HRGN>;
  c-name: "CreateRoundRectRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateScalableFontResource
  parameter dword1     :: <DWORD>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter lpcstr3    :: <LPCSTR>;
  parameter lpcstr4    :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "CreateScalableFontResourceA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateSolidBrush
  parameter colorref1  :: <COLORREF>;
  result value :: <HBRUSH>;
  c-name: "CreateSolidBrush", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteDC
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "DeleteDC", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteMetaFile
  parameter hmetafile1 :: <HMETAFILE>;
  result value :: <BOOL>;
  c-name: "DeleteMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteObject
  parameter hgdiobj1   :: <HGDIOBJ>;
  result value :: <BOOL>;
  c-name: "DeleteObject", c-modifiers: "__stdcall";
end;

define inline-only C-function DescribePixelFormat
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter uint3      :: <UINT>;
  parameter lppixelformatdescriptor4 :: <LPPIXELFORMATDESCRIPTOR>;
  result value :: <C-int>;
  c-name: "DescribePixelFormat", c-modifiers: "__stdcall";
end;
define C-subtype <LPFNDEVMODE> ( <C-function-pointer> ) end;
define C-subtype <LPFNDEVCAPS> ( <C-function-pointer> ) end;
define inline-only constant $DC-BINADJUST               =   19;
define inline-only constant $DC-EMF-COMPLIANT           =   20;
define inline-only constant $DC-DATATYPE-PRODUCED       =   21;
define inline-only constant $DC-COLLATE                 =   22;
define inline-only constant $DC-MANUFACTURER            =   23;
define inline-only constant $DC-MODEL                   =   24;
define inline-only constant $DCTT-BITMAP                = #x0000001;
define inline-only constant $DCTT-DOWNLOAD              = #x0000002;
define inline-only constant $DCTT-SUBDEV                = #x0000004;
define inline-only constant $DCTT-DOWNLOAD-OUTLINE      = #x0000008;
define inline-only constant $DCBA-FACEUPNONE            = #x0000;
define inline-only constant $DCBA-FACEUPCENTER          = #x0001;
define inline-only constant $DCBA-FACEUPLEFT            = #x0002;
define inline-only constant $DCBA-FACEUPRIGHT           = #x0003;
define inline-only constant $DCBA-FACEDOWNNONE          = #x0100;
define inline-only constant $DCBA-FACEDOWNCENTER        = #x0101;
define inline-only constant $DCBA-FACEDOWNLEFT          = #x0102;
define inline-only constant $DCBA-FACEDOWNRIGHT         = #x0103;

define inline-only C-function DrawEscape
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpcstr4    :: <LPCSTR>;
  result value :: <C-int>;
  c-name: "DrawEscape", c-modifiers: "__stdcall";
end;

define inline-only C-function Ellipse
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Ellipse", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumFontFamiliesEx
  parameter hdc1       :: <HDC>;
  parameter lplogfonta2 :: <LPLOGFONTA>;
  parameter fontenumproca3 :: <FONTENUMPROCA>;
  parameter lparam4    :: <LPARAM>;
  parameter dword5     :: <DWORD>;
  result value :: <C-int>;
  c-name: "EnumFontFamiliesExA", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumFontFamilies
  parameter hdc1       :: <HDC>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter fontenumproca3 :: <FONTENUMPROCA>;
  parameter lparam4    :: <LPARAM>;
  result value :: <C-int>;
  c-name: "EnumFontFamiliesA", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumObjects
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter gobjenumproc3 :: <GOBJENUMPROC>;
  parameter lparam4    :: <LPARAM>;
  result value :: <C-int>;
  c-name: "EnumObjects", c-modifiers: "__stdcall";
end;

define inline-only C-function EqualRgn
  parameter hrgn1      :: <HRGN>;
  parameter hrgn2      :: <HRGN>;
  result value :: <BOOL>;
  c-name: "EqualRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function Escape
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpcstr4    :: <LPCSTR>;
  parameter lpvoid5    :: <LPVOID>;
  result value :: <C-int>;
  c-name: "Escape", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtEscape
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpcstr4    :: <LPCSTR>;
  parameter int5       :: <C-int>;
  parameter lpstr6     :: <LPSTR>;
  result value :: <C-int>;
  c-name: "ExtEscape", c-modifiers: "__stdcall";
end;

define inline-only C-function ExcludeClipRect
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <C-int>;
  c-name: "ExcludeClipRect", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtCreateRegion
  parameter lpxform1   ::  /* const */ <LPXFORM>;
  parameter dword2     :: <DWORD>;
  parameter lprgndata3 ::  /* const */ <LPRGNDATA>;
  result value :: <HRGN>;
  c-name: "ExtCreateRegion", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtFloodFill
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter colorref4  :: <COLORREF>;
  parameter uint5      :: <UINT>;
  result value :: <BOOL>;
  c-name: "ExtFloodFill", c-modifiers: "__stdcall";
end;

define inline-only C-function FillRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  parameter hbrush3    :: <HBRUSH>;
  result value :: <BOOL>;
  c-name: "FillRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function FloodFill
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter colorref4  :: <COLORREF>;
  result value :: <BOOL>;
  c-name: "FloodFill", c-modifiers: "__stdcall";
end;

define inline-only C-function FrameRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  parameter hbrush3    :: <HBRUSH>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <BOOL>;
  c-name: "FrameRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function GetROP2
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetROP2", c-modifiers: "__stdcall";
end;

define inline-only C-function GetAspectRatioFilterEx
  parameter hdc1       :: <HDC>;
  parameter lpsize2    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetAspectRatioFilterEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetBkColor
  parameter hdc1       :: <HDC>;
  result value :: <COLORREF>;
  c-name: "GetBkColor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetBkMode
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetBkMode", c-modifiers: "__stdcall";
end;

define inline-only C-function GetBitmapDimensionEx
  parameter hbitmap1   :: <HBITMAP>;
  parameter lpsize2    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetBitmapDimensionEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetBoundsRect
  parameter hdc1       :: <HDC>;
  parameter lprect2    :: <LPRECT>;
  parameter uint3      :: <UINT>;
  result value :: <UINT>;
  c-name: "GetBoundsRect", c-modifiers: "__stdcall";
end;

define inline-only C-function GetBrushOrgEx
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetBrushOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharWidth
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lpint4     :: <LPINT>;
  result value :: <BOOL>;
  c-name: "GetCharWidthA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharWidth32
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lpint4     :: <LPINT>;
  result value :: <BOOL>;
  c-name: "GetCharWidth32A", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharWidthFloat
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter pfloat4    :: <PFLOAT>;
  result value :: <BOOL>;
  c-name: "GetCharWidthFloatA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharABCWidths
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lpabc4     :: <LPABC>;
  result value :: <BOOL>;
  c-name: "GetCharABCWidthsA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharABCWidthsFloat
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lpabcfloat4 :: <LPABCFLOAT>;
  result value :: <BOOL>;
  c-name: "GetCharABCWidthsFloatA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipBox
  parameter hdc1       :: <HDC>;
  parameter lprect2    :: <LPRECT>;
  result value :: <C-int>;
  c-name: "GetClipBox", c-modifiers: "__stdcall";
end;

define inline-only C-function GetClipRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  result value :: <C-int>;
  c-name: "GetClipRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMetaRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  result value :: <C-int>;
  c-name: "GetMetaRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCurrentObject
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  result value :: <HGDIOBJ>;
  c-name: "GetCurrentObject", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCurrentPositionEx
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetCurrentPositionEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDeviceCaps
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "GetDeviceCaps", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDIBits
  parameter hdc1       :: <HDC>;
  parameter hbitmap2   :: <HBITMAP>;
  parameter uint3      :: <UINT>;
  parameter uint4      :: <UINT>;
  parameter lpvoid5    :: <LPVOID>;
  parameter lpbitmapinfo6 :: <LPBITMAPINFO>;
  parameter uint7      :: <UINT>;
  result value :: <C-int>;
  c-name: "GetDIBits", c-modifiers: "__stdcall";
end;

define inline-only C-function GetFontData
  parameter hdc1       :: <HDC>;
  parameter dword2     :: <DWORD>;
  parameter dword3     :: <DWORD>;
  parameter lpvoid4    :: <LPVOID>;
  parameter dword5     :: <DWORD>;
  result value :: <DWORD>;
  c-name: "GetFontData", c-modifiers: "__stdcall";
end;

define inline-only C-function GetGlyphOutline
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lpglyphmetrics4 :: <LPGLYPHMETRICS>;
  parameter dword5     :: <DWORD>;
  parameter lpvoid6    :: <LPVOID>;
  parameter lpmat27    ::  /* const */ <LPMAT2>;
  result value :: <DWORD>;
  c-name: "GetGlyphOutlineA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetGraphicsMode
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetGraphicsMode", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMapMode
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetMapMode", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMetaFileBitsEx
  parameter hmetafile1 :: <HMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lpvoid3    :: <LPVOID>;
  result value :: <UINT>;
  c-name: "GetMetaFileBitsEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMetaFile
  parameter lpcstr1    :: <LPCSTR>;
  result value :: <HMETAFILE>;
  c-name: "GetMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetNearestColor
  parameter hdc1       :: <HDC>;
  parameter colorref2  :: <COLORREF>;
  result value :: <COLORREF>;
  c-name: "GetNearestColor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetNearestPaletteIndex
  parameter hpalette1  :: <HPALETTE>;
  parameter colorref2  :: <COLORREF>;
  result value :: <UINT>;
  c-name: "GetNearestPaletteIndex", c-modifiers: "__stdcall";
end;

define inline-only C-function GetObjectType
  parameter h          :: <HGDIOBJ>;
  result value :: <DWORD>;
  c-name: "GetObjectType", c-modifiers: "__stdcall";
end;

define inline-only C-function GetOutlineTextMetrics
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter lpoutlinetextmetrica3 :: <LPOUTLINETEXTMETRICA>;
  result value :: <UINT>;
  c-name: "GetOutlineTextMetricsA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPaletteEntries
  parameter hpalette1  :: <HPALETTE>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lppaletteentry4 :: <LPPALETTEENTRY>;
  result value :: <UINT>;
  c-name: "GetPaletteEntries", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPixel
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <COLORREF>;
  c-name: "GetPixel", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPixelFormat
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetPixelFormat", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPolyFillMode
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetPolyFillMode", c-modifiers: "__stdcall";
end;

define inline-only C-function GetRasterizerCaps
  parameter lprasterizerstatus1 :: <LPRASTERIZER-STATUS>;
  parameter uint2      :: <UINT>;
  result value :: <BOOL>;
  c-name: "GetRasterizerCaps", c-modifiers: "__stdcall";
end;

define inline-only C-function GetRegionData
  parameter hrgn1      :: <HRGN>;
  parameter dword2     :: <DWORD>;
  parameter lprgndata3 :: <LPRGNDATA>;
  result value :: <DWORD>;
  c-name: "GetRegionData", c-modifiers: "__stdcall";
end;

define inline-only C-function GetRgnBox
  parameter hrgn1      :: <HRGN>;
  parameter lprect2    :: <LPRECT>;
  result value :: <C-int>;
  c-name: "GetRgnBox", c-modifiers: "__stdcall";
end;

define inline-only C-function GetStockObject
  parameter int1       :: <C-int>;
  result value :: <HGDIOBJ>;
  c-name: "GetStockObject", c-modifiers: "__stdcall";
end;

define inline-only C-function GetStretchBltMode
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetStretchBltMode", c-modifiers: "__stdcall";
end;

define inline-only C-function GetSystemPaletteEntries
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lppaletteentry4 :: <LPPALETTEENTRY>;
  result value :: <UINT>;
  c-name: "GetSystemPaletteEntries", c-modifiers: "__stdcall";
end;

define inline-only C-function GetSystemPaletteUse
  parameter hdc1       :: <HDC>;
  result value :: <UINT>;
  c-name: "GetSystemPaletteUse", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextCharacterExtra
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetTextCharacterExtra", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextAlign
  parameter hdc1       :: <HDC>;
  result value :: <UINT>;
  c-name: "GetTextAlign", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextColor
  parameter hdc1       :: <HDC>;
  result value :: <COLORREF>;
  c-name: "GetTextColor", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextExtentPoint32
  parameter hdc1       :: <HDC>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter int3       :: <C-int>;
  parameter lpsize4    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetTextExtentPoint32A", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextExtentExPoint
  parameter hdc1       :: <HDC>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter lpint5     :: <LPINT>;
  parameter lpint6     :: <LPINT>;
  parameter lpsize7    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetTextExtentExPointA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextCharset
  parameter hdc        :: <HDC>;
  result value :: <C-int>;
  c-name: "GetTextCharset", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextCharsetInfo
  parameter hdc        :: <HDC>;
  parameter lpSig      :: <LPFONTSIGNATURE>;
  parameter dwFlags    :: <DWORD>;
  result value :: <C-int>;
  c-name: "GetTextCharsetInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function TranslateCharsetInfo
  parameter lpSrc      :: <LPDWORD>;
  parameter lpCs       :: <LPCHARSETINFO>;
  parameter dwFlags    :: <DWORD>;
  result value :: <BOOL>;
  c-name: "TranslateCharsetInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function GetFontLanguageInfo
  parameter hdc1       :: <HDC>;
  result value :: <DWORD>;
  c-name: "GetFontLanguageInfo", c-modifiers: "__stdcall";
end;

define inline-only C-function GetCharacterPlacement
  parameter hdc1       :: <HDC>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter lpgcpresultsa5 :: <LPGCP-RESULTSA>;
  parameter dword6     :: <DWORD>;
  result value :: <DWORD>;
  c-name: "GetCharacterPlacementA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetViewportExtEx
  parameter hdc1       :: <HDC>;
  parameter lpsize2    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetViewportExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetViewportOrgEx
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetViewportOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowExtEx
  parameter hdc1       :: <HDC>;
  parameter lpsize2    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "GetWindowExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWindowOrgEx
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetWindowOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function IntersectClipRect
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <C-int>;
  c-name: "IntersectClipRect", c-modifiers: "__stdcall";
end;

define inline-only C-function InvertRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  result value :: <BOOL>;
  c-name: "InvertRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function LineDDA
  parameter int1       :: <C-int>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter lineddaproc5 :: <LINEDDAPROC>;
  parameter lparam6    :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "LineDDA", c-modifiers: "__stdcall";
end;

define inline-only C-function LineTo
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "LineTo", c-modifiers: "__stdcall";
end;

define inline-only C-function PlgBlt
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter hdc3       :: <HDC>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter hbitmap8   :: <HBITMAP>;
  parameter int9       :: <C-int>;
  parameter int10      :: <C-int>;
  result value :: <BOOL>;
  c-name: "PlgBlt", c-modifiers: "__stdcall";
end;

define inline-only C-function OffsetClipRgn
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <C-int>;
  c-name: "OffsetClipRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function OffsetRgn
  parameter hrgn1      :: <HRGN>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <C-int>;
  c-name: "OffsetRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function PatBlt
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter dword6     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "PatBlt", c-modifiers: "__stdcall";
end;

define inline-only C-function Pie
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Pie", c-modifiers: "__stdcall";
end;

define inline-only C-function PlayMetaFile
  parameter hdc1       :: <HDC>;
  parameter hmetafile2 :: <HMETAFILE>;
  result value :: <BOOL>;
  c-name: "PlayMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function PaintRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  result value :: <BOOL>;
  c-name: "PaintRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function PolyPolygon
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter lpint3     ::  /* const */ <LPINT>;
  parameter int4       :: <C-int>;
  result value :: <BOOL>;
  c-name: "PolyPolygon", c-modifiers: "__stdcall";
end;

define inline-only C-function PtInRegion
  parameter hrgn1      :: <HRGN>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "PtInRegion", c-modifiers: "__stdcall";
end;

define inline-only C-function PtVisible
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "PtVisible", c-modifiers: "__stdcall";
end;

define inline-only C-function RectInRegion
  parameter hrgn1      :: <HRGN>;
  parameter lprect2    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "RectInRegion", c-modifiers: "__stdcall";
end;

define inline-only C-function RectVisible
  parameter hdc1       :: <HDC>;
  parameter lprect2    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "RectVisible", c-modifiers: "__stdcall";
end;

define inline-only C-function Rectangle
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Rectangle", c-modifiers: "__stdcall";
end;

define inline-only C-function RestoreDC
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <BOOL>;
  c-name: "RestoreDC", c-modifiers: "__stdcall";
end;

define inline-only C-function ResetDC
  parameter hdc1       :: <HDC>;
  parameter lpdevmodea2 ::  /* const */ <LPDEVMODEA>;
  result value :: <HDC>;
  c-name: "ResetDCA", c-modifiers: "__stdcall";
end;

define inline-only C-function RealizePalette
  parameter hdc1       :: <HDC>;
  result value :: <UINT>;
  c-name: "RealizePalette", c-modifiers: "__stdcall";
end;

define inline-only C-function RemoveFontResource
  parameter lpcstr1    :: <LPCSTR>;
  result value :: <BOOL>;
  c-name: "RemoveFontResourceA", c-modifiers: "__stdcall";
end;

define inline-only C-function RoundRect
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  result value :: <BOOL>;
  c-name: "RoundRect", c-modifiers: "__stdcall";
end;

define inline-only C-function ResizePalette
  parameter hpalette1  :: <HPALETTE>;
  parameter uint2      :: <UINT>;
  result value :: <BOOL>;
  c-name: "ResizePalette", c-modifiers: "__stdcall";
end;

define inline-only C-function SaveDC
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "SaveDC", c-modifiers: "__stdcall";
end;

define inline-only C-function SelectClipRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  result value :: <C-int>;
  c-name: "SelectClipRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtSelectClipRgn
  parameter hdc1       :: <HDC>;
  parameter hrgn2      :: <HRGN>;
  parameter int3       :: <C-int>;
  result value :: <C-int>;
  c-name: "ExtSelectClipRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMetaRgn
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "SetMetaRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function SelectObject
  parameter hdc1       :: <HDC>;
  parameter hgdiobj2   :: <HGDIOBJ>;
  result value :: <HGDIOBJ>;
  c-name: "SelectObject", c-modifiers: "__stdcall";
end;

define inline-only C-function SelectPalette
  parameter hdc1       :: <HDC>;
  parameter hpalette2  :: <HPALETTE>;
  parameter bool3      :: <BOOL>;
  result value :: <HPALETTE>;
  c-name: "SelectPalette", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBkColor
  parameter hdc1       :: <HDC>;
  parameter colorref2  :: <COLORREF>;
  result value :: <COLORREF>;
  c-name: "SetBkColor", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBkMode
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetBkMode", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBitmapBits
  parameter hbitmap1   :: <HBITMAP>;
  parameter dword2     :: <DWORD>;
  parameter voidP3     ::  /* const */ <C-void*>;
  result value :: <LONG>;
  c-name: "SetBitmapBits", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBoundsRect
  parameter hdc1       :: <HDC>;
  parameter lprect2    ::  /* const */ <LPRECT>;
  parameter uint3      :: <UINT>;
  result value :: <UINT>;
  c-name: "SetBoundsRect", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDIBits
  parameter hdc1       :: <HDC>;
  parameter hbitmap2   :: <HBITMAP>;
  parameter uint3      :: <UINT>;
  parameter uint4      :: <UINT>;
  parameter voidP5     ::  /* const */ <C-void*>;
  parameter lpbitmapinfo6 ::  /* const */ <LPBITMAPINFO>;
  parameter uint7      :: <UINT>;
  result value :: <C-int>;
  c-name: "SetDIBits", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDIBitsToDevice
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter dword4     :: <DWORD>;
  parameter dword5     :: <DWORD>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter uint8      :: <UINT>;
  parameter uint9      :: <UINT>;
  parameter voidP10    ::  /* const */ <C-void*>;
  parameter lpbitmapinfo11 ::  /* const */ <LPBITMAPINFO>;
  parameter uint12     :: <UINT>;
  result value :: <C-int>;
  c-name: "SetDIBitsToDevice", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMapperFlags
  parameter hdc1       :: <HDC>;
  parameter dword2     :: <DWORD>;
  result value :: <DWORD>;
  c-name: "SetMapperFlags", c-modifiers: "__stdcall";
end;

define inline-only C-function SetGraphicsMode
  parameter hdc        :: <HDC>;
  parameter iMode      :: <C-int>;
  result value :: <C-int>;
  c-name: "SetGraphicsMode", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMapMode
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetMapMode", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMetaFileBitsEx
  parameter uint1      :: <UINT>;
  parameter byteP2     ::  /* const */ <C-BYTE*>;
  result value :: <HMETAFILE>;
  c-name: "SetMetaFileBitsEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetPaletteEntries
  parameter hpalette1  :: <HPALETTE>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lppaletteentry4 ::  /* const */ <LPPALETTEENTRY>;
  result value :: <UINT>;
  c-name: "SetPaletteEntries", c-modifiers: "__stdcall";
end;

define inline-only C-function SetPixel
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter colorref4  :: <COLORREF>;
  result value :: <COLORREF>;
  c-name: "SetPixel", c-modifiers: "__stdcall";
end;

define inline-only C-function SetPixelV
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter colorref4  :: <COLORREF>;
  result value :: <BOOL>;
  c-name: "SetPixelV", c-modifiers: "__stdcall";
end;

define inline-only C-function SetPixelFormat
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter lppixelformatdescriptor3 ::  /* const */ <LPPIXELFORMATDESCRIPTOR>;
  result value :: <BOOL>;
  c-name: "SetPixelFormat", c-modifiers: "__stdcall";
end;

define inline-only C-function SetPolyFillMode
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetPolyFillMode", c-modifiers: "__stdcall";
end;

define inline-only C-function StretchBlt
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter hdc6       :: <HDC>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  parameter int10      :: <C-int>;
  parameter dword11    :: <DWORD>;
  result value :: <BOOL>;
  c-name: "StretchBlt", c-modifiers: "__stdcall";
end;

define inline-only C-function SetRectRgn
  parameter hrgn1      :: <HRGN>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  result value :: <BOOL>;
  c-name: "SetRectRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function StretchDIBits
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  parameter voidP10    ::  /* const */ <C-void*>;
  parameter lpbitmapinfo11 ::  /* const */ <LPBITMAPINFO>;
  parameter uint12     :: <UINT>;
  parameter dword13    :: <DWORD>;
  result value :: <C-int>;
  c-name: "StretchDIBits", c-modifiers: "__stdcall";
end;

define inline-only C-function SetROP2
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetROP2", c-modifiers: "__stdcall";
end;

define inline-only C-function SetStretchBltMode
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetStretchBltMode", c-modifiers: "__stdcall";
end;

define inline-only C-function SetSystemPaletteUse
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  result value :: <UINT>;
  c-name: "SetSystemPaletteUse", c-modifiers: "__stdcall";
end;

define inline-only C-function SetTextCharacterExtra
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetTextCharacterExtra", c-modifiers: "__stdcall";
end;

define inline-only C-function SetTextColor
  parameter hdc1       :: <HDC>;
  parameter colorref2  :: <COLORREF>;
  result value :: <COLORREF>;
  c-name: "SetTextColor", c-modifiers: "__stdcall";
end;

define inline-only C-function SetTextAlign
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  result value :: <UINT>;
  c-name: "SetTextAlign", c-modifiers: "__stdcall";
end;

define inline-only C-function SetTextJustification
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "SetTextJustification", c-modifiers: "__stdcall";
end;

define inline-only C-function UpdateColors
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "UpdateColors", c-modifiers: "__stdcall";
end;
define inline constant <COLOR16> = <USHORT>;

define C-struct <TRIVERTEX>
  sealed inline-only slot x-value        :: <LONG>;
  sealed inline-only slot y-value        :: <LONG>;
  sealed inline-only slot Red-value      :: <COLOR16>;
  sealed inline-only slot Green-value    :: <COLOR16>;
  sealed inline-only slot Blue-value     :: <COLOR16>;
  sealed inline-only slot Alpha-value    :: <COLOR16>;
  pointer-type-name: <LPTRIVERTEX>;
  c-name: "struct _TRIVERTEX";
end C-struct <TRIVERTEX>;
define inline constant <PTRIVERTEX> = <LPTRIVERTEX>;

define C-struct <GRADIENT-TRIANGLE>
  sealed inline-only slot Vertex1-value  :: <ULONG>;
  sealed inline-only slot Vertex2-value  :: <ULONG>;
  sealed inline-only slot Vertex3-value  :: <ULONG>;
  pointer-type-name: <LPGRADIENT-TRIANGLE>;
  c-name: "struct _GRADIENT_TRIANGLE";
end C-struct <GRADIENT-TRIANGLE>;
define inline constant <PGRADIENT-TRIANGLE> = <LPGRADIENT-TRIANGLE>;

define C-struct <GRADIENT-RECT>
  sealed inline-only slot UpperLeft-value :: <ULONG>;
  sealed inline-only slot LowerRight-value :: <ULONG>;
  pointer-type-name: <LPGRADIENT-RECT>;
  c-name: "struct _GRADIENT_RECT";
end C-struct <GRADIENT-RECT>;
define inline constant <PGRADIENT-RECT> = <LPGRADIENT-RECT>;

define C-struct <BLENDFUNCTION>
  sealed inline-only slot BlendOp-value  :: <C-BYTE>;
  sealed inline-only slot BlendFlags-value :: <C-BYTE>;
  sealed inline-only slot SourceConstantAlpha-value :: <C-BYTE>;
  sealed inline-only slot AlphaFormat-value :: <C-BYTE>;
  pointer-type-name: <LPBLENDFUNCTION>;
  c-name: "struct _BLENDFUNCTION";
end C-struct <BLENDFUNCTION>;
define inline constant <PBLENDFUNCTION> = <LPBLENDFUNCTION>;
define inline-only constant $AC-SRC-OVER                = #x00;
define inline-only constant $AC-SRC-NO-PREMULT-ALPHA    = #x01;
define inline-only constant $AC-SRC-NO-ALPHA            = #x02;
define inline-only constant $AC-DST-NO-PREMULT-ALPHA    = #x10;
define inline-only constant $AC-DST-NO-ALPHA            = #x20;
define inline-only constant $GRADIENT-FILL-RECT-H       = #x00000000;
define inline-only constant $GRADIENT-FILL-RECT-V       = #x00000001;
define inline-only constant $GRADIENT-FILL-TRIANGLE     = #x00000002;
define inline-only constant $GRADIENT-FILL-OP-FLAG      = #x000000ff;

define inline-only C-function PlayMetaFileRecord
  parameter hdc1       :: <HDC>;
  parameter lphandletable2 :: <LPHANDLETABLE>;
  parameter lpmetarecord3 :: <LPMETARECORD>;
  parameter uint4      :: <UINT>;
  result value :: <BOOL>;
  c-name: "PlayMetaFileRecord", c-modifiers: "__stdcall";
end;
define C-subtype <MFENUMPROC> ( <C-function-pointer> ) end;

define inline-only C-function EnumMetaFile
  parameter hdc1       :: <HDC>;
  parameter hmetafile2 :: <HMETAFILE>;
  parameter mfenumproc3 :: <MFENUMPROC>;
  parameter lparam4    :: <LPARAM>;
  result value :: <BOOL>;
  c-name: "EnumMetaFile", c-modifiers: "__stdcall";
end;
define C-subtype <ENHMFENUMPROC> ( <C-function-pointer> ) end;

define inline-only C-function CloseEnhMetaFile
  parameter hdc1       :: <HDC>;
  result value :: <HENHMETAFILE>;
  c-name: "CloseEnhMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function CopyEnhMetaFile
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter lpcstr2    :: <LPCSTR>;
  result value :: <HENHMETAFILE>;
  c-name: "CopyEnhMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateEnhMetaFile
  parameter hdc1       :: <HDC>;
  parameter lpcstr2    :: <LPCSTR>;
  parameter lprect3    ::  /* const */ <LPRECT>;
  parameter lpcstr4    :: <LPCSTR>;
  result value :: <HDC>;
  c-name: "CreateEnhMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteEnhMetaFile
  parameter henhmetafile1 :: <HENHMETAFILE>;
  result value :: <BOOL>;
  c-name: "DeleteEnhMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumEnhMetaFile
  parameter hdc1       :: <HDC>;
  parameter henhmetafile2 :: <HENHMETAFILE>;
  parameter enhmfenumproc3 :: <ENHMFENUMPROC>;
  parameter lpvoid4    :: <LPVOID>;
  parameter lprect5    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "EnumEnhMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function GetEnhMetaFile
  parameter lpcstr1    :: <LPCSTR>;
  result value :: <HENHMETAFILE>;
  c-name: "GetEnhMetaFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetEnhMetaFileBits
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lpbyte3    :: <LPBYTE>;
  result value :: <UINT>;
  c-name: "GetEnhMetaFileBits", c-modifiers: "__stdcall";
end;

define inline-only C-function GetEnhMetaFileDescription
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lpstr3     :: <LPSTR>;
  result value :: <UINT>;
  c-name: "GetEnhMetaFileDescriptionA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetEnhMetaFileHeader
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lpenhmetaheader3 :: <LPENHMETAHEADER>;
  result value :: <UINT>;
  c-name: "GetEnhMetaFileHeader", c-modifiers: "__stdcall";
end;

define inline-only C-function GetEnhMetaFilePaletteEntries
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lppaletteentry3 :: <LPPALETTEENTRY>;
  result value :: <UINT>;
  c-name: "GetEnhMetaFilePaletteEntries", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWinMetaFileBits
  parameter henhmetafile1 :: <HENHMETAFILE>;
  parameter uint2      :: <UINT>;
  parameter lpbyte3    :: <LPBYTE>;
  parameter int4       :: <INT>;
  parameter hdc5       :: <HDC>;
  result value :: <UINT>;
  c-name: "GetWinMetaFileBits", c-modifiers: "__stdcall";
end;

define inline-only C-function PlayEnhMetaFile
  parameter hdc1       :: <HDC>;
  parameter henhmetafile2 :: <HENHMETAFILE>;
  parameter lprect3    ::  /* const */ <LPRECT>;
  result value :: <BOOL>;
  c-name: "PlayEnhMetaFile", c-modifiers: "__stdcall";
end;

define inline-only C-function PlayEnhMetaFileRecord
  parameter hdc1       :: <HDC>;
  parameter lphandletable2 :: <LPHANDLETABLE>;
  parameter lpenhmetarecord3 ::  /* const */ <LPENHMETARECORD>;
  parameter uint4      :: <UINT>;
  result value :: <BOOL>;
  c-name: "PlayEnhMetaFileRecord", c-modifiers: "__stdcall";
end;

define inline-only C-function SetEnhMetaFileBits
  parameter uint1      :: <UINT>;
  parameter byteP2     ::  /* const */ <C-BYTE*>;
  result value :: <HENHMETAFILE>;
  c-name: "SetEnhMetaFileBits", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWinMetaFileBits
  parameter uint1      :: <UINT>;
  parameter byteP2     ::  /* const */ <C-BYTE*>;
  parameter hdc3       :: <HDC>;
  parameter lpmetafilepict4 ::  /* const */ <LPMETAFILEPICT>;
  result value :: <HENHMETAFILE>;
  c-name: "SetWinMetaFileBits", c-modifiers: "__stdcall";
end;

define inline-only C-function GdiComment
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter byteP3     ::  /* const */ <C-BYTE*>;
  result value :: <BOOL>;
  c-name: "GdiComment", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextMetrics
  parameter hdc1       :: <HDC>;
  parameter lptextmetrica2 :: <LPTEXTMETRICA>;
  result value :: <BOOL>;
  c-name: "GetTextMetricsA", c-modifiers: "__stdcall";
end;

define C-struct <DIBSECTION>
  sealed inline-only slot dsBm-value     :: <BITMAP>;
  sealed inline-only slot dsBmih-value   :: <BITMAPINFOHEADER>;
  sealed inline-only array slot dsBitfields-array :: <DWORD>,
	length: 3, address-getter: dsBitfields-value;
  sealed inline-only slot dshSection-value :: <HANDLE>;
  sealed inline-only slot dsOffset-value :: <DWORD>;
  pointer-type-name: <LPDIBSECTION>;
  c-name: "struct tagDIBSECTION";
end C-struct <DIBSECTION>;
define inline constant <PDIBSECTION> = <LPDIBSECTION>;

define inline-only C-function PolyPolyline
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter lpdword3   ::  /* const */ <LPDWORD>;
  parameter dword4     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "PolyPolyline", c-modifiers: "__stdcall";
end;

define inline-only C-function GetWorldTransform
  parameter hdc1       :: <HDC>;
  parameter lpxform2   :: <LPXFORM>;
  result value :: <BOOL>;
  c-name: "GetWorldTransform", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWorldTransform
  parameter hdc1       :: <HDC>;
  parameter lpxform2   ::  /* const */ <LPXFORM>;
  result value :: <BOOL>;
  c-name: "SetWorldTransform", c-modifiers: "__stdcall";
end;

define inline-only C-function ModifyWorldTransform
  parameter hdc1       :: <HDC>;
  parameter lpxform2   ::  /* const */ <LPXFORM>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "ModifyWorldTransform", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateDIBSection
  parameter hdc1       :: <HDC>;
  parameter lpbitmapinfo2 ::  /* const */ <LPBITMAPINFO>;
  parameter uint3      :: <UINT>;
  parameter voidPP4    :: <C-void**>;
  parameter handle5    :: <HANDLE>;
  parameter dword6     :: <DWORD>;
  result value :: <HBITMAP>;
  c-name: "CreateDIBSection", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDIBColorTable
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lprgbquad4 :: <LPRGBQUAD>;
  result value :: <UINT>;
  c-name: "GetDIBColorTable", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDIBColorTable
  parameter hdc1       :: <HDC>;
  parameter uint2      :: <UINT>;
  parameter uint3      :: <UINT>;
  parameter lprgbquad4 ::  /* const */ <LPRGBQUAD>;
  result value :: <UINT>;
  c-name: "SetDIBColorTable", c-modifiers: "__stdcall";
end;
define inline-only constant $CA-NEGATIVE                = #x0001;
define inline-only constant $CA-LOG-FILTER              = #x0002;
define inline-only constant $ILLUMINANT-DEVICE-DEFAULT  =    0;
define inline-only constant $ILLUMINANT-A               =    1;
define inline-only constant $ILLUMINANT-B               =    2;
define inline-only constant $ILLUMINANT-C               =    3;
define inline-only constant $ILLUMINANT-D50             =    4;
define inline-only constant $ILLUMINANT-D55             =    5;
define inline-only constant $ILLUMINANT-D65             =    6;
define inline-only constant $ILLUMINANT-D75             =    7;
define inline-only constant $ILLUMINANT-F2              =    8;
define inline-only constant $RGB-GAMMA-MIN              = #o2500;
define inline-only constant $RGB-GAMMA-MAX              = 65000;
define inline-only constant $REFERENCE-WHITE-MIN        = 6000;
define inline-only constant $REFERENCE-WHITE-MAX        = 10000;
define inline-only constant $REFERENCE-BLACK-MIN        =    0;
define inline-only constant $REFERENCE-BLACK-MAX        = 4000;
define inline-only constant $COLOR-ADJ-MIN              = -100;
define inline-only constant $COLOR-ADJ-MAX              =  100;

define C-struct <COLORADJUSTMENT>
  sealed inline-only slot caSize-value   :: <WORD>;
  sealed inline-only slot caFlags-value  :: <WORD>;
  sealed inline-only slot caIlluminantIndex-value :: <WORD>;
  sealed inline-only slot caRedGamma-value :: <WORD>;
  sealed inline-only slot caGreenGamma-value :: <WORD>;
  sealed inline-only slot caBlueGamma-value :: <WORD>;
  sealed inline-only slot caReferenceBlack-value :: <WORD>;
  sealed inline-only slot caReferenceWhite-value :: <WORD>;
  sealed inline-only slot caContrast-value :: <SHORT>;
  sealed inline-only slot caBrightness-value :: <SHORT>;
  sealed inline-only slot caColorfulness-value :: <SHORT>;
  sealed inline-only slot caRedGreenTint-value :: <SHORT>;
  pointer-type-name: <LPCOLORADJUSTMENT>;
  c-name: "struct tagCOLORADJUSTMENT";
end C-struct <COLORADJUSTMENT>;
define inline constant <PCOLORADJUSTMENT> = <LPCOLORADJUSTMENT>;

define inline-only C-function SetColorAdjustment
  parameter hdc1       :: <HDC>;
  parameter lpcoloradjustment2 ::  /* const */ <LPCOLORADJUSTMENT>;
  result value :: <BOOL>;
  c-name: "SetColorAdjustment", c-modifiers: "__stdcall";
end;

define inline-only C-function GetColorAdjustment
  parameter hdc1       :: <HDC>;
  parameter lpcoloradjustment2 :: <LPCOLORADJUSTMENT>;
  result value :: <BOOL>;
  c-name: "GetColorAdjustment", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateHalftonePalette
  parameter hdc1       :: <HDC>;
  result value :: <HPALETTE>;
  c-name: "CreateHalftonePalette", c-modifiers: "__stdcall";
end;
define C-subtype <ABORTPROC> ( <C-function-pointer> ) end;

define C-struct <DOCINFOA>
  sealed inline-only slot cbSize-value   :: <C-int>;
  sealed inline-only slot lpszDocName-value :: <LPCSTR>;
  sealed inline-only slot lpszOutput-value :: <LPCSTR>;
  sealed inline-only slot lpszDatatype-value :: <LPCSTR>;
  sealed inline-only slot fwType-value   :: <DWORD>;
  pointer-type-name: <LPDOCINFOA>;
  c-name: "struct _DOCINFOA";
end C-struct <DOCINFOA>;
define inline constant <DOCINFO> = <DOCINFOA>;
define inline constant <LPDOCINFO> = <LPDOCINFOA>;
define inline-only constant $DI-APPBANDING              = #x00000001;
define inline-only constant $DI-ROPS-READ-DESTINATION   = #x00000002;

define inline-only C-function StartDoc
  parameter hdc1       :: <HDC>;
  parameter lpdocinfoa2 ::  /* const */ <LPDOCINFOA>;
  result value :: <C-int>;
  c-name: "StartDocA", c-modifiers: "__stdcall";
end;

define inline-only C-function EndDoc
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "EndDoc", c-modifiers: "__stdcall";
end;

define inline-only C-function StartPage
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "StartPage", c-modifiers: "__stdcall";
end;

define inline-only C-function EndPage
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "EndPage", c-modifiers: "__stdcall";
end;

define inline-only C-function AbortDoc
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "AbortDoc", c-modifiers: "__stdcall";
end;

define inline-only C-function SetAbortProc
  parameter hdc1       :: <HDC>;
  parameter abortproc2 :: <ABORTPROC>;
  result value :: <C-int>;
  c-name: "SetAbortProc", c-modifiers: "__stdcall";
end;

define inline-only C-function AbortPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "AbortPath", c-modifiers: "__stdcall";
end;

define inline-only C-function ArcTo
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter int6       :: <C-int>;
  parameter int7       :: <C-int>;
  parameter int8       :: <C-int>;
  parameter int9       :: <C-int>;
  result value :: <BOOL>;
  c-name: "ArcTo", c-modifiers: "__stdcall";
end;

define inline-only C-function BeginPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "BeginPath", c-modifiers: "__stdcall";
end;

define inline-only C-function CloseFigure
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "CloseFigure", c-modifiers: "__stdcall";
end;

define inline-only C-function EndPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "EndPath", c-modifiers: "__stdcall";
end;

define inline-only C-function FillPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "FillPath", c-modifiers: "__stdcall";
end;

define inline-only C-function FlattenPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "FlattenPath", c-modifiers: "__stdcall";
end;

define inline-only C-function GetPath
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  parameter lpbyte3    :: <LPBYTE>;
  parameter int4       :: <C-int>;
  result value :: <C-int>;
  c-name: "GetPath", c-modifiers: "__stdcall";
end;

define inline-only C-function PathToRegion
  parameter hdc1       :: <HDC>;
  result value :: <HRGN>;
  c-name: "PathToRegion", c-modifiers: "__stdcall";
end;

define inline-only C-function SelectClipPath
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <BOOL>;
  c-name: "SelectClipPath", c-modifiers: "__stdcall";
end;

define inline-only C-function SetMiterLimit
  parameter hdc1       :: <HDC>;
  parameter float2     :: <C-FLOAT>;
  parameter pfloat3    :: <PFLOAT>;
  result value :: <BOOL>;
  c-name: "SetMiterLimit", c-modifiers: "__stdcall";
end;

define inline-only C-function StrokeAndFillPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "StrokeAndFillPath", c-modifiers: "__stdcall";
end;

define inline-only C-function StrokePath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "StrokePath", c-modifiers: "__stdcall";
end;

define inline-only C-function WidenPath
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "WidenPath", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtCreatePen
  parameter dword1     :: <DWORD>;
  parameter dword2     :: <DWORD>;
  parameter lplogbrush3 ::  /* const */ <LPLOGBRUSH>;
  parameter dword4     :: <DWORD>;
  parameter lpdword5   ::  /* const */ <LPDWORD>;
  result value :: <HPEN>;
  c-name: "ExtCreatePen", c-modifiers: "__stdcall";
end;

define inline-only C-function GetMiterLimit
  parameter hdc1       :: <HDC>;
  parameter pfloat2    :: <PFLOAT>;
  result value :: <BOOL>;
  c-name: "GetMiterLimit", c-modifiers: "__stdcall";
end;

define inline-only C-function GetArcDirection
  parameter hdc1       :: <HDC>;
  result value :: <C-int>;
  c-name: "GetArcDirection", c-modifiers: "__stdcall";
end;

define inline-only C-function GetObject
  parameter hgdiobj1   :: <HGDIOBJ>;
  parameter int2       :: <C-int>;
  parameter lpvoid3    :: <LPVOID>;
  result value :: <C-int>;
  c-name: "GetObjectA", c-modifiers: "__stdcall";
end;

define inline-only C-function MoveToEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "MoveToEx", c-modifiers: "__stdcall";
end;

define inline-only C-function TextOut
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpcstr4    :: <LPCSTR>;
  parameter int5       :: <C-int>;
  result value :: <BOOL>;
  c-name: "TextOutA", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtTextOut
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter uint4      :: <UINT>;
  parameter lprect5    ::  /* const */ <LPRECT>;
  parameter lpcstr6    :: <LPCSTR>;
  parameter uint7      :: <UINT>;
  parameter lpint8     ::  /* const */ <LPINT>;
  result value :: <BOOL>;
  c-name: "ExtTextOutA", c-modifiers: "__stdcall";
end;

define inline-only C-function PolyTextOut
  parameter hdc1       :: <HDC>;
  parameter lppolytexta2 ::  /* const */ <LPPOLYTEXTA>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "PolyTextOutA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreatePolygonRgn
  parameter lppoint1   ::  /* const */ <LPPOINT>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  result value :: <HRGN>;
  c-name: "CreatePolygonRgn", c-modifiers: "__stdcall";
end;

define inline-only C-function DPtoLP
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "DPtoLP", c-modifiers: "__stdcall";
end;

define inline-only C-function LPtoDP
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "LPtoDP", c-modifiers: "__stdcall";
end;

define inline-only C-function Polygon
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Polygon", c-modifiers: "__stdcall";
end;

define inline-only C-function Polyline
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter int3       :: <C-int>;
  result value :: <BOOL>;
  c-name: "Polyline", c-modifiers: "__stdcall";
end;

define inline-only C-function PolyBezier
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "PolyBezier", c-modifiers: "__stdcall";
end;

define inline-only C-function PolyBezierTo
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "PolyBezierTo", c-modifiers: "__stdcall";
end;

define inline-only C-function PolylineTo
  parameter hdc1       :: <HDC>;
  parameter lppoint2   ::  /* const */ <LPPOINT>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "PolylineTo", c-modifiers: "__stdcall";
end;

define inline-only C-function SetViewportExtEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpsize4    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "SetViewportExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetViewportOrgEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "SetViewportOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowExtEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpsize4    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "SetWindowExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetWindowOrgEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "SetWindowOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function OffsetViewportOrgEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "OffsetViewportOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function OffsetWindowOrgEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "OffsetWindowOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function ScaleViewportExtEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter lpsize6    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "ScaleViewportExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function ScaleWindowExtEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter int4       :: <C-int>;
  parameter int5       :: <C-int>;
  parameter lpsize6    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "ScaleWindowExtEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBitmapDimensionEx
  parameter hbitmap1   :: <HBITMAP>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lpsize4    :: <LPSIZE>;
  result value :: <BOOL>;
  c-name: "SetBitmapDimensionEx", c-modifiers: "__stdcall";
end;

define inline-only C-function SetBrushOrgEx
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter int3       :: <C-int>;
  parameter lppoint4   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "SetBrushOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function GetTextFace
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  parameter lpstr3     :: <LPSTR>;
  result value :: <C-int>;
  c-name: "GetTextFaceA", c-modifiers: "__stdcall";
end;
define inline-only constant $FONTMAPPER-MAX             =   10;

define C-struct <KERNINGPAIR>
  sealed inline-only slot wFirst-value   :: <WORD>;
  sealed inline-only slot wSecond-value  :: <WORD>;
  sealed inline-only slot iKernAmount-value :: <C-int>;
  pointer-type-name: <LPKERNINGPAIR>;
  c-name: "struct tagKERNINGPAIR";
end C-struct <KERNINGPAIR>;

define inline-only C-function GetKerningPairs
  parameter hdc1       :: <HDC>;
  parameter dword2     :: <DWORD>;
  parameter lpkerningpair3 :: <LPKERNINGPAIR>;
  result value :: <DWORD>;
  c-name: "GetKerningPairsA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDCOrgEx
  parameter hdc1       :: <HDC>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "GetDCOrgEx", c-modifiers: "__stdcall";
end;

define inline-only C-function UnrealizeObject
  parameter hgdiobj1   :: <HGDIOBJ>;
  result value :: <BOOL>;
  c-name: "UnrealizeObject", c-modifiers: "__stdcall";
end;

define inline-only C-function GdiFlush
  result value :: <BOOL>;
  c-name: "GdiFlush", c-modifiers: "__stdcall";
end;

define inline-only C-function GdiSetBatchLimit
  parameter dword1     :: <DWORD>;
  result value :: <DWORD>;
  c-name: "GdiSetBatchLimit", c-modifiers: "__stdcall";
end;

define inline-only C-function GdiGetBatchLimit
  result value :: <DWORD>;
  c-name: "GdiGetBatchLimit", c-modifiers: "__stdcall";
end;
define inline-only constant $ICM-OFF                    =    1;
define inline-only constant $ICM-ON                     =    2;
define inline-only constant $ICM-QUERY                  =    3;
define inline-only constant $ICM-DONE-OUTSIDEDC         =    4;
define C-subtype <ICMENUMPROCA> ( <C-function-pointer> ) end;

define inline-only C-function SetICMMode
  parameter hdc1       :: <HDC>;
  parameter int2       :: <C-int>;
  result value :: <C-int>;
  c-name: "SetICMMode", c-modifiers: "__stdcall";
end;

define inline-only C-function CheckColorsInGamut
  parameter hdc1       :: <HDC>;
  parameter lpvoid2    :: <LPVOID>;
  parameter lpvoid3    :: <LPVOID>;
  parameter dword4     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "CheckColorsInGamut", c-modifiers: "__stdcall";
end;

define inline-only C-function GetColorSpace
  parameter hdc1       :: <HDC>;
  result value :: <HCOLORSPACE>;
  c-name: "GetColorSpace", c-modifiers: "__stdcall";
end;

define inline-only C-function GetLogColorSpace
  parameter hcolorspace1 :: <HCOLORSPACE>;
  parameter lplogcolorspacea2 :: <LPLOGCOLORSPACEA>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "GetLogColorSpaceA", c-modifiers: "__stdcall";
end;

define inline-only C-function CreateColorSpace
  parameter lplogcolorspacea1 :: <LPLOGCOLORSPACEA>;
  result value :: <HCOLORSPACE>;
  c-name: "CreateColorSpaceA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetColorSpace
  parameter hdc1       :: <HDC>;
  parameter hcolorspace2 :: <HCOLORSPACE>;
  result value :: <HCOLORSPACE>;
  c-name: "SetColorSpace", c-modifiers: "__stdcall";
end;

define inline-only C-function DeleteColorSpace
  parameter hcolorspace1 :: <HCOLORSPACE>;
  result value :: <BOOL>;
  c-name: "DeleteColorSpace", c-modifiers: "__stdcall";
end;

define inline-only C-function GetICMProfile
  parameter hdc1       :: <HDC>;
  parameter lpdword2   :: <LPDWORD>;
  parameter lpstr3     :: <LPSTR>;
  result value :: <BOOL>;
  c-name: "GetICMProfileA", c-modifiers: "__stdcall";
end;

define inline-only C-function SetICMProfile
  parameter hdc1       :: <HDC>;
  parameter lpstr2     :: <LPSTR>;
  result value :: <BOOL>;
  c-name: "SetICMProfileA", c-modifiers: "__stdcall";
end;

define inline-only C-function GetDeviceGammaRamp
  parameter hdc1       :: <HDC>;
  parameter lpvoid2    :: <LPVOID>;
  result value :: <BOOL>;
  c-name: "GetDeviceGammaRamp", c-modifiers: "__stdcall";
end;

define inline-only C-function SetDeviceGammaRamp
  parameter hdc1       :: <HDC>;
  parameter lpvoid2    :: <LPVOID>;
  result value :: <BOOL>;
  c-name: "SetDeviceGammaRamp", c-modifiers: "__stdcall";
end;

define inline-only C-function ColorMatchToTarget
  parameter hdc1       :: <HDC>;
  parameter hdc2       :: <HDC>;
  parameter dword3     :: <DWORD>;
  result value :: <BOOL>;
  c-name: "ColorMatchToTarget", c-modifiers: "__stdcall";
end;

define inline-only C-function EnumICMProfiles
  parameter hdc1       :: <HDC>;
  parameter icmenumproca2 :: <ICMENUMPROCA>;
  parameter lparam3    :: <LPARAM>;
  result value :: <C-int>;
  c-name: "EnumICMProfilesA", c-modifiers: "__stdcall";
end;
define inline-only constant $ENHMETA-SIGNATURE          =
	as(<machine-word>, #x464D4520);
define inline-only constant $ENHMETA-STOCK-OBJECT       =
	as(<machine-word>, #x80000000);
define inline-only constant $EMR-HEADER                 =    1;
define inline-only constant $EMR-POLYBEZIER             =    2;
define inline-only constant $EMR-POLYGON                =    3;
define inline-only constant $EMR-POLYLINE               =    4;
define inline-only constant $EMR-POLYBEZIERTO           =    5;
define inline-only constant $EMR-POLYLINETO             =    6;
define inline-only constant $EMR-POLYPOLYLINE           =    7;
define inline-only constant $EMR-POLYPOLYGON            =    8;
define inline-only constant $EMR-SETWINDOWEXTEX         =    9;
define inline-only constant $EMR-SETWINDOWORGEX         =   10;
define inline-only constant $EMR-SETVIEWPORTEXTEX       =   11;
define inline-only constant $EMR-SETVIEWPORTORGEX       =   12;
define inline-only constant $EMR-SETBRUSHORGEX          =   13;
define inline-only constant $EMR-EOF                    =   14;
define inline-only constant $EMR-SETPIXELV              =   15;
define inline-only constant $EMR-SETMAPPERFLAGS         =   16;
define inline-only constant $EMR-SETMAPMODE             =   17;
define inline-only constant $EMR-SETBKMODE              =   18;
define inline-only constant $EMR-SETPOLYFILLMODE        =   19;
define inline-only constant $EMR-SETROP2                =   20;
define inline-only constant $EMR-SETSTRETCHBLTMODE      =   21;
define inline-only constant $EMR-SETTEXTALIGN           =   22;
define inline-only constant $EMR-SETCOLORADJUSTMENT     =   23;
define inline-only constant $EMR-SETTEXTCOLOR           =   24;
define inline-only constant $EMR-SETBKCOLOR             =   25;
define inline-only constant $EMR-OFFSETCLIPRGN          =   26;
define inline-only constant $EMR-MOVETOEX               =   27;
define inline-only constant $EMR-SETMETARGN             =   28;
define inline-only constant $EMR-EXCLUDECLIPRECT        =   29;
define inline-only constant $EMR-INTERSECTCLIPRECT      =   30;
define inline-only constant $EMR-SCALEVIEWPORTEXTEX     =   31;
define inline-only constant $EMR-SCALEWINDOWEXTEX       =   32;
define inline-only constant $EMR-SAVEDC                 =   33;
define inline-only constant $EMR-RESTOREDC              =   34;
define inline-only constant $EMR-SETWORLDTRANSFORM      =   35;
define inline-only constant $EMR-MODIFYWORLDTRANSFORM   =   36;
define inline-only constant $EMR-SELECTOBJECT           =   37;
define inline-only constant $EMR-CREATEPEN              =   38;
define inline-only constant $EMR-CREATEBRUSHINDIRECT    =   39;
define inline-only constant $EMR-DELETEOBJECT           =   40;
define inline-only constant $EMR-ANGLEARC               =   41;
define inline-only constant $EMR-ELLIPSE                =   42;
define inline-only constant $EMR-RECTANGLE              =   43;
define inline-only constant $EMR-ROUNDRECT              =   44;
define inline-only constant $EMR-ARC                    =   45;
define inline-only constant $EMR-CHORD                  =   46;
define inline-only constant $EMR-PIE                    =   47;
define inline-only constant $EMR-SELECTPALETTE          =   48;
define inline-only constant $EMR-CREATEPALETTE          =   49;
define inline-only constant $EMR-SETPALETTEENTRIES      =   50;
define inline-only constant $EMR-RESIZEPALETTE          =   51;
define inline-only constant $EMR-REALIZEPALETTE         =   52;
define inline-only constant $EMR-EXTFLOODFILL           =   53;
define inline-only constant $EMR-LINETO                 =   54;
define inline-only constant $EMR-ARCTO                  =   55;
define inline-only constant $EMR-POLYDRAW               =   56;
define inline-only constant $EMR-SETARCDIRECTION        =   57;
define inline-only constant $EMR-SETMITERLIMIT          =   58;
define inline-only constant $EMR-BEGINPATH              =   59;
define inline-only constant $EMR-ENDPATH                =   60;
define inline-only constant $EMR-CLOSEFIGURE            =   61;
define inline-only constant $EMR-FILLPATH               =   62;
define inline-only constant $EMR-STROKEANDFILLPATH      =   63;
define inline-only constant $EMR-STROKEPATH             =   64;
define inline-only constant $EMR-FLATTENPATH            =   65;
define inline-only constant $EMR-WIDENPATH              =   66;
define inline-only constant $EMR-SELECTCLIPPATH         =   67;
define inline-only constant $EMR-ABORTPATH              =   68;
define inline-only constant $EMR-GDICOMMENT             =   70;
define inline-only constant $EMR-FILLRGN                =   71;
define inline-only constant $EMR-FRAMERGN               =   72;
define inline-only constant $EMR-INVERTRGN              =   73;
define inline-only constant $EMR-PAINTRGN               =   74;
define inline-only constant $EMR-EXTSELECTCLIPRGN       =   75;
define inline-only constant $EMR-BITBLT                 =   76;
define inline-only constant $EMR-STRETCHBLT             =   77;
define inline-only constant $EMR-MASKBLT                =   78;
define inline-only constant $EMR-PLGBLT                 =   79;
define inline-only constant $EMR-SETDIBITSTODEVICE      =   80;
define inline-only constant $EMR-STRETCHDIBITS          =   81;
define inline-only constant $EMR-EXTCREATEFONTINDIRECTW =   82;
define inline-only constant $EMR-EXTTEXTOUTA            =   83;
define inline-only constant $EMR-EXTTEXTOUTW            =   84;
define inline-only constant $EMR-POLYBEZIER16           =   85;
define inline-only constant $EMR-POLYGON16              =   86;
define inline-only constant $EMR-POLYLINE16             =   87;
define inline-only constant $EMR-POLYBEZIERTO16         =   88;
define inline-only constant $EMR-POLYLINETO16           =   89;
define inline-only constant $EMR-POLYPOLYLINE16         =   90;
define inline-only constant $EMR-POLYPOLYGON16          =   91;
define inline-only constant $EMR-POLYDRAW16             =   92;
define inline-only constant $EMR-CREATEMONOBRUSH        =   93;
define inline-only constant $EMR-CREATEDIBPATTERNBRUSHPT =   94;
define inline-only constant $EMR-EXTCREATEPEN           =   95;
define inline-only constant $EMR-POLYTEXTOUTA           =   96;
define inline-only constant $EMR-POLYTEXTOUTW           =   97;
define inline-only constant $EMR-SETICMMODE             =   98;
define inline-only constant $EMR-CREATECOLORSPACE       =   99;
define inline-only constant $EMR-SETCOLORSPACE          =  100;
define inline-only constant $EMR-DELETECOLORSPACE       =  101;
define inline-only constant $EMR-GLSRECORD              =  102;
define inline-only constant $EMR-GLSBOUNDEDRECORD       =  103;
define inline-only constant $EMR-PIXELFORMAT            =  104;
define inline-only constant $EMR-MIN                    =    1;
define inline-only constant $EMR-MAX                    =  104;

define C-struct <EMR>
  sealed inline-only slot iType-value    :: <DWORD>;
  sealed inline-only slot nSize-value    :: <DWORD>;
  pointer-type-name: <LPEMR>;
  c-name: "struct tagEMR";
end C-struct <EMR>;
define inline constant <PEMR> = <LPEMR>;

define C-struct <EMRTEXT>
  sealed inline-only slot ptlReference-value :: <POINTL>;
  sealed inline-only slot nChars-value   :: <DWORD>;
  sealed inline-only slot offString-value :: <DWORD>;
  sealed inline-only slot fOptions-value :: <DWORD>;
  sealed inline-only slot rcl-value      :: <RECTL>;
  sealed inline-only slot offDx-value    :: <DWORD>;
  pointer-type-name: <LPEMRTEXT>;
  c-name: "struct tagEMRTEXT";
end C-struct <EMRTEXT>;
define inline constant <PEMRTEXT> = <LPEMRTEXT>;

define C-struct <EMRABORTPATH>
  sealed inline-only slot emr-value      :: <EMR>;
  pointer-type-name: <LPEMRABORTPATH>;
  c-name: "struct tagABORTPATH";
end C-struct <EMRABORTPATH>;
define inline constant <PEMRABORTPATH> = <LPEMRABORTPATH>;
define inline constant <EMRBEGINPATH> = <EMRABORTPATH>;
define C-pointer-type <PEMRBEGINPATH> => <EMRABORTPATH>;
define inline constant <EMRENDPATH> = <EMRABORTPATH>;
define C-pointer-type <PEMRENDPATH> => <EMRABORTPATH>;
define inline constant <EMRCLOSEFIGURE> = <EMRABORTPATH>;
define C-pointer-type <PEMRCLOSEFIGURE> => <EMRABORTPATH>;
define inline constant <EMRFLATTENPATH> = <EMRABORTPATH>;
define C-pointer-type <PEMRFLATTENPATH> => <EMRABORTPATH>;
define inline constant <EMRWIDENPATH> = <EMRABORTPATH>;
define C-pointer-type <PEMRWIDENPATH> => <EMRABORTPATH>;
define inline constant <EMRSETMETARGN> = <EMRABORTPATH>;
define C-pointer-type <PEMRSETMETARGN> => <EMRABORTPATH>;
define inline constant <EMRSAVEDC> = <EMRABORTPATH>;
define C-pointer-type <PEMRSAVEDC> => <EMRABORTPATH>;
define inline constant <EMRREALIZEPALETTE> = <EMRABORTPATH>;
define C-pointer-type <PEMRREALIZEPALETTE> => <EMRABORTPATH>;

define C-struct <EMRSELECTCLIPPATH>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot iMode-value    :: <DWORD>;
  pointer-type-name: <LPEMRSELECTCLIPPATH>;
  c-name: "struct tagEMRSELECTCLIPPATH";
end C-struct <EMRSELECTCLIPPATH>;
define inline constant <PEMRSELECTCLIPPATH> = <LPEMRSELECTCLIPPATH>;
define inline constant <EMRSETBKMODE> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETBKMODE> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETMAPMODE> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETMAPMODE> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETPOLYFILLMODE> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETPOLYFILLMODE> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETROP2> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETROP2> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETSTRETCHBLTMODE> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETSTRETCHBLTMODE> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETICMMODE> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETICMMODE> => <EMRSELECTCLIPPATH>;
define inline constant <EMRSETTEXTALIGN> = <EMRSELECTCLIPPATH>;
define C-pointer-type <PEMRSETTEXTALIGN> => <EMRSELECTCLIPPATH>;

define C-struct <EMRSETMITERLIMIT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot eMiterLimit-value :: <C-FLOAT>;
  pointer-type-name: <LPEMRSETMITERLIMIT>;
  c-name: "struct tagEMRSETMITERLIMIT";
end C-struct <EMRSETMITERLIMIT>;
define inline constant <PEMRSETMITERLIMIT> = <LPEMRSETMITERLIMIT>;

define C-struct <EMRRESTOREDC>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot iRelative-value :: <LONG>;
  pointer-type-name: <LPEMRRESTOREDC>;
  c-name: "struct tagEMRRESTOREDC";
end C-struct <EMRRESTOREDC>;
define inline constant <PEMRRESTOREDC> = <LPEMRRESTOREDC>;

define C-struct <EMRSETARCDIRECTION>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot iArcDirection-value :: <DWORD>;
  pointer-type-name: <LPEMRSETARCDIRECTION>;
  c-name: "struct tagEMRSETARCDIRECTION";
end C-struct <EMRSETARCDIRECTION>;
define inline constant <PEMRSETARCDIRECTION> = <LPEMRSETARCDIRECTION>;

define C-struct <EMRSETMAPPERFLAGS>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  pointer-type-name: <LPEMRSETMAPPERFLAGS>;
  c-name: "struct tagEMRSETMAPPERFLAGS";
end C-struct <EMRSETMAPPERFLAGS>;
define inline constant <PEMRSETMAPPERFLAGS> = <LPEMRSETMAPPERFLAGS>;

define C-struct <EMRSETBKCOLOR>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot crColor-value  :: <COLORREF>;
  pointer-type-name: <LPEMRSETBKCOLOR>;
  c-name: "struct tagEMRSETTEXTCOLOR";
end C-struct <EMRSETBKCOLOR>;
define inline constant <PEMRSETBKCOLOR> = <LPEMRSETBKCOLOR>;
define inline constant <EMRSETTEXTCOLOR> = <EMRSETBKCOLOR>;
define C-pointer-type <PEMRSETTEXTCOLOR> => <EMRSETBKCOLOR>;

define C-struct <EMRSELECTOBJECT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihObject-value :: <DWORD>;
  pointer-type-name: <LPEMRSELECTOBJECT>;
  c-name: "struct tagEMRSELECTOBJECT";
end C-struct <EMRSELECTOBJECT>;
define inline constant <PEMRSELECTOBJECT> = <LPEMRSELECTOBJECT>;
define inline constant <EMRDELETEOBJECT> = <EMRSELECTOBJECT>;
define C-pointer-type <PEMRDELETEOBJECT> => <EMRSELECTOBJECT>;

define C-struct <EMRSELECTCOLORSPACE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihCS-value     :: <DWORD>;
  pointer-type-name: <LPEMRSELECTCOLORSPACE>;
  c-name: "struct tagEMRSELECTCOLORSPACE";
end C-struct <EMRSELECTCOLORSPACE>;
define inline constant <PEMRSELECTCOLORSPACE> = <LPEMRSELECTCOLORSPACE>;
define inline constant <EMRDELETECOLORSPACE> = <EMRSELECTCOLORSPACE>;
define C-pointer-type <PEMRDELETECOLORSPACE> =>
	<EMRSELECTCOLORSPACE>;

define C-struct <EMRSELECTPALETTE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPal-value    :: <DWORD>;
  pointer-type-name: <LPEMRSELECTPALETTE>;
  c-name: "struct tagEMRSELECTPALETTE";
end C-struct <EMRSELECTPALETTE>;
define inline constant <PEMRSELECTPALETTE> = <LPEMRSELECTPALETTE>;

define C-struct <EMRRESIZEPALETTE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPal-value    :: <DWORD>;
  sealed inline-only slot cEntries-value :: <DWORD>;
  pointer-type-name: <LPEMRRESIZEPALETTE>;
  c-name: "struct tagEMRRESIZEPALETTE";
end C-struct <EMRRESIZEPALETTE>;
define inline constant <PEMRRESIZEPALETTE> = <LPEMRRESIZEPALETTE>;

define C-struct <EMRSETPALETTEENTRIES>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPal-value    :: <DWORD>;
  sealed inline-only slot iStart-value   :: <DWORD>;
  sealed inline-only slot cEntries-value :: <DWORD>;
  sealed inline-only array slot aPalEntries-array :: <PALETTEENTRY>,
	length: 1, address-getter: aPalEntries-value;
  pointer-type-name: <LPEMRSETPALETTEENTRIES>;
  c-name: "struct tagEMRSETPALETTEENTRIES";
end C-struct <EMRSETPALETTEENTRIES>;
define inline constant <PEMRSETPALETTEENTRIES> = <LPEMRSETPALETTEENTRIES>;

define C-struct <EMRSETCOLORADJUSTMENT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ColorAdjustment-value :: <COLORADJUSTMENT>;
  pointer-type-name: <LPEMRSETCOLORADJUSTMENT>;
  c-name: "struct tagEMRSETCOLORADJUSTMENT";
end C-struct <EMRSETCOLORADJUSTMENT>;
define inline constant <PEMRSETCOLORADJUSTMENT> = <LPEMRSETCOLORADJUSTMENT>;

define C-struct <EMRGDICOMMENT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only array slot Data-array :: <C-BYTE>, length: 1,
	address-getter: Data-value;
  pointer-type-name: <LPEMRGDICOMMENT>;
  c-name: "struct tagEMRGDICOMMENT";
end C-struct <EMRGDICOMMENT>;
define inline constant <PEMRGDICOMMENT> = <LPEMRGDICOMMENT>;

define C-struct <EMREOF>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot nPalEntries-value :: <DWORD>;
  sealed inline-only slot offPalEntries-value :: <DWORD>;
  sealed inline-only slot nSizeLast-value :: <DWORD>;
  pointer-type-name: <LPEMREOF>;
  c-name: "struct tagEMREOF";
end C-struct <EMREOF>;
define inline constant <PEMREOF> = <LPEMREOF>;

define C-struct <EMRLINETO>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptl-value      :: <POINTL>;
  pointer-type-name: <LPEMRLINETO>;
  c-name: "struct tagEMRLINETO";
end C-struct <EMRLINETO>;
define inline constant <PEMRLINETO> = <LPEMRLINETO>;
define inline constant <EMRMOVETOEX> = <EMRLINETO>;
define C-pointer-type <PEMRMOVETOEX> => <EMRLINETO>;

define C-struct <EMROFFSETCLIPRGN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptlOffset-value :: <POINTL>;
  pointer-type-name: <LPEMROFFSETCLIPRGN>;
  c-name: "struct tagEMROFFSETCLIPRGN";
end C-struct <EMROFFSETCLIPRGN>;
define inline constant <PEMROFFSETCLIPRGN> = <LPEMROFFSETCLIPRGN>;

define C-struct <EMRFILLPATH>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  pointer-type-name: <LPEMRFILLPATH>;
  c-name: "struct tagEMRFILLPATH";
end C-struct <EMRFILLPATH>;
define inline constant <PEMRFILLPATH> = <LPEMRFILLPATH>;
define inline constant <EMRSTROKEANDFILLPATH> = <EMRFILLPATH>;
define C-pointer-type <PEMRSTROKEANDFILLPATH> => <EMRFILLPATH>;
define inline constant <EMRSTROKEPATH> = <EMRFILLPATH>;
define C-pointer-type <PEMRSTROKEPATH> => <EMRFILLPATH>;

define C-struct <EMREXCLUDECLIPRECT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclClip-value  :: <RECTL>;
  pointer-type-name: <LPEMREXCLUDECLIPRECT>;
  c-name: "struct tagEMREXCLUDECLIPRECT";
end C-struct <EMREXCLUDECLIPRECT>;
define inline constant <PEMREXCLUDECLIPRECT> = <LPEMREXCLUDECLIPRECT>;
define inline constant <EMRINTERSECTCLIPRECT> = <EMREXCLUDECLIPRECT>;
define C-pointer-type <PEMRINTERSECTCLIPRECT> =>
	<EMREXCLUDECLIPRECT>;

define C-struct <EMRSETVIEWPORTORGEX>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptlOrigin-value :: <POINTL>;
  pointer-type-name: <LPEMRSETVIEWPORTORGEX>;
  c-name: "struct tagEMRSETVIEWPORTORGEX";
end C-struct <EMRSETVIEWPORTORGEX>;
define inline constant <PEMRSETVIEWPORTORGEX> = <LPEMRSETVIEWPORTORGEX>;
define inline constant <EMRSETWINDOWORGEX> = <EMRSETVIEWPORTORGEX>;
define C-pointer-type <PEMRSETWINDOWORGEX> => <EMRSETVIEWPORTORGEX>;
define inline constant <EMRSETBRUSHORGEX> = <EMRSETVIEWPORTORGEX>;
define C-pointer-type <PEMRSETBRUSHORGEX> => <EMRSETVIEWPORTORGEX>;

define C-struct <EMRSETVIEWPORTEXTEX>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot szlExtent-value :: <SIZEL>;
  pointer-type-name: <LPEMRSETVIEWPORTEXTEX>;
  c-name: "struct tagEMRSETVIEWPORTEXTEX";
end C-struct <EMRSETVIEWPORTEXTEX>;
define inline constant <PEMRSETVIEWPORTEXTEX> = <LPEMRSETVIEWPORTEXTEX>;
define inline constant <EMRSETWINDOWEXTEX> = <EMRSETVIEWPORTEXTEX>;
define C-pointer-type <PEMRSETWINDOWEXTEX> => <EMRSETVIEWPORTEXTEX>;

define C-struct <EMRSCALEVIEWPORTEXTEX>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot xNum-value     :: <LONG>;
  sealed inline-only slot xDenom-value   :: <LONG>;
  sealed inline-only slot yNum-value     :: <LONG>;
  sealed inline-only slot yDenom-value   :: <LONG>;
  pointer-type-name: <LPEMRSCALEVIEWPORTEXTEX>;
  c-name: "struct tagEMRSCALEVIEWPORTEXTEX";
end C-struct <EMRSCALEVIEWPORTEXTEX>;
define inline constant <PEMRSCALEVIEWPORTEXTEX> = <LPEMRSCALEVIEWPORTEXTEX>;
define inline constant <EMRSCALEWINDOWEXTEX> = <EMRSCALEVIEWPORTEXTEX>;
define C-pointer-type <PEMRSCALEWINDOWEXTEX> =>
	<EMRSCALEVIEWPORTEXTEX>;

define C-struct <EMRSETWORLDTRANSFORM>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot xform-value    :: <XFORM>;
  pointer-type-name: <LPEMRSETWORLDTRANSFORM>;
  c-name: "struct tagEMRSETWORLDTRANSFORM";
end C-struct <EMRSETWORLDTRANSFORM>;
define inline constant <PEMRSETWORLDTRANSFORM> = <LPEMRSETWORLDTRANSFORM>;

define C-struct <EMRMODIFYWORLDTRANSFORM>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot xform-value    :: <XFORM>;
  sealed inline-only slot iMode-value    :: <DWORD>;
  pointer-type-name: <LPEMRMODIFYWORLDTRANSFORM>;
  c-name: "struct tagEMRMODIFYWORLDTRANSFORM";
end C-struct <EMRMODIFYWORLDTRANSFORM>;
define inline constant <PEMRMODIFYWORLDTRANSFORM> = <LPEMRMODIFYWORLDTRANSFORM>;

define C-struct <EMRSETPIXELV>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptlPixel-value :: <POINTL>;
  sealed inline-only slot crColor-value  :: <COLORREF>;
  pointer-type-name: <LPEMRSETPIXELV>;
  c-name: "struct tagEMRSETPIXELV";
end C-struct <EMRSETPIXELV>;
define inline constant <PEMRSETPIXELV> = <LPEMRSETPIXELV>;

define C-struct <EMREXTFLOODFILL>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptlStart-value :: <POINTL>;
  sealed inline-only slot crColor-value  :: <COLORREF>;
  sealed inline-only slot iMode-value    :: <DWORD>;
  pointer-type-name: <LPEMREXTFLOODFILL>;
  c-name: "struct tagEMREXTFLOODFILL";
end C-struct <EMREXTFLOODFILL>;
define inline constant <PEMREXTFLOODFILL> = <LPEMREXTFLOODFILL>;

define C-struct <EMRELLIPSE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBox-value   :: <RECTL>;
  pointer-type-name: <LPEMRELLIPSE>;
  c-name: "struct tagEMRELLIPSE";
end C-struct <EMRELLIPSE>;
define inline constant <PEMRELLIPSE> = <LPEMRELLIPSE>;
define inline constant <EMRRECTANGLE> = <EMRELLIPSE>;
define C-pointer-type <PEMRRECTANGLE> => <EMRELLIPSE>;

define C-struct <EMRROUNDRECT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBox-value   :: <RECTL>;
  sealed inline-only slot szlCorner-value :: <SIZEL>;
  pointer-type-name: <LPEMRROUNDRECT>;
  c-name: "struct tagEMRROUNDRECT";
end C-struct <EMRROUNDRECT>;
define inline constant <PEMRROUNDRECT> = <LPEMRROUNDRECT>;

define C-struct <EMRARC>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBox-value   :: <RECTL>;
  sealed inline-only slot ptlStart-value :: <POINTL>;
  sealed inline-only slot ptlEnd-value   :: <POINTL>;
  pointer-type-name: <LPEMRARC>;
  c-name: "struct tagEMRARC";
end C-struct <EMRARC>;
define inline constant <PEMRARC> = <LPEMRARC>;
define inline constant <EMRARCTO> = <EMRARC>;
define C-pointer-type <PEMRARCTO> => <EMRARC>;
define inline constant <EMRCHORD> = <EMRARC>;
define C-pointer-type <PEMRCHORD> => <EMRARC>;
define inline constant <EMRPIE> = <EMRARC>;
define C-pointer-type <PEMRPIE> => <EMRARC>;

define C-struct <EMRANGLEARC>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ptlCenter-value :: <POINTL>;
  sealed inline-only slot nRadius-value  :: <DWORD>;
  sealed inline-only slot eStartAngle-value :: <C-FLOAT>;
  sealed inline-only slot eSweepAngle-value :: <C-FLOAT>;
  pointer-type-name: <LPEMRANGLEARC>;
  c-name: "struct tagEMRANGLEARC";
end C-struct <EMRANGLEARC>;
define inline constant <PEMRANGLEARC> = <LPEMRANGLEARC>;

define C-struct <EMRPOLYLINE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cptl-value     :: <DWORD>;
  sealed inline-only array slot aptl-array :: <POINTL>, length: 1,
	address-getter: aptl-value;
  pointer-type-name: <LPEMRPOLYLINE>;
  c-name: "struct tagEMRPOLYLINE";
end C-struct <EMRPOLYLINE>;
define inline constant <PEMRPOLYLINE> = <LPEMRPOLYLINE>;
define inline constant <EMRPOLYBEZIER> = <EMRPOLYLINE>;
define C-pointer-type <PEMRPOLYBEZIER> => <EMRPOLYLINE>;
define inline constant <EMRPOLYGON> = <EMRPOLYLINE>;
define C-pointer-type <PEMRPOLYGON> => <EMRPOLYLINE>;
define inline constant <EMRPOLYBEZIERTO> = <EMRPOLYLINE>;
define C-pointer-type <PEMRPOLYBEZIERTO> => <EMRPOLYLINE>;
define inline constant <EMRPOLYLINETO> = <EMRPOLYLINE>;
define C-pointer-type <PEMRPOLYLINETO> => <EMRPOLYLINE>;

define C-struct <EMRPOLYLINE16>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cpts-value     :: <DWORD>;
  sealed inline-only array slot apts-array :: <POINTS>, length: 1,
	address-getter: apts-value;
  pointer-type-name: <LPEMRPOLYLINE16>;
  c-name: "struct tagEMRPOLYLINE16";
end C-struct <EMRPOLYLINE16>;
define inline constant <PEMRPOLYLINE16> = <LPEMRPOLYLINE16>;
define inline constant <EMRPOLYBEZIER16> = <EMRPOLYLINE16>;
define C-pointer-type <PEMRPOLYBEZIER16> => <EMRPOLYLINE16>;
define inline constant <EMRPOLYGON16> = <EMRPOLYLINE16>;
define C-pointer-type <PEMRPOLYGON16> => <EMRPOLYLINE16>;
define inline constant <EMRPOLYBEZIERTO16> = <EMRPOLYLINE16>;
define C-pointer-type <PEMRPOLYBEZIERTO16> => <EMRPOLYLINE16>;
define inline constant <EMRPOLYLINETO16> = <EMRPOLYLINE16>;
define C-pointer-type <PEMRPOLYLINETO16> => <EMRPOLYLINE16>;

define C-struct <EMRPOLYDRAW16>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cpts-value     :: <DWORD>;
  sealed inline-only array slot apts-array :: <POINTS>, length: 1,
	address-getter: apts-value;
  sealed inline-only array slot abTypes-array :: <C-BYTE>, length: 1,
	address-getter: abTypes-value;
  pointer-type-name: <LPEMRPOLYDRAW16>;
  c-name: "struct tagEMRPOLYDRAW16";
end C-struct <EMRPOLYDRAW16>;
define inline constant <PEMRPOLYDRAW16> = <LPEMRPOLYDRAW16>;

define C-struct <EMRPOLYPOLYLINE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot nPolys-value   :: <DWORD>;
  sealed inline-only slot cptl-value     :: <DWORD>;
  sealed inline-only array slot aPolyCounts-array :: <DWORD>,
	length: 1, address-getter: aPolyCounts-value;
  sealed inline-only array slot aptl-array :: <POINTL>, length: 1,
	address-getter: aptl-value;
  pointer-type-name: <LPEMRPOLYPOLYLINE>;
  c-name: "struct tagEMRPOLYPOLYLINE";
end C-struct <EMRPOLYPOLYLINE>;
define inline constant <PEMRPOLYPOLYLINE> = <LPEMRPOLYPOLYLINE>;
define inline constant <EMRPOLYPOLYGON> = <EMRPOLYPOLYLINE>;
define C-pointer-type <PEMRPOLYPOLYGON> => <EMRPOLYPOLYLINE>;

define C-struct <EMRPOLYPOLYLINE16>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot nPolys-value   :: <DWORD>;
  sealed inline-only slot cpts-value     :: <DWORD>;
  sealed inline-only array slot aPolyCounts-array :: <DWORD>,
	length: 1, address-getter: aPolyCounts-value;
  sealed inline-only array slot apts-array :: <POINTS>, length: 1,
	address-getter: apts-value;
  pointer-type-name: <LPEMRPOLYPOLYLINE16>;
  c-name: "struct tagEMRPOLYPOLYLINE16";
end C-struct <EMRPOLYPOLYLINE16>;
define inline constant <PEMRPOLYPOLYLINE16> = <LPEMRPOLYPOLYLINE16>;
define inline constant <EMRPOLYPOLYGON16> = <EMRPOLYPOLYLINE16>;
define C-pointer-type <PEMRPOLYPOLYGON16> => <EMRPOLYPOLYLINE16>;

define C-struct <EMRINVERTRGN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cbRgnData-value :: <DWORD>;
  sealed inline-only array slot RgnData-array :: <C-BYTE>, length: 1,
	address-getter: RgnData-value;
  pointer-type-name: <LPEMRINVERTRGN>;
  c-name: "struct tagEMRINVERTRGN";
end C-struct <EMRINVERTRGN>;
define inline constant <PEMRINVERTRGN> = <LPEMRINVERTRGN>;
define inline constant <EMRPAINTRGN> = <EMRINVERTRGN>;
define C-pointer-type <PEMRPAINTRGN> => <EMRINVERTRGN>;

define C-struct <EMRFILLRGN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cbRgnData-value :: <DWORD>;
  sealed inline-only slot ihBrush-value  :: <DWORD>;
  sealed inline-only array slot RgnData-array :: <C-BYTE>, length: 1,
	address-getter: RgnData-value;
  pointer-type-name: <LPEMRFILLRGN>;
  c-name: "struct tagEMRFILLRGN";
end C-struct <EMRFILLRGN>;
define inline constant <PEMRFILLRGN> = <LPEMRFILLRGN>;

define C-struct <EMRFRAMERGN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cbRgnData-value :: <DWORD>;
  sealed inline-only slot ihBrush-value  :: <DWORD>;
  sealed inline-only slot szlStroke-value :: <SIZEL>;
  sealed inline-only array slot RgnData-array :: <C-BYTE>, length: 1,
	address-getter: RgnData-value;
  pointer-type-name: <LPEMRFRAMERGN>;
  c-name: "struct tagEMRFRAMERGN";
end C-struct <EMRFRAMERGN>;
define inline constant <PEMRFRAMERGN> = <LPEMRFRAMERGN>;

define C-struct <EMREXTSELECTCLIPRGN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot cbRgnData-value :: <DWORD>;
  sealed inline-only slot iMode-value    :: <DWORD>;
  sealed inline-only array slot RgnData-array :: <C-BYTE>, length: 1,
	address-getter: RgnData-value;
  pointer-type-name: <LPEMREXTSELECTCLIPRGN>;
  c-name: "struct tagEMREXTSELECTCLIPRGN";
end C-struct <EMREXTSELECTCLIPRGN>;
define inline constant <PEMREXTSELECTCLIPRGN> = <LPEMREXTSELECTCLIPRGN>;

define C-struct <EMREXTTEXTOUTA>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot iGraphicsMode-value :: <DWORD>;
  sealed inline-only slot exScale-value  :: <C-FLOAT>;
  sealed inline-only slot eyScale-value  :: <C-FLOAT>;
  sealed inline-only slot emrtext-value  :: <EMRTEXT>;
  pointer-type-name: <LPEMREXTTEXTOUTA>;
  c-name: "struct tagEMREXTTEXTOUTA";
end C-struct <EMREXTTEXTOUTA>;
define inline constant <PEMREXTTEXTOUTA> = <LPEMREXTTEXTOUTA>;
define inline constant <EMREXTTEXTOUTW> = <EMREXTTEXTOUTA>;
define C-pointer-type <PEMREXTTEXTOUTW> => <EMREXTTEXTOUTA>;

define C-struct <EMRPOLYTEXTOUTA>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot iGraphicsMode-value :: <DWORD>;
  sealed inline-only slot exScale-value  :: <C-FLOAT>;
  sealed inline-only slot eyScale-value  :: <C-FLOAT>;
  sealed inline-only slot cStrings-value :: <LONG>;
  sealed inline-only array slot aemrtext-array :: <EMRTEXT>,
	length: 1, address-getter: aemrtext-value;
  pointer-type-name: <LPEMRPOLYTEXTOUTA>;
  c-name: "struct tagEMRPOLYTEXTOUTA";
end C-struct <EMRPOLYTEXTOUTA>;
define inline constant <PEMRPOLYTEXTOUTA> = <LPEMRPOLYTEXTOUTA>;
define inline constant <EMRPOLYTEXTOUTW> = <EMRPOLYTEXTOUTA>;
define C-pointer-type <PEMRPOLYTEXTOUTW> => <EMRPOLYTEXTOUTA>;

define C-struct <EMRBITBLT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot xDest-value    :: <LONG>;
  sealed inline-only slot yDest-value    :: <LONG>;
  sealed inline-only slot cxDest-value   :: <LONG>;
  sealed inline-only slot cyDest-value   :: <LONG>;
  sealed inline-only slot dwRop-value    :: <DWORD>;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot xformSrc-value :: <XFORM>;
  sealed inline-only slot crBkColorSrc-value :: <COLORREF>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  pointer-type-name: <LPEMRBITBLT>;
  c-name: "struct tagEMRBITBLT";
end C-struct <EMRBITBLT>;
define inline constant <PEMRBITBLT> = <LPEMRBITBLT>;

define C-struct <EMRSTRETCHBLT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot xDest-value    :: <LONG>;
  sealed inline-only slot yDest-value    :: <LONG>;
  sealed inline-only slot cxDest-value   :: <LONG>;
  sealed inline-only slot cyDest-value   :: <LONG>;
  sealed inline-only slot dwRop-value    :: <DWORD>;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot xformSrc-value :: <XFORM>;
  sealed inline-only slot crBkColorSrc-value :: <COLORREF>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  sealed inline-only slot cxSrc-value    :: <LONG>;
  sealed inline-only slot cySrc-value    :: <LONG>;
  pointer-type-name: <LPEMRSTRETCHBLT>;
  c-name: "struct tagEMRSTRETCHBLT";
end C-struct <EMRSTRETCHBLT>;
define inline constant <PEMRSTRETCHBLT> = <LPEMRSTRETCHBLT>;

define C-struct <EMRMASKBLT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot xDest-value    :: <LONG>;
  sealed inline-only slot yDest-value    :: <LONG>;
  sealed inline-only slot cxDest-value   :: <LONG>;
  sealed inline-only slot cyDest-value   :: <LONG>;
  sealed inline-only slot dwRop-value    :: <DWORD>;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot xformSrc-value :: <XFORM>;
  sealed inline-only slot crBkColorSrc-value :: <COLORREF>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  sealed inline-only slot xMask-value    :: <LONG>;
  sealed inline-only slot yMask-value    :: <LONG>;
  sealed inline-only slot iUsageMask-value :: <DWORD>;
  sealed inline-only slot offBmiMask-value :: <DWORD>;
  sealed inline-only slot cbBmiMask-value :: <DWORD>;
  sealed inline-only slot offBitsMask-value :: <DWORD>;
  sealed inline-only slot cbBitsMask-value :: <DWORD>;
  pointer-type-name: <LPEMRMASKBLT>;
  c-name: "struct tagEMRMASKBLT";
end C-struct <EMRMASKBLT>;
define inline constant <PEMRMASKBLT> = <LPEMRMASKBLT>;

define C-struct <EMRPLGBLT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only array slot aptlDest-array :: <POINTL>,
	length: 3, address-getter: aptlDest-value;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot cxSrc-value    :: <LONG>;
  sealed inline-only slot cySrc-value    :: <LONG>;
  sealed inline-only slot xformSrc-value :: <XFORM>;
  sealed inline-only slot crBkColorSrc-value :: <COLORREF>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  sealed inline-only slot xMask-value    :: <LONG>;
  sealed inline-only slot yMask-value    :: <LONG>;
  sealed inline-only slot iUsageMask-value :: <DWORD>;
  sealed inline-only slot offBmiMask-value :: <DWORD>;
  sealed inline-only slot cbBmiMask-value :: <DWORD>;
  sealed inline-only slot offBitsMask-value :: <DWORD>;
  sealed inline-only slot cbBitsMask-value :: <DWORD>;
  pointer-type-name: <LPEMRPLGBLT>;
  c-name: "struct tagEMRPLGBLT";
end C-struct <EMRPLGBLT>;
define inline constant <PEMRPLGBLT> = <LPEMRPLGBLT>;

define C-struct <EMRSETDIBITSTODEVICE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot xDest-value    :: <LONG>;
  sealed inline-only slot yDest-value    :: <LONG>;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot cxSrc-value    :: <LONG>;
  sealed inline-only slot cySrc-value    :: <LONG>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot iStartScan-value :: <DWORD>;
  sealed inline-only slot cScans-value   :: <DWORD>;
  pointer-type-name: <LPEMRSETDIBITSTODEVICE>;
  c-name: "struct tagEMRSETDIBITSTODEVICE";
end C-struct <EMRSETDIBITSTODEVICE>;
define inline constant <PEMRSETDIBITSTODEVICE> = <LPEMRSETDIBITSTODEVICE>;

define C-struct <EMRSTRETCHDIBITS>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot xDest-value    :: <LONG>;
  sealed inline-only slot yDest-value    :: <LONG>;
  sealed inline-only slot xSrc-value     :: <LONG>;
  sealed inline-only slot ySrc-value     :: <LONG>;
  sealed inline-only slot cxSrc-value    :: <LONG>;
  sealed inline-only slot cySrc-value    :: <LONG>;
  sealed inline-only slot offBmiSrc-value :: <DWORD>;
  sealed inline-only slot cbBmiSrc-value :: <DWORD>;
  sealed inline-only slot offBitsSrc-value :: <DWORD>;
  sealed inline-only slot cbBitsSrc-value :: <DWORD>;
  sealed inline-only slot iUsageSrc-value :: <DWORD>;
  sealed inline-only slot dwRop-value    :: <DWORD>;
  sealed inline-only slot cxDest-value   :: <LONG>;
  sealed inline-only slot cyDest-value   :: <LONG>;
  pointer-type-name: <LPEMRSTRETCHDIBITS>;
  c-name: "struct tagEMRSTRETCHDIBITS";
end C-struct <EMRSTRETCHDIBITS>;
define inline constant <PEMRSTRETCHDIBITS> = <LPEMRSTRETCHDIBITS>;

define C-struct <EMRCREATEPALETTE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPal-value    :: <DWORD>;
  sealed inline-only slot lgpl-value     :: <LOGPALETTE>;
  pointer-type-name: <LPEMRCREATEPALETTE>;
  c-name: "struct tagEMRCREATEPALETTE";
end C-struct <EMRCREATEPALETTE>;
define inline constant <PEMRCREATEPALETTE> = <LPEMRCREATEPALETTE>;

define C-struct <EMRCREATEPEN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPen-value    :: <DWORD>;
  sealed inline-only slot lopn-value     :: <LOGPEN>;
  pointer-type-name: <LPEMRCREATEPEN>;
  c-name: "struct tagEMRCREATEPEN";
end C-struct <EMRCREATEPEN>;
define inline constant <PEMRCREATEPEN> = <LPEMRCREATEPEN>;

define C-struct <EMREXTCREATEPEN>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihPen-value    :: <DWORD>;
  sealed inline-only slot offBmi-value   :: <DWORD>;
  sealed inline-only slot cbBmi-value    :: <DWORD>;
  sealed inline-only slot offBits-value  :: <DWORD>;
  sealed inline-only slot cbBits-value   :: <DWORD>;
  sealed inline-only slot elp-value      :: <EXTLOGPEN>;
  pointer-type-name: <LPEMREXTCREATEPEN>;
  c-name: "struct tagEMREXTCREATEPEN";
end C-struct <EMREXTCREATEPEN>;
define inline constant <PEMREXTCREATEPEN> = <LPEMREXTCREATEPEN>;

define C-struct <EMRCREATEBRUSHINDIRECT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihBrush-value  :: <DWORD>;
  sealed inline-only slot lb-value       :: <LOGBRUSH>;
  pointer-type-name: <LPEMRCREATEBRUSHINDIRECT>;
  c-name: "struct tagEMRCREATEBRUSHINDIRECT";
end C-struct <EMRCREATEBRUSHINDIRECT>;
define inline constant <PEMRCREATEBRUSHINDIRECT> = <LPEMRCREATEBRUSHINDIRECT>;

define C-struct <EMRCREATEMONOBRUSH>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihBrush-value  :: <DWORD>;
  sealed inline-only slot iUsage-value   :: <DWORD>;
  sealed inline-only slot offBmi-value   :: <DWORD>;
  sealed inline-only slot cbBmi-value    :: <DWORD>;
  sealed inline-only slot offBits-value  :: <DWORD>;
  sealed inline-only slot cbBits-value   :: <DWORD>;
  pointer-type-name: <LPEMRCREATEMONOBRUSH>;
  c-name: "struct tagEMRCREATEMONOBRUSH";
end C-struct <EMRCREATEMONOBRUSH>;
define inline constant <PEMRCREATEMONOBRUSH> = <LPEMRCREATEMONOBRUSH>;

define C-struct <EMRCREATEDIBPATTERNBRUSHPT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot ihBrush-value  :: <DWORD>;
  sealed inline-only slot iUsage-value   :: <DWORD>;
  sealed inline-only slot offBmi-value   :: <DWORD>;
  sealed inline-only slot cbBmi-value    :: <DWORD>;
  sealed inline-only slot offBits-value  :: <DWORD>;
  sealed inline-only slot cbBits-value   :: <DWORD>;
  pointer-type-name: <LPEMRCREATEDIBPATTERNBRUSHPT>;
  c-name: "struct tagEMRCREATEDIBPATTERNBRUSHPT";
end C-struct <EMRCREATEDIBPATTERNBRUSHPT>;
define inline constant <PEMRCREATEDIBPATTERNBRUSHPT> = <LPEMRCREATEDIBPATTERNBRUSHPT>;

define C-struct <EMRFORMAT>
  sealed inline-only slot dSignature-value :: <DWORD>;
  sealed inline-only slot nVersion-value :: <DWORD>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only slot offData-value  :: <DWORD>;
  pointer-type-name: <LPEMRFORMAT>;
  c-name: "struct tagEMRFORMAT";
end C-struct <EMRFORMAT>;
define inline constant <PEMRFORMAT> = <LPEMRFORMAT>;

define C-struct <EMRGLSRECORD>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only array slot Data-array :: <C-BYTE>, length: 1,
	address-getter: Data-value;
  pointer-type-name: <LPEMRGLSRECORD>;
  c-name: "struct tagEMRGLSRECORD";
end C-struct <EMRGLSRECORD>;
define inline constant <PEMRGLSRECORD> = <LPEMRGLSRECORD>;

define C-struct <EMRGLSBOUNDEDRECORD>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot rclBounds-value :: <RECTL>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only array slot Data-array :: <C-BYTE>, length: 1,
	address-getter: Data-value;
  pointer-type-name: <LPEMRGLSBOUNDEDRECORD>;
  c-name: "struct tagEMRGLSBOUNDEDRECORD";
end C-struct <EMRGLSBOUNDEDRECORD>;
define inline constant <PEMRGLSBOUNDEDRECORD> = <LPEMRGLSBOUNDEDRECORD>;

define C-struct <EMRPIXELFORMAT>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot pfd-value      :: <PIXELFORMATDESCRIPTOR>;
  pointer-type-name: <LPEMRPIXELFORMAT>;
  c-name: "struct tagEMRPIXELFORMAT";
end C-struct <EMRPIXELFORMAT>;
define inline constant <PEMRPIXELFORMAT> = <LPEMRPIXELFORMAT>;
define inline-only constant $SETICMPROFILE-EMBEDED      = #x00000001;

define C-struct <EMRSETICMPROFILE>
  sealed inline-only slot emr-value      :: <EMR>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot cbName-value   :: <DWORD>;
  sealed inline-only slot cbData-value   :: <DWORD>;
  sealed inline-only array slot Data-array :: <C-BYTE>, length: 1,
	address-getter: Data-value;
  pointer-type-name: <LPEMRSETICMPROFILE>;
  c-name: "struct tagEMRSETICMPROFILE";
end C-struct <EMRSETICMPROFILE>;
define inline constant <PEMRSETICMPROFILE> = <LPEMRSETICMPROFILE>;
define inline-only constant $GDICOMMENT-IDENTIFIER      =
	as(<machine-word>, #x43494447);
define inline-only constant $GDICOMMENT-WINDOWS-METAFILE =
	as(<machine-word>, #x80000001);
define inline-only constant $GDICOMMENT-BEGINGROUP      = #x00000002;
define inline-only constant $GDICOMMENT-ENDGROUP        = #x00000003;
define inline-only constant $GDICOMMENT-MULTIFORMATS    =
	as(<machine-word>, #x40000004);
define inline-only constant $EPS-SIGNATURE              =
	as(<machine-word>, #x46535045);

define inline-only C-function SwapBuffers
  parameter hdc1       :: <HDC>;
  result value :: <BOOL>;
  c-name: "SwapBuffers", c-modifiers: "__stdcall";
end;

define C-struct <POINTFLOAT>
  sealed inline-only slot x-value        :: <C-FLOAT>;
  sealed inline-only slot y-value        :: <C-FLOAT>;
  pointer-type-name: <LPPOINTFLOAT>;
  c-name: "struct _POINTFLOAT";
end C-struct <POINTFLOAT>;
define inline constant <PPOINTFLOAT> = <LPPOINTFLOAT>;

define C-struct <GLYPHMETRICSFLOAT>
  sealed inline-only slot gmfBlackBoxX-value :: <C-FLOAT>;
  sealed inline-only slot gmfBlackBoxY-value :: <C-FLOAT>;
  sealed inline-only slot gmfptGlyphOrigin-value :: <POINTFLOAT>;
  sealed inline-only slot gmfCellIncX-value :: <C-FLOAT>;
  sealed inline-only slot gmfCellIncY-value :: <C-FLOAT>;
  pointer-type-name: <LPGLYPHMETRICSFLOAT>;
  c-name: "struct _GLYPHMETRICSFLOAT";
end C-struct <GLYPHMETRICSFLOAT>;
define inline constant <PGLYPHMETRICSFLOAT> = <LPGLYPHMETRICSFLOAT>;
define inline-only constant $WGL-FONT-LINES             =    0;
define inline-only constant $WGL-FONT-POLYGONS          =    1;

define C-struct <LAYERPLANEDESCRIPTOR>
  sealed inline-only slot nSize-value    :: <WORD>;
  sealed inline-only slot nVersion-value :: <WORD>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot iPixelType-value :: <C-BYTE>;
  sealed inline-only slot cColorBits-value :: <C-BYTE>;
  sealed inline-only slot cRedBits-value :: <C-BYTE>;
  sealed inline-only slot cRedShift-value :: <C-BYTE>;
  sealed inline-only slot cGreenBits-value :: <C-BYTE>;
  sealed inline-only slot cGreenShift-value :: <C-BYTE>;
  sealed inline-only slot cBlueBits-value :: <C-BYTE>;
  sealed inline-only slot cBlueShift-value :: <C-BYTE>;
  sealed inline-only slot cAlphaBits-value :: <C-BYTE>;
  sealed inline-only slot cAlphaShift-value :: <C-BYTE>;
  sealed inline-only slot cAccumBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumRedBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumGreenBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumBlueBits-value :: <C-BYTE>;
  sealed inline-only slot cAccumAlphaBits-value :: <C-BYTE>;
  sealed inline-only slot cDepthBits-value :: <C-BYTE>;
  sealed inline-only slot cStencilBits-value :: <C-BYTE>;
  sealed inline-only slot cAuxBuffers-value :: <C-BYTE>;
  sealed inline-only slot iLayerPlane-value :: <C-BYTE>;
  sealed inline-only slot bReserved      :: <C-BYTE>;
  sealed inline-only slot crTransparent-value :: <COLORREF>;
  pointer-type-name: <LPLAYERPLANEDESCRIPTOR>;
  c-name: "struct tagLAYERPLANEDESCRIPTOR";
end C-struct <LAYERPLANEDESCRIPTOR>;
define inline constant <PLAYERPLANEDESCRIPTOR> = <LPLAYERPLANEDESCRIPTOR>;
define inline-only constant $LPD-DOUBLEBUFFER           = #x00000001;
define inline-only constant $LPD-STEREO                 = #x00000002;
define inline-only constant $LPD-SUPPORT-GDI            = #x00000010;
define inline-only constant $LPD-SUPPORT-OPENGL         = #x00000020;
define inline-only constant $LPD-SHARE-DEPTH            = #x00000040;
define inline-only constant $LPD-SHARE-STENCIL          = #x00000080;
define inline-only constant $LPD-SHARE-ACCUM            = #x00000100;
define inline-only constant $LPD-SWAP-EXCHANGE          = #x00000200;
define inline-only constant $LPD-SWAP-COPY              = #x00000400;
define inline-only constant $LPD-TRANSPARENT            = #x00001000;
define inline-only constant $LPD-TYPE-RGBA              =    0;
define inline-only constant $LPD-TYPE-COLORINDEX        =    1;

define inline-only constant $RGN-MIN     = $RGN-AND;
define inline-only constant $RGN-MAX     = $RGN-COPY;
define inline-only constant $VTA-BASELINE = $TA-BASELINE;
define inline-only constant $VTA-LEFT    = $TA-BOTTOM;
define inline-only constant $VTA-RIGHT   = $TA-TOP;
define inline-only constant $VTA-CENTER  = $TA-CENTER;
define inline-only constant $VTA-BOTTOM  = $TA-RIGHT;
define inline-only constant $VTA-TOP     = $TA-LEFT;
define inline-only constant $DCB-DIRTY   = $DCB-ACCUMULATE;
define sealed domain make (singleton(<LPDRAWPATRECT>));
define sealed domain initialize (<LPDRAWPATRECT>);
define sealed domain make (singleton(<LPPSINJECTDATA>));
define sealed domain initialize (<LPPSINJECTDATA>);
define inline-only constant $MWT-MIN     = $MWT-IDENTITY;
define inline-only constant $MWT-MAX     = $MWT-RIGHTMULTIPLY;
define sealed domain make (singleton(<LPXFORM>));
define sealed domain initialize (<LPXFORM>);
define sealed domain make (singleton(<LPBITMAP>));
define sealed domain initialize (<LPBITMAP>);
define sealed domain make (singleton(<LPRGBTRIPLE>));
define sealed domain initialize (<LPRGBTRIPLE>);
define sealed domain make (singleton(<LPRGBQUAD>));
define sealed domain initialize (<LPRGBQUAD>);
define sealed domain make (singleton(<LPCIEXYZ>));
define sealed domain initialize (<LPCIEXYZ>);
define sealed domain make (singleton(<LPCIEXYZTRIPLE>));
define sealed domain initialize (<LPCIEXYZTRIPLE>);
define sealed domain make (singleton(<LPLOGCOLORSPACEA>));
define sealed domain initialize (<LPLOGCOLORSPACEA>);
define sealed domain make (singleton(<LPBITMAPCOREHEADER>));
define sealed domain initialize (<LPBITMAPCOREHEADER>);
define sealed domain make (singleton(<LPBITMAPINFOHEADER>));
define sealed domain initialize (<LPBITMAPINFOHEADER>);
define sealed domain make (singleton(<LPBITMAPV4HEADER>));
define sealed domain initialize (<LPBITMAPV4HEADER>);
define sealed domain make (singleton(<LPBITMAPINFO>));
define sealed domain initialize (<LPBITMAPINFO>);
define sealed domain make (singleton(<LPBITMAPCOREINFO>));
define sealed domain initialize (<LPBITMAPCOREINFO>);
define sealed domain make (singleton(<LPBITMAPFILEHEADER>));
define sealed domain initialize (<LPBITMAPFILEHEADER>);
define sealed domain make (singleton(<LPFONTSIGNATURE>));
define sealed domain initialize (<LPFONTSIGNATURE>);
define sealed domain make (singleton(<LPCHARSETINFO>));
define sealed domain initialize (<LPCHARSETINFO>);
define sealed domain make (singleton(<LPLOCALESIGNATURE>));
define sealed domain initialize (<LPLOCALESIGNATURE>);
define sealed domain make (singleton(<LPHANDLETABLE>));
define sealed domain initialize (<LPHANDLETABLE>);
define sealed domain make (singleton(<LPMETARECORD>));
define sealed domain initialize (<LPMETARECORD>);
define sealed domain make (singleton(<LPMETAFILEPICT>));
define sealed domain initialize (<LPMETAFILEPICT>);
define sealed domain make (singleton(<LPMETAHEADER>));
define sealed domain initialize (<LPMETAHEADER>);
define sealed domain make (singleton(<LPENHMETARECORD>));
define sealed domain initialize (<LPENHMETARECORD>);
define sealed domain make (singleton(<LPENHMETAHEADER>));
define sealed domain initialize (<LPENHMETAHEADER>);
define sealed domain make (singleton(<LPTEXTMETRICA>));
define sealed domain initialize (<LPTEXTMETRICA>);
define sealed domain make (singleton(<LPNEWTEXTMETRICA>));
define sealed domain initialize (<LPNEWTEXTMETRICA>);
define sealed domain make (singleton(<LPNEWTEXTMETRICEXA>));
define sealed domain initialize (<LPNEWTEXTMETRICEXA>);
define sealed domain make (singleton(<LPPELARRAY>));
define sealed domain initialize (<LPPELARRAY>);
define sealed domain make (singleton(<LPLOGBRUSH>));
define sealed domain initialize (<LPLOGBRUSH>);
define sealed domain make (singleton(<LPLOGPEN>));
define sealed domain initialize (<LPLOGPEN>);
define sealed domain make (singleton(<LPEXTLOGPEN>));
define sealed domain initialize (<LPEXTLOGPEN>);
define sealed domain make (singleton(<LPPALETTEENTRY>));
define sealed domain initialize (<LPPALETTEENTRY>);
define sealed domain make (singleton(<LPLOGPALETTE>));
define sealed domain initialize (<LPLOGPALETTE>);
define sealed domain make (singleton(<LPLOGFONTA>));
define sealed domain initialize (<LPLOGFONTA>);
define sealed domain make (singleton(<LPENUMLOGFONTA>));
define sealed domain initialize (<LPENUMLOGFONTA>);
define sealed domain make (singleton(<LPENUMLOGFONTEXA>));
define sealed domain initialize (<LPENUMLOGFONTEXA>);
define inline-only constant $FW-ULTRALIGHT = $FW-EXTRALIGHT;
define inline-only constant $FW-REGULAR  = $FW-NORMAL;
define inline-only constant $FW-DEMIBOLD = $FW-SEMIBOLD;
define inline-only constant $FW-ULTRABOLD = $FW-EXTRABOLD;
define inline-only constant $FW-BLACK    = $FW-HEAVY;
define sealed domain make (singleton(<LPPANOSE>));
define sealed domain initialize (<LPPANOSE>);
define sealed domain make (singleton(<LPEXTLOGFONTA>));
define sealed domain initialize (<LPEXTLOGFONTA>);
define inline-only constant $MM-MIN      = $MM-TEXT;
define inline-only constant $MM-MAX      = $MM-ANISOTROPIC;
define inline-only constant $MM-MAX-FIXEDSCALE = $MM-TWIPS;
define inline-only constant $HOLLOW-BRUSH = $NULL-BRUSH;
define inline-only constant $BS-HOLLOW   = $BS-NULL;
define sealed domain make (singleton(<LPDEVMODEA>));
define sealed domain initialize (<LPDEVMODEA>);
define inline-only constant $DMPAPER-FIRST = $DMPAPER-LETTER;
define inline-only constant $DMPAPER-LAST =
	$DMPAPER-A3-EXTRA-TRANSVERSE;
define inline-only constant $DMBIN-FIRST = $DMBIN-UPPER;
define inline-only constant $DMBIN-LAST  = $DMBIN-FORMSOURCE;
define sealed domain make (singleton(<LPDISPLAY-DEVICEA>));
define sealed domain initialize (<LPDISPLAY-DEVICEA>);
define sealed domain make (singleton(<LPRGNDATAHEADER>));
define sealed domain initialize (<LPRGNDATAHEADER>);
define sealed domain make (singleton(<LPRGNDATA>));
define sealed domain initialize (<LPRGNDATA>);
define sealed domain make (singleton(<LPABC>));
define sealed domain initialize (<LPABC>);
define sealed domain make (singleton(<LPABCFLOAT>));
define sealed domain initialize (<LPABCFLOAT>);
define sealed domain make (singleton(<LPOUTLINETEXTMETRICA>));
define sealed domain initialize (<LPOUTLINETEXTMETRICA>);
define sealed domain make (singleton(<LPPOLYTEXTA>));
define sealed domain initialize (<LPPOLYTEXTA>);
define sealed domain make (singleton(<LPFIXED>));
define sealed domain initialize (<LPFIXED>);
define sealed domain make (singleton(<LPMAT2>));
define sealed domain initialize (<LPMAT2>);
define sealed domain make (singleton(<LPGLYPHMETRICS>));
define sealed domain initialize (<LPGLYPHMETRICS>);
define sealed domain make (singleton(<LPPOINTFX>));
define sealed domain initialize (<LPPOINTFX>);
define sealed domain make (singleton(<LPTTPOLYCURVE>));
define sealed domain initialize (<LPTTPOLYCURVE>);
define sealed domain make (singleton(<LPTTPOLYGONHEADER>));
define sealed domain initialize (<LPTTPOLYGONHEADER>);
define sealed domain make (singleton(<LPGCP-RESULTSA>));
define sealed domain initialize (<LPGCP-RESULTSA>);
define sealed domain make (singleton(<LPRASTERIZER-STATUS>));
define sealed domain initialize (<LPRASTERIZER-STATUS>);
define sealed domain make (singleton(<LPPIXELFORMATDESCRIPTOR>));
define sealed domain initialize (<LPPIXELFORMATDESCRIPTOR>);
define sealed domain make (singleton(<LPTRIVERTEX>));
define sealed domain initialize (<LPTRIVERTEX>);
define sealed domain make (singleton(<LPGRADIENT-TRIANGLE>));
define sealed domain initialize (<LPGRADIENT-TRIANGLE>);
define sealed domain make (singleton(<LPGRADIENT-RECT>));
define sealed domain initialize (<LPGRADIENT-RECT>);
define sealed domain make (singleton(<LPBLENDFUNCTION>));
define sealed domain initialize (<LPBLENDFUNCTION>);
define sealed domain make (singleton(<LPDIBSECTION>));
define sealed domain initialize (<LPDIBSECTION>);
define inline-only constant $ILLUMINANT-MAX-INDEX = $ILLUMINANT-F2;
define inline-only constant $ILLUMINANT-TUNGSTEN = $ILLUMINANT-A;
define inline-only constant $ILLUMINANT-DAYLIGHT = $ILLUMINANT-C;
define inline-only constant $ILLUMINANT-FLUORESCENT = $ILLUMINANT-F2;
define inline-only constant $ILLUMINANT-NTSC = $ILLUMINANT-C;
define sealed domain make (singleton(<LPCOLORADJUSTMENT>));
define sealed domain initialize (<LPCOLORADJUSTMENT>);
define sealed domain make (singleton(<LPDOCINFOA>));
define sealed domain initialize (<LPDOCINFOA>);
define sealed domain make (singleton(<LPKERNINGPAIR>));
define sealed domain initialize (<LPKERNINGPAIR>);
define sealed domain make (singleton(<LPEMR>));
define sealed domain initialize (<LPEMR>);
define sealed domain make (singleton(<LPEMRTEXT>));
define sealed domain initialize (<LPEMRTEXT>);
define sealed domain make (singleton(<LPEMRABORTPATH>));
define sealed domain initialize (<LPEMRABORTPATH>);
define sealed domain make (singleton(<LPEMRSELECTCLIPPATH>));
define sealed domain initialize (<LPEMRSELECTCLIPPATH>);
define sealed domain make (singleton(<LPEMRSETMITERLIMIT>));
define sealed domain initialize (<LPEMRSETMITERLIMIT>);
define sealed domain make (singleton(<LPEMRRESTOREDC>));
define sealed domain initialize (<LPEMRRESTOREDC>);
define sealed domain make (singleton(<LPEMRSETARCDIRECTION>));
define sealed domain initialize (<LPEMRSETARCDIRECTION>);
define sealed domain make (singleton(<LPEMRSETMAPPERFLAGS>));
define sealed domain initialize (<LPEMRSETMAPPERFLAGS>);
define sealed domain make (singleton(<LPEMRSETBKCOLOR>));
define sealed domain initialize (<LPEMRSETBKCOLOR>);
define sealed domain make (singleton(<LPEMRSELECTOBJECT>));
define sealed domain initialize (<LPEMRSELECTOBJECT>);
define sealed domain make (singleton(<LPEMRSELECTCOLORSPACE>));
define sealed domain initialize (<LPEMRSELECTCOLORSPACE>);
define sealed domain make (singleton(<LPEMRSELECTPALETTE>));
define sealed domain initialize (<LPEMRSELECTPALETTE>);
define sealed domain make (singleton(<LPEMRRESIZEPALETTE>));
define sealed domain initialize (<LPEMRRESIZEPALETTE>);
define sealed domain make (singleton(<LPEMRSETPALETTEENTRIES>));
define sealed domain initialize (<LPEMRSETPALETTEENTRIES>);
define sealed domain make (singleton(<LPEMRSETCOLORADJUSTMENT>));
define sealed domain initialize (<LPEMRSETCOLORADJUSTMENT>);
define sealed domain make (singleton(<LPEMRGDICOMMENT>));
define sealed domain initialize (<LPEMRGDICOMMENT>);
define sealed domain make (singleton(<LPEMREOF>));
define sealed domain initialize (<LPEMREOF>);
define sealed domain make (singleton(<LPEMRLINETO>));
define sealed domain initialize (<LPEMRLINETO>);
define sealed domain make (singleton(<LPEMROFFSETCLIPRGN>));
define sealed domain initialize (<LPEMROFFSETCLIPRGN>);
define sealed domain make (singleton(<LPEMRFILLPATH>));
define sealed domain initialize (<LPEMRFILLPATH>);
define sealed domain make (singleton(<LPEMREXCLUDECLIPRECT>));
define sealed domain initialize (<LPEMREXCLUDECLIPRECT>);
define sealed domain make (singleton(<LPEMRSETVIEWPORTORGEX>));
define sealed domain initialize (<LPEMRSETVIEWPORTORGEX>);
define sealed domain make (singleton(<LPEMRSETVIEWPORTEXTEX>));
define sealed domain initialize (<LPEMRSETVIEWPORTEXTEX>);
define sealed domain make (singleton(<LPEMRSCALEVIEWPORTEXTEX>));
define sealed domain initialize (<LPEMRSCALEVIEWPORTEXTEX>);
define sealed domain make (singleton(<LPEMRSETWORLDTRANSFORM>));
define sealed domain initialize (<LPEMRSETWORLDTRANSFORM>);
define sealed domain make (singleton(<LPEMRMODIFYWORLDTRANSFORM>));
define sealed domain initialize (<LPEMRMODIFYWORLDTRANSFORM>);
define sealed domain make (singleton(<LPEMRSETPIXELV>));
define sealed domain initialize (<LPEMRSETPIXELV>);
define sealed domain make (singleton(<LPEMREXTFLOODFILL>));
define sealed domain initialize (<LPEMREXTFLOODFILL>);
define sealed domain make (singleton(<LPEMRELLIPSE>));
define sealed domain initialize (<LPEMRELLIPSE>);
define sealed domain make (singleton(<LPEMRROUNDRECT>));
define sealed domain initialize (<LPEMRROUNDRECT>);
define sealed domain make (singleton(<LPEMRARC>));
define sealed domain initialize (<LPEMRARC>);
define sealed domain make (singleton(<LPEMRANGLEARC>));
define sealed domain initialize (<LPEMRANGLEARC>);
define sealed domain make (singleton(<LPEMRPOLYLINE>));
define sealed domain initialize (<LPEMRPOLYLINE>);
define sealed domain make (singleton(<LPEMRPOLYLINE16>));
define sealed domain initialize (<LPEMRPOLYLINE16>);
define sealed domain make (singleton(<LPEMRPOLYDRAW16>));
define sealed domain initialize (<LPEMRPOLYDRAW16>);
define sealed domain make (singleton(<LPEMRPOLYPOLYLINE>));
define sealed domain initialize (<LPEMRPOLYPOLYLINE>);
define sealed domain make (singleton(<LPEMRPOLYPOLYLINE16>));
define sealed domain initialize (<LPEMRPOLYPOLYLINE16>);
define sealed domain make (singleton(<LPEMRINVERTRGN>));
define sealed domain initialize (<LPEMRINVERTRGN>);
define sealed domain make (singleton(<LPEMRFILLRGN>));
define sealed domain initialize (<LPEMRFILLRGN>);
define sealed domain make (singleton(<LPEMRFRAMERGN>));
define sealed domain initialize (<LPEMRFRAMERGN>);
define sealed domain make (singleton(<LPEMREXTSELECTCLIPRGN>));
define sealed domain initialize (<LPEMREXTSELECTCLIPRGN>);
define sealed domain make (singleton(<LPEMREXTTEXTOUTA>));
define sealed domain initialize (<LPEMREXTTEXTOUTA>);
define sealed domain make (singleton(<LPEMRPOLYTEXTOUTA>));
define sealed domain initialize (<LPEMRPOLYTEXTOUTA>);
define sealed domain make (singleton(<LPEMRBITBLT>));
define sealed domain initialize (<LPEMRBITBLT>);
define sealed domain make (singleton(<LPEMRSTRETCHBLT>));
define sealed domain initialize (<LPEMRSTRETCHBLT>);
define sealed domain make (singleton(<LPEMRMASKBLT>));
define sealed domain initialize (<LPEMRMASKBLT>);
define sealed domain make (singleton(<LPEMRPLGBLT>));
define sealed domain initialize (<LPEMRPLGBLT>);
define sealed domain make (singleton(<LPEMRSETDIBITSTODEVICE>));
define sealed domain initialize (<LPEMRSETDIBITSTODEVICE>);
define sealed domain make (singleton(<LPEMRSTRETCHDIBITS>));
define sealed domain initialize (<LPEMRSTRETCHDIBITS>);
define sealed domain make (singleton(<LPEMRCREATEPALETTE>));
define sealed domain initialize (<LPEMRCREATEPALETTE>);
define sealed domain make (singleton(<LPEMRCREATEPEN>));
define sealed domain initialize (<LPEMRCREATEPEN>);
define sealed domain make (singleton(<LPEMREXTCREATEPEN>));
define sealed domain initialize (<LPEMREXTCREATEPEN>);
define sealed domain make (singleton(<LPEMRCREATEBRUSHINDIRECT>));
define sealed domain initialize (<LPEMRCREATEBRUSHINDIRECT>);
define sealed domain make (singleton(<LPEMRCREATEMONOBRUSH>));
define sealed domain initialize (<LPEMRCREATEMONOBRUSH>);
define sealed domain make (singleton(<LPEMRCREATEDIBPATTERNBRUSHPT>));
define sealed domain initialize (<LPEMRCREATEDIBPATTERNBRUSHPT>);
define sealed domain make (singleton(<LPEMRFORMAT>));
define sealed domain initialize (<LPEMRFORMAT>);
define sealed domain make (singleton(<LPEMRGLSRECORD>));
define sealed domain initialize (<LPEMRGLSRECORD>);
define sealed domain make (singleton(<LPEMRGLSBOUNDEDRECORD>));
define sealed domain initialize (<LPEMRGLSBOUNDEDRECORD>);
define sealed domain make (singleton(<LPEMRPIXELFORMAT>));
define sealed domain initialize (<LPEMRPIXELFORMAT>);
define sealed domain make (singleton(<LPEMRSETICMPROFILE>));
define sealed domain initialize (<LPEMRSETICMPROFILE>);
define sealed domain make (singleton(<LPPOINTFLOAT>));
define sealed domain initialize (<LPPOINTFLOAT>);
define sealed domain make (singleton(<LPGLYPHMETRICSFLOAT>));
define sealed domain initialize (<LPGLYPHMETRICSFLOAT>);
define sealed domain make (singleton(<LPLAYERPLANEDESCRIPTOR>));
define sealed domain initialize (<LPLAYERPLANEDESCRIPTOR>);
