split up CreateSurface to hal and hel interface
[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 DDRAWI_DDRAWSURFACE_GBL Global;
45 DDRAWI_DDRAWSURFACE_MORE More;
46 DDRAWI_DDRAWSURFACE_LCL Local;
47 DDRAWI_DDRAWSURFACE_LCL *pLocal[2];
48 DDSURFACEDESC ddsd;
49
50 } IDirectDrawSurfaceImpl;
51
52 /******** Clipper Object ********/
53
54 typedef struct
55 {
56 IDirectDrawClipperVtbl* lpVtbl;
57 LONG ref;
58
59 IDirectDrawImpl* owner;
60
61 } IDirectDrawClipperImpl;
62
63 /******** Palette Object ********/
64
65 typedef struct
66 {
67 IDirectDrawPaletteVtbl* lpVtbl;
68 LONG ref;
69
70 IDirectDrawImpl* owner;
71
72 } IDirectDrawPaletteImpl;
73
74 /*********** VTables ************/
75
76 extern IDirectDraw7Vtbl DirectDraw7_Vtable;
77 extern IDirectDrawVtbl DDRAW_IDirectDraw_VTable;
78 extern IDirectDraw2Vtbl DDRAW_IDirectDraw2_VTable;
79 extern IDirectDraw4Vtbl DDRAW_IDirectDraw4_VTable;
80
81 extern IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable;
82 extern IDirectDrawSurface3Vtbl DDRAW_IDDS3_Thunk_VTable;
83
84 extern IDirectDrawPaletteVtbl DirectDrawPalette_Vtable;
85 extern IDirectDrawClipperVtbl DirectDrawClipper_Vtable;
86 extern IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable;
87 extern IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable;
88
89 /********* Prototypes **********/
90
91 HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 );
92 HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
93 VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 );
94 HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD );
95 HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
96 HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
97 HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
98 HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7, DWORD, DWORD, DWORD, DWORD, DWORD );
99 HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
100 HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 , LPDIRECTDRAW , LPDDSURFACEDESC2 );
101
102
103 HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
104 HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
105 VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 );
106 HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 , LPDDSCAPS2 ddsaps, LPDWORD , LPDWORD );
107 HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE );
108 HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
109 HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
110 HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD , DWORD );
111 HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
112 HRESULT Hel_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 , LPDIRECTDRAW , LPDDSURFACEDESC2 );
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 */