big patch by Jonathon Wilson for GDI32 & related stuff
authorThomas Bluemel <thomas@reactsoft.com>
Tue, 26 Aug 2003 12:28:53 +0000 (12:28 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Tue, 26 Aug 2003 12:28:53 +0000 (12:28 +0000)
changes are:
1.add some new functions to ascii.h and unicode.h
2.add some definitions to base.h
3.add a bunch of functions to funcs.h
4.add a few structures to structs.h
5.add definitions for some missing stuff to winddi.h
6.general fixes and updates to structures and definitions in winddi.h
7.add some other structures and definitions to winddi.h
8.add some Engxxx functions to winddi.h
9.a small fix in crtdll.def
10.add all the new defs to gdi32.def and gdi32.edf
11.add all the new stubs to gdi32 stubs.c
12.implement PolyPolygon and PolyPolyline
13.some fixes to msafd.def/msafd.edf
14.change WahCloseNotificationHelper to WahCloseNotificationHandleHelper in ws2help to match the microsoft definition
15.add d3d.h, d3dcaps.h, d3dtypes.h, ddraw.h, d3dhal.h, ddrawi.h to include and include\ddk (needed for the GdiEntryxx and DdEntryxx functions in gdi32.dll). Headers are modified versions of those from WINE (stuff removed that wont compile without OLE headers, some stuff added)
16.add ddentry.h which is used with the DdEntry and GdiEntry functions
and 17.fix some stuff in stubs.c of win32k

A fair few of these definitions could be wrong (some of them are educated guesses, like some of the Gdixxx functions)
If anyone has any corrections, any answers for the FIXMEs and structures I dont have definitions for, definitions for the remaining stuff in gdi32.def with a ; in front of it or whatever, do let me know.
Or if anyone wants to comment about my changes, please let me know.

svn path=/trunk/; revision=5867

29 files changed:
reactos/include/ascii.h
reactos/include/base.h
reactos/include/d3d.h [new file with mode: 0644]
reactos/include/d3dcaps.h [new file with mode: 0644]
reactos/include/d3dtypes.h [new file with mode: 0644]
reactos/include/ddentry.h [new file with mode: 0644]
reactos/include/ddk/d3dhal.h [new file with mode: 0644]
reactos/include/ddk/ddrawi.h [new file with mode: 0644]
reactos/include/ddk/winddi.h
reactos/include/ddraw.h [new file with mode: 0644]
reactos/include/funcs.h
reactos/include/structs.h
reactos/include/unicode.h
reactos/lib/crtdll/crtdll.def
reactos/lib/gdi32/gdi32.def
reactos/lib/gdi32/gdi32.edf
reactos/lib/gdi32/misc/stubs.c
reactos/lib/gdi32/objects/fillshap.c
reactos/lib/gdi32/objects/line.c
reactos/lib/msafd/msafd.def
reactos/lib/msafd/msafd.edf
reactos/lib/ws2help/ws2help.c
reactos/lib/ws2help/ws2help.def
reactos/lib/ws2help/ws2help.edf
reactos/subsys/win32k/objects/fillshap.c
reactos/subsys/win32k/objects/line.c
reactos/subsys/win32k/stubs/stubs.c
reactos/subsys/win32k/win32k.def
reactos/subsys/win32k/win32k.edf

index b01ff81..68ea936 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
+HFONT 
+STDCALL
+CreateFontIndirectExA(const ENUMLOGFONTEXDVA *elfexd);
+
+DWORD 
+STDCALL
+GetGlyphIndicesA(
+       HDC hdc,
+       LPCSTR lpstr,
+       int c,
+       LPWORD pgi,
+       DWORD fl
+);
+
+WINBOOL 
+STDCALL
+RemoveFontResourceExA(
+       LPCSTR lpFileName,
+       DWORD fl,
+       PVOID pdv
+);
+
+UINT 
+STDCALL
+GetStringBitmapA(HDC hdc,LPSTR psz,WINBOOL unknown,UINT cj,BYTE *lpSB);
+
 WINBOOL 
 STDCALL
 GetAltTabInfoA(
index f44ec5a..25a9d44 100644 (file)
@@ -117,6 +117,7 @@ typedef HANDLE HDROP;
 typedef HANDLE HDWP;
 typedef HANDLE HENHMETAFILE;
 typedef HANDLE HENV;
+typedef USHORT COLOR16;
 typedef int HFILE;
 typedef HANDLE HFONT;
 typedef HANDLE HGDIOBJ;
@@ -169,6 +170,15 @@ typedef const wchar_t *LPCWCH;
 typedef DWORD *LPDWORD;
 /* typedef LPFRHOOKPROC; */
 typedef HANDLE *LPHANDLE;
+typedef DWORD FULLSCREENCONTROL;
+typedef DWORD UNIVERSAL_FONT_ID;
+typedef UNIVERSAL_FONT_ID *PUNIVERSAL_FONT_ID;
+typedef DWORD REALIZATION_INFO;
+typedef REALIZATION_INFO *PREALIZATION_INFO;
+typedef DWORD SHAREDHANDLETABLE;
+typedef SHAREDHANDLETABLE *PSHAREDHANDLETABLE;
+typedef DWORD CHWIDTHINFO;
+typedef CHWIDTHINFO *PCHWIDTHINFO;
 /* typedef LPHANDLER_FUNCTION; */
 typedef PINT LPINT;
 typedef PLONG LPLONG;
@@ -540,6 +550,8 @@ typedef WINBOOL CALLBACK (*PFNPROCESSPOLICIESW) (HWND, LPCWSTR, LPCWSTR, LPCWSTR
 #endif /* UNICODE */
 #endif /* _DISABLE_TIDENTS */
 
+#define MM_MAX_NUMAXES      16
+
 /* ---------------------------------- */
 /* From ddeml.h in old Cygnus headers */
 
diff --git a/reactos/include/d3d.h b/reactos/include/d3d.h
new file mode 100644 (file)
index 0000000..f619681
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) the Wine project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+#ifndef __WINE_D3D_H
+#define __WINE_D3D_H
+
+#include <ddraw.h>
+#include <d3dtypes.h> /* must precede d3dcaps.h */
+#include <d3dcaps.h>
+
+/* ********************************************************************
+   Error Codes
+   ******************************************************************** */
+#define D3D_OK                          DD_OK
+#define D3DERR_BADMAJORVERSION          MAKE_DDHRESULT(700)
+#define D3DERR_BADMINORVERSION          MAKE_DDHRESULT(701)
+#define D3DERR_INVALID_DEVICE           MAKE_DDHRESULT(705)
+#define D3DERR_INITFAILED               MAKE_DDHRESULT(706)
+#define D3DERR_DEVICEAGGREGATED         MAKE_DDHRESULT(707)
+#define D3DERR_EXECUTE_CREATE_FAILED    MAKE_DDHRESULT(710)
+#define D3DERR_EXECUTE_DESTROY_FAILED   MAKE_DDHRESULT(711)
+#define D3DERR_EXECUTE_LOCK_FAILED      MAKE_DDHRESULT(712)
+#define D3DERR_EXECUTE_UNLOCK_FAILED    MAKE_DDHRESULT(713)
+#define D3DERR_EXECUTE_LOCKED           MAKE_DDHRESULT(714)
+#define D3DERR_EXECUTE_NOT_LOCKED       MAKE_DDHRESULT(715)
+#define D3DERR_EXECUTE_FAILED           MAKE_DDHRESULT(716)
+#define D3DERR_EXECUTE_CLIPPED_FAILED   MAKE_DDHRESULT(717)
+#define D3DERR_TEXTURE_NO_SUPPORT       MAKE_DDHRESULT(720)
+#define D3DERR_TEXTURE_CREATE_FAILED    MAKE_DDHRESULT(721)
+#define D3DERR_TEXTURE_DESTROY_FAILED   MAKE_DDHRESULT(722)
+#define D3DERR_TEXTURE_LOCK_FAILED      MAKE_DDHRESULT(723)
+#define D3DERR_TEXTURE_UNLOCK_FAILED    MAKE_DDHRESULT(724)
+#define D3DERR_TEXTURE_LOAD_FAILED      MAKE_DDHRESULT(725)
+#define D3DERR_TEXTURE_SWAP_FAILED      MAKE_DDHRESULT(726)
+#define D3DERR_TEXTURE_LOCKED           MAKE_DDHRESULT(727)
+#define D3DERR_TEXTURE_NOT_LOCKED       MAKE_DDHRESULT(728)
+#define D3DERR_TEXTURE_GETSURF_FAILED   MAKE_DDHRESULT(729)
+#define D3DERR_MATRIX_CREATE_FAILED     MAKE_DDHRESULT(730)
+#define D3DERR_MATRIX_DESTROY_FAILED    MAKE_DDHRESULT(731)
+#define D3DERR_MATRIX_SETDATA_FAILED    MAKE_DDHRESULT(732)
+#define D3DERR_MATRIX_GETDATA_FAILED    MAKE_DDHRESULT(733)
+#define D3DERR_SETVIEWPORTDATA_FAILED   MAKE_DDHRESULT(734)
+#define D3DERR_INVALIDCURRENTVIEWPORT   MAKE_DDHRESULT(735)
+#define D3DERR_INVALIDPRIMITIVETYPE     MAKE_DDHRESULT(736)
+#define D3DERR_INVALIDVERTEXTYPE        MAKE_DDHRESULT(737)
+#define D3DERR_TEXTURE_BADSIZE          MAKE_DDHRESULT(738)
+#define D3DERR_INVALIDRAMPTEXTURE       MAKE_DDHRESULT(739)
+#define D3DERR_MATERIAL_CREATE_FAILED   MAKE_DDHRESULT(740)
+#define D3DERR_MATERIAL_DESTROY_FAILED  MAKE_DDHRESULT(741)
+#define D3DERR_MATERIAL_SETDATA_FAILED  MAKE_DDHRESULT(742)
+#define D3DERR_MATERIAL_GETDATA_FAILED  MAKE_DDHRESULT(743)
+#define D3DERR_INVALIDPALETTE           MAKE_DDHRESULT(744)
+#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
+#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  MAKE_DDHRESULT(746)
+#define D3DERR_SURFACENOTINVIDMEM       MAKE_DDHRESULT(747)
+#define D3DERR_LIGHT_SET_FAILED         MAKE_DDHRESULT(750)
+#define D3DERR_LIGHTHASVIEWPORT         MAKE_DDHRESULT(751)
+#define D3DERR_LIGHTNOTINTHISVIEWPORT   MAKE_DDHRESULT(752)
+#define D3DERR_SCENE_IN_SCENE           MAKE_DDHRESULT(760)
+#define D3DERR_SCENE_NOT_IN_SCENE       MAKE_DDHRESULT(761)
+#define D3DERR_SCENE_BEGIN_FAILED       MAKE_DDHRESULT(762)
+#define D3DERR_SCENE_END_FAILED         MAKE_DDHRESULT(763)
+#define D3DERR_INBEGIN                  MAKE_DDHRESULT(770)
+#define D3DERR_NOTINBEGIN               MAKE_DDHRESULT(771)
+#define D3DERR_NOVIEWPORTS              MAKE_DDHRESULT(772)
+#define D3DERR_VIEWPORTDATANOTSET       MAKE_DDHRESULT(773)
+#define D3DERR_VIEWPORTHASNODEVICE      MAKE_DDHRESULT(774)
+#define D3DERR_NOCURRENTVIEWPORT        MAKE_DDHRESULT(775)
+#define D3DERR_INVALIDVERTEXFORMAT     MAKE_DDHRESULT(2048)
+#define D3DERR_VERTEXBUFFEROPTIMIZED   MAKE_DDHRESULT(2060)
+#define D3DERR_VBUF_CREATE_FAILED      MAKE_DDHRESULT(2061)
+#define D3DERR_VERTEXBUFFERLOCKED      MAKE_DDHRESULT(2062)
+#define D3DERR_VERTEXBUFFERUNLOCKFAILED        MAKE_DDHRESULT(2063)
+#define D3DERR_ZBUFFER_NOTPRESENT      MAKE_DDHRESULT(2070)
+#define D3DERR_STENCILBUFFER_NOTPRESENT        MAKE_DDHRESULT(2071)
+
+#define D3DERR_WRONGTEXTUREFORMAT              MAKE_DDHRESULT(2072)
+#define D3DERR_UNSUPPORTEDCOLOROPERATION       MAKE_DDHRESULT(2073)
+#define D3DERR_UNSUPPORTEDCOLORARG             MAKE_DDHRESULT(2074)
+#define D3DERR_UNSUPPORTEDALPHAOPERATION       MAKE_DDHRESULT(2075)
+#define D3DERR_UNSUPPORTEDALPHAARG             MAKE_DDHRESULT(2076)
+#define D3DERR_TOOMANYOPERATIONS               MAKE_DDHRESULT(2077)
+#define D3DERR_CONFLICTINGTEXTUREFILTER                MAKE_DDHRESULT(2078)
+#define D3DERR_UNSUPPORTEDFACTORVALUE          MAKE_DDHRESULT(2079)
+#define D3DERR_CONFLICTINGRENDERSTATE          MAKE_DDHRESULT(2081)
+#define D3DERR_UNSUPPORTEDTEXTUREFILTER                MAKE_DDHRESULT(2082)
+#define D3DERR_TOOMANYPRIMITIVES               MAKE_DDHRESULT(2083)
+#define D3DERR_INVALIDMATRIX                   MAKE_DDHRESULT(2084)
+#define D3DERR_TOOMANYVERTICES                 MAKE_DDHRESULT(2085)
+#define D3DERR_CONFLICTINGTEXTUREPALETTE       MAKE_DDHRESULT(2086)
+
+#define D3DERR_INVALIDSTATEBLOCK       MAKE_DDHRESULT(2100)
+#define D3DERR_INBEGINSTATEBLOCK       MAKE_DDHRESULT(2101)
+#define D3DERR_NOTINBEGINSTATEBLOCK    MAKE_DDHRESULT(2102)
+
+/* ********************************************************************
+   Enums
+   ******************************************************************** */
+#define D3DNEXT_NEXT 0x01l
+#define D3DNEXT_HEAD 0x02l
+#define D3DNEXT_TAIL 0x04l
+
+#define D3DDP_WAIT               0x00000001l
+#define D3DDP_OUTOFORDER         0x00000002l
+#define D3DDP_DONOTCLIP          0x00000004l
+#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
+#define D3DDP_DONOTLIGHT         0x00000010l
+
+/* ********************************************************************
+   Types and structures
+   ******************************************************************** */
+typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
+#endif
diff --git a/reactos/include/d3dcaps.h b/reactos/include/d3dcaps.h
new file mode 100644 (file)
index 0000000..51dff25
--- /dev/null
@@ -0,0 +1,432 @@
+/*
+ * Copyright (C) 2000 Peter Hunnisett
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+#ifndef __WINE_D3DCAPS_H
+#define __WINE_D3DCAPS_H
+
+#include <ddraw.h>
+
+typedef struct _D3DTRANSFORMCAPS {
+       DWORD dwSize;
+       DWORD dwCaps;
+} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
+
+#define D3DTRANSFORMCAPS_CLIP           0x00000001L
+
+typedef struct _D3DLIGHTINGCAPS {
+       DWORD dwSize;
+       DWORD dwCaps;
+       DWORD dwLightingModel;
+       DWORD dwNumLights;
+} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
+
+#define D3DLIGHTINGMODEL_RGB            0x00000001
+#define D3DLIGHTINGMODEL_MONO           0x00000002
+
+#define D3DLIGHTCAPS_POINT              0x00000001
+#define D3DLIGHTCAPS_SPOT               0x00000002
+#define D3DLIGHTCAPS_DIRECTIONAL        0x00000004
+#define D3DLIGHTCAPS_PARALLELPOINT      0x00000008
+#define D3DLIGHTCAPS_GLSPOT             0x00000010
+
+typedef struct _D3dPrimCaps {
+    DWORD dwSize;
+    DWORD dwMiscCaps;
+    DWORD dwRasterCaps;
+    DWORD dwZCmpCaps;
+    DWORD dwSrcBlendCaps;
+    DWORD dwDestBlendCaps;
+    DWORD dwAlphaCmpCaps;
+    DWORD dwShadeCaps;
+    DWORD dwTextureCaps;
+    DWORD dwTextureFilterCaps;
+    DWORD dwTextureBlendCaps;
+    DWORD dwTextureAddressCaps;
+    DWORD dwStippleWidth;
+    DWORD dwStippleHeight;
+} D3DPRIMCAPS, *LPD3DPRIMCAPS;
+
+#define D3DPMISCCAPS_MASKPLANES         0x00000001
+#define D3DPMISCCAPS_MASKZ              0x00000002
+#define D3DPMISCCAPS_LINEPATTERNREP     0x00000004
+#define D3DPMISCCAPS_CONFORMANT         0x00000008
+#define D3DPMISCCAPS_CULLNONE           0x00000010
+#define D3DPMISCCAPS_CULLCW             0x00000020
+#define D3DPMISCCAPS_CULLCCW            0x00000040
+
+#define D3DPRASTERCAPS_DITHER                     0x00000001
+#define D3DPRASTERCAPS_ROP2                       0x00000002
+#define D3DPRASTERCAPS_XOR                        0x00000004
+#define D3DPRASTERCAPS_PAT                        0x00000008
+#define D3DPRASTERCAPS_ZTEST                      0x00000010
+#define D3DPRASTERCAPS_SUBPIXEL                   0x00000020
+#define D3DPRASTERCAPS_SUBPIXELX                  0x00000040
+#define D3DPRASTERCAPS_FOGVERTEX                  0x00000080
+#define D3DPRASTERCAPS_FOGTABLE                   0x00000100
+#define D3DPRASTERCAPS_STIPPLE                    0x00000200
+#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT     0x00000400
+#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT   0x00000800
+#define D3DPRASTERCAPS_ANTIALIASEDGES             0x00001000
+#define D3DPRASTERCAPS_MIPMAPLODBIAS              0x00002000
+#define D3DPRASTERCAPS_ZBIAS                      0x00004000
+#define D3DPRASTERCAPS_ZBUFFERLESSHSR             0x00008000
+#define D3DPRASTERCAPS_FOGRANGE                   0x00010000
+#define D3DPRASTERCAPS_ANISOTROPY                 0x00020000
+#define D3DPRASTERCAPS_WBUFFER                    0x00040000
+#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000
+#define D3DPRASTERCAPS_WFOG                       0x00100000
+#define D3DPRASTERCAPS_ZFOG                       0x00200000
+
+#define D3DPCMPCAPS_NEVER               0x00000001
+#define D3DPCMPCAPS_LESS                0x00000002
+#define D3DPCMPCAPS_EQUAL               0x00000004
+#define D3DPCMPCAPS_LESSEQUAL           0x00000008
+#define D3DPCMPCAPS_GREATER             0x00000010
+#define D3DPCMPCAPS_NOTEQUAL            0x00000020
+#define D3DPCMPCAPS_GREATEREQUAL        0x00000040
+#define D3DPCMPCAPS_ALWAYS              0x00000080
+
+#define D3DPBLENDCAPS_ZERO              0x00000001
+#define D3DPBLENDCAPS_ONE               0x00000002
+#define D3DPBLENDCAPS_SRCCOLOR          0x00000004
+#define D3DPBLENDCAPS_INVSRCCOLOR       0x00000008
+#define D3DPBLENDCAPS_SRCALPHA          0x00000010
+#define D3DPBLENDCAPS_INVSRCALPHA       0x00000020
+#define D3DPBLENDCAPS_DESTALPHA         0x00000040
+#define D3DPBLENDCAPS_INVDESTALPHA      0x00000080
+#define D3DPBLENDCAPS_DESTCOLOR         0x00000100
+#define D3DPBLENDCAPS_INVDESTCOLOR      0x00000200
+#define D3DPBLENDCAPS_SRCALPHASAT       0x00000400
+#define D3DPBLENDCAPS_BOTHSRCALPHA      0x00000800
+#define D3DPBLENDCAPS_BOTHINVSRCALPHA   0x00001000
+
+#define D3DPSHADECAPS_COLORFLATMONO     0x00000001
+#define D3DPSHADECAPS_COLORFLATRGB      0x00000002
+#define D3DPSHADECAPS_COLORGOURAUDMONO  0x00000004
+#define D3DPSHADECAPS_COLORGOURAUDRGB   0x00000008
+#define D3DPSHADECAPS_COLORPHONGMONO    0x00000010
+#define D3DPSHADECAPS_COLORPHONGRGB     0x00000020
+
+#define D3DPSHADECAPS_SPECULARFLATMONO    0x00000040
+#define D3DPSHADECAPS_SPECULARFLATRGB     0x00000080
+#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100
+#define D3DPSHADECAPS_SPECULARGOURAUDRGB  0x00000200
+#define D3DPSHADECAPS_SPECULARPHONGMONO   0x00000400
+#define D3DPSHADECAPS_SPECULARPHONGRGB    0x00000800
+
+#define D3DPSHADECAPS_ALPHAFLATBLEND       0x00001000
+#define D3DPSHADECAPS_ALPHAFLATSTIPPLED    0x00002000
+#define D3DPSHADECAPS_ALPHAGOURAUDBLEND    0x00004000
+#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000
+#define D3DPSHADECAPS_ALPHAPHONGBLEND      0x00010000
+#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED   0x00020000
+
+#define D3DPSHADECAPS_FOGFLAT           0x00040000
+#define D3DPSHADECAPS_FOGGOURAUD        0x00080000
+#define D3DPSHADECAPS_FOGPHONG          0x00100000
+
+#define D3DPTEXTURECAPS_PERSPECTIVE              0x00000001
+#define D3DPTEXTURECAPS_POW2                     0x00000002
+#define D3DPTEXTURECAPS_ALPHA                    0x00000004
+#define D3DPTEXTURECAPS_TRANSPARENCY             0x00000008
+#define D3DPTEXTURECAPS_BORDER                   0x00000010
+#define D3DPTEXTURECAPS_SQUAREONLY               0x00000020
+#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040
+#define D3DPTEXTURECAPS_ALPHAPALETTE             0x00000080
+#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL  0x00000100L
+/* yes actually 0x00000200 is unused - or at least unreleased */
+#define D3DPTEXTURECAPS_PROJECTED                0x00000400
+#define D3DPTEXTURECAPS_CUBEMAP                  0x00000800
+#define D3DPTEXTURECAPS_COLORKEYBLEND            0x00001000
+
+#define D3DPTFILTERCAPS_NEAREST           0x00000001
+#define D3DPTFILTERCAPS_LINEAR            0x00000002
+#define D3DPTFILTERCAPS_MIPNEAREST        0x00000004
+#define D3DPTFILTERCAPS_MIPLINEAR         0x00000008
+#define D3DPTFILTERCAPS_LINEARMIPNEAREST  0x00000010
+#define D3DPTFILTERCAPS_LINEARMIPLINEAR   0x00000020
+/* yes - missing numbers */
+#define D3DPTFILTERCAPS_MINFPOINT         0x00000100
+#define D3DPTFILTERCAPS_MINFLINEAR        0x00000200
+#define D3DPTFILTERCAPS_MINFANISOTROPIC   0x00000400
+/* yes - missing numbers */
+#define D3DPTFILTERCAPS_MIPFPOINT         0x00010000
+#define D3DPTFILTERCAPS_MIPFLINEAR        0x00020000
+/* yes - missing numbers */
+#define D3DPTFILTERCAPS_MAGFPOINT         0x01000000
+#define D3DPTFILTERCAPS_MAGFLINEAR        0x02000000
+#define D3DPTFILTERCAPS_MAGFANISOTROPIC   0x04000000
+#define D3DPTFILTERCAPS_MAGFAFLATCUBIC    0x08000000
+#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000
+
+#define D3DPTBLENDCAPS_DECAL            0x00000001
+#define D3DPTBLENDCAPS_MODULATE         0x00000002
+#define D3DPTBLENDCAPS_DECALALPHA       0x00000004
+#define D3DPTBLENDCAPS_MODULATEALPHA    0x00000008
+#define D3DPTBLENDCAPS_DECALMASK        0x00000010
+#define D3DPTBLENDCAPS_MODULATEMASK     0x00000020
+#define D3DPTBLENDCAPS_COPY             0x00000040
+#define D3DPTBLENDCAPS_ADD              0x00000080
+
+#define D3DPTADDRESSCAPS_WRAP           0x00000001
+#define D3DPTADDRESSCAPS_MIRROR         0x00000002
+#define D3DPTADDRESSCAPS_CLAMP          0x00000004
+#define D3DPTADDRESSCAPS_BORDER         0x00000008
+#define D3DPTADDRESSCAPS_INDEPENDENTUV  0x00000010
+
+
+typedef struct _D3DDeviceDesc {
+        DWORD           dwSize;
+        DWORD           dwFlags;
+        D3DCOLORMODEL   dcmColorModel;
+        DWORD           dwDevCaps;
+        D3DTRANSFORMCAPS dtcTransformCaps;
+        BOOL            bClipping;
+        D3DLIGHTINGCAPS dlcLightingCaps;
+        D3DPRIMCAPS     dpcLineCaps;
+        D3DPRIMCAPS     dpcTriCaps;
+        DWORD           dwDeviceRenderBitDepth;
+        DWORD           dwDeviceZBufferBitDepth;
+        DWORD           dwMaxBufferSize;
+        DWORD           dwMaxVertexCount;
+
+        DWORD           dwMinTextureWidth,dwMinTextureHeight;
+        DWORD           dwMaxTextureWidth,dwMaxTextureHeight;
+        DWORD           dwMinStippleWidth,dwMaxStippleWidth;
+        DWORD           dwMinStippleHeight,dwMaxStippleHeight;
+
+        DWORD       dwMaxTextureRepeat;
+        DWORD       dwMaxTextureAspectRatio;
+        DWORD       dwMaxAnisotropy;
+
+        D3DVALUE    dvGuardBandLeft;
+        D3DVALUE    dvGuardBandTop;
+        D3DVALUE    dvGuardBandRight;
+        D3DVALUE    dvGuardBandBottom;
+
+        D3DVALUE    dvExtentsAdjust;
+        DWORD       dwStencilCaps;
+
+        DWORD       dwFVFCaps;
+        DWORD       dwTextureOpCaps;
+        WORD        wMaxTextureBlendStages;
+        WORD        wMaxSimultaneousTextures;
+} D3DDEVICEDESC,*LPD3DDEVICEDESC;
+#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
+
+typedef struct _D3DDeviceDesc7 {
+        DWORD            dwDevCaps;
+        D3DPRIMCAPS      dpcLineCaps;
+        D3DPRIMCAPS      dpcTriCaps;
+        DWORD            dwDeviceRenderBitDepth;
+        DWORD            dwDeviceZBufferBitDepth;
+
+        DWORD       dwMinTextureWidth, dwMinTextureHeight;
+        DWORD       dwMaxTextureWidth, dwMaxTextureHeight;
+
+        DWORD       dwMaxTextureRepeat;
+        DWORD       dwMaxTextureAspectRatio;
+        DWORD       dwMaxAnisotropy;
+
+        D3DVALUE    dvGuardBandLeft;
+        D3DVALUE    dvGuardBandTop;
+        D3DVALUE    dvGuardBandRight;
+        D3DVALUE    dvGuardBandBottom;
+
+        D3DVALUE    dvExtentsAdjust;
+        DWORD       dwStencilCaps;
+        DWORD       dwFVFCaps;
+        DWORD       dwTextureOpCaps;
+        WORD        wMaxTextureBlendStages;
+        WORD        wMaxSimultaneousTextures;
+
+        DWORD       dwMaxActiveLights;
+        D3DVALUE    dvMaxVertexW;
+        GUID        deviceGUID;
+
+        WORD        wMaxUserClipPlanes;
+        WORD        wMaxVertexBlendMatrices;
+
+        DWORD       dwVertexProcessingCaps;
+
+        DWORD       dwReserved1;
+        DWORD       dwReserved2;
+        DWORD       dwReserved3;
+        DWORD       dwReserved4;
+} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
+#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
+
+#define D3DDD_COLORMODEL                0x00000001
+#define D3DDD_DEVCAPS                   0x00000002
+#define D3DDD_TRANSFORMCAPS             0x00000004
+#define D3DDD_LIGHTINGCAPS              0x00000008
+#define D3DDD_BCLIPPING                 0x00000010
+#define D3DDD_LINECAPS                  0x00000020
+#define D3DDD_TRICAPS                   0x00000040
+#define D3DDD_DEVICERENDERBITDEPTH      0x00000080
+#define D3DDD_DEVICEZBUFFERBITDEPTH     0x00000100
+#define D3DDD_MAXBUFFERSIZE             0x00000200
+#define D3DDD_MAXVERTEXCOUNT            0x00000400
+
+#define D3DDEVCAPS_FLOATTLVERTEX           0x00000001
+#define D3DDEVCAPS_SORTINCREASINGZ         0x00000002
+#define D3DDEVCAPS_SORTDECREASINGZ         0X00000004
+#define D3DDEVCAPS_SORTEXACT               0x00000008
+#define D3DDEVCAPS_EXECUTESYSTEMMEMORY     0x00000010
+#define D3DDEVCAPS_EXECUTEVIDEOMEMORY      0x00000020
+#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY    0x00000040
+#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY     0x00000080
+#define D3DDEVCAPS_TEXTURESYSTEMMEMORY     0x00000100
+#define D3DDEVCAPS_TEXTUREVIDEOMEMORY      0x00000200
+#define D3DDEVCAPS_DRAWPRIMTLVERTEX        0x00000400
+#define D3DDEVCAPS_CANRENDERAFTERFLIP      0x00000800
+#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM   0x00001000
+#define D3DDEVCAPS_DRAWPRIMITIVES2         0x00002000
+#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000
+#define D3DDEVCAPS_DRAWPRIMITIVES2EX       0x00008000
+#define D3DDEVCAPS_HWTRANSFORMANDLIGHT     0x00010000
+#define D3DDEVCAPS_CANBLTSYSTONONLOCAL     0x00020000
+#define D3DDEVCAPS_HWRASTERIZATION         0x00080000
+
+#define D3DSTENCILCAPS_KEEP     0x00000001
+#define D3DSTENCILCAPS_ZERO     0x00000002
+#define D3DSTENCILCAPS_REPLACE  0x00000004
+#define D3DSTENCILCAPS_INCRSAT  0x00000008
+#define D3DSTENCILCAPS_DECRSAT  0x00000010
+#define D3DSTENCILCAPS_INVERT   0x00000020
+#define D3DSTENCILCAPS_INCR     0x00000040
+#define D3DSTENCILCAPS_DECR     0x00000080
+
+#define D3DTEXOPCAPS_DISABLE                    0x00000001
+#define D3DTEXOPCAPS_SELECTARG1                 0x00000002
+#define D3DTEXOPCAPS_SELECTARG2                 0x00000004
+#define D3DTEXOPCAPS_MODULATE                   0x00000008
+#define D3DTEXOPCAPS_MODULATE2X                 0x00000010
+#define D3DTEXOPCAPS_MODULATE4X                 0x00000020
+#define D3DTEXOPCAPS_ADD                        0x00000040
+#define D3DTEXOPCAPS_ADDSIGNED                  0x00000080
+#define D3DTEXOPCAPS_ADDSIGNED2X                0x00000100
+#define D3DTEXOPCAPS_SUBTRACT                   0x00000200
+#define D3DTEXOPCAPS_ADDSMOOTH                  0x00000400
+#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA          0x00000800
+#define D3DTEXOPCAPS_BLENDTEXTUREALPHA          0x00001000
+#define D3DTEXOPCAPS_BLENDFACTORALPHA           0x00002000
+#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM        0x00004000
+#define D3DTEXOPCAPS_BLENDCURRENTALPHA          0x00008000
+#define D3DTEXOPCAPS_PREMODULATE                0x00010000
+#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR     0x00020000
+#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA     0x00040000
+#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR  0x00080000
+#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA  0x00100000
+#define D3DTEXOPCAPS_BUMPENVMAP                 0x00200000
+#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE        0x00400000
+#define D3DTEXOPCAPS_DOTPRODUCT3                0x00800000
+
+#define D3DFVFCAPS_TEXCOORDCOUNTMASK    0x0000FFFF
+#define D3DFVFCAPS_DONOTSTRIPELEMENTS   0x00080000
+
+#define D3DVTXPCAPS_TEXGEN              0x00000001
+#define D3DVTXPCAPS_MATERIALSOURCE7     0x00000002
+#define D3DVTXPCAPS_VERTEXFOG           0x00000004
+#define D3DVTXPCAPS_DIRECTIONALLIGHTS   0x00000008
+#define D3DVTXPCAPS_POSITIONALLIGHTS    0x00000010
+#define D3DVTXPCAPS_LOCALVIEWER         0x00000020
+
+typedef HRESULT (CALLBACK *LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid,LPSTR lpDeviceDescription,LPSTR lpDeviceName,LPD3DDEVICEDESC,LPD3DDEVICEDESC,LPVOID);
+typedef HRESULT (CALLBACK *LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
+
+#define D3DFDS_COLORMODEL          0x00000001
+#define D3DFDS_GUID                0x00000002
+#define D3DFDS_HARDWARE            0x00000004
+#define D3DFDS_TRIANGLES           0x00000008
+#define D3DFDS_LINES               0x00000010
+#define D3DFDS_MISCCAPS            0x00000020
+#define D3DFDS_RASTERCAPS          0x00000040
+#define D3DFDS_ZCMPCAPS            0x00000080
+#define D3DFDS_ALPHACMPCAPS        0x00000100
+#define D3DFDS_SRCBLENDCAPS        0x00000200
+#define D3DFDS_DSTBLENDCAPS        0x00000400
+#define D3DFDS_SHADECAPS           0x00000800
+#define D3DFDS_TEXTURECAPS         0x00001000
+#define D3DFDS_TEXTUREFILTERCAPS   0x00002000
+#define D3DFDS_TEXTUREBLENDCAPS    0x00004000
+#define D3DFDS_TEXTUREADDRESSCAPS  0x00008000
+
+typedef struct _D3DFINDDEVICESEARCH {
+    DWORD               dwSize;
+    DWORD               dwFlags;
+    BOOL                bHardware;
+    D3DCOLORMODEL       dcmColorModel;
+    GUID                guid;
+    DWORD               dwCaps;
+    D3DPRIMCAPS         dpcPrimCaps;
+} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH;
+
+typedef struct _D3DFINDDEVICERESULT {
+    DWORD               dwSize;
+    GUID                guid;
+    D3DDEVICEDESC       ddHwDesc;
+    D3DDEVICEDESC       ddSwDesc;
+} D3DFINDDEVICERESULT,*LPD3DFINDDEVICERESULT;
+
+typedef struct _D3DExecuteBufferDesc {
+  DWORD  dwSize;
+  DWORD  dwFlags;
+  DWORD  dwCaps;
+  DWORD  dwBufferSize;
+  LPVOID lpData;
+} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
+
+#define D3DDEB_BUFSIZE          0x00000001
+#define D3DDEB_CAPS             0x00000002
+#define D3DDEB_LPDATA           0x00000004
+
+#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001
+#define D3DDEBCAPS_VIDEOMEMORY  0x00000002
+#define D3DDEBCAPS_MEM          (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY) /* = 0x3 */
+
+typedef struct _D3DDEVINFO_TEXTUREMANAGER {
+       BOOL    bThrashing;
+       DWORD   dwApproxBytesDownloaded;
+       DWORD   dwNumEvicts;
+       DWORD   dwNumVidCreates;
+       DWORD   dwNumTexturesUsed;
+       DWORD   dwNumUsedTexInVid;
+       DWORD   dwWorkingSet;
+       DWORD   dwWorkingSetBytes;
+       DWORD   dwTotalManaged;
+       DWORD   dwTotalBytes;
+       DWORD   dwLastPri;
+} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
+
+typedef struct _D3DDEVINFO_TEXTURING {
+       DWORD   dwNumLoads;
+       DWORD   dwApproxBytesLoaded;
+       DWORD   dwNumPreLoads;
+       DWORD   dwNumSet;
+       DWORD   dwNumCreates;
+       DWORD   dwNumDestroys;
+       DWORD   dwNumSetPriorities;
+       DWORD   dwNumSetLODs;
+       DWORD   dwNumLocks;
+       DWORD   dwNumGetDCs;
+} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
+
+
+
+#endif
diff --git a/reactos/include/d3dtypes.h b/reactos/include/d3dtypes.h
new file mode 100644 (file)
index 0000000..f933550
--- /dev/null
@@ -0,0 +1,1348 @@
+/*
+ * Copyright (C) 2000 Peter Hunnisett
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+/* FIXME: Need to add C++ code for certain structs for headers - this is going to be a problem
+          if WINE continues to only use C code  - I suppose that we could always inline in
+          the header file to get around that little problem... */
+/* FIXME: We need to implement versioning on everything directx 5 and up if these headers
+          are going to be generically useful for directx stuff */
+
+#ifndef __WINE_D3DTYPES_H
+#define __WINE_D3DTYPES_H
+
+#include <float.h>
+#include <ddraw.h>
+
+#define D3DVALP(val, prec)      ((float)(val))
+#define D3DVAL(val)             ((float)(val))
+typedef float D3DVALUE,*LPD3DVALUE;
+#define D3DDivide(a, b)         (float)((double) (a) / (double) (b))
+#define D3DMultiply(a, b)       ((a) * (b))
+
+typedef LONG D3DFIXED;
+
+
+#ifndef RGB_MAKE
+#define CI_GETALPHA(ci)    ((ci) >> 24)
+#define CI_GETINDEX(ci)    (((ci) >> 8) & 0xffff)
+#define CI_GETFRACTION(ci) ((ci) & 0xff)
+#define CI_ROUNDINDEX(ci)  CI_GETINDEX((ci) + 0x80)
+#define CI_MASKALPHA(ci)   ((ci) & 0xffffff)
+#define CI_MAKE(a, i, f)    (((a) << 24) | ((i) << 8) | (f))
+
+#define RGBA_GETALPHA(rgb)      ((rgb) >> 24)
+#define RGBA_GETRED(rgb)        (((rgb) >> 16) & 0xff)
+#define RGBA_GETGREEN(rgb)      (((rgb) >> 8) & 0xff)
+#define RGBA_GETBLUE(rgb)       ((rgb) & 0xff)
+#define RGBA_MAKE(r, g, b, a)   ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
+
+#define D3DRGB(r, g, b) \
+    (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
+#define D3DRGBA(r, g, b, a) \
+    (   (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
+    |   (((long)((g) * 255)) << 8) | (long)((b) * 255) \
+    )
+
+#define RGB_GETRED(rgb)         (((rgb) >> 16) & 0xff)
+#define RGB_GETGREEN(rgb)       (((rgb) >> 8) & 0xff)
+#define RGB_GETBLUE(rgb)        ((rgb) & 0xff)
+#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
+#define RGB_MAKE(r, g, b)       ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b)))
+#define RGBA_TORGB(rgba)       ((D3DCOLOR) ((rgba) & 0xffffff))
+#define RGB_TORGBA(rgb)        ((D3DCOLOR) ((rgb) | 0xff000000))
+
+#endif
+
+#define D3DENUMRET_CANCEL                        DDENUMRET_CANCEL
+#define D3DENUMRET_OK                            DDENUMRET_OK
+
+typedef HRESULT (CALLBACK *LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
+typedef HRESULT (CALLBACK *LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
+typedef HRESULT (CALLBACK *LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
+
+#ifndef D3DCOLOR_DEFINED
+typedef DWORD D3DCOLOR, *LPD3DCOLOR;
+#define D3DCOLOR_DEFINED
+#endif
+
+typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
+typedef DWORD D3DTEXTUREHANDLE,  *LPD3DTEXTUREHANDLE;
+typedef DWORD D3DMATRIXHANDLE,   *LPD3DMATRIXHANDLE;
+
+typedef struct _D3DCOLORVALUE {
+        union {
+                D3DVALUE r;
+                D3DVALUE dvR;
+        } DUMMYUNIONNAME1;
+        union {
+                D3DVALUE g;
+                D3DVALUE dvG;
+        } DUMMYUNIONNAME2;
+        union {
+                D3DVALUE b;
+                D3DVALUE dvB;
+        } DUMMYUNIONNAME3;
+        union {
+                D3DVALUE a;
+                D3DVALUE dvA;
+        } DUMMYUNIONNAME4;
+} D3DCOLORVALUE,*LPD3DCOLORVALUE;
+
+typedef struct _D3DRECT {
+  union {
+    LONG x1;
+    LONG lX1;
+  } DUMMYUNIONNAME1;
+  union {
+    LONG y1;
+    LONG lY1;
+  } DUMMYUNIONNAME2;
+  union {
+    LONG x2;
+    LONG lX2;
+  } DUMMYUNIONNAME3;
+  union {
+    LONG y2;
+    LONG lY2;
+  } DUMMYUNIONNAME4;
+} D3DRECT, *LPD3DRECT;
+
+typedef struct _D3DVECTOR {
+  union {
+        D3DVALUE        x;
+    D3DVALUE dvX;
+  } DUMMYUNIONNAME1;
+  union {
+        D3DVALUE        y;
+    D3DVALUE dvY;
+  } DUMMYUNIONNAME2;
+  union {
+        D3DVALUE        z;
+    D3DVALUE dvZ;
+  } DUMMYUNIONNAME3;
+#if defined(__cplusplus) && defined(D3D_OVERLOADS)
+  /* the definitions for these methods are in d3dvec.inl */
+public:
+  /*** constructors ***/
+  _D3DVECTOR() {}
+  _D3DVECTOR(D3DVALUE f);
+  _D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z);
+  _D3DVECTOR(const D3DVALUE f[3]);
+
+  /*** assignment operators ***/
+  _D3DVECTOR& operator += (const _D3DVECTOR& v);
+  _D3DVECTOR& operator -= (const _D3DVECTOR& v);
+  _D3DVECTOR& operator *= (const _D3DVECTOR& v);
+  _D3DVECTOR& operator /= (const _D3DVECTOR& v);
+  _D3DVECTOR& operator *= (D3DVALUE s);
+  _D3DVECTOR& operator /= (D3DVALUE s);
+
+  /*** unary operators ***/
+  friend _D3DVECTOR operator + (const _D3DVECTOR& v);
+  friend _D3DVECTOR operator - (const _D3DVECTOR& v);
+
+  /*** binary operators ***/
+  friend _D3DVECTOR operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
+  friend _D3DVECTOR operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
+
+  friend _D3DVECTOR operator * (const _D3DVECTOR& v, D3DVALUE s);
+  friend _D3DVECTOR operator * (D3DVALUE s, const _D3DVECTOR& v);
+  friend _D3DVECTOR operator / (const _D3DVECTOR& v, D3DVALUE s);
+
+  friend D3DVALUE SquareMagnitude(const _D3DVECTOR& v);
+  friend D3DVALUE Magnitude(const _D3DVECTOR& v);
+
+  friend _D3DVECTOR Normalize(const _D3DVECTOR& v);
+
+  friend D3DVALUE DotProduct(const _D3DVECTOR& v1, const _D3DVECTOR& v2);
+  friend _D3DVECTOR CrossProduct(const _D3DVECTOR& v1, const _D3DVECTOR& v2);
+#endif
+} D3DVECTOR,*LPD3DVECTOR;
+
+typedef struct _D3DHVERTEX {
+    DWORD         dwFlags;
+ union {
+    D3DVALUE    hx;
+    D3DVALUE    dvHX;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DVALUE    hy;
+    D3DVALUE    dvHY;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DVALUE    hz;
+    D3DVALUE    dvHZ;
+  } DUMMYUNIONNAME3;
+} D3DHVERTEX, *LPD3DHVERTEX;
+
+/*
+ * Transformed/lit vertices
+ */
+typedef struct _D3DTLVERTEX {
+  union {
+    D3DVALUE    sx;
+    D3DVALUE    dvSX;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DVALUE    sy;
+    D3DVALUE    dvSY;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DVALUE    sz;
+    D3DVALUE    dvSZ;
+  } DUMMYUNIONNAME3;
+  union {
+    D3DVALUE    rhw;
+    D3DVALUE    dvRHW;
+  } DUMMYUNIONNAME4;
+  union {
+    D3DCOLOR    color;
+    D3DCOLOR    dcColor;
+  } DUMMYUNIONNAME5;
+  union {
+    D3DCOLOR    specular;
+    D3DCOLOR    dcSpecular;
+  } DUMMYUNIONNAME6;
+  union {
+    D3DVALUE    tu;
+    D3DVALUE    dvTU;
+  } DUMMYUNIONNAME7;
+  union {
+    D3DVALUE    tv;
+    D3DVALUE    dvTV;
+  } DUMMYUNIONNAME8;
+#if defined(__cplusplus) && defined(D3D_OVERLOADS)
+public:
+  _D3DTLVERTEX() {}
+  _D3DTLVERTEX(const D3DVECTOR& v, float _rhw, D3DCOLOR _color, D3DCOLOR _specular, float _tu, float _tv) {
+    sx = v.x; sy = v.y; sz = v.z; rhw = _rhw;
+    color = _color; specular = _specular;
+    tu = _tu; tv = _tv;
+  }
+#endif
+} D3DTLVERTEX, *LPD3DTLVERTEX;
+
+typedef struct _D3DLVERTEX {
+  union {
+    D3DVALUE x;
+    D3DVALUE dvX;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DVALUE y;
+    D3DVALUE dvY;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DVALUE z;
+    D3DVALUE dvZ;
+  } DUMMYUNIONNAME3;
+  DWORD            dwReserved;
+  union {
+    D3DCOLOR     color;
+    D3DCOLOR     dcColor;
+  } DUMMYUNIONNAME4;
+  union {
+    D3DCOLOR     specular;
+    D3DCOLOR     dcSpecular;
+  } DUMMYUNIONNAME5;
+  union {
+    D3DVALUE     tu;
+    D3DVALUE     dvTU;
+  } DUMMYUNIONNAME6;
+  union {
+    D3DVALUE     tv;
+    D3DVALUE     dvTV;
+  } DUMMYUNIONNAME7;
+} D3DLVERTEX, *LPD3DLVERTEX;
+
+typedef struct _D3DVERTEX {
+  union {
+    D3DVALUE     x;
+    D3DVALUE     dvX;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DVALUE     y;
+    D3DVALUE     dvY;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DVALUE     z;
+    D3DVALUE     dvZ;
+  } DUMMYUNIONNAME3;
+  union {
+    D3DVALUE     nx;
+    D3DVALUE     dvNX;
+  } DUMMYUNIONNAME4;
+  union {
+    D3DVALUE     ny;
+    D3DVALUE     dvNY;
+  } DUMMYUNIONNAME5;
+  union {
+    D3DVALUE     nz;
+    D3DVALUE     dvNZ;
+  } DUMMYUNIONNAME6;
+  union {
+    D3DVALUE     tu;
+    D3DVALUE     dvTU;
+  } DUMMYUNIONNAME7;
+  union {
+    D3DVALUE     tv;
+    D3DVALUE     dvTV;
+  } DUMMYUNIONNAME8;
+#if defined(__cplusplus) && defined(D3D_OVERLOADS)
+public:
+  _D3DVERTEX() {}
+  _D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv) {
+    x  = v.x; y  = v.y; z  = v.z;
+    nx = n.x; ny = n.y; nz = n.z;
+    tu = _tu; tv = _tv;
+  }
+#endif
+} D3DVERTEX, *LPD3DVERTEX;
+
+typedef struct _D3DMATRIX {
+  D3DVALUE        _11, _12, _13, _14;
+  D3DVALUE        _21, _22, _23, _24;
+  D3DVALUE        _31, _32, _33, _34;
+  D3DVALUE        _41, _42, _43, _44;
+#if defined(__cplusplus) && defined(D3D_OVERLOADS)
+  _D3DMATRIX() { }
+
+    /* This is different from MS, but avoids anonymous structs. */
+    D3DVALUE &operator () (int r, int c)
+       { return ((D3DVALUE [4][4])&_11)[r][c]; }
+    const D3DVALUE &operator() (int r, int c) const
+       { return ((const D3DVALUE [4][4])&_11)[r][c]; }
+#endif
+} D3DMATRIX, *LPD3DMATRIX;
+
+#if defined(__cplusplus) && defined(D3D_OVERLOADS)
+#include "d3dvec.inl"
+#endif
+
+typedef struct _D3DVIEWPORT {
+  DWORD       dwSize;
+  DWORD       dwX;
+  DWORD       dwY;
+  DWORD       dwWidth;
+  DWORD       dwHeight;
+  D3DVALUE    dvScaleX;
+  D3DVALUE    dvScaleY;
+  D3DVALUE    dvMaxX;
+  D3DVALUE    dvMaxY;
+  D3DVALUE    dvMinZ;
+  D3DVALUE    dvMaxZ;
+} D3DVIEWPORT, *LPD3DVIEWPORT;
+
+typedef struct _D3DVIEWPORT2 {
+  DWORD       dwSize;
+  DWORD       dwX;
+  DWORD       dwY;
+  DWORD       dwWidth;
+  DWORD       dwHeight;
+  D3DVALUE    dvClipX;
+  D3DVALUE    dvClipY;
+  D3DVALUE    dvClipWidth;
+  D3DVALUE    dvClipHeight;
+  D3DVALUE    dvMinZ;
+  D3DVALUE    dvMaxZ;
+} D3DVIEWPORT2, *LPD3DVIEWPORT2;
+
+typedef struct _D3DVIEWPORT7 {
+  DWORD       dwX;
+  DWORD       dwY;
+  DWORD       dwWidth;
+  DWORD       dwHeight;
+  D3DVALUE    dvMinZ;
+  D3DVALUE    dvMaxZ;
+} D3DVIEWPORT7, *LPD3DVIEWPORT7;
+
+#define D3DMAXUSERCLIPPLANES 32
+
+#define D3DCLIPPLANE0 (1 << 0)
+#define D3DCLIPPLANE1 (1 << 1)
+#define D3DCLIPPLANE2 (1 << 2)
+#define D3DCLIPPLANE3 (1 << 3)
+#define D3DCLIPPLANE4 (1 << 4)
+#define D3DCLIPPLANE5 (1 << 5)
+
+#define D3DCLIP_LEFT     0x00000001
+#define D3DCLIP_RIGHT    0x00000002
+#define D3DCLIP_TOP      0x00000004
+#define D3DCLIP_BOTTOM   0x00000008
+#define D3DCLIP_FRONT    0x00000010
+#define D3DCLIP_BACK     0x00000020
+#define D3DCLIP_GEN0     0x00000040
+#define D3DCLIP_GEN1     0x00000080
+#define D3DCLIP_GEN2     0x00000100
+#define D3DCLIP_GEN3     0x00000200
+#define D3DCLIP_GEN4     0x00000400
+#define D3DCLIP_GEN5     0x00000800
+
+#define D3DSTATUS_CLIPUNIONLEFT                 D3DCLIP_LEFT
+#define D3DSTATUS_CLIPUNIONRIGHT                D3DCLIP_RIGHT
+#define D3DSTATUS_CLIPUNIONTOP                  D3DCLIP_TOP
+#define D3DSTATUS_CLIPUNIONBOTTOM               D3DCLIP_BOTTOM
+#define D3DSTATUS_CLIPUNIONFRONT                D3DCLIP_FRONT
+#define D3DSTATUS_CLIPUNIONBACK                 D3DCLIP_BACK
+#define D3DSTATUS_CLIPUNIONGEN0                 D3DCLIP_GEN0
+#define D3DSTATUS_CLIPUNIONGEN1                 D3DCLIP_GEN1
+#define D3DSTATUS_CLIPUNIONGEN2                 D3DCLIP_GEN2
+#define D3DSTATUS_CLIPUNIONGEN3                 D3DCLIP_GEN3
+#define D3DSTATUS_CLIPUNIONGEN4                 D3DCLIP_GEN4
+#define D3DSTATUS_CLIPUNIONGEN5                 D3DCLIP_GEN5
+
+#define D3DSTATUS_CLIPINTERSECTIONLEFT          0x00001000
+#define D3DSTATUS_CLIPINTERSECTIONRIGHT         0x00002000
+#define D3DSTATUS_CLIPINTERSECTIONTOP           0x00004000
+#define D3DSTATUS_CLIPINTERSECTIONBOTTOM        0x00008000
+#define D3DSTATUS_CLIPINTERSECTIONFRONT         0x00010000
+#define D3DSTATUS_CLIPINTERSECTIONBACK          0x00020000
+#define D3DSTATUS_CLIPINTERSECTIONGEN0          0x00040000
+#define D3DSTATUS_CLIPINTERSECTIONGEN1          0x00080000
+#define D3DSTATUS_CLIPINTERSECTIONGEN2          0x00100000
+#define D3DSTATUS_CLIPINTERSECTIONGEN3          0x00200000
+#define D3DSTATUS_CLIPINTERSECTIONGEN4          0x00400000
+#define D3DSTATUS_CLIPINTERSECTIONGEN5          0x00800000
+#define D3DSTATUS_ZNOTVISIBLE                   0x01000000
+
+#define D3DSTATUS_CLIPUNIONALL  (               \
+            D3DSTATUS_CLIPUNIONLEFT     |       \
+            D3DSTATUS_CLIPUNIONRIGHT    |       \
+            D3DSTATUS_CLIPUNIONTOP      |       \
+            D3DSTATUS_CLIPUNIONBOTTOM   |       \
+            D3DSTATUS_CLIPUNIONFRONT    |       \
+            D3DSTATUS_CLIPUNIONBACK     |       \
+            D3DSTATUS_CLIPUNIONGEN0     |       \
+            D3DSTATUS_CLIPUNIONGEN1     |       \
+            D3DSTATUS_CLIPUNIONGEN2     |       \
+            D3DSTATUS_CLIPUNIONGEN3     |       \
+            D3DSTATUS_CLIPUNIONGEN4     |       \
+            D3DSTATUS_CLIPUNIONGEN5             \
+            )
+
+#define D3DSTATUS_CLIPINTERSECTIONALL   (               \
+            D3DSTATUS_CLIPINTERSECTIONLEFT      |       \
+            D3DSTATUS_CLIPINTERSECTIONRIGHT     |       \
+            D3DSTATUS_CLIPINTERSECTIONTOP       |       \
+            D3DSTATUS_CLIPINTERSECTIONBOTTOM    |       \
+            D3DSTATUS_CLIPINTERSECTIONFRONT     |       \
+            D3DSTATUS_CLIPINTERSECTIONBACK      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN0      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN1      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN2      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN3      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN4      |       \
+            D3DSTATUS_CLIPINTERSECTIONGEN5              \
+            )
+
+#define D3DSTATUS_DEFAULT       (                       \
+            D3DSTATUS_CLIPINTERSECTIONALL       |       \
+            D3DSTATUS_ZNOTVISIBLE)
+
+#define D3DTRANSFORM_CLIPPED       0x00000001
+#define D3DTRANSFORM_UNCLIPPED     0x00000002
+
+typedef struct _D3DTRANSFORMDATA {
+  DWORD           dwSize;
+  LPVOID          lpIn;
+  DWORD           dwInSize;
+  LPVOID          lpOut;
+  DWORD           dwOutSize;
+  LPD3DHVERTEX    lpHOut;
+  DWORD           dwClip;
+  DWORD           dwClipIntersection;
+  DWORD           dwClipUnion;
+  D3DRECT         drExtent;
+} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA;
+
+typedef struct _D3DLIGHTINGELEMENT {
+  D3DVECTOR dvPosition;
+  D3DVECTOR dvNormal;
+} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT;
+
+typedef struct _D3DMATERIAL {
+  DWORD               dwSize;
+  union {
+    D3DCOLORVALUE   diffuse;
+    D3DCOLORVALUE   dcvDiffuse;
+  } DUMMYUNIONNAME;
+  union {
+    D3DCOLORVALUE   ambient;
+    D3DCOLORVALUE   dcvAmbient;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DCOLORVALUE   specular;
+    D3DCOLORVALUE   dcvSpecular;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DCOLORVALUE   emissive;
+    D3DCOLORVALUE   dcvEmissive;
+  } DUMMYUNIONNAME3;
+  union {
+    D3DVALUE        power;
+    D3DVALUE        dvPower;
+  } DUMMYUNIONNAME4;
+  D3DTEXTUREHANDLE    hTexture;
+  DWORD               dwRampSize;
+} D3DMATERIAL, *LPD3DMATERIAL;
+
+typedef struct _D3DMATERIAL7 {
+  union {
+    D3DCOLORVALUE   diffuse;
+    D3DCOLORVALUE   dcvDiffuse;
+  } DUMMYUNIONNAME;
+  union {
+    D3DCOLORVALUE   ambient;
+    D3DCOLORVALUE   dcvAmbient;
+  } DUMMYUNIONNAME1;
+  union {
+    D3DCOLORVALUE   specular;
+    D3DCOLORVALUE   dcvSpecular;
+  } DUMMYUNIONNAME2;
+  union {
+    D3DCOLORVALUE   emissive;
+    D3DCOLORVALUE   dcvEmissive;
+  } DUMMYUNIONNAME3;
+  union {
+    D3DVALUE        power;
+    D3DVALUE        dvPower;
+  } DUMMYUNIONNAME4;
+} D3DMATERIAL7, *LPD3DMATERIAL7;
+
+typedef enum {
+  D3DLIGHT_POINT          = 1,
+  D3DLIGHT_SPOT           = 2,
+  D3DLIGHT_DIRECTIONAL    = 3,
+  D3DLIGHT_PARALLELPOINT  = 4,
+  D3DLIGHT_GLSPOT         = 5,
+  D3DLIGHT_FORCE_DWORD    = 0x7fffffff
+} D3DLIGHTTYPE;
+
+typedef struct _D3DLIGHT {
+    DWORD           dwSize;
+    D3DLIGHTTYPE    dltType;
+    D3DCOLORVALUE   dcvColor;
+    D3DVECTOR       dvPosition;
+    D3DVECTOR       dvDirection;
+    D3DVALUE        dvRange;
+    D3DVALUE        dvFalloff;
+    D3DVALUE        dvAttenuation0;
+    D3DVALUE        dvAttenuation1;
+    D3DVALUE        dvAttenuation2;
+    D3DVALUE        dvTheta;
+    D3DVALUE        dvPhi;
+} D3DLIGHT,*LPD3DLIGHT;
+
+typedef struct _D3DLIGHT7 {
+    D3DLIGHTTYPE    dltType;
+    D3DCOLORVALUE   dcvDiffuse;
+    D3DCOLORVALUE   dcvSpecular;
+    D3DCOLORVALUE   dcvAmbient;
+    D3DVECTOR       dvPosition;
+    D3DVECTOR       dvDirection;
+    D3DVALUE        dvRange;
+    D3DVALUE        dvFalloff;
+    D3DVALUE        dvAttenuation0;
+    D3DVALUE        dvAttenuation1;
+    D3DVALUE        dvAttenuation2;
+    D3DVALUE        dvTheta;
+    D3DVALUE        dvPhi;
+} D3DLIGHT7, *LPD3DLIGHT7;
+
+#define D3DLIGHT_ACTIVE         0x00000001
+#define D3DLIGHT_NO_SPECULAR    0x00000002
+#define D3DLIGHT_ALL (D3DLIGHT_ACTIVE | D3DLIGHT_NO_SPECULAR) /* 0x3 */
+
+#define D3DLIGHT_RANGE_MAX              ((float)sqrt(FLT_MAX))
+
+typedef struct _D3DLIGHT2 {
+  DWORD           dwSize;
+  D3DLIGHTTYPE    dltType;
+  D3DCOLORVALUE   dcvColor;
+  D3DVECTOR       dvPosition;
+  D3DVECTOR       dvDirection;
+  D3DVALUE        dvRange;
+  D3DVALUE        dvFalloff;
+  D3DVALUE        dvAttenuation0;
+  D3DVALUE        dvAttenuation1;
+  D3DVALUE        dvAttenuation2;
+  D3DVALUE        dvTheta;
+  D3DVALUE        dvPhi;
+  DWORD           dwFlags;
+} D3DLIGHT2, *LPD3DLIGHT2;
+
+typedef struct _D3DLIGHTDATA {
+  DWORD                dwSize;
+  LPD3DLIGHTINGELEMENT lpIn;
+  DWORD                dwInSize;
+  LPD3DTLVERTEX        lpOut;
+  DWORD                dwOutSize;
+} D3DLIGHTDATA, *LPD3DLIGHTDATA;
+
+#define D3DCOLOR_MONO   1
+#define D3DCOLOR_RGB    2
+
+typedef DWORD D3DCOLORMODEL;
+
+
+#define D3DCLEAR_TARGET   0x00000001
+#define D3DCLEAR_ZBUFFER  0x00000002
+#define D3DCLEAR_STENCIL  0x00000004
+
+typedef enum _D3DOPCODE {
+  D3DOP_POINT           = 1,
+  D3DOP_LINE            = 2,
+  D3DOP_TRIANGLE        = 3,
+  D3DOP_MATRIXLOAD      = 4,
+  D3DOP_MATRIXMULTIPLY  = 5,
+  D3DOP_STATETRANSFORM  = 6,
+  D3DOP_STATELIGHT      = 7,
+  D3DOP_STATERENDER     = 8,
+  D3DOP_PROCESSVERTICES = 9,
+  D3DOP_TEXTURELOAD     = 10,
+  D3DOP_EXIT            = 11,
+  D3DOP_BRANCHFORWARD   = 12,
+  D3DOP_SPAN            = 13,
+  D3DOP_SETSTATUS       = 14,
+
+  D3DOP_FORCE_DWORD     = 0x7fffffff
+} D3DOPCODE;
+
+typedef struct _D3DINSTRUCTION {
+  BYTE bOpcode;
+  BYTE bSize;
+  WORD wCount;
+} D3DINSTRUCTION, *LPD3DINSTRUCTION;
+
+typedef struct _D3DTEXTURELOAD {
+  D3DTEXTUREHANDLE hDestTexture;
+  D3DTEXTUREHANDLE hSrcTexture;
+} D3DTEXTURELOAD, *LPD3DTEXTURELOAD;
+
+typedef struct _D3DPICKRECORD {
+  BYTE     bOpcode;
+  BYTE     bPad;
+  DWORD    dwOffset;
+  D3DVALUE dvZ;
+} D3DPICKRECORD, *LPD3DPICKRECORD;
+
+typedef enum {
+  D3DSHADE_FLAT         = 1,
+  D3DSHADE_GOURAUD      = 2,
+  D3DSHADE_PHONG        = 3,
+  D3DSHADE_FORCE_DWORD  = 0x7fffffff
+} D3DSHADEMODE;
+
+typedef enum {
+  D3DFILL_POINT         = 1,
+  D3DFILL_WIREFRAME     = 2,
+  D3DFILL_SOLID         = 3,
+  D3DFILL_FORCE_DWORD   = 0x7fffffff
+} D3DFILLMODE;
+
+typedef struct _D3DLINEPATTERN {
+  WORD    wRepeatFactor;
+  WORD    wLinePattern;
+} D3DLINEPATTERN;
+
+typedef enum {
+  D3DFILTER_NEAREST          = 1,
+  D3DFILTER_LINEAR           = 2,
+  D3DFILTER_MIPNEAREST       = 3,
+  D3DFILTER_MIPLINEAR        = 4,
+  D3DFILTER_LINEARMIPNEAREST = 5,
+  D3DFILTER_LINEARMIPLINEAR  = 6,
+  D3DFILTER_FORCE_DWORD      = 0x7fffffff
+} D3DTEXTUREFILTER;
+
+typedef enum {
+  D3DBLEND_ZERO            = 1,
+  D3DBLEND_ONE             = 2,
+  D3DBLEND_SRCCOLOR        = 3,
+  D3DBLEND_INVSRCCOLOR     = 4,
+  D3DBLEND_SRCALPHA        = 5,
+  D3DBLEND_INVSRCALPHA     = 6,
+  D3DBLEND_DESTALPHA       = 7,
+  D3DBLEND_INVDESTALPHA    = 8,
+  D3DBLEND_DESTCOLOR       = 9,
+  D3DBLEND_INVDESTCOLOR    = 10,
+  D3DBLEND_SRCALPHASAT     = 11,
+  D3DBLEND_BOTHSRCALPHA    = 12,
+  D3DBLEND_BOTHINVSRCALPHA = 13,
+  D3DBLEND_FORCE_DWORD     = 0x7fffffff
+} D3DBLEND;
+
+typedef enum {
+  D3DTBLEND_DECAL         = 1,
+  D3DTBLEND_MODULATE      = 2,
+  D3DTBLEND_DECALALPHA    = 3,
+  D3DTBLEND_MODULATEALPHA = 4,
+  D3DTBLEND_DECALMASK     = 5,
+  D3DTBLEND_MODULATEMASK  = 6,
+  D3DTBLEND_COPY          = 7,
+  D3DTBLEND_ADD           = 8,
+  D3DTBLEND_FORCE_DWORD   = 0x7fffffff
+} D3DTEXTUREBLEND;
+
+typedef enum _D3DTEXTUREADDRESS {
+    D3DTADDRESS_WRAP           = 1,
+    D3DTADDRESS_MIRROR         = 2,
+    D3DTADDRESS_CLAMP          = 3,
+    D3DTADDRESS_BORDER         = 4,
+    D3DTADDRESS_FORCE_DWORD    = 0x7fffffff
+} D3DTEXTUREADDRESS;
+
+typedef enum {
+  D3DCULL_NONE        = 1,
+  D3DCULL_CW          = 2,
+  D3DCULL_CCW         = 3,
+  D3DCULL_FORCE_DWORD = 0x7fffffff
+} D3DCULL;
+
+typedef enum {
+  D3DCMP_NEVER        = 1,
+  D3DCMP_LESS         = 2,
+  D3DCMP_EQUAL        = 3,
+  D3DCMP_LESSEQUAL    = 4,
+  D3DCMP_GREATER      = 5,
+  D3DCMP_NOTEQUAL     = 6,
+  D3DCMP_GREATEREQUAL = 7,
+  D3DCMP_ALWAYS       = 8,
+  D3DCMP_FORCE_DWORD  = 0x7fffffff
+} D3DCMPFUNC;
+
+typedef enum _D3DSTENCILOP {
+  D3DSTENCILOP_KEEP        = 1,
+  D3DSTENCILOP_ZERO        = 2,
+  D3DSTENCILOP_REPLACE     = 3,
+  D3DSTENCILOP_INCRSAT     = 4,
+  D3DSTENCILOP_DECRSAT     = 5,
+  D3DSTENCILOP_INVERT      = 6,
+  D3DSTENCILOP_INCR        = 7,
+  D3DSTENCILOP_DECR        = 8,
+  D3DSTENCILOP_FORCE_DWORD = 0x7fffffff
+} D3DSTENCILOP;
+
+typedef enum _D3DFOGMODE {
+  D3DFOG_NONE         = 0,
+  D3DFOG_EXP          = 1,
+  D3DFOG_EXP2         = 2,
+  D3DFOG_LINEAR       = 3,
+  D3DFOG_FORCE_DWORD  = 0x7fffffff
+} D3DFOGMODE;
+
+typedef enum _D3DZBUFFERTYPE {
+  D3DZB_FALSE        = 0,
+  D3DZB_TRUE         = 1,
+  D3DZB_USEW         = 2,
+  D3DZB_FORCE_DWORD  = 0x7fffffff
+} D3DZBUFFERTYPE;
+
+typedef enum _D3DANTIALIASMODE {
+  D3DANTIALIAS_NONE            = 0,
+  D3DANTIALIAS_SORTDEPENDENT   = 1,
+  D3DANTIALIAS_SORTINDEPENDENT = 2,
+  D3DANTIALIAS_FORCE_DWORD     = 0x7fffffff
+} D3DANTIALIASMODE;
+
+typedef enum {
+  D3DVT_VERTEX        = 1,
+  D3DVT_LVERTEX       = 2,
+  D3DVT_TLVERTEX      = 3,
+  D3DVT_FORCE_DWORD   = 0x7fffffff
+} D3DVERTEXTYPE;
+
+typedef enum {
+  D3DPT_POINTLIST     = 1,
+  D3DPT_LINELIST      = 2,
+  D3DPT_LINESTRIP     = 3,
+  D3DPT_TRIANGLELIST  = 4,
+  D3DPT_TRIANGLESTRIP = 5,
+  D3DPT_TRIANGLEFAN   = 6,
+  D3DPT_FORCE_DWORD   = 0x7fffffff
+} D3DPRIMITIVETYPE;
+
+#define D3DSTATE_OVERRIDE_BIAS      256
+
+#define D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS))
+
+typedef enum _D3DTRANSFORMSTATETYPE {
+    D3DTRANSFORMSTATE_WORLD         = 1,
+    D3DTRANSFORMSTATE_VIEW          = 2,
+    D3DTRANSFORMSTATE_PROJECTION    = 3,
+    D3DTRANSFORMSTATE_WORLD1        = 4,
+    D3DTRANSFORMSTATE_WORLD2        = 5,
+    D3DTRANSFORMSTATE_WORLD3        = 6,
+    D3DTRANSFORMSTATE_TEXTURE0      = 16,
+    D3DTRANSFORMSTATE_TEXTURE1      = 17,
+    D3DTRANSFORMSTATE_TEXTURE2      = 18,
+    D3DTRANSFORMSTATE_TEXTURE3      = 19,
+    D3DTRANSFORMSTATE_TEXTURE4      = 20,
+    D3DTRANSFORMSTATE_TEXTURE5      = 21,
+    D3DTRANSFORMSTATE_TEXTURE6      = 22,
+    D3DTRANSFORMSTATE_TEXTURE7      = 23,
+    D3DTRANSFORMSTATE_FORCE_DWORD   = 0x7fffffff
+} D3DTRANSFORMSTATETYPE;
+
+typedef enum {
+  D3DLIGHTSTATE_MATERIAL      = 1,
+  D3DLIGHTSTATE_AMBIENT       = 2,
+  D3DLIGHTSTATE_COLORMODEL    = 3,
+  D3DLIGHTSTATE_FOGMODE       = 4,
+  D3DLIGHTSTATE_FOGSTART      = 5,
+  D3DLIGHTSTATE_FOGEND        = 6,
+  D3DLIGHTSTATE_FOGDENSITY    = 7,
+  D3DLIGHTSTATE_COLORVERTEX   = 8,
+  D3DLIGHTSTATE_FORCE_DWORD   = 0x7fffffff
+} D3DLIGHTSTATETYPE;
+
+typedef enum {
+  D3DRENDERSTATE_TEXTUREHANDLE      = 1,
+  D3DRENDERSTATE_ANTIALIAS          = 2,
+  D3DRENDERSTATE_TEXTUREADDRESS     = 3,
+  D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4,
+  D3DRENDERSTATE_WRAPU              = 5,
+  D3DRENDERSTATE_WRAPV              = 6,
+  D3DRENDERSTATE_ZENABLE            = 7,
+  D3DRENDERSTATE_FILLMODE           = 8,
+  D3DRENDERSTATE_SHADEMODE          = 9,
+  D3DRENDERSTATE_LINEPATTERN        = 10,
+  D3DRENDERSTATE_MONOENABLE         = 11,
+  D3DRENDERSTATE_ROP2               = 12,
+  D3DRENDERSTATE_PLANEMASK          = 13,
+  D3DRENDERSTATE_ZWRITEENABLE       = 14,
+  D3DRENDERSTATE_ALPHATESTENABLE    = 15,
+  D3DRENDERSTATE_LASTPIXEL          = 16,
+  D3DRENDERSTATE_TEXTUREMAG         = 17,
+  D3DRENDERSTATE_TEXTUREMIN         = 18,
+  D3DRENDERSTATE_SRCBLEND           = 19,
+  D3DRENDERSTATE_DESTBLEND          = 20,
+  D3DRENDERSTATE_TEXTUREMAPBLEND    = 21,
+  D3DRENDERSTATE_CULLMODE           = 22,
+  D3DRENDERSTATE_ZFUNC              = 23,
+  D3DRENDERSTATE_ALPHAREF           = 24,
+  D3DRENDERSTATE_ALPHAFUNC          = 25,
+  D3DRENDERSTATE_DITHERENABLE       = 26,
+  D3DRENDERSTATE_ALPHABLENDENABLE   = 27,
+  D3DRENDERSTATE_FOGENABLE          = 28,
+  D3DRENDERSTATE_SPECULARENABLE     = 29,
+  D3DRENDERSTATE_ZVISIBLE           = 30,
+  D3DRENDERSTATE_SUBPIXEL           = 31,
+  D3DRENDERSTATE_SUBPIXELX          = 32,
+  D3DRENDERSTATE_STIPPLEDALPHA      = 33,
+  D3DRENDERSTATE_FOGCOLOR           = 34,
+  D3DRENDERSTATE_FOGTABLEMODE       = 35,
+  D3DRENDERSTATE_FOGTABLESTART      = 36,
+  D3DRENDERSTATE_FOGTABLEEND        = 37,
+  D3DRENDERSTATE_FOGTABLEDENSITY    = 38,
+  D3DRENDERSTATE_FOGSTART           = 36,
+  D3DRENDERSTATE_FOGEND             = 37,
+  D3DRENDERSTATE_FOGDENSITY         = 38,
+  D3DRENDERSTATE_STIPPLEENABLE      = 39,
+  D3DRENDERSTATE_EDGEANTIALIAS      = 40,
+  D3DRENDERSTATE_COLORKEYENABLE     = 41,
+  D3DRENDERSTATE_BORDERCOLOR        = 43,
+  D3DRENDERSTATE_TEXTUREADDRESSU    = 44,
+  D3DRENDERSTATE_TEXTUREADDRESSV    = 45,
+  D3DRENDERSTATE_MIPMAPLODBIAS      = 46,
+  D3DRENDERSTATE_ZBIAS              = 47,
+  D3DRENDERSTATE_RANGEFOGENABLE     = 48,
+  D3DRENDERSTATE_ANISOTROPY         = 49,
+  D3DRENDERSTATE_FLUSHBATCH         = 50,
+  D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT = 51,
+
+  D3DRENDERSTATE_STENCILENABLE      = 52,
+  D3DRENDERSTATE_STENCILFAIL        = 53,
+  D3DRENDERSTATE_STENCILZFAIL       = 54,
+  D3DRENDERSTATE_STENCILPASS        = 55,
+  D3DRENDERSTATE_STENCILFUNC        = 56,
+  D3DRENDERSTATE_STENCILREF         = 57,
+  D3DRENDERSTATE_STENCILMASK        = 58,
+  D3DRENDERSTATE_STENCILWRITEMASK   = 59,
+  D3DRENDERSTATE_TEXTUREFACTOR      = 60,
+
+  D3DRENDERSTATE_STIPPLEPATTERN00   = 64,
+  D3DRENDERSTATE_STIPPLEPATTERN01   = 65,
+  D3DRENDERSTATE_STIPPLEPATTERN02   = 66,
+  D3DRENDERSTATE_STIPPLEPATTERN03   = 67,
+  D3DRENDERSTATE_STIPPLEPATTERN04   = 68,
+  D3DRENDERSTATE_STIPPLEPATTERN05   = 69,
+  D3DRENDERSTATE_STIPPLEPATTERN06   = 70,
+  D3DRENDERSTATE_STIPPLEPATTERN07   = 71,
+  D3DRENDERSTATE_STIPPLEPATTERN08   = 72,
+  D3DRENDERSTATE_STIPPLEPATTERN09   = 73,
+  D3DRENDERSTATE_STIPPLEPATTERN10   = 74,
+  D3DRENDERSTATE_STIPPLEPATTERN11   = 75,
+  D3DRENDERSTATE_STIPPLEPATTERN12   = 76,
+  D3DRENDERSTATE_STIPPLEPATTERN13   = 77,
+  D3DRENDERSTATE_STIPPLEPATTERN14   = 78,
+  D3DRENDERSTATE_STIPPLEPATTERN15   = 79,
+  D3DRENDERSTATE_STIPPLEPATTERN16   = 80,
+  D3DRENDERSTATE_STIPPLEPATTERN17   = 81,
+  D3DRENDERSTATE_STIPPLEPATTERN18   = 82,
+  D3DRENDERSTATE_STIPPLEPATTERN19   = 83,
+  D3DRENDERSTATE_STIPPLEPATTERN20   = 84,
+  D3DRENDERSTATE_STIPPLEPATTERN21   = 85,
+  D3DRENDERSTATE_STIPPLEPATTERN22   = 86,
+  D3DRENDERSTATE_STIPPLEPATTERN23   = 87,
+  D3DRENDERSTATE_STIPPLEPATTERN24   = 88,
+  D3DRENDERSTATE_STIPPLEPATTERN25   = 89,
+  D3DRENDERSTATE_STIPPLEPATTERN26   = 90,
+  D3DRENDERSTATE_STIPPLEPATTERN27   = 91,
+  D3DRENDERSTATE_STIPPLEPATTERN28   = 92,
+  D3DRENDERSTATE_STIPPLEPATTERN29   = 93,
+  D3DRENDERSTATE_STIPPLEPATTERN30   = 94,
+  D3DRENDERSTATE_STIPPLEPATTERN31   = 95,
+
+  D3DRENDERSTATE_WRAP0              = 128,
+  D3DRENDERSTATE_WRAP1              = 129,
+  D3DRENDERSTATE_WRAP2              = 130,
+  D3DRENDERSTATE_WRAP3              = 131,
+  D3DRENDERSTATE_WRAP4              = 132,
+  D3DRENDERSTATE_WRAP5              = 133,
+  D3DRENDERSTATE_WRAP6              = 134,
+  D3DRENDERSTATE_WRAP7              = 135,
+  D3DRENDERSTATE_CLIPPING            = 136,
+  D3DRENDERSTATE_LIGHTING            = 137,
+  D3DRENDERSTATE_EXTENTS             = 138,
+  D3DRENDERSTATE_AMBIENT             = 139,
+  D3DRENDERSTATE_FOGVERTEXMODE       = 140,
+  D3DRENDERSTATE_COLORVERTEX         = 141,
+  D3DRENDERSTATE_LOCALVIEWER         = 142,
+  D3DRENDERSTATE_NORMALIZENORMALS    = 143,
+  D3DRENDERSTATE_COLORKEYBLENDENABLE = 144,
+  D3DRENDERSTATE_DIFFUSEMATERIALSOURCE    = 145,
+  D3DRENDERSTATE_SPECULARMATERIALSOURCE   = 146,
+  D3DRENDERSTATE_AMBIENTMATERIALSOURCE    = 147,
+  D3DRENDERSTATE_EMISSIVEMATERIALSOURCE   = 148,
+  D3DRENDERSTATE_VERTEXBLEND              = 151,
+  D3DRENDERSTATE_CLIPPLANEENABLE          = 152,
+
+  D3DRENDERSTATE_FORCE_DWORD        = 0x7fffffff
+
+  /* FIXME: We have some retired values that are being reused for DirectX 7 */
+} D3DRENDERSTATETYPE;
+
+typedef enum _D3DMATERIALCOLORSOURCE
+{
+    D3DMCS_MATERIAL = 0,
+    D3DMCS_COLOR1   = 1,
+    D3DMCS_COLOR2   = 2,
+    D3DMCS_FORCE_DWORD = 0x7fffffff
+} D3DMATERIALCOLORSOURCE;
+
+#define D3DRENDERSTATE_BLENDENABLE      D3DRENDERSTATE_ALPHABLENDENABLE
+#define D3DRENDERSTATE_WRAPBIAS                 128UL
+#define D3DWRAP_U   0x00000001L
+#define D3DWRAP_V   0x00000002L
+
+#define D3DWRAPCOORD_0   0x00000001L
+#define D3DWRAPCOORD_1   0x00000002L
+#define D3DWRAPCOORD_2   0x00000004L
+#define D3DWRAPCOORD_3   0x00000008L
+
+#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y))
+
+typedef struct _D3DSTATE {
+  union {
+    D3DTRANSFORMSTATETYPE dtstTransformStateType;
+    D3DLIGHTSTATETYPE     dlstLightStateType;
+    D3DRENDERSTATETYPE    drstRenderStateType;
+  } DUMMYUNIONNAME1;
+  union {
+    DWORD                 dwArg[1];
+    D3DVALUE              dvArg[1];
+  } DUMMYUNIONNAME2;
+} D3DSTATE, *LPD3DSTATE;
+
+typedef struct _D3DMATRIXLOAD {
+  D3DMATRIXHANDLE hDestMatrix;
+  D3DMATRIXHANDLE hSrcMatrix;
+} D3DMATRIXLOAD, *LPD3DMATRIXLOAD;
+
+typedef struct _D3DMATRIXMULTIPLY {
+  D3DMATRIXHANDLE hDestMatrix;
+  D3DMATRIXHANDLE hSrcMatrix1;
+  D3DMATRIXHANDLE hSrcMatrix2;
+} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY;
+
+typedef struct _D3DPROCESSVERTICES {
+  DWORD dwFlags;
+  WORD  wStart;
+  WORD  wDest;
+  DWORD dwCount;
+  DWORD dwReserved;
+} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES;
+
+#define D3DPROCESSVERTICES_TRANSFORMLIGHT       0x00000000L
+#define D3DPROCESSVERTICES_TRANSFORM            0x00000001L
+#define D3DPROCESSVERTICES_COPY                 0x00000002L
+#define D3DPROCESSVERTICES_OPMASK               0x00000007L
+
+#define D3DPROCESSVERTICES_UPDATEEXTENTS        0x00000008L
+#define D3DPROCESSVERTICES_NOCOLOR              0x00000010L
+
+typedef enum _D3DTEXTURESTAGESTATETYPE
+{
+    D3DTSS_COLOROP        =  1,
+    D3DTSS_COLORARG1      =  2,
+    D3DTSS_COLORARG2      =  3,
+    D3DTSS_ALPHAOP        =  4,
+    D3DTSS_ALPHAARG1      =  5,
+    D3DTSS_ALPHAARG2      =  6,
+    D3DTSS_BUMPENVMAT00   =  7,
+    D3DTSS_BUMPENVMAT01   =  8,
+    D3DTSS_BUMPENVMAT10   =  9,
+    D3DTSS_BUMPENVMAT11   = 10,
+    D3DTSS_TEXCOORDINDEX  = 11,
+    D3DTSS_ADDRESS        = 12,
+    D3DTSS_ADDRESSU       = 13,
+    D3DTSS_ADDRESSV       = 14,
+    D3DTSS_BORDERCOLOR    = 15,
+    D3DTSS_MAGFILTER      = 16,
+    D3DTSS_MINFILTER      = 17,
+    D3DTSS_MIPFILTER      = 18,
+    D3DTSS_MIPMAPLODBIAS  = 19,
+    D3DTSS_MAXMIPLEVEL    = 20,
+    D3DTSS_MAXANISOTROPY  = 21,
+    D3DTSS_BUMPENVLSCALE  = 22,
+    D3DTSS_BUMPENVLOFFSET = 23,
+    D3DTSS_TEXTURETRANSFORMFLAGS = 24,
+    D3DTSS_FORCE_DWORD   = 0x7fffffff
+} D3DTEXTURESTAGESTATETYPE;
+
+#define D3DTSS_TCI_PASSTHRU                             0x00000000
+#define D3DTSS_TCI_CAMERASPACENORMAL                    0x00010000
+#define D3DTSS_TCI_CAMERASPACEPOSITION                  0x00020000
+#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR          0x00030000
+
+typedef enum _D3DTEXTUREOP
+{
+    D3DTOP_DISABLE    = 1,
+    D3DTOP_SELECTARG1 = 2,
+    D3DTOP_SELECTARG2 = 3,
+
+    D3DTOP_MODULATE   = 4,
+    D3DTOP_MODULATE2X = 5,
+    D3DTOP_MODULATE4X = 6,
+
+    D3DTOP_ADD          =  7,
+    D3DTOP_ADDSIGNED    =  8,
+    D3DTOP_ADDSIGNED2X  =  9,
+    D3DTOP_SUBTRACT     = 10,
+    D3DTOP_ADDSMOOTH    = 11,
+
+    D3DTOP_BLENDDIFFUSEALPHA    = 12,
+    D3DTOP_BLENDTEXTUREALPHA    = 13,
+    D3DTOP_BLENDFACTORALPHA     = 14,
+    D3DTOP_BLENDTEXTUREALPHAPM  = 15,
+    D3DTOP_BLENDCURRENTALPHA    = 16,
+
+    D3DTOP_PREMODULATE            = 17,
+    D3DTOP_MODULATEALPHA_ADDCOLOR = 18,
+    D3DTOP_MODULATECOLOR_ADDALPHA = 19,
+    D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
+    D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
+
+    D3DTOP_BUMPENVMAP           = 22,
+    D3DTOP_BUMPENVMAPLUMINANCE  = 23,
+    D3DTOP_DOTPRODUCT3          = 24,
+
+    D3DTOP_FORCE_DWORD = 0x7fffffff
+} D3DTEXTUREOP;
+
+#define D3DTA_SELECTMASK        0x0000000f
+#define D3DTA_DIFFUSE           0x00000000
+#define D3DTA_CURRENT           0x00000001
+#define D3DTA_TEXTURE           0x00000002
+#define D3DTA_TFACTOR           0x00000003
+#define D3DTA_SPECULAR          0x00000004
+#define D3DTA_COMPLEMENT        0x00000010
+#define D3DTA_ALPHAREPLICATE    0x00000020
+
+typedef enum _D3DTEXTUREMAGFILTER
+{
+    D3DTFG_POINT        = 1,
+    D3DTFG_LINEAR       = 2,
+    D3DTFG_FLATCUBIC    = 3,
+    D3DTFG_GAUSSIANCUBIC = 4,
+    D3DTFG_ANISOTROPIC  = 5,
+    D3DTFG_FORCE_DWORD  = 0x7fffffff
+} D3DTEXTUREMAGFILTER;
+
+typedef enum _D3DTEXTUREMINFILTER
+{
+    D3DTFN_POINT        = 1,
+    D3DTFN_LINEAR       = 2,
+    D3DTFN_ANISOTROPIC  = 3,
+    D3DTFN_FORCE_DWORD  = 0x7fffffff
+} D3DTEXTUREMINFILTER;
+
+typedef enum _D3DTEXTUREMIPFILTER
+{
+    D3DTFP_NONE         = 1,
+    D3DTFP_POINT        = 2,
+    D3DTFP_LINEAR       = 3,
+    D3DTFP_FORCE_DWORD  = 0x7fffffff
+} D3DTEXTUREMIPFILTER;
+
+#define D3DTRIFLAG_START                        0x00000000L
+#define D3DTRIFLAG_STARTFLAT(len) (len)
+#define D3DTRIFLAG_ODD                          0x0000001eL
+#define D3DTRIFLAG_EVEN                         0x0000001fL
+
+#define D3DTRIFLAG_EDGEENABLE1                  0x00000100L
+#define D3DTRIFLAG_EDGEENABLE2                  0x00000200L
+#define D3DTRIFLAG_EDGEENABLE3                  0x00000400L
+#define D3DTRIFLAG_EDGEENABLETRIANGLE \
+        (D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3)
+
+typedef struct _D3DTRIANGLE {
+  union {
+    WORD v1;
+    WORD wV1;
+  } DUMMYUNIONNAME1;
+  union {
+    WORD v2;
+    WORD wV2;
+  } DUMMYUNIONNAME2;
+  union {
+    WORD v3;
+    WORD wV3;
+  } DUMMYUNIONNAME3;
+  WORD     wFlags;
+} D3DTRIANGLE, *LPD3DTRIANGLE;
+
+typedef struct _D3DLINE {
+  union {
+    WORD v1;
+    WORD wV1;
+  } DUMMYUNIONNAME1;
+  union {
+    WORD v2;
+    WORD wV2;
+  } DUMMYUNIONNAME2;
+} D3DLINE, *LPD3DLINE;
+
+typedef struct _D3DSPAN {
+  WORD wCount;
+  WORD wFirst;
+} D3DSPAN, *LPD3DSPAN;
+
+typedef struct _D3DPOINT {
+  WORD wCount;
+  WORD wFirst;
+} D3DPOINT, *LPD3DPOINT;
+
+typedef struct _D3DBRANCH {
+  DWORD dwMask;
+  DWORD dwValue;
+  BOOL  bNegate;
+  DWORD dwOffset;
+} D3DBRANCH, *LPD3DBRANCH;
+
+typedef struct _D3DSTATUS {
+  DWORD   dwFlags;
+  DWORD   dwStatus;
+  D3DRECT drExtent;
+} D3DSTATUS, *LPD3DSTATUS;
+
+#define D3DSETSTATUS_STATUS   0x00000001L
+#define D3DSETSTATUS_EXTENTS  0x00000002L
+#define D3DSETSTATUS_ALL      (D3DSETSTATUS_STATUS | D3DSETSTATUS_EXTENTS)
+
+typedef struct _D3DCLIPSTATUS {
+  DWORD dwFlags;
+  DWORD dwStatus;
+  float minx, maxx;
+  float miny, maxy;
+  float minz, maxz;
+} D3DCLIPSTATUS, *LPD3DCLIPSTATUS;
+
+#define D3DCLIPSTATUS_STATUS        0x00000001L
+#define D3DCLIPSTATUS_EXTENTS2      0x00000002L
+#define D3DCLIPSTATUS_EXTENTS3      0x00000004L
+
+typedef struct {
+  DWORD        dwSize;
+  DWORD        dwTrianglesDrawn;
+  DWORD        dwLinesDrawn;
+  DWORD        dwPointsDrawn;
+  DWORD        dwSpansDrawn;
+  DWORD        dwVerticesProcessed;
+} D3DSTATS, *LPD3DSTATS;
+
+#define D3DEXECUTE_CLIPPED       0x00000001l
+#define D3DEXECUTE_UNCLIPPED     0x00000002l
+
+typedef struct _D3DEXECUTEDATA {
+  DWORD     dwSize;
+  DWORD     dwVertexOffset;
+  DWORD     dwVertexCount;
+  DWORD     dwInstructionOffset;
+  DWORD     dwInstructionLength;
+  DWORD     dwHVertexOffset;
+  D3DSTATUS dsStatus;
+} D3DEXECUTEDATA, *LPD3DEXECUTEDATA;
+
+#define D3DPAL_FREE 0x00
+#define D3DPAL_READONLY 0x40
+#define D3DPAL_RESERVED 0x80
+
+typedef struct _D3DVERTEXBUFFERDESC {
+  DWORD dwSize;
+  DWORD dwCaps;
+  DWORD dwFVF;
+  DWORD dwNumVertices;
+} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC;
+
+#define D3DVBCAPS_SYSTEMMEMORY      0x00000800l
+#define D3DVBCAPS_WRITEONLY         0x00010000l
+#define D3DVBCAPS_OPTIMIZED         0x80000000l
+#define D3DVBCAPS_DONOTCLIP         0x00000001l
+
+#define D3DVOP_LIGHT       (1 << 10)
+#define D3DVOP_TRANSFORM   (1 << 0)
+#define D3DVOP_CLIP        (1 << 2)
+#define D3DVOP_EXTENTS     (1 << 3)
+
+#define D3DMAXNUMVERTICES    ((1<<16) - 1)
+
+#define D3DMAXNUMPRIMITIVES  ((1<<16) - 1)
+
+#define D3DPV_DONOTCOPYDATA (1 << 0)
+
+#define D3DFVF_RESERVED0        0x001
+#define D3DFVF_POSITION_MASK    0x00E
+#define D3DFVF_XYZ              0x002
+#define D3DFVF_XYZRHW           0x004
+#define D3DFVF_XYZB1            0x006
+#define D3DFVF_XYZB2            0x008
+#define D3DFVF_XYZB3            0x00a
+#define D3DFVF_XYZB4            0x00c
+#define D3DFVF_XYZB5            0x00e
+
+#define D3DFVF_NORMAL           0x010
+#define D3DFVF_RESERVED1        0x020
+#define D3DFVF_DIFFUSE          0x040
+#define D3DFVF_SPECULAR         0x080
+#define D3DFVF_TEXCOUNT_MASK    0xf00
+#define D3DFVF_TEXCOUNT_SHIFT   8
+#define D3DFVF_TEX0             0x000
+#define D3DFVF_TEX1             0x100
+#define D3DFVF_TEX2             0x200
+#define D3DFVF_TEX3             0x300
+#define D3DFVF_TEX4             0x400
+#define D3DFVF_TEX5             0x500
+#define D3DFVF_TEX6             0x600
+#define D3DFVF_TEX7             0x700
+#define D3DFVF_TEX8             0x800
+
+#define D3DFVF_RESERVED2        0xf000
+
+#define D3DFVF_VERTEX ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 )
+#define D3DFVF_LVERTEX ( D3DFVF_XYZ | D3DFVF_RESERVED1 | D3DFVF_DIFFUSE | \
+                         D3DFVF_SPECULAR | D3DFVF_TEX1 )
+#define D3DFVF_TLVERTEX ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \
+                          D3DFVF_TEX1 )
+
+typedef struct _D3DDP_PTRSTRIDE {
+  LPVOID lpvData;
+  DWORD  dwStride;
+} D3DDP_PTRSTRIDE;
+
+#define D3DDP_MAXTEXCOORD 8
+
+typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA  {
+  D3DDP_PTRSTRIDE position;
+  D3DDP_PTRSTRIDE normal;
+  D3DDP_PTRSTRIDE diffuse;
+  D3DDP_PTRSTRIDE specular;
+  D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD];
+} D3DDRAWPRIMITIVESTRIDEDDATA ,*LPD3DDRAWPRIMITIVESTRIDEDDATA;
+
+#define D3DVIS_INSIDE_FRUSTUM       0
+#define D3DVIS_INTERSECT_FRUSTUM    1
+#define D3DVIS_OUTSIDE_FRUSTUM      2
+#define D3DVIS_INSIDE_LEFT          0
+#define D3DVIS_INTERSECT_LEFT       (1 << 2)
+#define D3DVIS_OUTSIDE_LEFT         (2 << 2)
+#define D3DVIS_INSIDE_RIGHT         0
+#define D3DVIS_INTERSECT_RIGHT      (1 << 4)
+#define D3DVIS_OUTSIDE_RIGHT        (2 << 4)
+#define D3DVIS_INSIDE_TOP           0
+#define D3DVIS_INTERSECT_TOP        (1 << 6)
+#define D3DVIS_OUTSIDE_TOP          (2 << 6)
+#define D3DVIS_INSIDE_BOTTOM        0
+#define D3DVIS_INTERSECT_BOTTOM     (1 << 8)
+#define D3DVIS_OUTSIDE_BOTTOM       (2 << 8)
+#define D3DVIS_INSIDE_NEAR          0
+#define D3DVIS_INTERSECT_NEAR       (1 << 10)
+#define D3DVIS_OUTSIDE_NEAR         (2 << 10)
+#define D3DVIS_INSIDE_FAR           0
+#define D3DVIS_INTERSECT_FAR        (1 << 12)
+#define D3DVIS_OUTSIDE_FAR          (2 << 12)
+
+#define D3DVIS_MASK_FRUSTUM         (3 << 0)
+#define D3DVIS_MASK_LEFT            (3 << 2)
+#define D3DVIS_MASK_RIGHT           (3 << 4)
+#define D3DVIS_MASK_TOP             (3 << 6)
+#define D3DVIS_MASK_BOTTOM          (3 << 8)
+#define D3DVIS_MASK_NEAR            (3 << 10)
+#define D3DVIS_MASK_FAR             (3 << 12)
+
+#define D3DDEVINFOID_TEXTUREMANAGER    1
+#define D3DDEVINFOID_D3DTEXTUREMANAGER 2
+#define D3DDEVINFOID_TEXTURING         3
+
+typedef enum _D3DSTATEBLOCKTYPE
+{
+    D3DSBT_ALL           = 1,
+    D3DSBT_PIXELSTATE    = 2,
+    D3DSBT_VERTEXSTATE   = 3,
+    D3DSBT_FORCE_DWORD   = 0xffffffff
+} D3DSTATEBLOCKTYPE;
+
+typedef enum _D3DVERTEXBLENDFLAGS
+{
+    D3DVBLEND_DISABLE  = 0,
+    D3DVBLEND_1WEIGHT  = 1,
+    D3DVBLEND_2WEIGHTS = 2,
+    D3DVBLEND_3WEIGHTS = 3,
+} D3DVERTEXBLENDFLAGS;
+
+typedef enum _D3DTEXTURETRANSFORMFLAGS {
+    D3DTTFF_DISABLE         = 0,
+    D3DTTFF_COUNT1          = 1,
+    D3DTTFF_COUNT2          = 2,
+    D3DTTFF_COUNT3          = 3,
+    D3DTTFF_COUNT4          = 4,
+    D3DTTFF_PROJECTED       = 256,
+    D3DTTFF_FORCE_DWORD     = 0x7fffffff
+} D3DTEXTURETRANSFORMFLAGS;
+
+#define D3DFVF_TEXTUREFORMAT2 0
+#define D3DFVF_TEXTUREFORMAT1 3
+#define D3DFVF_TEXTUREFORMAT3 1
+#define D3DFVF_TEXTUREFORMAT4 2
+
+#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
+#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
+#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
+#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
+
+#endif
diff --git a/reactos/include/ddentry.h b/reactos/include/ddentry.h
new file mode 100644 (file)
index 0000000..c3e9578
--- /dev/null
@@ -0,0 +1,357 @@
+/*
+ *  DirectDraw GDI32.dll interface definitions
+ *  Copyright (C) 2003 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <ddk\ddrawi.h>
+#include <ddk\winddi.h>
+#include <ddk\d3dhal.h>
+BOOL STDCALL DdCreateDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+HDC hdc
+);
+BOOL STDCALL DdQueryDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+LPDDHALINFO pHalInfo,
+LPDDHAL_DDCALLBACKS pDDCallbacks,
+LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
+LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
+LPD3DHAL_CALLBACKS pD3dCallbacks,
+LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
+LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
+LPDDSURFACEDESC pD3dTextureFormats,
+LPDWORD pdwFourCC,
+LPVIDMEM pvmList
+);
+BOOL STDCALL DdDeleteDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal
+);
+BOOL STDCALL DdCreateSurfaceObject( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+BOOL bPrimarySurface
+);
+BOOL STDCALL DdDeleteSurfaceObject( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+);
+BOOL STDCALL DdResetVisrgn( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+HWND hWnd
+);
+BOOL STDCALL DdGetDC( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+LPPALETTEENTRY pColorTable
+);
+BOOL STDCALL DdReleaseDC( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+);
+HBITMAP STDCALL DdCreateDIBSection( 
+HDC hdc,
+CONST BITMAPINFO *pbmi,
+UINT iUsage,
+VOID **ppvBits,
+HANDLE hSectionApp,
+DWORD dwOffset
+);
+BOOL STDCALL DdReenableDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+BOOL *pbNewMode
+);
+BOOL STDCALL DdAttachSurface( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
+);
+VOID STDCALL DdUnattachSurface( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached
+);
+ULONG STDCALL DdQueryDisplaySettingsUniqueness(VOID);
+HANDLE STDCALL DdGetDxHandle( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+BOOL bRelease
+);
+BOOL STDCALL DdSetGammaRamp( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+HDC hdc,
+LPVOID lpGammaRamp
+);
+DWORD STDCALL DdSwapTextureHandles( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
+LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
+);
+DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
+ULONG_PTR ulHandle,
+SIZE_T *pdwSizeOfPtr1,
+PVOID pvPtr1,
+SIZE_T *pdwSizeOfPtr2,
+PVOID pvPtr2);
+BOOL STDCALL D3DContextCreate( 
+HANDLE hDirectDrawLocal,
+HANDLE hSurfColor,
+HANDLE hSurfZ,
+D3DNTHAL_CONTEXTCREATEI *pdcci
+);
+DWORD STDCALL D3DContextDestroy( 
+LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+);
+DWORD STDCALL D3DContextDestroyAll(VOID);
+DWORD STDCALL D3DValidateTextureStageState( 
+LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+);
+DWORD STDCALL D3DDrawPrimitives2( 
+HANDLE hCmdBuf,
+HANDLE hVBuf,
+LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+FLATPTR *pfpVidMemCmd,
+DWORD *pdwSizeCmd,
+FLATPTR *pfpVidMemVtx,
+DWORD *pdwSizeVtx
+);
+DWORD STDCALL D3DGetDriverState( 
+PDD_GETDRIVERSTATEDATA pdata
+);
+DWORD STDCALL DdAddAttachedSurface( 
+HANDLE hSurface,
+HANDLE hSurfaceAttached,
+PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
+);
+DWORD STDCALL DdAlphaBlt(
+HANDLE hSurfaceDest, 
+HANDLE hSurfaceSrc,
+PDD_BLTDATA puBltData);
+BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
+HANDLE hSurfaceFrom,
+HANDLE hSurfaceTo
+);
+DWORD STDCALL DdBeginMoCompFrame( 
+HANDLE hMoComp,
+PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
+);
+DWORD STDCALL DdBlt( 
+HANDLE hSurfaceDest,
+HANDLE hSurfaceSrc,
+PDD_BLTDATA puBltData
+);
+DWORD STDCALL DdCanCreateSurface( 
+HANDLE hDirectDraw,
+PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+);
+DWORD STDCALL DdCanCreateD3DBuffer( 
+HANDLE hDirectDraw,
+PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+);
+DWORD STDCALL DdColorControl( 
+HANDLE hSurface,
+PDD_COLORCONTROLDATA puColorControlData
+);
+HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
+HDC hdc
+);
+DWORD STDCALL DdCreateSurface( 
+HANDLE hDirectDraw,
+HANDLE *hSurface,
+DDSURFACEDESC *puSurfaceDescription,
+DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+DD_SURFACE_LOCAL *puSurfaceLocalData,
+DD_SURFACE_MORE *puSurfaceMoreData,
+DD_CREATESURFACEDATA *puCreateSurfaceData,
+HANDLE *puhSurface
+);
+DWORD STDCALL DdCreateD3DBuffer( 
+HANDLE hDirectDraw,
+HANDLE *hSurface,
+DDSURFACEDESC *puSurfaceDescription,
+DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+DD_SURFACE_LOCAL *puSurfaceLocalData,
+DD_SURFACE_MORE *puSurfaceMoreData,
+DD_CREATESURFACEDATA *puCreateSurfaceData,
+HANDLE *puhSurface
+);
+HANDLE STDCALL DdCreateMoComp( 
+HANDLE hDirectDraw,
+PDD_CREATEMOCOMPDATA puCreateMoCompData
+);
+HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+HANDLE hSurface,
+PDD_SURFACE_LOCAL puSurfaceLocal,
+PDD_SURFACE_MORE puSurfaceMore,
+PDD_SURFACE_GLOBAL puSurfaceGlobal,
+BOOL bComplete
+);
+BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal
+);
+BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
+HANDLE hSurface
+);
+DWORD STDCALL DdDestroyMoComp( 
+HANDLE hMoComp,
+PDD_DESTROYMOCOMPDATA puBeginFrameData
+);
+DWORD STDCALL DdDestroySurface( 
+HANDLE hSurface,
+BOOL bRealDestroy
+);
+DWORD STDCALL DdDestroyD3DBuffer( 
+HANDLE hSurface
+);
+DWORD STDCALL DdEndMoCompFrame( 
+HANDLE hMoComp,
+PDD_ENDMOCOMPFRAMEDATA puEndFrameData
+);
+DWORD STDCALL DdFlip( 
+HANDLE hSurfaceCurrent,
+HANDLE hSurfaceTarget,
+HANDLE hSurfaceCurrentLeft,
+HANDLE hSurfaceTargetLeft,
+PDD_FLIPDATA puFlipData
+);
+DWORD STDCALL DdFlipToGDISurface( 
+HANDLE hDirectDraw,
+PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
+);
+DWORD STDCALL DdGetAvailDriverMemory( 
+HANDLE hDirectDraw,
+PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
+);
+DWORD STDCALL DdGetBltStatus( 
+HANDLE hSurface,
+PDD_GETBLTSTATUSDATA puGetBltStatusData
+);
+HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+PALETTEENTRY *puColorTable
+);
+DWORD STDCALL DdGetDriverInfo( 
+HANDLE hDirectDraw,
+PDD_GETDRIVERINFODATA puGetDriverInfoData
+);
+DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
+HANDLE hDirectDraw,
+HANDLE hSurface,
+BOOL bRelease
+);
+DWORD STDCALL DdGetFlipStatus( 
+HANDLE hSurface,
+PDD_GETFLIPSTATUSDATA puGetFlipStatusData
+);
+DWORD STDCALL DdGetInternalMoCompInfo( 
+HANDLE hDirectDraw,
+PDD_GETINTERNALMOCOMPDATA puGetInternalData
+);
+DWORD STDCALL DdGetMoCompBuffInfo( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
+);
+DWORD STDCALL DdGetMoCompGuids( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
+);
+DWORD STDCALL DdGetMoCompFormats( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
+);
+DWORD STDCALL DdGetScanLine( 
+HANDLE hDirectDraw,
+PDD_GETSCANLINEDATA puGetScanLineData
+);
+DWORD STDCALL DdLock( 
+HANDLE hSurface,
+PDD_LOCKDATA puLockData,
+HDC hdcClip
+);
+DWORD STDCALL DdLockD3D( 
+HANDLE hSurface,
+PDD_LOCKDATA puLockData
+);
+BOOL STDCALL DdDdQueryDirectDrawObject(  /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+DD_HALINFO *pHalInfo,
+DWORD *pCallBackFlags,
+LPD3DNTHAL_CALLBACKS puD3dCallbacks,
+LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
+LPDDSURFACEDESC puD3dTextureFormats,
+DWORD *puNumHeaps,
+VIDEOMEMORY *puvmList,
+DWORD *puNumFourCC,
+DWORD *puFourCC
+);
+DWORD STDCALL DdQueryMoCompStatus( 
+HANDLE hMoComp,
+PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
+);
+BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+BOOL *pubNewMode
+);
+BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
+HANDLE hSurface
+);
+DWORD STDCALL DdRenderMoComp( 
+HANDLE hMoComp,
+PDD_RENDERMOCOMPDATA puRenderMoCompData
+);
+BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+HWND hwnd
+);
+DWORD STDCALL DdSetColorKey( 
+HANDLE hSurface,
+PDD_SETCOLORKEYDATA puSetColorKeyData
+);
+DWORD STDCALL DdSetExclusiveMode( 
+HANDLE hDirectDraw,
+PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
+);
+BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
+HANDLE hDirectDraw,
+HDC hdc,
+LPVOID lpGammaRamp
+);
+DWORD STDCALL DdCreateSurfaceEx( 
+HANDLE hDirectDraw,
+HANDLE hSurface,
+DWORD dwSurfaceHandle
+);
+DWORD STDCALL DdSetOverlayPosition( 
+HANDLE hSurfaceSource,
+HANDLE hSurfaceDestination,
+PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
+);
+VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+HANDLE hSurfaceAttached
+);
+DWORD STDCALL DdUnlock( 
+HANDLE hSurface,
+PDD_UNLOCKDATA puUnlockData
+);
+DWORD STDCALL DdUnlockD3D( 
+HANDLE hSurface,
+PDD_UNLOCKDATA puUnlockData
+);
+DWORD STDCALL DdUpdateOverlay( 
+HANDLE hSurfaceDestination,
+HANDLE hSurfaceSource,
+PDD_UPDATEOVERLAYDATA puUpdateOverlayData
+);
+DWORD STDCALL DdWaitForVerticalBlank( 
+HANDLE hDirectDraw,
+PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
+);
diff --git a/reactos/include/ddk/d3dhal.h b/reactos/include/ddk/d3dhal.h
new file mode 100644 (file)
index 0000000..db1f0b7
--- /dev/null
@@ -0,0 +1,615 @@
+/*
+ * Direct3D driver interface
+ * (DirectX 7 version)
+ *
+ * Copyright (C) 2001 Ove Kaaven
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+#ifndef __WINE_D3DHAL_H
+#define __WINE_D3DHAL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ddk\ddrawi.h>
+#include <d3d.h>
+
+/*****************************************************************************
+ * device info structures
+ */
+typedef struct _D3DDeviceDesc_V1 {
+  DWORD                        dwSize;
+  DWORD                        dwFlags;
+  D3DCOLORMODEL                dcmColorModel;
+  DWORD                        dwDevCaps;
+  D3DTRANSFORMCAPS     dtcTransformCaps;
+  BOOL                 bClipping;
+  D3DLIGHTINGCAPS      dlcLightingCaps;
+  D3DPRIMCAPS          dpcLineCaps;
+  D3DPRIMCAPS          dpcTriCaps;
+  DWORD                        dwDeviceRenderBitDepth;
+  DWORD                        dwDeviceZBufferBitDepth;
+  DWORD                        dwMaxBufferSize;
+  DWORD                        dwMaxVertexCount;
+} D3DDEVICEDESC_V1,*LPD3DDEVICEDESC_V1;
+
+/* this is to allow keeping the bulk of our OpenGL code out of x11drv */
+#define D3DDD_WINE_OPENGL_DEVICE 0x00008000
+
+typedef struct _D3DHAL_GLOBALDRIVERDATA {
+  DWORD                        dwSize;
+  D3DDEVICEDESC_V1     hwCaps;
+  DWORD                        dwNumVertices;
+  DWORD                        dwNumClipVertices;
+  DWORD                        dwNumTextureFormats;
+  LPDDSURFACEDESC      lpTextureFormats;
+} D3DHAL_GLOBALDRIVERDATA,*LPD3DHAL_GLOBALDRIVERDATA;
+
+typedef struct _D3DHAL_D3DEXTENDEDCAPS {
+  DWORD                        dwSize;
+  /* DirectX 5 */
+  DWORD                        dwMinTextureWidth, dwMaxTextureWidth;
+  DWORD                        dwMinTextureHeight, dwMaxTextureHeight;
+  DWORD                        dwMinStippleWidth, dwMaxStippleWidth;
+  DWORD                        dwMinStippleHeight, dwMaxStippleHeight;
+  /* DirectX 6 */
+  DWORD                        dwMaxTextureRepeat;
+  DWORD                        dwMaxTextureAspectRatio;
+  DWORD                        dwMaxAnisotropy;
+  D3DVALUE             dvGuardBandLeft;
+  D3DVALUE             dvGuardBandTop;
+  D3DVALUE             dvGuardBandRight;
+  D3DVALUE             dvGuardBandBottom;
+  D3DVALUE             dvExtentsAdjust;
+  DWORD                        dwStencilCaps;
+  DWORD                        dwFVFCaps;
+  DWORD                        dwTextureOpCaps;
+  WORD                 wMaxTextureBlendStages;
+  WORD                 wMaxSimultaneousTextures;
+  /* DirectX 7 */
+  DWORD                        dwMaxActiveLights;
+  D3DVALUE             dvMaxVertexW;
+  WORD                 wMaxUserClipPlanes;
+  WORD                 wMaxVertexBlendMatrices;
+  DWORD                        dwVertexProcessingCaps;
+  DWORD                        dwReserved1;
+  DWORD                        dwReserved2;
+  DWORD                        dwReserved3;
+  DWORD                        dwReserved4;
+} D3DHAL_D3DEXTENDEDCAPS,*LPD3DHAL_D3DEXTENDEDCAPS;
+
+/*****************************************************************************
+ * d3d->driver callbacks
+ */
+typedef struct _D3DHAL_CONTEXTCREATEDATA       *LPD3DHAL_CONTEXTCREATEDATA;
+typedef struct _D3DHAL_CONTEXTDESTROYDATA      *LPD3DHAL_CONTEXTDESTROYDATA;
+typedef struct _D3DHAL_CONTEXTDESTROYALLDATA   *LPD3DHAL_CONTEXTDESTROYALLDATA;
+typedef struct _D3DHAL_SCENECAPTUREDATA                *LPD3DHAL_SCENECAPTUREDATA;
+typedef struct _D3DHAL_RENDERSTATEDATA         *LPD3DHAL_RENDERSTATEDATA;
+typedef struct _D3DHAL_RENDERPRIMITIVEDATA     *LPD3DHAL_RENDERPRIMITIVEDATA;
+typedef struct _D3DHAL_TEXTURECREATEDATA       *LPD3DHAL_TEXTURECREATEDATA;
+typedef struct _D3DHAL_TEXTUREDESTROYDATA      *LPD3DHAL_TEXTUREDESTROYDATA;
+typedef struct _D3DHAL_TEXTURESWAPDATA         *LPD3DHAL_TEXTURESWAPDATA;
+typedef struct _D3DHAL_TEXTUREGETSURFDATA      *LPD3DHAL_TEXTUREGETSURFDATA;
+typedef struct _D3DHAL_GETSTATEDATA            *LPD3DHAL_GETSTATEDATA;
+
+typedef DWORD (PASCAL *LPD3DHAL_CONTEXTCREATECB)    (LPD3DHAL_CONTEXTCREATEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYCB)   (LPD3DHAL_CONTEXTDESTROYDATA);
+typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA);
+typedef DWORD (PASCAL *LPD3DHAL_SCENECAPTURECB)            (LPD3DHAL_SCENECAPTUREDATA);
+typedef DWORD (PASCAL *LPD3DHAL_RENDERSTATECB)     (LPD3DHAL_RENDERSTATEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_RENDERPRIMITIVECB)  (LPD3DHAL_RENDERPRIMITIVEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_TEXTURECREATECB)    (LPD3DHAL_TEXTURECREATEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_TEXTUREDESTROYCB)   (LPD3DHAL_TEXTUREDESTROYDATA);
+typedef DWORD (PASCAL *LPD3DHAL_TEXTURESWAPCB)     (LPD3DHAL_TEXTURESWAPDATA);
+typedef DWORD (PASCAL *LPD3DHAL_TEXTUREGETSURFCB)   (LPD3DHAL_TEXTUREGETSURFDATA);
+typedef DWORD (PASCAL *LPD3DHAL_GETSTATECB)        (LPD3DHAL_GETSTATEDATA);
+
+typedef struct _D3DHAL_CALLBACKS {
+  DWORD                                dwSize;
+  LPD3DHAL_CONTEXTCREATECB     ContextCreate;
+  LPD3DHAL_CONTEXTDESTROYCB    ContextDestroy;
+  LPD3DHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
+  LPD3DHAL_SCENECAPTURECB      SceneCapture;
+  LPVOID                       lpReserved10;
+  LPVOID                       lpReserved11;
+  LPD3DHAL_RENDERSTATECB       RenderState;
+  LPD3DHAL_RENDERPRIMITIVECB   RenderPrimitive;
+  DWORD                                dwReserved;
+  LPD3DHAL_TEXTURECREATECB     TextureCreate;
+  LPD3DHAL_TEXTUREDESTROYCB    TextureDestroy;
+  LPD3DHAL_TEXTURESWAPCB       TextureSwap;
+  LPD3DHAL_TEXTUREGETSURFCB    TextureGetSurf;
+  /* now why did MS create CALLBACKS2 and CALLBACKS3 structures if
+   * all these reserved fields were available? we may never know */
+  LPVOID                       lpReserved12;
+  LPVOID                       lpReserved13;
+  LPVOID                       lpReserved14;
+  LPVOID                       lpReserved15;
+  LPVOID                       lpReserved16;
+  LPVOID                       lpReserved17;
+  LPVOID                       lpReserved18;
+  LPVOID                       lpReserved19;
+  LPVOID                       lpReserved20;
+  LPVOID                       lpReserved21;
+  LPD3DHAL_GETSTATECB          GetState;
+  DWORD                                dwReserved0;
+  DWORD                                dwReserved1;
+  DWORD                                dwReserved2;
+  DWORD                                dwReserved3;
+  DWORD                                dwReserved4;
+  DWORD                                dwReserved5;
+  DWORD                                dwReserved6;
+  DWORD                                dwReserved7;
+  DWORD                                dwReserved8;
+  DWORD                                dwReserved9;
+} D3DHAL_CALLBACKS,*LPD3DHAL_CALLBACKS;
+
+typedef struct _D3DHAL_SETRENDERTARGETDATA             *LPD3DHAL_SETRENDERTARGETDATA;
+typedef struct _D3DHAL_CLEARDATA                       *LPD3DHAL_CLEARDATA;
+typedef struct _D3DHAL_DRAWONEPRIMITIVEDATA            *LPD3DHAL_DRAWONEPRIMITIVEDATA;
+typedef struct _D3DHAL_DRAWONEINDEXEDPRIMITIVEDATA     *LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA;
+typedef struct _D3DHAL_DRAWPRIMITIVESDATA              *LPD3DHAL_DRAWPRIMITIVESDATA;
+
+typedef DWORD (PASCAL *LPD3DHAL_SETRENDERTARGETCB)       (LPD3DHAL_SETRENDERTARGETDATA);
+typedef DWORD (PASCAL *LPD3DHAL_CLEARCB)                 (LPD3DHAL_CLEARDATA);
+typedef DWORD (PASCAL *LPD3DHAL_DRAWONEPRIMITIVECB)      (LPD3DHAL_DRAWONEPRIMITIVEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB)(LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVESCB)        (LPD3DHAL_DRAWPRIMITIVESDATA);
+
+typedef struct _D3DHAL_CALLBACKS2 {
+  DWORD                                        dwSize;
+  DWORD                                        dwFlags;
+  LPD3DHAL_SETRENDERTARGETCB           SetRenderTarget;
+  LPD3DHAL_CLEARCB                     Clear;
+  LPD3DHAL_DRAWONEPRIMITIVECB          DrawOnePrimitive;
+  LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB   DrawOneIndexedPrimitive;
+  LPD3DHAL_DRAWPRIMITIVESCB            DrawPrimitives;
+} D3DHAL_CALLBACKS2,*LPD3DHAL_CALLBACKS2;
+
+typedef struct _D3DHAL_CLEAR2DATA                      *LPD3DHAL_CLEAR2DATA;
+typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA   *LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA;
+typedef struct _D3DHAL_DRAWPRIMITIVES2DATA             *LPD3DHAL_DRAWPRIMITIVES2DATA;
+
+typedef DWORD (PASCAL *LPD3DHAL_CLEAR2CB)                (LPD3DHAL_CLEAR2DATA);
+typedef DWORD (PASCAL *LPD3DHAL_VALIDATETEXTURESTAGESTATECB)(LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA);
+typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVES2CB)       (LPD3DHAL_DRAWPRIMITIVES2DATA);
+
+typedef struct _D3DHAL_CALLBACKS3 {
+  DWORD                                        dwSize;
+  DWORD                                        dwFlags;
+  LPD3DHAL_CLEAR2CB                    Clear2;
+  LPVOID                               lpvReserved;
+  LPD3DHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
+  LPD3DHAL_DRAWPRIMITIVES2CB           DrawPrimitives2;
+} D3DHAL_CALLBACKS3,*LPD3DHAL_CALLBACKS3;
+
+/*****************************************************************************
+ * parameter structures
+ */
+typedef struct _D3DHAL_CONTEXTCREATEDATA {
+  union {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDDGbl; /* pre-DirectX 7 */
+    LPDDRAWI_DIRECTDRAW_LCL    lpDDLcl; /* DirectX 7 */
+  } DUMMYUNIONNAME1;
+  union {
+    LPDIRECTDRAWSURFACE                lpDDS;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSLcl; /* DirectX 7 */
+  } DUMMYUNIONNAME2;
+  union {
+    LPDIRECTDRAWSURFACE                lpDDSZ;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSZLcl; /* DirectX 7 */
+  } DUMMYUNIONNAME3;
+  union {
+    DWORD                      dwPID;
+    ULONG_PTR                  dwrstates;
+  } DUMMYUNIONNAME4;
+  ULONG_PTR                    dwhContext;
+  HRESULT                      ddrval;
+} D3DHAL_CONTEXTCREATEDATA;
+
+typedef struct _D3DHAL_CONTEXTDESTROYDATA {
+  ULONG_PTR                    dwhContext;
+  HRESULT                      ddrval;
+} D3DHAL_CONTEXTDESTROYDATA;
+
+typedef struct _D3DHAL_CONTEXTDESTROYALLDATA {
+  DWORD                                dwPID;
+  HRESULT                      ddrval;
+} D3DHAL_CONTEXTDESTROYALLDATA;
+
+typedef struct _D3DHAL_SCENECAPTUREDATA {
+  ULONG_PTR                    dwhContext;
+  DWORD                                dwFlag;
+  HRESULT                      ddrval;
+} D3DHAL_SCENECAPTUREDATA;
+
+#define D3DHAL_SCENE_CAPTURE_START     0x00000000
+#define D3DHAL_SCENE_CAPTURE_END       0x00000001
+
+typedef struct _D3DHAL_SETRENDERTARGETDATA {
+  ULONG_PTR                    dwhContext;
+  union {
+    LPDIRECTDRAWSURFACE                lpDDS;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSLcl;
+  } DUMMYUNIONNAME1;
+  union {
+    LPDIRECTDRAWSURFACE                lpDDSZ;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSZLcl;
+  } DUMMYUNIONNAME2;
+  HRESULT                      ddrval;
+} D3DHAL_SETRENDERTARGETDATA;
+
+typedef struct _D3DHAL_DRAWPRIMITIVES2DATA {
+  ULONG_PTR                    dwhContext;
+  DWORD                                dwFlags;
+  DWORD                                dwVertexType;
+  LPDDRAWI_DDRAWSURFACE_LCL    lpDDCommands;
+  DWORD                                dwCommandOffset;
+  DWORD                                dwCommandLength;
+  union {
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDVertex;
+    LPVOID                     lpVertices;
+  } DUMMYUNIONNAME1;
+  DWORD                                dwVertexOffset;
+  DWORD                                dwVertexLength;
+  DWORD                                dwReqVertexBufSize;
+  DWORD                                dwReqCommandBufSize;
+  LPDWORD                      lpdwRStates;
+  union {
+    DWORD                      dwVertexSize;
+    HRESULT                    ddrval;
+  } DUMMYUNIONNAME2;
+  DWORD                                dwErrorOffset;
+} D3DHAL_DRAWPRIMITIVES2DATA;
+
+#define D3DHALDP2_USERMEMVERTICES      0x00000001
+#define D3DHALDP2_EXECUTEBUFFER                0x00000002
+#define D3DHALDP2_SWAPVERTEXBUFFER     0x00000004
+#define D3DHALDP2_SWAPCOMMANDBUFFER    0x00000008
+#define D3DHALDP2_REQVERTEXBUFSIZE     0x00000010
+#define D3DHALDP2_REQCOMMANDBUFSIZE    0x00000020
+#define D3DHALDP2_VIDMEMVERTEXBUF      0x00000040
+#define D3DHALDP2_VIDMEMCOMMANDBUF     0x00000080
+
+/*****************************************************************************
+ * DrawPrimitives2 command structures
+ */
+typedef struct _D3DHAL_DP2COMMAND {
+  BYTE bCommand;
+  BYTE bReserved;
+  union {
+    WORD wPrimitiveCount;
+    WORD wStateCount;
+  } DUMMYUNIONNAME;
+} D3DHAL_DP2COMMAND,*LPD3DHAL_DP2COMMAND;
+
+typedef enum _D3DHAL_DP2OPERATION {
+  D3DDP2OP_POINTS              = 1,
+  D3DDP2OP_INDEXEDLINELIST     = 2,
+  D3DDP2OP_INDEXEDTRIANGLELIST = 3,
+  D3DDP2OP_RESERVED0           = 4,
+  D3DDP2OP_RENDERSTATE         = 8,
+  D3DDP2OP_LINELIST            = 15,
+  D3DDP2OP_LINESTRIP           = 16,
+  D3DDP2OP_INDEXEDLINESTRIP    = 17,
+  D3DDP2OP_TRIANGLELIST                = 18,
+  D3DDP2OP_TRIANGLESTRIP       = 19,
+  D3DDP2OP_INDEXEDTRIANGLESTRIP        = 20,
+  D3DDP2OP_TRIANGLEFAN         = 21,
+  D3DDP2OP_INDEXEDTRIANGLEFAN  = 22,
+  D3DDP2OP_TRIANGLEFAN_IMM     = 23,
+  D3DDP2OP_LINELIST_IMM                = 24,
+  D3DDP2OP_TEXTURESTAGESTATE   = 25,
+  D3DDP2OP_INDEXEDTRIANGLELIST2        = 26,
+  D3DDP2OP_INDEXEDLINELIST2    = 27,
+  D3DDP2OP_VIEWPORTINFO                = 28,
+  D3DDP2OP_WINFO               = 29,
+  /* pre-DirectX 7 interfaces */
+  D3DDP2OP_SETPALETTE          = 30,
+  D3DDP2OP_UPDATEPALETTE       = 31,
+  /* DirectX 7 interfaces */
+  D3DDP2OP_ZRANGE              = 32,
+  D3DDP2OP_SETMATERIAL         = 33,
+  D3DDP2OP_SETLIGHT            = 34,
+  D3DDP2OP_CREATELIGHT         = 35,
+  D3DDP2OP_SETTRANSFORM                = 36,
+  D3DDP2OP_EXT                 = 37,
+  D3DDP2OP_TEXBLT              = 38,
+  D3DDP2OP_STATESET            = 39,
+  D3DDP2OP_SETPRIORITY         = 40,
+  /* all interfaces */
+  D3DDP2OP_SETRENDERTARGET     = 41,
+  D3DDP2OP_CLEAR               = 42,
+  /* DirectX 7 interfaces */
+  D3DDP2OP_SETTEXLOD           = 43,
+  D3DPP2OP_SETCLIPPLANE                = 44
+} D3DHAL_DP2OPERATION;
+
+/* point primitives */
+
+typedef struct _D3DHAL_POINTS {
+  WORD wCount;
+  WORD wVStart;
+} D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
+
+/* line primitives */
+
+typedef struct _D3DHAL_DP2STARTVERTEX {
+  WORD wVStart;
+} D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
+
+typedef struct _D3DHAL_DP2LINELIST {
+  WORD wVStart;
+} D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
+
+typedef struct _D3DHAL_DP2INDEXEDLINELIST {
+  WORD wV1;
+  WORD wV2;
+} D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
+
+typedef struct _D3DHAL_DP2LINESTRIP {
+  WORD wVStart;
+} D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
+
+typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
+  WORD wV[2];
+} D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
+
+/* triangle primitives */
+
+typedef struct _D3DHAL_DP2TRIANGLELIST {
+  WORD wVStart;
+} D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
+
+typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
+  WORD wV1;
+  WORD wV2;
+  WORD wV3;
+  WORD wFlags;
+} D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
+
+typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
+  WORD wV1;
+  WORD wV2;
+  WORD wV3;
+} D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
+
+typedef struct _D3DHAL_DP2TRIANGLESTRIP {
+  WORD wVStart;
+} D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
+
+typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
+  WORD wV[3];
+} D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
+
+typedef struct _D3DHAL_DP2TRIANGLEFAN {
+  WORD wVStart;
+} D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
+
+typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
+  WORD wV[3];
+} D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
+
+typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
+  DWORD dwEdgeFlags;
+} D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
+
+/* render states */
+typedef struct _D3DHAL_DP2RENDERSTATE {
+  D3DRENDERSTATETYPE   RenderState;
+  union {
+    D3DVALUE dvState;
+    DWORD dwState;
+  } DUMMYUNIONNAME;
+} D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
+
+typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
+  WORD wStage;
+  WORD TSState;
+  DWORD dwValue;
+} D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
+
+#define D3DTSS_TEXTUREMAP 0
+
+typedef struct _D3DHAL_DP2VIEWPORTINFO {
+  DWORD dwX;
+  DWORD dwY;
+  DWORD dwWidth;
+  DWORD dwHeight;
+} D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
+
+typedef struct _D3DHAL_DP2WINFO {
+  D3DVALUE dwWNear;
+  D3DVALUE dwWFar;
+} D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
+
+typedef struct _D3DHAL_DP2SETPALETTE {
+  DWORD dwPaletteHandle;
+  DWORD dwPaletteFlags;
+  DWORD dwSurfaceHandle;
+} D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
+
+typedef struct _D3DHAL_DP2UPDATEPALETTE {
+  DWORD dwPaletteHandle;
+  WORD wStartIndex;
+  WORD wNumEntries;
+} D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
+
+typedef struct _D3DHAL_DP2ZRANGE {
+  D3DVALUE dvMinZ;
+  D3DVALUE dvMaxZ;
+} D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
+
+typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
+
+typedef struct _D3DHAL_DP2SETLIGHT {
+  DWORD dwIndex;
+  DWORD dwDataType;
+} D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
+
+#define D3DHAL_SETLIGHT_ENABLE 0
+#define D3DHAL_SETLIGHT_DISABLE        1
+#define D3DHAL_SETLIGHT_DATA   2
+
+typedef struct _D3DHAL_DP2CREATELIGHT {
+  DWORD dwIndex;
+} D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
+
+typedef struct _D3DHAL_DP2SETTRANSFORM {
+  D3DTRANSFORMSTATETYPE        xfrmType;
+  D3DMATRIX            matrix;
+} D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
+
+typedef struct _D3DHAL_DP2TEXBLT {
+  DWORD dwDDDestSurface;
+  DWORD dwDDSrcSurface;
+  POINT pDest;
+  RECTL rSrc;
+  DWORD dwFlags;
+} D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
+
+typedef struct _D3DHAL_DP2STATESET {
+  DWORD               dwOperation;
+  DWORD               dwParam;
+  D3DSTATEBLOCKTYPE   sbType;
+} D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
+
+#define D3DHAL_STATESETBEGIN   0
+#define D3DHAL_STATESETEND     1
+#define D3DHAL_STATESETDELETE  2
+#define D3DHAL_STATESETEXECUTE 3
+#define D3DHAL_STATESETCAPTURE 4
+
+typedef struct _D3DHAL_DP2SETPRIORITY {
+  DWORD dwDDSurface;
+  DWORD dwPriority;
+} D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
+
+typedef struct _D3DHAL_DP2SETRENDERTARGET {
+  DWORD hRenderTarget;
+  DWORD hZBuffer;
+} D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
+
+typedef struct _D3DHAL_DP2CLEAR {
+  DWORD                dwFlags;
+  DWORD                dwFillColor;
+  D3DVALUE     dvFillDepth;
+  DWORD                dwFillStencil;
+  RECT         Rects[1];
+} D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
+
+typedef struct _D3DHAL_DP2SETTEXLOD {
+  DWORD dwDDSurface;
+  DWORD dwLOD;
+} D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
+
+typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA
+{
+    ULONG_PTR           dwhContext;
+    DWORD           dwFlags;
+    DWORD           dwReserved;
+    DWORD           dwNumPasses;
+    HRESULT         ddrval;
+} D3DHAL_VALIDATETEXTURESTAGESTATEDATA;
+
+/* FIXME: get definition for this */
+typedef DWORD D3DNTHAL_CONTEXTCREATEI;
+
+typedef D3DHAL_CONTEXTDESTROYDATA D3DNTHAL_CONTEXTDESTROYDATA;
+typedef D3DNTHAL_CONTEXTDESTROYDATA *LPD3DNTHAL_CONTEXTDESTROYDATA;
+typedef D3DHAL_VALIDATETEXTURESTAGESTATEDATA D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
+typedef D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
+typedef D3DHAL_DRAWPRIMITIVES2DATA D3DNTHAL_DRAWPRIMITIVES2DATA;
+typedef D3DNTHAL_DRAWPRIMITIVES2DATA *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
+typedef DDHAL_GETDRIVERSTATEDATA DD_GETDRIVERSTATEDATA;
+typedef DD_GETDRIVERSTATEDATA *PDD_GETDRIVERSTATEDATA;
+typedef DDHAL_ADDATTACHEDSURFACEDATA DD_ADDATTACHEDSURFACEDATA;
+typedef DD_ADDATTACHEDSURFACEDATA *PDD_ADDATTACHEDSURFACEDATA;
+typedef DDHAL_BLTDATA DD_BLTDATA;
+typedef DD_BLTDATA *PDD_BLTDATA;
+typedef DDHAL_BEGINMOCOMPFRAMEDATA DD_BEGINMOCOMPFRAMEDATA;
+typedef DD_BEGINMOCOMPFRAMEDATA *PDD_BEGINMOCOMPFRAMEDATA;
+typedef DDHAL_CANCREATESURFACEDATA DD_CANCREATESURFACEDATA;
+typedef DD_CANCREATESURFACEDATA *PDD_CANCREATESURFACEDATA;
+typedef DDHAL_COLORCONTROLDATA DD_COLORCONTROLDATA;
+typedef DD_COLORCONTROLDATA *PDD_COLORCONTROLDATA;
+typedef DDRAWI_DDRAWSURFACE_GBL DD_SURFACE_GLOBAL;
+typedef DD_SURFACE_GLOBAL *PDD_SURFACE_GLOBAL;
+typedef DDHAL_CREATEMOCOMPDATA DD_CREATEMOCOMPDATA;
+typedef DD_CREATEMOCOMPDATA *PDD_CREATEMOCOMPDATA;
+typedef DDRAWI_DDRAWSURFACE_LCL DD_SURFACE_LOCAL;
+typedef DD_SURFACE_LOCAL *PDD_SURFACE_LOCAL;
+typedef DDRAWI_DDRAWSURFACE_MORE DD_SURFACE_MORE;
+typedef DD_SURFACE_MORE *PDD_SURFACE_MORE;
+typedef DDHAL_DESTROYMOCOMPDATA DD_DESTROYMOCOMPDATA;
+typedef DD_DESTROYMOCOMPDATA *PDD_DESTROYMOCOMPDATA;
+typedef DDHAL_ENDMOCOMPFRAMEDATA DD_ENDMOCOMPFRAMEDATA;
+typedef DD_ENDMOCOMPFRAMEDATA *PDD_ENDMOCOMPFRAMEDATA;
+typedef DDHAL_FLIPDATA DD_FLIPDATA;
+typedef DD_FLIPDATA *PDD_FLIPDATA;
+typedef DDHAL_FLIPTOGDISURFACEDATA DD_FLIPTOGDISURFACEDATA;
+typedef DD_FLIPTOGDISURFACEDATA *PDD_FLIPTOGDISURFACEDATA;
+typedef DDHAL_GETAVAILDRIVERMEMORYDATA DD_GETAVAILDRIVERMEMORYDATA;
+typedef DD_GETAVAILDRIVERMEMORYDATA *PDD_GETAVAILDRIVERMEMORYDATA;
+typedef DDHAL_GETBLTSTATUSDATA DD_GETBLTSTATUSDATA;
+typedef DD_GETBLTSTATUSDATA *PDD_GETBLTSTATUSDATA;
+typedef DDHAL_GETDRIVERINFODATA DD_GETDRIVERINFODATA;
+typedef DD_GETDRIVERINFODATA *PDD_GETDRIVERINFODATA;
+typedef DDHAL_GETFLIPSTATUSDATA DD_GETFLIPSTATUSDATA;
+typedef DD_GETFLIPSTATUSDATA *PDD_GETFLIPSTATUSDATA;
+typedef DDHAL_GETINTERNALMOCOMPDATA DD_GETINTERNALMOCOMPDATA;
+typedef DD_GETINTERNALMOCOMPDATA *PDD_GETINTERNALMOCOMPDATA;
+typedef DDHAL_GETMOCOMPCOMPBUFFDATA DD_GETMOCOMPCOMPBUFFDATA;
+typedef DD_GETMOCOMPCOMPBUFFDATA *PDD_GETMOCOMPCOMPBUFFDATA;
+typedef DDHAL_GETMOCOMPGUIDSDATA DD_GETMOCOMPGUIDSDATA;
+typedef DD_GETMOCOMPGUIDSDATA *PDD_GETMOCOMPGUIDSDATA;
+typedef DDHAL_GETMOCOMPFORMATSDATA DD_GETMOCOMPFORMATSDATA;
+typedef DD_GETMOCOMPFORMATSDATA *PDD_GETMOCOMPFORMATSDATA;
+typedef DDHAL_GETSCANLINEDATA DD_GETSCANLINEDATA;
+typedef DD_GETSCANLINEDATA *PDD_GETSCANLINEDATA;
+typedef DDHAL_LOCKDATA DD_LOCKDATA;
+typedef DD_LOCKDATA *PDD_LOCKDATA;
+typedef DDHALINFO DD_HALINFO;
+typedef DDHAL_QUERYMOCOMPSTATUSDATA DD_QUERYMOCOMPSTATUSDATA;
+typedef DD_QUERYMOCOMPSTATUSDATA *PDD_QUERYMOCOMPSTATUSDATA;
+typedef DDHAL_RENDERMOCOMPDATA DD_RENDERMOCOMPDATA;
+typedef DD_RENDERMOCOMPDATA *PDD_RENDERMOCOMPDATA;
+typedef DDHAL_SETCOLORKEYDATA DD_SETCOLORKEYDATA;
+typedef DD_SETCOLORKEYDATA *PDD_SETCOLORKEYDATA;
+typedef DDHAL_SETEXCLUSIVEMODEDATA DD_SETEXCLUSIVEMODEDATA;
+typedef DD_SETEXCLUSIVEMODEDATA *PDD_SETEXCLUSIVEMODEDATA;
+typedef DDHAL_SETOVERLAYPOSITIONDATA DD_SETOVERLAYPOSITIONDATA;
+typedef DD_SETOVERLAYPOSITIONDATA *PDD_SETOVERLAYPOSITIONDATA;
+typedef DDHAL_UNLOCKDATA DD_UNLOCKDATA;
+typedef DD_UNLOCKDATA *PDD_UNLOCKDATA;
+typedef DDHAL_CREATESURFACEDATA DD_CREATESURFACEDATA;
+typedef DD_CREATESURFACEDATA *LPDD_CREATESURFACEDATA;
+typedef DDHAL_UPDATEOVERLAYDATA DD_UPDATEOVERLAYDATA;
+typedef DD_UPDATEOVERLAYDATA *PDD_UPDATEOVERLAYDATA;
+typedef DDHAL_WAITFORVERTICALBLANKDATA DD_WAITFORVERTICALBLANKDATA;
+typedef DD_WAITFORVERTICALBLANKDATA *PDD_WAITFORVERTICALBLANKDATA;
+typedef D3DHAL_CALLBACKS D3DNTHAL_CALLBACKS;
+typedef D3DNTHAL_CALLBACKS *LPD3DNTHAL_CALLBACKS;
+typedef D3DHAL_GLOBALDRIVERDATA D3DNTHAL_GLOBALDRIVERDATA;
+typedef D3DNTHAL_GLOBALDRIVERDATA *LPD3DNTHAL_GLOBALDRIVERDATA;
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __WINE_DDRAWI_H */
diff --git a/reactos/include/ddk/ddrawi.h b/reactos/include/ddk/ddrawi.h
new file mode 100644 (file)
index 0000000..8d617a1
--- /dev/null
@@ -0,0 +1,1332 @@
+/*
+ * DirectDraw driver interface
+ * (DirectX 7 version)
+ *
+ * Copyright (C) 2001 Ove Kaaven
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+#ifndef __WINE_DDRAWI_H
+#define __WINE_DDRAWI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ddraw.h>
+
+typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
+typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
+typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
+
+#define DDAPI WINAPI
+
+/* the DirectDraw versions */
+#define DD_VERSION             0x0200 /* compatibility version */
+#define DD_RUNTIME_VERSION     0x0700 /* actual version */
+
+/* the HAL version returned from QUERYESCSUPPORT - DCICOMMAND */
+#define DD_HAL_VERSION 0x0100
+
+/* more DCICOMMAND escapes */
+#define DDCREATEDRIVEROBJECT   10
+#define DDGET32BITDRIVERNAME   11
+#define DDNEWCALLBACKFNS       12
+#define DDVERSIONINFO          13
+
+#define MAX_DRIVER_NAME                CCHDEVICENAME
+
+/*****************************************************************************
+ * Initialization stuff
+ */
+typedef struct {
+    char szName[260];
+    char szEntryPoint[64];
+    DWORD dwContext;
+} DD32BITDRIVERDATA,*LPDD32BITDRIVERDATA;
+
+typedef struct {
+    DWORD dwHALVersion;
+    ULONG_PTR dwReserved1;
+    ULONG_PTR dwReserved2;
+} DDVERSIONDATA,*LPDDVERSIONDATA;
+
+typedef DWORD (PASCAL *LPDD32BITDRIVERINIT)(DWORD dwContext);
+
+/* pointer to video memory */
+typedef ULONG_PTR FLATPTR;
+
+/* predeclare some structures */
+typedef struct _DDHALINFO *LPDDHALINFO;
+typedef struct _DDRAWI_DIRECTDRAW_INT *LPDDRAWI_DIRECTDRAW_INT;
+typedef struct _DDRAWI_DIRECTDRAW_LCL *LPDDRAWI_DIRECTDRAW_LCL;
+typedef struct _DDRAWI_DIRECTDRAW_GBL *LPDDRAWI_DIRECTDRAW_GBL;
+typedef struct _DDRAWI_DDRAWSURFACE_INT *LPDDRAWI_DDRAWSURFACE_INT;
+typedef struct _DDRAWI_DDRAWSURFACE_LCL *LPDDRAWI_DDRAWSURFACE_LCL;
+typedef struct _DDRAWI_DDRAWSURFACE_GBL *LPDDRAWI_DDRAWSURFACE_GBL;
+typedef struct _DDRAWI_DDRAWSURFACE_MORE *LPDDRAWI_DDRAWSURFACE_MORE;
+typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE *LPDDRAWI_DDRAWSURFACE_GBL_MORE;
+typedef struct _DDRAWI_DDRAWPALETTE_INT *LPDDRAWI_DDRAWPALETTE_INT;
+typedef struct _DDRAWI_DDRAWPALETTE_LCL *LPDDRAWI_DDRAWPALETTE_LCL;
+typedef struct _DDRAWI_DDRAWPALETTE_GBL *LPDDRAWI_DDRAWPALETTE_GBL;
+typedef struct _DDRAWI_DDRAWCLIPPER_INT *LPDDRAWI_DDRAWCLIPPER_INT;
+typedef struct _DDRAWI_DDRAWCLIPPER_LCL *LPDDRAWI_DDRAWCLIPPER_LCL;
+typedef struct _DDRAWI_DDRAWCLIPPER_GBL *LPDDRAWI_DDRAWCLIPPER_GBL;
+typedef struct _DDRAWI_DDVIDEOPORT_INT *LPDDRAWI_DDVIDEOPORT_INT;
+typedef struct _DDRAWI_DDVIDEOPORT_LCL *LPDDRAWI_DDVIDEOPORT_LCL;
+typedef struct _DDRAWI_DDMOTIONCOMP_INT *LPDDRAWI_DDMOTIONCOMP_INT;
+typedef struct _DDRAWI_DDMOTIONCOMP_LCL *LPDDRAWI_DDMOTIONCOMP_LCL;
+
+/*****************************************************************************
+ * driver->ddraw callbacks
+ */
+typedef BOOL    (DDAPI *LPDDHAL_SETINFO)(LPDDHALINFO lpDDHalInfo, BOOL reset);
+typedef FLATPTR (DDAPI *LPDDHAL_VIDMEMALLOC)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, DWORD dwWidth, DWORD dwHeight);
+typedef void    (DDAPI *LPDDHAL_VIDMEMFREE)(LPDDRAWI_DIRECTDRAW_GBL lpDD, int heap, FLATPTR fpMem);
+
+typedef struct {
+    DWORD              dwSize;
+    LPDDHAL_SETINFO    lpSetInfo;
+    LPDDHAL_VIDMEMALLOC        lpVidMemAlloc;
+    LPDDHAL_VIDMEMFREE lpVidMemFree;
+} DDHALDDRAWFNS,*LPDDHALDDRAWFNS;
+
+/*****************************************************************************
+ * mode info structure
+ */
+typedef struct _DDHALMODEINFO {
+    DWORD      dwWidth;
+    DWORD      dwHeight;
+    LONG       lPitch;
+    DWORD      dwBPP;
+    WORD       wFlags;
+    WORD       wRefreshRate;
+    DWORD      dwRBitMask;
+    DWORD      dwGBitMask;
+    DWORD      dwBBitMask;
+    DWORD      dwAlphaBitMask;
+} DDHALMODEINFO,*LPDDHALMODEINFO;
+
+#define DDMODEINFO_PALETTIZED  0x0001
+#define DDMODEINFO_MODEX       0x0002
+#define DDMODEINFO_UNSUPPORTED 0x0004
+#define DDMODEINFO_STANDARDVGA 0x0008
+#define DDMODEINFO_MAXREFRESH  0x0010
+#define DDMODEINFO_STEREO      0x0020
+
+/*****************************************************************************
+ * video memory info structure
+ */
+typedef struct _VIDMEM {
+    DWORD      dwFlags;
+    FLATPTR    fpStart;
+    union {
+       FLATPTR         fpEnd;
+       DWORD           dwWidth;
+    } DUMMYUNIONNAME1;
+    DDSCAPS    ddsCaps;
+    DDSCAPS    ddsCapsAlt;
+    union {
+       LPVMEMHEAP      lpHeap;
+       DWORD           dwHeight;
+    } DUMMYUNIONNAME2;
+} VIDMEM,*LPVIDMEM;
+
+#define VIDMEM_ISLINEAR                0x00000001
+#define VIDMEM_ISRECTANGULAR   0x00000002
+#define VIDMEM_ISHEAP          0x00000004
+#define VIDMEM_ISNONLOCAL      0x00000008
+#define VIDMEM_ISWC            0x00000010
+#define VIDMEM_ISDISABLED      0x00000020
+
+typedef struct _VIDMEMINFO {
+    FLATPTR            fpPrimary;
+    DWORD              dwFlags;
+    DWORD              dwDisplayWidth;
+    DWORD              dwDisplayHeight;
+    LONG               lDisplayPitch;
+    DDPIXELFORMAT      ddpfDisplay;
+    DWORD              dwOffscreenAlign;
+    DWORD              dwOverlayAlign;
+    DWORD              dwTextureAlign;
+    DWORD              dwZBufferAlign;
+    DWORD              dwAlphaAlign;
+    DWORD              dwNumHeaps;
+    LPVIDMEM           pvmList;
+} VIDMEMINFO,*LPVIDMEMINFO;
+
+typedef struct _HEAPALIAS {
+    FLATPTR    fpVidMem;
+    LPVOID     lpAlias;
+    DWORD      dwAliasSize;
+} HEAPALIAS,*LPHEAPALIAS;
+
+typedef struct _HEAPALIASINFO {
+    DWORD      dwRefCnt;
+    DWORD      dwFlags;
+    DWORD      dwNumHeaps;
+    LPHEAPALIAS        lpAliases;
+} HEAPALIASINFO,*LPHEAPALIASINFO;
+
+#define HEAPALIASINFO_MAPPEDREAL       0x00000001
+#define HEAPALIASINFO_MAPPEDDUMMY      0x00000002
+
+/*****************************************************************************
+ * capabilities structures
+ */
+typedef struct _DDCORECAPS {
+    DWORD      dwSize;
+    DWORD      dwCaps;
+    DWORD      dwCaps2;
+    DWORD      dwCKeyCaps;
+    DWORD      dwFXCaps;
+    DWORD      dwFXAlphaCaps;
+    DWORD      dwPalCaps;
+    DWORD      dwSVCaps;
+    DWORD      dwAlphaBltConstBitDepths;
+    DWORD      dwAlphaBltPixelBitDepths;
+    DWORD      dwAlphaBltSurfaceBitDepths;
+    DWORD      dwAlphaOverlayConstBitDepths;
+    DWORD      dwAlphaOverlayPixelBitDepths;
+    DWORD      dwAlphaOverlaySurfaceBitDepths;
+    DWORD      dwZBufferBitDepths;
+    DWORD      dwVidMemTotal;
+    DWORD      dwVidMemFree;
+    DWORD      dwMaxVisibleOverlays;
+    DWORD      dwCurrVisibleOverlays;
+    DWORD      dwNumFourCCCodes;
+    DWORD      dwAlignBoundarySrc;
+    DWORD      dwAlignSizeSrc;
+    DWORD      dwAlignBoundaryDest;
+    DWORD      dwAlignSizeDest;
+    DWORD      dwAlignStrideAlign;
+    DWORD      dwRops[DD_ROP_SPACE];
+    DDSCAPS    ddsCaps;
+    DWORD      dwMinOverlayStretch;
+    DWORD      dwMaxOverlayStretch;
+    DWORD      dwMinLiveVideoStretch;
+    DWORD      dwMaxLiveVideoStretch;
+    DWORD      dwMinHwCodecStretch;
+    DWORD      dwMaxHwCodecStretch;
+    DWORD      dwReserved1;
+    DWORD      dwReserved2;
+    DWORD      dwReserved3;
+    DWORD      dwSVBCaps;
+    DWORD      dwSVBCKeyCaps;
+    DWORD      dwSVBFXCaps;
+    DWORD      dwSVBRops[DD_ROP_SPACE];
+    DWORD      dwVSBCaps;
+    DWORD      dwVSBCKeyCaps;
+    DWORD      dwVSBFXCaps;
+    DWORD      dwVSBRops[DD_ROP_SPACE];
+    DWORD      dwSSBCaps;
+    DWORD      dwSSBCKeyCaps;
+    DWORD      dwSSBFXCaps;
+    DWORD      dwSSBRops[DD_ROP_SPACE];
+    DWORD      dwMaxVideoPorts;
+    DWORD      dwCurrVideoPorts;
+    DWORD      dwSVBCaps2;
+} DDCORECAPS,*LPDDCORECAPS;
+
+typedef struct _DDNONLOCALVIDMEMCAPS {
+    DWORD      dwSize;
+    DWORD      dwNLVBCaps;
+    DWORD      dwNLVBCaps2;
+    DWORD      dwNLVBCKeyCaps;
+    DWORD      dwNLVBFXCaps;
+    DWORD      dwNLVBRops[DD_ROP_SPACE];
+} DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS;
+
+typedef struct _DDSCAPSEX {
+    DWORD      dwCaps2;
+    DWORD      dwCaps3;
+    DWORD      dwCaps4;
+} DDSCAPSEX,*LPDDSCAPSEX;
+
+#define DDSCAPS_EXECUTEBUFFER  DDSCAPS_RESERVED2
+#define DDSCAPS2_VERTEXBUFFER  DDSCAPS2_RESERVED1
+#define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
+
+/*****************************************************************************
+ * ddraw->driver callbacks
+ */
+#define DDHAL_DRIVER_NOTHANDLED        0
+#define DDHAL_DRIVER_HANDLED   1
+#define DDHAL_DRIVER_NOCKEYHW  2
+
+typedef struct _DDHAL_DESTROYDRIVERDATA                *LPDDHAL_DESTROYDRIVERDATA;
+typedef struct _DDHAL_CREATESURFACEDATA                *LPDDHAL_CREATESURFACEDATA;
+typedef struct _DDHAL_DRVSETCOLORKEYDATA       *LPDDHAL_DRVSETCOLORKEYDATA;
+typedef struct _DDHAL_SETMODEDATA              *LPDDHAL_SETMODEDATA;
+typedef struct _DDHAL_WAITFORVERTICALBLANKDATA *LPDDHAL_WAITFORVERTICALBLANKDATA;
+typedef struct _DDHAL_CANCREATESURFACEDATA     *LPDDHAL_CANCREATESURFACEDATA;
+typedef struct _DDHAL_CREATEPALETTEDATA                *LPDDHAL_CREATEPALETTEDATA;
+typedef struct _DDHAL_GETSCANLINEDATA          *LPDDHAL_GETSCANLINEDATA;
+typedef struct _DDHAL_SETEXCLUSIVEMODEDATA     *LPDDHAL_SETEXCLUSIVEMODEDATA;
+typedef struct _DDHAL_FLIPTOGDISURFACEDATA     *LPDDHAL_FLIPTOGDISURFACEDATA;
+
+typedef DWORD (PASCAL *LPDDHAL_DESTROYDRIVER)      (LPDDHAL_DESTROYDRIVERDATA);
+typedef DWORD (PASCAL *LPDDHAL_CREATESURFACE)      (LPDDHAL_CREATESURFACEDATA);
+typedef DWORD (PASCAL *LPDDHAL_SETCOLORKEY)        (LPDDHAL_DRVSETCOLORKEYDATA);
+typedef DWORD (PASCAL *LPDDHAL_SETMODE)                    (LPDDHAL_SETMODEDATA);
+typedef DWORD (PASCAL *LPDDHAL_WAITFORVERTICALBLANK)(LPDDHAL_WAITFORVERTICALBLANKDATA);
+typedef DWORD (PASCAL *LPDDHAL_CANCREATESURFACE)    (LPDDHAL_CANCREATESURFACEDATA );
+typedef DWORD (PASCAL *LPDDHAL_CREATEPALETTE)      (LPDDHAL_CREATEPALETTEDATA);
+typedef DWORD (PASCAL *LPDDHAL_GETSCANLINE)        (LPDDHAL_GETSCANLINEDATA);
+typedef DWORD (PASCAL *LPDDHAL_SETEXCLUSIVEMODE)    (LPDDHAL_SETEXCLUSIVEMODEDATA);
+typedef DWORD (PASCAL *LPDDHAL_FLIPTOGDISURFACE)    (LPDDHAL_FLIPTOGDISURFACEDATA);
+
+typedef struct _DDHAL_DDCALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPDDHAL_DESTROYDRIVER              DestroyDriver;
+    LPDDHAL_CREATESURFACE              CreateSurface;
+    LPDDHAL_SETCOLORKEY                        SetColorKey;
+    LPDDHAL_SETMODE                    SetMode;
+    LPDDHAL_WAITFORVERTICALBLANK       WaitForVerticalBlank;
+    LPDDHAL_CANCREATESURFACE           CanCreateSurface;
+    LPDDHAL_CREATEPALETTE              CreatePalette;
+    LPDDHAL_GETSCANLINE                        GetScanLine;
+    /* DirectX 2 */
+    LPDDHAL_SETEXCLUSIVEMODE           SetExclusiveMode;
+    LPDDHAL_FLIPTOGDISURFACE           FlipToGDISurface;
+} DDHAL_DDCALLBACKS,*LPDDHAL_DDCALLBACKS;
+
+typedef struct _DDHAL_DESTROYSURFACEDATA       *LPDDHAL_DESTROYSURFACEDATA;
+typedef struct _DDHAL_FLIPDATA                 *LPDDHAL_FLIPDATA;
+typedef struct _DDHAL_SETCLIPLISTDATA          *LPDDHAL_SETCLIPLISTDATA;
+typedef struct _DDHAL_LOCKDATA                 *LPDDHAL_LOCKDATA;
+typedef struct _DDHAL_UNLOCKDATA               *LPDDHAL_UNLOCKDATA;
+typedef struct _DDHAL_BLTDATA                  *LPDDHAL_BLTDATA;
+typedef struct _DDHAL_SETCOLORKEYDATA          *LPDDHAL_SETCOLORKEYDATA;
+typedef struct _DDHAL_ADDATTACHEDSURFACEDATA   *LPDDHAL_ADDATTACHEDSURFACEDATA;
+typedef struct _DDHAL_GETBLTSTATUSDATA         *LPDDHAL_GETBLTSTATUSDATA;
+typedef struct _DDHAL_GETFLIPSTATUSDATA                *LPDDHAL_GETFLIPSTATUSDATA;
+typedef struct _DDHAL_UPDATEOVERLAYDATA                *LPDDHAL_UPDATEOVERLAYDATA;
+typedef struct _DDHAL_SETOVERLAYPOSITIONDATA   *LPDDHAL_SETOVERLAYPOSITIONDATA;
+typedef struct _DDHAL_SETPALETTEDATA           *LPDDHAL_SETPALETTEDATA;
+
+typedef DWORD (PASCAL *LPDDHALSURFCB_DESTROYSURFACE)   (LPDDHAL_DESTROYSURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_FLIP)             (LPDDHAL_FLIPDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_SETCLIPLIST)      (LPDDHAL_SETCLIPLISTDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_LOCK)             (LPDDHAL_LOCKDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_UNLOCK)           (LPDDHAL_UNLOCKDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_BLT)              (LPDDHAL_BLTDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_SETCOLORKEY)      (LPDDHAL_SETCOLORKEYDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_ADDATTACHEDSURFACE)(LPDDHAL_ADDATTACHEDSURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_GETBLTSTATUS)     (LPDDHAL_GETBLTSTATUSDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_GETFLIPSTATUS)    (LPDDHAL_GETFLIPSTATUSDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_UPDATEOVERLAY)    (LPDDHAL_UPDATEOVERLAYDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_SETOVERLAYPOSITION)(LPDDHAL_SETOVERLAYPOSITIONDATA);
+typedef DWORD (PASCAL *LPDDHALSURFCB_SETPALETTE)       (LPDDHAL_SETPALETTEDATA);
+
+typedef struct _DDHAL_DDSURFACECALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPDDHALSURFCB_DESTROYSURFACE       DestroySurface;
+    LPDDHALSURFCB_FLIP                 Flip;
+    LPDDHALSURFCB_SETCLIPLIST          SetClipList;
+    LPDDHALSURFCB_LOCK                 Lock;
+    LPDDHALSURFCB_UNLOCK               Unlock;
+    LPDDHALSURFCB_BLT                  Blt;
+    LPDDHALSURFCB_SETCOLORKEY          SetColorKey;
+    LPDDHALSURFCB_ADDATTACHEDSURFACE   AddAttachedSurface;
+    LPDDHALSURFCB_GETBLTSTATUS         GetBltStatus;
+    LPDDHALSURFCB_GETFLIPSTATUS                GetFlipStatus;
+    LPDDHALSURFCB_UPDATEOVERLAY                UpdateOverlay;
+    LPDDHALSURFCB_SETOVERLAYPOSITION   SetOverlayPosition;
+    LPVOID                             reserved4;
+    LPDDHALSURFCB_SETPALETTE           SetPalette;
+} DDHAL_DDSURFACECALLBACKS,*LPDDHAL_DDSURFACECALLBACKS;
+
+typedef struct _DDHAL_DESTROYPALETTEDATA       *LPDDHAL_DESTROYPALETTEDATA;
+typedef struct _DDHAL_SETENTRIESDATA           *LPDDHAL_SETENTRIESDATA;
+
+typedef DWORD (PASCAL *LPDDHALPALCB_DESTROYPALETTE)(LPDDHAL_DESTROYPALETTEDATA);
+typedef DWORD (PASCAL *LPDDHALPALCB_SETENTRIES)    (LPDDHAL_SETENTRIESDATA);
+
+typedef struct _DDHAL_DDPALETTECALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPDDHALPALCB_DESTROYPALETTE                DestroyPalette;
+    LPDDHALPALCB_SETENTRIES            SetEntries;
+} DDHAL_DDPALETTECALLBACKS,*LPDDHAL_DDPALETTECALLBACKS;
+
+typedef DWORD (PASCAL *LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALEXEBUFCB_CREATEEXEBUF)   (LPDDHAL_CREATESURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALEXEBUFCB_DESTROYEXEBUF)  (LPDDHAL_DESTROYSURFACEDATA);
+typedef DWORD (PASCAL *LPDDHALEXEBUFCB_LOCKEXEBUF)     (LPDDHAL_LOCKDATA);
+typedef DWORD (PASCAL *LPDDHALEXEBUFCB_UNLOCKEXEBUF)   (LPDDHAL_UNLOCKDATA);
+
+typedef struct _DDHAL_DDEXEBUFCALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPDDHALEXEBUFCB_CANCREATEEXEBUF    CanCreateExecuteBuffer;
+    LPDDHALEXEBUFCB_CREATEEXEBUF       CreateExecuteBuffer;
+    LPDDHALEXEBUFCB_DESTROYEXEBUF      DestroyExecuteBuffer;
+    LPDDHALEXEBUFCB_LOCKEXEBUF         LockExecuteBuffer;
+    LPDDHALEXEBUFCB_UNLOCKEXEBUF       UnlockExecuteBuffer;
+} DDHAL_DDEXEBUFCALLBACKS,*LPDDHAL_DDEXEBUFCALLBACKS;
+
+typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA *LPDDHAL_GETAVAILDRIVERMEMORYDATA;
+typedef struct _DDHAL_UPDATENONLOCALHEAPDATA   *LPDDHAL_UPDATENONLOCALHEAPDATA;
+typedef struct _DDHAL_GETHEAPALIGNMENTDATA     *LPDDHAL_GETHEAPALIGNMENTDATA;
+
+typedef DWORD (PASCAL *LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA);
+typedef DWORD (PASCAL *LPDDHAL_UPDATENONLOCALHEAP)  (LPDDHAL_UPDATENONLOCALHEAPDATA);
+typedef DWORD (PASCAL *LPDDHAL_GETHEAPALIGNMENT)    (LPDDHAL_GETHEAPALIGNMENTDATA);
+
+typedef struct _DDHAL_DDMISCELLANEOUSCALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPDDHAL_GETAVAILDRIVERMEMORY       GetAvailDriverMemory;
+    LPDDHAL_UPDATENONLOCALHEAP         UpdateNonLocalHeap;
+    LPDDHAL_GETHEAPALIGNMENT           GetHeapAlignment;
+    LPDDHALSURFCB_GETBLTSTATUS         GetSysmemBltStatus;
+} DDHAL_DDMISCELLANEOUSCALLBACKS,*LPDDHAL_DDMISCELLANEOUSCALLBACKS;
+
+typedef struct _DDHAL_CREATESURFACEEXDATA      *LPDDHAL_CREATESURFACEEXDATA;
+typedef struct _DDHAL_GETDRIVERSTATEDATA       *LPDDHAL_GETDRIVERSTATEDATA;
+typedef struct _DDHAL_DESTROYDDLOCALDATA       *LPDDHAL_DESTROYDDLOCALDATA;
+
+typedef DWORD (PASCAL *LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA);
+typedef DWORD (PASCAL *LPDDHAL_GETDRIVERSTATE) (LPDDHAL_GETDRIVERSTATEDATA);
+typedef DWORD (PASCAL *LPDDHAL_DESTROYDDLOCAL) (LPDDHAL_DESTROYDDLOCALDATA);
+
+typedef struct _DDHAL_DDMISCELLANEOUS2CALLBACKS {
+    DWORD                              dwSize;
+    DWORD                              dwFlags;
+    LPVOID                             Reserved;
+    LPDDHAL_CREATESURFACEEX            CreateSurfaceEx;
+    LPDDHAL_GETDRIVERSTATE             GetDriverState;
+    LPDDHAL_DESTROYDDLOCAL             DestroyDDLocal;
+} DDHAL_DDMISCELLANEOUS2CALLBACKS,*LPDDHAL_DDMISCELLANEOUS2CALLBACKS;
+
+typedef HRESULT (WINAPI *LPDDGAMMACALIBRATORPROC)(LPDDGAMMARAMP, LPBYTE);
+
+/*****************************************************************************
+ * driver info structure
+ *
+ * The HAL is queried for additional callbacks via the GetDriverInfo callback.
+ */
+typedef struct _DDHAL_GETDRIVERINFODATA *LPDDHAL_GETDRIVERINFODATA;
+typedef DWORD (PASCAL *LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA);
+
+typedef struct _DDHALINFO {
+    DWORD                      dwSize;
+    LPDDHAL_DDCALLBACKS                lpDDCallbacks;
+    LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks;
+    LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks;
+    VIDMEMINFO                 vmiData;
+    DDCORECAPS                 ddCaps;
+    DWORD                      dwMonitorFrequency;
+    LPDDHAL_GETDRIVERINFO      GetDriverInfo;
+    DWORD                      dwModeIndex;
+    LPDWORD                    lpdwFourCC;
+    DWORD                      dwNumModes;
+    LPDDHALMODEINFO            lpModeInfo;
+    DWORD                      dwFlags;
+    LPVOID                     lpPDevice;
+    DWORD                      hInstance;
+    /* DirectX 2 */
+    ULONG_PTR                  lpD3DGlobalDriverData;
+    ULONG_PTR                  lpD3DHALCallbacks;
+    LPDDHAL_DDEXEBUFCALLBACKS  lpDDExeBufCallbacks;
+} DDHALINFO;
+
+#define DDHALINFO_ISPRIMARYDISPLAY     0x00000001
+#define DDHALINFO_MODEXILLEGAL         0x00000002
+#define DDHALINFO_GETDRIVERINFOSET     0x00000004
+
+/* where the high-level ddraw implementation stores the callbacks */
+typedef struct _DDHAL_CALLBACKS {
+    DDHAL_DDCALLBACKS          cbDDCallbacks;
+    DDHAL_DDSURFACECALLBACKS   cbDDSurfaceCallbacks;
+    DDHAL_DDPALETTECALLBACKS   cbDDPaletteCallbacks;
+    DDHAL_DDCALLBACKS          HALDD;
+    DDHAL_DDSURFACECALLBACKS   HALDDSurface;
+    DDHAL_DDPALETTECALLBACKS   HALDDPalette;
+    DDHAL_DDCALLBACKS          HELDD;
+    DDHAL_DDSURFACECALLBACKS   HELDDSurface;
+    DDHAL_DDPALETTECALLBACKS   HELDDPalette;
+    DDHAL_DDEXEBUFCALLBACKS    cbDDExeBufCallbacks;
+    DDHAL_DDEXEBUFCALLBACKS    HALDDExeBuf;
+    DDHAL_DDEXEBUFCALLBACKS    HELDDExeBuf;
+    /* there's more... videoport, colorcontrol, misc, and motion compensation callbacks... */
+} DDHAL_CALLBACKS,*LPDDHAL_CALLBACKS;
+
+/*****************************************************************************
+ * parameter structures
+ */
+typedef struct _DDHAL_DESTROYDRIVERDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    HRESULT                    ddRVal;
+    LPDDHAL_DESTROYDRIVER      DestroyDriver;
+} DDHAL_DESTROYDRIVERDATA;
+
+typedef struct _DDHAL_SETMODEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    DWORD                      dwModeIndex;
+    HRESULT                    ddRVal;
+    LPDDHAL_SETMODE            SetMode;
+    BOOL                       inexcl;
+    BOOL                       useRefreshRate;
+} DDHAL_SETMODEDATA;
+
+typedef struct _DDHAL_CREATESURFACEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDSURFACEDESC            lpDDSurfaceDesc;
+    LPDDRAWI_DDRAWSURFACE_LCL *        lplpSList;
+    DWORD                      dwSCnt;
+    HRESULT                    ddRVal;
+    LPDDHAL_CREATESURFACE      CreateSurface;
+} DDHAL_CREATESURFACEDATA;
+
+typedef struct _DDHAL_CANCREATESURFACEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDSURFACEDESC            lpDDSurfaceDesc;
+    DWORD                      bIsDifferentPixelFormat;
+    HRESULT                    ddRVal;
+    LPDDHAL_CANCREATESURFACE   CanCreateSurface;
+} DDHAL_CANCREATESURFACEDATA;
+
+typedef struct _DDHAL_CREATEPALETTEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWPALETTE_GBL  lpDDPalette;
+    LPPALETTEENTRY             lpColorTable;
+    HRESULT                    ddRVal;
+    LPDDHAL_CREATEPALETTE      CreatePalette;
+    BOOL                       is_excl;
+} DDHAL_CREATEPALETTEDATA;
+
+typedef struct _DDHAL_SETEXCLUSIVEMODEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    DWORD                      dwEnterExcl;
+    DWORD                      dwReserved;
+    HRESULT                    ddRVal;
+    LPDDHAL_SETEXCLUSIVEMODE   SetExclusiveMode;
+} DDHAL_SETEXCLUSIVEMODEDATA;
+
+/* surfaces */
+typedef struct _DDHAL_DESTROYSURFACEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSurface;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_DESTROYSURFACE DestroySurface;
+} DDHAL_DESTROYSURFACEDATA;
+
+typedef struct _DDHAL_FLIPDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpSurfCurr;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpSurfTarg;
+    DWORD                      dwFlags;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_FLIP         Flip;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpSurfCurrLeft;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpSurfTargLeft;
+} DDHAL_FLIPDATA;
+
+typedef struct _DDHAL_LOCKDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSurface;
+    DWORD                      bHasRect;
+    RECTL                      rArea;
+    LPVOID                     lpSurfData;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_LOCK         Lock;
+    DWORD                      dwFlags;
+} DDHAL_LOCKDATA;
+
+typedef struct _DDHAL_UNLOCKDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSurface;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_UNLOCK       Unlock;
+} DDHAL_UNLOCKDATA;
+
+typedef struct _DDHAL_BLTDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDDestSurface;
+    RECTL                      rDest;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSrcSurface;
+    RECTL                      rSrc;
+    DWORD                      dwFlags;
+    DWORD                      dwROPFlags;
+    DDBLTFX                    bltFX;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_BLT          Blt;
+    BOOL                       IsClipped;
+    RECTL                      rOrigDest;
+    RECTL                      rOrigSrc;
+    DWORD                      dwRectCnt;
+    LPRECT                     prDestRects;
+} DDHAL_BLTDATA;
+
+typedef struct _DDHAL_SETPALETTEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpDDSurface;
+    LPDDRAWI_DDRAWPALETTE_GBL  lpDDPalette;
+    HRESULT                    ddRVal;
+    LPDDHALSURFCB_SETPALETTE   SetPalette;
+    BOOL                       Attach;
+} DDHAL_SETPALETTEDATA;
+
+/* palettes */
+typedef struct _DDHAL_DESTROYPALETTEDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWPALETTE_GBL  lpDDPalette;
+    HRESULT                    ddRVal;
+    LPDDHALPALCB_DESTROYPALETTE        DestroyPalette;
+} DDHAL_DESTROYPALETTEDATA;
+
+typedef struct _DDHAL_SETENTRIESDATA {
+    LPDDRAWI_DIRECTDRAW_GBL    lpDD;
+    LPDDRAWI_DDRAWPALETTE_GBL  lpDDPalette;
+    DWORD                      dwBase;
+    DWORD                      dwNumEntries;
+    LPPALETTEENTRY             lpEntries;
+    HRESULT                    ddRVal;
+    LPDDHALPALCB_SETENTRIES    SetEntries;
+} DDHAL_SETENTRIESDATA;
+
+typedef struct _DDHAL_GETDRIVERINFODATA {
+    DWORD      dwSize;
+    DWORD      dwFlags;
+    GUID       guidInfo;
+    DWORD      dwExpectedSize;
+    LPVOID     lpvData;
+    DWORD      dwActualSize;
+    HRESULT    ddRVal;
+    ULONG_PTR  dwContext;
+} DDHAL_GETDRIVERINFODATA;
+
+/*****************************************************************************
+ * high-level ddraw implementation structures
+ */
+typedef DWORD IUnknown; /* FIXME: implement proper definition */
+typedef struct _IUNKNOWN_LIST {
+    struct _IUNKNOWN_LIST *    lpLink;
+    LPGUID                     lpGuid;
+    IUnknown *                 lpIUnknown;
+} IUNKNOWN_LIST,*LPIUNKNOWN_LIST;
+
+typedef struct _PROCESS_LIST {
+    struct _PROCESS_LIST *     lpLink;
+    DWORD                      dwProcessId;
+    DWORD                      dwRefCnt;
+    DWORD                      dwAlphaDepth;
+    DWORD                      dwZDepth;
+} PROCESS_LIST,*LPPROCESS_LIST;
+
+typedef struct _ATTACHLIST {
+    DWORD                      dwFlags;
+    struct _ATTACHLIST *       lpLink;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpAttached;
+    LPDDRAWI_DDRAWSURFACE_INT  lpIAttached;
+} ATTACHLIST,*LPATTACHLIST;
+
+#define DDAL_IMPLICIT  0x00000001
+
+typedef struct _ACCESSRECTLIST {
+    struct _ACCESSRECTLIST *   lpLink;
+    RECT                       rDest;
+    LPDDRAWI_DIRECTDRAW_LCL    lpOwner;
+    LPVOID                     lpSurfaceData;
+    DWORD                      dwFlags;
+    LPHEAPALIASINFO            lpHeapAliasInfo;
+} ACCESSRECTLIST,*LPACCESSRECTLIST;
+
+#define ACCESSRECT_VRAMSTYLE           0x00000001
+#define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002
+#define ACCESSRECT_BROKEN              0x00000004
+
+typedef struct _DBLNODE {
+    struct _DBLNODE *          next;
+    struct _DBLNODE *          prev;
+    LPDDRAWI_DDRAWSURFACE_LCL  object;
+    LPDDRAWI_DDRAWSURFACE_INT  object_int;
+} DBLNODE,*LPDBLNODE;
+
+typedef struct _DDRAWI_DIRECTDRAW_INT {
+    LPVOID                     lpVtbl;
+    LPDDRAWI_DIRECTDRAW_LCL    lpLcl;
+    LPDDRAWI_DIRECTDRAW_INT    lpLink;
+    DWORD                      dwIntRefCnt;
+} DDRAWI_DIRECTDRAW_INT;
+
+typedef struct _DDRAWI_DIRECTDRAW_LCL {
+    DWORD                      lpDDMore;
+    LPDDRAWI_DIRECTDRAW_GBL    lpGbl;
+    DWORD                      dwUnused0;
+    DWORD                      dwLocalFlags;
+    DWORD                      dwLocalRefCnt;
+    DWORD                      dwProcessId;
+    IUnknown *                 pUnkOuter;
+    DWORD                      dwObsolete1;
+    ULONG_PTR                  hWnd;
+    ULONG_PTR                  hDC;
+    DWORD                      dwErrorMode;
+    LPDDRAWI_DDRAWSURFACE_INT  lpPrimary;
+    LPDDRAWI_DDRAWSURFACE_INT  lpCB;
+    DWORD                      dwPreferredMode;
+    /* DirectX 2 */
+    HINSTANCE                  hD3DInstance;
+    IUnknown *                 pD3DIUnknown;
+    LPDDHAL_CALLBACKS          lpDDCB;
+    ULONG_PTR                  hDDVxd;
+    /* DirectX 5.0 */
+    DWORD                      dwAppHackFlags;
+    /* DirectX 5.0A */
+    ULONG_PTR                  hFocusWnd;
+    DWORD                      dwHotTracking;
+    DWORD                      dwIMEState;
+    /* DirectX 6.0 */
+    ULONG_PTR                  hWndPopup;
+    ULONG_PTR                  hDD;
+    ULONG_PTR                  hGammaCalibrator;
+    LPDDGAMMACALIBRATORPROC    lpGammaCalibrator;
+} DDRAWI_DIRECTDRAW_LCL;
+
+#define DDRAWILCL_HASEXCLUSIVEMODE     0x00000001
+#define DDRAWILCL_ISFULLSCREEN         0x00000002
+#define DDRAWILCL_SETCOOPCALLED                0x00000004
+#define DDRAWILCL_ACTIVEYES            0x00000008
+#define DDRAWILCL_ACTIVENO             0x00000010
+#define DDRAWILCL_HOOKEDHWND           0x00000020
+#define DDRAWILCL_ALLOWMODEX           0x00000040
+#define DDRAWILCL_V1SCLBEHAVIOUR       0x00000080
+#define DDRAWILCL_MODEHASBEENCHANGED   0x00000100
+#define DDRAWILCL_CREATEDWINDOW                0x00000200
+#define DDRAWILCL_DIRTYDC              0x00000400
+#define DDRAWILCL_DISABLEINACTIVATE    0x00000800
+#define DDRAWILCL_CURSORCLIPPED                0x00001000
+#define DDRAWILCL_EXPLICITMONITOR      0x00002000
+#define DDRAWILCL_MULTITHREADED                0x00004000
+#define DDRAWILCL_FPUSETUP             0x00008000
+#define DDRAWILCL_POWEREDDOWN          0x00010000
+#define DDRAWILCL_DIRECTDRAW7          0x00020000
+#define DDRAWILCL_ATTEMPTEDD3DCONTEXT  0x00040000
+#define DDRAWILCL_FPUPRESERVE          0x00080000
+
+typedef struct _DDRAWI_DIRECTDRAW_GBL {
+    DWORD                      dwRefCnt;
+    DWORD                      dwFlags;
+    FLATPTR                    fpPrimaryOrig;
+    DDCORECAPS                 ddCaps;
+    DWORD                      dwInternal1;
+    DWORD                      dwUnused1[9];
+    LPDDHAL_CALLBACKS          lpDDCBtmp;
+    LPDDRAWI_DDRAWSURFACE_INT  dsList;
+    LPDDRAWI_DDRAWPALETTE_INT  palList;
+    LPDDRAWI_DDRAWCLIPPER_INT  clipperList;
+    LPDDRAWI_DIRECTDRAW_GBL    lp16DD;
+    DWORD                      dwMaxOverlays;
+    DWORD                      dwCurrOverlays;
+    DWORD                      dwMonitorFrequency;
+    DDCORECAPS                 ddHELCaps;
+    DWORD                      dwUnused2[50];
+    DDCOLORKEY                 ddckCKDestOverlay;
+    DDCOLORKEY                 ddckCKSrcOverlay;
+    VIDMEMINFO                 vmiData;
+    LPVOID                     lpDriverHandle;
+    LPDDRAWI_DIRECTDRAW_LCL    lpExclusiveOwner;
+    DWORD                      dwModeIndex;
+    DWORD                      dwModeIndexOrig;
+    DWORD                      dwNumFourCC;
+    LPDWORD                    lpdwFourCC;
+    DWORD                      dwNumModes;
+    LPDDHALMODEINFO            lpModeInfo;
+    PROCESS_LIST               plProcessList;
+    DWORD                      dwSurfaceLockCount;
+    DWORD                      dwAliasedLockCnt;
+    ULONG_PTR                  dwReserved3;
+    ULONG_PTR                  hDD;
+    char                       cObsolete[12];
+    DWORD                      dwReserved1;
+    DWORD                      dwReserved2;
+    DBLNODE                    dbnOverlayRoot;
+    volatile LPWORD            lpwPDeviceFlags;
+    DWORD                      dwPDevice;
+    DWORD                      dwWin16LockCnt;
+    DWORD                      dwUnused3;
+    DWORD                      hInstance;
+    DWORD                      dwEvent16;
+    DWORD                      dwSaveNumModes;
+    /* DirectX 2 */
+    ULONG_PTR                  lpD3DGlobalDriverData;
+    ULONG_PTR                  lpD3DHALCallbacks;
+    DDCORECAPS                 ddBothCaps;
+    /* DirectX 5.0 */
+    LPDDVIDEOPORTCAPS          lpDDVideoPortCaps;
+    LPDDRAWI_DDVIDEOPORT_INT   dvpList;
+    ULONG_PTR                  lpD3DHALCallbacks2;
+    RECT                       rectDevice;
+    DWORD                      cMonitors;
+    LPVOID                     gpbmiSrc;
+    LPVOID                     gpbmiDest;
+    LPHEAPALIASINFO            phaiHeapAliases;
+    ULONG_PTR                  hKernelHandle;
+    ULONG_PTR                  pfnNotifyProc;
+    LPDDKERNELCAPS             lpDDKernelCaps;
+    LPDDNONLOCALVIDMEMCAPS     lpddNLVCaps;
+    LPDDNONLOCALVIDMEMCAPS     lpddNLVHELCaps;
+    LPDDNONLOCALVIDMEMCAPS     lpddNLVBothCaps;
+    ULONG_PTR                  lpD3DExtendedCaps;
+    /* DirectX 5.0A */
+    DWORD                      dwDOSBoxEvent;
+    RECT                       rectDesktop;
+    char                       cDriverName[MAX_DRIVER_NAME];
+    /* DirectX 6.0 */
+    ULONG_PTR                  lpD3DHALCallbacks3;
+    DWORD                      dwNumZPixelFormats;
+    LPDDPIXELFORMAT            lpZPixelFormats;
+    LPDDRAWI_DDMOTIONCOMP_INT  mcList;
+    DWORD                      hDDVxd;
+    DDSCAPSEX                  ddsCapsMore;
+} DDRAWI_DIRECTDRAW_GBL;
+
+#define DDRAWI_VIRTUALDESKTOP  0x00000008
+#define DDRAWI_MODEX           0x00000010
+#define DDRAWI_DISPLAYDRV      0x00000020
+#define DDRAWI_FULLSCREEN      0x00000040
+#define DDRAWI_MODECHANGED     0x00000080
+#define DDRAWI_NOHARDWARE      0x00000100
+#define DDRAWI_PALETTEINIT     0x00000200
+#define DDRAWI_NOEMULATION     0x00000400
+/* more... */
+
+/* surfaces */
+typedef struct _DDRAWI_DDRAWSURFACE_INT {
+    LPVOID                     lpVtbl;
+    LPDDRAWI_DDRAWSURFACE_LCL  lpLcl;
+    LPDDRAWI_DDRAWSURFACE_INT  lpLink;
+    DWORD                      dwIntRefCnt;
+} DDRAWI_DDRAWSURFACE_INT;
+
+typedef struct _DDRAWI_DDRAWSURFACE_GBL {
+    DWORD                      dwRefCnt;
+    DWORD                      dwGlobalFlags;
+    union {
+       LPACCESSRECTLIST        lpRectList;
+       DWORD                   dwBlockSizeY;
+    } DUMMYUNIONNAME1;
+    union {
+       LPVMEMHEAP              lpVidMemHeap;
+       DWORD                   dwBlockSizeX;
+    } DUMMYUNIONNAME2;
+    union {
+       LPDDRAWI_DIRECTDRAW_GBL lpDD;
+       LPVOID                  lpDDHandle;
+    } DUMMYUNIONNAME3;
+    FLATPTR                    fpVidMem;
+    union {
+       LONG                    lPitch;
+       DWORD                   dwLinearSize;
+    } DUMMYUNIONNAME4;
+    WORD                       wHeight;
+    WORD                       wWidth;
+    DWORD                      dwUsageCount;
+    ULONG_PTR                  dwReserved1; /* for display driver use */
+    /* optional (defaults to primary surface pixelformat) */
+    DDPIXELFORMAT              ddpfSurface;
+} DDRAWI_DDRAWSURFACE_GBL;
+
+#define DDRAWISURFGBL_MEMFREE                  0x00000001
+#define DDRAWISURFGBL_SYSMEMREQUESTED          0x00000002
+#define DDRAWISURFGBL_ISGDISURFACE             0x00000004
+#define DDRAWISURFGBL_SOFTWAREAUTOFLIP         0x00000008
+#define DDRAWISURFGBL_LOCKNOTHOLDINGWIN16LOCK  0x00000010
+#define DDRAWISURFGBL_LOCKVRAMSTYLE            0x00000020
+#define DDRAWISURFGBL_LOCKBROKEN               0x00000040
+#define DDRAWISURFGBL_IMPLICITHANDLE           0x00000080
+#define DDRAWISURFGBL_ISCLIENTMEM              0x00000100
+#define DDRAWISURFGBL_HARDWAREOPSOURCE         0x00000200
+#define DDRAWISURFGBL_HARDWAREOPDEST           0x00000400
+#define DDRAWISURFGBL_HARDWAREOPSTARTED                0x00000600
+#define DDRAWISURFGBL_VPORTINTERLEAVED         0x00000800
+#define DDRAWISURFGBL_VPORTDATA                        0x00001000
+#define DDRAWISURFGBL_LATEALLOCATELINEAR       0x00002000
+#define DDRAWISURFGBL_SYSMEMEXECUTEBUFFER      0x00004000
+#define DDRAWISURFGBL_FASTLOCKHELD             0x00008000
+#define DDRAWISURFGBL_READONLYLOCKHELD         0x00010000
+
+typedef struct _DDRAWI_DDRAWSURFACE_GBL_MORE {
+    DWORD                      dwSize;
+    union {
+       DWORD                   dwPhysicalPageTable;
+       FLATPTR                 fpPhysicalVidMem;
+    } DUMMYUNIONNAME1;
+    LPDWORD                    pPageTable;
+    DWORD                      cPages;
+    ULONG_PTR                  dwSavedDCContext;
+    FLATPTR                    fpAliasedVidMem;
+    ULONG_PTR                  dwDriverReserved;
+    ULONG_PTR                  dwHELReserved;
+    DWORD                      cPageUnlocks;
+    ULONG_PTR                  hKernelSurface;
+    DWORD                      dwKernelRefCnt;
+    LPDDCOLORCONTROL           lpColorInfo;
+    FLATPTR                    fpNTAlias;
+    DWORD                      dwContentsStamp;
+    LPVOID                     lpvUnswappedDriverReserved;
+    LPVOID                     lpDDRAWReserved2;
+    DWORD                      dwDDRAWReserved1;
+    DWORD                      dwDDRAWReserved2;
+    FLATPTR                    fpAliasOfVidMem;
+} DDRAWI_DDRAWSURFACE_GBL_MORE;
+
+/* the MS version of this macro was somewhat obfuscated and unreadable
+ * (possibly because of mediocre MS coders)... so I simplified it...
+ * (and so I commit no copyright violations either, hah) */
+#define GET_LPDDRAWSURFACE_GBL_MORE(psurf_gbl) \
+    (*(((LPDDRAWI_DDRAWSURFACE_GBL_MORE *)(psurf_gbl)) - 1))
+
+typedef struct _DDRAWI_DDRAWSURFACE_MORE {
+    DWORD                      dwSize;
+    IUNKNOWN_LIST *            lpIUnknowns;
+    LPDDRAWI_DIRECTDRAW_LCL    lpDD_lcl;
+    DWORD                      dwPageLockCount;
+    DWORD                      dwBytesAllocated;
+    LPDDRAWI_DIRECTDRAW_INT    lpDD_int;
+    DWORD                      dwMipMapCount;
+    LPDDRAWI_DDRAWCLIPPER_INT  lpDDIClipper;
+    /* DirectX 5.0 */
+    LPHEAPALIASINFO            lpHeapAliasInfo;
+    DWORD                      dwOverlayFlags;
+    VOID                       *rgjunc;
+    LPDDRAWI_DDVIDEOPORT_LCL   lpVideoPort;
+    LPDDOVERLAYFX              lpddOverlayFX;
+    DDSCAPSEX                  ddsCapsEx;
+    DWORD                      dwTextureStage;
+    LPVOID                     lpDDRAWReserved;
+    LPVOID                     lpDDRAWReserved2;
+    LPVOID                     lpDDrawReserved3;
+    DWORD                      dwDDrawReserved4;
+    LPVOID                     lpDDrawReserved5;
+    LPDWORD                    lpGammaRamp;
+    LPDWORD                    lpOriginalGammaRamp;
+    LPVOID                     lpDDrawReserved6;
+    DWORD                      dwSurfaceHandle;
+    DWORD                      qwDDrawReserved8[2];
+    LPVOID                     lpDDrawReserved9;
+    DWORD                      cSurfaces;
+    LPDDSURFACEDESC2           pCreatedDDSurfaceDesc2;
+    LPDDRAWI_DDRAWSURFACE_LCL  *slist;
+    DWORD                      dwFVF;
+    LPVOID                     lpVB;
+} DDRAWI_DDRAWSURFACE_MORE;
+
+typedef struct _DDRAWI_DDRAWSURFACE_LCL {
+    LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore;
+    LPDDRAWI_DDRAWSURFACE_GBL  lpGbl;
+    ULONG_PTR                  hDDSurface;
+    LPATTACHLIST               lpAttachList;
+    LPATTACHLIST               lpAttachListFrom;
+    DWORD                      dwLocalRefCnt;
+    DWORD                      dwProcessId;
+    DWORD                      dwFlags;
+    DDSCAPS                    ddsCaps;
+    LPDDRAWI_DDRAWPALETTE_INT  lpDDPalette;
+    LPDDRAWI_DDRAWCLIPPER_LCL  lpDDClipper;
+    DWORD                      dwModeCreatedIn;
+    DWORD                      dwBackBufferCount;
+    DDCOLORKEY                 ddckCKDestBlt;
+    DDCOLORKEY                 ddckCKSrcBlt;
+    ULONG_PTR                  hDC;
+    ULONG_PTR                  dwReserved1; /* for display driver use */
+    /* overlays only */
+    DDCOLORKEY                 ddckCKSrcOverlay;
+    DDCOLORKEY                 ddckCKDestOverlay;
+    LPDDRAWI_DDRAWSURFACE_INT  lpSurfaceOverlaying;
+    DBLNODE                    dbnOverlayNode;
+    RECT                       rcOverlaySrc;
+    RECT                       rcOverlayDest;
+    DWORD                      dwClrXparent;
+    DWORD                      dwAlpha;
+    LONG                       lOverlayX;
+    LONG                       lOverlayY;
+} DDRAWI_DDRAWSURFACE_LCL;
+
+#define DDRAWISURF_ATTACHED            0x00000001
+#define DDRAWISURF_IMPLICITCREATE      0x00000002
+#define DDRAWISURF_ISFREE              0x00000004
+#define DDRAWISURF_ATTACHED_FROM       0x00000008
+#define DDRAWISURF_IMPLICITROOT                0x00000010
+#define DDRAWISURF_PARTOFPRIMARYCHAIN  0x00000020
+#define DDRAWISURF_DATAISALIASED       0x00000040
+#define DDRAWISURF_HASDC               0x00000080
+#define DDRAWISURF_HASCKEYDESTOVERLAY  0x00000100
+#define DDRAWISURF_HASCKEYDESTBLT      0x00000200
+#define DDRAWISURF_HASCKEYSRCOVERLAY   0x00000400
+#define DDRAWISURF_HASCKEYSRCBLT       0x00000800
+#define DDRAWISURF_LOCKEXCLUDEDCURSOR  0x00001000
+#define DDRAWISURF_HASPIXELFORMAT      0x00002000
+#define DDRAWISURF_HASOVERLAYDATA      0x00004000
+#define DDRAWISURF_SETGAMMA            0x00008000
+/* more... */
+#define DDRAWISURF_INVALID             0x10000000
+
+/* palettes */
+typedef struct _DDRAWI_DDRAWPALETTE_INT {
+    LPVOID                     lpVtbl;
+    LPDDRAWI_DDRAWPALETTE_LCL  lpLcl;
+    LPDDRAWI_DDRAWPALETTE_INT  lpLink;
+    DWORD                      dwIntRefCnt;
+} DDRAWI_DDRAWPALETTE_INT;
+
+typedef struct _DDRAWI_DDRAWPALETTE_GBL {
+    DWORD                      dwRefCnt;
+    DWORD                      dwFlags;
+    LPDDRAWI_DIRECTDRAW_LCL    lpDD_lcl;
+    DWORD                      dwProcessId;
+    LPPALETTEENTRY             lpColorTable;
+    union {
+       ULONG_PTR               dwReserved1; /* for display driver use */
+       HPALETTE                hHELGDIPalette;
+    } DUMMYUNIONNAME1;
+    /* DirectX 5.0 */
+    DWORD                      dwDriverReserved;
+    DWORD                      dwContentsStamp;
+    /* DirectX 6.0 */
+    DWORD                      dwSaveStamp;
+    /* DirectX 7.0 */
+    DWORD                      dwHandle;
+} DDRAWI_DDRAWPALETTE_GBL;
+
+#define DDRAWIPAL_256          0x00000001
+#define DDRAWIPAL_16           0x00000002
+#define DDRAWIPAL_GDI          0x00000004
+#define DDRAWIPAL_STORED_8     0x00000008
+#define DDRAWIPAL_STORED_16    0x00000010
+#define DDRAWIPAL_STORED_24    0x00000020
+#define DDRAWIPAL_EXCLUSIVE    0x00000040
+#define DDRAWIPAL_INHEL                0x00000080
+#define DDRAWIPAL_DIRTY                0x00000100
+#define DDRAWIPAL_ALLOW256     0x00000200
+#define DDRAWIPAL_4            0x00000400
+#define DDRAWIPAL_2            0x00000800
+#define DDRAWIPAL_STORED_8INDEX        0x00001000
+#define DDRAWIPAL_ALPHA                0x00002000
+
+typedef struct _DDRAWI_DDRAWPALETTE_LCL {
+    DWORD                      lpPalMore;
+    LPDDRAWI_DDRAWPALETTE_GBL  lpGbl;
+    ULONG_PTR                  dwUnused0;
+    DWORD                      dwLocalRefCnt;
+    IUnknown *                 pUnkOuter;
+    LPDDRAWI_DIRECTDRAW_LCL    lpDD_lcl;
+    ULONG_PTR                  dwReserved1;
+    /* DirectX 6.0 */
+    ULONG_PTR                  dwDDRAWReserved1;
+    ULONG_PTR                  dwDDRAWReserved2;
+    ULONG_PTR                  dwDDRAWReserved3;
+} DDRAWI_DDRAWPALETTE_LCL;
+
+typedef struct _DDHAL_GETMOCOMPGUIDSDATA FAR *LPDDHAL_GETMOCOMPGUIDSDATA;
+typedef struct _DDHAL_GETMOCOMPFORMATSDATA FAR *LPDDHAL_GETMOCOMPFORMATSDATA;
+typedef struct _DDHAL_CREATEMOCOMPDATA FAR *LPDDHAL_CREATEMOCOMPDATA;
+typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA FAR *LPDDHAL_GETMOCOMPCOMPBUFFDATA;
+typedef struct _DDHAL_GETINTERNALMOCOMPDATA FAR *LPDDHAL_GETINTERNALMOCOMPDATA;
+typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA FAR *LPDDHAL_BEGINMOCOMPFRAMEDATA;
+typedef struct _DDHAL_ENDMOCOMPFRAMEDATA FAR *LPDDHAL_ENDMOCOMPFRAMEDATA;
+typedef struct _DDHAL_RENDERMOCOMPDATA FAR *LPDDHAL_RENDERMOCOMPDATA;
+typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA FAR *LPDDHAL_QUERYMOCOMPSTATUSDATA;
+typedef struct _DDHAL_DESTROYMOCOMPDATA FAR *LPDDHAL_DESTROYMOCOMPDATA;
+typedef struct _DDHAL_COLORCONTROLDATA FAR *LPDDHAL_COLORCONTROLDATA;
+
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETGUIDS)( LPDDHAL_GETMOCOMPGUIDSDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETFORMATS)( LPDDHAL_GETMOCOMPFORMATSDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_CREATE)( LPDDHAL_CREATEMOCOMPDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETCOMPBUFFINFO)( LPDDHAL_GETMOCOMPCOMPBUFFDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_GETINTERNALINFO)( LPDDHAL_GETINTERNALMOCOMPDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_BEGINFRAME)( LPDDHAL_BEGINMOCOMPFRAMEDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_ENDFRAME)( LPDDHAL_ENDMOCOMPFRAMEDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_RENDER)( LPDDHAL_RENDERMOCOMPDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_QUERYSTATUS)( LPDDHAL_QUERYMOCOMPSTATUSDATA);
+typedef DWORD (FAR PASCAL *LPDDHALMOCOMPCB_DESTROY)( LPDDHAL_DESTROYMOCOMPDATA);
+typedef DWORD (FAR PASCAL *LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA);
+
+typedef struct _DDMCCOMPBUFFERINFO
+{
+    DWORD                       dwSize;             // [in]   size of the struct
+    DWORD                       dwNumCompBuffers;   // [out]  number of buffers required for compressed data
+    DWORD                       dwWidthToCreate;    // [out]    Width of surface to create
+    DWORD                       dwHeightToCreate;   // [out]    Height of surface to create
+    DWORD                       dwBytesToAllocate;  // [out]    Total number of bytes used by each surface
+    DDSCAPS2                    ddCompCaps;         // [out]    caps to create surfaces to store compressed data
+    DDPIXELFORMAT               ddPixelFormat;      // [out]  format to create surfaces to store compressed data
+} DDMCCOMPBUFFERINFO, *LPDDMCCOMPBUFFERINFO;
+
+typedef struct _DDMCBUFFERINFO
+{
+    DWORD                       dwSize;         // [in]    size of the struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpCompSurface;  // [in]    pointer to buffer containing compressed data
+    DWORD                       dwDataOffset;   // [in]    offset of relevant data from the beginning of buffer
+    DWORD                       dwDataSize;     // [in]    size of relevant data
+    LPVOID                      lpPrivate;      // Reserved for DirectDraw;
+} DDMCBUFFERINFO, *LPDDMCBUFFERINFO;
+
+typedef struct _DDHAL_GETDRIVERSTATEDATA {
+    DWORD                       dwFlags;
+    union
+    {
+        ULONG_PTR               dwhContext;
+    };
+    LPDWORD                     lpdwStates;
+    DWORD                       dwLength;
+    HRESULT                     ddRVal;
+} DDHAL_GETDRIVERSTATEDATA;
+
+typedef struct _DDHAL_ADDATTACHEDSURFACEDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL         lpDD;
+    LPDDRAWI_DDRAWSURFACE_LCL       lpDDSurface;
+    LPDDRAWI_DDRAWSURFACE_LCL       lpSurfAttached;
+    HRESULT                         ddRVal;
+    LPDDHALSURFCB_ADDATTACHEDSURFACE    AddAttachedSurface;
+} DDHAL_ADDATTACHEDSURFACEDATA;
+
+typedef struct _DDHAL_BEGINMOCOMPFRAMEDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDestSurface;        // [in]  destination buffer in which to decoding this frame
+    DWORD                       dwInputDataSize;      // [in]  size of other misc input data to begin frame
+    LPVOID                      lpInputData;          // [in]  pointer to misc input data
+    DWORD                       dwOutputDataSize;     // [in]  size of other misc output data to begin frame
+    LPVOID                      lpOutputData;         // [in]  pointer to output misc data (allocated by client)
+    HRESULT                     ddRVal;               // [out]
+    LPDDHALMOCOMPCB_BEGINFRAME  BeginMoCompFrame;
+} DDHAL_BEGINMOCOMPFRAMEDATA;
+
+typedef struct _DDHAL_COLORCONTROLDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSurface;    // surface
+    LPDDCOLORCONTROL            lpColorData;    // color control information
+    DWORD                       dwFlags;    // DDRAWI_GETCOLOR/DDRAWI_SETCOLOR
+    HRESULT                     ddRVal;     // return value
+    LPDDHALCOLORCB_COLORCONTROL ColorControl;   // PRIVATE: ptr to callback
+} DDHAL_COLORCONTROLDATA;
+
+typedef struct _DDHAL_CREATEMOCOMPDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    LPGUID                      lpGuid;
+    DWORD                       dwUncompWidth;
+    DWORD                       dwUncompHeight;
+    DDPIXELFORMAT               ddUncompPixelFormat;
+    LPVOID                      lpData;
+    DWORD                       dwDataSize;
+    HRESULT                     ddRVal;
+    LPDDHALMOCOMPCB_CREATE      CreateMoComp;
+} DDHAL_CREATEMOCOMPDATA;
+
+typedef struct _DDHAL_DESTROYMOCOMPDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    HRESULT                     ddRVal;
+    LPDDHALMOCOMPCB_DESTROY     DestroyMoComp;
+} DDHAL_DESTROYMOCOMPDATA;
+
+typedef struct _DDHAL_ENDMOCOMPFRAMEDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    LPVOID                      lpInputData;
+    DWORD                       dwInputDataSize;
+    HRESULT                     ddRVal;
+    LPDDHALMOCOMPCB_ENDFRAME    EndMoCompFrame;
+} DDHAL_ENDMOCOMPFRAMEDATA;
+
+typedef struct _DDHAL_FLIPTOGDISURFACEDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;         // driver struct
+    DWORD                       dwToGDI;          // TRUE if flipping to the GDI surface, FALSE if flipping away
+    DWORD                       dwReserved;       // reserved for future use
+    HRESULT            ddRVal;       // return value
+    LPDDHAL_FLIPTOGDISURFACE    FlipToGDISurface; // PRIVATE: ptr to callback
+} DDHAL_FLIPTOGDISURFACEDATA;
+
+typedef struct _DDHAL_GETAVAILDRIVERMEMORYDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL lpDD;        // driver struct
+    DDSCAPS                 DDSCaps;     // caps for type of surface memory
+    DWORD                   dwTotal;     // total memory for this kind of surface
+    DWORD                   dwFree;      // free memory for this kind of surface
+    HRESULT                 ddRVal;      // return value
+    LPDDHAL_GETAVAILDRIVERMEMORY   GetAvailDriverMemory; // PRIVATE: ptr to callback
+    DDSCAPSEX               ddsCapsEx;       // Added in V6. Driver should check DDVERSION info
+                                                 // to see if this field is present.
+} DDHAL_GETAVAILDRIVERMEMORYDATA;
+
+typedef struct _DDHAL_GETBLTSTATUSDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSurface;    // surface struct
+    DWORD                       dwFlags;    // flags
+    HRESULT                     ddRVal;     // return value
+    LPDDHALSURFCB_GETBLTSTATUS  GetBltStatus;   // PRIVATE: ptr to callback
+} DDHAL_GETBLTSTATUSDATA;
+
+typedef struct _DDHAL_GETFLIPSTATUSDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSurface;    // surface struct
+    DWORD                       dwFlags;    // flags
+    HRESULT                     ddRVal;     // return value
+    LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus;  // PRIVATE: ptr to callback
+} DDHAL_GETFLIPSTATUSDATA;
+
+typedef struct _DDHAL_GETINTERNALMOCOMPDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPGUID                      lpGuid;
+    DWORD                       dwWidth;            // [in]   width of uncompressed data
+    DWORD                       dwHeight;           // [in]   height of uncompressed data
+    DDPIXELFORMAT               ddPixelFormat;      // [in]   pixel-format of uncompressed data
+    DWORD                       dwScratchMemAlloc;  // [out]  amount of scratch memory will the hal allocate for its private use
+    HRESULT                     ddRVal;             // [out]
+    LPDDHALMOCOMPCB_GETINTERNALINFO  GetInternalMoCompInfo;
+} DDHAL_GETINTERNALMOCOMPDATA;
+
+typedef struct _DDHAL_GETMOCOMPCOMPBUFFDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPGUID                      lpGuid;
+    DWORD                       dwWidth;            // [in]   width of uncompressed data
+    DWORD                       dwHeight;           // [in]   height of uncompressed data
+    DDPIXELFORMAT               ddPixelFormat;      // [in]   pixel-format of uncompressed data
+    DWORD                       dwNumTypesCompBuffs;// [in/out] number of memory types required for comp buffers
+    LPDDMCCOMPBUFFERINFO        lpCompBuffInfo;     // [in]   driver supplied info regarding comp buffers (allocated by client)
+    HRESULT                     ddRVal;             // [out]
+    LPDDHALMOCOMPCB_GETCOMPBUFFINFO  GetMoCompBuffInfo;
+} DDHAL_GETMOCOMPCOMPBUFFDATA;
+
+typedef struct _DDHAL_GETMOCOMPGUIDSDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL lpDD;
+    DWORD               dwNumGuids;
+    LPGUID              lpGuids;
+    HRESULT             ddRVal;
+    LPDDHALMOCOMPCB_GETGUIDS GetMoCompGuids;
+} DDHAL_GETMOCOMPGUIDSDATA;
+
+typedef struct _DDHAL_GETMOCOMPFORMATSDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL lpDD;
+    LPGUID              lpGuid;
+    DWORD               dwNumFormats;
+    LPDDPIXELFORMAT     lpFormats;
+    HRESULT             ddRVal;
+    LPDDHALMOCOMPCB_GETFORMATS   GetMoCompFormats;
+} DDHAL_GETMOCOMPFORMATSDATA;
+
+typedef struct _DDHAL_GETSCANLINEDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    DWORD                       dwScanLine; // returned scan line
+    HRESULT                     ddRVal;     // return value
+    LPDDHAL_GETSCANLINE         GetScanLine;    // PRIVATE: ptr to callback
+} DDHAL_GETSCANLINEDATA;
+
+typedef struct _DDHAL_QUERYMOCOMPSTATUSDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    LPDDRAWI_DDRAWSURFACE_LCL   lpSurface;      // [in]  Surface being queried
+    DWORD                       dwFlags;        // [in]  DDMCQUERY_XXX falgs
+    HRESULT                     ddRVal;         // [out]
+    LPDDHALMOCOMPCB_QUERYSTATUS QueryMoCompStatus;
+} DDHAL_QUERYMOCOMPSTATUSDATA;
+
+typedef struct _DDHAL_RENDERMOCOMPDATA
+{
+    LPDDRAWI_DIRECTDRAW_LCL     lpDD;
+    LPDDRAWI_DDMOTIONCOMP_LCL   lpMoComp;
+    DWORD                       dwNumBuffers;   // [in]  Number of entries in the lpMacroBlockInfo array
+    LPDDMCBUFFERINFO            lpBufferInfo;   // [in]  Surfaces containing macro block info
+    DWORD                       dwFunction;     // [in]  Function
+    LPVOID                      lpInputData;
+    DWORD                       dwInputDataSize;
+    LPVOID                      lpOutputData;
+    DWORD                       dwOutputDataSize;
+    HRESULT                     ddRVal;         // [out]
+    LPDDHALMOCOMPCB_RENDER      RenderMoComp;
+} DDHAL_RENDERMOCOMPDATA;
+
+typedef struct _DDHAL_SETCOLORKEYDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSurface;    // surface struct
+    DWORD                       dwFlags;    // flags
+    DDCOLORKEY                  ckNew;      // new color key
+    HRESULT                     ddRVal;     // return value
+    LPDDHALSURFCB_SETCOLORKEY   SetColorKey;    // PRIVATE: ptr to callback
+} DDHAL_SETCOLORKEYDATA;
+
+typedef struct _DDHAL_SETOVERLAYPOSITIONDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSrcSurface; // src surface
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDDestSurface;// dest surface
+    LONG                        lXPos;      // x position
+    LONG                        lYPos;      // y position
+    HRESULT                     ddRVal;     // return value
+    LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition; // PRIVATE: ptr to callback
+} DDHAL_SETOVERLAYPOSITIONDATA;
+
+typedef struct _DDHAL_UPDATEOVERLAYDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDDestSurface;// dest surface
+    RECTL                       rDest;      // dest rect
+    LPDDRAWI_DDRAWSURFACE_LCL   lpDDSrcSurface; // src surface
+    RECTL                       rSrc;       // src rect
+    DWORD                       dwFlags;    // flags
+    DDOVERLAYFX                 overlayFX;  // overlay FX
+    HRESULT                     ddRVal;     // return value
+    LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay;  // PRIVATE: ptr to callback
+} DDHAL_UPDATEOVERLAYDATA;
+
+typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
+{
+    LPDDRAWI_DIRECTDRAW_GBL     lpDD;       // driver struct
+    DWORD                       dwFlags;    // flags
+    DWORD                       bIsInVB;    // is in vertical blank
+    ULONG_PTR                   hEvent;     // event
+    HRESULT                     ddRVal;     // return value
+    LPDDHAL_WAITFORVERTICALBLANK    WaitForVerticalBlank; // PRIVATE: ptr to callback
+} DDHAL_WAITFORVERTICALBLANKDATA;
+
+typedef struct _DD_D3DBUFCALLBACKS
+{
+    DWORD dwSize;
+    DWORD dwFlags;
+    LPDDHAL_CANCREATESURFACE        CanCreateD3DBuffer;
+       LPDDHAL_CREATESURFACE           CreateD3DBuffer;
+    LPDDHALSURFCB_DESTROYSURFACE   DestroyD3DBuffer;
+       LPDDHALSURFCB_LOCK             LockD3DBuffer;
+    LPDDHALSURFCB_UNLOCK           UnlockD3DBuffer;
+} DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __WINE_DDRAWI_H */
index 9be3e0b..89eb1f8 100644 (file)
@@ -16,6 +16,7 @@
 #else
 #include <windows.h>
 #endif
+#include <ddk\ddrawi.h>
 
 #ifndef IN
 #define IN
 typedef DWORD PTRDIFF;
 #endif
 
-#define GDI_DRIVER_VERSION 0x4000   /* NT 4 compatibility */
+#define DDI_DRIVER_VERSION_NT4 0x20000
+#define DDI_DRIVER_VERSION_SP3 0x20003
+#define DDI_DRIVER_VERSION_NT5 0x30000
+#define DDI_DRIVER_VERSION_NT5_01 0x30100
 
-/* FIXME: find definitions for these structs  */
-typedef PVOID  PCOLORADJUSTMENT;
-typedef PVOID  PDD_CALLBACKS;
-typedef PVOID  PDD_HALINFO;
-typedef PVOID  PDD_PALETTECALLBACKS;
-typedef PVOID  PDD_SURFACECALLBACKS;
-typedef PVOID  PFONTINFO;
-typedef PVOID  PGAMMA_TABLES;
-typedef PVOID  PGLYPHDATA;
-typedef DWORD  MIX;
-typedef DWORD  ROP4;
-typedef PVOID  PTTPOLYGONHEADER;
-typedef PVOID  PVIDEOMEMORY;
+#define GDI_DRIVER_VERSION 0x4000   /* NT 4 compatibility */
 
+typedef DDHAL_DDCALLBACKS *PDD_CALLBACKS;
+typedef DDHALINFO *PDD_HALINFO;
+typedef DDHAL_DDPALETTECALLBACKS *PDD_PALETTECALLBACKS;
+typedef DDHAL_DDSURFACECALLBACKS *PDD_SURFACECALLBACKS;
+typedef struct _VIDEOMEMORY
+{
+    DWORD               dwFlags;
+    FLATPTR             fpStart;
+    union
+    {
+        FLATPTR         fpEnd;
+        DWORD           dwWidth;
+    };
+    DDSCAPS             ddsCaps;
+    DDSCAPS             ddsCapsAlt;
+    union
+    {
+        struct _VMEMHEAP *lpHeap;
+        DWORD           dwHeight;
+    };
+} VIDEOMEMORY, *PVIDEOMEMORY;
+
+typedef struct _FONTINFO
+{
+    ULONG   cjThis;
+    FLONG   flCaps;
+    ULONG   cGlyphsSupported;
+    ULONG   cjMaxGlyph1;
+    ULONG   cjMaxGlyph4;
+    ULONG   cjMaxGlyph8;
+    ULONG   cjMaxGlyph32;
+} FONTINFO, *PFONTINFO;
+
+typedef BYTE GAMMA_TABLES[2][256];
+typedef GAMMA_TABLES *PGAMMA_TABLES;
+typedef COLORADJUSTMENT *PCOLORADJUSTMENT;
+
+typedef ULONG  MIX;
+typedef ULONG  ROP4;
 #define  DDI_DRIVER_VERSION  0x00010000
 
-/* FIXME: how big should this constant be?  */
 #define  HS_DDI_MAX  6
 
 /* XLate types */
@@ -67,7 +97,9 @@ enum _BMF_TYPES
   BMF_24BPP,
   BMF_32BPP,
   BMF_4RLE,
-  BMF_8RLE
+  BMF_8RLE,
+  BMF_JPEG,
+  BMF_PNG
 };
 
 #define  BMF_TOPDOWN     0x00000001
@@ -75,6 +107,10 @@ enum _BMF_TYPES
 #define  BMF_DONTCACHE   0x00000004
 #define  BMF_USERMEM     0x00000008
 #define  BMF_KMSECTION   0x00000010
+#define  BMF_NOTSYSMEM  0x0020
+#define  BMF_WINDOW_BLT 0x0040
+#define  BMF_UMPDMEM    0x0080
+#define  BMF_RESERVED   0xFF00
 
 #define DC_TRIVIAL      0
 #define DC_RECT         1
@@ -188,6 +224,13 @@ enum _FP_MODES
   FP_WINDINGMODE
 };
 
+typedef struct _FD_GLYPHATTR {
+    ULONG    cjThis;
+    ULONG    cGlyphs;
+    ULONG    iMode;
+    BYTE     aGlyphAttr[1];
+} FD_GLYPHATTR, *PFD_GLYPHATTR;
+
 enum _GLYPH_MODE
 {
   FO_HGLYPHS,
@@ -290,6 +333,7 @@ enum _DRV_HOOK_FUNCS
   INDEX_DrvDisableSurface,
   INDEX_DrvAssertMode,
   INDEX_DrvResetPDEV = 7,
+  INDEX_DrvDisableDriver,
   INDEX_DrvCreateDeviceBitmap = 10,
   INDEX_DrvDeleteDeviceBitmap,
   INDEX_DrvRealizeBrush,
@@ -329,7 +373,8 @@ enum _DRV_HOOK_FUNCS
   INDEX_DrvQueryTrueTypeOutline,
   INDEX_DrvGetTrueTypeFile,
   INDEX_DrvQueryFontFile,
-  INDEX_DrvQueryAdvanceWidths = 53,
+  INDEX_DrvMovePanning,
+  INDEX_DrvQueryAdvanceWidths,
   INDEX_DrvSetPixelFormat,
   INDEX_DrvDescribePixelFormat,
   INDEX_DrvSwapBuffers,
@@ -339,7 +384,35 @@ enum _DRV_HOOK_FUNCS
   INDEX_DrvEnableDirectDraw,
   INDEX_DrvDisableDirectDraw,
   INDEX_DrvQuerySpoolType,
-  INDEX_DrvTransparentBlt = 74,
+  INDEX_DrvIcmCreateColorTransform,
+  INDEX_DrvIcmDeleteColorTransform,
+  INDEX_DrvIcmCheckBitmapBits,
+  INDEX_DrvIcmSetDeviceGammaRamp,
+  INDEX_DrvGradientFill,
+  INDEX_DrvStretchBltROP,
+  INDEX_DrvPlgBlt,
+  INDEX_DrvAlphaBlend,
+  INDEX_DrvSynthesizeFont,
+  INDEX_DrvGetSynthesizedFontFiles,
+  INDEX_DrvTransparentBlt,
+  INDEX_DrvQueryPerBandInfo,
+  INDEX_DrvQueryDeviceSupport,
+  INDEX_DrvReserved1,
+  INDEX_DrvReserved2,
+  INDEX_DrvReserved3,
+  INDEX_DrvReserved4,
+  INDEX_DrvReserved5,
+  INDEX_DrvReserved6,
+  INDEX_DrvReserved7,
+  INDEX_DrvReserved8,
+  INDEX_DrvQueryGlyphAttrs,
+  INDEX_DrvNotify,
+  INDEX_DrvSynchronizeSurface,
+  INDEX_DrvResetDevice,
+  INDEX_DrvReserved9,
+  INDEX_DrvReserved10,
+  INDEX_DrvReserved11,
+  INDEX_DrvDeriveSurface = 85,
   INDEX_LAST
 };
 
@@ -430,8 +503,7 @@ typedef struct _DRVENABLEDATA
   DRVFN  *pdrvfn;
 } DRVENABLEDATA, *PDRVENABLEDATA;
 
-/* FIXME: replace this with correct def for LDECI4  */
-typedef DWORD  LDECI4;
+typedef LONG  LDECI4;
 
 typedef struct _CIECHROMA
 {
@@ -516,7 +588,7 @@ typedef struct _BRUSHOBJ
 {
   ULONG  iSolidColor;
   PVOID  pvRbrush;
-
+  FLONG  flColorType;
   /*  remainder of fields are for GDI internal use  */
   LOGBRUSH  logbrush;
 } BRUSHOBJ, *PBRUSHOBJ;
@@ -537,6 +609,19 @@ typedef struct _ENUMRECTS
   RECTL  arcl[1];
 } ENUMRECTS, *PENUMRECTS;
 
+typedef struct _BLENDOBJ
+{
+    BLENDFUNCTION BlendFunction;
+}BLENDOBJ,*PBLENDOBJ;
+
+typedef struct
+{
+   DWORD nSize;
+   HDC   hdc;
+   PBYTE pvEMF;
+   PBYTE pvCurrentRecord;
+} EMFINFO, *PEMFINFO;
+
 typedef struct _FONTOBJ
 {
   ULONG  iUniq;
@@ -628,6 +713,7 @@ typedef struct _XLATEOBJ
 
 typedef struct _PALOBJ
 {
+  ULONG   ulReserved;
   PXLATEOBJ logicalToSystem;
   int *mapping;
   PLOGPALETTE logpalette; /* _MUST_ be the last field */
@@ -667,7 +753,7 @@ typedef VOID (CALLBACK * WNDOBJCHANGEPROC)(PWNDOBJ WndObj, ULONG Flags);
 
 typedef struct _XFORMOBJ
 {
-  /* FIXME: what does this beast look like?  */
+    ULONG ulReserved;
 } XFORMOBJ, *PXFORMOBJ;
 
 typedef struct _GLYPHBITS
@@ -683,6 +769,24 @@ typedef union _GLYPHDEF
   PATHOBJ    *ppo;
 } GLYPHDEF;
 
+typedef struct _POINTQF
+{
+    LARGE_INTEGER x;
+    LARGE_INTEGER y;
+} POINTQF, *PPOINTQF;
+
+typedef struct _GLYPHDATA {
+        GLYPHDEF gdf;
+        HGLYPH   hg;
+        FIX      fxD;
+        FIX      fxA;
+        FIX      fxAB;
+        FIX      fxInkTop;
+        FIX      fxInkBottom;
+        RECTL    rclInk;
+        POINTQF  ptqD;
+} GLYPHDATA, *PGLYPHDATA;
+
 typedef struct _GLYPHPOS
 {
   HGLYPH     hg;
@@ -831,6 +935,7 @@ typedef struct _XFORML
 BOOL STDCALL
 DrvAssertMode(IN DHPDEV PDev,
              IN BOOL ShouldEnable);
+
 BOOL STDCALL
 DrvBitBlt(IN PSURFOBJ DestSurface,
          IN PSURFOBJ SrcSurface,
@@ -1159,8 +1264,8 @@ CLIPOBJ_cEnumStart(IN PCLIPOBJ ClipObj,
 PPATHOBJ STDCALL
 CLIPOBJ_ppoGetPath(PCLIPOBJ ClipObj);
 
-/* FIXME: find correct defines for following symbols  */
 #define  FL_ZERO_MEMORY  1
+#define  FL_NONPAGED_MEMORY 2
 
 PVOID STDCALL
 EngAllocMem(ULONG Flags,
@@ -1190,7 +1295,6 @@ EngBitBlt(SURFOBJ *Dest,
          ROP4 rop4);
 
 /*
-EngCheckAbort
 EngComputeGlyphSet
 */
 
@@ -1284,10 +1388,6 @@ EngDeleteEvent
 BOOL STDCALL
 EngDeletePalette(IN HPALETTE Palette);
 
-/*
-EngDeletePath
-*/
-
 BOOL STDCALL
 EngDeleteSurface(IN HSURF Surface);
 
@@ -1314,7 +1414,6 @@ EngEraseSurface(SURFOBJ *Surface,
                ULONG iColor);
 
 /*
-EngFillPath
 EngFindImageProcAddress
 EngFindResource
 */
@@ -1334,14 +1433,12 @@ EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
                      OUT PUSHORT AnsiCodePage);
 
 /*
-EngGetDriverName
 EngGetFileChangeTime
 EngGetFilePath
 EngGetForm
 EngGetLastError
 EngGetPrinter
 EngGetPrinterData
-EngGetPrinterDataFileName
 EngGetProcessHandle
 EngGetType1FontList
 */
@@ -1361,7 +1458,6 @@ HANDLE STDCALL
 EngLoadImage(LPWSTR DriverName);
 
 /*
-EngLoadModule
 EngLoadModuleForWrite
 EngLockDriverObj
 */
@@ -1373,7 +1469,6 @@ EngLockSurface(IN HSURF Surface);
 EngMapEvent
 EngMapFontFile
 EngMapModule
-EngMarkBandingSurface
 EngMovePointer
 */
 
@@ -1389,10 +1484,6 @@ EngMultiByteToUnicodeN(OUT LPWSTR UnicodeString,
                       IN PCHAR MultiByteString,
                       IN ULONG BytesInMultiByteString);
 
-/*
-EngMultiByteToWideChar
-*/
-
 BOOL STDCALL
 EngPaint(IN SURFOBJ *Surface,
         IN CLIPOBJ *ClipRegion,
@@ -1423,7 +1514,6 @@ void STDCALL
 EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc);
 
 /*
-EngStretchBlt
 EngStrokeAndFillPath
 EngStrokePath
 EngTextOut
@@ -1449,7 +1539,6 @@ EngUnicodeToMultiByteN(OUT PCHAR MultiByteString,
 /*
 EngUnloadImage
 EngUnlockDriverObj
-EngUnlockSurface
 EngUnmapEvent
 EngUnmapFontFile
 EngUnsecureMem = NTOSKRNL.MmUnsecureVirtualMemory
@@ -1500,7 +1589,7 @@ FONTOBJ_cGetGlyphs(IN PFONTOBJ FontObj,
 
 PGAMMA_TABLES
 STDCALL
-FONTOBJ_pGetGammaTables(IN PFONTOBJ  FontObj);
+FONTOBJ_pGetGammaTables(IN PFONTOBJ FontObj);
 
 IFIMETRICS*
 STDCALL
@@ -1535,14 +1624,12 @@ PALOBJ_cGetColors(PALOBJ *PalObj,
 
 /*
 PATHOBJ_bCloseFigure
-PATHOBJ_bEnum
 PATHOBJ_bEnumClipLines
 PATHOBJ_bMoveTo
 PATHOBJ_bPolyBezierTo
 PATHOBJ_bPolyLineTo
 PATHOBJ_vEnumStart
 PATHOBJ_vEnumStartClipLines
-PATHOBJ_vGetBounds
 RtlAnsiCharToUnicodeChar = NTOSKRNL.RtlAnsiCharToUnicodeChar
 RtlMultiByteToUnicodeN = NTOSKRNL.RtlMultiByteToUnicodeN
 RtlRaiseException = NTOSKRNL.RtlRaiseException
@@ -1575,5 +1662,85 @@ XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
 ULONG * STDCALL
 XLATEOBJ_piVector(XLATEOBJ *XlateObj);
 
-#endif
+HANDLE STDCALL
+BRUSHOBJ_hGetColorTransform(BRUSHOBJ *pbo);
+ULONG STDCALL
+BRUSHOBJ_ulGetBrushColor(BRUSHOBJ *pbo);
+BOOL STDCALL 
+EngAlphaBlend(SURFOBJ *psoDest,SURFOBJ *psoSrc,CLIPOBJ *pco,XLATEOBJ *pxlo,RECTL *prclDest,RECTL *prclSrc,BLENDOBJ *pBlendObj);
+BOOL STDCALL
+EngCheckAbort(SURFOBJ *pso);
+FD_GLYPHSET* STDCALL
+EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars);
+VOID STDCALL
+EngDeletePath(PATHOBJ *ppo);
+BOOL STDCALL
+EngFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,MIX mix,FLONG flOptions);
+PVOID STDCALL
+EngFindResource(HANDLE h,int iName,int iType,PULONG pulSize);
+VOID STDCALL 
+EngFreeModule(HANDLE h);
+LPWSTR STDCALL
+EngGetDriverName(HDEV hdev);
+LPWSTR STDCALL
+EngGetPrinterDataFileName(HDEV hdev);
+BOOL STDCALL 
+EngGradientFill(SURFOBJ *psoDest,CLIPOBJ *pco,XLATEOBJ *pxlo,TRIVERTEX *pVertex,ULONG nVertex,PVOID pMesh,ULONG nMesh,RECTL *prclExtents,POINTL *pptlDitherOrg,ULONG ulMode);
+HANDLE STDCALL 
+EngLoadModule(LPWSTR pwsz);
+BOOL STDCALL 
+EngMarkBandingSurface(HSURF hsurf);
+INT STDCALL 
+EngMultiByteToWideChar(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString);
+BOOL STDCALL 
+EngPlgBlt(SURFOBJ *psoTrg,SURFOBJ *psoSrc,SURFOBJ *psoMsk,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlBrushOrg,POINTFIX *pptfx,RECTL *prcl,POINTL *pptl,ULONG iMode);
+BOOL STDCALL
+EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo);
+VOID STDCALL 
+EngQueryLocalTime(PENG_TIME_FIELDS etf);
+BOOL STDCALL 
+EngStretchBlt(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode);
+BOOL STDCALL 
+EngStretchBltROP(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode,BRUSHOBJ *pbo,DWORD rop4);
+BOOL STDCALL 
+EngStrokeAndFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pboStroke,LINEATTRS *plineattrs,BRUSHOBJ *pboFill,POINTL *pptlBrushOrg,MIX mixFill,FLONG flOptions);
+BOOL STDCALL
+EngStrokePath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,LINEATTRS *plineattrs,MIX mix);
+BOOL STDCALL 
+EngTextOut(SURFOBJ *pso,STROBJ *pstro,FONTOBJ *pfo,CLIPOBJ *pco,RECTL *prclExtra,RECTL *prclOpaque,BRUSHOBJ *pboFore,BRUSHOBJ *pboOpaque,POINTL *pptlOrg,MIX mix);
+VOID STDCALL 
+EngUnlockSurface(SURFOBJ *pso);
+INT STDCALL 
+EngWideCharToMultiByte(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString);
+PFD_GLYPHATTR STDCALL
+FONTOBJ_pQueryGlyphAttrs(FONTOBJ *pfo,ULONG iMode);
+VOID STDCALL
+PATHOBJ_vGetBounds(PATHOBJ *ppo,PRECTFX prectfx);
+FD_GLYPHSET *STDCALL
+FONTOBJ_pfdg(FONTOBJ *pfo);
+BOOL STDCALL
+PATHOBJ_bEnum(PATHOBJ *ppo,PATHDATA *ppd);
+BOOL STDCALL 
+PATHOBJ_bEnumClipLines(PATHOBJ *ppo,ULONG cb,CLIPLINE *pcl);
+VOID STDCALL 
+PATHOBJ_vEnumStart(PATHOBJ *ppo);
+VOID STDCALL
+PATHOBJ_vEnumStartClipLines(PATHOBJ *ppo,CLIPOBJ *pco,SURFOBJ *pso,LINEATTRS *pla);
+BOOL STDCALL
+STROBJ_bEnum(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos);
+BOOL STDCALL
+STROBJ_bEnumPositionsOnly(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos);
+BOOL STDCALL
+STROBJ_bGetAdvanceWidths(STROBJ *pso,ULONG iFirst,ULONG c,POINTQF *pptqD);
+DWORD STDCALL
+STROBJ_dwGetCodePage(STROBJ  *pstro);
+VOID STDCALL
+STROBJ_vEnumStart(STROBJ *pstro);
+ULONG STDCALL
+XFORMOBJ_iGetXform(XFORMOBJ *pxo,XFORML *pxform);
+BOOL STDCALL
+XFORMOBJ_bApplyXform(XFORMOBJ *pxo,ULONG iMode,ULONG cPoints,PVOID pvIn,PVOID pvOut);
+HANDLE STDCALL
+XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo);
 
+#endif
diff --git a/reactos/include/ddraw.h b/reactos/include/ddraw.h
new file mode 100644 (file)
index 0000000..1859702
--- /dev/null
@@ -0,0 +1,953 @@
+/*
+ * Copyright (C) the Wine project
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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
+ */
+
+#ifndef __WINE_DDRAW_H
+#define __WINE_DDRAW_H
+
+#include <windows.h> /* LARGE_INTEGER ... */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+#define DDENUMRET_CANCEL       0
+#define DDENUMRET_OK           1
+
+#define DD_OK                  0
+
+#define _FACDD         0x876
+#define MAKE_DDHRESULT( code )  MAKE_HRESULT( 1, _FACDD, code )
+
+#define DDERR_ALREADYINITIALIZED               MAKE_DDHRESULT( 5 )
+#define DDERR_CANNOTATTACHSURFACE              MAKE_DDHRESULT( 10 )
+#define DDERR_CANNOTDETACHSURFACE              MAKE_DDHRESULT( 20 )
+#define DDERR_CURRENTLYNOTAVAIL                        MAKE_DDHRESULT( 40 )
+#define DDERR_EXCEPTION                                MAKE_DDHRESULT( 55 )
+#define DDERR_GENERIC                          E_FAIL
+#define DDERR_HEIGHTALIGN                      MAKE_DDHRESULT( 90 )
+#define DDERR_INCOMPATIBLEPRIMARY              MAKE_DDHRESULT( 95 )
+#define DDERR_INVALIDCAPS                      MAKE_DDHRESULT( 100 )
+#define DDERR_INVALIDCLIPLIST                  MAKE_DDHRESULT( 110 )
+#define DDERR_INVALIDMODE                      MAKE_DDHRESULT( 120 )
+#define DDERR_INVALIDOBJECT                    MAKE_DDHRESULT( 130 )
+#define DDERR_INVALIDPARAMS                    E_INVALIDARG
+#define DDERR_INVALIDPIXELFORMAT               MAKE_DDHRESULT( 145 )
+#define DDERR_INVALIDRECT                      MAKE_DDHRESULT( 150 )
+#define DDERR_LOCKEDSURFACES                   MAKE_DDHRESULT( 160 )
+#define DDERR_NO3D                             MAKE_DDHRESULT( 170 )
+#define DDERR_NOALPHAHW                                MAKE_DDHRESULT( 180 )
+#define DDERR_NOSTEREOHARDWARE                 MAKE_DDHRESULT( 181 )
+#define DDERR_NOSURFACELEFT                     MAKE_DDHRESULT( 182 )
+#define DDERR_NOCLIPLIST                       MAKE_DDHRESULT( 205 )
+#define DDERR_NOCOLORCONVHW                    MAKE_DDHRESULT( 210 )
+#define DDERR_NOCOOPERATIVELEVELSET            MAKE_DDHRESULT( 212 )
+#define DDERR_NOCOLORKEY                       MAKE_DDHRESULT( 215 )
+#define DDERR_NOCOLORKEYHW                     MAKE_DDHRESULT( 220 )
+#define DDERR_NODIRECTDRAWSUPPORT              MAKE_DDHRESULT( 222 )
+#define DDERR_NOEXCLUSIVEMODE                  MAKE_DDHRESULT( 225 )
+#define DDERR_NOFLIPHW                         MAKE_DDHRESULT( 230 )
+#define DDERR_NOGDI                            MAKE_DDHRESULT( 240 )
+#define DDERR_NOMIRRORHW                       MAKE_DDHRESULT( 250 )
+#define DDERR_NOTFOUND                         MAKE_DDHRESULT( 255 )
+#define DDERR_NOOVERLAYHW                      MAKE_DDHRESULT( 260 )
+#define DDERR_OVERLAPPINGRECTS                  MAKE_DDHRESULT( 270 )
+#define DDERR_NORASTEROPHW                     MAKE_DDHRESULT( 280 )
+#define DDERR_NOROTATIONHW                     MAKE_DDHRESULT( 290 )
+#define DDERR_NOSTRETCHHW                      MAKE_DDHRESULT( 310 )
+#define DDERR_NOT4BITCOLOR                     MAKE_DDHRESULT( 316 )
+#define DDERR_NOT4BITCOLORINDEX                        MAKE_DDHRESULT( 317 )
+#define DDERR_NOT8BITCOLOR                     MAKE_DDHRESULT( 320 )
+#define DDERR_NOTEXTUREHW                      MAKE_DDHRESULT( 330 )
+#define DDERR_NOVSYNCHW                                MAKE_DDHRESULT( 335 )
+#define DDERR_NOZBUFFERHW                      MAKE_DDHRESULT( 340 )
+#define DDERR_NOZOVERLAYHW                     MAKE_DDHRESULT( 350 )
+#define DDERR_OUTOFCAPS                                MAKE_DDHRESULT( 360 )
+#define DDERR_OUTOFMEMORY                      E_OUTOFMEMORY
+#define DDERR_OUTOFVIDEOMEMORY                 MAKE_DDHRESULT( 380 )
+#define DDERR_OVERLAYCANTCLIP                  MAKE_DDHRESULT( 382 )
+#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE     MAKE_DDHRESULT( 384 )
+#define DDERR_PALETTEBUSY                      MAKE_DDHRESULT( 387 )
+#define DDERR_COLORKEYNOTSET                   MAKE_DDHRESULT( 400 )
+#define DDERR_SURFACEALREADYATTACHED           MAKE_DDHRESULT( 410 )
+#define DDERR_SURFACEALREADYDEPENDENT          MAKE_DDHRESULT( 420 )
+#define DDERR_SURFACEBUSY                      MAKE_DDHRESULT( 430 )
+#define DDERR_CANTLOCKSURFACE                  MAKE_DDHRESULT( 435 )
+#define DDERR_SURFACEISOBSCURED                        MAKE_DDHRESULT( 440 )
+#define DDERR_SURFACELOST                      MAKE_DDHRESULT( 450 )
+#define DDERR_SURFACENOTATTACHED               MAKE_DDHRESULT( 460 )
+#define DDERR_TOOBIGHEIGHT                     MAKE_DDHRESULT( 470 )
+#define DDERR_TOOBIGSIZE                       MAKE_DDHRESULT( 480 )
+#define DDERR_TOOBIGWIDTH                      MAKE_DDHRESULT( 490 )
+#define DDERR_UNSUPPORTED                      E_NOTIMPL
+#define DDERR_UNSUPPORTEDFORMAT                        MAKE_DDHRESULT( 510 )
+#define DDERR_UNSUPPORTEDMASK                  MAKE_DDHRESULT( 520 )
+#define DDERR_INVALIDSTREAM                     MAKE_DDHRESULT( 521 )
+#define DDERR_VERTICALBLANKINPROGRESS          MAKE_DDHRESULT( 537 )
+#define DDERR_WASSTILLDRAWING                  MAKE_DDHRESULT( 540 )
+#define DDERR_DDSCAPSCOMPLEXREQUIRED            MAKE_DDHRESULT( 542 )
+#define DDERR_XALIGN                           MAKE_DDHRESULT( 560 )
+#define DDERR_INVALIDDIRECTDRAWGUID            MAKE_DDHRESULT( 561 )
+#define DDERR_DIRECTDRAWALREADYCREATED         MAKE_DDHRESULT( 562 )
+#define DDERR_NODIRECTDRAWHW                   MAKE_DDHRESULT( 563 )
+#define DDERR_PRIMARYSURFACEALREADYEXISTS      MAKE_DDHRESULT( 564 )
+#define DDERR_NOEMULATION                      MAKE_DDHRESULT( 565 )
+#define DDERR_REGIONTOOSMALL                   MAKE_DDHRESULT( 566 )
+#define DDERR_CLIPPERISUSINGHWND               MAKE_DDHRESULT( 567 )
+#define DDERR_NOCLIPPERATTACHED                        MAKE_DDHRESULT( 568 )
+#define DDERR_NOHWND                           MAKE_DDHRESULT( 569 )
+#define DDERR_HWNDSUBCLASSED                   MAKE_DDHRESULT( 570 )
+#define DDERR_HWNDALREADYSET                   MAKE_DDHRESULT( 571 )
+#define DDERR_NOPALETTEATTACHED                        MAKE_DDHRESULT( 572 )
+#define DDERR_NOPALETTEHW                      MAKE_DDHRESULT( 573 )
+#define DDERR_BLTFASTCANTCLIP                  MAKE_DDHRESULT( 574 )
+#define DDERR_NOBLTHW                          MAKE_DDHRESULT( 575 )
+#define DDERR_NODDROPSHW                       MAKE_DDHRESULT( 576 )
+#define DDERR_OVERLAYNOTVISIBLE                        MAKE_DDHRESULT( 577 )
+#define DDERR_NOOVERLAYDEST                    MAKE_DDHRESULT( 578 )
+#define DDERR_INVALIDPOSITION                  MAKE_DDHRESULT( 579 )
+#define DDERR_NOTAOVERLAYSURFACE               MAKE_DDHRESULT( 580 )
+#define DDERR_EXCLUSIVEMODEALREADYSET          MAKE_DDHRESULT( 581 )
+#define DDERR_NOTFLIPPABLE                     MAKE_DDHRESULT( 582 )
+#define DDERR_CANTDUPLICATE                    MAKE_DDHRESULT( 583 )
+#define DDERR_NOTLOCKED                                MAKE_DDHRESULT( 584 )
+#define DDERR_CANTCREATEDC                     MAKE_DDHRESULT( 585 )
+#define DDERR_NODC                             MAKE_DDHRESULT( 586 )
+#define DDERR_WRONGMODE                                MAKE_DDHRESULT( 587 )
+#define DDERR_IMPLICITLYCREATED                        MAKE_DDHRESULT( 588 )
+#define DDERR_NOTPALETTIZED                    MAKE_DDHRESULT( 589 )
+#define DDERR_UNSUPPORTEDMODE                  MAKE_DDHRESULT( 590 )
+#define DDERR_NOMIPMAPHW                       MAKE_DDHRESULT( 591 )
+#define DDERR_INVALIDSURFACETYPE               MAKE_DDHRESULT( 592 )
+#define DDERR_NOOPTIMIZEHW                     MAKE_DDHRESULT( 600 )
+#define DDERR_NOTLOADED                                MAKE_DDHRESULT( 601 )
+#define DDERR_NOFOCUSWINDOW                    MAKE_DDHRESULT( 602 )
+#define DDERR_NOTONMIPMAPSUBLEVEL               MAKE_DDHRESULT( 603 )
+#define DDERR_DCALREADYCREATED                 MAKE_DDHRESULT( 620 )
+#define DDERR_NONONLOCALVIDMEM                 MAKE_DDHRESULT( 630 )
+#define DDERR_CANTPAGELOCK                     MAKE_DDHRESULT( 640 )
+#define DDERR_CANTPAGEUNLOCK                   MAKE_DDHRESULT( 660 )
+#define DDERR_NOTPAGELOCKED                    MAKE_DDHRESULT( 680 )
+#define DDERR_MOREDATA                         MAKE_DDHRESULT( 690 )
+#define DDERR_EXPIRED                           MAKE_DDHRESULT( 691 )
+#define DDERR_TESTFINISHED                      MAKE_DDHRESULT( 692 )
+#define DDERR_NEWMODE                           MAKE_DDHRESULT( 693 )
+#define DDERR_D3DNOTINITIALIZED                 MAKE_DDHRESULT( 694 )
+#define DDERR_VIDEONOTACTIVE                   MAKE_DDHRESULT( 695 )
+#define DDERR_NOMONITORINFORMATION              MAKE_DDHRESULT( 696 )
+#define DDERR_NODRIVERSUPPORT                   MAKE_DDHRESULT( 697 )
+#define DDERR_DEVICEDOESNTOWNSURFACE           MAKE_DDHRESULT( 699 )
+#define DDERR_NOTINITIALIZED                   CO_E_NOTINITIALIZED
+
+/* dwFlags for Blt* */
+#define DDBLT_ALPHADEST                                0x00000001
+#define DDBLT_ALPHADESTCONSTOVERRIDE           0x00000002
+#define DDBLT_ALPHADESTNEG                     0x00000004
+#define DDBLT_ALPHADESTSURFACEOVERRIDE         0x00000008
+#define DDBLT_ALPHAEDGEBLEND                   0x00000010
+#define DDBLT_ALPHASRC                         0x00000020
+#define DDBLT_ALPHASRCCONSTOVERRIDE            0x00000040
+#define DDBLT_ALPHASRCNEG                      0x00000080
+#define DDBLT_ALPHASRCSURFACEOVERRIDE          0x00000100
+#define DDBLT_ASYNC                            0x00000200
+#define DDBLT_COLORFILL                                0x00000400
+#define DDBLT_DDFX                             0x00000800
+#define DDBLT_DDROPS                           0x00001000
+#define DDBLT_KEYDEST                          0x00002000
+#define DDBLT_KEYDESTOVERRIDE                  0x00004000
+#define DDBLT_KEYSRC                           0x00008000
+#define DDBLT_KEYSRCOVERRIDE                   0x00010000
+#define DDBLT_ROP                              0x00020000
+#define DDBLT_ROTATIONANGLE                    0x00040000
+#define DDBLT_ZBUFFER                          0x00080000
+#define DDBLT_ZBUFFERDESTCONSTOVERRIDE         0x00100000
+#define DDBLT_ZBUFFERDESTOVERRIDE              0x00200000
+#define DDBLT_ZBUFFERSRCCONSTOVERRIDE          0x00400000
+#define DDBLT_ZBUFFERSRCOVERRIDE               0x00800000
+#define DDBLT_WAIT                             0x01000000
+#define DDBLT_DEPTHFILL                                0x02000000
+#define DDBLT_DONOTWAIT                         0x08000000
+
+/* dwTrans for BltFast */
+#define DDBLTFAST_NOCOLORKEY                   0x00000000
+#define DDBLTFAST_SRCCOLORKEY                  0x00000001
+#define DDBLTFAST_DESTCOLORKEY                 0x00000002
+#define DDBLTFAST_WAIT                         0x00000010
+#define DDBLTFAST_DONOTWAIT                     0x00000020
+
+/* dwFlags for Flip */
+#define DDFLIP_WAIT            0x00000001
+#define DDFLIP_EVEN            0x00000002 /* only valid for overlay */
+#define DDFLIP_ODD             0x00000004 /* only valid for overlay */
+#define DDFLIP_NOVSYNC         0x00000008
+#define DDFLIP_STEREO          0x00000010
+#define DDFLIP_DONOTWAIT       0x00000020
+
+/* dwFlags for GetBltStatus */
+#define DDGBS_CANBLT                           0x00000001
+#define DDGBS_ISBLTDONE                                0x00000002
+
+/* dwFlags for IDirectDrawSurface7::GetFlipStatus */
+#define DDGFS_CANFLIP          1L
+#define DDGFS_ISFLIPDONE       2L
+
+/* dwFlags for IDirectDrawSurface7::SetPrivateData */
+#define DDSPD_IUNKNOWNPTR      1L
+#define DDSPD_VOLATILE         2L
+
+/* DDSCAPS.dwCaps */
+/* reserved1, was 3d capable */
+#define DDSCAPS_RESERVED1              0x00000001
+/* surface contains alpha information */
+#define DDSCAPS_ALPHA                  0x00000002
+/* this surface is a backbuffer */
+#define DDSCAPS_BACKBUFFER             0x00000004
+/* complex surface structure */
+#define DDSCAPS_COMPLEX                        0x00000008
+/* part of surface flipping structure */
+#define DDSCAPS_FLIP                   0x00000010
+/* this surface is the frontbuffer surface */
+#define DDSCAPS_FRONTBUFFER            0x00000020
+/* this is a plain offscreen surface */
+#define DDSCAPS_OFFSCREENPLAIN         0x00000040
+/* overlay */
+#define DDSCAPS_OVERLAY                        0x00000080
+/* palette objects can be created and attached to us */
+#define DDSCAPS_PALETTE                        0x00000100
+/* primary surface (the one the user looks at currently)(right eye)*/
+#define DDSCAPS_PRIMARYSURFACE         0x00000200
+/* primary surface for left eye */
+#define DDSCAPS_PRIMARYSURFACELEFT     0x00000400
+/* surface exists in systemmemory */
+#define DDSCAPS_SYSTEMMEMORY           0x00000800
+/* surface can be used as a texture */
+#define DDSCAPS_TEXTURE                        0x00001000
+/* surface may be destination for 3d rendering */
+#define DDSCAPS_3DDEVICE               0x00002000
+/* surface exists in videomemory */
+#define DDSCAPS_VIDEOMEMORY            0x00004000
+/* surface changes immediately visible */
+#define DDSCAPS_VISIBLE                        0x00008000
+/* write only surface */
+#define DDSCAPS_WRITEONLY              0x00010000
+/* zbuffer surface */
+#define DDSCAPS_ZBUFFER                        0x00020000
+/* has its own DC */
+#define DDSCAPS_OWNDC                  0x00040000
+/* surface should be able to receive live video */
+#define DDSCAPS_LIVEVIDEO              0x00080000
+/* should be able to have a hw codec decompress stuff into it */
+#define DDSCAPS_HWCODEC                        0x00100000
+/* mode X (320x200 or 320x240) surface */
+#define DDSCAPS_MODEX                  0x00200000
+/* one mipmap surface (1 level) */
+#define DDSCAPS_MIPMAP                 0x00400000
+#define DDSCAPS_RESERVED2              0x00800000
+/* memory allocation delayed until Load() */
+#define DDSCAPS_ALLOCONLOAD            0x04000000
+/* Indicates that the surface will receive data from a video port */
+#define DDSCAPS_VIDEOPORT              0x08000000
+/* surface is in local videomemory */
+#define DDSCAPS_LOCALVIDMEM            0x10000000
+/* surface is in nonlocal videomemory */
+#define DDSCAPS_NONLOCALVIDMEM         0x20000000
+/* surface is a standard VGA mode surface (NOT ModeX) */
+#define DDSCAPS_STANDARDVGAMODE                0x40000000
+/* optimized? surface */
+#define DDSCAPS_OPTIMIZED              0x80000000
+
+typedef struct _DDSCAPS {
+       DWORD   dwCaps; /* capabilities of surface wanted */
+} DDSCAPS,*LPDDSCAPS;
+
+/* DDSCAPS2.dwCaps2 */
+/* indicates the surface will receive data from a video port using
+   deinterlacing hardware. */
+#define DDSCAPS2_HARDWAREDEINTERLACE   0x00000002
+/* indicates the surface will be locked very frequently. */
+#define DDSCAPS2_HINTDYNAMIC           0x00000004
+/* indicates surface can be re-ordered or retiled on load() */
+#define DDSCAPS2_HINTSTATIC             0x00000008
+/* indicates surface to be managed by directdraw/direct3D */
+#define DDSCAPS2_TEXTUREMANAGE          0x00000010
+/* reserved bits */
+#define DDSCAPS2_RESERVED1              0x00000020
+#define DDSCAPS2_RESERVED2              0x00000040
+/* indicates surface will never be locked again */
+#define DDSCAPS2_OPAQUE                 0x00000080
+/* set at CreateSurface() time to indicate antialising will be used */
+#define DDSCAPS2_HINTANTIALIASING       0x00000100
+/* set at CreateSurface() time to indicate cubic environment map */
+#define DDSCAPS2_CUBEMAP                0x00000200
+/* face flags for cube maps */
+#define DDSCAPS2_CUBEMAP_POSITIVEX      0x00000400
+#define DDSCAPS2_CUBEMAP_NEGATIVEX      0x00000800
+#define DDSCAPS2_CUBEMAP_POSITIVEY      0x00001000
+#define DDSCAPS2_CUBEMAP_NEGATIVEY      0x00002000
+#define DDSCAPS2_CUBEMAP_POSITIVEZ      0x00004000
+#define DDSCAPS2_CUBEMAP_NEGATIVEZ      0x00008000
+/* specifies all faces of a cube for CreateSurface() */
+#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
+                                    DDSCAPS2_CUBEMAP_NEGATIVEX |\
+                                    DDSCAPS2_CUBEMAP_POSITIVEY |\
+                                    DDSCAPS2_CUBEMAP_NEGATIVEY |\
+                                    DDSCAPS2_CUBEMAP_POSITIVEZ |\
+                                    DDSCAPS2_CUBEMAP_NEGATIVEZ )
+/* set for mipmap sublevels on DirectX7 and later.  ignored by CreateSurface() */
+#define DDSCAPS2_MIPMAPSUBLEVEL         0x00010000
+/* indicates texture surface to be managed by Direct3D *only* */
+#define DDSCAPS2_D3DTEXTUREMANAGE       0x00020000
+/* indicates managed surface that can safely be lost */
+#define DDSCAPS2_DONOTPERSIST           0x00040000
+/* indicates surface is part of a stereo flipping chain */
+#define DDSCAPS2_STEREOSURFACELEFT      0x00080000
+
+typedef struct _DDSCAPS2 {
+       DWORD   dwCaps; /* capabilities of surface wanted */
+       DWORD   dwCaps2; /* additional capabilities */
+       DWORD   dwCaps3; /* reserved capabilities */
+       DWORD   dwCaps4; /* more reserved capabilities */
+} DDSCAPS2,*LPDDSCAPS2;
+
+#define        DD_ROP_SPACE    (256/32)        /* space required to store ROP array */
+
+typedef struct DDCAPS_DX7              /* DirectX 7 version of caps struct */
+{
+    DWORD      dwSize;                 /* size of the DDDRIVERCAPS structure */
+    DWORD      dwCaps;                 /* driver specific capabilities */
+    DWORD      dwCaps2;                /* more driver specific capabilites */
+    DWORD      dwCKeyCaps;             /* color key capabilities of the surface */
+    DWORD      dwFXCaps;               /* driver specific stretching and effects capabilites */
+    DWORD      dwFXAlphaCaps;          /* alpha driver specific capabilities */
+    DWORD      dwPalCaps;              /* palette capabilities */
+    DWORD      dwSVCaps;               /* stereo vision capabilities */
+    DWORD      dwAlphaBltConstBitDepths;       /* DDBD_2,4,8 */
+    DWORD      dwAlphaBltPixelBitDepths;       /* DDBD_1,2,4,8 */
+    DWORD      dwAlphaBltSurfaceBitDepths;     /* DDBD_1,2,4,8 */
+    DWORD      dwAlphaOverlayConstBitDepths;   /* DDBD_2,4,8 */
+    DWORD      dwAlphaOverlayPixelBitDepths;   /* DDBD_1,2,4,8 */
+    DWORD      dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */
+    DWORD      dwZBufferBitDepths;             /* DDBD_8,16,24,32 */
+    DWORD      dwVidMemTotal;          /* total amount of video memory */
+    DWORD      dwVidMemFree;           /* amount of free video memory */
+    DWORD      dwMaxVisibleOverlays;   /* maximum number of visible overlays */
+    DWORD      dwCurrVisibleOverlays;  /* current number of visible overlays */
+    DWORD      dwNumFourCCCodes;       /* number of four cc codes */
+    DWORD      dwAlignBoundarySrc;     /* source rectangle alignment */
+    DWORD      dwAlignSizeSrc;         /* source rectangle byte size */
+    DWORD      dwAlignBoundaryDest;    /* dest rectangle alignment */
+    DWORD      dwAlignSizeDest;        /* dest rectangle byte size */
+    DWORD      dwAlignStrideAlign;     /* stride alignment */
+    DWORD      dwRops[DD_ROP_SPACE];   /* ROPS supported */
+    DDSCAPS    ddsOldCaps;             /* old DDSCAPS - superseded for DirectX6+ */
+    DWORD      dwMinOverlayStretch;    /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwMaxOverlayStretch;    /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwMinLiveVideoStretch;  /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwMaxLiveVideoStretch;  /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwMinHwCodecStretch;    /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwMaxHwCodecStretch;    /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */
+    DWORD      dwReserved1;
+    DWORD      dwReserved2;
+    DWORD      dwReserved3;
+    DWORD      dwSVBCaps;              /* driver specific capabilities for System->Vmem blts */
+    DWORD      dwSVBCKeyCaps;          /* driver color key capabilities for System->Vmem blts */
+    DWORD      dwSVBFXCaps;            /* driver FX capabilities for System->Vmem blts */
+    DWORD      dwSVBRops[DD_ROP_SPACE];/* ROPS supported for System->Vmem blts */
+    DWORD      dwVSBCaps;              /* driver specific capabilities for Vmem->System blts */
+    DWORD      dwVSBCKeyCaps;          /* driver color key capabilities for Vmem->System blts */
+    DWORD      dwVSBFXCaps;            /* driver FX capabilities for Vmem->System blts */
+    DWORD      dwVSBRops[DD_ROP_SPACE];/* ROPS supported for Vmem->System blts */
+    DWORD      dwSSBCaps;              /* driver specific capabilities for System->System blts */
+    DWORD      dwSSBCKeyCaps;          /* driver color key capabilities for System->System blts */
+    DWORD      dwSSBFXCaps;            /* driver FX capabilities for System->System blts */
+    DWORD      dwSSBRops[DD_ROP_SPACE];/* ROPS supported for System->System blts */
+    DWORD       dwMaxVideoPorts;        /* maximum number of usable video ports */
+    DWORD      dwCurrVideoPorts;       /* current number of video ports used */
+    DWORD      dwSVBCaps2;             /* more driver specific capabilities for System->Vmem blts */
+    DWORD      dwNLVBCaps;             /* driver specific capabilities for non-local->local vidmem blts */
+    DWORD      dwNLVBCaps2;            /* more driver specific capabilities non-local->local vidmem blts */
+    DWORD      dwNLVBCKeyCaps;         /* driver color key capabilities for non-local->local vidmem blts */
+    DWORD      dwNLVBFXCaps;           /* driver FX capabilities for non-local->local blts */
+    DWORD      dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */
+    DDSCAPS2    ddsCaps;               /* surface capabilities */
+} DDCAPS_DX7,*LPDDCAPS_DX7;
+
+typedef DDCAPS_DX7 DDCAPS;
+typedef DDCAPS *LPDDCAPS;
+
+/* DDCAPS.dwCaps */
+#define DDCAPS_3D                      0x00000001
+#define DDCAPS_ALIGNBOUNDARYDEST       0x00000002
+#define DDCAPS_ALIGNSIZEDEST           0x00000004
+#define DDCAPS_ALIGNBOUNDARYSRC                0x00000008
+#define DDCAPS_ALIGNSIZESRC            0x00000010
+#define DDCAPS_ALIGNSTRIDE             0x00000020
+#define DDCAPS_BLT                     0x00000040
+#define DDCAPS_BLTQUEUE                        0x00000080
+#define DDCAPS_BLTFOURCC               0x00000100
+#define DDCAPS_BLTSTRETCH              0x00000200
+#define DDCAPS_GDI                     0x00000400
+#define DDCAPS_OVERLAY                 0x00000800
+#define DDCAPS_OVERLAYCANTCLIP         0x00001000
+#define DDCAPS_OVERLAYFOURCC           0x00002000
+#define DDCAPS_OVERLAYSTRETCH          0x00004000
+#define DDCAPS_PALETTE                 0x00008000
+#define DDCAPS_PALETTEVSYNC            0x00010000
+#define DDCAPS_READSCANLINE            0x00020000
+#define DDCAPS_STEREOVIEW              0x00040000
+#define DDCAPS_VBI                     0x00080000
+#define DDCAPS_ZBLTS                   0x00100000
+#define DDCAPS_ZOVERLAYS               0x00200000
+#define DDCAPS_COLORKEY                        0x00400000
+#define DDCAPS_ALPHA                   0x00800000
+#define DDCAPS_COLORKEYHWASSIST                0x01000000
+#define DDCAPS_NOHARDWARE              0x02000000
+#define DDCAPS_BLTCOLORFILL            0x04000000
+#define DDCAPS_BANKSWITCHED            0x08000000
+#define DDCAPS_BLTDEPTHFILL            0x10000000
+#define DDCAPS_CANCLIP                 0x20000000
+#define DDCAPS_CANCLIPSTRETCHED                0x40000000
+#define DDCAPS_CANBLTSYSMEM            0x80000000
+
+/* DDCAPS.dwCaps2 */
+#define DDCAPS2_CERTIFIED              0x00000001
+#define DDCAPS2_NO2DDURING3DSCENE       0x00000002
+#define DDCAPS2_VIDEOPORT              0x00000004
+#define DDCAPS2_AUTOFLIPOVERLAY                0x00000008
+#define DDCAPS2_CANBOBINTERLEAVED      0x00000010
+#define DDCAPS2_CANBOBNONINTERLEAVED   0x00000020
+#define DDCAPS2_COLORCONTROLOVERLAY    0x00000040
+#define DDCAPS2_COLORCONTROLPRIMARY    0x00000080
+#define DDCAPS2_CANDROPZ16BIT          0x00000100
+#define DDCAPS2_NONLOCALVIDMEM         0x00000200
+#define DDCAPS2_NONLOCALVIDMEMCAPS     0x00000400
+#define DDCAPS2_NOPAGELOCKREQUIRED     0x00000800
+#define DDCAPS2_WIDESURFACES           0x00001000
+#define DDCAPS2_CANFLIPODDEVEN         0x00002000
+#define DDCAPS2_CANBOBHARDWARE         0x00004000
+#define DDCAPS2_COPYFOURCC              0x00008000
+#define DDCAPS2_PRIMARYGAMMA            0x00020000
+#define DDCAPS2_CANRENDERWINDOWED       0x00080000
+#define DDCAPS2_CANCALIBRATEGAMMA       0x00100000
+#define DDCAPS2_FLIPINTERVAL            0x00200000
+#define DDCAPS2_FLIPNOVSYNC             0x00400000
+#define DDCAPS2_CANMANAGETEXTURE        0x00800000
+#define DDCAPS2_TEXMANINNONLOCALVIDMEM  0x01000000
+#define DDCAPS2_STEREO                  0x02000000
+#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   0x04000000
+
+
+/* Set/Get Colour Key Flags */
+#define DDCKEY_COLORSPACE  0x00000001  /* Struct is single colour space */
+#define DDCKEY_DESTBLT     0x00000002  /* To be used as dest for blt */
+#define DDCKEY_DESTOVERLAY 0x00000004  /* To be used as dest for CK overlays */
+#define DDCKEY_SRCBLT      0x00000008  /* To be used as src for blt */
+#define DDCKEY_SRCOVERLAY  0x00000010  /* To be used as src for CK overlays */
+
+typedef struct _DDCOLORKEY
+{
+       DWORD   dwColorSpaceLowValue;/* low boundary of color space that is to
+                                      * be treated as Color Key, inclusive
+                                     */
+       DWORD   dwColorSpaceHighValue;/* high boundary of color space that is
+                                       * to be treated as Color Key, inclusive
+                                      */
+} DDCOLORKEY,*LPDDCOLORKEY;
+
+/* ddCKEYCAPS bits */
+#define DDCKEYCAPS_DESTBLT                     0x00000001
+#define DDCKEYCAPS_DESTBLTCLRSPACE             0x00000002
+#define DDCKEYCAPS_DESTBLTCLRSPACEYUV          0x00000004
+#define DDCKEYCAPS_DESTBLTYUV                  0x00000008
+#define DDCKEYCAPS_DESTOVERLAY                 0x00000010
+#define DDCKEYCAPS_DESTOVERLAYCLRSPACE         0x00000020
+#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV      0x00000040
+#define DDCKEYCAPS_DESTOVERLAYONEACTIVE                0x00000080
+#define DDCKEYCAPS_DESTOVERLAYYUV              0x00000100
+#define DDCKEYCAPS_SRCBLT                      0x00000200
+#define DDCKEYCAPS_SRCBLTCLRSPACE              0x00000400
+#define DDCKEYCAPS_SRCBLTCLRSPACEYUV           0x00000800
+#define DDCKEYCAPS_SRCBLTYUV                   0x00001000
+#define DDCKEYCAPS_SRCOVERLAY                  0x00002000
+#define DDCKEYCAPS_SRCOVERLAYCLRSPACE          0x00004000
+#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV       0x00008000
+#define DDCKEYCAPS_SRCOVERLAYONEACTIVE         0x00010000
+#define DDCKEYCAPS_SRCOVERLAYYUV               0x00020000
+#define DDCKEYCAPS_NOCOSTOVERLAY               0x00040000
+
+typedef struct _DDPIXELFORMAT {
+    DWORD      dwSize;                 /* 0: size of structure */
+    DWORD      dwFlags;                /* 4: pixel format flags */
+    DWORD      dwFourCC;               /* 8: (FOURCC code) */
+    union {
+       DWORD   dwRGBBitCount;          /* C: how many bits per pixel */
+       DWORD   dwYUVBitCount;          /* C: how many bits per pixel */
+       DWORD   dwZBufferBitDepth;      /* C: how many bits for z buffers */
+       DWORD   dwAlphaBitDepth;        /* C: how many bits for alpha channels*/
+       DWORD   dwLuminanceBitCount;
+       DWORD   dwBumpBitCount;
+    } DUMMYUNIONNAME1;
+    union {
+       DWORD   dwRBitMask;             /* 10: mask for red bit*/
+       DWORD   dwYBitMask;             /* 10: mask for Y bits*/
+       DWORD   dwStencilBitDepth;
+       DWORD   dwLuminanceBitMask;
+       DWORD   dwBumpDuBitMask;
+    } DUMMYUNIONNAME2;
+    union {
+       DWORD   dwGBitMask;             /* 14: mask for green bits*/
+       DWORD   dwUBitMask;             /* 14: mask for U bits*/
+       DWORD   dwZBitMask;
+       DWORD   dwBumpDvBitMask;
+    } DUMMYUNIONNAME3;
+    union {
+       DWORD   dwBBitMask;             /* 18: mask for blue bits*/
+       DWORD   dwVBitMask;             /* 18: mask for V bits*/
+       DWORD   dwStencilBitMask;
+       DWORD   dwBumpLuminanceBitMask;
+    } DUMMYUNIONNAME4;
+    union {
+       DWORD   dwRGBAlphaBitMask;      /* 1C: mask for alpha channel */
+       DWORD   dwYUVAlphaBitMask;      /* 1C: mask for alpha channel */
+       DWORD   dwLuminanceAlphaBitMask;
+       DWORD   dwRGBZBitMask;          /* 1C: mask for Z channel */
+       DWORD   dwYUVZBitMask;          /* 1C: mask for Z channel */
+    } DUMMYUNIONNAME5;
+                                       /* 20: next structure */
+} DDPIXELFORMAT,*LPDDPIXELFORMAT;
+
+/* DDCAPS.dwFXCaps */
+#define DDFXCAPS_BLTALPHA               0x00000001
+#define DDFXCAPS_OVERLAYALPHA           0x00000004
+#define DDFXCAPS_BLTARITHSTRETCHYN     0x00000010
+#define DDFXCAPS_BLTARITHSTRETCHY      0x00000020
+#define DDFXCAPS_BLTMIRRORLEFTRIGHT    0x00000040
+#define DDFXCAPS_BLTMIRRORUPDOWN       0x00000080
+#define DDFXCAPS_BLTROTATION           0x00000100
+#define DDFXCAPS_BLTROTATION90         0x00000200
+#define DDFXCAPS_BLTSHRINKX            0x00000400
+#define DDFXCAPS_BLTSHRINKXN           0x00000800
+#define DDFXCAPS_BLTSHRINKY            0x00001000
+#define DDFXCAPS_BLTSHRINKYN           0x00002000
+#define DDFXCAPS_BLTSTRETCHX           0x00004000
+#define DDFXCAPS_BLTSTRETCHXN          0x00008000
+#define DDFXCAPS_BLTSTRETCHY           0x00010000
+#define DDFXCAPS_BLTSTRETCHYN          0x00020000
+#define DDFXCAPS_OVERLAYARITHSTRETCHY  0x00040000
+#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008
+#define DDFXCAPS_OVERLAYSHRINKX                0x00080000
+#define DDFXCAPS_OVERLAYSHRINKXN       0x00100000
+#define DDFXCAPS_OVERLAYSHRINKY                0x00200000
+#define DDFXCAPS_OVERLAYSHRINKYN       0x00400000
+#define DDFXCAPS_OVERLAYSTRETCHX       0x00800000
+#define DDFXCAPS_OVERLAYSTRETCHXN      0x01000000
+#define DDFXCAPS_OVERLAYSTRETCHY       0x02000000
+#define DDFXCAPS_OVERLAYSTRETCHYN      0x04000000
+#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT        0x08000000
+#define DDFXCAPS_OVERLAYMIRRORUPDOWN   0x10000000
+
+#define DDFXCAPS_OVERLAYFILTER          DDFXCAPS_OVERLAYARITHSTRETCHY
+
+/* DDCAPS.dwFXAlphaCaps */
+#define DDFXALPHACAPS_BLTALPHAEDGEBLEND                0x00000001
+#define DDFXALPHACAPS_BLTALPHAPIXELS           0x00000002
+#define DDFXALPHACAPS_BLTALPHAPIXELSNEG                0x00000004
+#define DDFXALPHACAPS_BLTALPHASURFACES         0x00000008
+#define DDFXALPHACAPS_BLTALPHASURFACESNEG      0x00000010
+#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND    0x00000020
+#define DDFXALPHACAPS_OVERLAYALPHAPIXELS       0x00000040
+#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG    0x00000080
+#define DDFXALPHACAPS_OVERLAYALPHASURFACES     0x00000100
+#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG  0x00000200
+
+/* DDCAPS.dwPalCaps */
+#define DDPCAPS_4BIT                   0x00000001
+#define DDPCAPS_8BITENTRIES            0x00000002
+#define DDPCAPS_8BIT                   0x00000004
+#define DDPCAPS_INITIALIZE             0x00000008
+#define DDPCAPS_PRIMARYSURFACE         0x00000010
+#define DDPCAPS_PRIMARYSURFACELEFT     0x00000020
+#define DDPCAPS_ALLOW256               0x00000040
+#define DDPCAPS_VSYNC                  0x00000080
+#define DDPCAPS_1BIT                   0x00000100
+#define DDPCAPS_2BIT                   0x00000200
+#define DDPCAPS_ALPHA                   0x00000400
+
+/* DDCAPS.dwSVCaps */
+/* the first 4 of these are now obsolete */
+#if DIRECTDRAW_VERSION >= 0x700        /* FIXME: I'm not sure when this switch occurred */
+#define DDSVCAPS_RESERVED1             0x00000001
+#define DDSVCAPS_RESERVED2             0x00000002
+#define DDSVCAPS_RESERVED3             0x00000004
+#define DDSVCAPS_RESERVED4             0x00000008
+#else
+#define DDSVCAPS_ENIGMA                        0x00000001
+#define DDSVCAPS_FLICKER               0x00000002
+#define DDSVCAPS_REDBLUE               0x00000004
+#define DDSVCAPS_SPLIT                 0x00000008
+#endif
+#define DDSVCAPS_STEREOSEQUENTIAL       0x00000010
+
+/* BitDepths */
+#define DDBD_1                         0x00004000
+#define DDBD_2                         0x00002000
+#define DDBD_4                         0x00001000
+#define DDBD_8                         0x00000800
+#define DDBD_16                                0x00000400
+#define DDBD_24                                0x00000200
+#define DDBD_32                                0x00000100
+
+/* DDOVERLAYFX.dwDDFX */
+#define DDOVERFX_ARITHSTRETCHY         0x00000001
+#define DDOVERFX_MIRRORLEFTRIGHT       0x00000002
+#define DDOVERFX_MIRRORUPDOWN          0x00000004
+
+/* UpdateOverlay flags */
+#define DDOVER_ALPHADEST                        0x00000001
+#define DDOVER_ALPHADESTCONSTOVERRIDE           0x00000002
+#define DDOVER_ALPHADESTNEG                     0x00000004
+#define DDOVER_ALPHADESTSURFACEOVERRIDE         0x00000008
+#define DDOVER_ALPHAEDGEBLEND                   0x00000010
+#define DDOVER_ALPHASRC                         0x00000020
+#define DDOVER_ALPHASRCCONSTOVERRIDE            0x00000040
+#define DDOVER_ALPHASRCNEG                      0x00000080
+#define DDOVER_ALPHASRCSURFACEOVERRIDE          0x00000100
+#define DDOVER_HIDE                             0x00000200
+#define DDOVER_KEYDEST                          0x00000400
+#define DDOVER_KEYDESTOVERRIDE                  0x00000800
+#define DDOVER_KEYSRC                           0x00001000
+#define DDOVER_KEYSRCOVERRIDE                   0x00002000
+#define DDOVER_SHOW                             0x00004000
+#define DDOVER_ADDDIRTYRECT                     0x00008000
+#define DDOVER_REFRESHDIRTYRECTS                0x00010000
+#define DDOVER_REFRESHALL                       0x00020000
+#define DDOVER_DDFX                             0x00080000
+#define DDOVER_AUTOFLIP                         0x00100000
+#define DDOVER_BOB                              0x00200000
+#define DDOVER_OVERRIDEBOBWEAVE                 0x00400000
+#define DDOVER_INTERLEAVED                      0x00800000
+
+/* DDCOLORKEY.dwFlags */
+#define DDPF_ALPHAPIXELS               0x00000001
+#define DDPF_ALPHA                     0x00000002
+#define DDPF_FOURCC                    0x00000004
+#define DDPF_PALETTEINDEXED4           0x00000008
+#define DDPF_PALETTEINDEXEDTO8         0x00000010
+#define DDPF_PALETTEINDEXED8           0x00000020
+#define DDPF_RGB                       0x00000040
+#define DDPF_COMPRESSED                        0x00000080
+#define DDPF_RGBTOYUV                  0x00000100
+#define DDPF_YUV                       0x00000200
+#define DDPF_ZBUFFER                   0x00000400
+#define DDPF_PALETTEINDEXED1           0x00000800
+#define DDPF_PALETTEINDEXED2           0x00001000
+#define DDPF_ZPIXELS                   0x00002000
+#define DDPF_STENCILBUFFER              0x00004000
+#define DDPF_ALPHAPREMULT               0x00008000
+#define DDPF_LUMINANCE                  0x00020000
+#define DDPF_BUMPLUMINANCE              0x00040000
+#define DDPF_BUMPDUDV                   0x00080000
+
+/* SetCooperativeLevel dwFlags */
+#define DDSCL_FULLSCREEN               0x00000001
+#define DDSCL_ALLOWREBOOT              0x00000002
+#define DDSCL_NOWINDOWCHANGES          0x00000004
+#define DDSCL_NORMAL                   0x00000008
+#define DDSCL_EXCLUSIVE                        0x00000010
+#define DDSCL_ALLOWMODEX               0x00000040
+#define DDSCL_SETFOCUSWINDOW           0x00000080
+#define DDSCL_SETDEVICEWINDOW          0x00000100
+#define DDSCL_CREATEDEVICEWINDOW       0x00000200
+#define DDSCL_MULTITHREADED             0x00000400
+#define DDSCL_FPUSETUP                  0x00000800
+#define DDSCL_FPUPRESERVE               0x00001000
+
+
+/* DDSURFACEDESC.dwFlags */
+#define        DDSD_CAPS               0x00000001
+#define        DDSD_HEIGHT             0x00000002
+#define        DDSD_WIDTH              0x00000004
+#define        DDSD_PITCH              0x00000008
+#define        DDSD_BACKBUFFERCOUNT    0x00000020
+#define        DDSD_ZBUFFERBITDEPTH    0x00000040
+#define        DDSD_ALPHABITDEPTH      0x00000080
+#define        DDSD_LPSURFACE          0x00000800
+#define        DDSD_PIXELFORMAT        0x00001000
+#define        DDSD_CKDESTOVERLAY      0x00002000
+#define        DDSD_CKDESTBLT          0x00004000
+#define        DDSD_CKSRCOVERLAY       0x00008000
+#define        DDSD_CKSRCBLT           0x00010000
+#define        DDSD_MIPMAPCOUNT        0x00020000
+#define        DDSD_REFRESHRATE        0x00040000
+#define        DDSD_LINEARSIZE         0x00080000
+#define DDSD_TEXTURESTAGE       0x00100000
+#define DDSD_FVF                0x00200000
+#define DDSD_SRCVBHANDLE        0x00400000
+#define        DDSD_ALL                0x007ff9ee
+
+/* EnumSurfaces flags */
+#define DDENUMSURFACES_ALL          0x00000001
+#define DDENUMSURFACES_MATCH        0x00000002
+#define DDENUMSURFACES_NOMATCH      0x00000004
+#define DDENUMSURFACES_CANBECREATED 0x00000008
+#define DDENUMSURFACES_DOESEXIST    0x00000010
+
+/* SetDisplayMode flags */
+#define DDSDM_STANDARDVGAMODE  0x00000001
+
+/* EnumDisplayModes flags */
+#define DDEDM_REFRESHRATES     0x00000001
+#define DDEDM_STANDARDVGAMODES 0x00000002
+
+/* WaitForVerticalDisplay flags */
+
+#define DDWAITVB_BLOCKBEGIN            0x00000001
+#define DDWAITVB_BLOCKBEGINEVENT       0x00000002
+#define DDWAITVB_BLOCKEND              0x00000004
+
+typedef struct _DDSURFACEDESC
+{
+       DWORD   dwSize;         /* 0: size of the DDSURFACEDESC structure*/
+       DWORD   dwFlags;        /* 4: determines what fields are valid*/
+       DWORD   dwHeight;       /* 8: height of surface to be created*/
+       DWORD   dwWidth;        /* C: width of input surface*/
+       union {
+               LONG    lPitch; /* 10: distance to start of next line (return value only)*/
+               DWORD   dwLinearSize;
+       } DUMMYUNIONNAME1;
+       DWORD   dwBackBufferCount;/* 14: number of back buffers requested*/
+       union {
+               DWORD   dwMipMapCount;/* 18:number of mip-map levels requested*/
+               DWORD   dwZBufferBitDepth;/*18: depth of Z buffer requested*/
+               DWORD   dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
+       } DUMMYUNIONNAME2;
+       DWORD   dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
+       DWORD   dwReserved;     /* 20:reserved*/
+       LPVOID  lpSurface;      /* 24:pointer to the associated surface memory*/
+       DDCOLORKEY      ddckCKDestOverlay;/* 28: CK for dest overlay use*/
+       DDCOLORKEY      ddckCKDestBlt;  /* 30: CK for destination blt use*/
+       DDCOLORKEY      ddckCKSrcOverlay;/* 38: CK for source overlay use*/
+       DDCOLORKEY      ddckCKSrcBlt;   /* 40: CK for source blt use*/
+       DDPIXELFORMAT   ddpfPixelFormat;/* 48: pixel format description of the surface*/
+       DDSCAPS         ddsCaps;        /* 68: direct draw surface caps */
+} DDSURFACEDESC,*LPDDSURFACEDESC;
+
+typedef struct _DDSURFACEDESC2
+{
+       DWORD   dwSize;         /* 0: size of the DDSURFACEDESC2 structure*/
+       DWORD   dwFlags;        /* 4: determines what fields are valid*/
+       DWORD   dwHeight;       /* 8: height of surface to be created*/
+       DWORD   dwWidth;        /* C: width of input surface*/
+       union {
+               LONG    lPitch;       /*10: distance to start of next line (return value only)*/
+               DWORD   dwLinearSize; /*10: formless late-allocated optimized surface size */
+       } DUMMYUNIONNAME1;
+       DWORD   dwBackBufferCount;/* 14: number of back buffers requested*/
+       union {
+               DWORD   dwMipMapCount;/* 18:number of mip-map levels requested*/
+               DWORD   dwRefreshRate;/* 18:refresh rate (used when display mode is described)*/
+               DWORD   dwSrcVBHandle;/* 18:source used in VB::Optimize */
+       } DUMMYUNIONNAME2;
+       DWORD   dwAlphaBitDepth;/* 1C:depth of alpha buffer requested*/
+       DWORD   dwReserved;     /* 20:reserved*/
+       LPVOID  lpSurface;      /* 24:pointer to the associated surface memory*/
+       union {
+               DDCOLORKEY      ddckCKDestOverlay; /* 28: CK for dest overlay use*/
+               DWORD           dwEmptyFaceColor;  /* 28: color for empty cubemap faces */
+       } DUMMYUNIONNAME3;
+       DDCOLORKEY      ddckCKDestBlt;  /* 30: CK for destination blt use*/
+       DDCOLORKEY      ddckCKSrcOverlay;/* 38: CK for source overlay use*/
+       DDCOLORKEY      ddckCKSrcBlt;   /* 40: CK for source blt use*/
+
+       union {
+               DDPIXELFORMAT   ddpfPixelFormat;/* 48: pixel format description of the surface*/
+               DWORD           dwFVF;  /* 48: vertex format description of vertex buffers */
+       } DUMMYUNIONNAME4;
+       DDSCAPS2        ddsCaps;  /* 68: DDraw surface caps */
+       DWORD           dwTextureStage; /* 78: stage in multitexture cascade */
+} DDSURFACEDESC2,*LPDDSURFACEDESC2;
+
+/* DDCOLORCONTROL.dwFlags */
+#define DDCOLOR_BRIGHTNESS     0x00000001
+#define DDCOLOR_CONTRAST       0x00000002
+#define DDCOLOR_HUE            0x00000004
+#define DDCOLOR_SATURATION     0x00000008
+#define DDCOLOR_SHARPNESS      0x00000010
+#define DDCOLOR_GAMMA          0x00000020
+#define DDCOLOR_COLORENABLE    0x00000040
+
+typedef struct {
+       DWORD   dwSize;
+       DWORD   dwFlags;
+       LONG    lBrightness;
+       LONG    lContrast;
+       LONG    lHue;
+       LONG    lSaturation;
+       LONG    lSharpness;
+       LONG    lGamma;
+       LONG    lColorEnable;
+       DWORD   dwReserved1;
+} DDCOLORCONTROL,*LPDDCOLORCONTROL;
+
+typedef struct {
+       WORD    red[256];
+       WORD    green[256];
+       WORD    blue[256];
+} DDGAMMARAMP,*LPDDGAMMARAMP;
+
+/* flags for DirectDrawEnumerateEx */
+#define DDENUM_ATTACHEDSECONDARYDEVICES        0x00000001
+#define DDENUM_DETACHEDSECONDARYDEVICES        0x00000002
+#define DDENUM_NONDISPLAYDEVICES       0x00000004
+
+/* flags for DirectDrawCreate or IDirectDraw::Initialize */
+#define DDCREATE_HARDWAREONLY  1L
+#define DDCREATE_EMULATIONONLY 2L
+
+/* dwDDFX */
+/* arithmetic stretching along y axis */
+#define DDBLTFX_ARITHSTRETCHY                  0x00000001
+/* mirror on y axis */
+#define DDBLTFX_MIRRORLEFTRIGHT                        0x00000002
+/* mirror on x axis */
+#define DDBLTFX_MIRRORUPDOWN                   0x00000004
+/* do not tear */
+#define DDBLTFX_NOTEARING                      0x00000008
+/* 180 degrees clockwise rotation */
+#define DDBLTFX_ROTATE180                      0x00000010
+/* 270 degrees clockwise rotation */
+#define DDBLTFX_ROTATE270                      0x00000020
+/* 90 degrees clockwise rotation */
+#define DDBLTFX_ROTATE90                       0x00000040
+/* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
+#define DDBLTFX_ZBUFFERRANGE                   0x00000080
+/* add dwZBufferBaseDest to every source z value before compare */
+#define DDBLTFX_ZBUFFERBASEDEST                        0x00000100
+
+typedef DWORD IDirectDrawSurface; /* FIXME: implement proper definition */
+typedef IDirectDrawSurface *LPDIRECTDRAWSURFACE;
+typedef struct _DDBLTFX
+{
+    DWORD       dwSize;                         /* size of structure */
+    DWORD       dwDDFX;                         /* FX operations */
+    DWORD       dwROP;                          /* Win32 raster operations */
+    DWORD       dwDDROP;                        /* Raster operations new for DirectDraw */
+    DWORD       dwRotationAngle;                /* Rotation angle for blt */
+    DWORD       dwZBufferOpCode;                /* ZBuffer compares */
+    DWORD       dwZBufferLow;                   /* Low limit of Z buffer */
+    DWORD       dwZBufferHigh;                  /* High limit of Z buffer */
+    DWORD       dwZBufferBaseDest;              /* Destination base value */
+    DWORD       dwZDestConstBitDepth;           /* Bit depth used to specify Z constant for destination */
+    union
+    {
+        DWORD   dwZDestConst;                   /* Constant to use as Z buffer for dest */
+        LPDIRECTDRAWSURFACE lpDDSZBufferDest;   /* Surface to use as Z buffer for dest */
+    } DUMMYUNIONNAME1;
+    DWORD       dwZSrcConstBitDepth;            /* Bit depth used to specify Z constant for source */
+    union
+    {
+        DWORD   dwZSrcConst;                    /* Constant to use as Z buffer for src */
+        LPDIRECTDRAWSURFACE lpDDSZBufferSrc;    /* Surface to use as Z buffer for src */
+    } DUMMYUNIONNAME2;
+    DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
+    DWORD       dwAlphaEdgeBlend;               /* Alpha for edge blending */
+    DWORD       dwReserved;
+    DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
+    union
+    {
+        DWORD   dwAlphaDestConst;               /* Constant to use as Alpha Channel */
+        LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as Alpha Channel */
+    } DUMMYUNIONNAME3;
+    DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
+    union
+    {
+        DWORD   dwAlphaSrcConst;                /* Constant to use as Alpha Channel */
+        LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as Alpha Channel */
+    } DUMMYUNIONNAME4;
+    union
+    {
+        DWORD   dwFillColor;                    /* color in RGB or Palettized */
+        DWORD   dwFillDepth;                    /* depth value for z-buffer */
+       DWORD   dwFillPixel;                    /* pixel val for RGBA or RGBZ */
+        LPDIRECTDRAWSURFACE lpDDSPattern;       /* Surface to use as pattern */
+    } DUMMYUNIONNAME5;
+    DDCOLORKEY  ddckDestColorkey;               /* DestColorkey override */
+    DDCOLORKEY  ddckSrcColorkey;                /* SrcColorkey override */
+} DDBLTFX,*LPDDBLTFX;
+typedef struct _DDOVERLAYFX
+{
+    DWORD       dwSize;                         /* size of structure */
+    DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
+    DWORD       dwAlphaEdgeBlend;               /* Constant to use as alpha for edge blend */
+    DWORD       dwReserved;
+    DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
+    union
+    {
+        DWORD   dwAlphaDestConst;               /* Constant to use as alpha channel for dest */
+        LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
+    } DUMMYUNIONNAME1;
+    DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
+    union
+    {
+        DWORD   dwAlphaSrcConst;                /* Constant to use as alpha channel for src */
+        LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
+    } DUMMYUNIONNAME2;
+    DDCOLORKEY  dckDestColorkey;                /* DestColorkey override */
+    DDCOLORKEY  dckSrcColorkey;                 /* DestColorkey override */
+    DWORD       dwDDFX;                         /* Overlay FX */
+    DWORD       dwFlags;                        /* flags */
+} DDOVERLAYFX,*LPDDOVERLAYFX;
+
+typedef struct _DDBLTBATCH
+{
+    LPRECT             lprDest;
+    LPDIRECTDRAWSURFACE        lpDDSSrc;
+    LPRECT             lprSrc;
+    DWORD              dwFlags;
+    LPDDBLTFX          lpDDBltFx;
+} DDBLTBATCH,*LPDDBLTBATCH;
+
+#define MAX_DDDEVICEID_STRING          512
+
+typedef struct tagDDDEVICEIDENTIFIER {
+  char    szDriver[MAX_DDDEVICEID_STRING];
+  char    szDescription[MAX_DDDEVICEID_STRING];
+  LARGE_INTEGER  liDriverVersion;
+  DWORD   dwVendorId;
+  DWORD   dwDeviceId;
+  DWORD   dwSubSysId;
+  DWORD   dwRevision;
+  GUID    guidDeviceIdentifier;
+} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
+
+typedef struct tagDDDEVICEIDENTIFIER2 {
+  char    szDriver[MAX_DDDEVICEID_STRING];     /* user readable driver name */
+  char    szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */
+  LARGE_INTEGER  liDriverVersion;              /* driver version */
+  DWORD   dwVendorId;                          /* vendor ID, zero if unknown */
+  DWORD   dwDeviceId;                          /* chipset ID, zero if unknown */
+  DWORD   dwSubSysId;                          /* board ID, zero if unknown */
+  DWORD   dwRevision;                          /* chipset version, zero if unknown */
+  GUID    guidDeviceIdentifier;                        /* unique ID for this driver/chipset combination */
+  DWORD   dwWHQLLevel;                         /* Windows Hardware Quality Lab certification level */
+} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif /* __WINE_DDRAW_H */
index c3bb3b9..46f8eb8 100644 (file)
@@ -321,6 +321,7 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define GlobalFindAtom  GlobalFindAtomW
 #define GlobalGetAtomName  GlobalGetAtomNameW
 #define AddAtom  AddAtomW
+#define RemoveFontResourceEx RemoveFontResourceExW
 #define FindAtom  FindAtomW
 #define GetAtomName  GetAtomNameW
 #define GetProfileInt  GetProfileIntW
@@ -363,6 +364,7 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define MoveFile  MoveFileW
 #define MoveFileEx  MoveFileExW
 #define MoveFileWithProgress  MoveFileWithProgressW
+#define CreateFontIndirectEx CreateFontIndirectExW
 #define CreateNamedPipe  CreateNamedPipeW
 #define GetNamedPipeHandleState  GetNamedPipeHandleStateW
 #define CallNamedPipe  CallNamedPipeW
@@ -399,6 +401,8 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define VerFindFile  VerFindFileW
 #define VerInstallFile  VerInstallFileW
 #define GetFileVersionInfoSize  GetFileVersionInfoSizeW
+#define GetStringBitmap GetStringBitmapW
+#define GetGlyphIndices GetGlyphIndicesW
 #define GetFileVersionInfo  GetFileVersionInfoW
 #define VerLanguageName  VerLanguageNameW
 #define VerQueryValue  VerQueryValueW
@@ -599,6 +603,8 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define PageSetupDlg  PageSetupDlgA
 #define DefWindowProc  DefWindowProcA
 #define CallWindowProc  CallWindowProcA
+#define GetGlyphIndices GetGlyphIndicesA
+#define CreateFontIndirectEx CreateFontIndirectExA
 #define RegisterClass  RegisterClassA
 #define UnregisterClass  UnregisterClassA
 #define GetClassInfo  GetClassInfoA
@@ -698,6 +704,7 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define lstrcat  lstrcatA
 #define lstrlen  lstrlenA
 #define GetBinaryType  GetBinaryTypeA
+#define GetStringBitmap GetStringBitmapA
 #define GetShortPathName  GetShortPathNameA
 #define SetFileSecurity  SetFileSecurityA
 #define GetFileSecurity  GetFileSecurityA
@@ -714,6 +721,7 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #define ReportEvent  ReportEventA
 #define CreateProcess  CreateProcessA
 #define FatalAppExit  FatalAppExitA
+#define RemoveFontResourceEx RemoveFontResourceExA
 #define GetStartupInfo  GetStartupInfoA
 #define GetCommandLine  GetCommandLineA
 #define GetEnvironmentVariable  GetEnvironmentVariableA
@@ -890,8 +898,513 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
 #endif /* UNICODE and ASCII defines */
 #endif /* _DISABLE_TIDENTS */
 
+HANDLE 
+STDCALL 
+AddFontMemResourceEx(
+       PVOID pbFont,
+       DWORD cbFont,
+       PVOID pdv,
+       DWORD *pcFonts
+);
+
+int 
+STDCALL 
+AddFontResourceTracking(
+       LPCSTR lpString,
+       int unknown
+);
+
+WINBOOL 
+STDCALL 
+AnyLinkedFonts(VOID);
+
+HBITMAP 
+STDCALL
+ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags);
+
+HBRUSH 
+STDCALL
+ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags);
+
+WINBOOL 
+STDCALL
+ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries);
+
+WINBOOL 
+STDCALL
+EnableEUDC(WINBOOL enable);
+
+int
+STDCALL
+EndFormPage(HDC hdc);
+
+WINBOOL
+STDCALL
+EudcLoadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath,INT iPriority,INT iFontLinkType);
+
+WINBOOL 
+STDCALL
+EudcUnloadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath);
+
+WINBOOL 
+STDCALL
+FontIsLinked(HDC hdc);
+
+int 
+STDCALL
+GdiAddFontResourceW(LPCWSTR filename,FLONG f,DESIGNVECTOR *pdv);
+
+DWORD 
+STDCALL
+GdiAddGlsBounds(HDC hdc,LPRECT prc);
+
+WINBOOL 
+STDCALL
+GdiAlphaBlend(HDC hdcDst,LONG DstX,LONG DstY,LONG DstCx,LONG DstCy,HDC hdcSrc,LONG SrcX,LONG SrcY,LONG SrcCx,LONG SrcCy,BLENDFUNCTION BlendFunction);
+
+WINBOOL 
+STDCALL
+GdiArtificialDecrementDriver(LPWSTR pDriverName,WINBOOL unknown);
+
+WINBOOL
+STDCALL
+GdiCleanCacheDC(HDC hdc);
+
+WINBOOL 
+STDCALL
+GdiConsoleTextOut(HDC hdc, POLYTEXTW *lpto,UINT nStrings, RECTL *prclBounds);
+
+HDC
+STDCALL
+GdiConvertAndCheckDC(HDC hdc);
+
+HBITMAP 
+STDCALL
+GdiConvertBitmap(HBITMAP hbm);
+
+HBRUSH
+STDCALL
+GdiConvertBrush(HBRUSH hbr);
+
+HDC 
+STDCALL
+GdiConvertDC(HDC hdc);
+
+HFONT 
+STDCALL
+GdiConvertFont(HFONT hfont);
+
+HPALETTE 
+STDCALL
+GdiConvertPalette(HPALETTE hpal);
+
+HRGN
+STDCALL
+GdiConvertRegion(HRGN hregion);
+
+HENHMETAFILE 
+STDCALL
+GdiConvertEnhMetaFile(HENHMETAFILE hmf);
+
+WINBOOL
+STDCALL
+GdiDeleteLocalDC(HDC hdc);
+
+int 
+STDCALL
+GdiDescribePixelFormat(HDC hdc,int ipfd,UINT cjpfd,PPIXELFORMATDESCRIPTOR ppfd);
+
+WINBOOL
+STDCALL
+GdiDrawStream(HDC dc, ULONG l, VOID *v);
+
+HGDIOBJ
+STDCALL
+GdiFixUpHandle(HGDIOBJ hobj);
+
+NTSTATUS
+STDCALL
+GdiFullscreenControl(FULLSCREENCONTROL FullscreenCommand, PVOID FullscreenInput,
+                                       DWORD FullscreenInputLength, PVOID FullscreenOutput,
+                                       PULONG FullscreenOutputLength);
+
+DWORD 
+STDCALL
+GdiGetCodePage(HDC hdc);
+
+HBRUSH 
+STDCALL
+GdiGetLocalBrush(HBRUSH hbr);
+
+HDC 
+STDCALL
+GdiGetLocalDC(HDC hdc);
+
+HFONT 
+STDCALL
+GdiGetLocalFont(HFONT hfont);
+
+WINBOOL
+STDCALL
+GdiGradientFill(HDC hdc,PTRIVERTEX pVertex,ULONG uVertex,PVOID pMesh,ULONG uMesh,ULONG ulMode);
+
+WINBOOL
+STDCALL
+GdiIsMetaFileDC(HDC hdc);
+
+WINBOOL
+STDCALL
+GdiIsMetaPrintDC(HDC hdc);
+
+WINBOOL
+STDCALL
+GdiIsPlayMetafileDC(HDC hdc);
+
+INT 
+STDCALL
+GdiQueryFonts(PUNIVERSAL_FONT_ID pufiFontList,ULONG nBufferSize,PLARGE_INTEGER pTimeStamp );
+
+WINBOOL 
+STDCALL
+GdiRealizationInfo(HDC hdc, PREALIZATION_INFO pri);
+
+WINBOOL
+STDCALL
+GdiReleaseDC(HDC hdc);
+
+WINBOOL
+STDCALL
+GdiReleaseLocalDC(HDC hdc);
+
+WINBOOL
+STDCALL
+GdiSetAttrs(HDC hdc);
+
+VOID
+STDCALL
+GdiSetLastError(DWORD dwErrCode);
+
+WINBOOL
+STDCALL
+GdiSetPixelFormat(HDC hdc,int ipfd);
+
+WINBOOL
+STDCALL
+GdiTransparentBlt(HDC hdcDst, int xDst, int yDst, int cxDst, int cyDst,HDC hdcSrc, int xSrc, int ySrc, int cxSrc, int cySrc,COLORREF TransColor);
+
+WINBOOL
+STDCALL
+GdiValidateHandle(HGDIOBJ hobj);
+
+WINBOOL
+STDCALL
+GdiSwapBuffers(HDC hdc);
+
+VOID 
+STDCALL
+GdiSetServerAttr(HDC hdc,DWORD attr);
+
+DWORD 
+STDCALL
+GetBitmapAttributes(HBITMAP hbm);
+
+DWORD 
+STDCALL
+GetBrushAttributes(HBRUSH hbr);
+
+WINBOOL 
+STDCALL
+GetCharABCWidthsI(
+       HDC hdc,
+       UINT giFirst,
+       UINT cgi,
+       LPWORD pgi,
+       LPABC lpabc
+);
+
+WINBOOL 
+STDCALL
+GetCharWidthI(
+       HDC hdc,
+       UINT giFirst,
+       UINT cgi,
+       LPWORD pgi,
+       LPINT lpBuffer
+);
+
+WINBOOL 
+STDCALL
+GetCharWidthInfo(HDC hdc,PCHWIDTHINFO pChWidthInfo);
+
+COLORREF 
+STDCALL
+GetDCBrushColor(
+       HDC hdc
+);
+
+COLORREF 
+STDCALL
+GetDCPenColor(
+       HDC hdc
+);
+
+DWORD 
+STDCALL
+GetFontUnicodeRanges(
+       HDC hdc,
+       LPGLYPHSET lpgs
+);
+
+WINBOOL 
+STDCALL
+GetETM(HDC hdc,EXTTEXTMETRIC *petm);
+
+ULONG 
+STDCALL
+GetEUDCTimeStamp(VOID);
+
+DWORD 
+STDCALL
+GetEUDCTimeStampExW(LPCWSTR str);
+
+ULONG 
+STDCALL
+GetFontAssocStatus(HDC hdc);
+
+HFONT 
+STDCALL
+GetHFONT(HDC dc);
+
+DWORD 
+STDCALL
+GetLayout(
+       HDC hdc
+);
+
+WINBOOL
+STDCALL
+GetTextExtentExPointWPri(HDC hdc,LPWSTR lpwsz,ULONG cwc,ULONG dxMax,ULONG *pcCh,PULONG pdxOut,LPSIZE psize);
+
+WINBOOL 
+STDCALL
+GetTextExtentPointI(
+       HDC hdc,
+       LPWORD pgiIn,
+       int cgi,
+       LPSIZE lpSize
+);
+
+int 
+STDCALL
+GetTextFaceAliasW(HDC hdc,int cChar,LPWSTR pszOut);
+
+WINBOOL 
+STDCALL
+GetTransform(HDC hdc, DWORD iXform, LPXFORM pxf);
+
+LONG 
+STDCALL
+HT_Get8BPPFormatPalette(LPPALETTEENTRY pPaletteEntry, USHORT RedGamma,USHORT GreenGamma, USHORT BlueGamma);
+
+LONG 
+STDCALL
+HT_Get8BPPMaskPalette(LPPALETTEENTRY pPaletteEntry, WINBOOL Use8BPPMaskPal,BYTE CMYMask, USHORT RedGamma, USHORT GreenGamma, USHORT BlueGamma);
+
+WINBOOL 
+STDCALL
+MirrorRgn(HWND hwnd,HRGN hrgn);
+
+int 
+STDCALL
+NamedEscape(HDC hdc,PWCHAR pDriver,int nDriver,int iEsc,int cjIn,LPSTR pjIn,int cjOut,LPSTR pjOut);
+
+DWORD 
+STDCALL
+QueryFontAssocStatus(VOID);
+
+WINBOOL 
+STDCALL
+RemoveFontMemResourceEx(
+       HANDLE fh
+);
+
+int 
+STDCALL
+RemoveFontResourceTracking(LPCSTR lpString,int unknown);
+
+WINBOOL 
+STDCALL
+GetTextExtentExPointI(
+       HDC hdc,
+       LPWORD pgiIn,
+       int cgi,
+       int nMaxExtent,
+       LPINT lpnFit,
+       LPINT alpDx,
+       LPSIZE lpSize
+);
+
+HBITMAP 
+STDCALL
+SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags);
+
+HBRUSH 
+STDCALL
+SetBrushAttributes(HBRUSH hbm, DWORD dwFlags);
+
+COLORREF 
+STDCALL
+SetDCBrushColor(
+       HDC hdc,
+       COLORREF crColor
+);
+
+COLORREF 
+STDCALL
+SetDCPenColor(
+       HDC hdc,
+       COLORREF crColor
+);
+
+DWORD 
+STDCALL
+SetLayout(
+       HDC hdc,
+       DWORD dwLayout
+);
+
+DWORD 
+STDCALL
+SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout);
+
+WINBOOL 
+STDCALL
+SetMagicColors(HDC hdc,PALETTEENTRY peMagic,ULONG Index);
+
+WINBOOL
+STDCALL
+SetVirtualResolution(HDC hdc, int cxVirtualDevicePixel,int cyVirtualDevicePixel,int cxVirtualDeviceMm, int cyVirtualDeviceMm);
+
+int 
+STDCALL
+StartFormPage(HDC hdc);
+
+VOID 
+STDCALL
+UnloadNetworkFonts(DWORD unknown);
+
+WINBOOL 
+STDCALL
+bInitSystemAndFontsDirectoriesW(LPWSTR *SystemDir,LPWSTR *FontsDir);
+
+WINBOOL 
+STDCALL
+bMakePathNameW(LPWSTR lpBuffer,LPCWSTR lpFileName,LPWSTR *lpFilePart,DWORD unknown);
+
+WINBOOL
+STDCALL
+GdiAddGlsRecord(HDC hdc,DWORD unknown1,LPCSTR unknown2,LPRECT unknown3);
+
+HANDLE
+STDCALL
+GdiConvertMetaFilePict(HGLOBAL hMem);
+
+DEVMODEW *
+STDCALL
+GdiConvertToDevmodeW(DEVMODEA *dm);
+
+HENHMETAFILE
+STDCALL
+GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo);
+
+METAFILEPICT *
+STDCALL
+GdiCreateLocalMetaFilePict(HENHMETAFILE hmo);
+
 DWORD
-WINAPI
+STDCALL
+GdiGetCharDimensions(HDC hdc,LPTEXTMETRICW lptm,BOOL unk);
+
+PSHAREDHANDLETABLE
+STDCALL
+GdiQueryTable(VOID);
+
+HANDLE 
+STDCALL
+GdiGetSpoolFileHandle(
+       LPWSTR          pwszPrinterName,
+       LPDEVMODEW      pDevmode,
+       LPWSTR          pwszDocName);
+
+WINBOOL
+STDCALL
+GdiDeleteSpoolFileHandle(
+       HANDLE  SpoolFileHandle);
+
+DWORD 
+STDCALL
+GdiGetPageCount(
+       HANDLE  SpoolFileHandle);
+
+HDC
+STDCALL
+GdiGetDC(
+       HANDLE  SpoolFileHandle);
+
+HANDLE 
+STDCALL
+GdiGetPageHandle(
+       HANDLE  SpoolFileHandle,
+       DWORD   Page,
+       LPDWORD pdwPageType);
+
+WINBOOL
+STDCALL
+GdiStartDocEMF(
+       HANDLE          SpoolFileHandle,
+       DOCINFOW        *pDocInfo);
+
+WINBOOL
+STDCALL
+GdiStartPageEMF(
+       HANDLE  SpoolFileHandle);
+
+WINBOOL
+STDCALL
+GdiPlayPageEMF(
+       HANDLE  SpoolFileHandle,
+       HANDLE  hemf,
+       RECT    *prectDocument,
+       RECT    *prectBorder,
+       RECT    *prectClip);
+
+WINBOOL
+STDCALL
+GdiEndPageEMF(
+       HANDLE  SpoolFileHandle,
+       DWORD   dwOptimization);
+
+WINBOOL
+STDCALL
+GdiEndDocEMF(
+       HANDLE  SpoolFileHandle);
+
+WINBOOL
+STDCALL
+GdiGetDevmodeForPage(
+       HANDLE          SpoolFileHandle,
+       DWORD           dwPageNumber,
+       PDEVMODEW       *pCurrDM,
+       PDEVMODEW       *pLastDM);
+
+WINBOOL
+STDCALL
+GdiResetDCEMF(
+       HANDLE          SpoolFileHandle,
+       PDEVMODEW       pCurrDM);
+
+DWORD
+STDCALL 
 SetSysColorsTemp(
                 const COLORREF *pPens,
                 const HBRUSH *pBrushes,
@@ -7903,7 +8416,7 @@ SHLoadInProc (REFCLSID);
 
 /* Win32 Fibers */
 
-typedef VOID (WINAPI * PFIBER_START_ROUTINE) (IN LPVOID lpFiberArgument);
+typedef VOID (WINAPI * PFIBER_START_ROUTINE) (LPVOID lpFiberArgument);
 typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
 
 #define FIBER_FLAG_FLOAT_SWITCH (1)
index 2adc9f0..3ede51f 100644 (file)
@@ -485,6 +485,21 @@ typedef struct {
   FONTSIGNATURE fs;
 } CHARSETINFO, *LPCHARSETINFO;
 
+typedef struct tagWCRANGE
+{
+    WCHAR  wcLow;
+    USHORT cGlyphs;
+} WCRANGE, *PWCRANGE,FAR *LPWCRANGE;
+
+typedef struct tagGLYPHSET
+{
+    DWORD    cbThis;
+    DWORD    flAccel;
+    DWORD    cGlyphsSupported;
+    DWORD    cRanges;
+    WCRANGE  ranges[1];
+} GLYPHSET, *PGLYPHSET, FAR *LPGLYPHSET;
+
 typedef struct {
   DWORD        lStructSize;
   HWND         hwndOwner;
@@ -853,6 +868,16 @@ typedef struct _currencyfmtW {
 
 typedef_tident(CURRENCYFMT)
 
+typedef struct _TRIVERTEX
+{
+    LONG    x;
+    LONG    y;
+    COLOR16 Red;
+    COLOR16 Green;
+    COLOR16 Blue;
+    COLOR16 Alpha;
+}TRIVERTEX,*PTRIVERTEX,*LPTRIVERTEX;
+
 typedef struct tagCURSORSHAPE {
   int     xHotSpot;
   int     yHotSpot;
@@ -1184,6 +1209,36 @@ typedef struct {
 
 
 
+typedef struct _EXTTEXTMETRIC
+    {
+    short   emSize;
+    short   emPointSize;
+    short   emOrientation;
+    short   emMasterHeight;
+    short   emMinScale;
+    short   emMaxScale;
+    short   emMasterUnits;
+    short   emCapHeight;
+    short   emXHeight;
+    short   emLowerCaseAscent;
+    short   emLowerCaseDescent;
+    short   emSlant;
+    short   emSuperScript;
+    short   emSubScript;
+    short   emSuperScriptSize;
+    short   emSubScriptSize;
+    short   emUnderlineOffset;
+    short   emUnderlineWidth;
+    short   emDoubleUpperUnderlineOffset;
+    short   emDoubleLowerUnderlineOffset;
+    short   emDoubleUpperUnderlineWidth;
+    short   emDoubleLowerUnderlineWidth;
+    short   emStrikeOutOffset;
+    short   emStrikeOutWidth;
+    WORD    emKernPairs;
+    WORD    emKernTracks;
+} EXTTEXTMETRIC, *PEXTTEXTMETRIC;
+
 typedef struct _DRIVER_INFO_1A {
   LPSTR  pName;
 } DRIVER_INFO_1A;
@@ -2081,6 +2136,28 @@ typedef struct tagENUMLOGFONTEXW {
 typedef_tident(ENUMLOGFONTEX)
 typedef_tident(LPENUMLOGFONTEX)
 
+typedef struct tagDESIGNVECTOR
+{
+    DWORD  dvReserved;
+    DWORD  dvNumAxes;
+    LONG   dvValues[MM_MAX_NUMAXES];
+} DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR;
+
+typedef struct tagENUMLOGFONTEXDVA
+{
+    ENUMLOGFONTEXA elfEnumLogfontEx;
+    DESIGNVECTOR   elfDesignVector;
+} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, FAR *LPENUMLOGFONTEXDVA;
+typedef struct tagENUMLOGFONTEXDVW
+{
+    ENUMLOGFONTEXW elfEnumLogfontEx;
+    DESIGNVECTOR   elfDesignVector;
+} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, FAR *LPENUMLOGFONTEXDVW;
+
+typedef_tident(ENUMLOGFONTEXDV)
+typedef_tident(PENUMLOGFONTEXDV)
+typedef_tident(LPENUMLOGFONTEXDV)
+
 typedef struct _EVENTLOGRECORD {
   DWORD  Length;
   DWORD  Reserved;
@@ -5184,7 +5261,7 @@ typedef struct _TTPOLYGONHEADER {
   DWORD   cb;
   DWORD   dwType;
   POINTFX pfxStart;
-} TTPOLYGONHEADER,  * LPTTPOLYGONHEADER;
+} TTPOLYGONHEADER, *PTTPOLYGONHEADER, *LPTTPOLYGONHEADER;
 
 typedef struct _TV_DISPINFOA {
   NMHDR    hdr;
index 46700da..d97014d 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
+HFONT
+STDCALL
+CreateFontIndirectExW(const ENUMLOGFONTEXDVW *elfexd);
+
+DWORD 
+STDCALL
+GetGlyphIndicesW(
+       HDC hdc,
+       LPCWSTR lpstr,
+       int c,
+       LPWORD pgi,
+       DWORD fl
+);
+
+WINBOOL 
+STDCALL
+RemoveFontResourceExW(
+       LPCWSTR lpFileName,
+       DWORD fl,
+       PVOID pdv
+);
+
+UINT 
+STDCALL
+GetStringBitmapW(HDC hdc,LPWSTR pwsz,WINBOOL unknown,UINT cj,BYTE *lpSB);
+
 WINBOOL
 STDCALL
 GetAltTabInfoW(
index 56bda66..001cdfe 100644 (file)
@@ -19,9 +19,9 @@
 ;  DISCLAMED. This includes but is not limited to warrenties of
 ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 ;
-; $Revision: 1.17 $
-; $Author: royce $
-; $Date: 2003/07/15 19:27:24 $
+; $Revision: 1.18 $
+; $Author: weiden $
+; $Date: 2003/08/26 12:28:53 $
 ;
 ; These three functions appear to be name mangled in some way, so GCC is
 ; probably not going to be able to use them in any case.
@@ -43,6 +43,7 @@ __builtin_new
 __builtin_delete
 ??2@YAPAXI@Z=malloc
 ??3@YAXPAX@Z=free
+?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=_set_new_handler__FPFUi_i
 _set_new_handler__FPFUi_i
 _CIacos
 _CIasin
index ebe592f..12e3d5b 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: gdi32.def,v 1.7 2003/08/14 20:25:52 royce Exp $
+; $Id: gdi32.def,v 1.8 2003/08/26 12:28:53 weiden Exp $
 ;
 ; gdi32.def
 ;
@@ -10,23 +10,36 @@ LIBRARY gdi32.dll
 EXPORTS
 AbortDoc@4
 AbortPath@4
+AddFontMemResourceEx@16
 AddFontResourceA@4
 AddFontResourceExA@12
 AddFontResourceExW@12
 AddFontResourceW@4
+AddFontResourceTracking@8
 AngleArc@24
 AnimatePalette@16
+AnyLinkedFonts@0
 Arc@36
 ArcTo@36
 BeginPath@4
+BRUSHOBJ_hGetColorTransform@4
+BRUSHOBJ_pvAllocRbrush@8
+BRUSHOBJ_pvGetRbrush@4
+BRUSHOBJ_ulGetBrushColor@4
 BitBlt@36
 CancelDC@4
 CheckColorsInGamut@16
 ChoosePixelFormat@8
 Chord@36
+ClearBitmapAttributes@8
+ClearBrushAttributes@8
+CLIPOBJ_bEnum@12
+CLIPOBJ_cEnumStart@20
+CLIPOBJ_ppoGetPath@4
 CloseEnhMetaFile@4
 CloseFigure@4
 CloseMetaFile@4
+ColorCorrectPalette@16
 ColorMatchToTarget@12
 CombineRgn@16
 CombineTransform@12
@@ -54,6 +67,8 @@ CreateEnhMetaFileA@16
 CreateEnhMetaFileW@16
 CreateFontA@56
 CreateFontIndirectA@4
+CreateFontIndirectExA@4
+CreateFontIndirectExW@4
 CreateFontIndirectW@4
 CreateFontW@56
 CreateHalftonePalette@4
@@ -75,6 +90,63 @@ CreateScalableFontResourceA@16
 CreateScalableFontResourceW@16
 CreateSolidBrush@4
 DPtoLP@12
+DxgGenericThunk@24
+D3DContextCreate@16
+D3DContextDestroy@4
+D3DContextDestroyAll@0
+D3DValidateTextureStageState@4
+D3DDrawPrimitives2@28
+D3DGetDriverState@4
+DdAddAttachedSurface@12
+DdAlphaBlt@12
+DdDdAttachSurface@8
+DdBeginMoCompFrame@8
+DdBlt@12
+DdCanCreateSurface@8
+DdCanCreateD3DBuffer@8
+DdColorControl@8
+DdDdCreateDirectDrawObject@4
+DdCreateSurface@32
+DdCreateD3DBuffer@32
+DdCreateMoComp@8
+DdDdCreateSurfaceObject@24
+DdDdDeleteDirectDrawObject@4
+DdDdDeleteSurfaceObject@4
+DdDestroyMoComp@8
+DdDestroySurface@8
+DdDestroyD3DBuffer@4
+DdEndMoCompFrame@8
+DdFlip@20
+DdFlipToGDISurface@8
+DdGetAvailDriverMemory@8
+DdGetBltStatus@8
+DdDdGetDC@8
+DdGetDriverInfo@8
+DdDdGetDxHandle@12
+DdGetFlipStatus@8
+DdGetInternalMoCompInfo@8
+DdGetMoCompBuffInfo@8
+DdGetMoCompGuids@8
+DdGetMoCompFormats@8
+DdGetScanLine@8
+DdLock@12
+DdLockD3D@8
+DdDdQueryDirectDrawObject@44
+DdQueryMoCompStatus@8
+DdDdReenableDirectDrawObject@8
+DdDdReleaseDC@4
+DdRenderMoComp@8
+DdDdResetVisrgn@8
+DdSetColorKey@8
+DdSetExclusiveMode@8
+DdDdSetGammaRamp@12
+DdCreateSurfaceEx@12
+DdSetOverlayPosition@12
+DdDdUnattachSurface@8
+DdUnlock@8
+DdUnlockD3D@8
+DdUpdateOverlay@12
+DdWaitForVerticalBlank@8
 DeleteColorSpace@4
 DeleteDC@4
 DeleteEnhMetaFile@4
@@ -85,9 +157,57 @@ DeviceCapabilitiesExA@20
 DeviceCapabilitiesExW@20
 DrawEscape@16
 Ellipse@20
+EnableEUDC@4
 EndDoc@4
+EndFormPage@4
 EndPage@4
 EndPath@4
+EngAcquireSemaphore@4
+EngAlphaBlend@28
+EngAssociateSurface@12
+EngBitBlt@44
+EngCheckAbort@4
+EngComputeGlyphSet@12
+EngCopyBits@24
+EngCreateBitmap@24
+EngCreateClip@0
+EngCreateDeviceBitmap@16
+EngCreateDeviceSurface@16
+EngCreatePalette@24
+EngCreateSemaphore@0
+EngDeleteClip@4
+EngDeletePalette@4
+EngDeletePath@4
+EngDeleteSemaphore@4
+EngDeleteSurface@4
+EngEraseSurface@12
+EngFillPath@28
+EngFindResource@16
+EngFreeModule@4
+EngGetCurrentCodePage@8
+EngGetDriverName@4
+EngGetPrinterDataFileName@4
+EngGradientFill@40
+EngLineTo@36
+EngLoadModule@4
+EngLockSurface@4
+EngMarkBandingSurface@4
+EngMultiByteToUnicodeN@20
+EngMultiByteToWideChar@20
+EngPaint@20
+EngPlgBlt@44
+EngQueryEMFInfo@8
+EngQueryLocalTime@4
+EngReleaseSemaphore@4
+EngStretchBlt@44
+EngStretchBltROP@52
+EngStrokeAndFillPath@40
+EngStrokePath@32
+EngTextOut@40
+EngTransparentBlt@32
+EngUnicodeToMultiByteN@20
+EngUnlockSurface@4
+EngWideCharToMultiByte@20
 EnumEnhMetaFile@20
 EnumFontFamiliesA@16
 EnumFontFamiliesExA@20
@@ -101,6 +221,8 @@ EnumMetaFile@16
 EnumObjects@16
 EqualRgn@8
 Escape@20
+EudcLoadLinkW@16
+EudcUnloadLinkW@8
 ExcludeClipRect@20
 ExtCreatePen@20
 ExtCreateRegion@12
@@ -114,33 +236,127 @@ FillRgn@12
 FixBrushOrgEx@16
 FlattenPath@4
 FloodFill@16
+FontIsLinked@4
+FONTOBJ_cGetAllGlyphHandles@8
+FONTOBJ_cGetGlyphs@20
+FONTOBJ_pQueryGlyphAttrs@8
+FONTOBJ_pfdg@4
+FONTOBJ_pifi@4
+FONTOBJ_pvTrueTypeFontFile@8
+FONTOBJ_pxoGetXform@4
+FONTOBJ_vGetInfo@12
 FrameRgn@20
+GdiAddFontResourceW@12
+GdiAddGlsBounds@8
+GdiAddGlsRecord@16
+GdiAlphaBlend@44
+GdiArtificialDecrementDriver@8
+GdiCleanCacheDC@4
 GdiComment@12
+GdiConsoleTextOut@16
+GdiConvertAndCheckDC@4
+GdiConvertBitmap@4
+;GdiConvertBitmapV5
+GdiConvertBrush@4
+GdiConvertDC@4
+GdiConvertEnhMetaFile@4
+GdiConvertFont@4
+GdiConvertMetaFilePict@4
+GdiConvertPalette@4
+GdiConvertRegion@4
+GdiConvertToDevmodeW@4
+GdiCreateLocalEnhMetaFile@4
+GdiCreateLocalMetaFilePict@4
+GdiDeleteLocalDC@4
+GdiDeleteSpoolFileHandle@4
+GdiDescribePixelFormat@16
 GdiDllInitialize@12
+GdiDrawStream@12
+GdiEndDocEMF@4
+GdiEndPageEMF@8
+DdCreateDirectDrawObject@8
+DdQueryDirectDrawObject@44
+DdDeleteDirectDrawObject@4
+DdCreateSurfaceObject@8
+DdDeleteSurfaceObject@4
+DdResetVisrgn@8
+DdGetDC@8
+DdReleaseDC@4
+DdCreateDIBSection@24
+DdReenableDirectDrawObject@8
+DdAttachSurface@8
+DdUnattachSurface@8
+DdQueryDisplaySettingsUniqueness@0
+DdGetDxHandle@12
+DdSetGammaRamp@12
+DdSwapTextureHandles@12
+GdiFixUpHandle@4
 GdiFlush@0
+GdiFullscreenControl@20
 GdiGetBatchLimit@0
+GdiGetCharDimensions@12
+GdiGetCodePage@4
+GdiGetDC@4
+GdiGetDevmodeForPage@16
+GdiGetLocalBrush@4
+GdiGetLocalDC@4
+GdiGetLocalFont@4
+GdiGetPageCount@4
+GdiGetPageHandle@12
+GdiGetSpoolFileHandle@12
+;GdiGetSpoolMessage
+GdiGradientFill@24
+;GdiInitSpool
+;GdiInitializeLanguagePack
+GdiIsMetaFileDC@4
+GdiIsMetaPrintDC@4
+GdiIsPlayMetafileDC@4
 GdiPlayDCScript@24
+;GdiPlayEMF
 GdiPlayJournal@20
+GdiPlayPageEMF@20
+;GdiPlayPrivatePageEMF
 GdiPlayScript@28
+;GdiPrinterThunk
 GdiProcessSetup@0
+GdiQueryFonts@12
+GdiQueryTable@0
+GdiRealizationInfo@8
+GdiReleaseDC@4
+GdiReleaseLocalDC@4
+GdiResetDCEMF@8
+GdiSetAttrs@4
 GdiSetBatchLimit@4
+GdiSetLastError@4
+GdiSetPixelFormat@8
+GdiSetServerAttr@8
+GdiStartDocEMF@8
+GdiStartPageEMF@4
+GdiSwapBuffers@4
+GdiTransparentBlt@44
+GdiValidateHandle@4
 GetArcDirection@4
 GetAspectRatioFilterEx@8
+GetBitmapAttributes@4
 GetBitmapBits@12
 GetBitmapDimensionEx@8
 GetBkColor@4
 GetBkMode@4
 GetBoundsRect@12
+GetBrushAttributes@4
 GetBrushOrgEx@8
 GetCharABCWidthsA@16
 GetCharABCWidthsFloatA@16
 GetCharABCWidthsFloatW@16
+GetCharABCWidthsI@20
 GetCharABCWidthsW@16
 GetCharWidth32A@16
 GetCharWidth32W@16
 GetCharWidthA@16
 GetCharWidthFloatA@16
 GetCharWidthFloatW@16
+GetCharWidthI@20
+GetCharWidthInfo@8
 GetCharWidthW@16
 GetCharacterPlacementA@24
 GetCharacterPlacementW@24
@@ -150,7 +366,9 @@ GetColorAdjustment@8
 GetColorSpace@4
 GetCurrentObject@8
 GetCurrentPositionEx@8
+GetDCBrushColor@4
 GetDCOrgEx@8
+GetDCPenColor@4
 GetDIBColorTable@16
 GetDIBits@28
 GetDeviceCaps@8
@@ -163,20 +381,29 @@ GetEnhMetaFileHeader@12
 GetEnhMetaFilePaletteEntries@12
 GetEnhMetaFilePixelFormat@12
 GetEnhMetaFileW@4
+GetETM@8
+GetEUDCTimeStamp@0
+GetEUDCTimeStampExW@4
+GetFontAssocStatus@4
 GetFontData@20
 GetFontLanguageInfo@4
 GetFontResourceInfo@16
 GetFontResourceInfoW@16
-GetGlyphOutlineA@28
+GetFontUnicodeRanges@8
+GetGlyphIndicesA@20
+GetGlyphIndicesW@20
+GetGlyphOutline@28
 GetGlyphOutlineA@28
 GetGlyphOutlineW@28
 GetGlyphOutlineWow@28
 GetGraphicsMode@4
+GetHFONT@4
 GetICMProfileA@12
 GetICMProfileW@12
-GetKerningPairsA@12
+GetKerningPairs@12
 GetKerningPairsA@12
 GetKerningPairsW@12
+GetLayout@4
 GetLogColorSpaceA@12
 GetLogColorSpaceW@12
 GetMapMode@4
@@ -205,6 +432,8 @@ GetRelAbs@8
 GetRgnBox@8
 GetStockObject@4
 GetStretchBltMode@4
+GetStringBitmapA@20
+GetStringBitmapW@20
 GetSystemPaletteEntries@16
 GetSystemPaletteUse@4
 GetTextAlign@4
@@ -213,35 +442,49 @@ GetTextCharset@4
 GetTextCharsetInfo@12
 GetTextColor@4
 GetTextExtentExPointA@28
+GetTextExtentExPointI@28
 GetTextExtentExPointW@28
+GetTextExtentExPointWPri@28
 GetTextExtentPoint32A@16
 GetTextExtentPoint32W@16
 GetTextExtentPointA@16
+GetTextExtentPointI@16
 GetTextExtentPointW@16
 GetTextFaceA@12
 GetTextFaceW@12
+GetTextFaceAliasW@12
 GetTextMetricsA@8
 GetTextMetricsW@8
+GetTransform@12
 GetViewportExtEx@8
 GetViewportOrgEx@8
 GetWinMetaFileBits@20
 GetWindowExtEx@8
 GetWindowOrgEx@8
 GetWorldTransform@8
+HT_Get8BPPFormatPalette@16
+HT_Get8BPPMaskPalette@24
 IntersectClipRect@20
 InvertRgn@8
 LPtoDP@12
 LineDDA@24
 LineTo@12
 MaskBlt@48
+MirrorRgn@8
 ModifyWorldTransform@12
 MoveToEx@16
+NamedEscape@32
 OffsetClipRgn@12
 OffsetRgn@12
 OffsetViewportOrgEx@16
 OffsetWindowOrgEx@16
 PaintRgn@8
 PatBlt@24
+PATHOBJ_bEnum@8
+PATHOBJ_bEnumClipLines@12
+PATHOBJ_vEnumStart@4
+PATHOBJ_vEnumStartClipLines@16
+PATHOBJ_vGetBounds@8
 PolyPatBlt@20
 PathToRegion@4
 Pie@36
@@ -262,12 +505,17 @@ Polyline@12
 PolylineTo@12
 PtInRegion@12
 PtVisible@12
+QueryFontAssocStatus@0
 RealizePalette@4
 RectInRegion@8
 RectVisible@8
 Rectangle@20
+RemoveFontMemResourceEx@4
 RemoveFontResourceA@4
+RemoveFontResourceExA@12
+RemoveFontResourceExW@12
 RemoveFontResourceW@4
+RemoveFontResourceTracking@8
 ResetDCA@8
 ResetDCW@8
 ResizePalette@8
@@ -284,14 +532,18 @@ SelectObject@8
 SelectPalette@12
 SetAbortProc@8
 SetArcDirection@8
+SetBitmapAttributes@8
 SetBitmapBits@12
 SetBitmapDimensionEx@16
 SetBkColor@8
 SetBkMode@8
 SetBoundsRect@12
+SetBrushAttributes@8
 SetBrushOrgEx@16
 SetColorAdjustment@8
 SetColorSpace@8
+SetDCBrushColor@8
+SetDCPenColor@8
 SetDIBColorTable@16
 SetDIBits@28
 SetDIBitsToDevice@48
@@ -302,6 +554,9 @@ SetGraphicsMode@8
 SetICMMode@8
 SetICMProfileA@8
 SetICMProfileW@8
+SetLayout@8
+SetLayoutWidth@12
+SetMagicColors@12
 SetMapMode@8
 SetMapperFlags@8
 SetMetaFileBitsEx@8
@@ -323,15 +578,22 @@ SetTextColor@8
 SetTextJustification@12
 SetViewportExtEx@16
 SetViewportOrgEx@16
+SetVirtualResolution@20
 SetWinMetaFileBits@16
 SetWindowExtEx@16
 SetWindowOrgEx@16
 SetWorldTransform@8
 StartDocA@8
 StartDocW@8
+StartFormPage@4
 StartPage@4
 StretchBlt@44
 StretchDIBits@52
+STROBJ_bEnum@12
+STROBJ_bEnumPositionsOnly@12
+STROBJ_bGetAdvanceWidths@16
+STROBJ_dwGetCodePage@4
+STROBJ_vEnumStart@4
 StrokeAndFillPath@4
 StrokePath@4
 SwapBuffers@4
@@ -339,9 +601,19 @@ TextOutA@20
 TextOutW@20
 TranslateCharsetInfo@12
 UnrealizeObject@4
+UnloadNetworkFonts@4
 UpdateColors@4
 UpdateICMRegKeyA@16
 UpdateICMRegKeyA@16
 UpdateICMRegKeyW@16
 WidenPath@4
+XFORMOBJ_bApplyXform@20
+XFORMOBJ_iGetXform@8
+XLATEOBJ_cGetPalette@16
+XLATEOBJ_hGetColorTransform@4
+XLATEOBJ_iXlate@8
+XLATEOBJ_piVector@4
+bInitSystemAndFontsDirectoriesW@8
+bMakePathNameW@16
+;cGetTTFFromFOT
 gdiPlaySpoolStream@24
index ddc815f..6f70328 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: gdi32.edf,v 1.5 2003/08/14 20:25:52 royce Exp $
+; $Id: gdi32.edf,v 1.6 2003/08/26 12:28:53 weiden Exp $
 ;
 ; gdi32.def
 ;
@@ -10,23 +10,36 @@ LIBRARY gdi32.dll
 EXPORTS
 AbortDoc=AbortDoc@4
 AbortPath=AbortPath@4
+AddFontMemResourceEx=AddFontMemResourceEx@16
 AddFontResourceA=AddFontResourceA@4
 AddFontResourceExA=AddFontResourceExA@12
 AddFontResourceExW=AddFontResourceExW@12
+AddFontResourceTracking=AddFontResourceTracking@8
 AddFontResourceW=AddFontResourceW@4
 AngleArc=AngleArc@24
 AnimatePalette=AnimatePalette@16
+AnyLinkedFonts=AnyLinkedFonts@0
 Arc=Arc@36
 ArcTo=ArcTo@36
 BeginPath=BeginPath@4
+BRUSHOBJ_hGetColorTransform=BRUSHOBJ_hGetColorTransform@4
+BRUSHOBJ_pvAllocRbrush=BRUSHOBJ_pvAllocRbrush@8
+BRUSHOBJ_pvGetRbrush=BRUSHOBJ_pvGetRbrush@4
+BRUSHOBJ_ulGetBrushColor=BRUSHOBJ_ulGetBrushColor@4
 BitBlt=BitBlt@36
 CancelDC=CancelDC@4
 CheckColorsInGamut=CheckColorsInGamut@16
 ChoosePixelFormat=ChoosePixelFormat@8
 Chord=Chord@36
+ClearBitmapAttributes=ClearBitmapAttributes@8
+ClearBrushAttributes=ClearBrushAttributes@8
+CLIPOBJ_bEnum=CLIPOBJ_bEnum@12
+CLIPOBJ_cEnumStart=CLIPOBJ_cEnumStart@20
+CLIPOBJ_ppoGetPath=CLIPOBJ_ppoGetPath@4
 CloseEnhMetaFile=CloseEnhMetaFile@4
 CloseFigure=CloseFigure@4
 CloseMetaFile=CloseMetaFile@4
+ColorCorrectPalette=ColorCorrectPalette@16
 ColorMatchToTarget=ColorMatchToTarget@12
 CombineRgn=CombineRgn@16
 CombineTransform=CombineTransform@12
@@ -54,6 +67,8 @@ CreateEnhMetaFileA=CreateEnhMetaFileA@16
 CreateEnhMetaFileW=CreateEnhMetaFileW@16
 CreateFontA=CreateFontA@56
 CreateFontIndirectA=CreateFontIndirectA@4
+CreateFontIndirectExA=CreateFontIndirectExA@4
+CreateFontIndirectExW=CreateFontIndirectExW@4
 CreateFontIndirectW=CreateFontIndirectW@4
 CreateFontW=CreateFontW@56
 CreateHalftonePalette=CreateHalftonePalette@4
@@ -75,6 +90,63 @@ CreateScalableFontResourceA=CreateScalableFontResourceA@16
 CreateScalableFontResourceW=CreateScalableFontResourceW@16
 CreateSolidBrush=CreateSolidBrush@4
 DPtoLP=DPtoLP@12
+DdEntry0=DxgGenericThunk@24
+DdEntry1=D3DContextCreate@16
+DdEntry2=D3DContextDestroy@4
+DdEntry3=D3DContextDestroyAll@0
+DdEntry4=D3DValidateTextureStageState@4
+DdEntry5=D3DDrawPrimitives2@28
+DdEntry6=D3DGetDriverState@4
+DdEntry7=DdAddAttachedSurface@12
+DdEntry8=DdAlphaBlt@12
+DdEntry9=DdDdAttachSurface@8
+DdEntry10=DdBeginMoCompFrame@8
+DdEntry11=DdBlt@12
+DdEntry12=DdCanCreateSurface@8
+DdEntry13=DdCanCreateD3DBuffer@8
+DdEntry14=DdColorControl@8
+DdEntry15=DdDdCreateDirectDrawObject@4
+DdEntry16=DdCreateSurface@32
+DdEntry17=DdCreateD3DBuffer@32
+DdEntry18=DdCreateMoComp@8
+DdEntry19=DdDdCreateSurfaceObject@24
+DdEntry20=DdDdDeleteDirectDrawObject@4
+DdEntry21=DdDdDeleteSurfaceObject@4
+DdEntry22=DdDestroyMoComp@8
+DdEntry23=DdDestroySurface@8
+DdEntry24=DdDestroyD3DBuffer@4
+DdEntry25=DdEndMoCompFrame@8
+DdEntry26=DdFlip@20
+DdEntry27=DdFlipToGDISurface@8
+DdEntry28=DdGetAvailDriverMemory@8
+DdEntry29=DdGetBltStatus@8
+DdEntry30=DdDdGetDC@8
+DdEntry31=DdGetDriverInfo@8
+DdEntry32=DdDdGetDxHandle@12
+DdEntry33=DdGetFlipStatus@8
+DdEntry34=DdGetInternalMoCompInfo@8
+DdEntry35=DdGetMoCompBuffInfo@8
+DdEntry36=DdGetMoCompGuids@8
+DdEntry37=DdGetMoCompFormats@8
+DdEntry38=DdGetScanLine@8
+DdEntry39=DdLock@12
+DdEntry40=DdLockD3D@8
+DdEntry41=DdDdQueryDirectDrawObject@44
+DdEntry42=DdQueryMoCompStatus@8
+DdEntry43=DdDdReenableDirectDrawObject@8
+DdEntry44=DdDdReleaseDC@4
+DdEntry45=DdRenderMoComp@8
+DdEntry46=DdDdResetVisrgn@8
+DdEntry47=DdSetColorKey@8
+DdEntry48=DdSetExclusiveMode@8
+DdEntry49=DdDdSetGammaRamp@12
+DdEntry50=DdCreateSurfaceEx@12
+DdEntry51=DdSetOverlayPosition@12
+DdEntry52=DdDdUnattachSurface@8
+DdEntry53=DdUnlock@8
+DdEntry54=DdUnlockD3D@8
+DdEntry55=DdUpdateOverlay@12
+DdEntry56=DdWaitForVerticalBlank@8
 DeleteColorSpace=DeleteColorSpace@4
 DeleteDC=DeleteDC@4
 DeleteEnhMetaFile=DeleteEnhMetaFile@4
@@ -85,9 +157,57 @@ DeviceCapabilitiesExA=DeviceCapabilitiesExA@20
 DeviceCapabilitiesExW=DeviceCapabilitiesExW@20
 DrawEscape=DrawEscape@16
 Ellipse=Ellipse@20
+EnableEUDC=EnableEUDC@4
 EndDoc=EndDoc@4
+EndFormPage=EndFormPage@4
 EndPage=EndPage@4
 EndPath=EndPath@4
+EngAcquireSemaphore=EngAcquireSemaphore@4
+EngAlphaBlend=EngAlphaBlend@28
+EngAssociateSurface=EngAssociateSurface@12
+EngBitBlt=EngBitBlt@44
+EngCheckAbort=EngCheckAbort@4
+EngComputeGlyphSet=EngComputeGlyphSet@12
+EngCopyBits=EngCopyBits@24
+EngCreateBitmap=EngCreateBitmap@24
+EngCreateClip=EngCreateClip@0
+EngCreateDeviceBitmap=EngCreateDeviceBitmap@16
+EngCreateDeviceSurface=EngCreateDeviceSurface@16
+EngCreatePalette=EngCreatePalette@24
+EngCreateSemaphore=EngCreateSemaphore@0
+EngDeleteClip=EngDeleteClip@4
+EngDeletePalette=EngDeletePalette@4
+EngDeletePath=EngDeletePath@4
+EngDeleteSemaphore=EngDeleteSemaphore@4
+EngDeleteSurface=EngDeleteSurface@4
+EngEraseSurface=EngEraseSurface@12
+EngFillPath=EngFillPath@28
+EngFindResource=EngFindResource@16
+EngFreeModule=EngFreeModule@4
+EngGetCurrentCodePage=EngGetCurrentCodePage@8
+EngGetDriverName=EngGetDriverName@4
+EngGetPrinterDataFileName=EngGetPrinterDataFileName@4
+EngGradientFill=EngGradientFill@40
+EngLineTo=EngLineTo@36
+EngLoadModule=EngLoadModule@4
+EngLockSurface=EngLockSurface@4
+EngMarkBandingSurface=EngMarkBandingSurface@4
+EngMultiByteToUnicodeN=EngMultiByteToUnicodeN@20
+EngMultiByteToWideChar=EngMultiByteToWideChar@20
+EngPaint=EngPaint@20
+EngPlgBlt=EngPlgBlt@44
+EngQueryEMFInfo=EngQueryEMFInfo@8
+EngQueryLocalTime=EngQueryLocalTime@4
+EngReleaseSemaphore=EngReleaseSemaphore@4
+EngStretchBlt=EngStretchBlt@44
+EngStretchBltROP=EngStretchBltROP@52
+EngStrokeAndFillPath=EngStrokeAndFillPath@40
+EngStrokePath=EngStrokePath@32
+EngTextOut=EngTextOut@40
+EngTransparentBlt=EngTransparentBlt@32
+EngUnicodeToMultiByteN=EngUnicodeToMultiByteN@20
+EngUnlockSurface=EngUnlockSurface@4
+EngWideCharToMultiByte=EngWideCharToMultiByte@20
 EnumEnhMetaFile=EnumEnhMetaFile@20
 EnumFontFamiliesA=EnumFontFamiliesA@16
 EnumFontFamiliesExA=EnumFontFamiliesExA@20
@@ -101,6 +221,8 @@ EnumMetaFile=EnumMetaFile@16
 EnumObjects=EnumObjects@16
 EqualRgn=EqualRgn@8
 Escape=Escape@20
+EudcLoadLinkW=EudcLoadLinkW@16
+EudcUnloadLinkW=EudcUnloadLinkW@8
 ExcludeClipRect=ExcludeClipRect@20
 ExtCreatePen=ExtCreatePen@20
 ExtCreateRegion=ExtCreateRegion@12
@@ -114,33 +236,127 @@ FillRgn=FillRgn@12
 FixBrushOrgEx=FixBrushOrgEx@16
 FlattenPath=FlattenPath@4
 FloodFill=FloodFill@16
+FontIsLinked=FontIsLinked@4
+FONTOBJ_cGetAllGlyphHandles=FONTOBJ_cGetAllGlyphHandles@8
+FONTOBJ_cGetGlyphs=FONTOBJ_cGetGlyphs@20
+FONTOBJ_pQueryGlyphAttrs=FONTOBJ_pQueryGlyphAttrs@8
+FONTOBJ_pfdg=FONTOBJ_pfdg@4
+FONTOBJ_pifi=FONTOBJ_pifi@4
+FONTOBJ_pvTrueTypeFontFile=FONTOBJ_pvTrueTypeFontFile@8
+FONTOBJ_pxoGetXform=FONTOBJ_pxoGetXform@4
+FONTOBJ_vGetInfo=FONTOBJ_vGetInfo@12
 FrameRgn=FrameRgn@20
+GdiAddFontResourceW=GdiAddFontResourceW@12
+GdiAddGlsBounds=GdiAddGlsBounds@8
+GdiAddGlsRecord=GdiAddGlsRecord@16
+GdiAlphaBlend=GdiAlphaBlend@44
+GdiArtificialDecrementDriver=GdiArtificialDecrementDriver@8
+GdiCleanCacheDC=GdiCleanCacheDC@4
 GdiComment=GdiComment@12
+GdiConsoleTextOut=GdiConsoleTextOut@16
+GdiConvertAndCheckDC=GdiConvertAndCheckDC@4
+GdiConvertBitmap=GdiConvertBitmap@4
+;GdiConvertBitmapV5
+GdiConvertBrush=GdiConvertBrush@4
+GdiConvertDC=GdiConvertDC@4
+GdiConvertEnhMetaFile=GdiConvertEnhMetaFile@4
+GdiConvertFont=GdiConvertFont@4
+GdiConvertMetaFilePict=GdiConvertMetaFilePict@4
+GdiConvertPalette=GdiConvertPalette@4
+GdiConvertRegion=GdiConvertRegion@4
+GdiConvertToDevmodeW=GdiConvertToDevmodeW@4
+GdiCreateLocalEnhMetaFile=GdiCreateLocalEnhMetaFile@4
+GdiCreateLocalMetaFilePict=GdiCreateLocalMetaFilePict@4
+GdiDeleteLocalDC=GdiDeleteLocalDC@4
+GdiDeleteSpoolFileHandle=GdiDeleteSpoolFileHandle@4
+GdiDescribePixelFormat=GdiDescribePixelFormat@16
 GdiDllInitialize=GdiDllInitialize@12
+GdiDrawStream=GdiDrawStream@12
+GdiEndDocEMF=GdiEndDocEMF@4
+GdiEndPageEMF=GdiEndPageEMF@8
+GdiEntry1=DdCreateDirectDrawObject@8
+GdiEntry10=DdReenableDirectDrawObject@8
+GdiEntry11=DdAttachSurface@8
+GdiEntry12=DdUnattachSurface@8
+GdiEntry13=DdQueryDisplaySettingsUniqueness@0
+GdiEntry14=DdGetDxHandle@12
+GdiEntry15=DdSetGammaRamp@12
+GdiEntry16=DdSwapTextureHandles@12
+GdiEntry2=DdQueryDirectDrawObject@44
+GdiEntry3=DdDeleteDirectDrawObject@4
+GdiEntry4=DdCreateSurfaceObject@8
+GdiEntry5=DdDeleteSurfaceObject@4
+GdiEntry6=DdResetVisrgn@8
+GdiEntry7=DdGetDC@8
+GdiEntry8=DdReleaseDC@4
+GdiEntry9=DdCreateDIBSection@24
+GdiFixUpHandle=GdiFixUpHandle@4
 GdiFlush=GdiFlush@0
+GdiFullscreenControl=GdiFullscreenControl@20
 GdiGetBatchLimit=GdiGetBatchLimit@0
+GdiGetCharDimensions=GdiGetCharDimensions@12
+GdiGetCodePage=GdiGetCodePage@4
+GdiGetDC=GdiGetDC@4
+GdiGetDevmodeForPage=GdiGetDevmodeForPage@16
+GdiGetLocalBrush=GdiGetLocalBrush@4
+GdiGetLocalDC=GdiGetLocalDC@4
+GdiGetLocalFont=GdiGetLocalFont@4
+GdiGetPageCount=GdiGetPageCount@4
+GdiGetPageHandle=GdiGetPageHandle@12
+GdiGetSpoolFileHandle=GdiGetSpoolFileHandle@12
+;GdiGetSpoolMessage
+GdiGradientFill=GdiGradientFill@24
+;GdiInitSpool
+;GdiInitializeLanguagePack
+GdiIsMetaFileDC=GdiIsMetaFileDC@4
+GdiIsMetaPrintDC=GdiIsMetaPrintDC@4
+GdiIsPlayMetafileDC=GdiIsPlayMetafileDC@4
 GdiPlayDCScript=GdiPlayDCScript@24
+;GdiPlayEMF
 GdiPlayJournal=GdiPlayJournal@20
+GdiPlayPageEMF=GdiPlayPageEMF@20
+;GdiPlayPrivatePageEMF
 GdiPlayScript=GdiPlayScript@28
+;GdiPrinterThunk
 GdiProcessSetup=GdiProcessSetup@0
+GdiQueryFonts=GdiQueryFonts@12
+GdiQueryTable=GdiQueryTable@0
+GdiRealizationInfo=GdiRealizationInfo@8
+GdiReleaseDC=GdiReleaseDC@4
+GdiReleaseLocalDC=GdiReleaseLocalDC@4
+GdiResetDCEMF=GdiResetDCEMF@8
+GdiSetAttrs=GdiSetAttrs@4
 GdiSetBatchLimit=GdiSetBatchLimit@4
+GdiSetLastError=GdiSetLastError@4
+GdiSetPixelFormat=GdiSetPixelFormat@8
+GdiSetServerAttr=GdiSetServerAttr@8
+GdiStartDocEMF=GdiStartDocEMF@8
+GdiStartPageEMF=GdiStartPageEMF@4
+GdiSwapBuffers=GdiSwapBuffers@4
+GdiTransparentBlt=GdiTransparentBlt@44
+GdiValidateHandle=GdiValidateHandle@4
 GetArcDirection=GetArcDirection@4
 GetAspectRatioFilterEx=GetAspectRatioFilterEx@8
+GetBitmapAttributes=GetBitmapAttributes@4
 GetBitmapBits=GetBitmapBits@12
 GetBitmapDimensionEx=GetBitmapDimensionEx@8
 GetBkColor=GetBkColor@4
 GetBkMode=GetBkMode@4
 GetBoundsRect=GetBoundsRect@12
+GetBrushAttributes=GetBrushAttributes@4
 GetBrushOrgEx=GetBrushOrgEx@8
 GetCharABCWidthsA=GetCharABCWidthsA@16
 GetCharABCWidthsFloatA=GetCharABCWidthsFloatA@16
 GetCharABCWidthsFloatW=GetCharABCWidthsFloatW@16
+GetCharABCWidthsI=GetCharABCWidthsI@20
 GetCharABCWidthsW=GetCharABCWidthsW@16
 GetCharWidth32A=GetCharWidth32A@16
 GetCharWidth32W=GetCharWidth32W@16
 GetCharWidthA=GetCharWidthA@16
 GetCharWidthFloatA=GetCharWidthFloatA@16
 GetCharWidthFloatW=GetCharWidthFloatW@16
+GetCharWidthI=GetCharWidthI@20
+GetCharWidthInfo=GetCharWidthInfo@8
 GetCharWidthW=GetCharWidthW@16
 GetCharacterPlacementA=GetCharacterPlacementA@24
 GetCharacterPlacementW=GetCharacterPlacementW@24
@@ -150,7 +366,9 @@ GetColorAdjustment=GetColorAdjustment@8
 GetColorSpace=GetColorSpace@4
 GetCurrentObject=GetCurrentObject@8
 GetCurrentPositionEx=GetCurrentPositionEx@8
+GetDCBrushColor=GetDCBrushColor@4
 GetDCOrgEx=GetDCOrgEx@8
+GetDCPenColor=GetDCPenColor@4
 GetDIBColorTable=GetDIBColorTable@16
 GetDIBits=GetDIBits@28
 GetDeviceCaps=GetDeviceCaps@8
@@ -163,20 +381,29 @@ GetEnhMetaFileHeader=GetEnhMetaFileHeader@12
 GetEnhMetaFilePaletteEntries=GetEnhMetaFilePaletteEntries@12
 GetEnhMetaFilePixelFormat=GetEnhMetaFilePixelFormat@12
 GetEnhMetaFileW=GetEnhMetaFileW@4
+GetETM=GetETM@8
+GetEUDCTimeStamp=GetEUDCTimeStamp@0
+GetEUDCTimeStampExW=GetEUDCTimeStampExW@4
+GetFontAssocStatus=GetFontAssocStatus@4
 GetFontData=GetFontData@20
 GetFontLanguageInfo=GetFontLanguageInfo@4
 GetFontResourceInfo=GetFontResourceInfo@16
 GetFontResourceInfoW=GetFontResourceInfoW@16
-GetGlyphOutlineA=GetGlyphOutlineA@28
+GetFontUnicodeRanges=GetFontUnicodeRanges@8
+GetGlyphIndicesA=GetGlyphIndicesA@20
+GetGlyphIndicesW=GetGlyphIndicesW@20
+GetGlyphOutline=GetGlyphOutlineA@28
 GetGlyphOutlineA=GetGlyphOutlineA@28
 GetGlyphOutlineW=GetGlyphOutlineW@28
 GetGlyphOutlineWow=GetGlyphOutlineWow@28
 GetGraphicsMode=GetGraphicsMode@4
+GetHFONT=GetHFONT@4
 GetICMProfileA=GetICMProfileA@12
 GetICMProfileW=GetICMProfileW@12
-GetKerningPairsA=GetKerningPairsA@12
+GetKerningPairs=GetKerningPairsA@12
 GetKerningPairsA=GetKerningPairsA@12
 GetKerningPairsW=GetKerningPairsW@12
+GetLayout=GetLayout@4
 GetLogColorSpaceA=GetLogColorSpaceA@12
 GetLogColorSpaceW=GetLogColorSpaceW@12
 GetMapMode=GetMapMode@4
@@ -205,6 +432,8 @@ GetRelAbs=GetRelAbs@8
 GetRgnBox=GetRgnBox@8
 GetStockObject=GetStockObject@4
 GetStretchBltMode=GetStretchBltMode@4
+GetStringBitmapA=GetStringBitmapA@20
+GetStringBitmapW=GetStringBitmapW@20
 GetSystemPaletteEntries=GetSystemPaletteEntries@16
 GetSystemPaletteUse=GetSystemPaletteUse@4
 GetTextAlign=GetTextAlign@4
@@ -213,35 +442,49 @@ GetTextCharset=GetTextCharset@4
 GetTextCharsetInfo=GetTextCharsetInfo@12
 GetTextColor=GetTextColor@4
 GetTextExtentExPointA=GetTextExtentExPointA@28
+GetTextExtentExPointI=GetTextExtentExPointI@28
 GetTextExtentExPointW=GetTextExtentExPointW@28
+GetTextExtentExPointWPri=GetTextExtentExPointWPri@28
 GetTextExtentPoint32A=GetTextExtentPoint32A@16
 GetTextExtentPoint32W=GetTextExtentPoint32W@16
 GetTextExtentPointA=GetTextExtentPointA@16
+GetTextExtentPointI=GetTextExtentPointI@16
 GetTextExtentPointW=GetTextExtentPointW@16
 GetTextFaceA=GetTextFaceA@12
 GetTextFaceW=GetTextFaceW@12
+GetTextFaceAliasW=GetTextFaceAliasW@12
 GetTextMetricsA=GetTextMetricsA@8
 GetTextMetricsW=GetTextMetricsW@8
+GetTransform=GetTransform@12
 GetViewportExtEx=GetViewportExtEx@8
 GetViewportOrgEx=GetViewportOrgEx@8
 GetWinMetaFileBits=GetWinMetaFileBits@20
 GetWindowExtEx=GetWindowExtEx@8
 GetWindowOrgEx=GetWindowOrgEx@8
 GetWorldTransform=GetWorldTransform@8
+HT_Get8BPPFormatPalette=HT_Get8BPPFormatPalette@16
+HT_Get8BPPMaskPalette=HT_Get8BPPMaskPalette@24
 IntersectClipRect=IntersectClipRect@20
 InvertRgn=InvertRgn@8
 LPtoDP=LPtoDP@12
 LineDDA=LineDDA@24
 LineTo=LineTo@12
 MaskBlt=MaskBlt@48
+MirrorRgn=MirrorRgn@8
 ModifyWorldTransform=ModifyWorldTransform@12
 MoveToEx=MoveToEx@16
+NamedEscape=NamedEscape@32
 OffsetClipRgn=OffsetClipRgn@12
 OffsetRgn=OffsetRgn@12
 OffsetViewportOrgEx=OffsetViewportOrgEx@16
 OffsetWindowOrgEx=OffsetWindowOrgEx@16
 PaintRgn=PaintRgn@8
 PatBlt=PatBlt@24
+PATHOBJ_bEnum=PATHOBJ_bEnum@8
+PATHOBJ_bEnumClipLines=PATHOBJ_bEnumClipLines@12
+PATHOBJ_vEnumStart=PATHOBJ_vEnumStart@4
+PATHOBJ_vEnumStartClipLines=PATHOBJ_vEnumStartClipLines@16
+PATHOBJ_vGetBounds=PATHOBJ_vGetBounds@8
 PolyPatBlt=PolyPatBlt@20
 PathToRegion=PathToRegion@4
 Pie=Pie@36
@@ -262,12 +505,17 @@ Polyline=Polyline@12
 PolylineTo=PolylineTo@12
 PtInRegion=PtInRegion@12
 PtVisible=PtVisible@12
+QueryFontAssocStatus=QueryFontAssocStatus@0
 RealizePalette=RealizePalette@4
 RectInRegion=RectInRegion@8
 RectVisible=RectVisible@8
 Rectangle=Rectangle@20
+RemoveFontMemResourceEx=RemoveFontMemResourceEx@4
 RemoveFontResourceA=RemoveFontResourceA@4
+RemoveFontResourceExA=RemoveFontResourceExA@12
+RemoveFontResourceExW=RemoveFontResourceExW@12
 RemoveFontResourceW=RemoveFontResourceW@4
+RemoveFontResourceTracking=RemoveFontResourceTracking@8
 ResetDCA=ResetDCA@8
 ResetDCW=ResetDCW@8
 ResizePalette=ResizePalette@8
@@ -284,14 +532,18 @@ SelectObject=SelectObject@8
 SelectPalette=SelectPalette@12
 SetAbortProc=SetAbortProc@8
 SetArcDirection=SetArcDirection@8
+SetBitmapAttributes=SetBitmapAttributes@8
 SetBitmapBits=SetBitmapBits@12
 SetBitmapDimensionEx=SetBitmapDimensionEx@16
 SetBkColor=SetBkColor@8
 SetBkMode=SetBkMode@8
 SetBoundsRect=SetBoundsRect@12
+SetBrushAttributes=SetBrushAttributes@8
 SetBrushOrgEx=SetBrushOrgEx@16
 SetColorAdjustment=SetColorAdjustment@8
 SetColorSpace=SetColorSpace@8
+SetDCBrushColor=SetDCBrushColor@8
+SetDCPenColor=SetDCPenColor@8
 SetDIBColorTable=SetDIBColorTable@16
 SetDIBits=SetDIBits@28
 SetDIBitsToDevice=SetDIBitsToDevice@48
@@ -302,6 +554,9 @@ SetGraphicsMode=SetGraphicsMode@8
 SetICMMode=SetICMMode@8
 SetICMProfileA=SetICMProfileA@8
 SetICMProfileW=SetICMProfileW@8
+SetLayout=SetLayout@8
+SetLayoutWidth=SetLayoutWidth@12
+SetMagicColors=SetMagicColors@12
 SetMapMode=SetMapMode@8
 SetMapperFlags=SetMapperFlags@8
 SetMetaFileBitsEx=SetMetaFileBitsEx@8
@@ -323,15 +578,22 @@ SetTextColor=SetTextColor@8
 SetTextJustification=SetTextJustification@12
 SetViewportExtEx=SetViewportExtEx@16
 SetViewportOrgEx=SetViewportOrgEx@16
+SetVirtualResolution=SetVirtualResolution@20
 SetWinMetaFileBits=SetWinMetaFileBits@16
 SetWindowExtEx=SetWindowExtEx@16
 SetWindowOrgEx=SetWindowOrgEx@16
 SetWorldTransform=SetWorldTransform@8
 StartDocA=StartDocA@8
 StartDocW=StartDocW@8
+StartFormPage=StartFormPage@4
 StartPage=StartPage@4
 StretchBlt=StretchBlt@44
 StretchDIBits=StretchDIBits@52
+STROBJ_bEnum=STROBJ_bEnum@12
+STROBJ_bEnumPositionsOnly=STROBJ_bEnumPositionsOnly@12
+STROBJ_bGetAdvanceWidths=STROBJ_bGetAdvanceWidths@16
+STROBJ_dwGetCodePage=STROBJ_dwGetCodePage@4
+STROBJ_vEnumStart=STROBJ_vEnumStart@4
 StrokeAndFillPath=StrokeAndFillPath@4
 StrokePath=StrokePath@4
 SwapBuffers=SwapBuffers@4
@@ -339,9 +601,19 @@ TextOutA=TextOutA@20
 TextOutW=TextOutW@20
 TranslateCharsetInfo=TranslateCharsetInfo@12
 UnrealizeObject=UnrealizeObject@4
+UnloadNetworkFonts=UnloadNetworkFonts@4
 UpdateColors=UpdateColors@4
 UpdateICMRegKeyA=UpdateICMRegKeyA@16
 UpdateICMRegKeyA=UpdateICMRegKeyA@16
 UpdateICMRegKeyW=UpdateICMRegKeyW@16
 WidenPath=WidenPath@4
+XFORMOBJ_bApplyXform=XFORMOBJ_bApplyXform@20
+XFORMOBJ_iGetXform=XFORMOBJ_iGetXform@8
+XLATEOBJ_cGetPalette=XLATEOBJ_cGetPalette@16
+XLATEOBJ_hGetColorTransform=XLATEOBJ_hGetColorTransform@4
+XLATEOBJ_iXlate=XLATEOBJ_iXlate@8
+XLATEOBJ_piVector=XLATEOBJ_piVector@4
+bInitSystemAndFontsDirectoriesW=bInitSystemAndFontsDirectoriesW@8
+bMakePathNameW=bMakePathNameW@16
+;cGetTTFFromFOT
 gdiPlaySpoolStream=gdiPlaySpoolStream@24
index 37daf46..be7f910 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.30 2003/08/05 15:41:02 weiden Exp $
+/* $Id: stubs.c,v 1.31 2003/08/26 12:28:53 weiden Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -12,7 +12,7 @@
 #undef UNICODE
 #endif
 #include <windows.h>
-
+#include <ddentry.h>
 
 /*
  * @unimplemented
@@ -666,22 +666,6 @@ PlayMetaFile(
 }
 
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-PolyPolygon(
-       HDC             a0,
-       CONST POINT     *a1,
-       CONST INT       *a2,
-       int             a3
-       )
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
 /*
  * @unimplemented
  */
@@ -1179,23 +1163,6 @@ AngleArc(
 }
 
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-PolyPolyline(
-       HDC             hdc,
-       CONST POINT     *a1,
-       CONST DWORD     *a2,
-       DWORD           a3
-       )
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return FALSE;
-}
-
-
 /*
  * @unimplemented
  */
@@ -2230,4 +2197,3115 @@ GetFontResourceInfo(
        return 0;
 }
 
-/* EOF */
+/*
+ * @unimplemented
+ */
+HANDLE 
+STDCALL 
+AddFontMemResourceEx(
+       PVOID pbFont,
+       DWORD cbFont,
+       PVOID pdv,
+       DWORD *pcFonts
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL 
+AddFontResourceTracking(
+       LPCSTR lpString,
+       int unknown
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL 
+AnyLinkedFonts(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP 
+STDCALL
+ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBRUSH 
+STDCALL
+ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+EnableEUDC(WINBOOL enable)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+EndFormPage(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+EudcLoadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath,INT iPriority,INT iFontLinkType)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+EudcUnloadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+FontIsLinked(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+GdiAddFontResourceW(LPCWSTR filename,FLONG f,DESIGNVECTOR *pdv)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GdiAddGlsBounds(HDC hdc,LPRECT prc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GdiAlphaBlend(HDC hdcDst,LONG DstX,LONG DstY,LONG DstCx,LONG DstCy,HDC hdcSrc,LONG SrcX,LONG SrcY,LONG SrcCx,LONG SrcCy,BLENDFUNCTION BlendFunction)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GdiArtificialDecrementDriver(LPWSTR pDriverName,WINBOOL unknown)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiCleanCacheDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GdiConsoleTextOut(HDC hdc, POLYTEXTW *lpto,UINT nStrings, RECTL *prclBounds)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HDC
+STDCALL
+GdiConvertAndCheckDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP 
+STDCALL
+GdiConvertBitmap(HBITMAP hbm)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBRUSH
+STDCALL
+GdiConvertBrush(HBRUSH hbr)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HDC 
+STDCALL
+GdiConvertDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT 
+STDCALL
+GdiConvertFont(HFONT hfont)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HPALETTE 
+STDCALL
+GdiConvertPalette(HPALETTE hpal)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HRGN
+STDCALL
+GdiConvertRegion(HRGN hregion)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HENHMETAFILE 
+STDCALL
+GdiConvertEnhMetaFile(HENHMETAFILE hmf)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiDeleteLocalDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+GdiDescribePixelFormat(HDC hdc,int ipfd,UINT cjpfd,PPIXELFORMATDESCRIPTOR ppfd)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiDrawStream(HDC dc, ULONG l, VOID *v)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HGDIOBJ 
+STDCALL
+GdiFixUpHandle(HGDIOBJ hobj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GdiGetCodePage(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBRUSH 
+STDCALL
+GdiGetLocalBrush(HBRUSH hbr)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HDC 
+STDCALL
+GdiGetLocalDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT 
+STDCALL
+GdiGetLocalFont(HFONT hfont)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiGradientFill(HDC hdc,PTRIVERTEX pVertex,ULONG uVertex,PVOID pMesh,ULONG uMesh,ULONG ulMode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiIsMetaFileDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiIsMetaPrintDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiIsPlayMetafileDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiReleaseDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiReleaseLocalDC(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiSetAttrs(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+GdiSetLastError(DWORD dwErrCode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiSetPixelFormat(HDC hdc,int ipfd)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiTransparentBlt(HDC hdcDst, int xDst, int yDst, int cxDst, int cyDst,HDC hdcSrc, int xSrc, int ySrc, int cxSrc, int cySrc,COLORREF TransColor)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiValidateHandle(HGDIOBJ hobj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiSwapBuffers(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID 
+STDCALL
+GdiSetServerAttr(HDC hdc,DWORD attr)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetBitmapAttributes(HBITMAP hbm)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetBrushAttributes(HBRUSH hbr)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetCharABCWidthsI(
+       HDC hdc,
+       UINT giFirst,
+       UINT cgi,
+       LPWORD pgi,
+       LPABC lpabc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetCharWidthI(
+       HDC hdc,
+       UINT giFirst,
+       UINT cgi,
+       LPWORD pgi,
+       LPINT lpBuffer
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+COLORREF 
+STDCALL
+GetDCBrushColor(
+       HDC hdc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+COLORREF 
+STDCALL
+GetDCPenColor(
+       HDC hdc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetFontUnicodeRanges(
+       HDC hdc,
+       LPGLYPHSET lpgs
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG 
+STDCALL
+GetEUDCTimeStamp(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetEUDCTimeStampExW(LPCWSTR str)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG 
+STDCALL
+GetFontAssocStatus(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT 
+STDCALL
+GetHFONT(HDC dc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetLayout(
+       HDC hdc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GetTextExtentExPointWPri(HDC hdc,LPWSTR lpwsz,ULONG cwc,ULONG dxMax,ULONG *pcCh,PULONG pdxOut,LPSIZE psize)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+GetTextFaceAliasW(HDC hdc,int cChar,LPWSTR pszOut)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetTransform(HDC hdc, DWORD iXform, LPXFORM pxf)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+LONG 
+STDCALL
+HT_Get8BPPFormatPalette(LPPALETTEENTRY pPaletteEntry, USHORT RedGamma,USHORT GreenGamma, USHORT BlueGamma)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+LONG 
+STDCALL
+HT_Get8BPPMaskPalette(LPPALETTEENTRY pPaletteEntry, WINBOOL Use8BPPMaskPal,BYTE CMYMask, USHORT RedGamma, USHORT GreenGamma, USHORT BlueGamma)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+MirrorRgn(HWND hwnd,HRGN hrgn)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+NamedEscape(HDC hdc,PWCHAR pDriver,int nDriver,int iEsc,int cjIn,LPSTR pjIn,int cjOut,LPSTR pjOut)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+QueryFontAssocStatus(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+RemoveFontMemResourceEx(
+       HANDLE fh
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+RemoveFontResourceExA(
+       LPCSTR lpFileName,
+       DWORD fl,
+       PVOID pdv
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+RemoveFontResourceExW(
+       LPCWSTR lpFileName,
+       DWORD fl,
+       PVOID pdv
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+RemoveFontResourceTracking(LPCSTR lpString,int unknown)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP 
+STDCALL
+SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBRUSH 
+STDCALL
+SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+COLORREF 
+STDCALL
+SetDCBrushColor(
+       HDC hdc,
+       COLORREF crColor
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+COLORREF 
+STDCALL
+SetDCPenColor(
+       HDC hdc,
+       COLORREF crColor
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+SetLayout(
+       HDC hdc,
+       DWORD dwLayout
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+SetMagicColors(HDC hdc,PALETTEENTRY peMagic,ULONG Index)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+SetVirtualResolution(HDC hdc, int cxVirtualDevicePixel,int cyVirtualDevicePixel,int cxVirtualDeviceMm, int cyVirtualDeviceMm)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int 
+STDCALL
+StartFormPage(HDC hdc)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID 
+STDCALL
+UnloadNetworkFonts(DWORD unknown)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+bInitSystemAndFontsDirectoriesW(LPWSTR *SystemDir,LPWSTR *FontsDir)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+bMakePathNameW(LPWSTR lpBuffer,LPCWSTR lpFileName,LPWSTR *lpFilePart,DWORD unknown)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT 
+STDCALL
+CreateFontIndirectExA(const ENUMLOGFONTEXDVA *elfexd)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetGlyphIndicesA(
+       HDC hdc,
+       LPCSTR lpstr,
+       int c,
+       LPWORD pgi,
+       DWORD fl
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+UINT 
+STDCALL
+GetStringBitmapA(HDC hdc,LPSTR psz,WINBOOL unknown,UINT cj,BYTE *lpSB)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetTextExtentExPointI(
+       HDC hdc,
+       LPWORD pgiIn,
+       int cgi,
+       int nMaxExtent,
+       LPINT lpnFit,
+       LPINT alpDx,
+       LPSIZE lpSize
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT
+STDCALL
+CreateFontIndirectExW(const ENUMLOGFONTEXDVW *elfexd)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GetGlyphIndicesW(
+       HDC hdc,
+       LPCWSTR lpstr,
+       int c,
+       LPWORD pgi,
+       DWORD fl
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+UINT 
+STDCALL
+GetStringBitmapW(HDC hdc,LPWSTR pwsz,WINBOOL unknown,UINT cj,BYTE *lpSB)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetTextExtentPointI(
+       HDC hdc,
+       LPWORD pgiIn,
+       int cgi,
+       LPSIZE lpSize
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS
+STDCALL
+GdiFullscreenControl(FULLSCREENCONTROL FullscreenCommand,PVOID FullscreenInput,
+                                       DWORD FullscreenInputLength,PVOID FullscreenOutput,
+                                       PULONG FullscreenOutputLength)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+INT 
+STDCALL
+GdiQueryFonts(PUNIVERSAL_FONT_ID pufiFontList,ULONG nBufferSize,PLARGE_INTEGER pTimeStamp )
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GdiRealizationInfo(HDC hdc, PREALIZATION_INFO pri)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetCharWidthInfo(HDC hdc,PCHWIDTHINFO pChWidthInfo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL 
+STDCALL
+GetETM(HDC hdc,EXTTEXTMETRIC *petm)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiAddGlsRecord(HDC hdc,DWORD unknown1,LPCSTR unknown2,LPRECT unknown3)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE
+STDCALL
+GdiConvertMetaFilePict(HGLOBAL hMem)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DEVMODEW *
+STDCALL
+GdiConvertToDevmodeW(DEVMODEA *dm)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HENHMETAFILE
+STDCALL
+GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+METAFILEPICT *
+STDCALL
+GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD
+STDCALL
+GdiGetCharDimensions(HDC hdc,LPTEXTMETRICW lptm,BOOL unk)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PSHAREDHANDLETABLE
+STDCALL
+GdiQueryTable(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE 
+STDCALL
+GdiGetSpoolFileHandle(
+       LPWSTR          pwszPrinterName,
+       LPDEVMODEW      pDevmode,
+       LPWSTR          pwszDocName)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiDeleteSpoolFileHandle(
+       HANDLE  SpoolFileHandle)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD 
+STDCALL
+GdiGetPageCount(
+       HANDLE  SpoolFileHandle)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HDC
+STDCALL
+GdiGetDC(
+       HANDLE  SpoolFileHandle)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE 
+STDCALL
+GdiGetPageHandle(
+       HANDLE  SpoolFileHandle,
+       DWORD   Page,
+       LPDWORD pdwPageType)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiStartDocEMF(
+       HANDLE          SpoolFileHandle,
+       DOCINFOW        *pDocInfo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiStartPageEMF(
+       HANDLE  SpoolFileHandle)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiPlayPageEMF(
+       HANDLE  SpoolFileHandle,
+       HANDLE  hemf,
+       RECT    *prectDocument,
+       RECT    *prectBorder,
+       RECT    *prectClip)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiEndPageEMF(
+       HANDLE  SpoolFileHandle,
+       DWORD   dwOptimization)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiEndDocEMF(
+       HANDLE  SpoolFileHandle)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiGetDevmodeForPage(
+       HANDLE          SpoolFileHandle,
+       DWORD           dwPageNumber,
+       PDEVMODEW       *pCurrDM,
+       PDEVMODEW       *pLastDM)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+WINBOOL
+STDCALL
+GdiResetDCEMF(
+       HANDLE          SpoolFileHandle,
+       PDEVMODEW       pCurrDM)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL
+BRUSHOBJ_hGetColorTransform(BRUSHOBJ *pbo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID STDCALL
+BRUSHOBJ_pvAllocRbrush(IN PBRUSHOBJ BrushObj,
+                      IN ULONG ObjSize)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID STDCALL
+BRUSHOBJ_pvGetRbrush(IN PBRUSHOBJ BrushObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+BRUSHOBJ_ulGetBrushColor(BRUSHOBJ *pbo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+CLIPOBJ_bEnum(IN PCLIPOBJ ClipObj,
+             IN ULONG ObjSize,
+             OUT ULONG *EnumRects)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+CLIPOBJ_cEnumStart(IN PCLIPOBJ ClipObj,
+                  IN BOOL ShouldDoAll,
+                  IN ULONG ClipType,
+                  IN ULONG BuildOrder,
+                  IN ULONG MaxRects)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PPATHOBJ STDCALL
+CLIPOBJ_ppoGetPath(PCLIPOBJ ClipObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+EngAcquireSemaphore ( IN HSEMAPHORE hsem )
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngAlphaBlend(SURFOBJ *psoDest,SURFOBJ *psoSrc,CLIPOBJ *pco,XLATEOBJ *pxlo,RECTL *prclDest,RECTL *prclSrc,BLENDOBJ *pBlendObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngAssociateSurface(IN HSURF Surface,
+                   IN HDEV Dev,
+                   IN ULONG Hooks)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngBitBlt(SURFOBJ *Dest,
+         SURFOBJ *Source,
+         SURFOBJ *Mask,
+         CLIPOBJ *ClipRegion,
+         XLATEOBJ *ColorTranslation,
+         RECTL *DestRect,
+         POINTL *SourcePoint,
+         POINTL *MaskRect,
+         BRUSHOBJ *Brush,
+         POINTL *BrushOrigin,
+         ROP4 rop4)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngCheckAbort(SURFOBJ *pso)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+FD_GLYPHSET* STDCALL
+EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngCopyBits(SURFOBJ *Dest,
+           SURFOBJ *Source,
+           CLIPOBJ *Clip,
+           XLATEOBJ *ColorTranslation,
+           RECTL *DestRect,
+           POINTL *SourcePoint)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP STDCALL
+EngCreateBitmap(IN SIZEL Size,
+               IN LONG Width,
+               IN ULONG Format,
+               IN ULONG Flags,
+               IN PVOID Bits)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PCLIPOBJ STDCALL
+EngCreateClip(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP STDCALL
+EngCreateDeviceBitmap(IN DHSURF Surface,
+                     IN SIZEL Size,
+                     IN ULONG Format)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HSURF STDCALL
+EngCreateDeviceSurface(IN DHSURF Surface,
+                      IN SIZEL Size,
+                      IN ULONG FormatVersion)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HPALETTE STDCALL
+EngCreatePalette(IN ULONG Mode,
+                IN ULONG NumColors,
+                IN ULONG *Colors,
+                IN ULONG Red,
+                IN ULONG Green,
+                IN ULONG Blue)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HSEMAPHORE
+STDCALL
+EngCreateSemaphore ( VOID )
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+EngDeleteClip(CLIPOBJ *ClipRegion)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngDeletePalette(IN HPALETTE Palette)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+EngDeletePath(PATHOBJ *ppo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+EngDeleteSemaphore ( IN HSEMAPHORE hsem )
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngDeleteSurface(IN HSURF Surface)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngEraseSurface(SURFOBJ *Surface,
+               RECTL *Rect,
+               ULONG iColor)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,MIX mix,FLONG flOptions)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID STDCALL
+EngFindResource(HANDLE h,int iName,int iType,PULONG pulSize)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL 
+EngFreeModule(HANDLE h)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
+                     OUT PUSHORT AnsiCodePage)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+LPWSTR STDCALL
+EngGetDriverName(HDEV hdev)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+LPWSTR STDCALL
+EngGetPrinterDataFileName(HDEV hdev)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngGradientFill(SURFOBJ *psoDest,CLIPOBJ *pco,XLATEOBJ *pxlo,TRIVERTEX *pVertex,ULONG nVertex,PVOID pMesh,ULONG nMesh,RECTL *prclExtents,POINTL *pptlDitherOrg,ULONG ulMode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngLineTo(SURFOBJ *Surface,
+         CLIPOBJ *Clip,
+         BRUSHOBJ *Brush,
+         LONG x1,
+         LONG y1,
+         LONG x2,
+         LONG y2,
+         RECTL *RectBounds,
+         MIX mix)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL 
+EngLoadModule(LPWSTR pwsz)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+SURFOBJ * STDCALL
+EngLockSurface(IN HSURF Surface)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngMarkBandingSurface(HSURF hsurf)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+EngMultiByteToUnicodeN(OUT LPWSTR UnicodeString,
+                      IN ULONG MaxBytesInUnicodeString,
+                      OUT PULONG BytesInUnicodeString,
+                      IN PCHAR MultiByteString,
+                      IN ULONG BytesInMultiByteString)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+INT STDCALL 
+EngMultiByteToWideChar(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngPaint(IN SURFOBJ *Surface,
+        IN CLIPOBJ *ClipRegion,
+        IN BRUSHOBJ *Brush,
+        IN POINTL *BrushOrigin,
+        IN MIX  Mix)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngPlgBlt(SURFOBJ *psoTrg,SURFOBJ *psoSrc,SURFOBJ *psoMsk,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlBrushOrg,POINTFIX *pptfx,RECTL *prcl,POINTL *pptl,ULONG iMode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL 
+EngQueryLocalTime(PENG_TIME_FIELDS etf)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+EngReleaseSemaphore ( IN HSEMAPHORE hsem )
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngStretchBlt(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngStretchBltROP(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode,BRUSHOBJ *pbo,DWORD rop4)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngStrokeAndFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pboStroke,LINEATTRS *plineattrs,BRUSHOBJ *pboFill,POINTL *pptlBrushOrg,MIX mixFill,FLONG flOptions)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngStrokePath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,LINEATTRS *plineattrs,MIX mix)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+EngTextOut(SURFOBJ *pso,STROBJ *pstro,FONTOBJ *pfo,CLIPOBJ *pco,RECTL *prclExtra,RECTL *prclOpaque,BRUSHOBJ *pboFore,BRUSHOBJ *pboOpaque,POINTL *pptlOrg,MIX mix)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+EngTransparentBlt(IN PSURFOBJ Dest,
+                 IN PSURFOBJ Source,
+                 IN PCLIPOBJ Clip,
+                 IN PXLATEOBJ ColorTranslation,
+                 IN PRECTL DestRect,
+                 IN PRECTL SourceRect,
+                 IN ULONG TransparentColor,
+                 IN ULONG Reserved)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+EngUnicodeToMultiByteN(OUT PCHAR MultiByteString,
+                      IN ULONG  MaxBytesInMultiByteString,
+                      OUT PULONG  BytesInMultiByteString,
+                      IN PWSTR  UnicodeString,
+                      IN ULONG  BytesInUnicodeString)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL 
+EngUnlockSurface(SURFOBJ *pso)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+INT STDCALL 
+EngWideCharToMultiByte(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG
+STDCALL
+FONTOBJ_cGetAllGlyphHandles(IN PFONTOBJ  FontObj,
+                            IN HGLYPH  *Glyphs)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG
+STDCALL
+FONTOBJ_cGetGlyphs(IN PFONTOBJ FontObj,
+                   IN ULONG    Mode,
+                   IN ULONG    NumGlyphs,
+                   IN HGLYPH  *GlyphHandles,
+                   IN PVOID   *OutGlyphs)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PFD_GLYPHATTR STDCALL
+FONTOBJ_pQueryGlyphAttrs(FONTOBJ *pfo,ULONG iMode)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+FD_GLYPHSET *STDCALL
+FONTOBJ_pfdg(FONTOBJ *pfo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+IFIMETRICS*
+STDCALL
+FONTOBJ_pifi(IN PFONTOBJ  FontObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID
+STDCALL
+FONTOBJ_pvTrueTypeFontFile(IN PFONTOBJ  FontObj,
+                           IN ULONG    *FileSize)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+XFORMOBJ*
+STDCALL
+FONTOBJ_pxoGetXform(IN PFONTOBJ  FontObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+STDCALL
+FONTOBJ_vGetInfo(IN  PFONTOBJ   FontObj,
+                 IN  ULONG      InfoSize,
+                 OUT PFONTINFO  FontInfo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+PATHOBJ_bEnum(PATHOBJ *ppo,PATHDATA *ppd)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL 
+PATHOBJ_bEnumClipLines(PATHOBJ *ppo,ULONG cb,CLIPLINE *pcl)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL 
+PATHOBJ_vEnumStart(PATHOBJ *ppo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+PATHOBJ_vEnumStartClipLines(PATHOBJ *ppo,CLIPOBJ *pco,SURFOBJ *pso,LINEATTRS *pla)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+PATHOBJ_vGetBounds(PATHOBJ *ppo,PRECTFX prectfx)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+STROBJ_bEnum(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+STROBJ_bEnumPositionsOnly(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+STROBJ_bGetAdvanceWidths(STROBJ *pso,ULONG iFirst,ULONG c,POINTQF *pptqD)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL
+STROBJ_dwGetCodePage(STROBJ  *pstro)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+STROBJ_vEnumStart(STROBJ *pstro)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL
+XFORMOBJ_bApplyXform(XFORMOBJ *pxo,ULONG iMode,ULONG cPoints,PVOID pvIn,PVOID pvOut)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+XFORMOBJ_iGetXform(XFORMOBJ *pxo,XFORML *pxform)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+XLATEOBJ_cGetPalette(XLATEOBJ *XlateObj,
+                    ULONG PalOutType,
+                    ULONG cPal,
+                    ULONG *OutPal)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL
+XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
+               ULONG Color)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG * STDCALL
+XLATEOBJ_piVector(XLATEOBJ *XlateObj)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdCreateDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+HDC hdc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdQueryDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+LPDDHALINFO pHalInfo,
+LPDDHAL_DDCALLBACKS pDDCallbacks,
+LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
+LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
+LPD3DHAL_CALLBACKS pD3dCallbacks,
+LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
+LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
+LPDDSURFACEDESC pD3dTextureFormats,
+LPDWORD pdwFourCC,
+LPVIDMEM pvmList
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDeleteDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdCreateSurfaceObject( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+BOOL bPrimarySurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDeleteSurfaceObject( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdResetVisrgn( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+HWND hWnd
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdGetDC( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
+LPPALETTEENTRY pColorTable
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdReleaseDC( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HBITMAP STDCALL DdCreateDIBSection( 
+HDC hdc,
+CONST BITMAPINFO *pbmi,
+UINT iUsage,
+VOID **ppvBits,
+HANDLE hSectionApp,
+DWORD dwOffset
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdReenableDirectDrawObject( 
+LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
+BOOL *pbNewMode
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdAttachSurface( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL DdUnattachSurface( 
+LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+ULONG STDCALL DdQueryDisplaySettingsUniqueness(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL DdGetDxHandle( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+LPDDRAWI_DDRAWSURFACE_LCL pSurface,
+BOOL bRelease
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdSetGammaRamp( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+HDC hdc,
+LPVOID lpGammaRamp
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdSwapTextureHandles( 
+LPDDRAWI_DIRECTDRAW_LCL pDDraw,
+LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
+LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
+ULONG_PTR ulHandle,
+SIZE_T *pdwSizeOfPtr1,
+PVOID pvPtr1,
+SIZE_T *pdwSizeOfPtr2,
+PVOID pvPtr2)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL D3DContextCreate( 
+HANDLE hDirectDrawLocal,
+HANDLE hSurfColor,
+HANDLE hSurfZ,
+D3DNTHAL_CONTEXTCREATEI *pdcci
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL D3DContextDestroy( 
+LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL D3DContextDestroyAll(VOID)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL D3DValidateTextureStageState( 
+LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL D3DDrawPrimitives2( 
+HANDLE hCmdBuf,
+HANDLE hVBuf,
+LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+FLATPTR *pfpVidMemCmd,
+DWORD *pdwSizeCmd,
+FLATPTR *pfpVidMemVtx,
+DWORD *pdwSizeVtx
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL D3DGetDriverState( 
+PDD_GETDRIVERSTATEDATA pdata
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdAddAttachedSurface( 
+HANDLE hSurface,
+HANDLE hSurfaceAttached,
+PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdAlphaBlt(
+HANDLE hSurfaceDest, 
+HANDLE hSurfaceSrc,
+PDD_BLTDATA puBltData)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
+HANDLE hSurfaceFrom,
+HANDLE hSurfaceTo
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdBeginMoCompFrame( 
+HANDLE hMoComp,
+PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdBlt( 
+HANDLE hSurfaceDest,
+HANDLE hSurfaceSrc,
+PDD_BLTDATA puBltData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdCanCreateSurface( 
+HANDLE hDirectDraw,
+PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdCanCreateD3DBuffer( 
+HANDLE hDirectDraw,
+PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdColorControl( 
+HANDLE hSurface,
+PDD_COLORCONTROLDATA puColorControlData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
+HDC hdc
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdCreateSurface( 
+HANDLE hDirectDraw,
+HANDLE *hSurface,
+DDSURFACEDESC *puSurfaceDescription,
+DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+DD_SURFACE_LOCAL *puSurfaceLocalData,
+DD_SURFACE_MORE *puSurfaceMoreData,
+DD_CREATESURFACEDATA *puCreateSurfaceData,
+HANDLE *puhSurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdCreateD3DBuffer( 
+HANDLE hDirectDraw,
+HANDLE *hSurface,
+DDSURFACEDESC *puSurfaceDescription,
+DD_SURFACE_GLOBAL *puSurfaceGlobalData,
+DD_SURFACE_LOCAL *puSurfaceLocalData,
+DD_SURFACE_MORE *puSurfaceMoreData,
+DD_CREATESURFACEDATA *puCreateSurfaceData,
+HANDLE *puhSurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL DdCreateMoComp( 
+HANDLE hDirectDraw,
+PDD_CREATEMOCOMPDATA puCreateMoCompData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+HANDLE hSurface,
+PDD_SURFACE_LOCAL puSurfaceLocal,
+PDD_SURFACE_MORE puSurfaceMore,
+PDD_SURFACE_GLOBAL puSurfaceGlobal,
+BOOL bComplete
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
+HANDLE hSurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdDestroyMoComp( 
+HANDLE hMoComp,
+PDD_DESTROYMOCOMPDATA puBeginFrameData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdDestroySurface( 
+HANDLE hSurface,
+BOOL bRealDestroy
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdDestroyD3DBuffer( 
+HANDLE hSurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdEndMoCompFrame( 
+HANDLE hMoComp,
+PDD_ENDMOCOMPFRAMEDATA puEndFrameData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdFlip( 
+HANDLE hSurfaceCurrent,
+HANDLE hSurfaceTarget,
+HANDLE hSurfaceCurrentLeft,
+HANDLE hSurfaceTargetLeft,
+PDD_FLIPDATA puFlipData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdFlipToGDISurface( 
+HANDLE hDirectDraw,
+PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetAvailDriverMemory( 
+HANDLE hDirectDraw,
+PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetBltStatus( 
+HANDLE hSurface,
+PDD_GETBLTSTATUSDATA puGetBltStatusData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+PALETTEENTRY *puColorTable
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetDriverInfo( 
+HANDLE hDirectDraw,
+PDD_GETDRIVERINFODATA puGetDriverInfoData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
+HANDLE hDirectDraw,
+HANDLE hSurface,
+BOOL bRelease
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetFlipStatus( 
+HANDLE hSurface,
+PDD_GETFLIPSTATUSDATA puGetFlipStatusData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetInternalMoCompInfo( 
+HANDLE hDirectDraw,
+PDD_GETINTERNALMOCOMPDATA puGetInternalData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetMoCompBuffInfo( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetMoCompGuids( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetMoCompFormats( 
+HANDLE hDirectDraw,
+PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdGetScanLine( 
+HANDLE hDirectDraw,
+PDD_GETSCANLINEDATA puGetScanLineData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdLock( 
+HANDLE hSurface,
+PDD_LOCKDATA puLockData,
+HDC hdcClip
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdLockD3D( 
+HANDLE hSurface,
+PDD_LOCKDATA puLockData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdQueryDirectDrawObject(  /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+DD_HALINFO *pHalInfo,
+DWORD *pCallBackFlags,
+LPD3DNTHAL_CALLBACKS puD3dCallbacks,
+LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
+LPDDSURFACEDESC puD3dTextureFormats,
+DWORD *puNumHeaps,
+VIDEOMEMORY *puvmList,
+DWORD *puNumFourCC,
+DWORD *puFourCC
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdQueryMoCompStatus( 
+HANDLE hMoComp,
+PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
+HANDLE hDirectDrawLocal,
+BOOL *pubNewMode
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
+HANDLE hSurface
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdRenderMoComp( 
+HANDLE hMoComp,
+PDD_RENDERMOCOMPDATA puRenderMoCompData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+HWND hwnd
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdSetColorKey( 
+HANDLE hSurface,
+PDD_SETCOLORKEYDATA puSetColorKeyData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdSetExclusiveMode( 
+HANDLE hDirectDraw,
+PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
+HANDLE hDirectDraw,
+HDC hdc,
+LPVOID lpGammaRamp
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdCreateSurfaceEx( 
+HANDLE hDirectDraw,
+HANDLE hSurface,
+DWORD dwSurfaceHandle
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdSetOverlayPosition( 
+HANDLE hSurfaceSource,
+HANDLE hSurfaceDestination,
+PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
+HANDLE hSurface,
+HANDLE hSurfaceAttached
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdUnlock( 
+HANDLE hSurface,
+PDD_UNLOCKDATA puUnlockData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdUnlockD3D( 
+HANDLE hSurface,
+PDD_UNLOCKDATA puUnlockData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdUpdateOverlay( 
+HANDLE hSurfaceDestination,
+HANDLE hSurfaceSource,
+PDD_UPDATEOVERLAYDATA puUpdateOverlayData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD STDCALL DdWaitForVerticalBlank( 
+HANDLE hDirectDraw,
+PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
+)
+{
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
index 41a0f33..fe2d1b7 100644 (file)
@@ -34,3 +34,17 @@ Rectangle(HDC  hDC,
    return NtGdiRectangle(hDC, LeftRect, TopRect, RightRect, BottomRect);
 }
 
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+PolyPolygon(
+       HDC             a0,
+       CONST POINT     *a1,
+       CONST INT       *a2,
+       int             a3
+       )
+{
+       return PolyPolygon(a0,(LPPOINT)a1,(LPINT)a2,a3);
+}
index 4d084f0..fe0a488 100644 (file)
@@ -150,3 +150,18 @@ PolylineTo(
 {
        return PolyBezierTo(a0,(CONST PPOINT)a1,a2);
 }
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+PolyPolyline(
+       HDC             hdc,
+       CONST POINT     *a1,
+       CONST DWORD     *a2,
+       DWORD           a3
+       )
+{
+       return NtGdiPolyPolyline(hdc,(LPPOINT)a1,(LPDWORD)a2,a3);
+}
index 54062c4..80ae18c 100644 (file)
@@ -3,8 +3,6 @@
 LIBRARY msafd.dll
 
 EXPORTS
-WSPGetSockOpt@24
-WSPSetSockOpt@24
 WSPStartup@76
 
 ; EOF
index 731b6f6..3d076a9 100644 (file)
@@ -3,8 +3,6 @@
 LIBRARY msafd.dll
 
 EXPORTS
-WSPGetSockOpt=WSPGetSockOpt@24
-WSPSetSockOpt=WSPSetSockOpt@24
 WSPStartup=WSPStartup@76
 
 ; EOF
index 392d78b..dae9a2a 100644 (file)
@@ -74,7 +74,7 @@ WahCloseHandleHelper(
 
 INT
 EXPORT
-WahCloseNotificationHelper(
+WahCloseNotificationHandleHelper(
     IN  PVOID HelperDllSocketContext,
     IN  SOCKET SocketHandle
     )
index 1c94673..264b069 100644 (file)
@@ -5,7 +5,7 @@ LIBRARY ws2help.dll
 EXPORTS
 WahCloseApcHelper@8
 WahCloseHandleHelper@8
-WahCloseNotificationHelper@8
+WahCloseNotificationHandleHelper@8
 WahCloseSocketHandle@8
 WahCloseThread@8
 WahCompleteRequest@8
index 1e8a0a4..c5fecbe 100644 (file)
@@ -5,7 +5,7 @@ LIBRARY ws2help.dll
 EXPORTS
 WahCloseApcHelper=WahCloseApcHelper@8
 WahCloseHandleHelper=WahCloseHandleHelper@8
-WahCloseNotificationHelper=WahCloseNotificationHelper@8
+WahCloseNotificationHandleHelper=WahCloseNotificationHandleHelper@8
 WahCloseSocketHandle=WahCloseSocketHandle@8
 WahCloseThread=WahCloseThread@8
 WahCompleteRequest=WahCompleteRequest@8
index ae2c026..0131722 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: fillshap.c,v 1.28 2003/08/20 20:24:35 royce Exp $ */
+/* $Id: fillshap.c,v 1.29 2003/08/26 12:28:53 weiden Exp $ */
 
 #undef WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -253,7 +253,32 @@ NtGdiPolyPolygon(HDC            hDC,
                 CONST LPINT    PolyCounts,
                 int            Count)
 {
-  UNIMPLEMENTED;
+  DC *dc;
+  int i;
+  LPPOINT pt;
+  LPINT pc;
+  BOOL ret = FALSE; // default to failure
+
+  dc = DC_LockDc ( hDC );
+  pt = Points;
+  pc = PolyCounts;
+  if ( !dc )
+    SetLastWin32Error(ERROR_INVALID_PARAMETER);
+  else
+  {
+       for (i=0;i<Count;i++)
+       {
+           ret = IntPolygon ( dc, pt, *pc );
+               if (ret == FALSE)
+               {
+                       return ret;
+               }
+               (DWORD)pt+=(DWORD)pc++;
+       }
+    DC_UnlockDc ( hDC );
+  }
+
+  return ret;
 }
 
 BOOL
index 04c8c77..454bc8a 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: line.c,v 1.21 2003/08/20 07:45:02 gvg Exp $ */
+/* $Id: line.c,v 1.22 2003/08/26 12:28:53 weiden Exp $ */
 
 // Some code from the WINE project source (www.winehq.com)
 
@@ -452,7 +452,28 @@ NtGdiPolyPolyline(HDC            hDC,
                  CONST LPDWORD  PolyPoints,
                  DWORD          Count)
 {
-   UNIMPLEMENTED;
+  DC    *dc = DC_LockDc(hDC);
+  int i;
+  LPPOINT pts;
+  LPDWORD pc;
+  BOOL   ret = FALSE; // default to failure
+  pts = pt;
+  pc = PolyPoints;
+  if ( dc )
+  {
+       for (i=0;i<Count;i++)
+       {
+               ret = IntPolyline ( dc, pts, *pc );
+               if (ret == FALSE)
+               {
+                       return ret;
+               }
+               (DWORD)pts+=(DWORD)pc++;
+       }
+    DC_UnlockDc( hDC );
+  }
+
+  return ret;
 }
 
 int
index eb379e8..5dda0bd 100644 (file)
@@ -77,16 +77,16 @@ EngUnmapFontFile ( ULONG_PTR iFile )
 BOOL
 STDCALL
 EngTextOut (
-       IN SURFOBJ  *pso,
-       IN STROBJ   *pstro,
-       IN FONTOBJ  *pfo,
-       IN CLIPOBJ  *pco,
-       IN RECTL    *prclExtra,
-       IN RECTL    *prclOpaque,
-       IN BRUSHOBJ *pboFore,
-       IN BRUSHOBJ *pboOpaque,
-       IN POINTL    pptlOrg,
-       IN MIX       mix
+       SURFOBJ  *pso,
+       STROBJ   *pstro,
+       FONTOBJ  *pfo,
+       CLIPOBJ  *pco,
+       RECTL    *prclExtra,
+       RECTL    *prclOpaque,
+       BRUSHOBJ *pboFore,
+       BRUSHOBJ *pboOpaque,
+       POINTL   *pptlOrg,
+       MIX       mix
        )
 {
   // www.osr.com/ddk/graphics/gdifncs_4tgn.htm
index aeebffe..f06fc4a 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: win32k.def,v 1.21 2003/08/19 11:48:50 weiden Exp $
+; $Id: win32k.def,v 1.22 2003/08/26 12:28:53 weiden Exp $
 ;
 ; win32k.def
 ;
@@ -94,7 +94,7 @@ EngSort@16
 EngStretchBlt@44
 EngStrokeAndFillPath@40
 EngStrokePath@32
-EngTextOut@44
+EngTextOut@40