ReactOS  0.4.14-dev-999-g61c8d34
ddrawex.h
Go to the documentation of this file.
1 #ifndef __DDRAWEXH__
2 #define __DDRAWEXH__
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <ddraw.h>
9 DEFINE_GUID(CLSID_DirectDrawFactory, 0x4FD2A832, 0x86C8, 0x11D0, 0x8F, 0xCA, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D);
10 DEFINE_GUID(IID_IDirectDrawFactory, 0x4FD2A833, 0x86C8, 0x11D0, 0x8F, 0xCA, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D);
11 DEFINE_GUID(IID_IDirectDraw3, 0x618F8AD4, 0x8B7A, 0x11D0, 0x8F, 0xCC, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D);
12 
13 #define DDSCAPS_DATAEXCHANGE (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY)
14 #define DDERR_LOADFAILED MAKE_DDHRESULT( 901 )
15 #define DDERR_BADVERSIONINFO MAKE_DDHRESULT( 902 )
16 #define DDERR_BADPROCADDRESS MAKE_DDHRESULT( 903 )
17 #define DDERR_LEGACYUSAGE MAKE_DDHRESULT( 904 )
18 
19 typedef struct IDirectDraw3 *LPDIRECTDRAW3;
20 
21 #ifndef DIRECTDRAW_VERSION
22  #define DDSD_LPSURFACE 0x00000800
23 
24  DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
25  typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3;
26  #if defined( _WIN32 ) && !defined( _NO_COM )
27  #undef INTERFACE
28  #define INTERFACE IDirectDrawSurface3
29  DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
30  {
34  STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
35  STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
39  STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
40  STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
43  STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3*) PURE;
44  STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
45  STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
46  STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER *) PURE;
47  STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
49  STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
50  STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
51  STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE *) PURE;
53  STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
55  STDMETHOD(IsLost)(THIS) PURE;
58  STDMETHOD(Restore)(THIS) PURE;
60  STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
61  STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
65  STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
66  STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
67  STDMETHOD(GetDDInterface)(THIS_ LPVOID *) PURE;
68  STDMETHOD(PageLock)(THIS_ DWORD) PURE;
69  STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
70  STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD ) PURE;
71  };
72  #endif
73 #endif
74 
75 #if defined( _WIN32 ) && !defined( _NO_COM )
76 #undef INTERFACE
77 #define INTERFACE IDirectDrawFactory
78 
79 DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
80 {
84  STDMETHOD(CreateDirectDraw) (THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags, DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE;
85  STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACK lpCallback, LPVOID lpContext) PURE;
86 };
87 #endif
88 
89 #if defined( _WIN32 ) && !defined( _NO_COM )
90  #undef INTERFACE
91  #define INTERFACE IDirectDraw3
92  DECLARE_INTERFACE_(IDirectDraw3,IUnknown)
93  {
97  STDMETHOD(Compact)(THIS) PURE;
98  STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE;
99  STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE;
100  STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE;
101  STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE;
102  STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE;
103  STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE;
104  STDMETHOD(FlipToGDISurface)(THIS) PURE;
105  STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE;
106  STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE;
107  STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE;
108  STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE;
109  STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE;
110  STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE;
111  STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE;
112  STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE;
113  STDMETHOD(RestoreDisplayMode)(THIS) PURE;
114  STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE;
116  STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE;
117  STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE;
119  };
120  #if !defined(__cplusplus) || defined(CINTERFACE)
121  #define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
122  #define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
123  #define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
124  #define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
125  #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c)
126  #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d)
127  #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c)
128  #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b)
129  #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d)
130  #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d)
131  #define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
132  #define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
133  #define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
134  #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b)
135  #define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a)
136  #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a)
137  #define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a)
138  #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a)
139  #define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
140  #define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
141  #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
142  #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e)
143  #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b)
144  #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c)
145  #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b)
146  #else
147  #define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
148  #define IDirectDraw3_AddRef(p) (p)->AddRef()
149  #define IDirectDraw3_Release(p) (p)->Release()
150  #define IDirectDraw3_Compact(p) (p)->Compact()
151  #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c)
152  #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d)
153  #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c)
154  #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b)
155  #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d)
156  #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d)
157  #define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface()
158  #define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b)
159  #define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
160  #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b)
161  #define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a)
162  #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a)
163  #define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a)
164  #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a)
165  #define IDirectDraw3_Initialize(p,a) (p)->Initialize(a)
166  #define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
167  #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
168  #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e)
169  #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b)
170  #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c)
171  #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b)
172  #endif
173 #endif
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 #endif
struct IDirectDrawSurface3 * LPDIRECTDRAWSURFACE3
Definition: ddrawex.h:25
struct _DDBLTBATCH * LPDDBLTBATCH
HRESULT(WINAPI * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID)
Definition: ddraw.h:1260
#define REFIID
Definition: guiddef.h:118
#define THIS_
Definition: basetyps.h:65
_In_ BOOLEAN Release
Definition: classpnp.h:929
int WINAPI GetPixelFormat(_In_ HDC)
#define THIS
Definition: basetyps.h:66
HDC WINAPI GetDC(_In_opt_ HWND)
REFIID riid
Definition: precomp.h:44
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
DEFINE_GUID(CLSID_DirectDrawFactory, 0x4FD2A832, 0x86C8, 0x11D0, 0x8F, 0xCA, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0x9D)
#define DWORD
Definition: nt_native.h:44
HRESULT CALLBACK EnumDisplayModes(LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT *Context)
#define STDMETHOD(m)
Definition: basetyps.h:62
static HANDLE hEvent
Definition: comm.c:54
BOOL CreateSurface(LPDIRECTDRAWSURFACE7 *pSurface)
Definition: helper.cpp:28
HRESULT WINAPI GetSurfaceFromDC(HDC dc, IDirectDrawSurface4 **surface, HDC *device_dc)
Definition: main.c:202
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
struct IDirectDraw * LPDIRECTDRAW
Definition: ddraw.h:710
#define LPRECT
Definition: precomp.h:28
static const WCHAR dwHeight[]
Definition: provider.c:63
HRESULT(WINAPI * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID)
Definition: ddraw.h:1258
LONG HRESULT
Definition: typedefs.h:78
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
unsigned long DWORD
Definition: ntddk_ex.h:95
PVOID HANDLE
Definition: typedefs.h:72
#define LPVOID
Definition: nt_native.h:45
DWORD dwRefreshRate
Definition: ddraw.h:1135
HDC hdc
Definition: main.c:9
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
REFIID LPVOID * ppvObject
Definition: precomp.h:44
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
DDCOLORKEY * LPDDCOLORKEY
Definition: vmrender.idl:11
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
void * LPDDPIXELFORMAT
Definition: videoacc.idl:6
struct IDirectDrawClipper * LPDIRECTDRAWCLIPPER
Definition: ddraw.h:721
int32_t * LPLONG
Definition: typedefs.h:57
BOOL Initialize(HINSTANCE hInstance)
Definition: msconfig.c:341
struct _DDBLTFX * LPDDBLTFX
#define PURE
Definition: basetyps.h:64
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
struct IDirectDraw3 * LPDIRECTDRAW3
Definition: ddrawex.h:19
uint32_t * LPDWORD
Definition: typedefs.h:58
unsigned int ULONG
Definition: retypes.h:1
struct _DDOVERLAYFX * LPDDOVERLAYFX
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
void * LPDDSURFACEDESC
Definition: ddstream.idl:19
static const WCHAR dwWidth[]
Definition: provider.c:62
struct _DDSCAPS * LPDDSCAPS
struct IDirectDrawPalette * LPDIRECTDRAWPALETTE
Definition: ddraw.h:720