f7b1e0160b636d79aa2096a6ab3bb831e2dfb78b
[reactos.git] / reactos / lib / ddraw / rosdraw.h
1 #ifndef __DDRAW_PRIVATE
2 #define __DDRAW_PRIVATE
3
4 /********* Includes *********/
5
6 #include <windows.h>
7 #include <stdio.h>
8 #include <ddraw.h>
9 #include <ddk/ddrawi.h>
10 #include <ddk/d3dhal.h>
11 #include <ddrawgdi.h>
12
13 /******** Main Object ********/
14
15 typedef struct
16 {
17 IDirectDraw7Vtbl* lpVtbl;
18 IDirectDraw4Vtbl* lpVtbl_v4;
19 IDirectDraw2Vtbl* lpVtbl_v2;
20 IDirectDrawVtbl* lpVtbl_v1;
21
22 DDRAWI_DIRECTDRAW_GBL DirectDrawGlobal;
23 DDHAL_DDMISCELLANEOUSCALLBACKS Misc2Callback;
24 DDHALINFO HalInfo;
25
26 HWND window;
27 DWORD cooperative_level;
28 HDC hdc;
29 int Height, Width, Bpp;
30
31 GUID* lpGUID;
32
33 } IDirectDrawImpl;
34
35 /******** Surface Object ********/
36
37 typedef struct
38 {
39 IDirectDrawSurface7Vtbl* lpVtbl;
40 IDirectDrawSurface3Vtbl* lpVtbl_v3;
41
42 IDirectDrawImpl* owner;
43
44 } IDirectDrawSurfaceImpl;
45
46 /******** Clipper Object ********/
47
48 typedef struct
49 {
50 IDirectDrawClipperVtbl* lpVtbl;
51 LONG ref;
52
53 IDirectDrawImpl* owner;
54
55 } IDirectDrawClipperImpl;
56
57 /******** Palette Object ********/
58
59 typedef struct
60 {
61 IDirectDrawPaletteVtbl* lpVtbl;
62 LONG ref;
63
64 IDirectDrawImpl* owner;
65
66 } IDirectDrawPaletteImpl;
67
68 /*********** VTables ************/
69
70 extern IDirectDraw7Vtbl DirectDraw7_Vtable;
71 extern IDirectDrawVtbl DDRAW_IDirectDraw_VTable;
72 extern IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable;
73 extern IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable;
74
75 extern IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable;
76 extern IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable;
77
78 extern IDirectDrawPaletteVtbl DirectDrawPalette_Vtable;
79 extern IDirectDrawClipperVtbl DirectDrawClipper_Vtable;
80 extern IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable;
81 extern IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable;
82
83 /********* Prototypes **********/
84
85 HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 );
86 HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
87 VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 );
88 HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD );
89 HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
90 HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
91 HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
92 HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7, DWORD, DWORD, DWORD, DWORD, DWORD );
93 HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
94
95
96 HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
97 HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
98 VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 );
99 HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 , LPDDSCAPS2 ddsaps, LPDWORD , LPDWORD );
100 HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
101 HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
102 HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
103 HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD , DWORD );
104 HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
105
106 /*********** Macros ***********/
107
108 #define DX_STUB \
109 static BOOL firstcall = TRUE; \
110 if (firstcall) \
111 { \
112 char buffer[1024]; \
113 sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
114 OutputDebugStringA(buffer); \
115 firstcall = FALSE; \
116 } \
117 return DDERR_UNSUPPORTED;
118
119 #endif /* __DDRAW_PRIVATE */