Add some debug messages, and disable them (#define NDEBUG)
[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 InGUID;
32 BOOL InitializeDraw;
33
34 } IDirectDrawImpl;
35
36 /******** Surface Object ********/
37
38 typedef struct
39 {
40 IDirectDrawSurface7Vtbl* lpVtbl;
41 IDirectDrawSurface3Vtbl* lpVtbl_v3;
42
43 IDirectDrawImpl* owner;
44
45 DDRAWI_DDRAWSURFACE_GBL Global;
46 DDRAWI_DDRAWSURFACE_MORE More;
47 DDRAWI_DDRAWSURFACE_LCL Local;
48 DDRAWI_DDRAWSURFACE_LCL *pLocal[2];
49 DDSURFACEDESC ddsd;
50
51 } IDirectDrawSurfaceImpl;
52
53 /******** Clipper Object ********/
54
55 typedef struct
56 {
57 IDirectDrawClipperVtbl* lpVtbl;
58 LONG ref;
59
60 IDirectDrawImpl* owner;
61
62 } IDirectDrawClipperImpl;
63
64 /******** Palette Object ********/
65
66 typedef struct
67 {
68 IDirectDrawPaletteVtbl* lpVtbl;
69 LONG ref;
70
71 IDirectDrawImpl* owner;
72
73 } IDirectDrawPaletteImpl;
74
75 /*********** VTables ************/
76
77 extern IDirectDraw7Vtbl DirectDraw7_Vtable;
78 extern IDirectDrawVtbl DDRAW_IDirectDraw_VTable;
79 extern IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable;
80 extern IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable;
81
82 extern IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable;
83 extern IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable;
84
85 extern IDirectDrawPaletteVtbl DirectDrawPalette_Vtable;
86 extern IDirectDrawClipperVtbl DirectDrawClipper_Vtable;
87 extern IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable;
88 extern IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable;
89
90 /********* Prototypes **********/
91
92 HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 );
93 HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
94 VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 );
95 HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD );
96 HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
97 HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
98 HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
99 HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7, DWORD, DWORD, DWORD, DWORD, DWORD );
100 HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
101 HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 , LPDIRECTDRAW , LPDDSURFACEDESC2 );
102
103
104 HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
105 HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
106 VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 );
107 HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 , LPDDSCAPS2 ddsaps, LPDWORD , LPDWORD );
108 HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
109 HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
110 HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
111 HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD , DWORD );
112 HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
113 HRESULT Hel_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 , LPDIRECTDRAW , LPDDSURFACEDESC2 );
114
115 /*********** Macros ***********/
116
117 #define DX_STUB \
118 static BOOL firstcall = TRUE; \
119 if (firstcall) \
120 { \
121 char buffer[1024]; \
122 sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
123 OutputDebugStringA(buffer); \
124 firstcall = FALSE; \
125 } \
126 return DDERR_UNSUPPORTED;
127
128 #endif /* __DDRAW_PRIVATE */