50ec596a245546fc359b90fafde64f9d7f703596
[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 LONG ref;
43
44 IDirectDrawImpl* owner;
45
46 } IDirectDrawSurfaceImpl;
47
48 /******** Clipper Object ********/
49
50 typedef struct
51 {
52 IDirectDrawClipperVtbl* lpVtbl;
53 LONG ref;
54
55 IDirectDrawImpl* owner;
56
57 } IDirectDrawClipperImpl;
58
59 /******** Palette Object ********/
60
61 typedef struct
62 {
63 IDirectDrawPaletteVtbl* lpVtbl;
64 LONG ref;
65
66 IDirectDrawImpl* owner;
67
68 } IDirectDrawPaletteImpl;
69
70 /*********** VTables ************/
71
72 extern IDirectDraw7Vtbl DirectDraw7_Vtable;
73 extern IDirectDrawVtbl DDRAW_IDirectDraw_VTable;
74 extern IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable;
75 extern IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable;
76
77 extern IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable;
78 extern IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable;
79
80 extern IDirectDrawPaletteVtbl DirectDrawPalette_Vtable;
81 extern IDirectDrawClipperVtbl DirectDrawClipper_Vtable;
82 extern IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable;
83 extern IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable;
84
85 /********* Prototypes **********/
86
87 HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
88 HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
89 VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
90
91 HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
92 LPDWORD total, LPDWORD free);
93
94 HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
95 HANDLE h);
96
97 HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
98
99
100 HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
101 HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
102 VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
103
104 HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
105 LPDWORD total, LPDWORD free);
106
107 HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
108 HANDLE h);
109
110 HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
111
112
113
114 /*********** Macros ***********/
115
116 #define DX_STUB \
117 static BOOL firstcall = TRUE; \
118 if (firstcall) \
119 { \
120 char buffer[1024]; \
121 sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
122 OutputDebugStringA(buffer); \
123 firstcall = FALSE; \
124 } \
125 return DDERR_UNSUPPORTED;
126
127 #endif /* __DDRAW_PRIVATE */