msi/tests: Fix some test failures on Win9x and WinMe.
[wine] / include / wingdi.h
index ce66b8b..e7be055 100644 (file)
@@ -13,7 +13,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
 #ifndef _WINGDI_
 extern "C" {
 #endif
 
+#ifdef _GDI32_
+#define WINGDIAPI
+#else
+#define WINGDIAPI DECLSPEC_IMPORT
+#endif
+
 typedef struct _ABCFLOAT {
     FLOAT   abcfA;
     FLOAT   abcfB;
@@ -88,6 +94,7 @@ typedef struct tagPIXELFORMATDESCRIPTOR {
 #define PFD_SWAP_COPY             0x00000400
 #define PFD_SWAP_LAYER_BUFFERS    0x00000800
 #define PFD_GENERIC_ACCELERATED   0x00001000
+#define PFD_SUPPORT_COMPOSITION   0x00008000 /* Vista stuff */
 
 #define PFD_DEPTH_DONTCARE        0x20000000
 #define PFD_DOUBLEBUFFER_DONTCARE 0x40000000
@@ -385,6 +392,7 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE)
 #define R2_MERGEPENNOT  14
 #define R2_MERGEPEN     15
 #define R2_WHITE        16
+#define R2_LAST         16
 
 #define MAKEROP4(fore,back) (DWORD)((((back)<<8)&0xFF000000)|(fore))
 
@@ -434,11 +442,8 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE)
 #define CMYK(c,m,y,k)       ((COLORREF)((((BYTE)(k)|((WORD)((BYTE)(y))<<8))|(((DWORD)(BYTE)(m))<<16))|(((DWORD)(BYTE)(c))<<24)))
 
 /* ICM stuff */
-typedef INT (CALLBACK *EnumICMProfilesProcCallbackA)(LPSTR lpszFilename,LPARAM lParam);
-typedef INT (CALLBACK *EnumICMProfilesProcCallbackW)(LPWSTR lpszFilename,LPARAM lParam);
-DECL_WINELIB_TYPE_AW(EnumICMProfilesProcCallback)
-typedef EnumICMProfilesProcCallbackA ICMENUMPROCA;
-typedef EnumICMProfilesProcCallbackW ICMENUMPROCW;
+typedef INT (CALLBACK *ICMENUMPROCA)(LPSTR lpszFilename,LPARAM lParam);
+typedef INT (CALLBACK *ICMENUMPROCW)(LPWSTR lpszFilename,LPARAM lParam);
 DECL_WINELIB_TYPE_AW(ICMENUMPROC)
 
 
@@ -481,11 +486,18 @@ typedef struct
 
 typedef struct
 {
-    UINT     lbStyle;
+    UINT       lbStyle;
     COLORREF   lbColor;
-    INT      lbHatch;
+    ULONG_PTR  lbHatch;
 } LOGBRUSH, *PLOGBRUSH, *LPLOGBRUSH;
 
+typedef struct
+{
+    UINT       lbStyle;
+    COLORREF   lbColor;
+    ULONG      lbHatch;
+} LOGBRUSH32, *PLOGBRUSH32, *LPLOGBRUSH32;
+
 typedef LOGBRUSH PATTERN, *PPATTERN, *LPPATTERN;
 
 
@@ -519,7 +531,7 @@ typedef LOGBRUSH PATTERN, *PPATTERN, *LPPATTERN;
 #define DEVICE_FONTTYPE     0x0002
 #define TRUETYPE_FONTTYPE   0x0004
 
-typedef struct
+typedef struct tagLOGFONTA
 {
     LONG   lfHeight;
     LONG   lfWidth;
@@ -537,7 +549,7 @@ typedef struct
     CHAR   lfFaceName[LF_FACESIZE];
 } LOGFONTA, *PLOGFONTA, *LPLOGFONTA;
 
-typedef struct
+typedef struct tagLOGFONTW
 {
     LONG   lfHeight;
     LONG   lfWidth;
@@ -654,8 +666,9 @@ typedef struct
 #define OBJ_EXTPEN          11
 #define OBJ_ENHMETADC       12
 #define OBJ_ENHMETAFILE     13
+#define OBJ_COLORSPACE      14
 
-typedef struct
+typedef struct tagXFORM
 {
     FLOAT  eM11;
     FLOAT  eM12;
@@ -775,7 +788,7 @@ typedef struct
 #ifndef _TEXTMETRIC_DEFINED
 #define _TEXTMETRIC_DEFINED
 
-typedef struct
+typedef struct tagTEXTMETRICA
 {
     LONG      tmHeight;
     LONG      tmAscent;
@@ -799,7 +812,7 @@ typedef struct
     BYTE      tmCharSet;
 } TEXTMETRICA, *LPTEXTMETRICA, *PTEXTMETRICA;
 
-typedef struct
+typedef struct tagTEXTMETRICW
 {
     LONG      tmHeight;
     LONG      tmAscent;
@@ -1253,7 +1266,10 @@ typedef FARPROC LINEDDAPROC;
 #define ETO_CLIPPED         0x0004
 #define ETO_GLYPH_INDEX     0x0010
 #define ETO_RTLREADING      0x0080
+#define ETO_NUMERICSLOCAL   0x0400
+#define ETO_NUMERICSLATIN   0x0800
 #define ETO_IGNORELANGUAGE  0x1000
+#define ETO_PDY             0x2000
 
 #define ASPECT_FILTERING    0x0001
 
@@ -1278,6 +1294,11 @@ typedef struct
 #define GGO_GRAY4_BITMAP    5
 #define GGO_GRAY8_BITMAP    6
 #define GGO_GLYPH_INDEX     0x80
+#define GGO_UNHINTED        0x100
+
+#ifdef __WINESRC__
+#define WINE_GGO_GRAY16_BITMAP 0x7f
+#endif
 
 typedef struct
 {
@@ -1402,11 +1423,56 @@ typedef struct
 #define TT_AVAILABLE        0x0001
 #define TT_ENABLED          0x0002
 
+#ifdef __WINESRC__
+#define WINE_TT_HINTER_ENABLED 0x8000
+#endif
+
 #define TT_PRIM_LINE    1
 #define TT_PRIM_QSPLINE 2
 #define TT_PRIM_CSPLINE 3
 #define TT_POLYGON_TYPE 24
 
+  /* OpenGL defines */
+typedef struct {
+  FLOAT      x;
+  FLOAT      y;
+} POINTFLOAT, *PPOINTFLOAT;
+
+typedef struct {
+  FLOAT      gmfBlackBoxX;
+  FLOAT      gmfBlackBoxY;
+  POINTFLOAT gmfptGlyphOrigin;
+  FLOAT      gmfCellIncX;
+  FLOAT      gmfCellIncY;
+} GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
+
+typedef struct {
+  WORD  nSize;
+  WORD  nVersion;
+  DWORD dwFlags;
+  BYTE  iPixelType;
+  BYTE  cColorBits;
+  BYTE  cRedBits;
+  BYTE  cRedShift;
+  BYTE  cGreenBits;
+  BYTE  cGreenShift;
+  BYTE  cBlueBits;
+  BYTE  cBlueShift;
+  BYTE  cAlphaBits;
+  BYTE  cAlphaShift;
+  BYTE  cAccumBits;
+  BYTE  cAccumRedBits;
+  BYTE  cAccumGreenBits;
+  BYTE  cAccumBlueBits;
+  BYTE  cAccumAlphaBits;
+  BYTE  cDepthBits;
+  BYTE  cStencilBits;
+  BYTE  cAuxBuffers;
+  BYTE  iLayerPlane;
+  BYTE  bReserved;
+  COLORREF crTransparent;
+} LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
+
 /* Get/SetSystemPaletteUse() values */
 #define SYSPAL_ERROR        0
 #define SYSPAL_STATIC       1
@@ -1452,7 +1518,7 @@ typedef struct tagEXTLOGPEN
     DWORD    elpWidth;
     UINT     elpBrushStyle;
     COLORREF elpColor;
-    LONG     elpHatch;
+    ULONG_PTR elpHatch;
     DWORD elpNumEntries;
     DWORD elpStyleEntry[1];
 } EXTLOGPEN, *PEXTLOGPEN, *NPEXTLOGPEN, *LPEXTLOGPEN;
@@ -1585,7 +1651,9 @@ typedef struct tagEXTLOGPEN
 #define VREFRESH          116
 #define DESKTOPVERTRES    117
 #define DESKTOPHORZRES    118
-#define BTLALIGNMENT      119
+#define BLTALIGNMENT      119
+#define SHADEBLENDCAPS    120
+#define COLORMGMTCAPS     121
 
 /* TECHNOLOGY */
 #define DT_PLOTTER        0
@@ -1676,7 +1744,6 @@ typedef struct tagEXTLOGPEN
 #define RC_DEVBITS        0x8000
 
 /* CAPS1 */
-
 #define C1_TRANSPARENT    0x0001
 #define TC_TT_ABLE        0x0002
 #define C1_TT_CR_ANY      0x0004
@@ -1691,6 +1758,14 @@ typedef struct tagEXTLOGPEN
 #define C1_CMYK_ABLE      0x1000
 #define C1_SLOW_CARD      0x2000
 
+/* SHADEBLENDCAPS */
+#define SB_NONE           0x0000
+#define SB_CONST_ALPHA    0x0001
+#define SB_PIXEL_ALPHA    0x0002
+#define SB_PREMULT_ALPHA  0x0004
+#define SB_GRAD_RECT      0x0010
+#define SB_GRAD_TRI       0x0020
+
   /* Device-independent bitmaps */
 
 typedef struct {
@@ -1785,8 +1860,8 @@ typedef struct {
     DWORD        bV5Reserved;
 } BITMAPV5HEADER, *LPBITMAPV5HEADER, *PBITMAPV5HEADER;
 
-#define PROFILE_LINKED   'LINK'
-#define PROFILE_EMBEDDED 'MBED'
+#define PROFILE_LINKED   0x4c494e4b     /* 'LINK' */
+#define PROFILE_EMBEDDED 0x4d424544     /* 'MBED' */
 
 
   /* biCompression */
@@ -2075,9 +2150,9 @@ typedef struct {
 } EMRBITBLT, *PEMRBITBLT;
 
 typedef struct {
-    EMR      emr;
-    DWORD    ihBrush;
-    LOGBRUSH lb;
+    EMR        emr;
+    DWORD      ihBrush;
+    LOGBRUSH32 lb;
 } EMRCREATEBRUSHINDIRECT, *PEMRCREATEBRUSHINDIRECT;
 
 typedef struct {
@@ -2532,6 +2607,27 @@ typedef struct {
     LONG     cySrc;
 } EMRSTRETCHBLT, *PEMRSTRETCHBLT;
 
+typedef struct {
+    EMR      emr;
+    RECTL    rclBounds;
+    LONG     xDest;
+    LONG     yDest;
+    LONG     cxDest;
+    LONG     cyDest;
+    DWORD    dwRop;
+    LONG     xSrc;
+    LONG     ySrc;
+    XFORM    xformSrc;
+    COLORREF crBkColorSrc;
+    DWORD    iUsageSrc;
+    DWORD    offBmiSrc;
+    DWORD    cbBmiSrc;
+    DWORD    offBitsSrc;
+    DWORD    cbBitsSrc;
+    LONG     cxSrc;
+    LONG     cySrc;
+} EMRALPHABLEND, *PEMRALPHABLEND;
+
 typedef struct {
     EMR   emr;
     RECTL rclBounds;
@@ -2569,12 +2665,6 @@ typedef struct {
   BYTE  Data[1];
 } EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD;
 
-typedef struct {
-       EMR   emr;
-       INT   nBreakExtra;
-       INT       nBreakCount;
-} EMRSETTEXTJUSTIFICATION, *PEMRSETTEXTJUSTIFICATION;
-
 typedef INT (CALLBACK *ENHMFENUMPROC)(HDC, HANDLETABLE *,
                                       const ENHMETARECORD *, INT, LPARAM);
 
@@ -2732,13 +2822,17 @@ typedef struct
        short  dmPaperSize;
        short  dmPaperLength;
        short  dmPaperWidth;
+        short  dmScale;
+        short  dmCopies;
+        short  dmDefaultSource;
+        short  dmPrintQuality;
       } DUMMYSTRUCTNAME1;
-      POINTL dmPosition;
+      struct {
+        POINTL dmPosition;
+        DWORD dmDisplayOrientation;
+        DWORD dmDisplayFixedOutput;
+      } DUMMYSTRUCTNAME2;
     } DUMMYUNIONNAME1;
-    short  dmScale;
-    short  dmCopies;
-    short  dmDefaultSource;
-    short  dmPrintQuality;
     short  dmColor;
     short  dmDuplex;
     short  dmYResolution;
@@ -2749,7 +2843,10 @@ typedef struct
     DWORD  dmBitsPerPel;
     DWORD  dmPelsWidth;
     DWORD  dmPelsHeight;
-    DWORD  dmDisplayFlags;
+    union {
+      DWORD dmDisplayFlags;
+      DWORD dmNup;
+    } DUMMYUNIONNAME2;
     DWORD  dmDisplayFrequency;
     DWORD  dmICMMethod;
     DWORD  dmICMIntent;
@@ -2775,13 +2872,17 @@ typedef struct
        short  dmPaperSize;
        short  dmPaperLength;
        short  dmPaperWidth;
+        short  dmScale;
+        short  dmCopies;
+        short  dmDefaultSource;
+        short  dmPrintQuality;
       } DUMMYSTRUCTNAME1;
-      POINTL dmPosition;
+      struct {
+        POINTL dmPosition;
+        DWORD dmDisplayOrientation;
+        DWORD dmDisplayFixedOutput;
+      } DUMMYSTRUCTNAME2;
     } DUMMYUNIONNAME1;
-    short  dmScale;
-    short  dmCopies;
-    short  dmDefaultSource;
-    short  dmPrintQuality;
     short  dmColor;
     short  dmDuplex;
     short  dmYResolution;
@@ -2792,7 +2893,10 @@ typedef struct
     DWORD  dmBitsPerPel;
     DWORD  dmPelsWidth;
     DWORD  dmPelsHeight;
-    DWORD  dmDisplayFlags;
+    union {
+      DWORD dmDisplayFlags;
+      DWORD dmNup;
+    } DUMMYUNIONNAME2;
     DWORD  dmDisplayFrequency;
     DWORD  dmICMMethod;
     DWORD  dmICMIntent;
@@ -3156,385 +3260,421 @@ typedef struct _BLENDFUNCTION
 #define FR_PRIVATE  0x10
 #define FR_NOT_ENUM 0x20
 
-
-INT         WINAPI AbortDoc(HDC);
-BOOL        WINAPI AbortPath(HDC);
-INT         WINAPI AddFontResourceA(LPCSTR);
-INT         WINAPI AddFontResourceW(LPCWSTR);
-#define     AddFontResource WINELIB_NAME_AW(AddFontResource)
-INT         WINAPI AddFontResourceExA(LPCSTR, DWORD, PVOID);
-INT         WINAPI AddFontResourceExW(LPCWSTR, DWORD, PVOID);
-#define     AddFontResourceEx WINELIB_NAME_AW(AddFontResourceEx)
-BOOL        WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
-BOOL        WINAPI AngleArc(HDC, INT, INT, DWORD, FLOAT, FLOAT);
-BOOL        WINAPI AnimatePalette(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-BOOL        WINAPI Arc(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
-BOOL        WINAPI ArcTo(HDC, INT, INT, INT, INT, INT, INT, INT, INT);
-BOOL        WINAPI BeginPath(HDC);
-BOOL        WINAPI BitBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,DWORD);
-INT         WINAPI ChoosePixelFormat(HDC,const LPPIXELFORMATDESCRIPTOR);
-BOOL        WINAPI Chord(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
-HENHMETAFILE WINAPI CloseEnhMetaFile(HDC);
-BOOL        WINAPI CloseFigure(HDC);
-HMETAFILE   WINAPI CloseMetaFile(HDC);
-INT         WINAPI CombineRgn(HRGN,HRGN,HRGN,INT);
-BOOL        WINAPI CombineTransform(LPXFORM,const XFORM *,const XFORM *);
-HENHMETAFILE WINAPI CopyEnhMetaFileA(HENHMETAFILE,LPCSTR);
-HENHMETAFILE WINAPI CopyEnhMetaFileW(HENHMETAFILE,LPCWSTR);
-#define     CopyEnhMetaFile WINELIB_NAME_AW(CopyEnhMetaFile)
-HMETAFILE   WINAPI CopyMetaFileA(HMETAFILE,LPCSTR);
-HMETAFILE   WINAPI CopyMetaFileW(HMETAFILE,LPCWSTR);
-#define     CopyMetaFile WINELIB_NAME_AW(CopyMetaFile)
-HBITMAP     WINAPI CreateBitmap(INT,INT,UINT,UINT,LPCVOID);
-HBITMAP     WINAPI CreateBitmapIndirect(const BITMAP*);
-HBRUSH      WINAPI CreateBrushIndirect(const LOGBRUSH*);
-HCOLORSPACE WINAPI CreateColorSpaceA(LPLOGCOLORSPACEA);
-HCOLORSPACE WINAPI CreateColorSpaceW(LPLOGCOLORSPACEW);
-#define     CreateColorSpace WINELIB_NAME_AW(CreateColorSpace)
-HBITMAP   WINAPI CreateCompatibleBitmap(HDC,INT,INT);
-HDC       WINAPI CreateCompatibleDC(HDC);
-HDC       WINAPI CreateDCA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-HDC       WINAPI CreateDCW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-#define     CreateDC WINELIB_NAME_AW(CreateDC)
-HBITMAP   WINAPI CreateDIBitmap(HDC,const BITMAPINFOHEADER*,DWORD,
-                                    LPCVOID,const BITMAPINFO*,UINT);
-HBRUSH    WINAPI CreateDIBPatternBrush(HGLOBAL,UINT);
-HBRUSH    WINAPI CreateDIBPatternBrushPt(const void*,UINT);
-HBITMAP   WINAPI CreateDIBSection(HDC, CONST BITMAPINFO *, UINT,
-                                  VOID **, HANDLE, DWORD offset);
-HBITMAP   WINAPI CreateDiscardableBitmap(HDC,INT,INT);
-HRGN      WINAPI CreateEllipticRgn(INT,INT,INT,INT);
-HRGN      WINAPI CreateEllipticRgnIndirect(const RECT *);
-HDC       WINAPI CreateEnhMetaFileA(HDC,LPCSTR,const RECT*,LPCSTR);
-HDC       WINAPI CreateEnhMetaFileW(HDC,LPCWSTR,const RECT*,LPCWSTR);
-#define     CreateEnhMetaFile WINELIB_NAME_AW(CreateEnhMetaFile)
-HFONT     WINAPI CreateFontA(INT,INT,INT,INT,INT,DWORD,DWORD,
-                                 DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCSTR);
-HFONT     WINAPI CreateFontW(INT,INT,INT,INT,INT,DWORD,DWORD,
-                                 DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCWSTR);
-#define     CreateFont WINELIB_NAME_AW(CreateFont)
-HFONT     WINAPI CreateFontIndirectA(const LOGFONTA*);
-HFONT     WINAPI CreateFontIndirectW(const LOGFONTW*);
-#define     CreateFontIndirect WINELIB_NAME_AW(CreateFontIndirect)
-HPALETTE  WINAPI CreateHalftonePalette(HDC);
-HBRUSH    WINAPI CreateHatchBrush(INT,COLORREF);
-HDC       WINAPI CreateICA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-HDC       WINAPI CreateICW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-#define     CreateIC WINELIB_NAME_AW(CreateIC)
-HDC       WINAPI CreateMetaFileA(LPCSTR);
-HDC       WINAPI CreateMetaFileW(LPCWSTR);
-#define     CreateMetaFile WINELIB_NAME_AW(CreateMetaFile)
-HPALETTE  WINAPI CreatePalette(const LOGPALETTE*);
-HBRUSH    WINAPI CreatePatternBrush(HBITMAP);
-HPEN      WINAPI CreatePen(INT,INT,COLORREF);
-HPEN      WINAPI CreatePenIndirect(const LOGPEN*);
-HRGN      WINAPI CreatePolyPolygonRgn(const POINT*,const INT*,INT,INT);
-HRGN      WINAPI CreatePolygonRgn(const POINT*,INT,INT);
-HRGN      WINAPI CreateRectRgn(INT,INT,INT,INT);
-HRGN      WINAPI CreateRectRgnIndirect(const RECT*);
-HRGN      WINAPI CreateRoundRectRgn(INT,INT,INT,INT,INT,INT);
-BOOL      WINAPI CreateScalableFontResourceA(DWORD,LPCSTR,LPCSTR,LPCSTR);
-BOOL      WINAPI CreateScalableFontResourceW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR);
-#define     CreateScalableFontResource WINELIB_NAME_AW(CreateScalableFontResource)
-HBRUSH    WINAPI CreateSolidBrush(COLORREF);
-BOOL      WINAPI DPtoLP(HDC,LPPOINT,INT);
-BOOL      WINAPI DeleteColorSpace(HCOLORSPACE);
-BOOL      WINAPI DeleteDC(HDC);
-BOOL      WINAPI DeleteEnhMetaFile(HENHMETAFILE);
-BOOL      WINAPI DeleteMetaFile(HMETAFILE);
-BOOL      WINAPI DeleteObject(HGDIOBJ);
-INT       WINAPI DescribePixelFormat(HDC,int,UINT,
-                                       LPPIXELFORMATDESCRIPTOR);
-INT       WINAPI DrawEscape(HDC,INT,INT,LPCSTR);
-BOOL      WINAPI Ellipse(HDC,INT,INT,INT,INT);
-INT       WINAPI EndDoc(HDC);
-BOOL      WINAPI EndPath(HDC);
-BOOL      WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,LPVOID,const RECT*);
-INT       WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-INT       WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
-#define     EnumFontFamilies WINELIB_NAME_AW(EnumFontFamilies)
-INT       WINAPI EnumFontFamiliesExA(HDC,LPLOGFONTA,FONTENUMPROCA,LPARAM,DWORD);
-INT       WINAPI EnumFontFamiliesExW(HDC,LPLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
-#define     EnumFontFamiliesEx WINELIB_NAME_AW(EnumFontFamiliesEx)
-INT       WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-INT       WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
-#define     EnumFonts WINELIB_NAME_AW(EnumFonts)
-INT         WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
-INT         WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
-#define     EnumICMProfiles WINELIB_NAME_AW(EnumICMProfiles)
-BOOL      WINAPI EnumMetaFile(HDC,HMETAFILE,MFENUMPROC,LPARAM);
-INT       WINAPI EnumObjects(HDC,INT,GOBJENUMPROC,LPARAM);
-BOOL      WINAPI EqualRgn(HRGN,HRGN);
-INT       WINAPI Escape(HDC,INT,INT,LPCSTR,LPVOID);
-INT       WINAPI ExcludeClipRect(HDC,INT,INT,INT,INT);
-HPEN      WINAPI ExtCreatePen(DWORD,DWORD,const LOGBRUSH*,DWORD,const DWORD*);
-HRGN      WINAPI ExtCreateRegion(const XFORM*,DWORD,const RGNDATA*);
-INT       WINAPI ExtEscape(HDC,INT,INT,LPCSTR,INT,LPSTR);
-BOOL      WINAPI ExtFloodFill(HDC,INT,INT,COLORREF,UINT);
-INT       WINAPI ExtSelectClipRgn(HDC,HRGN,INT);
-BOOL      WINAPI ExtTextOutA(HDC,INT,INT,UINT,const RECT*,
-                                 LPCSTR,UINT,const INT*);
-BOOL      WINAPI ExtTextOutW(HDC,INT,INT,UINT,const RECT*,
-                                 LPCWSTR,UINT,const INT*);
-#define     ExtTextOut WINELIB_NAME_AW(ExtTextOut)
-BOOL      WINAPI FillPath(HDC);
-BOOL      WINAPI FillRgn(HDC,HRGN,HBRUSH);
-BOOL      WINAPI FixBrushOrgEx(HDC,INT,INT,LPPOINT);
-BOOL      WINAPI FlattenPath(HDC);
-BOOL      WINAPI FloodFill(HDC,INT,INT,COLORREF);
-BOOL      WINAPI FrameRgn(HDC,HRGN,HBRUSH,INT,INT);
-BOOL      WINAPI GdiComment(HDC,UINT,const BYTE *);
-DEVMODEW * WINAPI GdiConvertToDevmodeW(const DEVMODEA *);
-BOOL      WINAPI GdiFlush(void);
-INT       WINAPI GetArcDirection(HDC);
-BOOL      WINAPI GetAspectRatioFilterEx(HDC,LPSIZE);
-LONG      WINAPI GetBitmapBits(HBITMAP,LONG,LPVOID);
-BOOL      WINAPI GetBitmapDimensionEx(HBITMAP,LPSIZE);
-BOOL      WINAPI GetBrushOrgEx(HDC,LPPOINT);
-COLORREF  WINAPI GetBkColor(HDC);
-INT       WINAPI GetBkMode(HDC);
-UINT      WINAPI GetBoundsRect(HDC,LPRECT,UINT);
-BOOL      WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
-BOOL      WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
-#define     GetCharABCWidths WINELIB_NAME_AW(GetCharABCWidths)
-BOOL      WINAPI GetCharABCWidthsFloatA(HDC,UINT,UINT,LPABCFLOAT);
-BOOL      WINAPI GetCharABCWidthsFloatW(HDC,UINT,UINT,LPABCFLOAT);
-#define     GetCharABCWidthsFloat WINELIB_NAME_AW(GetCharABCWidthsFloat)
-DWORD     WINAPI GetCharacterPlacementA(HDC,LPCSTR,INT,INT,GCP_RESULTSA*,DWORD);
-DWORD     WINAPI GetCharacterPlacementW(HDC,LPCWSTR,INT,INT,GCP_RESULTSW*,DWORD);
-#define     GetCharacterPlacement WINELIB_NAME_AW(GetCharacterPlacement)
-BOOL        WINAPI GetCharWidth32A(HDC,UINT,UINT,LPINT);
-BOOL        WINAPI GetCharWidth32W(HDC,UINT,UINT,LPINT);
-#define     GetCharWidth32 WINELIB_NAME_AW(GetCharWidth32)
-BOOL        WINAPI GetCharWidthA(HDC,UINT,UINT,LPINT);
-BOOL        WINAPI GetCharWidthW(HDC,UINT,UINT,LPINT);
-#define     GetCharWidth WINELIB_NAME_AW(GetCharWidth)
-BOOL        WINAPI GetCharWidthFloatA(HDC,UINT,UINT,PFLOAT);
-BOOL        WINAPI GetCharWidthFloatW(HDC,UINT,UINT,PFLOAT);
-#define     GetCharWidthFloat WINELIB_NAME_AW(GetCharWidthFloat)
-INT       WINAPI GetClipBox(HDC,LPRECT);
-INT       WINAPI GetClipRgn(HDC,HRGN);
-BOOL      WINAPI GetColorAdjustment(HDC, LPCOLORADJUSTMENT);
-HANDLE    WINAPI GetCurrentObject(HDC,UINT);
-BOOL      WINAPI GetCurrentPositionEx(HDC,LPPOINT);
-INT       WINAPI GetDeviceCaps(HDC,INT);
-BOOL      WINAPI GetDeviceGammaRamp(HDC,LPVOID);
-COLORREF  WINAPI GetDCBrushColor(HDC);
-BOOL      WINAPI GetDCOrgEx(HDC,LPPOINT);
-COLORREF  WINAPI GetDCPenColor(HDC);
-UINT      WINAPI GetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);
-INT       WINAPI GetDIBits(HDC,HBITMAP,UINT,UINT,LPVOID,LPBITMAPINFO,UINT);
-HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR);
-HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR);
-#define     GetEnhMetaFile WINELIB_NAME_AW(GetEnhMetaFile)
-UINT      WINAPI GetEnhMetaFileBits(HENHMETAFILE,UINT,LPBYTE);
-UINT        WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE,UINT,LPSTR);
-UINT        WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE,UINT,LPWSTR);
-#define     GetEnhMetaFileDescription WINELIB_NAME_AW(GetEnhMetaFileDescription)
-UINT      WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
-UINT      WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
-DWORD     WINAPI GetFontData(HDC,DWORD,DWORD,LPVOID,DWORD);
-DWORD     WINAPI GetFontLanguageInfo(HDC);
-DWORD     WINAPI GetGlyphIndicesA(HDC,LPCSTR,INT,LPWORD,DWORD);
-DWORD     WINAPI GetGlyphIndicesW(HDC,LPCWSTR,INT,LPWORD,DWORD);
-#define   GetGlyphIndices WINELIB_NAME_AW(GetGlyphIndices)
-DWORD     WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
-DWORD     WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
-#define     GetGlyphOutline WINELIB_NAME_AW(GetGlyphOutline)
-INT       WINAPI GetGraphicsMode(HDC);
-DWORD     WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
-DWORD     WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
-#define     GetKerningPairs WINELIB_NAME_AW(GetKerningPairs)
-DWORD       WINAPI GetLayout(HDC);
-BOOL        WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
-BOOL        WINAPI GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD);
-#define     GetLogColorSpace WINELIB_NAME_AW(GetLogColorSpace)
-INT       WINAPI GetMapMode(HDC);
-HMETAFILE WINAPI GetMetaFileA(LPCSTR);
-HMETAFILE WINAPI GetMetaFileW(LPCWSTR);
-#define     GetMetaFile WINELIB_NAME_AW(GetMetaFile)
-UINT        WINAPI GetMetaFileBitsEx(HMETAFILE,UINT,LPVOID);
-INT         WINAPI GetMetaRgn(HDC,HRGN);
-BOOL        WINAPI GetMiterLimit(HDC, PFLOAT);
-DWORD       WINAPI GetNearestColor(HDC,DWORD);
-UINT        WINAPI GetNearestPaletteIndex(HPALETTE,COLORREF);
-INT         WINAPI GetObjectA(HANDLE,INT,LPVOID);
-INT         WINAPI GetObjectW(HANDLE,INT,LPVOID);
-#define     GetObject WINELIB_NAME_AW(GetObject)
-DWORD     WINAPI GetObjectType(HANDLE);
-UINT      WINAPI GetOutlineTextMetricsA(HDC,UINT,LPOUTLINETEXTMETRICA);
-UINT      WINAPI GetOutlineTextMetricsW(HDC,UINT,LPOUTLINETEXTMETRICW);
-#define     GetOutlineTextMetrics WINELIB_NAME_AW(GetOutlineTextMetrics)
-UINT      WINAPI GetPaletteEntries(HPALETTE,UINT,UINT,LPPALETTEENTRY);
-INT       WINAPI GetPath(HDC,LPPOINT,LPBYTE,INT);
-COLORREF  WINAPI GetPixel(HDC,INT,INT);
-INT       WINAPI GetPixelFormat(HDC);
-INT       WINAPI GetPolyFillMode(HDC);
-BOOL      WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
-DWORD     WINAPI GetRegionData(HRGN,DWORD,LPRGNDATA);
-INT       WINAPI GetRelAbs(HDC,DWORD);
-INT       WINAPI GetRgnBox(HRGN,LPRECT);
-INT       WINAPI GetROP2(HDC);
-HGDIOBJ   WINAPI GetStockObject(INT);
-INT       WINAPI GetStretchBltMode(HDC);
-UINT      WINAPI GetSystemPaletteEntries(HDC,UINT,UINT,LPPALETTEENTRY);
-UINT      WINAPI GetSystemPaletteUse(HDC);
-UINT      WINAPI GetTextAlign(HDC);
-INT       WINAPI GetTextCharacterExtra(HDC);
-UINT      WINAPI GetTextCharset(HDC);
-UINT      WINAPI GetTextCharsetInfo(HDC,LPFONTSIGNATURE,DWORD);
-COLORREF  WINAPI GetTextColor(HDC);
-BOOL      WINAPI GetTextExtentExPointA(HDC,LPCSTR,INT,INT,
-                                           LPINT,LPINT,LPSIZE);
-BOOL      WINAPI GetTextExtentExPointW(HDC,LPCWSTR,INT,INT,
-                                           LPINT,LPINT,LPSIZE);
-#define     GetTextExtentExPoint WINELIB_NAME_AW(GetTextExtentExPoint)
-BOOL      WINAPI GetTextExtentPointA(HDC,LPCSTR,INT,LPSIZE);
-BOOL      WINAPI GetTextExtentPointW(HDC,LPCWSTR,INT,LPSIZE);
-#define     GetTextExtentPoint WINELIB_NAME_AW(GetTextExtentPoint)
-BOOL      WINAPI GetTextExtentPoint32A(HDC,LPCSTR,INT,LPSIZE);
-BOOL      WINAPI GetTextExtentPoint32W(HDC,LPCWSTR,INT,LPSIZE);
-#define     GetTextExtentPoint32 WINELIB_NAME_AW(GetTextExtentPoint32)
-BOOL      WINAPI GetTextExtentExPointI(HDC,const WORD*,INT,INT,LPINT,LPINT,LPSIZE);
-BOOL      WINAPI GetTextExtentPointI(HDC,const WORD*,INT,LPSIZE);
-INT       WINAPI GetTextFaceA(HDC,INT,LPSTR);
-INT       WINAPI GetTextFaceW(HDC,INT,LPWSTR);
-#define     GetTextFace WINELIB_NAME_AW(GetTextFace)
-BOOL      WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
-BOOL      WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
-#define     GetTextMetrics WINELIB_NAME_AW(GetTextMetrics)
-BOOL        WINAPI GetViewportExtEx(HDC,LPSIZE);
-BOOL        WINAPI GetViewportOrgEx(HDC,LPPOINT);
-BOOL        WINAPI GetWindowExtEx(HDC,LPSIZE);
-BOOL        WINAPI GetWindowOrgEx(HDC,LPPOINT);
-UINT        WINAPI GetWinMetaFileBits(HENHMETAFILE,UINT,LPBYTE,INT,HDC);
-BOOL        WINAPI GetWorldTransform(HDC,LPXFORM);
-BOOL        WINAPI GradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
-INT         WINAPI IntersectClipRect(HDC,INT,INT,INT,INT);
-BOOL        WINAPI InvertRgn(HDC,HRGN);
-BOOL        WINAPI LineDDA(INT,INT,INT,INT,LINEDDAPROC,LPARAM);
-BOOL        WINAPI LineTo(HDC,INT,INT);
-BOOL        WINAPI LPtoDP(HDC,LPPOINT,INT);
-BOOL        WINAPI MaskBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,HBITMAP,INT,INT,DWORD);
-BOOL        WINAPI ModifyWorldTransform(HDC,const XFORM *, DWORD);
-BOOL        WINAPI MoveToEx(HDC,INT,INT,LPPOINT);
-/* FIXME This is defined in kernel32.spec !?*/
-INT       WINAPI MulDiv(INT,INT,INT);
-INT       WINAPI OffsetClipRgn(HDC,INT,INT);
-INT       WINAPI OffsetRgn(HRGN,INT,INT);
-BOOL      WINAPI OffsetViewportOrgEx(HDC,INT,INT,LPPOINT);
-BOOL      WINAPI OffsetWindowOrgEx(HDC,INT,INT,LPPOINT);
-BOOL      WINAPI PaintRgn(HDC,HRGN);
-BOOL      WINAPI PatBlt(HDC,INT,INT,INT,INT,DWORD);
-HRGN      WINAPI PathToRegion(HDC);
-BOOL      WINAPI Pie(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
-BOOL      WINAPI PlayEnhMetaFile(HDC,HENHMETAFILE,const RECT*);
-BOOL      WINAPI PlayEnhMetaFileRecord(HDC,LPHANDLETABLE,const ENHMETARECORD*,UINT);
-BOOL      WINAPI PlayMetaFile(HDC,HMETAFILE);
-BOOL      WINAPI PlayMetaFileRecord(HDC,LPHANDLETABLE,LPMETARECORD,UINT);
-BOOL      WINAPI PlgBlt(HDC,const POINT*,HDC,INT,INT,INT,INT,HBITMAP,INT,INT);
-BOOL      WINAPI PolyBezier(HDC,const POINT*,DWORD);
-BOOL      WINAPI PolyBezierTo(HDC,const POINT*,DWORD);
-BOOL      WINAPI PolyDraw(HDC,const POINT*,const BYTE*,DWORD);
-BOOL      WINAPI PolyPolygon(HDC,const POINT*,const INT*,UINT);
-BOOL      WINAPI PolyPolyline(HDC,const POINT*,const DWORD*,DWORD);
-BOOL      WINAPI Polygon(HDC,const POINT*,INT);
-BOOL      WINAPI Polyline(HDC,const POINT*,INT);
-BOOL      WINAPI PolylineTo(HDC,const POINT*,DWORD);
-BOOL      WINAPI PtInRegion(HRGN,INT,INT);
-BOOL      WINAPI PtVisible(HDC,INT,INT);
-UINT      WINAPI RealizePalette(HDC);
-BOOL      WINAPI Rectangle(HDC,INT,INT,INT,INT);
-BOOL      WINAPI RectInRegion(HRGN,const RECT *);
-BOOL      WINAPI RectVisible(HDC,const RECT*);
-BOOL      WINAPI RemoveFontResourceA(LPCSTR);
-BOOL      WINAPI RemoveFontResourceW(LPCWSTR);
-#define     RemoveFontResource WINELIB_NAME_AW(RemoveFontResource)
-BOOL        WINAPI RemoveFontResourceExA(LPCSTR, DWORD, PVOID);
-BOOL        WINAPI RemoveFontResourceExW(LPCWSTR, DWORD, PVOID);
-#define     RemoveFontResourceEx WINELIB_NAME_AW(RemoveFontResourceEx)
-HDC       WINAPI ResetDCA(HDC,const DEVMODEA *);
-HDC       WINAPI ResetDCW(HDC,const DEVMODEW *);
-#define     ResetDC WINELIB_NAME_AW(ResetDC)
-BOOL      WINAPI ResizePalette(HPALETTE,UINT);
-BOOL      WINAPI RestoreDC(HDC,INT);
-BOOL      WINAPI RoundRect(HDC,INT,INT,INT,INT,INT,INT);
-INT       WINAPI SaveDC(HDC);
-BOOL      WINAPI ScaleViewportExtEx(HDC,INT,INT,INT,INT,LPSIZE);
-BOOL      WINAPI ScaleWindowExtEx(HDC,INT,INT,INT,INT,LPSIZE);
-BOOL      WINAPI SelectClipPath(HDC,INT);
-INT       WINAPI SelectClipRgn(HDC,HRGN);
-HGDIOBJ   WINAPI SelectObject(HDC,HGDIOBJ);
-HPALETTE  WINAPI SelectPalette(HDC,HPALETTE,BOOL);
-INT       WINAPI SetAbortProc(HDC,ABORTPROC);
-INT       WINAPI SetArcDirection(HDC,INT);
-LONG      WINAPI SetBitmapBits(HBITMAP,LONG,LPCVOID);
-BOOL      WINAPI SetBitmapDimensionEx(HBITMAP,INT,INT,LPSIZE);
-COLORREF  WINAPI SetBkColor(HDC,COLORREF);
-INT       WINAPI SetBkMode(HDC,INT);
-UINT      WINAPI SetBoundsRect(HDC,const RECT*,UINT);
-BOOL      WINAPI SetBrushOrgEx(HDC,INT,INT,LPPOINT);
-BOOL      WINAPI SetColorAdjustment(HDC,const COLORADJUSTMENT*);
-HCOLORSPACE WINAPI SetColorSpace(HDC,HCOLORSPACE);
-BOOL      WINAPI SetDeviceGammaRamp(HDC,LPVOID);
-COLORREF  WINAPI SetDCBrushColor(HDC,COLORREF);
-COLORREF  WINAPI SetDCPenColor(HDC, COLORREF);
-UINT      WINAPI SetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);
-INT       WINAPI SetDIBits(HDC,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
-INT       WINAPI SetDIBitsToDevice(HDC,INT,INT,DWORD,DWORD,INT,
-                         INT,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
-HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE *);
-INT         WINAPI SetGraphicsMode(HDC,INT);
-INT         WINAPI SetICMMode(HDC,INT);
-DWORD       WINAPI SetLayout(HDC,DWORD);
-INT         WINAPI SetMapMode(HDC,INT);
-DWORD       WINAPI SetMapperFlags(HDC,DWORD);
-HMETAFILE   WINAPI SetMetaFileBitsEx(UINT,const BYTE*);
-INT         WINAPI SetMetaRgn(HDC);
-BOOL      WINAPI SetMiterLimit(HDC, FLOAT, PFLOAT);
-UINT      WINAPI SetPaletteEntries(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-COLORREF  WINAPI SetPixel(HDC,INT,INT,COLORREF);
-BOOL      WINAPI SetPixelV(HDC,INT,INT,COLORREF);
-BOOL      WINAPI SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR*);
-INT       WINAPI SetPolyFillMode(HDC,INT);
-BOOL      WINAPI SetRectRgn(HRGN,INT,INT,INT,INT);
-INT       WINAPI SetRelAbs(HDC,INT);
-INT       WINAPI SetROP2(HDC,INT);
-INT       WINAPI SetStretchBltMode(HDC,INT);
-UINT      WINAPI SetSystemPaletteUse(HDC,UINT);
-UINT      WINAPI SetTextAlign(HDC,UINT);
-INT       WINAPI SetTextCharacterExtra(HDC,INT);
-COLORREF  WINAPI SetTextColor(HDC,COLORREF);
-BOOL      WINAPI SetTextJustification(HDC,INT,INT);
-BOOL      WINAPI SetViewportExtEx(HDC,INT,INT,LPSIZE);
-BOOL      WINAPI SetViewportOrgEx(HDC,INT,INT,LPPOINT);
-BOOL      WINAPI SetWindowExtEx(HDC,INT,INT,LPSIZE);
-BOOL      WINAPI SetWindowOrgEx(HDC,INT,INT,LPPOINT);
-HENHMETAFILE WINAPI SetWinMetaFileBits(UINT,CONST BYTE*,HDC,CONST METAFILEPICT *);
-BOOL      WINAPI SetWorldTransform(HDC,const XFORM*);
-INT       WINAPI StartDocA(HDC,const DOCINFOA*);
-INT       WINAPI StartDocW(HDC,const DOCINFOW*);
-#define     StartDoc WINELIB_NAME_AW(StartDoc)
-INT       WINAPI StartPage(HDC);
-INT       WINAPI EndPage(HDC);
-BOOL      WINAPI StretchBlt(HDC,INT,INT,INT,INT,HDC,INT,
-                                INT,INT,INT,DWORD);
-INT       WINAPI StretchDIBits(HDC,INT,INT,INT,INT,INT,INT,
-                       INT,INT,const VOID*,const BITMAPINFO*,UINT,DWORD);
-BOOL      WINAPI StrokeAndFillPath(HDC);
-BOOL      WINAPI StrokePath(HDC);
-BOOL      WINAPI SwapBuffers(HDC);
-BOOL      WINAPI TextOutA(HDC,INT,INT,LPCSTR,INT);
-BOOL      WINAPI TextOutW(HDC,INT,INT,LPCWSTR,INT);
-#define     TextOut WINELIB_NAME_AW(TextOut)
-BOOL      WINAPI TranslateCharsetInfo(LPDWORD,LPCHARSETINFO,DWORD);
-BOOL      WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
-BOOL      WINAPI UnrealizeObject(HGDIOBJ);
-BOOL      WINAPI UpdateColors(HDC);
-BOOL      WINAPI WidenPath(HDC);
-BOOL      WINAPI PolyTextOutA(HDC,PPOLYTEXTA,INT);
-BOOL      WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT);
-#define   PolyTextOut WINELIB_NAME_AW(PolyTextOut)
+/* Mirroring flags */
+#define LAYOUT_LTR                         0x00000000
+#define LAYOUT_RTL                         0x00000001
+#define LAYOUT_BITMAPORIENTATIONPRESERVED  0x00000008
+#define NOMIRRORBITMAP                     0x80000000
+
+/* For DRAWPATTERNRECT Escape */
+typedef struct _DRAWPATRECT
+{
+    POINT ptPosition;
+    POINT ptSize;
+    WORD  wStyle;
+    WORD  wPattern;
+} DRAWPATRECT, *PDRAWPATRECT;
+
+typedef struct tagWCRANGE {
+  WCHAR  wcLow;
+  USHORT cGlyphs;
+} WCRANGE, *PWCRANGE, *LPWCRANGE;
+
+typedef struct tagGLYPHSET {
+  DWORD    cbThis;
+  DWORD    flAccel;
+  DWORD    cGlyphsSupported;
+  DWORD    cRanges;
+  WCRANGE  ranges[1];
+} GLYPHSET, *PGLYPHSET, *LPGLYPHSET;
+
+WINGDIAPI INT         WINAPI AbortDoc(HDC);
+WINGDIAPI BOOL        WINAPI AbortPath(HDC);
+WINGDIAPI INT         WINAPI AddFontResourceA(LPCSTR);
+WINGDIAPI INT         WINAPI AddFontResourceW(LPCWSTR);
+#define                      AddFontResource WINELIB_NAME_AW(AddFontResource)
+WINGDIAPI INT         WINAPI AddFontResourceExA(LPCSTR, DWORD, PVOID);
+WINGDIAPI INT         WINAPI AddFontResourceExW(LPCWSTR, DWORD, PVOID);
+#define                      AddFontResourceEx WINELIB_NAME_AW(AddFontResourceEx)
+WINGDIAPI HANDLE      WINAPI AddFontMemResourceEx(PVOID, DWORD, PVOID, DWORD *);
+WINGDIAPI BOOL        WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
+WINGDIAPI BOOL        WINAPI AngleArc(HDC, INT, INT, DWORD, FLOAT, FLOAT);
+WINGDIAPI BOOL        WINAPI AnimatePalette(HPALETTE,UINT,UINT,const PALETTEENTRY*);
+WINGDIAPI BOOL        WINAPI Arc(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
+WINGDIAPI BOOL        WINAPI ArcTo(HDC, INT, INT, INT, INT, INT, INT, INT, INT);
+WINGDIAPI BOOL        WINAPI BeginPath(HDC);
+WINGDIAPI BOOL        WINAPI BitBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,DWORD);
+WINGDIAPI INT         WINAPI ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR*);
+WINGDIAPI BOOL        WINAPI Chord(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
+WINGDIAPI HENHMETAFILE WINAPI CloseEnhMetaFile(HDC);
+WINGDIAPI BOOL        WINAPI CloseFigure(HDC);
+WINGDIAPI HMETAFILE   WINAPI CloseMetaFile(HDC);
+WINGDIAPI INT         WINAPI CombineRgn(HRGN,HRGN,HRGN,INT);
+WINGDIAPI BOOL        WINAPI CombineTransform(LPXFORM,const XFORM *,const XFORM *);
+WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileA(HENHMETAFILE,LPCSTR);
+WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileW(HENHMETAFILE,LPCWSTR);
+#define                      CopyEnhMetaFile WINELIB_NAME_AW(CopyEnhMetaFile)
+WINGDIAPI HMETAFILE   WINAPI CopyMetaFileA(HMETAFILE,LPCSTR);
+WINGDIAPI HMETAFILE   WINAPI CopyMetaFileW(HMETAFILE,LPCWSTR);
+#define                      CopyMetaFile WINELIB_NAME_AW(CopyMetaFile)
+WINGDIAPI HBITMAP     WINAPI CreateBitmap(INT,INT,UINT,UINT,LPCVOID);
+WINGDIAPI HBITMAP     WINAPI CreateBitmapIndirect(const BITMAP*);
+WINGDIAPI HBRUSH      WINAPI CreateBrushIndirect(const LOGBRUSH*);
+WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceA(LPLOGCOLORSPACEA);
+WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceW(LPLOGCOLORSPACEW);
+#define                      CreateColorSpace WINELIB_NAME_AW(CreateColorSpace)
+WINGDIAPI HBITMAP     WINAPI CreateCompatibleBitmap(HDC,INT,INT);
+WINGDIAPI HDC         WINAPI CreateCompatibleDC(HDC);
+WINGDIAPI HDC         WINAPI CreateDCA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
+WINGDIAPI HDC         WINAPI CreateDCW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
+#define                      CreateDC WINELIB_NAME_AW(CreateDC)
+WINGDIAPI HBITMAP     WINAPI CreateDIBitmap(HDC,const BITMAPINFOHEADER*,DWORD,LPCVOID,const BITMAPINFO*,UINT);
+WINGDIAPI HBRUSH      WINAPI CreateDIBPatternBrush(HGLOBAL,UINT);
+WINGDIAPI HBRUSH      WINAPI CreateDIBPatternBrushPt(const void*,UINT);
+WINGDIAPI HBITMAP     WINAPI CreateDIBSection(HDC, CONST BITMAPINFO *, UINT, VOID **, HANDLE, DWORD offset);
+WINGDIAPI HBITMAP     WINAPI CreateDiscardableBitmap(HDC,INT,INT);
+WINGDIAPI HRGN        WINAPI CreateEllipticRgn(INT,INT,INT,INT);
+WINGDIAPI HRGN        WINAPI CreateEllipticRgnIndirect(const RECT *);
+WINGDIAPI HDC         WINAPI CreateEnhMetaFileA(HDC,LPCSTR,const RECT*,LPCSTR);
+WINGDIAPI HDC         WINAPI CreateEnhMetaFileW(HDC,LPCWSTR,const RECT*,LPCWSTR);
+#define                      CreateEnhMetaFile WINELIB_NAME_AW(CreateEnhMetaFile)
+WINGDIAPI HFONT       WINAPI CreateFontA(INT,INT,INT,INT,INT,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCSTR);
+WINGDIAPI HFONT       WINAPI CreateFontW(INT,INT,INT,INT,INT,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCWSTR);
+#define                      CreateFont WINELIB_NAME_AW(CreateFont)
+WINGDIAPI HFONT       WINAPI CreateFontIndirectA(const LOGFONTA*);
+WINGDIAPI HFONT       WINAPI CreateFontIndirectW(const LOGFONTW*);
+#define                      CreateFontIndirect WINELIB_NAME_AW(CreateFontIndirect)
+WINGDIAPI HPALETTE    WINAPI CreateHalftonePalette(HDC);
+WINGDIAPI HBRUSH      WINAPI CreateHatchBrush(INT,COLORREF);
+WINGDIAPI HDC         WINAPI CreateICA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
+WINGDIAPI HDC         WINAPI CreateICW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
+#define                      CreateIC WINELIB_NAME_AW(CreateIC)
+WINGDIAPI HDC         WINAPI CreateMetaFileA(LPCSTR);
+WINGDIAPI HDC         WINAPI CreateMetaFileW(LPCWSTR);
+#define                      CreateMetaFile WINELIB_NAME_AW(CreateMetaFile)
+WINGDIAPI HPALETTE    WINAPI CreatePalette(const LOGPALETTE*);
+WINGDIAPI HBRUSH      WINAPI CreatePatternBrush(HBITMAP);
+WINGDIAPI HPEN        WINAPI CreatePen(INT,INT,COLORREF);
+WINGDIAPI HPEN        WINAPI CreatePenIndirect(const LOGPEN*);
+WINGDIAPI HRGN        WINAPI CreatePolyPolygonRgn(const POINT*,const INT*,INT,INT);
+WINGDIAPI HRGN        WINAPI CreatePolygonRgn(const POINT*,INT,INT);
+WINGDIAPI HRGN        WINAPI CreateRectRgn(INT,INT,INT,INT);
+WINGDIAPI HRGN        WINAPI CreateRectRgnIndirect(const RECT*);
+WINGDIAPI HRGN        WINAPI CreateRoundRectRgn(INT,INT,INT,INT,INT,INT);
+WINGDIAPI BOOL        WINAPI CreateScalableFontResourceA(DWORD,LPCSTR,LPCSTR,LPCSTR);
+WINGDIAPI BOOL        WINAPI CreateScalableFontResourceW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR);
+#define                      CreateScalableFontResource WINELIB_NAME_AW(CreateScalableFontResource)
+WINGDIAPI HBRUSH      WINAPI CreateSolidBrush(COLORREF);
+WINGDIAPI BOOL        WINAPI DPtoLP(HDC,LPPOINT,INT);
+WINGDIAPI BOOL        WINAPI DeleteColorSpace(HCOLORSPACE);
+WINGDIAPI BOOL        WINAPI DeleteDC(HDC);
+WINGDIAPI BOOL        WINAPI DeleteEnhMetaFile(HENHMETAFILE);
+WINGDIAPI BOOL        WINAPI DeleteMetaFile(HMETAFILE);
+WINGDIAPI BOOL        WINAPI DeleteObject(HGDIOBJ);
+WINGDIAPI INT         WINAPI DescribePixelFormat(HDC,int,UINT,LPPIXELFORMATDESCRIPTOR);
+WINGDIAPI INT         WINAPI DrawEscape(HDC,INT,INT,LPCSTR);
+WINGDIAPI BOOL        WINAPI Ellipse(HDC,INT,INT,INT,INT);
+WINGDIAPI INT         WINAPI EndDoc(HDC);
+WINGDIAPI BOOL        WINAPI EndPath(HDC);
+WINGDIAPI BOOL        WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,LPVOID,const RECT*);
+WINGDIAPI INT         WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
+WINGDIAPI INT         WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
+#define                      EnumFontFamilies WINELIB_NAME_AW(EnumFontFamilies)
+WINGDIAPI INT         WINAPI EnumFontFamiliesExA(HDC,LPLOGFONTA,FONTENUMPROCA,LPARAM,DWORD);
+WINGDIAPI INT         WINAPI EnumFontFamiliesExW(HDC,LPLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
+#define                      EnumFontFamiliesEx WINELIB_NAME_AW(EnumFontFamiliesEx)
+WINGDIAPI INT         WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
+WINGDIAPI INT         WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
+#define                      EnumFonts WINELIB_NAME_AW(EnumFonts)
+WINGDIAPI INT         WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
+WINGDIAPI INT         WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
+#define                      EnumICMProfiles WINELIB_NAME_AW(EnumICMProfiles)
+WINGDIAPI BOOL        WINAPI EnumMetaFile(HDC,HMETAFILE,MFENUMPROC,LPARAM);
+WINGDIAPI INT         WINAPI EnumObjects(HDC,INT,GOBJENUMPROC,LPARAM);
+WINGDIAPI BOOL        WINAPI EqualRgn(HRGN,HRGN);
+WINGDIAPI INT         WINAPI Escape(HDC,INT,INT,LPCSTR,LPVOID);
+WINGDIAPI INT         WINAPI ExcludeClipRect(HDC,INT,INT,INT,INT);
+WINGDIAPI HPEN        WINAPI ExtCreatePen(DWORD,DWORD,const LOGBRUSH*,DWORD,const DWORD*);
+WINGDIAPI HRGN        WINAPI ExtCreateRegion(const XFORM*,DWORD,const RGNDATA*);
+WINGDIAPI INT         WINAPI ExtEscape(HDC,INT,INT,LPCSTR,INT,LPSTR);
+WINGDIAPI BOOL        WINAPI ExtFloodFill(HDC,INT,INT,COLORREF,UINT);
+WINGDIAPI INT         WINAPI ExtSelectClipRgn(HDC,HRGN,INT);
+WINGDIAPI BOOL        WINAPI ExtTextOutA(HDC,INT,INT,UINT,const RECT*,LPCSTR,UINT,const INT*);
+WINGDIAPI BOOL        WINAPI ExtTextOutW(HDC,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
+#define                      ExtTextOut WINELIB_NAME_AW(ExtTextOut)
+WINGDIAPI BOOL        WINAPI FillPath(HDC);
+WINGDIAPI BOOL        WINAPI FillRgn(HDC,HRGN,HBRUSH);
+WINGDIAPI BOOL        WINAPI FixBrushOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI BOOL        WINAPI FlattenPath(HDC);
+WINGDIAPI BOOL        WINAPI FloodFill(HDC,INT,INT,COLORREF);
+WINGDIAPI BOOL        WINAPI FrameRgn(HDC,HRGN,HBRUSH,INT,INT);
+WINGDIAPI BOOL        WINAPI GdiAlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
+WINGDIAPI BOOL        WINAPI GdiComment(HDC,UINT,const BYTE *);
+WINGDIAPI DEVMODEW *  WINAPI GdiConvertToDevmodeW(const DEVMODEA *);
+WINGDIAPI BOOL        WINAPI GdiFlush(void);
+WINGDIAPI LONG        WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
+WINGDIAPI DWORD       WINAPI GdiGetCodePage(HDC);
+WINGDIAPI BOOL        WINAPI GdiGradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
+WINGDIAPI BOOL        WINAPI GdiIsMetaFileDC(HDC);
+WINGDIAPI BOOL        WINAPI GdiIsMetaPrintDC(HDC);
+WINGDIAPI BOOL        WINAPI GdiIsPlayMetafileDC(HDC);
+WINGDIAPI BOOL        WINAPI GdiTransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
+WINGDIAPI INT         WINAPI GetArcDirection(HDC);
+WINGDIAPI BOOL        WINAPI GetAspectRatioFilterEx(HDC,LPSIZE);
+WINGDIAPI LONG        WINAPI GetBitmapBits(HBITMAP,LONG,LPVOID);
+WINGDIAPI BOOL        WINAPI GetBitmapDimensionEx(HBITMAP,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetBrushOrgEx(HDC,LPPOINT);
+WINGDIAPI COLORREF    WINAPI GetBkColor(HDC);
+WINGDIAPI INT         WINAPI GetBkMode(HDC);
+WINGDIAPI UINT        WINAPI GetBoundsRect(HDC,LPRECT,UINT);
+WINGDIAPI BOOL        WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
+WINGDIAPI BOOL        WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
+#define                      GetCharABCWidths WINELIB_NAME_AW(GetCharABCWidths)
+WINGDIAPI BOOL        WINAPI GetCharABCWidthsFloatA(HDC,UINT,UINT,LPABCFLOAT);
+WINGDIAPI BOOL        WINAPI GetCharABCWidthsFloatW(HDC,UINT,UINT,LPABCFLOAT);
+#define                      GetCharABCWidthsFloat WINELIB_NAME_AW(GetCharABCWidthsFloat)
+WINGDIAPI BOOL        WINAPI GetCharABCWidthsI(HDC,UINT,UINT,LPWORD,LPABC);
+WINGDIAPI DWORD       WINAPI GetCharacterPlacementA(HDC,LPCSTR,INT,INT,GCP_RESULTSA*,DWORD);
+WINGDIAPI DWORD       WINAPI GetCharacterPlacementW(HDC,LPCWSTR,INT,INT,GCP_RESULTSW*,DWORD);
+#define                      GetCharacterPlacement WINELIB_NAME_AW(GetCharacterPlacement)
+WINGDIAPI BOOL        WINAPI GetCharWidth32A(HDC,UINT,UINT,LPINT);
+WINGDIAPI BOOL        WINAPI GetCharWidth32W(HDC,UINT,UINT,LPINT);
+#define                      GetCharWidth32 WINELIB_NAME_AW(GetCharWidth32)
+WINGDIAPI BOOL        WINAPI GetCharWidthA(HDC,UINT,UINT,LPINT);
+WINGDIAPI BOOL        WINAPI GetCharWidthI(HDC,UINT,UINT,LPWORD,LPINT);
+WINGDIAPI BOOL        WINAPI GetCharWidthW(HDC,UINT,UINT,LPINT);
+#define                      GetCharWidth WINELIB_NAME_AW(GetCharWidth)
+WINGDIAPI BOOL        WINAPI GetCharWidthFloatA(HDC,UINT,UINT,PFLOAT);
+WINGDIAPI BOOL        WINAPI GetCharWidthFloatW(HDC,UINT,UINT,PFLOAT);
+#define                      GetCharWidthFloat WINELIB_NAME_AW(GetCharWidthFloat)
+WINGDIAPI INT         WINAPI GetClipBox(HDC,LPRECT);
+WINGDIAPI INT         WINAPI GetClipRgn(HDC,HRGN);
+WINGDIAPI BOOL        WINAPI GetColorAdjustment(HDC, LPCOLORADJUSTMENT);
+WINGDIAPI HCOLORSPACE WINAPI GetColorSpace(HDC);
+WINGDIAPI HGDIOBJ     WINAPI GetCurrentObject(HDC,UINT);
+WINGDIAPI BOOL        WINAPI GetCurrentPositionEx(HDC,LPPOINT);
+WINGDIAPI INT         WINAPI GetDeviceCaps(HDC,INT);
+WINGDIAPI BOOL        WINAPI GetDeviceGammaRamp(HDC,LPVOID);
+WINGDIAPI COLORREF    WINAPI GetDCBrushColor(HDC);
+WINGDIAPI BOOL        WINAPI GetDCOrgEx(HDC,LPPOINT);
+WINGDIAPI COLORREF    WINAPI GetDCPenColor(HDC);
+WINGDIAPI UINT        WINAPI GetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);
+WINGDIAPI INT         WINAPI GetDIBits(HDC,HBITMAP,UINT,UINT,LPVOID,LPBITMAPINFO,UINT);
+WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR);
+WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR);
+#define                      GetEnhMetaFile WINELIB_NAME_AW(GetEnhMetaFile)
+WINGDIAPI UINT        WINAPI GetEnhMetaFileBits(HENHMETAFILE,UINT,LPBYTE);
+WINGDIAPI UINT        WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE,UINT,LPSTR);
+WINGDIAPI UINT        WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE,UINT,LPWSTR);
+#define                      GetEnhMetaFileDescription WINELIB_NAME_AW(GetEnhMetaFileDescription)
+WINGDIAPI UINT        WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
+WINGDIAPI UINT        WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
+WINGDIAPI DWORD       WINAPI GetFontData(HDC,DWORD,DWORD,LPVOID,DWORD);
+WINGDIAPI DWORD       WINAPI GetFontLanguageInfo(HDC);
+WINGDIAPI DWORD       WINAPI GetFontUnicodeRanges(HDC,LPGLYPHSET);
+WINGDIAPI DWORD       WINAPI GetGlyphIndicesA(HDC,LPCSTR,INT,LPWORD,DWORD);
+WINGDIAPI DWORD       WINAPI GetGlyphIndicesW(HDC,LPCWSTR,INT,LPWORD,DWORD);
+#define                    GetGlyphIndices WINELIB_NAME_AW(GetGlyphIndices)
+WINGDIAPI DWORD       WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
+WINGDIAPI DWORD       WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
+#define                      GetGlyphOutline WINELIB_NAME_AW(GetGlyphOutline)
+WINGDIAPI INT         WINAPI GetGraphicsMode(HDC);
+WINGDIAPI BOOL        WINAPI GetICMProfileA(HDC,LPDWORD,LPSTR);
+WINGDIAPI BOOL        WINAPI GetICMProfileW(HDC,LPDWORD,LPWSTR);
+#define                      GetICMProfile WINELIB_NAME_AW(GetICMProfile)
+WINGDIAPI DWORD       WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
+WINGDIAPI DWORD       WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
+#define                      GetKerningPairs WINELIB_NAME_AW(GetKerningPairs)
+WINGDIAPI DWORD       WINAPI GetLayout(HDC);
+WINGDIAPI BOOL        WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
+WINGDIAPI BOOL        WINAPI GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD);
+#define                      GetLogColorSpace WINELIB_NAME_AW(GetLogColorSpace)
+WINGDIAPI INT         WINAPI GetMapMode(HDC);
+WINGDIAPI HMETAFILE   WINAPI GetMetaFileA(LPCSTR);
+WINGDIAPI HMETAFILE   WINAPI GetMetaFileW(LPCWSTR);
+#define                      GetMetaFile WINELIB_NAME_AW(GetMetaFile)
+WINGDIAPI UINT        WINAPI GetMetaFileBitsEx(HMETAFILE,UINT,LPVOID);
+WINGDIAPI INT         WINAPI GetMetaRgn(HDC,HRGN);
+WINGDIAPI BOOL        WINAPI GetMiterLimit(HDC, PFLOAT);
+WINGDIAPI DWORD       WINAPI GetNearestColor(HDC,DWORD);
+WINGDIAPI UINT        WINAPI GetNearestPaletteIndex(HPALETTE,COLORREF);
+WINGDIAPI INT         WINAPI GetObjectA(HGDIOBJ,INT,LPVOID);
+WINGDIAPI INT         WINAPI GetObjectW(HGDIOBJ,INT,LPVOID);
+#define                      GetObject WINELIB_NAME_AW(GetObject)
+WINGDIAPI DWORD       WINAPI GetObjectType(HGDIOBJ);
+WINGDIAPI UINT        WINAPI GetOutlineTextMetricsA(HDC,UINT,LPOUTLINETEXTMETRICA);
+WINGDIAPI UINT        WINAPI GetOutlineTextMetricsW(HDC,UINT,LPOUTLINETEXTMETRICW);
+#define                      GetOutlineTextMetrics WINELIB_NAME_AW(GetOutlineTextMetrics)
+WINGDIAPI UINT        WINAPI GetPaletteEntries(HPALETTE,UINT,UINT,LPPALETTEENTRY);
+WINGDIAPI INT         WINAPI GetPath(HDC,LPPOINT,LPBYTE,INT);
+WINGDIAPI COLORREF    WINAPI GetPixel(HDC,INT,INT);
+WINGDIAPI INT         WINAPI GetPixelFormat(HDC);
+WINGDIAPI INT         WINAPI GetPolyFillMode(HDC);
+WINGDIAPI INT         WINAPI GetRandomRgn(HDC,HRGN,INT);
+WINGDIAPI BOOL        WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
+WINGDIAPI DWORD       WINAPI GetRegionData(HRGN,DWORD,LPRGNDATA);
+WINGDIAPI INT         WINAPI GetRelAbs(HDC,DWORD);
+WINGDIAPI INT         WINAPI GetRgnBox(HRGN,LPRECT);
+WINGDIAPI INT         WINAPI GetROP2(HDC);
+WINGDIAPI HGDIOBJ     WINAPI GetStockObject(INT);
+WINGDIAPI INT         WINAPI GetStretchBltMode(HDC);
+WINGDIAPI UINT        WINAPI GetSystemPaletteEntries(HDC,UINT,UINT,LPPALETTEENTRY);
+WINGDIAPI UINT        WINAPI GetSystemPaletteUse(HDC);
+WINGDIAPI UINT        WINAPI GetTextAlign(HDC);
+WINGDIAPI INT         WINAPI GetTextCharacterExtra(HDC);
+WINGDIAPI UINT        WINAPI GetTextCharset(HDC);
+WINGDIAPI UINT        WINAPI GetTextCharsetInfo(HDC,LPFONTSIGNATURE,DWORD);
+WINGDIAPI COLORREF    WINAPI GetTextColor(HDC);
+WINGDIAPI BOOL        WINAPI GetTextExtentExPointA(HDC,LPCSTR,INT,INT,LPINT,LPINT,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetTextExtentExPointW(HDC,LPCWSTR,INT,INT,LPINT,LPINT,LPSIZE);
+#define                      GetTextExtentExPoint WINELIB_NAME_AW(GetTextExtentExPoint)
+WINGDIAPI BOOL        WINAPI GetTextExtentPointA(HDC,LPCSTR,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetTextExtentPointW(HDC,LPCWSTR,INT,LPSIZE);
+#define                      GetTextExtentPoint WINELIB_NAME_AW(GetTextExtentPoint)
+WINGDIAPI BOOL        WINAPI GetTextExtentPoint32A(HDC,LPCSTR,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetTextExtentPoint32W(HDC,LPCWSTR,INT,LPSIZE);
+#define                      GetTextExtentPoint32 WINELIB_NAME_AW(GetTextExtentPoint32)
+WINGDIAPI BOOL        WINAPI GetTextExtentExPointI(HDC,const WORD*,INT,INT,LPINT,LPINT,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetTextExtentPointI(HDC,const WORD*,INT,LPSIZE);
+WINGDIAPI INT         WINAPI GetTextFaceA(HDC,INT,LPSTR);
+WINGDIAPI INT         WINAPI GetTextFaceW(HDC,INT,LPWSTR);
+#define                      GetTextFace WINELIB_NAME_AW(GetTextFace)
+WINGDIAPI BOOL        WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
+WINGDIAPI BOOL        WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
+#define                      GetTextMetrics WINELIB_NAME_AW(GetTextMetrics)
+WINGDIAPI BOOL        WINAPI GetViewportExtEx(HDC,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetViewportOrgEx(HDC,LPPOINT);
+WINGDIAPI BOOL        WINAPI GetWindowExtEx(HDC,LPSIZE);
+WINGDIAPI BOOL        WINAPI GetWindowOrgEx(HDC,LPPOINT);
+WINGDIAPI UINT        WINAPI GetWinMetaFileBits(HENHMETAFILE,UINT,LPBYTE,INT,HDC);
+WINGDIAPI BOOL        WINAPI GetWorldTransform(HDC,LPXFORM);
+WINGDIAPI BOOL        WINAPI GradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
+WINGDIAPI INT         WINAPI IntersectClipRect(HDC,INT,INT,INT,INT);
+WINGDIAPI BOOL        WINAPI InvertRgn(HDC,HRGN);
+WINGDIAPI BOOL        WINAPI LineDDA(INT,INT,INT,INT,LINEDDAPROC,LPARAM);
+WINGDIAPI BOOL        WINAPI LineTo(HDC,INT,INT);
+WINGDIAPI BOOL        WINAPI LPtoDP(HDC,LPPOINT,INT);
+WINGDIAPI BOOL        WINAPI MaskBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,HBITMAP,INT,INT,DWORD);
+WINGDIAPI BOOL        WINAPI ModifyWorldTransform(HDC,const XFORM *, DWORD);
+WINGDIAPI BOOL        WINAPI MoveToEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI INT         WINAPI OffsetClipRgn(HDC,INT,INT);
+WINGDIAPI INT         WINAPI OffsetRgn(HRGN,INT,INT);
+WINGDIAPI BOOL        WINAPI OffsetViewportOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI BOOL        WINAPI OffsetWindowOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI BOOL        WINAPI PaintRgn(HDC,HRGN);
+WINGDIAPI BOOL        WINAPI PatBlt(HDC,INT,INT,INT,INT,DWORD);
+WINGDIAPI HRGN        WINAPI PathToRegion(HDC);
+WINGDIAPI BOOL        WINAPI Pie(HDC,INT,INT,INT,INT,INT,INT,INT,INT);
+WINGDIAPI BOOL        WINAPI PlayEnhMetaFile(HDC,HENHMETAFILE,const RECT*);
+WINGDIAPI BOOL        WINAPI PlayEnhMetaFileRecord(HDC,LPHANDLETABLE,const ENHMETARECORD*,UINT);
+WINGDIAPI BOOL        WINAPI PlayMetaFile(HDC,HMETAFILE);
+WINGDIAPI BOOL        WINAPI PlayMetaFileRecord(HDC,LPHANDLETABLE,LPMETARECORD,UINT);
+WINGDIAPI BOOL        WINAPI PlgBlt(HDC,const POINT*,HDC,INT,INT,INT,INT,HBITMAP,INT,INT);
+WINGDIAPI BOOL        WINAPI PolyBezier(HDC,const POINT*,DWORD);
+WINGDIAPI BOOL        WINAPI PolyBezierTo(HDC,const POINT*,DWORD);
+WINGDIAPI BOOL        WINAPI PolyDraw(HDC,const POINT*,const BYTE*,DWORD);
+WINGDIAPI BOOL        WINAPI PolyPolygon(HDC,const POINT*,const INT*,UINT);
+WINGDIAPI BOOL        WINAPI PolyPolyline(HDC,const POINT*,const DWORD*,DWORD);
+WINGDIAPI BOOL        WINAPI Polygon(HDC,const POINT*,INT);
+WINGDIAPI BOOL        WINAPI Polyline(HDC,const POINT*,INT);
+WINGDIAPI BOOL        WINAPI PolylineTo(HDC,const POINT*,DWORD);
+WINGDIAPI BOOL        WINAPI PtInRegion(HRGN,INT,INT);
+WINGDIAPI BOOL        WINAPI PtVisible(HDC,INT,INT);
+WINGDIAPI UINT        WINAPI RealizePalette(HDC);
+WINGDIAPI BOOL        WINAPI Rectangle(HDC,INT,INT,INT,INT);
+WINGDIAPI BOOL        WINAPI RectInRegion(HRGN,const RECT *);
+WINGDIAPI BOOL        WINAPI RectVisible(HDC,const RECT*);
+WINGDIAPI BOOL        WINAPI RemoveFontResourceA(LPCSTR);
+WINGDIAPI BOOL        WINAPI RemoveFontResourceW(LPCWSTR);
+#define                      RemoveFontResource WINELIB_NAME_AW(RemoveFontResource)
+WINGDIAPI BOOL        WINAPI RemoveFontResourceExA(LPCSTR, DWORD, PVOID);
+WINGDIAPI BOOL        WINAPI RemoveFontResourceExW(LPCWSTR, DWORD, PVOID);
+#define                      RemoveFontResourceEx WINELIB_NAME_AW(RemoveFontResourceEx)
+WINGDIAPI HDC         WINAPI ResetDCA(HDC,const DEVMODEA *);
+WINGDIAPI HDC         WINAPI ResetDCW(HDC,const DEVMODEW *);
+#define                      ResetDC WINELIB_NAME_AW(ResetDC)
+WINGDIAPI BOOL        WINAPI ResizePalette(HPALETTE,UINT);
+WINGDIAPI BOOL        WINAPI RestoreDC(HDC,INT);
+WINGDIAPI BOOL        WINAPI RoundRect(HDC,INT,INT,INT,INT,INT,INT);
+WINGDIAPI INT         WINAPI SaveDC(HDC);
+WINGDIAPI BOOL        WINAPI ScaleViewportExtEx(HDC,INT,INT,INT,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI ScaleWindowExtEx(HDC,INT,INT,INT,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI SelectClipPath(HDC,INT);
+WINGDIAPI INT         WINAPI SelectClipRgn(HDC,HRGN);
+WINGDIAPI HGDIOBJ     WINAPI SelectObject(HDC,HGDIOBJ);
+WINGDIAPI HPALETTE    WINAPI SelectPalette(HDC,HPALETTE,BOOL);
+WINGDIAPI INT         WINAPI SetAbortProc(HDC,ABORTPROC);
+WINGDIAPI INT         WINAPI SetArcDirection(HDC,INT);
+WINGDIAPI LONG        WINAPI SetBitmapBits(HBITMAP,LONG,LPCVOID);
+WINGDIAPI BOOL        WINAPI SetBitmapDimensionEx(HBITMAP,INT,INT,LPSIZE);
+WINGDIAPI COLORREF    WINAPI SetBkColor(HDC,COLORREF);
+WINGDIAPI INT         WINAPI SetBkMode(HDC,INT);
+WINGDIAPI UINT        WINAPI SetBoundsRect(HDC,const RECT*,UINT);
+WINGDIAPI BOOL        WINAPI SetBrushOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI BOOL        WINAPI SetColorAdjustment(HDC,const COLORADJUSTMENT*);
+WINGDIAPI HCOLORSPACE WINAPI SetColorSpace(HDC,HCOLORSPACE);
+WINGDIAPI BOOL        WINAPI SetDeviceGammaRamp(HDC,LPVOID);
+WINGDIAPI COLORREF    WINAPI SetDCBrushColor(HDC,COLORREF);
+WINGDIAPI COLORREF    WINAPI SetDCPenColor(HDC, COLORREF);
+WINGDIAPI UINT        WINAPI SetDIBColorTable(HDC,UINT,UINT,CONST RGBQUAD*);
+WINGDIAPI INT         WINAPI SetDIBits(HDC,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
+WINGDIAPI INT         WINAPI SetDIBitsToDevice(HDC,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT);
+WINGDIAPI HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE *);
+WINGDIAPI INT         WINAPI SetGraphicsMode(HDC,INT);
+WINGDIAPI INT         WINAPI SetICMMode(HDC,INT);
+WINGDIAPI BOOL        WINAPI SetICMProfileA(HDC,LPSTR);
+WINGDIAPI BOOL        WINAPI SetICMProfileW(HDC,LPWSTR);
+#define                      SetICMProfile WINELIB_NAME_AW(SetICMProfile)
+WINGDIAPI DWORD       WINAPI SetLayout(HDC,DWORD);
+WINGDIAPI INT         WINAPI SetMapMode(HDC,INT);
+WINGDIAPI DWORD       WINAPI SetMapperFlags(HDC,DWORD);
+WINGDIAPI HMETAFILE   WINAPI SetMetaFileBitsEx(UINT,const BYTE*);
+WINGDIAPI INT         WINAPI SetMetaRgn(HDC);
+WINGDIAPI BOOL        WINAPI SetMiterLimit(HDC, FLOAT, PFLOAT);
+WINGDIAPI UINT        WINAPI SetPaletteEntries(HPALETTE,UINT,UINT,const PALETTEENTRY*);
+WINGDIAPI COLORREF    WINAPI SetPixel(HDC,INT,INT,COLORREF);
+WINGDIAPI BOOL        WINAPI SetPixelV(HDC,INT,INT,COLORREF);
+WINGDIAPI BOOL        WINAPI SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR*);
+WINGDIAPI INT         WINAPI SetPolyFillMode(HDC,INT);
+WINGDIAPI BOOL        WINAPI SetRectRgn(HRGN,INT,INT,INT,INT);
+WINGDIAPI INT         WINAPI SetRelAbs(HDC,INT);
+WINGDIAPI INT         WINAPI SetROP2(HDC,INT);
+WINGDIAPI INT         WINAPI SetStretchBltMode(HDC,INT);
+WINGDIAPI UINT        WINAPI SetSystemPaletteUse(HDC,UINT);
+WINGDIAPI UINT        WINAPI SetTextAlign(HDC,UINT);
+WINGDIAPI INT         WINAPI SetTextCharacterExtra(HDC,INT);
+WINGDIAPI COLORREF    WINAPI SetTextColor(HDC,COLORREF);
+WINGDIAPI BOOL        WINAPI SetTextJustification(HDC,INT,INT);
+WINGDIAPI BOOL        WINAPI SetViewportExtEx(HDC,INT,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI SetViewportOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI BOOL        WINAPI SetWindowExtEx(HDC,INT,INT,LPSIZE);
+WINGDIAPI BOOL        WINAPI SetWindowOrgEx(HDC,INT,INT,LPPOINT);
+WINGDIAPI HENHMETAFILE WINAPI SetWinMetaFileBits(UINT,CONST BYTE*,HDC,CONST METAFILEPICT *);
+WINGDIAPI BOOL        WINAPI SetWorldTransform(HDC,const XFORM*);
+WINGDIAPI INT         WINAPI StartDocA(HDC,const DOCINFOA*);
+WINGDIAPI INT         WINAPI StartDocW(HDC,const DOCINFOW*);
+#define                      StartDoc WINELIB_NAME_AW(StartDoc)
+WINGDIAPI INT         WINAPI StartPage(HDC);
+WINGDIAPI INT         WINAPI EndPage(HDC);
+WINGDIAPI BOOL        WINAPI StretchBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,INT,INT,DWORD);
+WINGDIAPI INT         WINAPI StretchDIBits(HDC,INT,INT,INT,INT,INT,INT,INT,INT,const VOID*,const BITMAPINFO*,UINT,DWORD);
+WINGDIAPI BOOL        WINAPI StrokeAndFillPath(HDC);
+WINGDIAPI BOOL        WINAPI StrokePath(HDC);
+WINGDIAPI BOOL        WINAPI SwapBuffers(HDC);
+WINGDIAPI BOOL        WINAPI TextOutA(HDC,INT,INT,LPCSTR,INT);
+WINGDIAPI BOOL        WINAPI TextOutW(HDC,INT,INT,LPCWSTR,INT);
+#define                      TextOut WINELIB_NAME_AW(TextOut)
+WINGDIAPI BOOL        WINAPI TranslateCharsetInfo(LPDWORD,LPCHARSETINFO,DWORD);
+WINGDIAPI BOOL        WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
+WINGDIAPI BOOL        WINAPI UnrealizeObject(HGDIOBJ);
+WINGDIAPI BOOL        WINAPI UpdateColors(HDC);
+WINGDIAPI BOOL        WINAPI UpdateICMRegKeyA(DWORD,LPSTR,LPSTR,UINT);
+WINGDIAPI BOOL        WINAPI UpdateICMRegKeyW(DWORD,LPWSTR,LPWSTR,UINT);
+#define                      UpdateICMRegKey WINELIB_NAME_AW(UpdateICMRegKey)
+WINGDIAPI BOOL        WINAPI WidenPath(HDC);
+WINGDIAPI BOOL        WINAPI PolyTextOutA(HDC,const POLYTEXTA*,INT);
+WINGDIAPI BOOL        WINAPI PolyTextOutW(HDC,const POLYTEXTW*,INT);
+#define                      PolyTextOut WINELIB_NAME_AW(PolyTextOut)
 
 /* These defines are used by wglSwapLayerBuffers */
 #define WGL_SWAP_MAIN_PLANE (1 <<  0)
@@ -3569,6 +3709,44 @@ BOOL      WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT);
 #define WGL_SWAP_UNDERLAY14 (1 << 29)
 #define WGL_SWAP_UNDERLAY15 (1 << 30)
 
+/* WGL prototypes */
+WINGDIAPI HGLRC   WINAPI wglCreateContext(HDC);
+WINGDIAPI HGLRC   WINAPI wglCreateLayerContext(HDC,INT);
+WINGDIAPI BOOL    WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
+WINGDIAPI BOOL    WINAPI wglDeleteContext(HGLRC);
+WINGDIAPI BOOL    WINAPI wglDescribeLayerPlane(HDC,INT,INT,UINT,LPLAYERPLANEDESCRIPTOR);
+WINGDIAPI HGLRC   WINAPI wglGetCurrentContext(void);
+WINGDIAPI HDC     WINAPI wglGetCurrentDC(void);
+WINGDIAPI INT     WINAPI wglGetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *);
+WINGDIAPI PROC    WINAPI wglGetProcAddress(LPCSTR);
+WINGDIAPI BOOL    WINAPI wglMakeCurrent(HDC,HGLRC);
+WINGDIAPI BOOL    WINAPI wglRealizeLayerPalette(HDC,INT,BOOL);
+WINGDIAPI INT     WINAPI wglSetLayerPaletteEntries(HDC,INT,INT,INT,const COLORREF *);
+WINGDIAPI BOOL    WINAPI wglShareLists(HGLRC,HGLRC);
+WINGDIAPI BOOL    WINAPI wglSwapLayerBuffers(HDC,UINT);
+WINGDIAPI BOOL    WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
+WINGDIAPI BOOL    WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
+#define                  wglUseFontBitmaps WINELIB_NAME_AW(wglUseFontBitmaps)
+WINGDIAPI BOOL    WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT);
+WINGDIAPI BOOL    WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,INT,LPGLYPHMETRICSFLOAT);
+#define                  wglUseFontOutlines WINELIB_NAME_AW(wglUseFontOutlines)
+
+#ifdef __WINESRC__
+/* the DC hook support is only exported on Win16, the 32-bit version is a Wine extension */
+
+#define DCHC_INVALIDVISRGN      0x0001
+#define DCHC_DELETEDC           0x0002
+#define DCHF_INVALIDATEVISRGN   0x0001
+#define DCHF_VALIDATEVISRGN     0x0002
+
+typedef BOOL (CALLBACK *DCHOOKPROC)(HDC,WORD,DWORD_PTR,LPARAM);
+
+WINGDIAPI DWORD_PTR WINAPI GetDCHook(HDC,DCHOOKPROC*);
+WINGDIAPI BOOL      WINAPI SetDCHook(HDC,DCHOOKPROC,DWORD_PTR);
+WINGDIAPI WORD      WINAPI SetHookFlags(HDC,WORD);
+WINGDIAPI INT       WINAPI SelectVisRgn(HDC,HRGN);
+#endif /* __WINESRC__ */
+
 #ifdef __cplusplus
 }
 #endif