]> gitweb.factorcode.org Git - factor.git/blob - basis/windows/directx/d3d9/d3d9.factor
factor: FUNCTION: rename by hand...
[factor.git] / basis / windows / directx / d3d9 / d3d9.factor
1 USING: alien.syntax windows.types alien.c-types windows.directx.d3d9types
2 windows.com.syntax windows.com windows.directx windows.directx.d3d9caps
3 windows.ole32 windows.kernel32 ;
4 IN: windows.directx.d3d9
5
6 LIBRARY: d3d9
7
8 CONSTANT: DIRECT3D_VERSION         0x0900
9
10 CONSTANT: D3D_SDK_VERSION   32
11 CONSTANT: D3D9b_SDK_VERSION 31
12
13 C-TYPE: IDirect3D9
14
15 FUNCTION: IDirect3D9* Direct3DCreate9 ( UINT SDKVersion )
16
17 FUNCTION: int D3DPERF_BeginEvent ( D3DCOLOR col, LPCWSTR wszName )
18 FUNCTION: int D3DPERF_EndEvent ( )
19 FUNCTION: void D3DPERF_SetMarker ( D3DCOLOR col, LPCWSTR wszName )
20 FUNCTION: void D3DPERF_SetRegion ( D3DCOLOR col, LPCWSTR wszName )
21 FUNCTION: BOOL D3DPERF_QueryRepeatFrame ( )
22
23 FUNCTION: void D3DPERF_SetOptions ( DWORD dwOptions )
24 FUNCTION: DWORD D3DPERF_GetStatus ( )
25
26 C-TYPE: IDirect3DDevice9
27
28 COM-INTERFACE: IDirect3D9 IUnknown {81BDCBCA-64D4-426d-AE8D-AD0147F4275C}
29     HRESULT RegisterSoftwareDevice ( void* pInitializeFunction )
30     UINT GetAdapterCount ( )
31     HRESULT GetAdapterIdentifier ( UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier )
32     UINT GetAdapterModeCount ( UINT Adapter, D3DFORMAT Format )
33     HRESULT EnumAdapterModes ( UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode )
34     HRESULT GetAdapterDisplayMode ( UINT Adapter, D3DDISPLAYMODE* pMode )
35     HRESULT CheckDeviceType ( UINT Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed )
36     HRESULT CheckDeviceFormat ( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat )
37     HRESULT CheckDeviceMultiSampleType ( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels )
38     HRESULT CheckDepthStencilMatch ( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat )
39     HRESULT CheckDeviceFormatConversion ( UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat )
40     HRESULT GetDeviceCaps ( UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps )
41     HMONITOR GetAdapterMonitor ( UINT Adapter )
42     HRESULT CreateDevice ( UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface ) ;
43
44 TYPEDEF: IDirect3D9* LPDIRECT3D9
45 TYPEDEF: IDirect3D9* PDIRECT3D9
46
47 C-TYPE: IDirect3DSurface9
48 C-TYPE: RGNDATA
49 C-TYPE: IDirect3DBaseTexture9
50 C-TYPE: PALETTEENTRY
51 C-TYPE: IDirect3DVertexBuffer9
52 C-TYPE: IDirect3DVertexDeclaration9
53 C-TYPE: IDirect3DVertexShader9
54 C-TYPE: IDirect3DIndexBuffer9
55 C-TYPE: IDirect3DPixelShader9
56 C-TYPE: IDirect3DSwapChain9
57 C-TYPE: IDirect3DTexture9
58 C-TYPE: IDirect3DVolumeTexture9
59 C-TYPE: IDirect3DCubeTexture9
60 C-TYPE: IDirect3DStateBlock9
61 C-TYPE: IDirect3DQuery9
62 C-TYPE: IDirect3DVolume9
63 C-TYPE: IDirect3D9Ex
64 C-TYPE: IDirect3DDevice9Ex
65 C-TYPE: IDirect3DAuthenticatedChannel9
66 C-TYPE: IDirect3DCryptoSession9
67
68 COM-INTERFACE: IDirect3DDevice9 IUnknown {D0223B96-BF7A-43fd-92BD-A43B0D82B9EB}
69     HRESULT TestCooperativeLevel ( )
70     UINT GetAvailableTextureMem ( )
71     HRESULT EvictManagedResources ( )
72     HRESULT GetDirect3D ( IDirect3D9** ppD3D9 )
73     HRESULT GetDeviceCaps ( D3DCAPS9* pCaps )
74     HRESULT GetDisplayMode ( UINT iSwapChain, D3DDISPLAYMODE* pMode )
75     HRESULT GetCreationParameters ( D3DDEVICE_CREATION_PARAMETERS *pParameters )
76     HRESULT SetCursorProperties ( UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap )
77     void SetCursorPosition ( int X, int Y, DWORD Flags )
78     BOOL ShowCursor ( BOOL bShow )
79     HRESULT CreateAdditionalSwapChain ( D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain )
80     HRESULT GetSwapChain ( UINT iSwapChain, IDirect3DSwapChain9** pSwapChain )
81     UINT GetNumberOfSwapChains ( )
82     HRESULT Reset ( D3DPRESENT_PARAMETERS* pPresentationParameters )
83     HRESULT Present ( RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion )
84     HRESULT GetBackBuffer ( UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer )
85     HRESULT GetRasterStatus ( UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus )
86     HRESULT SetDialogBoxMode ( BOOL bEnableDialogs )
87     void SetGammaRamp ( UINT iSwapChain, DWORD Flags, D3DGAMMARAMP* pRamp )
88     void GetGammaRamp ( UINT iSwapChain, D3DGAMMARAMP* pRamp )
89     HRESULT CreateTexture ( UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle )
90     HRESULT CreateVolumeTexture ( UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle )
91     HRESULT CreateCubeTexture ( UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle )
92     HRESULT CreateVertexBuffer ( UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle )
93     HRESULT CreateIndexBuffer ( UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle )
94     HRESULT CreateRenderTarget ( UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle )
95     HRESULT CreateDepthStencilSurface ( UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle )
96     HRESULT UpdateSurface ( IDirect3DSurface9* pSourceSurface, RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, POINT* pDestPoint )
97     HRESULT UpdateTexture ( IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture )
98     HRESULT GetRenderTargetData ( IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface )
99     HRESULT GetFrontBufferData ( UINT iSwapChain, IDirect3DSurface9* pDestSurface )
100     HRESULT StretchRect ( IDirect3DSurface9* pSourceSurface, RECT* pSourceRect, IDirect3DSurface9* pDestSurface, RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter )
101     HRESULT ColorFill ( IDirect3DSurface9* pSurface, RECT* pRect, D3DCOLOR color )
102     HRESULT CreateOffscreenPlainSurface ( UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle )
103     HRESULT SetRenderTarget ( DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget )
104     HRESULT GetRenderTarget ( DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget )
105     HRESULT SetDepthStencilSurface ( IDirect3DSurface9* pNewZStencil )
106     HRESULT GetDepthStencilSurface ( IDirect3DSurface9** ppZStencilSurface )
107     HRESULT BeginScene ( )
108     HRESULT EndScene ( )
109     HRESULT Clear ( DWORD Count, D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil )
110     HRESULT SetTransform ( D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix )
111     HRESULT GetTransform ( D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix )
112     HRESULT MultiplyTransform ( D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix )
113     HRESULT SetViewport ( D3DVIEWPORT9* pViewport )
114     HRESULT GetViewport ( D3DVIEWPORT9* pViewport )
115     HRESULT SetMaterial ( D3DMATERIAL9* pMaterial )
116     HRESULT GetMaterial ( D3DMATERIAL9* pMaterial )
117     HRESULT SetLight ( DWORD Index, D3DLIGHT9* l )
118     HRESULT GetLight ( DWORD Index, D3DLIGHT9* l )
119     HRESULT LightEnable ( DWORD Index, BOOL Enable )
120     HRESULT GetLightEnable ( DWORD Index, BOOL* pEnable )
121     HRESULT SetClipPlane ( DWORD Index, float* pPlane )
122     HRESULT GetClipPlane ( DWORD Index, float* pPlane )
123     HRESULT SetRenderState ( D3DRENDERSTATETYPE State, DWORD Value )
124     HRESULT GetRenderState ( D3DRENDERSTATETYPE State, DWORD* pValue )
125     HRESULT CreateStateBlock ( D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB )
126     HRESULT BeginStateBlock ( )
127     HRESULT EndStateBlock ( IDirect3DStateBlock9** ppSB )
128     HRESULT SetClipStatus ( D3DCLIPSTATUS9* pClipStatus )
129     HRESULT GetClipStatus ( D3DCLIPSTATUS9* pClipStatus )
130     HRESULT GetTexture ( DWORD Stage, IDirect3DBaseTexture9** ppTexture )
131     HRESULT SetTexture ( DWORD Stage, IDirect3DBaseTexture9* pTexture )
132     HRESULT GetTextureStageState ( DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue )
133     HRESULT SetTextureStageState ( DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value )
134     HRESULT GetSamplerState ( DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue )
135     HRESULT SetSamplerState ( DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value )
136     HRESULT ValidateDevice ( DWORD* pNumPasses )
137     HRESULT SetPaletteEntries ( UINT PaletteNumber, PALETTEENTRY* pEntries )
138     HRESULT GetPaletteEntries ( UINT PaletteNumber, PALETTEENTRY* pEntries )
139     HRESULT SetCurrentTexturePalette ( UINT PaletteNumber )
140     HRESULT GetCurrentTexturePalette ( UINT *PaletteNumber )
141     HRESULT SetScissorRect ( RECT* pRect )
142     HRESULT GetScissorRect ( RECT* pRect )
143     HRESULT SetSoftwareVertexProcessing ( BOOL bSoftware )
144     BOOL GetSoftwareVertexProcessing ( )
145     HRESULT SetNPatchMode ( float nSegments )
146     float GetNPatchMode ( )
147     HRESULT DrawPrimitive ( D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount )
148     HRESULT DrawIndexedPrimitive ( D3DPRIMITIVETYPE x, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount )
149     HRESULT DrawPrimitiveUP ( D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, void* pVertexStreamZeroData, UINT VertexStreamZeroStride )
150     HRESULT DrawIndexedPrimitiveUP ( D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, void* pIndexData, D3DFORMAT IndexDataFormat, void* pVertexStreamZeroData, UINT VertexStreamZeroStride )
151     HRESULT ProcessVertices ( UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags )
152     HRESULT CreateVertexDeclaration ( D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl )
153     HRESULT SetVertexDeclaration ( IDirect3DVertexDeclaration9* pDecl )
154     HRESULT GetVertexDeclaration ( IDirect3DVertexDeclaration9** ppDecl )
155     HRESULT SetFVF ( DWORD FVF )
156     HRESULT GetFVF ( DWORD* pFVF )
157     HRESULT CreateVertexShader ( DWORD* pFunction, IDirect3DVertexShader9** ppShader )
158     HRESULT SetVertexShader ( IDirect3DVertexShader9* pShader )
159     HRESULT GetVertexShader ( IDirect3DVertexShader9** ppShader )
160     HRESULT SetVertexShaderConstantF ( UINT StartRegister, float* pConstantData, UINT Vector4fCount )
161     HRESULT GetVertexShaderConstantF ( UINT StartRegister, float* pConstantData, UINT Vector4fCount )
162     HRESULT SetVertexShaderConstantI ( UINT StartRegister, int* pConstantData, UINT Vector4iCount )
163     HRESULT GetVertexShaderConstantI ( UINT StartRegister, int* pConstantData, UINT Vector4iCount )
164     HRESULT SetVertexShaderConstantB ( UINT StartRegister, BOOL* pConstantData, UINT  BoolCount )
165     HRESULT GetVertexShaderConstantB ( UINT StartRegister, BOOL* pConstantData, UINT BoolCount )
166     HRESULT SetStreamSource ( UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride )
167     HRESULT GetStreamSource ( UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride )
168     HRESULT SetStreamSourceFreq ( UINT StreamNumber, UINT Setting )
169     HRESULT GetStreamSourceFreq ( UINT StreamNumber, UINT* pSetting )
170     HRESULT SetIndices ( IDirect3DIndexBuffer9* pIndexData )
171     HRESULT GetIndices ( IDirect3DIndexBuffer9** ppIndexData )
172     HRESULT CreatePixelShader ( DWORD* pFunction, IDirect3DPixelShader9** ppShader )
173     HRESULT SetPixelShader ( IDirect3DPixelShader9* pShader )
174     HRESULT GetPixelShader ( IDirect3DPixelShader9** ppShader )
175     HRESULT SetPixelShaderConstantF ( UINT StartRegister, float* pConstantData, UINT Vector4fCount )
176     HRESULT GetPixelShaderConstantF ( UINT StartRegister, float* pConstantData, UINT Vector4fCount )
177     HRESULT SetPixelShaderConstantI ( UINT StartRegister, int* pConstantData, UINT Vector4iCount )
178     HRESULT GetPixelShaderConstantI ( UINT StartRegister, int* pConstantData, UINT Vector4iCount )
179     HRESULT SetPixelShaderConstantB ( UINT StartRegister, BOOL* pConstantData, UINT  BoolCount )
180     HRESULT GetPixelShaderConstantB ( UINT StartRegister, BOOL* pConstantData, UINT BoolCount )
181     HRESULT DrawRectPatch ( UINT Handle, float* pNumSegs, D3DRECTPATCH_INFO* pRectPatchInfo )
182     HRESULT DrawTriPatch ( UINT Handle, float* pNumSegs, D3DTRIPATCH_INFO* pTriPatchInfo )
183     HRESULT DeletePatch ( UINT Handle )
184     HRESULT CreateQuery ( D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery ) ;
185
186 TYPEDEF: IDirect3DDevice9* LPDIRECT3DDEVICE9
187 TYPEDEF: IDirect3DDevice9* PDIRECT3DDEVICE9
188
189 COM-INTERFACE: IDirect3DStateBlock9 IUnknown {B07C4FE5-310D-4ba8-A23C-4F0F206F218B}
190     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
191     HRESULT Capture ( )
192     HRESULT Apply ( ) ;
193
194 COM-INTERFACE: IDirect3DSwapChain9 IUnknown {794950F2-ADFC-458a-905E-10A10B0B503B}
195     HRESULT Present ( RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion, DWORD dwFlags )
196     HRESULT GetFrontBufferData ( IDirect3DSurface9* pDestSurface )
197     HRESULT GetBackBuffer ( UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer )
198     HRESULT GetRasterStatus ( D3DRASTER_STATUS* pRasterStatus )
199     HRESULT GetDisplayMode ( D3DDISPLAYMODE* pMode )
200     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
201     HRESULT GetPresentParameters ( D3DPRESENT_PARAMETERS* pPresentationParameters ) ;
202
203 TYPEDEF: IDirect3DSwapChain9* LPDIRECT3DSWAPCHAIN9
204 TYPEDEF: IDirect3DSwapChain9* PDIRECT3DSWAPCHAIN9
205
206 COM-INTERFACE: IDirect3DResource9 IUnknown {05EEC05D-8F7D-4362-B999-D1BAF357C704}
207     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
208     HRESULT SetPrivateData ( REFGUID refguid, void* pData, DWORD SizeOfData, DWORD Flags )
209     HRESULT GetPrivateData ( REFGUID refguid, void* pData, DWORD* pSizeOfData )
210     HRESULT FreePrivateData ( REFGUID refguid )
211     DWORD SetPriority ( DWORD PriorityNew )
212     DWORD GetPriority ( )
213     void PreLoad ( )
214     D3DRESOURCETYPE GetType ( ) ;
215
216 TYPEDEF: IDirect3DResource9* LPDIRECT3DRESOURCE9
217 TYPEDEF: IDirect3DResource9* PDIRECT3DRESOURCE9
218
219 COM-INTERFACE: IDirect3DVertexDeclaration9 IUnknown {DD13C59C-36FA-4098-A8FB-C7ED39DC8546}
220     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
221     HRESULT GetDeclaration ( D3DVERTEXELEMENT9* pElement, UINT* pNumElements ) ;
222
223 TYPEDEF: IDirect3DVertexDeclaration9* LPDIRECT3DVERTEXDECLARATION9
224 TYPEDEF: IDirect3DVertexDeclaration9* PDIRECT3DVERTEXDECLARATION9
225
226 COM-INTERFACE: IDirect3DVertexShader9 IUnknown {EFC5557E-6265-4613-8A94-43857889EB36}
227     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
228     HRESULT GetFunction ( void* x, UINT* pSizeOfData ) ;
229
230 TYPEDEF: IDirect3DVertexShader9* LPDIRECT3DVERTEXSHADER9
231 TYPEDEF: IDirect3DVertexShader9* PDIRECT3DVERTEXSHADER9
232
233 COM-INTERFACE: IDirect3DPixelShader9 IUnknown {6D3BDBDC-5B02-4415-B852-CE5E8BCCB289}
234     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
235     HRESULT GetFunction ( void* x, UINT* pSizeOfData ) ;
236
237 TYPEDEF: IDirect3DPixelShader9* LPDIRECT3DPIXELSHADER9
238 TYPEDEF: IDirect3DPixelShader9* PDIRECT3DPIXELSHADER9
239
240 COM-INTERFACE: IDirect3DBaseTexture9 IDirect3DResource9 {580CA87E-1D3C-4d54-991D-B7D3E3C298CE}
241     DWORD SetLOD ( DWORD LODNew )
242     DWORD GetLOD ( )
243     DWORD GetLevelCount ( )
244     HRESULT SetAutoGenFilterType ( D3DTEXTUREFILTERTYPE FilterType )
245     D3DTEXTUREFILTERTYPE GetAutoGenFilterType ( )
246     void GenerateMipSubLevels ( ) ;
247
248 TYPEDEF: IDirect3DBaseTexture9* LPDIRECT3DBASETEXTURE9
249 TYPEDEF: IDirect3DBaseTexture9* PDIRECT3DBASETEXTURE9
250
251 COM-INTERFACE: IDirect3DTexture9 IDirect3DBaseTexture9 {85C31227-3DE5-4f00-9B3A-F11AC38C18B5}
252     HRESULT GetLevelDesc ( UINT Level, D3DSURFACE_DESC* pDesc )
253     HRESULT GetSurfaceLevel ( UINT Level, IDirect3DSurface9** ppSurfaceLevel )
254     HRESULT LockRect ( UINT Level, D3DLOCKED_RECT* pLockedRect, RECT* pRect, DWORD Flags )
255     HRESULT UnlockRect ( UINT Level ) ;
256
257 TYPEDEF: IDirect3DTexture9* LPDIRECT3DTEXTURE9
258 TYPEDEF: IDirect3DTexture9* PDIRECT3DTEXTURE9
259
260 COM-INTERFACE: IDirect3DVolumeTexture9 IDirect3DBaseTexture9 {2518526C-E789-4111-A7B9-47EF328D13E6}
261     HRESULT GetLevelDesc ( UINT Level, D3DVOLUME_DESC* pDesc )
262     HRESULT GetVolumeLevel ( UINT Level, IDirect3DVolume9** ppVolumeLevel )
263     HRESULT LockBox ( UINT Level, D3DLOCKED_BOX* pLockedVolume, D3DBOX* pBox, DWORD Flags )
264     HRESULT UnlockBox ( UINT Level )
265     HRESULT AddDirtyBox ( D3DBOX* pDirtyBox ) ;
266
267 TYPEDEF: IDirect3DVolumeTexture9* LPDIRECT3DVOLUMETEXTURE9
268 TYPEDEF: IDirect3DVolumeTexture9* PDIRECT3DVOLUMETEXTURE9
269
270 COM-INTERFACE: IDirect3DCubeTexture9 IDirect3DBaseTexture9 {FFF32F81-D953-473a-9223-93D652ABA93F}
271     HRESULT GetLevelDesc ( UINT Level, D3DSURFACE_DESC* pDesc )
272     HRESULT GetCubeMapSurface ( D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9** ppCubeMapSurface )
273     HRESULT LockRect ( D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, RECT* pRect, DWORD Flags )
274     HRESULT UnlockRect ( D3DCUBEMAP_FACES FaceType, UINT Level )
275     HRESULT AddDirtyRect ( D3DCUBEMAP_FACES FaceType, RECT* pDirtyRect ) ;
276
277 TYPEDEF: IDirect3DCubeTexture9* LPDIRECT3DCUBETEXTURE9
278 TYPEDEF: IDirect3DCubeTexture9* PDIRECT3DCUBETEXTURE9
279
280 COM-INTERFACE: IDirect3DVertexBuffer9 IDirect3DResource9 {B64BB1B5-FD70-4df6-BF91-19D0A12455E3}
281     HRESULT Lock ( UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags )
282     HRESULT Unlock ( )
283     HRESULT GetDesc ( D3DVERTEXBUFFER_DESC* pDesc ) ;
284
285 TYPEDEF: IDirect3DVertexBuffer9* LPDIRECT3DVERTEXBUFFER9
286 TYPEDEF: IDirect3DVertexBuffer9* PDIRECT3DVERTEXBUFFER9
287
288 COM-INTERFACE: IDirect3DIndexBuffer9 IDirect3DResource9 {7C9DD65E-D3F7-4529-ACEE-785830ACDE35}
289     HRESULT Lock ( UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags )
290     HRESULT Unlock ( )
291     HRESULT GetDesc ( D3DINDEXBUFFER_DESC* pDesc ) ;
292
293 TYPEDEF: IDirect3DIndexBuffer9* LPDIRECT3DINDEXBUFFER9
294 TYPEDEF: IDirect3DIndexBuffer9* PDIRECT3DINDEXBUFFER9
295
296 COM-INTERFACE: IDirect3DSurface9 IDirect3DResource9 {0CFBAF3A-9FF6-429a-99B3-A2796AF8B89B}
297     HRESULT GetContainer ( REFIID riid, void** ppContainer )
298     HRESULT GetDesc ( D3DSURFACE_DESC* pDesc )
299     HRESULT LockRect ( D3DLOCKED_RECT* pLockedRect, RECT* pRect, DWORD Flags )
300     HRESULT UnlockRect ( )
301     HRESULT GetDC ( HDC* phdc )
302     HRESULT ReleaseDC ( HDC hdc ) ;
303
304 TYPEDEF: IDirect3DSurface9* LPDIRECT3DSURFACE9
305 TYPEDEF: IDirect3DSurface9* PDIRECT3DSURFACE9
306
307 COM-INTERFACE: IDirect3DVolume9 IUnknown {24F416E6-1F67-4aa7-B88E-D33F6F3128A1}
308     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
309     HRESULT SetPrivateData ( REFGUID refguid, void* pData, DWORD SizeOfData, DWORD Flags )
310     HRESULT GetPrivateData ( REFGUID refguid, void* pData, DWORD* pSizeOfData )
311     HRESULT FreePrivateData ( REFGUID refguid )
312     HRESULT GetContainer ( REFIID riid, void** ppContainer )
313     HRESULT GetDesc ( D3DVOLUME_DESC *pDesc )
314     HRESULT LockBox ( D3DLOCKED_BOX* pLockedVolume, D3DBOX* pBox, DWORD Flags )
315     HRESULT UnlockBox ( ) ;
316
317 TYPEDEF: IDirect3DVolume9* LPDIRECT3DVOLUME9
318 TYPEDEF: IDirect3DVolume9* PDIRECT3DVOLUME9
319
320 COM-INTERFACE: IDirect3DQuery9 IUnknown {d9771460-a695-4f26-bbd3-27b840b541cc}
321     HRESULT GetDevice ( IDirect3DDevice9** ppDevice )
322     D3DQUERYTYPE GetType ( )
323     DWORD GetDataSize ( )
324     HRESULT Issue ( DWORD dwIssueFlags )
325     HRESULT GetData ( void* pData, DWORD dwSize, DWORD dwGetDataFlags ) ;
326
327 TYPEDEF: IDirect3DQuery9* LPDIRECT3DQUERY9
328 TYPEDEF: IDirect3DQuery9* PDIRECT3DQUERY9
329
330 CONSTANT: D3DSPD_IUNKNOWN                         0x00000001
331
332 CONSTANT: D3DCREATE_FPU_PRESERVE                  0x00000002
333 CONSTANT: D3DCREATE_MULTITHREADED                 0x00000004
334
335 CONSTANT: D3DCREATE_PUREDEVICE                    0x00000010
336 CONSTANT: D3DCREATE_SOFTWARE_VERTEXPROCESSING     0x00000020
337 CONSTANT: D3DCREATE_HARDWARE_VERTEXPROCESSING     0x00000040
338 CONSTANT: D3DCREATE_MIXED_VERTEXPROCESSING        0x00000080
339
340 CONSTANT: D3DCREATE_DISABLE_DRIVER_MANAGEMENT     0x00000100
341 CONSTANT: D3DCREATE_ADAPTERGROUP_DEVICE           0x00000200
342 CONSTANT: D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX  0x00000400
343
344 CONSTANT: D3DCREATE_NOWINDOWCHANGES               0x00000800
345
346 CONSTANT: D3DCREATE_DISABLE_PSGP_THREADING        0x00002000
347 CONSTANT: D3DCREATE_ENABLE_PRESENTSTATS           0x00004000
348 CONSTANT: D3DCREATE_DISABLE_PRINTSCREEN           0x00008000
349 CONSTANT: D3DCREATE_SCREENSAVER                   0x10000000
350
351 CONSTANT: D3DADAPTER_DEFAULT                     0
352 CONSTANT: D3DENUM_WHQL_LEVEL                     2
353 CONSTANT: D3DENUM_NO_DRIVERVERSION               4
354 CONSTANT: D3DPRESENT_BACK_BUFFERS_MAX            3
355 CONSTANT: D3DPRESENT_BACK_BUFFERS_MAX_EX         30
356
357 CONSTANT: D3DSGR_NO_CALIBRATION                  0x00000000
358 CONSTANT: D3DSGR_CALIBRATE                       0x00000001
359
360 CONSTANT: D3DCURSOR_IMMEDIATE_UPDATE             0x00000001
361
362 CONSTANT: D3DPRESENT_DONOTWAIT                   0x00000001
363 CONSTANT: D3DPRESENT_LINEAR_CONTENT              0x00000002
364
365 CONSTANT: D3DPRESENT_DONOTFLIP                   0x00000004
366 CONSTANT: D3DPRESENT_FLIPRESTART                 0x00000008
367 CONSTANT: D3DPRESENT_VIDEO_RESTRICT_TO_MONITOR   0x00000010
368 CONSTANT: D3DPRESENT_UPDATEOVERLAYONLY           0x00000020
369 CONSTANT: D3DPRESENT_HIDEOVERLAY                 0x00000040
370 CONSTANT: D3DPRESENT_UPDATECOLORKEY              0x00000080
371 CONSTANT: D3DPRESENT_FORCEIMMEDIATE              0x00000100
372
373 : D3D_OK ( -- n ) S_OK ; inline
374
375 CONSTANT: D3DERR_WRONGTEXTUREFORMAT               0x88760818
376 CONSTANT: D3DERR_UNSUPPORTEDCOLOROPERATION        0x88760819
377 CONSTANT: D3DERR_UNSUPPORTEDCOLORARG              0x8876081A
378 CONSTANT: D3DERR_UNSUPPORTEDALPHAOPERATION        0x8876081B
379 CONSTANT: D3DERR_UNSUPPORTEDALPHAARG              0x8876081C
380 CONSTANT: D3DERR_TOOMANYOPERATIONS                0x8876081D
381 CONSTANT: D3DERR_CONFLICTINGTEXTUREFILTER         0x8876081E
382 CONSTANT: D3DERR_UNSUPPORTEDFACTORVALUE           0x8876081F
383 CONSTANT: D3DERR_CONFLICTINGRENDERSTATE           0x88760820
384 CONSTANT: D3DERR_UNSUPPORTEDTEXTUREFILTER         0x88760821
385 CONSTANT: D3DERR_CONFLICTINGTEXTUREPALETTE        0x88760825
386 CONSTANT: D3DERR_DRIVERINTERNALERROR              0x88760826
387 CONSTANT: D3DERR_NOTFOUND                         0x88760866
388 CONSTANT: D3DERR_MOREDATA                         0x88760867
389 CONSTANT: D3DERR_DEVICELOST                       0x88760868
390 CONSTANT: D3DERR_DEVICENOTRESET                   0x88760869
391 CONSTANT: D3DERR_NOTAVAILABLE                     0x8876086A
392 CONSTANT: D3DERR_OUTOFVIDEOMEMORY                 0x8876017C
393 CONSTANT: D3DERR_INVALIDDEVICE                    0x8876086B
394 CONSTANT: D3DERR_INVALIDCALL                      0x8876086C
395 CONSTANT: D3DERR_DRIVERINVALIDCALL                0x8876086D
396 CONSTANT: D3DERR_WASSTILLDRAWING                  0x8876021C
397 CONSTANT: D3DOK_NOAUTOGEN                         0x0876086F
398 CONSTANT: D3DERR_DEVICEREMOVED                    0x88760870
399 CONSTANT: S_NOT_RESIDENT                          0x08760875
400 CONSTANT: S_RESIDENT_IN_SHARED_MEMORY             0x08760876
401 CONSTANT: S_PRESENT_MODE_CHANGED                  0x08760877
402 CONSTANT: S_PRESENT_OCCLUDED                      0x08760878
403 CONSTANT: D3DERR_DEVICEHUNG                       0x88760874
404 CONSTANT: D3DERR_UNSUPPORTEDOVERLAY               0x8876087C
405 CONSTANT: D3DERR_UNSUPPORTEDOVERLAYFORMAT         0x8876087D
406 CONSTANT: D3DERR_CANNOTPROTECTCONTENT             0x8876087E
407 CONSTANT: D3DERR_UNSUPPORTEDCRYPTO                0x8876087F
408 CONSTANT: D3DERR_PRESENT_STATISTICS_DISJOINT      0x88760884
409
410 FUNCTION: HRESULT Direct3DCreate9Ex ( UINT SDKVersion, IDirect3D9Ex** out )
411
412 COM-INTERFACE: IDirect3D9Ex IDirect3D9 {02177241-69FC-400C-8FF1-93A44DF6861D}
413     UINT GetAdapterModeCountEx ( UINT Adapter, D3DDISPLAYMODEFILTER* pFilter  )
414     HRESULT EnumAdapterModesEx ( UINT Adapter, D3DDISPLAYMODEFILTER* pFilter, UINT Mode, D3DDISPLAYMODEEX* pMode )
415     HRESULT GetAdapterDisplayModeEx ( UINT Adapter, D3DDISPLAYMODEEX* pMode, D3DDISPLAYROTATION* pRotation )
416     HRESULT CreateDeviceEx ( UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode, IDirect3DDevice9Ex** ppReturnedDeviceInterface )
417     HRESULT GetAdapterLUID ( UINT Adapter, LUID* pLUID ) ;
418
419 TYPEDEF: IDirect3D9Ex* LPDIRECT3D9EX
420 TYPEDEF: IDirect3D9Ex* PDIRECT3D9EX
421
422 COM-INTERFACE: IDirect3DDevice9Ex IDirect3DDevice9 {B18B10CE-2649-405a-870F-95F777D4313A}
423     HRESULT SetConvolutionMonoKernel ( UINT width, UINT height, float* rows, float* columns )
424     HRESULT ComposeRects ( IDirect3DSurface9* pSrc, IDirect3DSurface9* pDst, IDirect3DVertexBuffer9* pSrcRectDescs, UINT NumRects, IDirect3DVertexBuffer9* pDstRectDescs, D3DCOMPOSERECTSOP Operation, int Xoffset, int Yoffset )
425     HRESULT PresentEx ( RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion, DWORD dwFlags )
426     HRESULT GetGPUThreadPriority ( INT* pPriority )
427     HRESULT SetGPUThreadPriority ( INT Priority )
428     HRESULT WaitForVBlank ( UINT iSwapChain )
429     HRESULT CheckResourceResidency ( IDirect3DResource9** pResourceArray, UINT32 NumResources )
430     HRESULT SetMaximumFrameLatency ( UINT MaxLatency )
431     HRESULT GetMaximumFrameLatency ( UINT* pMaxLatency )
432     HRESULT CheckDeviceState ( HWND hDestinationWindow )
433     HRESULT CreateRenderTargetEx ( UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle, DWORD Usage )
434     HRESULT CreateOffscreenPlainSurfaceEx ( UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle, DWORD Usage )
435     HRESULT CreateDepthStencilSurfaceEx ( UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle, DWORD Usage )
436     HRESULT ResetEx ( D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode )
437     HRESULT GetDisplayModeEx ( UINT iSwapChain, D3DDISPLAYMODEEX* pMode, D3DDISPLAYROTATION* pRotation ) ;
438
439 TYPEDEF: IDirect3DDevice9Ex* LPDIRECT3DDEVICE9EX
440 TYPEDEF: IDirect3DDevice9Ex* PDIRECT3DDEVICE9EX
441
442 COM-INTERFACE: IDirect3DSwapChain9Ex IDirect3DSwapChain9 {91886CAF-1C3D-4d2e-A0AB-3E4C7D8D3303}
443     HRESULT GetLastPresentCount ( UINT* pLastPresentCount )
444     HRESULT GetPresentStats ( D3DPRESENTSTATS* pPresentationStatistics )
445     HRESULT GetDisplayModeEx ( D3DDISPLAYMODEEX* pMode, D3DDISPLAYROTATION* pRotation ) ;
446
447 TYPEDEF: IDirect3DSwapChain9Ex* LPDIRECT3DSWAPCHAIN9EX
448 TYPEDEF: IDirect3DSwapChain9Ex* PDIRECT3DSWAPCHAIN9EX
449
450 COM-INTERFACE: IDirect3D9ExOverlayExtension IUnknown {187aeb13-aaf5-4c59-876d-e059088c0df8}
451     HRESULT CheckDeviceOverlayType ( UINT Adapter, D3DDEVTYPE DevType, UINT OverlayWidth, UINT OverlayHeight, D3DFORMAT OverlayFormat, D3DDISPLAYMODEEX* pDisplayMode, D3DDISPLAYROTATION DisplayRotation, D3DOVERLAYCAPS* pOverlayCaps ) ;
452
453 TYPEDEF: IDirect3D9ExOverlayExtension* LPDIRECT3D9EXOVERLAYEXTENSION
454 TYPEDEF: IDirect3D9ExOverlayExtension* PDIRECT3D9EXOVERLAYEXTENSION
455
456 COM-INTERFACE: IDirect3DDevice9Video IUnknown {26DC4561-A1EE-4ae7-96DA-118A36C0EC95}
457     HRESULT GetContentProtectionCaps ( GUID* pCryptoType, GUID* pDecodeProfile, D3DCONTENTPROTECTIONCAPS* pCaps )
458     HRESULT CreateAuthenticatedChannel ( D3DAUTHENTICATEDCHANNELTYPE ChannelType, IDirect3DAuthenticatedChannel9** ppAuthenticatedChannel, HANDLE* pChannelHandle )
459     HRESULT CreateCryptoSession ( GUID* pCryptoType, GUID* pDecodeProfile, IDirect3DCryptoSession9** ppCryptoSession, HANDLE* pCryptoHandle ) ;
460
461 TYPEDEF: IDirect3DDevice9Video* LPDIRECT3DDEVICE9VIDEO
462 TYPEDEF: IDirect3DDevice9Video* PDIRECT3DDEVICE9VIDEO
463
464 COM-INTERFACE: IDirect3DAuthenticatedChannel9 IUnknown {FF24BEEE-DA21-4beb-98B5-D2F899F98AF9}
465     HRESULT GetCertificateSize ( UINT* pCertificateSize )
466     HRESULT GetCertificate ( UINT CertifacteSize, BYTE* ppCertificate )
467     HRESULT NegotiateKeyExchange ( UINT DataSize, VOID* pData )
468     HRESULT Query ( UINT InputSize, VOID* pInput, UINT OutputSize, VOID* pOutput )
469     HRESULT Configure ( UINT InputSize, VOID* pInput, D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT* pOutput ) ;
470
471 TYPEDEF: IDirect3DAuthenticatedChannel9* LPDIRECT3DAUTHENTICATEDCHANNEL9
472 TYPEDEF: IDirect3DAuthenticatedChannel9* PDIRECT3DAUTHENTICATEDCHANNEL9
473
474 COM-INTERFACE: IDirect3DCryptoSession9 IUnknown {FA0AB799-7A9C-48ca-8C5B-237E71A54434}
475     HRESULT GetCertificateSize ( UINT* pCertificateSize )
476     HRESULT GetCertificate ( UINT CertifacteSize, BYTE* ppCertificate )
477     HRESULT NegotiateKeyExchange ( UINT DataSize, VOID* pData )
478     HRESULT EncryptionBlt ( IDirect3DSurface9* pSrcSurface, IDirect3DSurface9* pDstSurface, UINT DstSurfaceSize, VOID* pIV )
479     HRESULT DecryptionBlt ( IDirect3DSurface9* pSrcSurface, IDirect3DSurface9* pDstSurface, UINT SrcSurfaceSize, D3DENCRYPTED_BLOCK_INFO* pEncryptedBlockInfo, VOID* pContentKey, VOID* pIV )
480     HRESULT GetSurfacePitch ( IDirect3DSurface9* pSrcSurface, UINT* pSurfacePitch )
481     HRESULT StartSessionKeyRefresh ( VOID* pRandomNumber, UINT RandomNumberSize )
482     HRESULT FinishSessionKeyRefresh ( )
483     HRESULT GetEncryptionBltKey ( VOID* pReadbackKey, UINT KeySize ) ;
484
485 TYPEDEF: IDirect3DCryptoSession9* LPDIRECT3DCRYPTOSESSION9
486 TYPEDEF: IDirect3DCryptoSession9* PDIRECT3DCRYPTOSESSION9