ReactOS 0.4.17-dev-934-g091855f
surface.c File Reference
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "ddraw.h"
#include "d3d.h"
#include "ddrawex_private.h"
Include dependency graph for surface.c:

Go to the source code of this file.

Classes

struct  enumsurfaces_wrap
 
struct  enumsurfaces_thunk
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddrawex)
 
static struct ddrawex_surface * impl_from_IDirectDrawSurface3 (IDirectDrawSurface3 *iface)
 
static struct ddrawex_surface * unsafe_impl_from_IDirectDrawSurface3 (IDirectDrawSurface3 *iface)
 
static struct ddrawex_surface * impl_from_IDirectDrawSurface4 (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddrawex_surface4_QueryInterface (IDirectDrawSurface4 *iface, REFIID riid, void **out)
 
static HRESULT WINAPI ddrawex_surface3_QueryInterface (IDirectDrawSurface3 *iface, REFIID riid, void **out)
 
static ULONG WINAPI ddrawex_surface4_AddRef (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddrawex_surface3_AddRef (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddrawex_surface4_Release (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddrawex_surface3_Release (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddrawex_surface4_AddAttachedSurface (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddrawex_surface3_AddAttachedSurface (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddrawex_surface4_AddOverlayDirtyRect (IDirectDrawSurface4 *iface, RECT *rect)
 
static HRESULT WINAPI ddrawex_surface3_AddOverlayDirtyRect (IDirectDrawSurface3 *iface, RECT *rect)
 
static HRESULT WINAPI ddrawex_surface4_Blt (IDirectDrawSurface4 *iface, RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI ddrawex_surface3_Blt (IDirectDrawSurface3 *iface, RECT *dst_rect, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI ddrawex_surface4_BltBatch (IDirectDrawSurface4 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_BltBatch (IDirectDrawSurface3 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_BltFast (IDirectDrawSurface4 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_BltFast (IDirectDrawSurface3 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_DeleteAttachedSurface (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddrawex_surface3_DeleteAttachedSurface (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI enumsurfaces_wrap_cb (IDirectDrawSurface4 *surf, DDSURFACEDESC2 *desc, void *vctx)
 
static HRESULT WINAPI ddrawex_surface4_EnumAttachedSurfaces (IDirectDrawSurface4 *iface, void *ctx, LPDDENUMSURFACESCALLBACK2 cb)
 
static HRESULT WINAPI enumsurfaces_thunk_cb (IDirectDrawSurface4 *surf, DDSURFACEDESC2 *desc2, void *vctx)
 
static HRESULT WINAPI ddrawex_surface3_EnumAttachedSurfaces (IDirectDrawSurface3 *iface, void *ctx, LPDDENUMSURFACESCALLBACK cb)
 
static HRESULT WINAPI ddrawex_surface4_EnumOverlayZOrders (IDirectDrawSurface4 *iface, DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK2 cb)
 
static HRESULT WINAPI ddrawex_surface3_EnumOverlayZOrders (IDirectDrawSurface3 *iface, DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK cb)
 
static HRESULT WINAPI ddrawex_surface4_Flip (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *dst, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_Flip (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *dst, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_GetAttachedSurface (IDirectDrawSurface4 *iface, DDSCAPS2 *caps, IDirectDrawSurface4 **attachment)
 
static HRESULT WINAPI ddrawex_surface3_GetAttachedSurface (IDirectDrawSurface3 *iface, DDSCAPS *caps, IDirectDrawSurface3 **attachment)
 
static HRESULT WINAPI ddrawex_surface4_GetBltStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_GetBltStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_GetCaps (IDirectDrawSurface4 *iface, DDSCAPS2 *caps)
 
static HRESULT WINAPI ddrawex_surface3_GetCaps (IDirectDrawSurface3 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddrawex_surface4_GetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddrawex_surface3_GetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddrawex_surface4_GetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddrawex_surface3_GetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddrawex_surface4_GetDC (IDirectDrawSurface4 *iface, HDC *dc)
 
static HRESULT WINAPI ddrawex_surface3_GetDC (IDirectDrawSurface3 *iface, HDC *dc)
 
static HRESULT WINAPI ddrawex_surface4_GetFlipStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_GetFlipStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_GetOverlayPosition (IDirectDrawSurface4 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddrawex_surface3_GetOverlayPosition (IDirectDrawSurface3 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddrawex_surface4_GetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddrawex_surface3_GetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddrawex_surface4_GetPixelFormat (IDirectDrawSurface4 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddrawex_surface3_GetPixelFormat (IDirectDrawSurface3 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddrawex_surface4_GetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *desc)
 
static HRESULT WINAPI ddrawex_surface3_GetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *desc)
 
static HRESULT WINAPI ddrawex_surface4_Initialize (IDirectDrawSurface4 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *desc)
 
static HRESULT WINAPI ddrawex_surface3_Initialize (IDirectDrawSurface3 *iface, IDirectDraw *ddraw, DDSURFACEDESC *desc)
 
static HRESULT WINAPI ddrawex_surface4_IsLost (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddrawex_surface3_IsLost (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddrawex_surface4_Lock (IDirectDrawSurface4 *iface, RECT *rect, DDSURFACEDESC2 *desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddrawex_surface3_Lock (IDirectDrawSurface3 *iface, RECT *rect, DDSURFACEDESC *desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddrawex_surface4_ReleaseDC (IDirectDrawSurface4 *iface, HDC dc)
 
static HRESULT WINAPI ddrawex_surface3_ReleaseDC (IDirectDrawSurface3 *iface, HDC dc)
 
static HRESULT WINAPI ddrawex_surface4_Restore (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddrawex_surface3_Restore (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddrawex_surface4_SetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddrawex_surface3_SetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddrawex_surface4_SetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddrawex_surface3_SetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddrawex_surface4_SetOverlayPosition (IDirectDrawSurface4 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddrawex_surface3_SetOverlayPosition (IDirectDrawSurface3 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddrawex_surface4_SetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddrawex_surface3_SetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddrawex_surface4_Unlock (IDirectDrawSurface4 *iface, RECT *rect)
 
static HRESULT WINAPI ddrawex_surface3_Unlock (IDirectDrawSurface3 *iface, void *data)
 
static HRESULT WINAPI ddrawex_surface4_UpdateOverlay (IDirectDrawSurface4 *iface, RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddrawex_surface3_UpdateOverlay (IDirectDrawSurface3 *iface, RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddrawex_surface4_UpdateOverlayDisplay (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_UpdateOverlayDisplay (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_UpdateOverlayZOrder (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *reference)
 
static HRESULT WINAPI ddrawex_surface3_UpdateOverlayZOrder (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *reference)
 
static HRESULT WINAPI ddrawex_surface4_GetDDInterface (IDirectDrawSurface4 *iface, void **ddraw)
 
static HRESULT WINAPI ddrawex_surface3_GetDDInterface (IDirectDrawSurface3 *iface, void **ddraw)
 
static HRESULT WINAPI ddrawex_surface4_PageLock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_PageLock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_PageUnlock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_PageUnlock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_SetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *desc, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface3_SetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *desc, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_SetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD data_size, DWORD flags)
 
static HRESULT WINAPI ddrawex_surface4_GetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD *data_size)
 
static HRESULT WINAPI ddrawex_surface4_FreePrivateData (IDirectDrawSurface4 *iface, REFGUID tag)
 
static HRESULT WINAPI ddrawex_surface4_GetUniquenessValue (IDirectDrawSurface4 *iface, DWORD *value)
 
static HRESULT WINAPI ddrawex_surface4_ChangeUniquenessValue (IDirectDrawSurface4 *iface)
 
struct ddrawex_surface * unsafe_impl_from_IDirectDrawSurface4 (IDirectDrawSurface4 *iface)
 
IDirectDrawSurface4 * dds_get_outer (IDirectDrawSurface4 *inner)
 
HRESULT prepare_permanent_dc (IDirectDrawSurface4 *iface)
 

Variables

static const IDirectDrawSurface3Vtbl ddrawex_surface3_vtbl
 
static const IDirectDrawSurface4Vtbl ddrawex_surface4_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file surface.c.

Function Documentation

◆ ddrawex_surface3_AddAttachedSurface()

static HRESULT WINAPI ddrawex_surface3_AddAttachedSurface ( IDirectDrawSurface3 *  iface,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 153 of file surface.c.

155{
156 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
158
159 TRACE("iface %p, attachment %p.\n", iface, attachment);
160
162 attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL);
163}
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
#define NULL
Definition: types.h:112
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5982
static HRESULT WINAPI ddrawex_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:142
GLenum attachment
Definition: glext.h:6295
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface4 IDirectDrawSurface4_iface

◆ ddrawex_surface3_AddOverlayDirtyRect()

static HRESULT WINAPI ddrawex_surface3_AddOverlayDirtyRect ( IDirectDrawSurface3 *  iface,
RECT *  rect 
)
static

Definition at line 174 of file surface.c.

175{
176 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
177
178 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
179
181}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
RECT rect
Definition: combotst.c:67
static HRESULT WINAPI ddrawex_surface4_AddOverlayDirtyRect(IDirectDrawSurface4 *iface, RECT *rect)
Definition: surface.c:165

◆ ddrawex_surface3_AddRef()

static ULONG WINAPI ddrawex_surface3_AddRef ( IDirectDrawSurface3 *  iface)
static

Definition at line 107 of file surface.c.

108{
109 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
110
111 TRACE("iface %p.\n", iface);
112
114}
static ULONG WINAPI ddrawex_surface4_AddRef(IDirectDrawSurface4 *iface)
Definition: surface.c:97

◆ ddrawex_surface3_Blt()

static HRESULT WINAPI ddrawex_surface3_Blt ( IDirectDrawSurface3 *  iface,
RECT *  dst_rect,
IDirectDrawSurface3 *  src_surface,
RECT *  src_rect,
DWORD  flags,
DDBLTFX *  fx 
)
static

Definition at line 195 of file surface.c.

197{
200
201 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#lx, fx %p.\n",
202 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
203
204 return ddrawex_surface4_Blt(&dst->IDirectDrawSurface4_iface, dst_rect,
205 src ? &src->IDirectDrawSurface4_iface : NULL, src_rect, flags, fx);
206}
static HRESULT WINAPI ddrawex_surface4_Blt(IDirectDrawSurface4 *iface, RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:183
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:484

◆ ddrawex_surface3_BltBatch()

static HRESULT WINAPI ddrawex_surface3_BltBatch ( IDirectDrawSurface3 *  iface,
DDBLTBATCH *  batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 218 of file surface.c.

220{
221 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
222
223 TRACE("iface %p, batch %p, count %lu, flags %#lx.\n", iface, batch, count, flags);
224
226}
static HRESULT WINAPI ddrawex_surface4_BltBatch(IDirectDrawSurface4 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
Definition: surface.c:208
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ ddrawex_surface3_BltFast()

static HRESULT WINAPI ddrawex_surface3_BltFast ( IDirectDrawSurface3 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface3 *  src_surface,
RECT *  src_rect,
DWORD  flags 
)
static

Definition at line 241 of file surface.c.

243{
246
247 TRACE("iface %p, dst_x %lu, dst_y %lu, src_surface %p, src_rect %s, flags %#lx.\n",
248 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
249
250 return ddrawex_surface4_BltFast(&dst->IDirectDrawSurface4_iface, dst_x, dst_y,
251 src ? &src->IDirectDrawSurface4_iface : NULL, src_rect, flags);
252}
static HRESULT WINAPI ddrawex_surface4_BltFast(IDirectDrawSurface4 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags)
Definition: surface.c:228

◆ ddrawex_surface3_DeleteAttachedSurface()

static HRESULT WINAPI ddrawex_surface3_DeleteAttachedSurface ( IDirectDrawSurface3 *  iface,
DWORD  flags,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 266 of file surface.c.

268{
269 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
271
272 TRACE("iface %p, flags %#lx, attachment %p.\n", iface, flags, attachment);
273
275 flags, attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL);
276}
static HRESULT WINAPI ddrawex_surface4_DeleteAttachedSurface(IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *attachment)
Definition: surface.c:254

◆ ddrawex_surface3_EnumAttachedSurfaces()

static HRESULT WINAPI ddrawex_surface3_EnumAttachedSurfaces ( IDirectDrawSurface3 *  iface,
void *  ctx,
LPDDENUMSURFACESCALLBACK  cb 
)
static

Definition at line 329 of file surface.c.

331{
332 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
333 struct enumsurfaces_thunk cb_ctx;
334
335 TRACE("iface %p, ctx %p, cb %p.\n", iface, ctx, cb);
336
337 cb_ctx.orig_cb = cb;
338 cb_ctx.orig_ctx = ctx;
340}
static HRESULT WINAPI enumsurfaces_thunk_cb(IDirectDrawSurface4 *surf, DDSURFACEDESC2 *desc2, void *vctx)
Definition: surface.c:315
static HRESULT WINAPI ddrawex_surface4_EnumAttachedSurfaces(IDirectDrawSurface4 *iface, void *ctx, LPDDENUMSURFACESCALLBACK2 cb)
Definition: surface.c:296
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118

◆ ddrawex_surface3_EnumOverlayZOrders()

static HRESULT WINAPI ddrawex_surface3_EnumOverlayZOrders ( IDirectDrawSurface3 *  iface,
DWORD  flags,
void *  ctx,
LPDDENUMSURFACESCALLBACK  cb 
)
static

Definition at line 355 of file surface.c.

357{
358 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
359 struct enumsurfaces_thunk cb_ctx;
360
361 TRACE("iface %p, flags %#lx, ctx %p, cb %p.\n", iface, flags, ctx, cb);
362
363 cb_ctx.orig_cb = cb;
364 cb_ctx.orig_ctx = ctx;
366 flags, &cb_ctx, enumsurfaces_thunk_cb);
367}
static HRESULT WINAPI ddrawex_surface4_EnumOverlayZOrders(IDirectDrawSurface4 *iface, DWORD flags, void *ctx, LPDDENUMSURFACESCALLBACK2 cb)
Definition: surface.c:342

◆ ddrawex_surface3_Flip()

static HRESULT WINAPI ddrawex_surface3_Flip ( IDirectDrawSurface3 *  iface,
IDirectDrawSurface3 *  dst,
DWORD  flags 
)
static

Definition at line 379 of file surface.c.

380{
381 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
383
384 TRACE("iface %p, dst %p, flags %#lx.\n", iface, dst, flags);
385
387 dst_impl ? &dst_impl->IDirectDrawSurface4_iface : NULL, flags);
388}
static HRESULT WINAPI ddrawex_surface4_Flip(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *dst, DWORD flags)
Definition: surface.c:369

◆ ddrawex_surface3_GetAttachedSurface()

static HRESULT WINAPI ddrawex_surface3_GetAttachedSurface ( IDirectDrawSurface3 *  iface,
DDSCAPS *  caps,
IDirectDrawSurface3 **  attachment 
)
static

Definition at line 412 of file surface.c.

414{
415 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
416 IDirectDrawSurface4 *surf4;
417 DDSCAPS2 caps2;
418 HRESULT hr;
419
420 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
421
422 memset(&caps2, 0, sizeof(caps2));
423 caps2.dwCaps = caps->dwCaps;
425 {
426 IDirectDrawSurface4_QueryInterface(surf4, &IID_IDirectDrawSurface3, (void **)attachment);
427 IDirectDrawSurface4_Release(surf4);
428 }
429 else
430 {
431 *attachment = NULL;
432 }
433 return hr;
434}
HRESULT hr
Definition: delayimp.cpp:582
static HRESULT WINAPI ddrawex_surface4_GetAttachedSurface(IDirectDrawSurface4 *iface, DDSCAPS2 *caps, IDirectDrawSurface4 **attachment)
Definition: surface.c:390
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwCaps
Definition: ddraw.h:734
DWORD dwCaps
Definition: ddraw.h:729

◆ ddrawex_surface3_GetBltStatus()

static HRESULT WINAPI ddrawex_surface3_GetBltStatus ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 445 of file surface.c.

446{
447 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
448
449 TRACE("iface %p, flags %#lx.\n", iface, flags);
450
452}
static HRESULT WINAPI ddrawex_surface4_GetBltStatus(IDirectDrawSurface4 *iface, DWORD flags)
Definition: surface.c:436

◆ ddrawex_surface3_GetCaps()

static HRESULT WINAPI ddrawex_surface3_GetCaps ( IDirectDrawSurface3 *  iface,
DDSCAPS *  caps 
)
static

Definition at line 463 of file surface.c.

464{
465 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
466 DDSCAPS2 caps2;
467 HRESULT hr;
468
469 TRACE("iface %p, caps %p.\n", iface, caps);
470
471 memset(&caps2, 0, sizeof(caps2));
472 memset(caps, 0, sizeof(*caps));
473 hr = IDirectDrawSurface4_GetCaps(&surface->IDirectDrawSurface4_iface, &caps2);
474 caps->dwCaps = caps2.dwCaps;
475 return hr;
476}

◆ ddrawex_surface3_GetClipper()

static HRESULT WINAPI ddrawex_surface3_GetClipper ( IDirectDrawSurface3 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 487 of file surface.c.

488{
489 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
490
491 TRACE("iface %p, clipper %p.\n", iface, clipper);
492
494}
static HRESULT WINAPI ddrawex_surface4_GetClipper(IDirectDrawSurface4 *iface, IDirectDrawClipper **clipper)
Definition: surface.c:478

◆ ddrawex_surface3_GetColorKey()

static HRESULT WINAPI ddrawex_surface3_GetColorKey ( IDirectDrawSurface3 *  iface,
DWORD  flags,
DDCOLORKEY *  color_key 
)
static

Definition at line 505 of file surface.c.

506{
507 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
508
509 TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
510
512}
static HRESULT WINAPI ddrawex_surface4_GetColorKey(IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:496

◆ ddrawex_surface3_GetDC()

static HRESULT WINAPI ddrawex_surface3_GetDC ( IDirectDrawSurface3 *  iface,
HDC *  dc 
)
static

Definition at line 530 of file surface.c.

531{
532 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
533
534 TRACE("iface %p, dc %p.\n", iface, dc);
535
537}
HDC dc
Definition: cylfrac.c:34
static HRESULT WINAPI ddrawex_surface4_GetDC(IDirectDrawSurface4 *iface, HDC *dc)
Definition: surface.c:514

◆ ddrawex_surface3_GetDDInterface()

static HRESULT WINAPI ddrawex_surface3_GetDDInterface ( IDirectDrawSurface3 *  iface,
void **  ddraw 
)
static

Definition at line 945 of file surface.c.

946{
947 FIXME("iface %p, ddraw %p stub!\n", iface, ddraw);
948
949 /* A thunk it pretty pointless for the same reason that relaying to
950 * ddraw.dll works badly. */
951 *ddraw = NULL;
952
953 return E_FAIL;
954}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_FAIL
Definition: ddrawi.h:102

◆ ddrawex_surface3_GetFlipStatus()

static HRESULT WINAPI ddrawex_surface3_GetFlipStatus ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 548 of file surface.c.

549{
550 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
551
552 TRACE("iface %p, flags %#lx.\n", iface, flags);
553
555}
static HRESULT WINAPI ddrawex_surface4_GetFlipStatus(IDirectDrawSurface4 *iface, DWORD flags)
Definition: surface.c:539

◆ ddrawex_surface3_GetOverlayPosition()

static HRESULT WINAPI ddrawex_surface3_GetOverlayPosition ( IDirectDrawSurface3 *  iface,
LONG *  x,
LONG *  y 
)
static

Definition at line 566 of file surface.c.

567{
568 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
569
570 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
571
573}
static HRESULT WINAPI ddrawex_surface4_GetOverlayPosition(IDirectDrawSurface4 *iface, LONG *x, LONG *y)
Definition: surface.c:557
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ ddrawex_surface3_GetPalette()

static HRESULT WINAPI ddrawex_surface3_GetPalette ( IDirectDrawSurface3 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 584 of file surface.c.

585{
586 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
587
588 TRACE("iface %p, palette %p.\n", iface, palette);
589
591}
static HRESULT WINAPI ddrawex_surface4_GetPalette(IDirectDrawSurface4 *iface, IDirectDrawPalette **palette)
Definition: surface.c:575
static HPALETTE palette
Definition: clipboard.c:1457

◆ ddrawex_surface3_GetPixelFormat()

static HRESULT WINAPI ddrawex_surface3_GetPixelFormat ( IDirectDrawSurface3 *  iface,
DDPIXELFORMAT *  pixel_format 
)
static

Definition at line 602 of file surface.c.

603{
604 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
605
606 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
607
609}
static HRESULT WINAPI ddrawex_surface4_GetPixelFormat(IDirectDrawSurface4 *iface, DDPIXELFORMAT *pixel_format)
Definition: surface.c:593

◆ ddrawex_surface3_GetSurfaceDesc()

static HRESULT WINAPI ddrawex_surface3_GetSurfaceDesc ( IDirectDrawSurface3 *  iface,
DDSURFACEDESC *  desc 
)
static

Definition at line 628 of file surface.c.

629{
630 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
631 DDSURFACEDESC2 ddsd2;
632 HRESULT hr;
633
634 TRACE("iface %p, desc %p.\n", iface, desc);
635
636 memset(&ddsd2, 0, sizeof(ddsd2));
637 ddsd2.dwSize = sizeof(ddsd2);
639 DDSD2_to_DDSD(&ddsd2, desc);
640
641 return hr;
642}
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out)
Definition: utils.c:1242
static HRESULT WINAPI ddrawex_surface4_GetSurfaceDesc(IDirectDrawSurface4 *iface, DDSURFACEDESC2 *desc)
Definition: surface.c:611
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
DWORD dwSize
Definition: ddraw.h:1154

◆ ddrawex_surface3_Initialize()

static HRESULT WINAPI ddrawex_surface3_Initialize ( IDirectDrawSurface3 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC *  desc 
)
static

Definition at line 664 of file surface.c.

666{
667 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
668 DDSURFACEDESC2 ddsd2;
669
670 TRACE("iface %p, ddraw %p, desc %p.\n", iface, ddraw, desc);
671
672 DDSD_to_DDSD2(desc, &ddsd2);
674}
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out)
Definition: utils.c:1198
static HRESULT WINAPI ddrawex_surface4_Initialize(IDirectDrawSurface4 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *desc)
Definition: surface.c:644

◆ ddrawex_surface3_IsLost()

static HRESULT WINAPI ddrawex_surface3_IsLost ( IDirectDrawSurface3 *  iface)
static

Definition at line 685 of file surface.c.

686{
687 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
688
689 TRACE("iface %p.\n", iface);
690
692}
static HRESULT WINAPI ddrawex_surface4_IsLost(IDirectDrawSurface4 *iface)
Definition: surface.c:676

◆ ddrawex_surface3_Lock()

static HRESULT WINAPI ddrawex_surface3_Lock ( IDirectDrawSurface3 *  iface,
RECT *  rect,
DDSURFACEDESC *  desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 713 of file surface.c.

715{
716 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
717 DDSURFACEDESC2 ddsd2;
718 HRESULT hr;
719
720 TRACE("iface %p, rect %s, desc %p, flags %#lx, h %p.\n",
721 iface, wine_dbgstr_rect(rect), desc, flags, h);
722
723 memset(&ddsd2, 0, sizeof(ddsd2));
724 ddsd2.dwSize = sizeof(ddsd2);
726 DDSD2_to_DDSD(&ddsd2, desc);
727
728 return hr;
729}
static HRESULT WINAPI ddrawex_surface4_Lock(IDirectDrawSurface4 *iface, RECT *rect, DDSURFACEDESC2 *desc, DWORD flags, HANDLE h)
Definition: surface.c:694
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723

◆ ddrawex_surface3_PageLock()

static HRESULT WINAPI ddrawex_surface3_PageLock ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 965 of file surface.c.

966{
967 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
968
969 TRACE("iface %p, flags %#lx.\n", iface, flags);
970
972}
static HRESULT WINAPI ddrawex_surface4_PageLock(IDirectDrawSurface4 *iface, DWORD flags)
Definition: surface.c:956

◆ ddrawex_surface3_PageUnlock()

static HRESULT WINAPI ddrawex_surface3_PageUnlock ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 983 of file surface.c.

984{
985 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
986
987 TRACE("iface %p, flags %#lx.\n", iface, flags);
988
990}
static HRESULT WINAPI ddrawex_surface4_PageUnlock(IDirectDrawSurface4 *iface, DWORD flags)
Definition: surface.c:974

◆ ddrawex_surface3_QueryInterface()

static HRESULT WINAPI ddrawex_surface3_QueryInterface ( IDirectDrawSurface3 *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 88 of file surface.c.

89{
90 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
91
92 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
93
95}
static HRESULT WINAPI ddrawex_surface4_QueryInterface(IDirectDrawSurface4 *iface, REFIID riid, void **out)
Definition: surface.c:45
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

◆ ddrawex_surface3_Release()

static ULONG WINAPI ddrawex_surface3_Release ( IDirectDrawSurface3 *  iface)
static

Definition at line 133 of file surface.c.

134{
135 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
136
137 TRACE("iface %p.\n", iface);
138
140}
static ULONG WINAPI ddrawex_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:116

◆ ddrawex_surface3_ReleaseDC()

static HRESULT WINAPI ddrawex_surface3_ReleaseDC ( IDirectDrawSurface3 *  iface,
HDC  dc 
)
static

Definition at line 746 of file surface.c.

747{
748 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
749
750 TRACE("iface %p, dc %p.\n", iface, dc);
751
753}
static HRESULT WINAPI ddrawex_surface4_ReleaseDC(IDirectDrawSurface4 *iface, HDC dc)
Definition: surface.c:731

◆ ddrawex_surface3_Restore()

static HRESULT WINAPI ddrawex_surface3_Restore ( IDirectDrawSurface3 *  iface)
static

Definition at line 764 of file surface.c.

765{
766 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
767
768 TRACE("iface %p.\n", iface);
769
771}
static HRESULT WINAPI ddrawex_surface4_Restore(IDirectDrawSurface4 *iface)
Definition: surface.c:755

◆ ddrawex_surface3_SetClipper()

static HRESULT WINAPI ddrawex_surface3_SetClipper ( IDirectDrawSurface3 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 782 of file surface.c.

783{
784 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
785
786 TRACE("iface %p, clipper %p.\n", iface, clipper);
787
789}
static HRESULT WINAPI ddrawex_surface4_SetClipper(IDirectDrawSurface4 *iface, IDirectDrawClipper *clipper)
Definition: surface.c:773

◆ ddrawex_surface3_SetColorKey()

static HRESULT WINAPI ddrawex_surface3_SetColorKey ( IDirectDrawSurface3 *  iface,
DWORD  flags,
DDCOLORKEY *  color_key 
)
static

Definition at line 801 of file surface.c.

803{
804 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
805
806 TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
807
809}
static HRESULT WINAPI ddrawex_surface4_SetColorKey(IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:791

◆ ddrawex_surface3_SetOverlayPosition()

static HRESULT WINAPI ddrawex_surface3_SetOverlayPosition ( IDirectDrawSurface3 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 820 of file surface.c.

821{
822 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
823
824 TRACE("iface %p, x %ld, y %ld.\n", iface, x, y);
825
827}
static HRESULT WINAPI ddrawex_surface4_SetOverlayPosition(IDirectDrawSurface4 *iface, LONG x, LONG y)
Definition: surface.c:811

◆ ddrawex_surface3_SetPalette()

static HRESULT WINAPI ddrawex_surface3_SetPalette ( IDirectDrawSurface3 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 838 of file surface.c.

839{
840 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
841
842 TRACE("iface %p, palette %p.\n", iface, palette);
843
845}
static HRESULT WINAPI ddrawex_surface4_SetPalette(IDirectDrawSurface4 *iface, IDirectDrawPalette *palette)
Definition: surface.c:829

◆ ddrawex_surface3_SetSurfaceDesc()

static HRESULT WINAPI ddrawex_surface3_SetSurfaceDesc ( IDirectDrawSurface3 *  iface,
DDSURFACEDESC *  desc,
DWORD  flags 
)
static

Definition at line 1002 of file surface.c.

1004{
1005 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
1006 DDSURFACEDESC2 ddsd;
1007
1008 TRACE("iface %p, desc %p, flags %#lx.\n", iface, desc, flags);
1009
1010 DDSD_to_DDSD2(desc, &ddsd);
1012}
static HRESULT WINAPI ddrawex_surface4_SetSurfaceDesc(IDirectDrawSurface4 *iface, DDSURFACEDESC2 *desc, DWORD flags)
Definition: surface.c:992

◆ ddrawex_surface3_Unlock()

static HRESULT WINAPI ddrawex_surface3_Unlock ( IDirectDrawSurface3 *  iface,
void *  data 
)
static

Definition at line 856 of file surface.c.

857{
858 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
859
860 TRACE("iface %p, data %p.\n", iface, data);
861
863}
static HRESULT WINAPI ddrawex_surface4_Unlock(IDirectDrawSurface4 *iface, RECT *rect)
Definition: surface.c:847
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

◆ ddrawex_surface3_UpdateOverlay()

static HRESULT WINAPI ddrawex_surface3_UpdateOverlay ( IDirectDrawSurface3 *  iface,
RECT *  src_rect,
IDirectDrawSurface3 *  dst_surface,
RECT *  dst_rect,
DWORD  flags,
DDOVERLAYFX *  fx 
)
static

Definition at line 878 of file surface.c.

880{
881 struct ddrawex_surface *src_impl = impl_from_IDirectDrawSurface3(iface);
882 struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface3(dst_surface);
883
884 TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#lx, fx %p.\n",
885 iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
886
888 dst_impl ? &dst_impl->IDirectDrawSurface4_iface : NULL, dst_rect, flags, fx);
889}
static HRESULT WINAPI ddrawex_surface4_UpdateOverlay(IDirectDrawSurface4 *iface, RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:865

◆ ddrawex_surface3_UpdateOverlayDisplay()

static HRESULT WINAPI ddrawex_surface3_UpdateOverlayDisplay ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 900 of file surface.c.

901{
902 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
903
904 TRACE("iface %p, flags %#lx.\n", iface, flags);
905
907}
static HRESULT WINAPI ddrawex_surface4_UpdateOverlayDisplay(IDirectDrawSurface4 *iface, DWORD flags)
Definition: surface.c:891

◆ ddrawex_surface3_UpdateOverlayZOrder()

static HRESULT WINAPI ddrawex_surface3_UpdateOverlayZOrder ( IDirectDrawSurface3 *  iface,
DWORD  flags,
IDirectDrawSurface3 *  reference 
)
static

Definition at line 921 of file surface.c.

923{
924 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
926
927 TRACE("iface %p, flags %#lx, reference %p.\n", iface, flags, reference);
928
930 flags, reference_impl ? &reference_impl->IDirectDrawSurface4_iface : NULL);
931}
static HRESULT WINAPI ddrawex_surface4_UpdateOverlayZOrder(IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *reference)
Definition: surface.c:909
GLint reference
Definition: glext.h:11729

◆ ddrawex_surface4_AddAttachedSurface()

static HRESULT WINAPI ddrawex_surface4_AddAttachedSurface ( IDirectDrawSurface4 *  iface,
IDirectDrawSurface4 *  attachment 
)
static

Definition at line 142 of file surface.c.

144{
145 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
147
148 TRACE("iface %p, attachment %p.\n", iface, attachment);
149
150 return IDirectDrawSurface4_AddAttachedSurface(surface->parent, attachment_impl->parent);
151}
static struct ddraw_surface * impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
Definition: surface.c:5966
IDirectDrawSurface4 * parent

Referenced by ddrawex_surface3_AddAttachedSurface().

◆ ddrawex_surface4_AddOverlayDirtyRect()

static HRESULT WINAPI ddrawex_surface4_AddOverlayDirtyRect ( IDirectDrawSurface4 *  iface,
RECT *  rect 
)
static

Definition at line 165 of file surface.c.

166{
167 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
168
169 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
170
171 return IDirectDrawSurface4_AddOverlayDirtyRect(surface->parent, rect);
172}

Referenced by ddrawex_surface3_AddOverlayDirtyRect().

◆ ddrawex_surface4_AddRef()

static ULONG WINAPI ddrawex_surface4_AddRef ( IDirectDrawSurface4 *  iface)
static

Definition at line 97 of file surface.c.

98{
99 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
100 ULONG refcount = InterlockedIncrement(&surface->ref);
101
102 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
103
104 return refcount;
105}
#define InterlockedIncrement
Definition: armddk.h:53
uint32_t ULONG
Definition: typedefs.h:59

Referenced by ddrawex_surface3_AddRef().

◆ ddrawex_surface4_Blt()

static HRESULT WINAPI ddrawex_surface4_Blt ( IDirectDrawSurface4 *  iface,
RECT *  dst_rect,
IDirectDrawSurface4 *  src_surface,
RECT *  src_rect,
DWORD  flags,
DDBLTFX *  fx 
)
static

Definition at line 183 of file surface.c.

185{
188
189 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#lx, fx %p.\n",
190 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
191
192 return IDirectDrawSurface4_Blt(dst->parent, dst_rect, src ? src->parent : NULL, src_rect, flags, fx);
193}

Referenced by ddrawex_surface3_Blt().

◆ ddrawex_surface4_BltBatch()

static HRESULT WINAPI ddrawex_surface4_BltBatch ( IDirectDrawSurface4 *  iface,
DDBLTBATCH *  batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 208 of file surface.c.

210{
211 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
212
213 TRACE("iface %p, batch %p, count %lu, flags %#lx.\n", iface, batch, count, flags);
214
215 return IDirectDrawSurface4_BltBatch(surface->parent, batch, count, flags);
216}

Referenced by ddrawex_surface3_BltBatch().

◆ ddrawex_surface4_BltFast()

static HRESULT WINAPI ddrawex_surface4_BltFast ( IDirectDrawSurface4 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface4 *  src_surface,
RECT *  src_rect,
DWORD  flags 
)
static

Definition at line 228 of file surface.c.

230{
233
234 TRACE("iface %p, dst_x %lu, dst_y %lu, src_surface %p, src_rect %s, flags %#lx.\n",
235 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
236
237 return IDirectDrawSurface4_BltFast(dst->parent, dst_x, dst_y,
238 src ? src->parent : NULL, src_rect, flags);
239}

Referenced by ddrawex_surface3_BltFast().

◆ ddrawex_surface4_ChangeUniquenessValue()

static HRESULT WINAPI ddrawex_surface4_ChangeUniquenessValue ( IDirectDrawSurface4 *  iface)
static

Definition at line 1069 of file surface.c.

1070{
1071 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
1072
1073 TRACE("iface %p.\n", iface);
1074
1075 return IDirectDrawSurface4_ChangeUniquenessValue(surface->parent);
1076}

◆ ddrawex_surface4_DeleteAttachedSurface()

static HRESULT WINAPI ddrawex_surface4_DeleteAttachedSurface ( IDirectDrawSurface4 *  iface,
DWORD  flags,
IDirectDrawSurface4 *  attachment 
)
static

Definition at line 254 of file surface.c.

256{
257 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
259
260 TRACE("iface %p, flags %#lx, attachment %p.\n", iface, flags, attachment);
261
262 return IDirectDrawSurface4_DeleteAttachedSurface(surface->parent,
263 flags, attachment_impl ? attachment_impl->parent : NULL);
264}

Referenced by ddrawex_surface3_DeleteAttachedSurface().

◆ ddrawex_surface4_EnumAttachedSurfaces()

static HRESULT WINAPI ddrawex_surface4_EnumAttachedSurfaces ( IDirectDrawSurface4 *  iface,
void *  ctx,
LPDDENUMSURFACESCALLBACK2  cb 
)
static

Definition at line 296 of file surface.c.

298{
299 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
300 struct enumsurfaces_wrap cb_ctx;
301
302 TRACE("iface %p, ctx %p, cb %p.\n", iface, ctx, cb);
303
304 cb_ctx.orig_cb = cb;
305 cb_ctx.orig_ctx = ctx;
306 return IDirectDrawSurface4_EnumAttachedSurfaces(surface->parent, &cb_ctx, enumsurfaces_wrap_cb);
307}
static HRESULT WINAPI enumsurfaces_wrap_cb(IDirectDrawSurface4 *surf, DDSURFACEDESC2 *desc, void *vctx)
Definition: surface.c:285

Referenced by ddrawex_surface3_EnumAttachedSurfaces().

◆ ddrawex_surface4_EnumOverlayZOrders()

static HRESULT WINAPI ddrawex_surface4_EnumOverlayZOrders ( IDirectDrawSurface4 *  iface,
DWORD  flags,
void *  ctx,
LPDDENUMSURFACESCALLBACK2  cb 
)
static

Definition at line 342 of file surface.c.

344{
345 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
346 struct enumsurfaces_wrap cb_ctx;
347
348 TRACE("iface %p, flags %#lx, ctx %p, cb %p.\n", iface, flags, ctx, cb);
349
350 cb_ctx.orig_cb = cb;
351 cb_ctx.orig_ctx = ctx;
352 return IDirectDrawSurface4_EnumOverlayZOrders(surface->parent, flags, &cb_ctx, enumsurfaces_wrap_cb);
353}

Referenced by ddrawex_surface3_EnumOverlayZOrders().

◆ ddrawex_surface4_Flip()

static HRESULT WINAPI ddrawex_surface4_Flip ( IDirectDrawSurface4 *  iface,
IDirectDrawSurface4 *  dst,
DWORD  flags 
)
static

Definition at line 369 of file surface.c.

370{
371 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
373
374 TRACE("iface %p, dst %p, flags %#lx.\n", iface, dst, flags);
375
376 return IDirectDrawSurface4_Flip(surface->parent, dst_impl ? dst_impl->parent : NULL, flags);
377}

Referenced by ddrawex_surface3_Flip().

◆ ddrawex_surface4_FreePrivateData()

static HRESULT WINAPI ddrawex_surface4_FreePrivateData ( IDirectDrawSurface4 *  iface,
REFGUID  tag 
)
static

Definition at line 1046 of file surface.c.

1047{
1048 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
1049
1050 TRACE("iface %p, tag %s.\n", iface, debugstr_guid(tag));
1051
1052 /* To completely avoid this we'd have to clone the private data API in
1053 * ddrawex. */
1055 FIXME("Application uses ddrawex's private GUID.\n");
1056
1057 return IDirectDrawSurface4_FreePrivateData(surface->parent, tag);
1058}
#define IID_DDrawexPriv
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
Definition: ecma_167.h:138

◆ ddrawex_surface4_GetAttachedSurface()

static HRESULT WINAPI ddrawex_surface4_GetAttachedSurface ( IDirectDrawSurface4 *  iface,
DDSCAPS2 *  caps,
IDirectDrawSurface4 **  attachment 
)
static

Definition at line 390 of file surface.c.

392{
393 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
394 IDirectDrawSurface4 *inner = NULL;
395 HRESULT hr;
396
397 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
398
399 if (SUCCEEDED(hr = IDirectDrawSurface4_GetAttachedSurface(surface->parent, caps, &inner)))
400 {
401 *attachment = dds_get_outer(inner);
402 IDirectDrawSurface4_AddRef(*attachment);
403 IDirectDrawSurface4_Release(inner);
404 }
405 else
406 {
407 *attachment = NULL;
408 }
409 return hr;
410}
IDirectDrawSurface4 * dds_get_outer(IDirectDrawSurface4 *inner)
Definition: surface.c:1195

Referenced by ddrawex_surface3_GetAttachedSurface().

◆ ddrawex_surface4_GetBltStatus()

static HRESULT WINAPI ddrawex_surface4_GetBltStatus ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 436 of file surface.c.

437{
438 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
439
440 TRACE("iface %p, flags %#lx.\n", iface, flags);
441
442 return IDirectDrawSurface4_GetBltStatus(surface->parent, flags);
443}

Referenced by ddrawex_surface3_GetBltStatus().

◆ ddrawex_surface4_GetCaps()

static HRESULT WINAPI ddrawex_surface4_GetCaps ( IDirectDrawSurface4 *  iface,
DDSCAPS2 *  caps 
)
static

Definition at line 454 of file surface.c.

455{
456 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
457
458 TRACE("iface %p, caps %p.\n", iface, caps);
459
460 return IDirectDrawSurface4_GetCaps(surface->parent, caps);
461}

◆ ddrawex_surface4_GetClipper()

static HRESULT WINAPI ddrawex_surface4_GetClipper ( IDirectDrawSurface4 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 478 of file surface.c.

479{
480 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
481
482 TRACE("iface %p, clipper %p.\n", iface, clipper);
483
484 return IDirectDrawSurface4_GetClipper(surface->parent, clipper);
485}

Referenced by ddrawex_surface3_GetClipper().

◆ ddrawex_surface4_GetColorKey()

static HRESULT WINAPI ddrawex_surface4_GetColorKey ( IDirectDrawSurface4 *  iface,
DWORD  flags,
DDCOLORKEY *  color_key 
)
static

Definition at line 496 of file surface.c.

497{
498 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
499
500 TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
501
502 return IDirectDrawSurface4_GetColorKey(surface->parent, flags, color_key);
503}

Referenced by ddrawex_surface3_GetColorKey().

◆ ddrawex_surface4_GetDC()

static HRESULT WINAPI ddrawex_surface4_GetDC ( IDirectDrawSurface4 *  iface,
HDC *  dc 
)
static

Definition at line 514 of file surface.c.

515{
516 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
517
518 TRACE("iface %p, dc %p.\n", iface, dc);
519
520 if (surface->permanent_dc)
521 {
522 TRACE("Returning stored dc %p.\n", surface->hdc);
523 *dc = surface->hdc;
524 return DD_OK;
525 }
526
527 return IDirectDrawSurface4_GetDC(surface->parent, dc);
528}
#define DD_OK
Definition: ddraw.h:188

Referenced by ddrawex_surface3_GetDC().

◆ ddrawex_surface4_GetDDInterface()

static HRESULT WINAPI ddrawex_surface4_GetDDInterface ( IDirectDrawSurface4 *  iface,
void **  ddraw 
)
static

Definition at line 933 of file surface.c.

934{
935 FIXME("iface %p, ddraw %p stub!\n", iface, ddraw);
936
937 /* This has to be implemented in ddrawex, ddraw's interface can't be used
938 * because it is pretty hard to tell which version of the ddraw interface
939 * is returned. */
940 *ddraw = NULL;
941
942 return E_FAIL;
943}

◆ ddrawex_surface4_GetFlipStatus()

static HRESULT WINAPI ddrawex_surface4_GetFlipStatus ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 539 of file surface.c.

540{
541 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
542
543 TRACE("iface %p, flags %#lx.\n", iface, flags);
544
545 return IDirectDrawSurface4_GetFlipStatus(surface->parent, flags);
546}

Referenced by ddrawex_surface3_GetFlipStatus().

◆ ddrawex_surface4_GetOverlayPosition()

static HRESULT WINAPI ddrawex_surface4_GetOverlayPosition ( IDirectDrawSurface4 *  iface,
LONG *  x,
LONG *  y 
)
static

Definition at line 557 of file surface.c.

558{
559 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
560
561 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
562
563 return IDirectDrawSurface4_GetOverlayPosition(surface->parent, x, y);
564}

Referenced by ddrawex_surface3_GetOverlayPosition().

◆ ddrawex_surface4_GetPalette()

static HRESULT WINAPI ddrawex_surface4_GetPalette ( IDirectDrawSurface4 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 575 of file surface.c.

576{
577 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
578
579 TRACE("iface %p, palette %p.\n", iface, palette);
580
581 return IDirectDrawSurface4_GetPalette(surface->parent, palette);
582}

Referenced by ddrawex_surface3_GetPalette().

◆ ddrawex_surface4_GetPixelFormat()

static HRESULT WINAPI ddrawex_surface4_GetPixelFormat ( IDirectDrawSurface4 *  iface,
DDPIXELFORMAT *  pixel_format 
)
static

Definition at line 593 of file surface.c.

594{
595 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
596
597 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
598
599 return IDirectDrawSurface4_GetPixelFormat(surface->parent, pixel_format);
600}

Referenced by ddrawex_surface3_GetPixelFormat().

◆ ddrawex_surface4_GetPrivateData()

static HRESULT WINAPI ddrawex_surface4_GetPrivateData ( IDirectDrawSurface4 *  iface,
REFGUID  tag,
void *  data,
DWORD *  data_size 
)
static

Definition at line 1030 of file surface.c.

1032{
1033 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
1034
1035 TRACE("iface %p, tag %s, data %p, data_size %p.\n",
1036 iface, debugstr_guid(tag), data, data_size);
1037
1038 /* To completely avoid this we'd have to clone the private data API in
1039 * ddrawex. */
1041 FIXME("Application uses ddrawex's private GUID.\n");
1042
1043 return IDirectDrawSurface4_GetPrivateData(surface->parent, tag, data, data_size);
1044}

◆ ddrawex_surface4_GetSurfaceDesc()

static HRESULT WINAPI ddrawex_surface4_GetSurfaceDesc ( IDirectDrawSurface4 *  iface,
DDSURFACEDESC2 *  desc 
)
static

Definition at line 611 of file surface.c.

612{
613 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
614 HRESULT hr;
615
616 TRACE("iface %p, desc %p.\n", iface, desc);
617
618 if (SUCCEEDED(hr = IDirectDrawSurface4_GetSurfaceDesc(surface->parent, desc))
619 && surface->permanent_dc)
620 {
621 desc->ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
622 desc->ddsCaps.dwCaps &= ~DDSCAPS_OWNDC;
623 }
624
625 return hr;
626}
#define DDSCAPS_VIDEOMEMORY
Definition: ddraw.h:266

Referenced by ddrawex_surface3_GetSurfaceDesc().

◆ ddrawex_surface4_GetUniquenessValue()

static HRESULT WINAPI ddrawex_surface4_GetUniquenessValue ( IDirectDrawSurface4 *  iface,
DWORD *  value 
)
static

Definition at line 1060 of file surface.c.

1061{
1062 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
1063
1064 TRACE("iface %p, value %p.\n", iface, value);
1065
1066 return IDirectDrawSurface4_GetUniquenessValue(surface->parent, value);
1067}
Definition: pdh_main.c:64

◆ ddrawex_surface4_Initialize()

static HRESULT WINAPI ddrawex_surface4_Initialize ( IDirectDrawSurface4 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC2 *  desc 
)
static

Definition at line 644 of file surface.c.

646{
647 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
648 IDirectDraw4 *outer_DD4;
649 IDirectDraw4 *inner_DD4;
650 IDirectDraw *inner_DD;
651 HRESULT hr;
652
653 TRACE("iface %p, ddraw %p, desc %p.\n", iface, ddraw, desc);
654
655 IDirectDraw_QueryInterface(ddraw, &IID_IDirectDraw4, (void **)&outer_DD4);
656 inner_DD4 = dd_get_inner(outer_DD4);
657 IDirectDraw4_Release(outer_DD4);
658 IDirectDraw4_QueryInterface(inner_DD4, &IID_IDirectDraw4, (void **)&inner_DD);
659 hr = IDirectDrawSurface4_Initialize(surface->parent, inner_DD, desc);
660 IDirectDraw_Release(inner_DD);
661 return hr;
662}
IDirectDraw4 * dd_get_inner(IDirectDraw4 *outer)
Definition: ddraw.c:1458

Referenced by ddrawex_surface3_Initialize().

◆ ddrawex_surface4_IsLost()

static HRESULT WINAPI ddrawex_surface4_IsLost ( IDirectDrawSurface4 *  iface)
static

Definition at line 676 of file surface.c.

677{
678 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
679
680 TRACE("iface %p.\n", iface);
681
682 return IDirectDrawSurface4_IsLost(surface->parent);
683}

Referenced by ddrawex_surface3_IsLost().

◆ ddrawex_surface4_Lock()

static HRESULT WINAPI ddrawex_surface4_Lock ( IDirectDrawSurface4 *  iface,
RECT *  rect,
DDSURFACEDESC2 *  desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 694 of file surface.c.

696{
697 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
698 HRESULT hr;
699
700 TRACE("iface %p, rect %s, desc %p, flags %#lx, h %p.\n",
701 iface, wine_dbgstr_rect(rect), desc, flags, h);
702
703 if (SUCCEEDED(hr = IDirectDrawSurface4_Lock(surface->parent, rect, desc, flags, h))
704 && surface->permanent_dc)
705 {
706 desc->ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
707 desc->ddsCaps.dwCaps &= ~DDSCAPS_OWNDC;
708 }
709
710 return hr;
711}

Referenced by ddrawex_surface3_Lock().

◆ ddrawex_surface4_PageLock()

static HRESULT WINAPI ddrawex_surface4_PageLock ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 956 of file surface.c.

957{
958 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
959
960 TRACE("iface %p, flags %#lx.\n", iface, flags);
961
962 return IDirectDrawSurface4_PageLock(surface->parent, flags);
963}

Referenced by ddrawex_surface3_PageLock().

◆ ddrawex_surface4_PageUnlock()

static HRESULT WINAPI ddrawex_surface4_PageUnlock ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 974 of file surface.c.

975{
976 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
977
978 TRACE("iface %p, flags %#lx.\n", iface, flags);
979
980 return IDirectDrawSurface4_PageUnlock(surface->parent, flags);
981}

Referenced by ddrawex_surface3_PageUnlock().

◆ ddrawex_surface4_QueryInterface()

static HRESULT WINAPI ddrawex_surface4_QueryInterface ( IDirectDrawSurface4 *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 45 of file surface.c.

46{
47 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
48
49 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
50
51 if (!riid)
52 {
53 *out = NULL;
55 }
56
57 if (IsEqualGUID(riid, &IID_IDirectDrawSurface4)
59 {
60 *out = &surface->IDirectDrawSurface4_iface;
61 }
62 else if (IsEqualGUID(riid, &IID_IDirectDrawSurface3)
63 || IsEqualGUID(riid, &IID_IDirectDrawSurface2)
64 || IsEqualGUID(riid, &IID_IDirectDrawSurface))
65 {
66 *out = &surface->IDirectDrawSurface3_iface;
67 }
68 else
69 {
70 if (IsEqualGUID(riid, &IID_IDirectDrawGammaControl))
71 FIXME("Implement IDirectDrawGammaControl in ddrawex.\n");
72 else if (IsEqualGUID(riid, &IID_IDirect3DHALDevice)
73 || IsEqualGUID(riid, &IID_IDirect3DRGBDevice))
74 FIXME("Test IDirect3DDevice in ddrawex.\n");
75 else if (IsEqualGUID(&IID_IDirect3DTexture2, riid)
76 || IsEqualGUID( &IID_IDirect3DTexture, riid))
77 FIXME("Implement IDirect3DTexture in ddrawex.\n");
78
79 *out = NULL;
80 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
81 return E_NOINTERFACE;
82 }
83
84 IUnknown_AddRef((IUnknown *)*out);
85 return S_OK;
86}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:81
IDirectDrawSurface3 IDirectDrawSurface3_iface
#define E_NOINTERFACE
Definition: winerror.h:3479

Referenced by ddrawex_surface3_QueryInterface().

◆ ddrawex_surface4_Release()

static ULONG WINAPI ddrawex_surface4_Release ( IDirectDrawSurface4 *  iface)
static

Definition at line 116 of file surface.c.

117{
118 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
119 ULONG refcount = InterlockedDecrement(&surface->ref);
120
121 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
122
123 if (!refcount)
124 {
125 IDirectDrawSurface4_FreePrivateData(surface->parent, &IID_DDrawexPriv);
126 IDirectDrawSurface4_Release(surface->parent);
127 free(surface);
128 }
129
130 return refcount;
131}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5

Referenced by ddrawex_surface3_Release().

◆ ddrawex_surface4_ReleaseDC()

static HRESULT WINAPI ddrawex_surface4_ReleaseDC ( IDirectDrawSurface4 *  iface,
HDC  dc 
)
static

Definition at line 731 of file surface.c.

732{
733 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
734
735 TRACE("iface %p, dc %p.\n", iface, dc);
736
737 if (surface->permanent_dc)
738 {
739 TRACE("Surface has a permanent DC, not doing anything.\n");
740 return DD_OK;
741 }
742
743 return IDirectDrawSurface4_ReleaseDC(surface->parent, dc);
744}

Referenced by ddrawex_surface3_ReleaseDC().

◆ ddrawex_surface4_Restore()

static HRESULT WINAPI ddrawex_surface4_Restore ( IDirectDrawSurface4 *  iface)
static

Definition at line 755 of file surface.c.

756{
757 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
758
759 TRACE("iface %p.\n", iface);
760
761 return IDirectDrawSurface4_Restore(surface->parent);
762}

Referenced by ddrawex_surface3_Restore().

◆ ddrawex_surface4_SetClipper()

static HRESULT WINAPI ddrawex_surface4_SetClipper ( IDirectDrawSurface4 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 773 of file surface.c.

774{
775 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
776
777 TRACE("iface %p, clipper %p.\n", iface, clipper);
778
779 return IDirectDrawSurface4_SetClipper(surface->parent, clipper);
780}

Referenced by ddrawex_surface3_SetClipper().

◆ ddrawex_surface4_SetColorKey()

static HRESULT WINAPI ddrawex_surface4_SetColorKey ( IDirectDrawSurface4 *  iface,
DWORD  flags,
DDCOLORKEY *  color_key 
)
static

Definition at line 791 of file surface.c.

793{
794 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
795
796 TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
797
798 return IDirectDrawSurface4_SetColorKey(surface->parent, flags, color_key);
799}

Referenced by ddrawex_surface3_SetColorKey().

◆ ddrawex_surface4_SetOverlayPosition()

static HRESULT WINAPI ddrawex_surface4_SetOverlayPosition ( IDirectDrawSurface4 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 811 of file surface.c.

812{
813 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
814
815 TRACE("iface %p, x %ld, y %ld.\n", iface, x, y);
816
817 return IDirectDrawSurface4_SetOverlayPosition(surface->parent, x, y);
818}

Referenced by ddrawex_surface3_SetOverlayPosition().

◆ ddrawex_surface4_SetPalette()

static HRESULT WINAPI ddrawex_surface4_SetPalette ( IDirectDrawSurface4 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 829 of file surface.c.

830{
831 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
832
833 TRACE("iface %p, palette %p.\n", iface, palette);
834
835 return IDirectDrawSurface4_SetPalette(surface->parent, palette);
836}

Referenced by ddrawex_surface3_SetPalette().

◆ ddrawex_surface4_SetPrivateData()

static HRESULT WINAPI ddrawex_surface4_SetPrivateData ( IDirectDrawSurface4 *  iface,
REFGUID  tag,
void *  data,
DWORD  data_size,
DWORD  flags 
)
static

Definition at line 1014 of file surface.c.

1016{
1017 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
1018
1019 TRACE("iface %p, tag %s, data %p, data_size %lu, flags %#lx.\n",
1020 iface, debugstr_guid(tag), data, data_size, flags);
1021
1022 /* To completely avoid this we'd have to clone the private data API in
1023 * ddrawex. */
1025 FIXME("Application uses ddrawex's private GUID.\n");
1026
1027 return IDirectDrawSurface4_SetPrivateData(surface->parent, tag, data, data_size, flags);
1028}

◆ ddrawex_surface4_SetSurfaceDesc()

static HRESULT WINAPI ddrawex_surface4_SetSurfaceDesc ( IDirectDrawSurface4 *  iface,
DDSURFACEDESC2 *  desc,
DWORD  flags 
)
static

Definition at line 992 of file surface.c.

994{
995 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
996
997 TRACE("iface %p, desc %p, flags %#lx.\n", iface, desc, flags);
998
999 return IDirectDrawSurface4_SetSurfaceDesc(surface->parent, desc, flags);
1000}

Referenced by ddrawex_surface3_SetSurfaceDesc().

◆ ddrawex_surface4_Unlock()

static HRESULT WINAPI ddrawex_surface4_Unlock ( IDirectDrawSurface4 *  iface,
RECT *  rect 
)
static

Definition at line 847 of file surface.c.

848{
849 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
850
851 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
852
853 return IDirectDrawSurface4_Unlock(surface->parent, rect);
854}

Referenced by ddrawex_surface3_Unlock().

◆ ddrawex_surface4_UpdateOverlay()

static HRESULT WINAPI ddrawex_surface4_UpdateOverlay ( IDirectDrawSurface4 *  iface,
RECT *  src_rect,
IDirectDrawSurface4 *  dst_surface,
RECT *  dst_rect,
DWORD  flags,
DDOVERLAYFX *  fx 
)
static

Definition at line 865 of file surface.c.

867{
868 struct ddrawex_surface *src_impl = impl_from_IDirectDrawSurface4(iface);
869 struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface4(dst_surface);
870
871 TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#lx, fx %p.\n",
872 iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
873
874 return IDirectDrawSurface4_UpdateOverlay(src_impl->parent, src_rect,
875 dst_impl ? dst_impl->parent : NULL, dst_rect, flags, fx);
876}

Referenced by ddrawex_surface3_UpdateOverlay().

◆ ddrawex_surface4_UpdateOverlayDisplay()

static HRESULT WINAPI ddrawex_surface4_UpdateOverlayDisplay ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 891 of file surface.c.

892{
893 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
894
895 TRACE("iface %p, flags %#lx.\n", iface, flags);
896
897 return IDirectDrawSurface4_UpdateOverlayDisplay(surface->parent, flags);
898}

Referenced by ddrawex_surface3_UpdateOverlayDisplay().

◆ ddrawex_surface4_UpdateOverlayZOrder()

static HRESULT WINAPI ddrawex_surface4_UpdateOverlayZOrder ( IDirectDrawSurface4 *  iface,
DWORD  flags,
IDirectDrawSurface4 *  reference 
)
static

Definition at line 909 of file surface.c.

911{
912 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
914
915 TRACE("iface %p, flags %#lx, reference %p.\n", iface, flags, reference);
916
917 return IDirectDrawSurface4_UpdateOverlayZOrder(surface->parent,
918 flags, reference_impl ? reference_impl->parent : NULL);
919}

Referenced by ddrawex_surface3_UpdateOverlayZOrder().

◆ dds_get_outer()

IDirectDrawSurface4 * dds_get_outer ( IDirectDrawSurface4 *  inner)

Definition at line 1195 of file surface.c.

1196{
1197 IDirectDrawSurface4 *outer = NULL;
1198 DWORD size = sizeof(outer);
1199 HRESULT hr;
1200 if(!inner) return NULL;
1201
1202 hr = IDirectDrawSurface4_GetPrivateData(inner,
1204 &outer,
1205 &size);
1206 if(FAILED(hr) || outer == NULL)
1207 {
1208 struct ddrawex_surface *impl;
1209
1210 TRACE("Creating new ddrawex surface wrapper for surface %p\n", inner);
1211 impl = calloc(1, sizeof(*impl));
1212 impl->ref = 1;
1215 IDirectDrawSurface4_AddRef(inner);
1216 impl->parent = inner;
1217
1219
1220 hr = IDirectDrawSurface4_SetPrivateData(inner,
1222 &outer,
1223 sizeof(outer),
1224 0 /* Flags */);
1225 if(FAILED(hr))
1226 {
1227 ERR("IDirectDrawSurface4_SetPrivateData failed\n");
1228 }
1229 }
1230
1231 return outer;
1232}
#define ERR(fmt,...)
Definition: precomp.h:57
static const IDirectDrawSurface3Vtbl ddrawex_surface3_vtbl
Definition: surface.c:1078
static const IDirectDrawSurface4Vtbl ddrawex_surface4_vtbl
Definition: surface.c:1122
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define FAILED(hr)
Definition: intsafe.h:51
static IUnknown * outer
Definition: compobj.c:82
#define calloc
Definition: rosglue.h:14

Referenced by ddrawex3_GetSurfaceFromDC(), ddrawex4_CreateSurface(), ddrawex4_GetGDISurface(), ddrawex_surface4_GetAttachedSurface(), enum_surfaces_wrapper(), and enumsurfaces_wrap_cb().

◆ enumsurfaces_thunk_cb()

static HRESULT WINAPI enumsurfaces_thunk_cb ( IDirectDrawSurface4 *  surf,
DDSURFACEDESC2 *  desc2,
void *  vctx 
)
static

Definition at line 315 of file surface.c.

317{
319 struct enumsurfaces_thunk *ctx = vctx;
321
322 TRACE("Thunking back to IDirectDrawSurface3\n");
323 IDirectDrawSurface3_AddRef(&surface->IDirectDrawSurface3_iface);
324 IDirectDrawSurface3_Release(surf);
325 DDSD2_to_DDSD(desc2, &desc);
326 return ctx->orig_cb((IDirectDrawSurface *)&surface->IDirectDrawSurface3_iface, &desc, ctx->orig_ctx);
327}

Referenced by ddrawex_surface3_EnumAttachedSurfaces(), and ddrawex_surface3_EnumOverlayZOrders().

◆ enumsurfaces_wrap_cb()

static HRESULT WINAPI enumsurfaces_wrap_cb ( IDirectDrawSurface4 *  surf,
DDSURFACEDESC2 *  desc,
void *  vctx 
)
static

Definition at line 285 of file surface.c.

286{
287 struct enumsurfaces_wrap *ctx = vctx;
288 IDirectDrawSurface4 *outer = dds_get_outer(surf);
289
290 TRACE("Returning outer surface %p for inner surface %p\n", outer, surf);
291 IDirectDrawSurface4_AddRef(outer);
292 IDirectDrawSurface4_Release(surf);
293 return ctx->orig_cb(outer, desc, vctx);
294}

Referenced by ddrawex_surface4_EnumAttachedSurfaces(), and ddrawex_surface4_EnumOverlayZOrders().

◆ impl_from_IDirectDrawSurface3()

static struct ddrawex_surface * impl_from_IDirectDrawSurface3 ( IDirectDrawSurface3 *  iface)
static

Definition at line 33 of file surface.c.

34{
35 return CONTAINING_RECORD(iface, struct ddrawex_surface, IDirectDrawSurface3_iface);
36}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ impl_from_IDirectDrawSurface4()

static struct ddrawex_surface * impl_from_IDirectDrawSurface4 ( IDirectDrawSurface4 *  iface)
static

Definition at line 40 of file surface.c.

41{
42 return CONTAINING_RECORD(iface, struct ddrawex_surface, IDirectDrawSurface4_iface);
43}

◆ prepare_permanent_dc()

HRESULT prepare_permanent_dc ( IDirectDrawSurface4 *  iface)

Definition at line 1234 of file surface.c.

1235{
1237 HRESULT hr;
1238
1239 surface->permanent_dc = TRUE;
1240 if (FAILED(hr = IDirectDrawSurface4_GetDC(surface->parent, &surface->hdc)))
1241 return hr;
1242 return IDirectDrawSurface4_ReleaseDC(surface->parent, surface->hdc);
1243}
#define TRUE
Definition: types.h:120

Referenced by ddrawex4_CreateSurface().

◆ unsafe_impl_from_IDirectDrawSurface3()

static struct ddrawex_surface * unsafe_impl_from_IDirectDrawSurface3 ( IDirectDrawSurface3 *  iface)
static

Definition at line 1171 of file surface.c.

1172{
1173 if (!iface || iface->lpVtbl != &ddrawex_surface3_vtbl)
1174 return NULL;
1175 return impl_from_IDirectDrawSurface3(iface);
1176}

◆ unsafe_impl_from_IDirectDrawSurface4()

struct ddrawex_surface * unsafe_impl_from_IDirectDrawSurface4 ( IDirectDrawSurface4 *  iface)

Definition at line 1178 of file surface.c.

1179{
1180 if (!iface || iface->lpVtbl != &ddrawex_surface4_vtbl)
1181 return NULL;
1182 return impl_from_IDirectDrawSurface4(iface);
1183}

Referenced by d3d3_CreateDevice(), d3d_device3_SetRenderTarget(), ddraw4_DuplicateSurface(), and ddrawex4_DuplicateSurface().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ddrawex  )

Variable Documentation

◆ ddrawex_surface3_vtbl

const IDirectDrawSurface3Vtbl ddrawex_surface3_vtbl
static

Definition at line 1078 of file surface.c.

Referenced by dds_get_outer(), and unsafe_impl_from_IDirectDrawSurface3().

◆ ddrawex_surface4_vtbl

const IDirectDrawSurface4Vtbl ddrawex_surface4_vtbl
static

Definition at line 1122 of file surface.c.

Referenced by dds_get_outer(), and unsafe_impl_from_IDirectDrawSurface4().