Sync with trunk head (r49139)
[reactos.git] / dll / directx / wine / ddraw / legacy.h
1 /*
2 * Copyright (C) the Wine project
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 /*****************************************************************************
25 * IDirectDraw3 interface
26 */
27
28 #if defined( _WIN32 ) && !defined( _NO_COM )
29 #define INTERFACE IDirectDraw3
30 DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
31 {
32 /*** IUnknown methods ***/
33 /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
34 /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
35 /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE;
36 /*** IDirectDraw2 methods ***/
37 /*0c*/ STDMETHOD(Compact)(THIS) PURE;
38 /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
39 /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
40 /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE;
41 /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE;
42 /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
43 /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
44 /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
45 /*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
46 /*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
47 /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
48 /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE;
49 /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
50 /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
51 /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
52 /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
53 /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
54 /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
55 /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE;
56 /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
57 /* added in v2 */
58 /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
59 /* added in v3 */
60 /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE *pSurf) PURE;
61 };
62 #undef INTERFACE
63
64 #if !defined(__cplusplus) || defined(CINTERFACE)
65 /*** IUnknown methods ***/
66 #define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
67 #define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
68 #define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
69 /*** IDirectDraw methods ***/
70 #define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
71 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
72 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
73 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
74 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
75 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
76 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
77 #define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
78 #define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
79 #define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
80 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
81 #define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
82 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
83 #define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
84 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
85 #define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
86 #define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
87 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
88 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
89 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
90 /*** IDirectDraw2 methods ***/
91 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
92 /*** IDirectDraw3 methods ***/
93 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
94 #else
95 /*** IUnknown methods ***/
96 #define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
97 #define IDirectDraw3_AddRef(p) (p)->AddRef()
98 #define IDirectDraw3_Release(p) (p)->Release()
99 /*** IDirectDraw methods ***/
100 #define IDirectDraw3_Compact(p) (p)->Compact()
101 #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
102 #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
103 #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
104 #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
105 #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
106 #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
107 #define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface()
108 #define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b)
109 #define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
110 #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
111 #define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a)
112 #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
113 #define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a)
114 #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
115 #define IDirectDraw3_Initialize(p,a) (p)->Initialize(a)
116 #define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
117 #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
118 #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
119 #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
120 /*** IDirectDraw2 methods ***/
121 #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
122 /*** IDirectDraw3 methods ***/
123 #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
124 #endif
125 #undef INTERFACE
126 #endif
127
128 #ifdef __cplusplus
129 }
130 #endif