ReactOS  0.4.15-dev-5487-ge7bbbf0
surface.c File Reference
#include "config.h"
#include "wine/port.h"
#include "ddraw_private.h"
Include dependency graph for surface.c:

Go to the source code of this file.

Classes

struct  callback_info2
 
struct  callback_info
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddraw)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface2 (IDirectDrawSurface2 *iface)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface3 (IDirectDrawSurface3 *iface)
 
static struct ddraw_surfaceimpl_from_IDirectDrawGammaControl (IDirectDrawGammaControl *iface)
 
HRESULT ddraw_surface_update_frontbuffer (struct ddraw_surface *surface, const RECT *rect, BOOL read, unsigned int swap_interval)
 
static HRESULT WINAPI ddraw_surface7_QueryInterface (IDirectDrawSurface7 *iface, REFIID riid, void **obj)
 
static HRESULT WINAPI ddraw_surface4_QueryInterface (IDirectDrawSurface4 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface3_QueryInterface (IDirectDrawSurface3 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface2_QueryInterface (IDirectDrawSurface2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface1_QueryInterface (IDirectDrawSurface *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_gamma_control_QueryInterface (IDirectDrawGammaControl *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture2_QueryInterface (IDirect3DTexture2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture1_QueryInterface (IDirect3DTexture *iface, REFIID riid, void **object)
 
static void ddraw_surface_add_iface (struct ddraw_surface *surface)
 
static ULONG WINAPI ddraw_surface7_AddRef (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_AddRef (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_AddRef (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_AddRef (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_AddRef (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_AddRef (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_AddRef (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_AddRef (IDirect3DTexture *iface)
 
static HRESULT ddraw_surface_set_palette (struct ddraw_surface *surface, IDirectDrawPalette *palette)
 
static void ddraw_surface_cleanup (struct ddraw_surface *surface)
 
static ULONG ddraw_surface_release_iface (struct ddraw_surface *This)
 
static ULONG WINAPI ddraw_surface7_Release (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_Release (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_Release (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_Release (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_Release (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_Release (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_Release (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_Release (IDirect3DTexture *iface)
 
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
 
static HRESULT WINAPI ddraw_surface4_GetAttachedSurface (IDirectDrawSurface4 *iface, DDSCAPS2 *caps, IDirectDrawSurface4 **attachment)
 
static HRESULT WINAPI ddraw_surface3_GetAttachedSurface (IDirectDrawSurface3 *iface, DDSCAPS *caps, IDirectDrawSurface3 **attachment)
 
static HRESULT WINAPI ddraw_surface2_GetAttachedSurface (IDirectDrawSurface2 *iface, DDSCAPS *caps, IDirectDrawSurface2 **attachment)
 
static HRESULT WINAPI ddraw_surface1_GetAttachedSurface (IDirectDrawSurface *iface, DDSCAPS *caps, IDirectDrawSurface **attachment)
 
static HRESULT surface_lock (struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
 
static BOOL surface_validate_lock_desc (struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
 
static HRESULT WINAPI ddraw_surface7_Lock (IDirectDrawSurface7 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface4_Lock (IDirectDrawSurface4 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface3_Lock (IDirectDrawSurface3 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface2_Lock (IDirectDrawSurface2 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface1_Lock (IDirectDrawSurface *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock (IDirectDrawSurface7 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Unlock (IDirectDrawSurface4 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Unlock (IDirectDrawSurface3 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock (IDirectDrawSurface2 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock (IDirectDrawSurface *iface, void *data)
 
static unsigned int ddraw_swap_interval_from_flags (DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Flip (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Flip (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip (IDirectDrawSurface *iface, IDirectDrawSurface *src, DWORD flags)
 
static HRESULT ddraw_surface_blt (struct ddraw_surface *dst_surface, const RECT *dst_rect, struct ddraw_surface *src_surface, const RECT *src_rect, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT ddraw_surface_blt_clipped (struct ddraw_surface *dst_surface, const RECT *dst_rect_in, struct ddraw_surface *src_surface, const RECT *src_rect_in, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt (IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Blt (IDirectDrawSurface4 *iface, RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Blt (IDirectDrawSurface3 *iface, RECT *dst_rect, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt (IDirectDrawSurface2 *iface, RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt (IDirectDrawSurface *iface, RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT ddraw_surface_attach_surface (struct ddraw_surface *This, struct ddraw_surface *Surf)
 
static HRESULT WINAPI ddraw_surface7_AddAttachedSurface (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_AddAttachedSurface (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_AddAttachedSurface (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_AddAttachedSurface (IDirectDrawSurface *iface, IDirectDrawSurface *attachment)
 
static HRESULT ddraw_surface_delete_attached_surface (struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
 
static HRESULT WINAPI ddraw_surface7_DeleteAttachedSurface (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_DeleteAttachedSurface (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_DeleteAttachedSurface (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *attachment)
 
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect (IDirectDrawSurface7 *iface, RECT *Rect)
 
static HRESULT WINAPI ddraw_surface4_AddOverlayDirtyRect (IDirectDrawSurface4 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface3_AddOverlayDirtyRect (IDirectDrawSurface3 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect (IDirectDrawSurface2 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect (IDirectDrawSurface *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface7_GetDC (IDirectDrawSurface7 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface4_GetDC (IDirectDrawSurface4 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface3_GetDC (IDirectDrawSurface3 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface2_GetDC (IDirectDrawSurface2 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface1_GetDC (IDirectDrawSurface *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface7_ReleaseDC (IDirectDrawSurface7 *iface, HDC hdc)
 
static HRESULT WINAPI ddraw_surface4_ReleaseDC (IDirectDrawSurface4 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface3_ReleaseDC (IDirectDrawSurface3 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface2_ReleaseDC (IDirectDrawSurface2 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface1_ReleaseDC (IDirectDrawSurface *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface7_GetCaps (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
 
static HRESULT WINAPI ddraw_surface4_GetCaps (IDirectDrawSurface4 *iface, DDSCAPS2 *caps)
 
static HRESULT WINAPI ddraw_surface3_GetCaps (IDirectDrawSurface3 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface2_GetCaps (IDirectDrawSurface2 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface1_GetCaps (IDirectDrawSurface *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface7_SetPriority (IDirectDrawSurface7 *iface, DWORD priority)
 
static HRESULT WINAPI ddraw_surface7_GetPriority (IDirectDrawSurface7 *iface, DWORD *priority)
 
static HRESULT WINAPI ddraw_surface7_SetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface4_SetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface4_GetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface7_FreePrivateData (IDirectDrawSurface7 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface4_FreePrivateData (IDirectDrawSurface4 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface7_PageLock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageLock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageLock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageLock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_PageUnlock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageUnlock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageUnlock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageUnlock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch (IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltBatch (IDirectDrawSurface4 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltBatch (IDirectDrawSurface3 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch (IDirectDrawSurface2 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch (IDirectDrawSurface *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces (IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT CALLBACK EnumCallback2 (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT CALLBACK EnumCallback (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT WINAPI ddraw_surface4_EnumAttachedSurfaces (IDirectDrawSurface4 *iface, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumAttachedSurfaces (IDirectDrawSurface3 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces (IDirectDrawSurface2 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces (IDirectDrawSurface *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders (IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT WINAPI ddraw_surface4_EnumOverlayZOrders (IDirectDrawSurface4 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumOverlayZOrders (IDirectDrawSurface3 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders (IDirectDrawSurface2 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders (IDirectDrawSurface *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_GetBltStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetBltStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetBltStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetBltStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetBltStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetColorKey (IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
 
static HRESULT WINAPI ddraw_surface4_GetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_GetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_GetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_GetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_GetFlipStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetFlipStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetFlipStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetFlipStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetFlipStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition (IDirectDrawSurface7 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface4_GetOverlayPosition (IDirectDrawSurface4 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface3_GetOverlayPosition (IDirectDrawSurface3 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface2_GetOverlayPosition (IDirectDrawSurface2 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface1_GetOverlayPosition (IDirectDrawSurface *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface7_GetPixelFormat (IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
 
static HRESULT WINAPI ddraw_surface4_GetPixelFormat (IDirectDrawSurface4 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface3_GetPixelFormat (IDirectDrawSurface3 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface2_GetPixelFormat (IDirectDrawSurface2 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface1_GetPixelFormat (IDirectDrawSurface *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface7_GetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface4_GetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc (IDirectDrawSurface2 *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc (IDirectDrawSurface *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface7_Initialize (IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface4_Initialize (IDirectDrawSurface4 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface3_Initialize (IDirectDrawSurface3 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_Initialize (IDirectDrawSurface2 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface1_Initialize (IDirectDrawSurface *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI d3d_texture1_Initialize (IDirect3DTexture *iface, IDirect3DDevice *device, IDirectDrawSurface *surface)
 
static HRESULT WINAPI ddraw_surface7_IsLost (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_IsLost (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_IsLost (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_IsLost (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_IsLost (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_Restore (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_Restore (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_Restore (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_Restore (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_Restore (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition (IDirectDrawSurface7 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface4_SetOverlayPosition (IDirectDrawSurface4 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface3_SetOverlayPosition (IDirectDrawSurface3 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface2_SetOverlayPosition (IDirectDrawSurface2 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface1_SetOverlayPosition (IDirectDrawSurface *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlay (IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlay (IDirectDrawSurface4 *iface, RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlay (IDirectDrawSurface3 *iface, RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlay (IDirectDrawSurface2 *iface, RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlay (IDirectDrawSurface *iface, RECT *src_rect, IDirectDrawSurface *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayDisplay (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayDisplay (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayZOrder (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *reference)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayZOrder (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *reference)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *reference)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *reference)
 
static HRESULT WINAPI ddraw_surface7_GetDDInterface (IDirectDrawSurface7 *iface, void **DD)
 
static HRESULT WINAPI ddraw_surface4_GetDDInterface (IDirectDrawSurface4 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface3_GetDDInterface (IDirectDrawSurface3 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface2_GetDDInterface (IDirectDrawSurface2 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface7_ChangeUniquenessValue (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface7_GetUniquenessValue (IDirectDrawSurface7 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface4_GetUniquenessValue (IDirectDrawSurface4 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface7_SetLOD (IDirectDrawSurface7 *iface, DWORD MaxLOD)
 
static HRESULT WINAPI ddraw_surface7_GetLOD (IDirectDrawSurface7 *iface, DWORD *MaxLOD)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast (IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltFast (IDirectDrawSurface4 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltFast (IDirectDrawSurface3 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast (IDirectDrawSurface2 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast (IDirectDrawSurface *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
 
static HRESULT WINAPI ddraw_surface4_GetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface3_GetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface2_GetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface1_GetClipper (IDirectDrawSurface *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface7_SetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
 
static HRESULT WINAPI ddraw_surface4_SetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface3_SetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface2_SetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface1_SetClipper (IDirectDrawSurface *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_SetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface4_GetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface3_GetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface2_GetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface1_GetPalette (IDirectDrawSurface *iface, IDirectDrawPalette **palette)
 
static HRESULT ddraw_surface_set_color_key (struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetColorKey (IDirectDrawSurface7 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface4_SetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_SetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_SetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_SetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface4_SetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface3_SetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface2_SetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface1_SetPalette (IDirectDrawSurface *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI d3d_texture2_PaletteChanged (IDirect3DTexture2 *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_PaletteChanged (IDirect3DTexture *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_Unload (IDirect3DTexture *iface)
 
static HRESULT WINAPI d3d_texture2_GetHandle (IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
 
static HRESULT WINAPI d3d_texture1_GetHandle (IDirect3DTexture *iface, IDirect3DDevice *device, D3DTEXTUREHANDLE *handle)
 
static struct ddraw_surfaceget_sub_mimaplevel (struct ddraw_surface *surface)
 
static BOOL compare_format (DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
 
static HRESULT WINAPI d3d_texture2_Load (IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
 
static HRESULT WINAPI d3d_texture1_Load (IDirect3DTexture *iface, IDirect3DTexture *src_texture)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface7 (IDirectDrawSurface7 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface4 (IDirectDrawSurface4 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface (IDirectDrawSurface *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture2 (IDirect3DTexture2 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture (IDirect3DTexture *iface)
 
static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed (void *parent)
 
static void STDMETHODCALLTYPE ddraw_texture_wined3d_object_destroyed (void *parent)
 
static HRESULT CDECL ddraw_reset_enum_callback (struct wined3d_resource *resource)
 
HRESULT ddraw_surface_create (struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version)
 
void ddraw_surface_init (struct ddraw_surface *surface, struct ddraw *ddraw, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, const struct wined3d_parent_ops **parent_ops)
 
static void STDMETHODCALLTYPE view_wined3d_object_destroyed (void *parent)
 
struct wined3d_rendertarget_viewddraw_surface_get_rendertarget_view (struct ddraw_surface *surface)
 

Variables

static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl
 
static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl
 
static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl
 
static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl
 
static struct IDirectDrawSurfaceVtbl ddraw_surface1_vtbl
 
static const struct IDirectDrawGammaControlVtbl ddraw_gamma_control_vtbl
 
static const struct IDirect3DTexture2Vtbl d3d_texture2_vtbl
 
static const struct IDirect3DTextureVtbl d3d_texture1_vtbl
 
static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_view_wined3d_parent_ops
 

Function Documentation

◆ compare_format()

static BOOL compare_format ( DDPIXELFORMAT format1,
DDPIXELFORMAT format2 
)
static

Definition at line 5221 of file surface.c.

5222 {
5223  if ((format1->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)) !=
5224  (format2->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)))
5225  return FALSE;
5226 
5227  if (format1->dwFlags & (DDPF_RGB|DDPF_YUV))
5228  {
5229  if (!(format1->dwFlags & DDPF_ALPHA))
5230  {
5231  /* The RGB and YUV bits are stored in the same fields */
5232  if (format1->u1.dwRGBBitCount != format2->u1.dwRGBBitCount)
5233  return FALSE;
5234 
5235  if (format1->u2.dwRBitMask != format2->u2.dwRBitMask)
5236  return FALSE;
5237 
5238  if (format1->u3.dwGBitMask != format2->u3.dwGBitMask)
5239  return FALSE;
5240 
5241  if (format1->u4.dwBBitMask != format2->u4.dwBBitMask)
5242  return FALSE;
5243  }
5244 
5245  if (format1->dwFlags & (DDPF_ALPHAPIXELS | DDPF_ALPHA))
5246  {
5247  if (format1->u5.dwRGBAlphaBitMask != format2->u5.dwRGBAlphaBitMask)
5248  return FALSE;
5249  }
5250  }
5251 
5252  if (format1->dwFlags & DDPF_FOURCC)
5253  {
5254  if (format1->dwFourCC != format2->dwFourCC)
5255  return FALSE;
5256  }
5257 
5258  return TRUE;
5259 }
DWORD dwFlags
Definition: ddraw.h:1071
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DDPF_ALPHA
Definition: ddraw.h:502
DWORD dwGBitMask
Definition: ddraw.h:1094
#define DDPF_FOURCC
Definition: ddraw.h:503
DWORD dwRGBBitCount
Definition: ddraw.h:1075
#define DDPF_RGB
Definition: ddraw.h:507
DWORD dwRBitMask
Definition: ddraw.h:1085
#define DDPF_ALPHAPIXELS
Definition: ddraw.h:501
DWORD dwFourCC
Definition: ddraw.h:1072
DWORD dwBBitMask
Definition: ddraw.h:1106
#define DDPF_YUV
Definition: ddraw.h:510
DWORD dwRGBAlphaBitMask
Definition: ddraw.h:1113

Referenced by d3d_texture2_Load().

◆ d3d_texture1_AddRef()

static ULONG WINAPI d3d_texture1_AddRef ( IDirect3DTexture *  iface)
static

Definition at line 451 of file surface.c.

452 {
453  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
454 
455  TRACE("iface %p.\n", iface);
456 
457  return IUnknown_AddRef(surface->texture_outer);
458 }
IUnknown * texture_outer
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_GetHandle()

static HRESULT WINAPI d3d_texture1_GetHandle ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5186 of file surface.c.

5188 {
5189  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5190  struct d3d_device *device_impl = unsafe_impl_from_IDirect3DDevice(device);
5191 
5192  TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5193 
5195  device_impl ? &device_impl->IDirect3DDevice2_iface : NULL, handle);
5196 }
IDirect3DTexture2 IDirect3DTexture2_iface
struct d3d_device * unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface) DECLSPEC_HIDDEN
Definition: device.c:6871
static HRESULT WINAPI d3d_texture2_GetHandle(IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
Definition: surface.c:5155
Definition: devices.h:37
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)
#define NULL
Definition: types.h:112
IDirect3DDevice2 IDirect3DDevice2_iface

◆ d3d_texture1_Initialize()

static HRESULT WINAPI d3d_texture1_Initialize ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
IDirectDrawSurface *  surface 
)
static

Definition at line 3623 of file surface.c.

3625 {
3626  TRACE("iface %p, device %p, surface %p.\n", iface, device, surface);
3627 
3628  return DDERR_UNSUPPORTED; /* Unchecked */
3629 }
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
Definition: devices.h:37
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d_texture1_Load()

static HRESULT WINAPI d3d_texture1_Load ( IDirect3DTexture *  iface,
IDirect3DTexture *  src_texture 
)
static

Definition at line 5373 of file surface.c.

5374 {
5375  struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture(iface);
5376  struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture(src_texture);
5377 
5378  TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5379 
5380  return d3d_texture2_Load(&dst_surface->IDirect3DTexture2_iface,
5381  src_surface ? &src_surface->IDirect3DTexture2_iface : NULL);
5382 }
IDirect3DTexture2 IDirect3DTexture2_iface
static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
Definition: surface.c:5278
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *iface)
Definition: surface.c:5757
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)
#define NULL
Definition: types.h:112

◆ d3d_texture1_PaletteChanged()

static HRESULT WINAPI d3d_texture1_PaletteChanged ( IDirect3DTexture *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5116 of file surface.c.

5117 {
5118  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5119 
5120  TRACE("iface %p, start %u, count %u.\n", iface, start, count);
5121 
5123 }
IDirect3DTexture2 IDirect3DTexture2_iface
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI d3d_texture2_PaletteChanged(IDirect3DTexture2 *iface, DWORD start, DWORD count)
Definition: surface.c:5109
#define TRACE(s)
Definition: solgame.cpp:4
GLuint start
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_QueryInterface()

static HRESULT WINAPI d3d_texture1_QueryInterface ( IDirect3DTexture *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 317 of file surface.c.

318 {
319  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
320 
321  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
322 
324 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:144
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_Release()

static ULONG WINAPI d3d_texture1_Release ( IDirect3DTexture *  iface)
static

Definition at line 711 of file surface.c.

712 {
713  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
714 
715  TRACE("iface %p.\n", iface);
716 
717  return IUnknown_Release(surface->texture_outer);
718 }
IUnknown * texture_outer
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_Unload()

static HRESULT WINAPI d3d_texture1_Unload ( IDirect3DTexture *  iface)
static

Definition at line 5135 of file surface.c.

5136 {
5137  WARN("iface %p. Not implemented.\n", iface);
5138 
5139  return DDERR_UNSUPPORTED;
5140 }
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
#define WARN(fmt,...)
Definition: debug.h:112

◆ d3d_texture2_AddRef()

static ULONG WINAPI d3d_texture2_AddRef ( IDirect3DTexture2 *  iface)
static

Definition at line 442 of file surface.c.

443 {
444  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
445 
446  TRACE("iface %p.\n", iface);
447 
448  return IUnknown_AddRef(surface->texture_outer);
449 }
IUnknown * texture_outer
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d_texture2_GetHandle()

static HRESULT WINAPI d3d_texture2_GetHandle ( IDirect3DTexture2 *  iface,
IDirect3DDevice2 *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5155 of file surface.c.

5157 {
5158  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
5159  struct d3d_device *device_impl = unsafe_impl_from_IDirect3DDevice2(device);
5160 
5161  TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5162 
5164 
5165  if (!surface->Handle)
5166  {
5167  DWORD h = ddraw_allocate_handle(&device_impl->handle_table, surface, DDRAW_HANDLE_SURFACE);
5168  if (h == DDRAW_INVALID_HANDLE)
5169  {
5170  ERR("Failed to allocate a texture handle.\n");
5172  return DDERR_OUTOFMEMORY;
5173  }
5174 
5175  surface->Handle = h + 1;
5176  }
5177 
5178  TRACE("Returning handle %08x.\n", surface->Handle);
5179  *handle = surface->Handle;
5180 
5182 
5183  return D3D_OK;
5184 }
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
Definition: devices.h:37
struct d3d_device * unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface) DECLSPEC_HIDDEN
Definition: device.c:6864
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddraw_handle_type type) DECLSPEC_HIDDEN
Definition: main.c:113
#define DDRAW_INVALID_HANDLE
unsigned long DWORD
Definition: ntddk_ex.h:95
struct ddraw_handle_table handle_table
#define ERR(fmt,...)
Definition: debug.h:110
#define D3D_OK
Definition: d3d.h:106
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373

Referenced by d3d_texture1_GetHandle().

◆ d3d_texture2_Load()

static HRESULT WINAPI d3d_texture2_Load ( IDirect3DTexture2 *  iface,
IDirect3DTexture2 *  src_texture 
)
static

Definition at line 5278 of file surface.c.

5279 {
5280  struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
5281  struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
5282  RECT src_rect, dst_rect;
5283  HRESULT hr;
5284 
5285  TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5286 
5287  if (src_surface == dst_surface)
5288  {
5289  TRACE("copying surface %p to surface %p, why?\n", src_surface, dst_surface);
5290  return D3D_OK;
5291  }
5292 
5294 
5295  for (;;)
5296  {
5297  DDSURFACEDESC *src_desc = (DDSURFACEDESC *)&src_surface->surface_desc;
5298 
5299  TRACE("Copying surface %p to surface %p.\n", src_surface, dst_surface);
5300 
5301  if (compare_format(&src_surface->surface_desc.u4.ddpfPixelFormat,
5302  &dst_surface->surface_desc.u4.ddpfPixelFormat))
5303  {
5304  struct ddraw_palette *dst_pal, *src_pal;
5305 
5306  /* Get the palettes */
5307  dst_pal = dst_surface->palette;
5308  src_pal = src_surface->palette;
5309 
5310  if (src_pal)
5311  {
5312  PALETTEENTRY palent[256];
5313 
5314  if (!dst_pal)
5315  {
5317  return DDERR_NOPALETTEATTACHED;
5318  }
5319  IDirectDrawPalette_GetEntries(&src_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5320  IDirectDrawPalette_SetEntries(&dst_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5321  }
5322 
5323  if (src_desc->dwFlags & DDSD_CKSRCBLT)
5324  {
5325  IDirectDrawSurface7_SetColorKey(&dst_surface->IDirectDrawSurface7_iface,
5326  DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
5327  }
5328  }
5329  else
5330  {
5331  if (src_desc->dwFlags & DDSD_CKSRCBLT)
5332  return E_FAIL;
5333  }
5334 
5335  /* Suppress the ALLOCONLOAD flag */
5337 
5338  SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
5339  SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth, dst_surface->surface_desc.dwHeight);
5340 
5341  hr = wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, &dst_rect,
5342  src_surface->wined3d_texture, src_surface->sub_resource_idx, &src_rect,
5344  if (FAILED(hr))
5345  {
5346  ERR("Failed to blit surface, hr %#x.\n", hr);
5348  return hr;
5349  }
5350 
5351  if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5352  src_surface = get_sub_mimaplevel(src_surface);
5353  else
5354  src_surface = NULL;
5355 
5356  if (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5357  dst_surface = get_sub_mimaplevel(dst_surface);
5358  else
5359  dst_surface = NULL;
5360 
5361  if (src_surface && !dst_surface)
5362  return DDERR_NOTFOUND;
5363 
5364  if (!src_surface || !dst_surface)
5365  break;
5366  }
5367 
5369 
5370  return hr;
5371 }
#define DDCKEY_SRCBLT
Definition: ddraw.h:478
static BOOL compare_format(DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
Definition: surface.c:5221
HRESULT hr
Definition: shlfolder.c:183
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDSD_CKSRCBLT
Definition: ddraw.h:220
struct wined3d_texture * wined3d_texture
#define E_FAIL
Definition: ddrawi.h:102
DWORD dwWidth
Definition: ddraw.h:1155
static struct ddraw_surface * get_sub_mimaplevel(struct ddraw_surface *surface)
Definition: surface.c:5206
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1185
DWORD dwCaps
Definition: ddraw.h:732
#define DDSCAPS_ALLOCONLOAD
Definition: ddraw.h:274
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
Definition: surface.c:5750
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define DDERR_NOTFOUND
Definition: ddraw.h:97
DDSURFACEDESC2 surface_desc
#define DDSCAPS_MIPMAP
Definition: ddraw.h:272
LONG HRESULT
Definition: typedefs.h:79
unsigned int sub_resource_idx
IDirectDrawPalette IDirectDrawPalette_iface
DWORD dwHeight
Definition: ddraw.h:1154
#define ERR(fmt,...)
Definition: debug.h:110
#define DDERR_NOPALETTEATTACHED
Definition: ddraw.h:146
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define D3D_OK
Definition: d3d.h:106
HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: texture.c:3262
#define NULL
Definition: types.h:112
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
struct ddraw_palette * palette

Referenced by d3d_texture1_Load().

◆ d3d_texture2_PaletteChanged()

static HRESULT WINAPI d3d_texture2_PaletteChanged ( IDirect3DTexture2 *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5109 of file surface.c.

5110 {
5111  FIXME("iface %p, start %u, count %u stub!\n", iface, start, count);
5112 
5113  return D3D_OK;
5114 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:111
#define D3D_OK
Definition: d3d.h:106
GLuint start
Definition: gl.h:1545

Referenced by d3d_texture1_PaletteChanged().

◆ d3d_texture2_QueryInterface()

static HRESULT WINAPI d3d_texture2_QueryInterface ( IDirect3DTexture2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 308 of file surface.c.

309 {
310  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
311 
312  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
313 
315 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:144
#define debugstr_guid
Definition: kernel32.h:35
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ d3d_texture2_Release()

static ULONG WINAPI d3d_texture2_Release ( IDirect3DTexture2 *  iface)
static

Definition at line 702 of file surface.c.

703 {
704  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
705 
706  TRACE("iface %p.\n", iface);
707 
708  return IUnknown_Release(surface->texture_outer);
709 }
IUnknown * texture_outer
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4

◆ ddraw_gamma_control_AddRef()

static ULONG WINAPI ddraw_gamma_control_AddRef ( IDirectDrawGammaControl *  iface)
static

Definition at line 427 of file surface.c.

428 {
430  ULONG refcount = InterlockedIncrement(&This->gamma_count);
431 
432  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
433 
434  if (refcount == 1)
435  {
437  }
438 
439  return refcount;
440 }
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:326
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_gamma_control_GetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 5025 of file surface.c.

5027 {
5028  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5029 
5030  TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5031 
5032  if (!gamma_ramp)
5033  {
5034  WARN("Invalid gamma_ramp passed.\n");
5035  return DDERR_INVALIDPARAMS;
5036  }
5037 
5040  {
5041  /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5042  wined3d_device_get_gamma_ramp(surface->ddraw->wined3d_device, 0, (struct wined3d_gamma_ramp *)gamma_ramp);
5043  }
5044  else
5045  {
5046  ERR("Not implemented for non-primary surfaces.\n");
5047  }
5049 
5050  return DD_OK;
5051 }
void CDECL wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
Definition: device.c:5069
#define WARN(fmt,...)
Definition: debug.h:112
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DD_OK
Definition: ddraw.h:186
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
GLbitfield flags
Definition: glext.h:7161
#define ERR(fmt,...)
Definition: debug.h:110
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
struct ddraw * ddraw
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_gamma_control_QueryInterface()

static HRESULT WINAPI ddraw_gamma_control_QueryInterface ( IDirectDrawGammaControl *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 298 of file surface.c.

300 {
301  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
302 
303  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
304 
306 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:144
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34

◆ ddraw_gamma_control_Release()

static ULONG WINAPI ddraw_gamma_control_Release ( IDirectDrawGammaControl *  iface)
static

Definition at line 687 of file surface.c.

688 {
690  ULONG refcount = InterlockedDecrement(&This->gamma_count);
691 
692  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
693 
694  if (refcount == 0)
695  {
697  }
698 
699  return refcount;
700 }
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:544
#define InterlockedDecrement
Definition: armddk.h:52
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_gamma_control_SetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 5067 of file surface.c.

5069 {
5070  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5071 
5072  TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5073 
5074  if (!gamma_ramp)
5075  {
5076  WARN("Invalid gamma_ramp passed.\n");
5077  return DDERR_INVALIDPARAMS;
5078  }
5079 
5082  {
5083  /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5084  wined3d_device_set_gamma_ramp(surface->ddraw->wined3d_device,
5085  0, flags, (struct wined3d_gamma_ramp *)gamma_ramp);
5086  }
5087  else
5088  {
5089  ERR("Not implemented for non-primary surfaces.\n");
5090  }
5092 
5093  return DD_OK;
5094 }
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp)
Definition: device.c:5057
#define WARN(fmt,...)
Definition: debug.h:112
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DD_OK
Definition: ddraw.h:186
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
GLbitfield flags
Definition: glext.h:7161
#define ERR(fmt,...)
Definition: debug.h:110
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
struct ddraw * ddraw
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_reset_enum_callback()

static HRESULT CDECL ddraw_reset_enum_callback ( struct wined3d_resource resource)
static

Definition at line 5815 of file surface.c.

5816 {
5817  return DD_OK;
5818 }
#define DD_OK
Definition: ddraw.h:186

Referenced by ddraw_surface_create().

◆ ddraw_surface1_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface1_AddAttachedSurface ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  attachment 
)
static

Definition at line 2018 of file surface.c.

2019 {
2020  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2022  HRESULT hr;
2023 
2024  TRACE("iface %p, attachment %p.\n", iface, attachment);
2025 
2027  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
2028  return hr;
2029 
2030  attachment_impl->attached_iface = (IUnknown *)attachment;
2031  IUnknown_AddRef(attachment_impl->attached_iface);
2033  return hr;
2034 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:627
GLenum attachment
Definition: glext.h:6295
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1943
#define NULL
Definition: types.h:112

◆ ddraw_surface1_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect ( IDirectDrawSurface *  iface,
RECT rect 
)
static

Definition at line 2215 of file surface.c.

2216 {
2217  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2218 
2219  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2220 
2222 }
& rect
Definition: startmenu.cpp:1413
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2181
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_AddRef()

static ULONG WINAPI ddraw_surface1_AddRef ( IDirectDrawSurface *  iface)
static

Definition at line 412 of file surface.c.

413 {
415  ULONG refcount = InterlockedIncrement(&This->ref1);
416 
417  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
418 
419  if (refcount == 1)
420  {
422  }
423 
424  return refcount;
425 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:326
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface1_GetAttachedSurface(), and EnumCallback().

◆ ddraw_surface1_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt ( IDirectDrawSurface *  iface,
RECT dst_rect,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1823 of file surface.c.

1825 {
1827  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
1828 
1829  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1830  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1831 
1832  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1833  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1834 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
#define NULL
Definition: types.h:112
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1603

◆ ddraw_surface1_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch ( IDirectDrawSurface *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2836 of file surface.c.

2837 {
2838  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2839 
2840  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2841 
2842  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2843 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2801
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast ( IDirectDrawSurface *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4377 of file surface.c.

4379 {
4380  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface(iface);
4381  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
4382 
4383  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4384  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4385 
4386  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4387  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4388 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4273
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface1_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  attachment 
)
static

Definition at line 2158 of file surface.c.

2160 {
2161  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2163 
2164  TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2165 
2166  return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2167 }
GLenum attachment
Definition: glext.h:6295
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2051
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface1_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces ( IDirectDrawSurface *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2990 of file surface.c.

2992 {
2993  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2994  struct callback_info info;
2995 
2996  TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2997 
2998  info.callback = callback;
2999  info.context = context;
3000 
3002  &info, EnumCallback);
3003 }
Definition: http.c:7251
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces(IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2859
IDirectDrawSurface7 IDirectDrawSurface7_iface
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2932

◆ ddraw_surface1_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders ( IDirectDrawSurface *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3072 of file surface.c.

3074 {
3075  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3076  struct callback_info info;
3077 
3078  TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3079 
3080  info.callback = callback;
3081  info.context = context;
3082 
3084  flags, &info, EnumCallback);
3085 }
Definition: http.c:7251
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders(IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:3019
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2932

◆ ddraw_surface1_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  src,
DWORD  flags 
)
static

Definition at line 1424 of file surface.c.

1426 {
1427  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1429 
1430  TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1431 
1433  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1434 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
Definition: surface.c:1256
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface1_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface1_GetAttachedSurface ( IDirectDrawSurface *  iface,
DDSCAPS caps,
IDirectDrawSurface **  attachment 
)
static

Definition at line 920 of file surface.c.

922 {
923  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
924  struct ddraw_surface *attachment_impl;
925  IDirectDrawSurface7 *attachment7;
926  DDSCAPS2 caps2;
927  HRESULT hr;
928 
929  TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
930 
931  caps2.dwCaps = caps->dwCaps;
932  caps2.dwCaps2 = 0;
933  caps2.dwCaps3 = 0;
934  caps2.u1.dwCaps4 = 0;
935 
937  &caps2, &attachment7);
938  if (FAILED(hr))
939  {
940  *attachment = NULL;
941  return hr;
942  }
943  attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
944  *attachment = &attachment_impl->IDirectDrawSurface_iface;
946  ddraw_surface7_Release(attachment7);
947 
948  return hr;
949 }
GLenum attachment
Definition: glext.h:6295
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps4
Definition: ddraw.h:737
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
DWORD dwCaps
Definition: ddraw.h:732
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
Definition: surface.c:747
DWORD dwCaps3
Definition: ddraw.h:734
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112
static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface)
Definition: surface.c:612
static ULONG WINAPI ddraw_surface1_AddRef(IDirectDrawSurface *iface)
Definition: surface.c:412

◆ ddraw_surface1_GetBltStatus()

static HRESULT WINAPI ddraw_surface1_GetBltStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3138 of file surface.c.

3139 {
3140  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3141 
3142  TRACE("iface %p, flags %#x.\n", iface, flags);
3143 
3145 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3096
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetCaps()

static HRESULT WINAPI ddraw_surface1_GetCaps ( IDirectDrawSurface *  iface,
DDSCAPS caps 
)
static

Definition at line 2465 of file surface.c.

2466 {
2467  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2468  DDSCAPS2 caps2;
2469  HRESULT hr;
2470 
2471  TRACE("iface %p, caps %p.\n", iface, caps);
2472 
2474  if (FAILED(hr)) return hr;
2475 
2476  caps->dwCaps = caps2.dwCaps;
2477  return hr;
2478 }
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps
Definition: ddraw.h:727
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetCaps(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
Definition: surface.c:2412

◆ ddraw_surface1_GetClipper()

static HRESULT WINAPI ddraw_surface1_GetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4455 of file surface.c.

4456 {
4457  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4458 
4459  TRACE("iface %p, clipper %p.\n", iface, clipper);
4460 
4462 }
static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
Definition: surface.c:4405
struct ddraw_clipper * clipper
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetColorKey()

static HRESULT WINAPI ddraw_surface1_GetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3247 of file surface.c.

3248 {
3249  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3250 
3251  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3252 
3254 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetColorKey(IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
Definition: surface.c:3161

◆ ddraw_surface1_GetDC()

static HRESULT WINAPI ddraw_surface1_GetDC ( IDirectDrawSurface *  iface,
HDC dc 
)
static

Definition at line 2316 of file surface.c.

2317 {
2318  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2319 
2320  TRACE("iface %p, dc %p.\n", iface, dc);
2321 
2323 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
Definition: surface.c:2237
IDirectDrawSurface7 IDirectDrawSurface7_iface
static const WCHAR dc[]

◆ ddraw_surface1_GetFlipStatus()

static HRESULT WINAPI ddraw_surface1_GetFlipStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3309 of file surface.c.

3310 {
3311  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3312 
3313  TRACE("iface %p, flags %#x.\n", iface, flags);
3314 
3316 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3265
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_GetOverlayPosition ( IDirectDrawSurface *  iface,
LONG x,
LONG y 
)
static

Definition at line 3372 of file surface.c.

3373 {
3374  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3375 
3376  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3377 
3379 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *iface, LONG *x, LONG *y)
Definition: surface.c:3330

◆ ddraw_surface1_GetPalette()

static HRESULT WINAPI ddraw_surface1_GetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4795 of file surface.c.

4796 {
4797  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4798 
4799  TRACE("iface %p, palette %p.\n", iface, palette);
4800 
4802 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
Definition: surface.c:4736
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetPixelFormat()

static HRESULT WINAPI ddraw_surface1_GetPixelFormat ( IDirectDrawSurface *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3439 of file surface.c.

3440 {
3441  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3442 
3443  TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3444 
3446 }
static HRESULT WINAPI ddraw_surface7_GetPixelFormat(IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
Definition: surface.c:3395
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc ( IDirectDrawSurface *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3531 of file surface.c.

3532 {
3533  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3534 
3535  TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3536 
3538 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc(IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
Definition: surface.c:3495
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface3 IDirectDrawSurface3_iface

◆ ddraw_surface1_Initialize()

static HRESULT WINAPI ddraw_surface1_Initialize ( IDirectDrawSurface *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3598 of file surface.c.

3600 {
3601  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3602  DDSURFACEDESC2 surface_desc2;
3603 
3604  TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3605 
3606  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3608  ddraw, surface_desc ? &surface_desc2 : NULL);
3609 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
static HRESULT WINAPI ddraw_surface7_Initialize(IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
Definition: surface.c:3553
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface1_IsLost()

static HRESULT WINAPI ddraw_surface1_IsLost ( IDirectDrawSurface *  iface)
static

Definition at line 3680 of file surface.c.

3681 {
3682  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3683 
3684  TRACE("iface %p.\n", iface);
3685 
3687 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface)
Definition: surface.c:3641
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_Lock()

static HRESULT WINAPI ddraw_surface1_Lock ( IDirectDrawSurface *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1149 of file surface.c.

1151 {
1152  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1153  unsigned int surface_desc_size;
1154  DDSURFACEDESC2 surface_desc2;
1155  HRESULT hr;
1156 
1157  TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1159 
1160  if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1161  return DDERR_INVALIDPARAMS;
1162 
1163  surface_desc2.dwSize = surface_desc->dwSize;
1164  surface_desc2.dwFlags = 0;
1165  hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1166  DDSD2_to_DDSD(&surface_desc2, surface_desc);
1167  surface_desc->dwSize = surface_desc2.dwSize;
1168  return hr;
1169 }
DWORD dwFlags
Definition: ddraw.h:1153
HRESULT hr
Definition: shlfolder.c:183
& rect
Definition: startmenu.cpp:1413
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
static HRESULT surface_lock(struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
Definition: surface.c:967
LONG HRESULT
Definition: typedefs.h:79
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
DWORD dwSize
Definition: ddraw.h:1152
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
Definition: utils.c:1262
static BOOL surface_validate_lock_desc(struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
Definition: surface.c:1048
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_surface1_QueryInterface()

static HRESULT WINAPI ddraw_surface1_QueryInterface ( IDirectDrawSurface *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 289 of file surface.c.

290 {
291  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
292 
293  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
294 
296 }
REFIID riid
Definition: precomp.h:44
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:144
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_Release()

static ULONG WINAPI ddraw_surface1_Release ( IDirectDrawSurface *  iface)
static

Definition at line 672 of file surface.c.

673 {
675  ULONG refcount = InterlockedDecrement(&This->ref1);
676 
677  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
678 
679  if (refcount == 0)
680  {
682  }
683 
684  return refcount;
685 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:544
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_surface1_ReleaseDC()

static HRESULT WINAPI ddraw_surface1_ReleaseDC ( IDirectDrawSurface *  iface,
HDC  dc 
)
static

Definition at line 2390 of file surface.c.

2391 {
2392  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2393 
2394  TRACE("iface %p, dc %p.\n", iface, dc);
2395 
2397 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC hdc)
Definition: surface.c:2337
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static const WCHAR dc[]

◆ ddraw_surface1_Restore()

static HRESULT WINAPI ddraw_surface1_Restore ( IDirectDrawSurface *  iface)
static

Definition at line 3772 of file surface.c.

3773 {
3774  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3775 
3776  TRACE("iface %p.\n", iface);
3777 
3779 }
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
Definition: surface.c:3699
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_SetClipper()

static HRESULT WINAPI ddraw_surface1_SetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4551 of file surface.c.

4552 {
4553  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4554 
4555  TRACE("iface %p, clipper %p.\n", iface, clipper);
4556 
4558 }
static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
Definition: surface.c:4476
struct ddraw_clipper * clipper
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_SetColorKey()

static HRESULT WINAPI ddraw_surface1_SetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4925 of file surface.c.

4926 {
4927  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4928 
4929  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4930 
4931  return ddraw_surface_set_color_key(surface, flags, color_key);
4932 }
static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:4804
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface1_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_SetOverlayPosition ( IDirectDrawSurface *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3835 of file surface.c.

3836 {
3837  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3838 
3839  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3840 
3842 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *iface, LONG x, LONG y)
Definition: surface.c:3793

◆ ddraw_surface1_SetPalette()

static HRESULT WINAPI ddraw_surface1_SetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4996 of file surface.c.

4997 {
4998  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4999 
5000  TRACE("iface %p, palette %p.\n", iface, palette);
5001 
5002  if (IDirectDrawSurface_IsLost(iface) == DDERR_SURFACELOST)
5003  {
5004  WARN("Surface lost, returning DDERR_SURFACELOST.\n");
5005  return DDERR_SURFACELOST;
5006  }
5007 
5008  return ddraw_surface_set_palette(surface, palette);
5009 }
#define DDERR_SURFACELOST
Definition: ddraw.h:122
#define WARN(fmt,...)
Definition: debug.h:112
static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette)
Definition: surface.c:460
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345

◆ ddraw_surface1_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock ( IDirectDrawSurface *  iface,
void data 
)
static

Definition at line 1228 of file surface.c.

1229 {
1230  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1231 
1232  TRACE("iface %p, data %p.\n", iface, data);
1233 
1234  /* data might not be the LPRECT of later versions, so drop it. */
1236 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pRect)
Definition: surface.c:1183
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface1_UpdateOverlay()

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

Definition at line 3933 of file surface.c.

3935 {
3936  struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface(iface);
3937  struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface(dst_surface);
3938 
3939  TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3940  iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3941 
3942  return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3943  dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3944 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112
static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:3859

◆ ddraw_surface1_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3991 of file surface.c.

3992 {
3993  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3994 
3995  TRACE("iface %p, flags %#x.\n", iface, flags);
3996 
3998 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3957
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  reference 
)
static

Definition at line 4068 of file surface.c.

4070 {
4071  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4073 
4074  TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4075 
4077  reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4078 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5734
GLbitfield flags
Definition: glext.h:7161
GLint reference
Definition: glext.h:11729
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
Definition: surface.c:4013
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface2_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface2_AddAttachedSurface ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 2000 of file surface.c.

2001 {
2002  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2004  HRESULT hr;
2005 
2006  TRACE("iface %p, attachment %p.\n", iface, attachment);
2007 
2009  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
2010  return hr;
2011 
2012  attachment_impl->attached_iface = (IUnknown *)attachment;
2013  IUnknown_AddRef(attachment_impl->attached_iface);
2015  return hr;
2016 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:627
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1943
#define NULL
Definition: types.h:112

◆ ddraw_surface2_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect ( IDirectDrawSurface2 *  iface,
RECT rect 
)
static

Definition at line 2206 of file surface.c.

2207 {
2208  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2209 
2210  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2211 
2213 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
& rect
Definition: startmenu.cpp:1413
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2181
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_AddRef()

static ULONG WINAPI ddraw_surface2_AddRef ( IDirectDrawSurface2 *  iface)
static

Definition at line 397 of file surface.c.

398 {
400  ULONG refcount = InterlockedIncrement(&This->ref2);
401 
402  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
403 
404  if (refcount == 1)
405  {
407  }
408 
409  return refcount;
410 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:326
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface2_GetAttachedSurface().

◆ ddraw_surface2_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt ( IDirectDrawSurface2 *  iface,
RECT dst_rect,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1810 of file surface.c.

1812 {
1814  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
1815 
1816  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1817  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1818 
1819  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1820  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1821 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
#define NULL
Definition: types.h:112
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1603

◆ ddraw_surface2_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch ( IDirectDrawSurface2 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2827 of file surface.c.

2828 {
2829  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2830 
2831  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2832 
2833  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2834 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2801
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast ( IDirectDrawSurface2 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4364 of file surface.c.

4366 {
4367  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface2(iface);
4368  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
4369 
4370  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4371  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4372 
4373  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4374  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4375 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4273
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface2_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 2147 of file surface.c.

2149 {
2150  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2152 
2153  TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2154 
2155  return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2156 }
GLenum attachment
Definition: glext.h:6295
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2051
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718

◆ ddraw_surface2_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces ( IDirectDrawSurface2 *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2975 of file surface.c.

2977 {
2978  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2979  struct callback_info info;
2980 
2981  TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2982 
2983  info.callback = callback;
2984  info.context = context;
2985 
2987  &info, EnumCallback);
2988 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: http.c:7251
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces(IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2859
IDirectDrawSurface7 IDirectDrawSurface7_iface
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2932

◆ ddraw_surface2_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders ( IDirectDrawSurface2 *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3057 of file surface.c.

3059 {
3060  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3061  struct callback_info info;
3062 
3063  TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3064 
3065  info.callback = callback;
3066  info.context = context;
3067 
3069  flags, &info, EnumCallback);
3070 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: http.c:7251
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders(IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:3019
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static IPrintDialogCallback callback
Definition: printdlg.c:326
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2932

◆ ddraw_surface2_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  src,
DWORD  flags 
)
static

Definition at line 1412 of file surface.c.

1414 {
1415  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1417 
1418  TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1419 
1421  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1422 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
Definition: surface.c:1256
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface2_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface2_GetAttachedSurface ( IDirectDrawSurface2 *  iface,
DDSCAPS caps,
IDirectDrawSurface2 **  attachment 
)
static

Definition at line 889 of file surface.c.

891 {
892  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
893  struct ddraw_surface *attachment_impl;
894  IDirectDrawSurface7 *attachment7;
895  DDSCAPS2 caps2;
896  HRESULT hr;
897 
898  TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
899 
900  caps2.dwCaps = caps->dwCaps;
901  caps2.dwCaps2 = 0;
902  caps2.dwCaps3 = 0;
903  caps2.u1.dwCaps4 = 0;
904 
906  &caps2, &attachment7);
907  if (FAILED(hr))
908  {
909  *attachment = NULL;
910  return hr;
911  }
912  attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
913  *attachment = &attachment_impl->IDirectDrawSurface2_iface;
915  ddraw_surface7_Release(attachment7);
916 
917  return hr;
918 }
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps4
Definition: ddraw.h:737
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
DWORD dwCaps
Definition: ddraw.h:732
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
Definition: surface.c:747
DWORD dwCaps3
Definition: ddraw.h:734
IDirectDrawSurface2 IDirectDrawSurface2_iface
IDirectDrawSurface7 IDirectDrawSurface7_iface
static ULONG WINAPI ddraw_surface2_AddRef(IDirectDrawSurface2 *iface)
Definition: surface.c:397
#define NULL
Definition: types.h:112
static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface)
Definition: surface.c:612

◆ ddraw_surface2_GetBltStatus()

static HRESULT WINAPI ddraw_surface2_GetBltStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3129 of file surface.c.

3130 {
3131  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3132 
3133  TRACE("iface %p, flags %#x.\n", iface, flags);
3134 
3136 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3096
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetCaps()

static HRESULT WINAPI ddraw_surface2_GetCaps ( IDirectDrawSurface2 *  iface,
DDSCAPS caps 
)
static

Definition at line 2450 of file surface.c.

2451 {
2452  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2453  DDSCAPS2 caps2;
2454  HRESULT hr;
2455 
2456  TRACE("iface %p, caps %p.\n", iface, caps);
2457 
2459  if (FAILED(hr)) return hr;
2460 
2461  caps->dwCaps = caps2.dwCaps;
2462  return hr;
2463 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetCaps(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
Definition: surface.c:2412

◆ ddraw_surface2_GetClipper()

static HRESULT WINAPI ddraw_surface2_GetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4446 of file surface.c.

4447 {
4448  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4449 
4450  TRACE("iface %p, clipper %p.\n", iface, clipper);
4451 
4453 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
Definition: surface.c:4405
struct ddraw_clipper * clipper
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetColorKey()

static HRESULT WINAPI ddraw_surface2_GetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3238 of file surface.c.

3239 {
3240  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3241 
3242  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3243 
3245 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetColorKey(IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
Definition: surface.c:3161

◆ ddraw_surface2_GetDC()

static HRESULT WINAPI ddraw_surface2_GetDC ( IDirectDrawSurface2 *  iface,
HDC dc 
)
static

Definition at line 2307 of file surface.c.

2308 {
2309  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2310 
2311  TRACE("iface %p, dc %p.\n", iface, dc);
2312 
2314 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
Definition: surface.c:2237
IDirectDrawSurface7 IDirectDrawSurface7_iface
static const WCHAR dc[]

◆ ddraw_surface2_GetDDInterface()

static HRESULT WINAPI ddraw_surface2_GetDDInterface ( IDirectDrawSurface2 *  iface,
void **  ddraw 
)
static

Definition at line 4145 of file surface.c.

4146 {
4147  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4148 
4149  TRACE("iface %p, ddraw %p.\n", iface, ddraw);
4150 
4152 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetDDInterface(IDirectDrawSurface7 *iface, void **DD)
Definition: surface.c:4094

◆ ddraw_surface2_GetFlipStatus()

static HRESULT WINAPI ddraw_surface2_GetFlipStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3300 of file surface.c.

3301 {
3302  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3303 
3304  TRACE("iface %p, flags %#x.\n", iface, flags);
3305 
3307 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3265
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_GetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG x,
LONG y 
)
static

Definition at line 3363 of file surface.c.

3364 {
3365  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3366 
3367  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3368 
3370 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *iface, LONG *x, LONG *y)
Definition: surface.c:3330

◆ ddraw_surface2_GetPalette()

static HRESULT WINAPI ddraw_surface2_GetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4786 of file surface.c.

4787 {
4788  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4789 
4790  TRACE("iface %p, palette %p.\n", iface, palette);
4791 
4793 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
Definition: surface.c:4736
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetPixelFormat()

static HRESULT WINAPI ddraw_surface2_GetPixelFormat ( IDirectDrawSurface2 *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3430 of file surface.c.

3431 {
3432  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3433 
3434  TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3435 
3437 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetPixelFormat(IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
Definition: surface.c:3395
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc ( IDirectDrawSurface2 *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3522 of file surface.c.

3523 {
3524  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3525 
3526  TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3527 
3529 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc(IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
Definition: surface.c:3495
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface3 IDirectDrawSurface3_iface

◆ ddraw_surface2_Initialize()

static HRESULT WINAPI ddraw_surface2_Initialize ( IDirectDrawSurface2 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3585 of file surface.c.

3587 {
3588  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3589  DDSURFACEDESC2 surface_desc2;
3590 
3591  TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3592 
3593  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3595  ddraw, surface_desc ? &surface_desc2 : NULL);
3596 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_Initialize(IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
Definition: surface.c:3553
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface2_IsLost()

static HRESULT WINAPI ddraw_surface2_IsLost ( IDirectDrawSurface2 *  iface)
static

Definition at line 3671 of file surface.c.

3672 {
3673  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3674 
3675  TRACE("iface %p.\n", iface);
3676 
3678 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface)
Definition: surface.c:3641
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_Lock()

static HRESULT WINAPI ddraw_surface2_Lock ( IDirectDrawSurface2 *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1127 of file surface.c.

1129 {
1130  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1131  unsigned int surface_desc_size;
1132  DDSURFACEDESC2 surface_desc2;
1133  HRESULT hr;
1134 
1135  TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1137 
1138  if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1139  return DDERR_INVALIDPARAMS;
1140 
1141  surface_desc2.dwSize = surface_desc->dwSize;
1142  surface_desc2.dwFlags = 0;
1143  hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1144  DDSD2_to_DDSD(&surface_desc2, surface_desc);
1145  surface_desc->dwSize = surface_desc2.dwSize;
1146  return hr;
1147 }
DWORD dwFlags
Definition: ddraw.h:1153
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
& rect
Definition: startmenu.cpp:1413
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
static HRESULT surface_lock(struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
Definition: surface.c:967
LONG HRESULT
Definition: typedefs.h:79
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
DWORD dwSize
Definition: ddraw.h:1152
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
Definition: utils.c:1262
static BOOL surface_validate_lock_desc(struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
Definition: surface.c:1048
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_surface2_PageLock()

static HRESULT WINAPI ddraw_surface2_PageLock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2734 of file surface.c.

2735 {
2736  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2737 
2738  TRACE("iface %p, flags %#x.\n", iface, flags);
2739 
2741 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_PageLock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2708

◆ ddraw_surface2_PageUnlock()

static HRESULT WINAPI ddraw_surface2_PageUnlock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2780 of file surface.c.

2781 {
2782  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2783 
2784  TRACE("iface %p, flags %#x.\n", iface, flags);
2785 
2787 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_PageUnlock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2755
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_QueryInterface()

static HRESULT WINAPI ddraw_surface2_QueryInterface ( IDirectDrawSurface2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 280 of file surface.c.

281 {
282  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
283 
284  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
285 
287 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:144
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_Release()

static ULONG WINAPI ddraw_surface2_Release ( IDirectDrawSurface2 *  iface)
static

Definition at line 657 of file surface.c.

658 {
660  ULONG refcount = InterlockedDecrement(&This->ref2);
661 
662  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
663 
664  if (refcount == 0)
665  {
667  }
668 
669  return refcount;
670 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:544
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_surface2_ReleaseDC()

static HRESULT WINAPI ddraw_surface2_ReleaseDC ( IDirectDrawSurface2 *  iface,
HDC  dc 
)
static

Definition at line 2381 of file surface.c.

2382 {
2383  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2384 
2385  TRACE("iface %p, dc %p.\n", iface, dc);
2386 
2388 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC hdc)
Definition: surface.c:2337
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static const WCHAR dc[]

◆ ddraw_surface2_Restore()

static HRESULT WINAPI ddraw_surface2_Restore ( IDirectDrawSurface2 *  iface)
static

Definition at line 3763 of file surface.c.

3764 {
3765  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3766 
3767  TRACE("iface %p.\n", iface);
3768 
3770 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
Definition: surface.c:3699
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_SetClipper()

static HRESULT WINAPI ddraw_surface2_SetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4542 of file surface.c.

4543 {
4544  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4545 
4546  TRACE("iface %p, clipper %p.\n", iface, clipper);
4547 
4549 }
static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
Definition: surface.c:4476
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
struct ddraw_clipper * clipper
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_SetColorKey()

static HRESULT WINAPI ddraw_surface2_SetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4916 of file surface.c.

4917 {
4918  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4919 
4920  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4921 
4922  return ddraw_surface_set_color_key(surface, flags, color_key);
4923 }
static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:4804
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface2_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_SetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3826 of file surface.c.

3827 {
3828  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3829 
3830  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3831 
3833 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *iface, LONG x, LONG y)
Definition: surface.c:3793

◆ ddraw_surface2_SetPalette()

static HRESULT WINAPI ddraw_surface2_SetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4981 of file surface.c.

4982 {
4983  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4984 
4985  TRACE("iface %p, palette %p.\n", iface, palette);
4986 
4987  if (IDirectDrawSurface2_IsLost(iface) == DDERR_SURFACELOST)
4988  {
4989  WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4990  return DDERR_SURFACELOST;
4991  }
4992 
4993  return ddraw_surface_set_palette(surface, palette);
4994 }
#define DDERR_SURFACELOST
Definition: ddraw.h:122
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define WARN(fmt,...)
Definition: debug.h:112
static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette)
Definition: surface.c:460
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345

◆ ddraw_surface2_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock ( IDirectDrawSurface2 *  iface,
void data 
)
static

Definition at line 1218 of file surface.c.

1219 {
1220  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1221 
1222  TRACE("iface %p, data %p.\n", iface, data);
1223 
1224  /* data might not be the LPRECT of later versions, so drop it. */
1226 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pRect)
Definition: surface.c:1183
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface2_UpdateOverlay()

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

Definition at line 3920 of file surface.c.

3922 {
3923  struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface2(iface);
3924  struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface2(dst_surface);
3925 
3926  TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3927  iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3928 
3929  return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3930  dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3931 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112
static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:3859

◆ ddraw_surface2_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3982 of file surface.c.

3983 {
3984  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3985 
3986  TRACE("iface %p, flags %#x.\n", iface, flags);
3987 
3989 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3957
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  reference 
)
static

Definition at line 4056 of file surface.c.

4058 {
4059  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4061 
4062  TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4063 
4065  reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4066 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5718
GLint reference
Definition: glext.h:11729
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
Definition: surface.c:4013
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface3_AddAttachedSurface()

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

Definition at line 1982 of file surface.c.

1983 {
1984  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1986  HRESULT hr;
1987 
1988  TRACE("iface %p, attachment %p.\n", iface, attachment);
1989 
1991  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1992  return hr;
1993 
1994  attachment_impl->attached_iface = (IUnknown *)attachment;
1995  IUnknown_AddRef(attachment_impl->attached_iface);
1997  return hr;
1998 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:627
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5702
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1943
#define NULL
Definition: types.h:112

◆ ddraw_surface3_AddOverlayDirtyRect()

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

Definition at line 2197 of file surface.c.

2198 {
2199  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2200 
2201  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2202 
2204 }
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
& rect
Definition: startmenu.cpp:1413
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2181
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_AddRef()

static ULONG WINAPI ddraw_surface3_AddRef ( IDirectDrawSurface3 *  iface)
static

Definition at line 382 of file surface.c.

383 {
385  ULONG refcount = InterlockedIncrement(&This->ref3);
386 
387  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
388 
389  if (refcount == 1)
390  {
392  }
393 
394  return refcount;
395 }
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:326
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface3_GetAttachedSurface().

◆ ddraw_surface3_Blt()

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

Definition at line 1797 of file surface.c.

1799 {
1801  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
1802 
1803  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1804  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1805 
1806  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1807  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1808 }
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5702
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
#define NULL
Definition: types.h:112
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1603

◆ ddraw_surface3_BltBatch()

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

Definition at line 2818 of file surface.c.

2819 {
2820  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2821 
2822  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2823 
2824  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2825 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2801
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_BltFast()

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

Definition at line 4351 of file surface.c.

4353 {
4354  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface3(iface);
4355  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
4356 
4357  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4358  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4359 
4360  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4361  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4362 }
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5702
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4273
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define NULL
Definition: types.h:112

◆ ddraw_surface3_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface3_DeleteAttach