2 * Copyright 2006 Ulrich Czekalla
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.
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.
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
19 #ifndef __WINE_DLLS_DDRAWEX_DDRAWEX_PRIVATE_H
20 #define __WINE_DLLS_DDRAWEX_DDRAWEX_PRIVATE_H
22 #include "wine/heap.h"
24 DEFINE_GUID(CLSID_DirectDrawFactory
, 0x4fd2a832, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
25 DEFINE_GUID(IID_IDirectDrawFactory
, 0x4fd2a833, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
27 #define INTERFACE IDirectDrawFactory
28 DECLARE_INTERFACE_(IDirectDrawFactory
, IUnknown
)
30 STDMETHOD_(HRESULT
, QueryInterface
)(THIS_ REFIID riid
, void** ppvObject
) PURE
;
31 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
32 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
33 STDMETHOD(CreateDirectDraw
)(THIS_ GUID
* pGUID
, HWND hWnd
, DWORD dwCoopLevelFlags
,
34 DWORD dwReserved
, IUnknown
*pUnkOuter
, IDirectDraw
**ppDirectDraw
) PURE
;
35 STDMETHOD(_DirectDrawEnumerate
)(THIS_ LPDDENUMCALLBACKW cb
, void *ctx
) PURE
;
39 #if !defined(__cplusplus) || defined(CINTERFACE)
40 /*** IUnknown methods ***/
41 #define IDirectDrawFactory_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
42 #define IDirectDrawFactory_AddRef(p) (p)->lpVtbl->AddRef(p)
43 #define IDirectDrawFactory_Release(p) (p)->lpVtbl->Release(p)
44 #define IDirectDrawFactory_CreateDirectDraw(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDirectDraw(p,a,b,c,d,e,f)
45 #define IDirectDrawFactory_DirectDrawEnumerate(p,a,b) (p)->lpVtbl->_DirectDrawEnumerate(p,a,b)
49 HRESULT WINAPI
ddrawex_factory_CreateDirectDraw(IDirectDrawFactory
*iface
,
50 GUID
*guid
, HWND window
, DWORD coop_level
, DWORD reserved
, IUnknown
*outer_unknown
,
51 IDirectDraw
**ddraw
) DECLSPEC_HIDDEN
;
53 void DDSD_to_DDSD2(const DDSURFACEDESC
*in
, DDSURFACEDESC2
*out
) DECLSPEC_HIDDEN
;
54 void DDSD2_to_DDSD(const DDSURFACEDESC2
*in
, DDSURFACEDESC
*out
) DECLSPEC_HIDDEN
;
58 IDirectDraw IDirectDraw_iface
;
59 IDirectDraw2 IDirectDraw2_iface
;
60 IDirectDraw3 IDirectDraw3_iface
;
61 IDirectDraw4 IDirectDraw4_iface
;
64 /* The interface we're forwarding to */
68 IDirectDraw4
*dd_get_outer(IDirectDraw4
*inner
) DECLSPEC_HIDDEN
;
69 IDirectDraw4
*dd_get_inner(IDirectDraw4
*outer
) DECLSPEC_HIDDEN
;
71 struct ddrawex_surface
73 IDirectDrawSurface3 IDirectDrawSurface3_iface
;
74 IDirectDrawSurface4 IDirectDrawSurface4_iface
;
77 /* The interface we're forwarding to */
78 IDirectDrawSurface4
*parent
;
83 /* An UUID we use to store the outer surface as private data in the inner surface */
84 #define IID_DDrawexPriv IID_IDirectDrawSurface4
87 struct ddrawex_surface
*unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4
*iface
) DECLSPEC_HIDDEN
;
88 IDirectDrawSurface4
*dds_get_outer(IDirectDrawSurface4
*inner
) DECLSPEC_HIDDEN
;
89 HRESULT
prepare_permanent_dc(IDirectDrawSurface4
*iface
) DECLSPEC_HIDDEN
;
91 #endif /* __WINE_DLLS_DDRAWEX_DDRAWEX_PRIVATE_H */