xref: /reactos/win32ss/reactx/ntddraw/intddraw.h (revision 8a978a17)
1 #pragma once
2 
3 #include <ddrawint.h>
4 #include <d3dkmthk.h>
5 #include <ddkernel.h>
6 #include <reactos/drivers/directx/directxint.h>
7 #include <reactos/drivers/directx/dxg.h>
8 #include <reactos/drivers/directx/dxeng.h>
9 
10 /* From ddraw.c */
11 BOOL intEnableReactXDriver(HDC);
12 NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS);
13 extern DRVFN gpDxFuncs[];
14 
15 typedef BOOL (APIENTRY* PGD_DDSETGAMMARAMP)(HANDLE, HDC, LPVOID);
16 typedef BOOL (APIENTRY* PGD_DDRELEASEDC)(HANDLE);
17 typedef BOOL (APIENTRY* PGD_DDRESTVISRGN)(HANDLE, HWND);
18 typedef HANDLE (APIENTRY* PGD_DDGETDXHANDLE)(HANDLE, HANDLE, BOOL);
19 typedef HDC (APIENTRY *PGD_DDGETDC)(HANDLE, PALETTEENTRY *);
20 typedef DWORD (APIENTRY *PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL*);
21 typedef DWORD (APIENTRY *PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA);
22 typedef DWORD (APIENTRY *PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA);
23 typedef NTSTATUS (APIENTRY *PGD_DXDDSTARTUPDXGRAPHICS) (ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS);
24 typedef NTSTATUS (APIENTRY *PGD_DXDDCLEANUPDXGRAPHICS) (VOID);
25 typedef HANDLE (APIENTRY *PGD_DDCREATEDIRECTDRAWOBJECT) (HDC hdc);
26 typedef DWORD (APIENTRY *PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
27 typedef DWORD (APIENTRY *PGD_DDCOLORCONTROL)(HANDLE hSurface,PDD_COLORCONTROLDATA puColorControlData);
28 typedef HANDLE (APIENTRY *PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL);
29 typedef BOOL (APIENTRY *PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE);
30 typedef BOOL (APIENTRY *PGD_DXDDDELETESURFACEOBJECT)(HANDLE);
31 typedef DWORD (APIENTRY *PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA);
32 typedef DWORD (APIENTRY *PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE , PDD_GETAVAILDRIVERMEMORYDATA);
33 typedef BOOL (APIENTRY *PGD_DXDDQUERYDIRECTDRAWOBJECT)(HANDLE, DD_HALINFO*, DWORD*,  LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA,
34                                                     PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *);
35 
36 
37 /* From d3d.c */
38 typedef DWORD (APIENTRY *PGD_DXDDDESTROYD3DBUFFER)(HANDLE);
39 typedef DWORD (APIENTRY *PGD_DDCANCREATED3DBUFFER)(HANDLE, PDD_CANCREATESURFACEDATA);
40 typedef DWORD (APIENTRY *PGD_DXDDUNLOCKD3D)(HANDLE, PDD_UNLOCKDATA);
41 typedef DWORD (APIENTRY *PGD_DXDDLOCKD3D)(HANDLE, PDD_LOCKDATA);
42 typedef DWORD (APIENTRY *PGD_D3DVALIDATETEXTURESTAGESTATE)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
43 typedef DWORD (APIENTRY *PGD_D3DDRAWPRIMITIVES2)(HANDLE, HANDLE, LPD3DNTHAL_DRAWPRIMITIVES2DATA, FLATPTR *, DWORD *, FLATPTR *, DWORD *);
44 typedef DWORD (APIENTRY *PGD_DDCREATED3DBUFFER)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
45 typedef BOOL (APIENTRY *PGD_D3DCONTEXTCREATE)(HANDLE, HANDLE, HANDLE, LPD3DNTHAL_CONTEXTCREATEDATA);
46 typedef DWORD (APIENTRY *PGD_D3DCONTEXTDESTROY)(LPD3DNTHAL_CONTEXTDESTROYDATA);
47 typedef DWORD (APIENTRY *PGD_D3DCONTEXTDESTROYALL)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
48 
49 /* From dvp.c */
50 typedef DWORD (APIENTRY* PGD_DVPCANCREATEVIDEOPORT)(HANDLE, PDD_CANCREATEVPORTDATA);
51 typedef DWORD (APIENTRY* PGD_DVPCOLORCONTROL)(HANDLE, PDD_VPORTCOLORDATA);
52 typedef HANDLE (APIENTRY* PGD_DVPCREATEVIDEOPORT)(HANDLE, PDD_CREATEVPORTDATA);
53 typedef DWORD (APIENTRY* PGD_DVPDESTROYVIDEOPORT)(HANDLE, PDD_DESTROYVPORTDATA);
54 typedef DWORD (APIENTRY* PGD_DVPFLIPVIDEOPORT)(HANDLE,HANDLE,HANDLE,PDD_FLIPVPORTDATA);
55 typedef DWORD (APIENTRY* PGD_DVPGETVIDEOPORTBANDWITH)(HANDLE, PDD_GETVPORTBANDWIDTHDATA);
56 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTFLIPSTATUS)(HANDLE, PDD_GETVPORTFLIPSTATUSDATA);
57 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTINPUTFORMATS)(HANDLE, PDD_GETVPORTINPUTFORMATDATA);
58 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTLINE)(HANDLE, PDD_GETVPORTLINEDATA);
59 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS)(HANDLE, PDD_GETVPORTOUTPUTFORMATDATA);
60 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTCONNECTINFO)(HANDLE, PDD_GETVPORTCONNECTDATA);
61 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOSIGNALSTATUS)(HANDLE, PDD_GETVPORTSIGNALDATA);
62 typedef DWORD (APIENTRY *PGD_DXDVPUPDATEVIDEOPORT)(HANDLE, HANDLE*, HANDLE*, PDD_UPDATEVPORTDATA);
63 typedef DWORD (APIENTRY *PGD_DXDVPWAITFORVIDEOPORTSYNC)(HANDLE, PDD_WAITFORVPORTSYNCDATA);
64 typedef DWORD (APIENTRY *PGD_DXDVPACQUIRENOTIFICATION)(HANDLE, HANDLE*, LPDDVIDEOPORTNOTIFY);
65 typedef DWORD (APIENTRY *PGD_DXDVPRELEASENOTIFICATION)(HANDLE, HANDLE);
66 typedef DWORD (APIENTRY *PGD_DXDVPGETVIDEOPORTFIELD)(HANDLE, PDD_GETVPORTFIELDDATA);
67 
68 /* From mocomp.c */
69 typedef DWORD (APIENTRY *PGD_DDBEGINMOCOMPFRAME)(HANDLE, PDD_BEGINMOCOMPFRAMEDATA);
70 typedef HANDLE (APIENTRY *PGD_DXDDCREATEMOCOMP)(HANDLE, PDD_CREATEMOCOMPDATA );
71 typedef DWORD (APIENTRY *PGD_DXDDDESTROYMOCOMP)(HANDLE, PDD_DESTROYMOCOMPDATA);
72 typedef DWORD (APIENTRY *PGD_DXDDENDMOCOMPFRAME)(HANDLE, PDD_ENDMOCOMPFRAMEDATA);
73 typedef DWORD (APIENTRY *PGD_DXDDGETINTERNALMOCOMPINFO)(HANDLE, PDD_GETINTERNALMOCOMPDATA);
74 typedef DWORD (APIENTRY *PGD_DXDDGETMOCOMPBUFFINFO)(HANDLE, PDD_GETMOCOMPCOMPBUFFDATA);
75 typedef DWORD (APIENTRY *PGD_DXDDGETMOCOMPGUIDS)(HANDLE, PDD_GETMOCOMPGUIDSDATA);
76 typedef DWORD (APIENTRY *PGD_DXDDGETMOCOMPFORMATS)(HANDLE, PDD_GETMOCOMPFORMATSDATA);
77 typedef DWORD (APIENTRY *PGD_DXDDQUERYMOCOMPSTATUS)(HANDLE, PDD_QUERYMOCOMPSTATUSDATA);
78 typedef DWORD (APIENTRY *PGD_DXDDRENDERMOCOMP)(HANDLE, PDD_RENDERMOCOMPDATA);
79 
80 /* From dd.c */
81 typedef DWORD (APIENTRY *PGD_DDCREATESURFACE)(HANDLE, HANDLE *, DDSURFACEDESC *, DD_SURFACE_GLOBAL *, DD_SURFACE_LOCAL *, DD_SURFACE_MORE *, PDD_CREATESURFACEDATA , HANDLE *);
82 typedef DWORD (APIENTRY *PGD_DXDDWAITFORVERTICALBLANK)(HANDLE, PDD_WAITFORVERTICALBLANKDATA);
83 typedef DWORD (APIENTRY *PGD_DDCANCREATESURFACE)(HANDLE hDirectDrawLocal, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData);
84 typedef DWORD (APIENTRY *PGD_DXDDGETSCANLINE)(HANDLE, PDD_GETSCANLINEDATA);
85 typedef DWORD (APIENTRY *PGD_DXDDCREATESURFACEEX)(HANDLE,HANDLE,DWORD);
86 
87 /* From ddsurf.c */
88 typedef DWORD (APIENTRY *PGD_DDALPHABLT)(HANDLE, HANDLE, PDD_BLTDATA);
89 typedef BOOL (APIENTRY *PGD_DDATTACHSURFACE)(HANDLE, HANDLE);
90 typedef DWORD (APIENTRY *PGD_DXDDUNATTACHSURFACE)(HANDLE, HANDLE);
91 typedef DWORD (APIENTRY *PGD_DXDDDESTROYSURFACE)(HANDLE, BOOL);
92 typedef DWORD (APIENTRY *PGD_DXDDFLIP)(HANDLE, HANDLE, HANDLE, HANDLE, PDD_FLIPDATA);
93 typedef DWORD (APIENTRY *PGD_DXDDLOCK)(HANDLE, PDD_LOCKDATA, HDC);
94 typedef DWORD (APIENTRY *PGD_DXDDUNLOCK)(HANDLE, PDD_UNLOCKDATA );
95 typedef DWORD (APIENTRY *PGD_DDBLT)(HANDLE, HANDLE, PDD_BLTDATA);
96 typedef DWORD (APIENTRY *PGD_DXDDSETCOLORKEY)(HANDLE, PDD_SETCOLORKEYDATA);
97 typedef DWORD (APIENTRY *PGD_DDADDATTACHEDSURFACE)(HANDLE, HANDLE,PDD_ADDATTACHEDSURFACEDATA);
98 typedef DWORD (APIENTRY *PGD_DXDDGETBLTSTATUS)(HANDLE, PDD_GETBLTSTATUSDATA);
99 typedef DWORD (APIENTRY *PGD_DXDDGETFLIPSTATUS)(HANDLE, PDD_GETFLIPSTATUSDATA);
100 typedef DWORD (APIENTRY *PGD_DXDDUPDATEOVERLAY)(HANDLE, HANDLE, PDD_UPDATEOVERLAYDATA);
101 typedef DWORD (APIENTRY *PGD_DXDDSETOVERLAYPOSITION)(HANDLE, HANDLE, PDD_SETOVERLAYPOSITIONDATA);
102 
103 /* From eng.c */
104 typedef FLATPTR (APIENTRY *PGD_HEAPVIDMEMALLOCALIGNED)(LPVIDMEM, DWORD, DWORD, LPSURFACEALIGNMENT, LPLONG);
105 typedef VOID (APIENTRY *PGD_VIDMEMFREE)(LPVMEMHEAP, FLATPTR);
106 typedef PVOID (APIENTRY *PGD_ENGALLOCPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, SIZE_T, ULONG) ;
107 typedef VOID (APIENTRY *PGD_ENGFREEPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, PVOID);
108 typedef PDD_SURFACE_LOCAL (APIENTRY *PGD_ENGLOCKDIRECTDRAWSURFACE)(HANDLE);
109 typedef BOOL (APIENTRY *PGD_ENGUNLOCKDIRECTDRAWSURFACE)(PDD_SURFACE_LOCAL);
110 
111 /* Gammaramp internal prototype */
112 BOOL FASTCALL IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp);
113 BOOL FASTCALL IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL);
114