2000-04-09 16:30:50 +02:00
|
|
|
#ifndef __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H
|
|
|
|
#define __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
/* MAY NOT CONTAIN X11 or DGA specific includes/defines/structs! */
|
1999-12-04 05:22:04 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
#include "wtypes.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
1999-05-08 14:50:36 +02:00
|
|
|
#include "winuser.h"
|
2000-04-09 16:30:50 +02:00
|
|
|
#include "ddraw.h"
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-14 16:06:49 +02:00
|
|
|
static const char WINE_UNUSED *ddProp = "WINE_DDRAW_Property";
|
2000-04-09 16:30:50 +02:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* This is the main DirectDraw driver interface. It is supposed to be called
|
|
|
|
* only from the base functions and only used by those. It should neither be
|
|
|
|
* be called nor used within the interfaces.
|
1999-03-27 17:53:09 +01:00
|
|
|
*/
|
2000-04-09 16:30:50 +02:00
|
|
|
typedef struct ddraw_driver {
|
|
|
|
LPGUID guid; /*under which we are referenced and enumerated*/
|
|
|
|
CHAR type[20]; /* type, usually "display" */
|
|
|
|
CHAR name[40]; /* name, like "WINE Foobar DirectDraw Driver" */
|
|
|
|
int preference; /* how good we are. dga might get 100, xlib 50*/
|
|
|
|
HRESULT (*createDDRAW)(LPDIRECTDRAW*); /* also check if arg is NULL */
|
|
|
|
} ddraw_driver;
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
extern void ddraw_register_driver(ddraw_driver*);
|
1999-03-27 17:53:09 +01:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2000-04-09 16:30:50 +02:00
|
|
|
* The implementation structures. They must not contain driver specific stuff.
|
|
|
|
*
|
|
|
|
* For private data the "LPVOID private" pointer should be used.
|
1999-03-27 17:53:09 +01:00
|
|
|
*/
|
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
typedef struct IDirectDrawImpl IDirectDrawImpl;
|
|
|
|
typedef struct IDirectDraw2Impl IDirectDraw2Impl;
|
|
|
|
typedef struct IDirectDraw3Impl IDirectDraw3Impl;
|
|
|
|
typedef struct IDirectDraw4Impl IDirectDraw4Impl;
|
|
|
|
typedef struct IDirectDrawPaletteImpl IDirectDrawPaletteImpl;
|
|
|
|
typedef struct IDirectDrawClipperImpl IDirectDrawClipperImpl;
|
|
|
|
|
|
|
|
typedef struct IDirectDrawSurfaceImpl IDirectDrawSurfaceImpl;
|
|
|
|
typedef struct IDirectDrawSurface2Impl IDirectDrawSurface2Impl;
|
|
|
|
typedef struct IDirectDrawSurface4Impl IDirectDrawSurface4Impl;
|
1999-12-04 04:55:58 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
|
|
|
|
extern struct ICOM_VTABLE(IDirectDrawClipper) ddclipvt;
|
|
|
|
extern struct ICOM_VTABLE(IDirectDrawPalette) ddraw_ddpalvt;
|
1999-03-27 17:53:09 +01:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDraw implementation structure
|
|
|
|
*/
|
|
|
|
struct _common_directdrawdata
|
|
|
|
{
|
|
|
|
DDPIXELFORMAT directdraw_pixelformat;
|
|
|
|
DDPIXELFORMAT screen_pixelformat;
|
2000-04-09 16:30:50 +02:00
|
|
|
|
1999-03-27 17:53:09 +01:00
|
|
|
int pixmap_depth;
|
2000-04-09 16:30:50 +02:00
|
|
|
void (*pixel_convert)(void *src, void *dst, DWORD width, DWORD height, LONG pitch, IDirectDrawPaletteImpl *palette);
|
1999-03-27 17:53:09 +01:00
|
|
|
void (*palette_convert)(LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count);
|
2000-04-09 16:30:50 +02:00
|
|
|
DWORD height,width; /* set by SetDisplayMode */
|
|
|
|
HWND mainWindow; /* set by SetCooperativeLevel */
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
/* This is for the fake mainWindow */
|
1999-03-27 17:53:09 +01:00
|
|
|
ATOM winclass;
|
|
|
|
HWND window;
|
|
|
|
PAINTSTRUCT ps;
|
|
|
|
int paintable;
|
|
|
|
};
|
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDraw implementation structure
|
|
|
|
*
|
|
|
|
* Note: All the IDirectDraw*Impl structures _MUST_ have IDENTICAL layout,
|
|
|
|
* since we reuse functions across interface versions.
|
|
|
|
*/
|
1999-03-27 17:53:09 +01:00
|
|
|
struct IDirectDrawImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDraw);
|
2000-04-09 16:30:50 +02:00
|
|
|
DWORD ref;
|
1999-03-27 17:53:09 +01:00
|
|
|
/* IDirectDraw fields */
|
2000-04-09 16:30:50 +02:00
|
|
|
struct _common_directdrawdata d;
|
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
2000-04-09 16:30:50 +02:00
|
|
|
extern HRESULT WINAPI IDirectDrawImpl_SetDisplayMode(
|
|
|
|
LPDIRECTDRAW iface,DWORD width,DWORD height,DWORD depth
|
|
|
|
);
|
|
|
|
/*
|
1999-03-27 17:53:09 +01:00
|
|
|
* IDirectDraw2 implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDraw2Impl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDraw2);
|
2000-04-09 16:30:50 +02:00
|
|
|
DWORD ref;
|
|
|
|
|
1999-03-27 17:53:09 +01:00
|
|
|
/* IDirectDraw2 fields */
|
2000-04-09 16:30:50 +02:00
|
|
|
struct _common_directdrawdata d;
|
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
2000-04-09 16:30:50 +02:00
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_DuplicateSurface(
|
|
|
|
LPDIRECTDRAW2 iface,LPDIRECTDRAWSURFACE src,LPDIRECTDRAWSURFACE *dst
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_SetCooperativeLevel(
|
|
|
|
LPDIRECTDRAW2 iface,HWND hwnd,DWORD cooplevel
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetCaps(
|
|
|
|
LPDIRECTDRAW2 iface,LPDDCAPS caps1,LPDDCAPS caps2
|
|
|
|
) ;
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_CreateClipper(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD x,LPDIRECTDRAWCLIPPER *lpddclip,LPUNKNOWN lpunk
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette(
|
|
|
|
IDirectDraw2Impl* This,DWORD dwFlags,LPPALETTEENTRY palent,
|
|
|
|
IDirectDrawPaletteImpl **lpddpal,LPUNKNOWN lpunk,int *psize
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_CreatePalette(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD dwFlags,LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE *lpddpal,LPUNKNOWN lpunk
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_WaitForVerticalBlank(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD x,HANDLE h
|
|
|
|
);
|
|
|
|
extern ULONG WINAPI IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 iface);
|
|
|
|
extern ULONG WINAPI IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_QueryInterface(
|
|
|
|
LPDIRECTDRAW2 iface,REFIID refiid,LPVOID *obj
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetVerticalBlankStatus(
|
|
|
|
LPDIRECTDRAW2 iface,BOOL *status
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_EnumDisplayModes(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD dwFlags,LPDDSURFACEDESC lpddsfd,LPVOID context,LPDDENUMMODESCALLBACK modescb
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetDisplayMode(
|
|
|
|
LPDIRECTDRAW2 iface,LPDDSURFACEDESC lpddsfd
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_FlipToGDISurface(LPDIRECTDRAW2 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetMonitorFrequency(
|
|
|
|
LPDIRECTDRAW2 iface,LPDWORD freq
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetFourCCCodes(
|
|
|
|
LPDIRECTDRAW2 iface,LPDWORD x,LPDWORD y
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_EnumSurfaces(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD x,LPDDSURFACEDESC ddsfd,LPVOID context,
|
|
|
|
LPDDENUMSURFACESCALLBACK ddsfcb
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_Compact( LPDIRECTDRAW2 iface );
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetGDISurface(
|
|
|
|
LPDIRECTDRAW2 iface, LPDIRECTDRAWSURFACE *lplpGDIDDSSurface
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetScanLine(
|
|
|
|
LPDIRECTDRAW2 iface, LPDWORD lpdwScanLine
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_Initialize(LPDIRECTDRAW2 iface, GUID *lpGUID);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_SetDisplayMode(
|
|
|
|
LPDIRECTDRAW2 iface,DWORD width,DWORD height,DWORD depth,
|
|
|
|
DWORD dwRefreshRate, DWORD dwFlags
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw2Impl_GetAvailableVidMem(
|
|
|
|
LPDIRECTDRAW2 iface,LPDDSCAPS ddscaps,LPDWORD total,LPDWORD free
|
|
|
|
);
|
|
|
|
extern HRESULT common_off_screen_CreateSurface(
|
|
|
|
IDirectDraw2Impl* This,IDirectDrawSurfaceImpl* lpdsf
|
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
1999-03-27 17:53:09 +01:00
|
|
|
* IDirectDraw4 implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDraw4Impl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDraw4);
|
2000-04-09 16:30:50 +02:00
|
|
|
DWORD ref;
|
1999-03-27 17:53:09 +01:00
|
|
|
/* IDirectDraw4 fields */
|
2000-04-09 16:30:50 +02:00
|
|
|
struct _common_directdrawdata d;
|
|
|
|
LPVOID private;
|
|
|
|
};
|
|
|
|
extern HRESULT WINAPI IDirectDraw4Impl_GetSurfaceFromDC(
|
|
|
|
LPDIRECTDRAW4 iface, HDC hdc, LPDIRECTDRAWSURFACE *lpDDS
|
|
|
|
);
|
|
|
|
extern HRESULT WINAPI IDirectDraw4Impl_RestoreAllSurfaces(LPDIRECTDRAW4 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDraw4Impl_TestCooperativeLevel(LPDIRECTDRAW4 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 iface,
|
|
|
|
LPDDDEVICEIDENTIFIER lpdddi,
|
|
|
|
DWORD dwFlags
|
|
|
|
);
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawPalette implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDrawPaletteImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDirectDrawPalette);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDirectDrawPalette fields */
|
|
|
|
IDirectDrawImpl* ddraw; /* direct draw, no referencecount */
|
|
|
|
PALETTEENTRY palents[256];
|
|
|
|
|
|
|
|
/* This is to store the palette in 'screen format' */
|
|
|
|
int screen_palents[256];
|
|
|
|
LPVOID private;
|
|
|
|
};
|
|
|
|
extern HRESULT WINAPI IDirectDrawPaletteImpl_GetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
|
|
|
|
extern HRESULT WINAPI IDirectDrawPaletteImpl_SetEntries(LPDIRECTDRAWPALETTE,DWORD,DWORD,DWORD,LPPALETTEENTRY);
|
|
|
|
extern ULONG WINAPI IDirectDrawPaletteImpl_Release(LPDIRECTDRAWPALETTE);
|
|
|
|
extern ULONG WINAPI IDirectDrawPaletteImpl_AddRef(LPDIRECTDRAWPALETTE);
|
|
|
|
extern HRESULT WINAPI IDirectDrawPaletteImpl_Initialize(LPDIRECTDRAWPALETTE,LPDIRECTDRAW,DWORD,LPPALETTEENTRY);
|
|
|
|
extern HRESULT WINAPI IDirectDrawPaletteImpl_GetCaps(LPDIRECTDRAWPALETTE,LPDWORD);
|
|
|
|
extern HRESULT WINAPI IDirectDrawPaletteImpl_QueryInterface(LPDIRECTDRAWPALETTE,REFIID,LPVOID *);
|
|
|
|
|
|
|
|
extern HRESULT WINAPI common_IDirectDraw2Impl_CreatePalette(
|
|
|
|
IDirectDraw2Impl* This,DWORD dwFlags,LPPALETTEENTRY palent,
|
|
|
|
IDirectDrawPaletteImpl **lpddpal,LPUNKNOWN lpunk,int *psize
|
|
|
|
);
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawClipper implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDrawClipperImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
|
|
|
ICOM_VFIELD(IDirectDrawClipper);
|
|
|
|
DWORD ref;
|
|
|
|
|
|
|
|
/* IDirectDrawClipper fields */
|
|
|
|
HWND hWnd;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawSurface implementation structure
|
|
|
|
*/
|
2000-04-09 16:30:50 +02:00
|
|
|
struct IDirect3DTexture2Impl;
|
1999-03-27 17:53:09 +01:00
|
|
|
struct _common_directdrawsurface
|
|
|
|
{
|
|
|
|
IDirectDrawPaletteImpl* palette;
|
|
|
|
IDirectDraw2Impl* ddraw;
|
1999-07-03 13:57:29 +02:00
|
|
|
|
|
|
|
struct _surface_chain *chain;
|
1999-03-27 17:53:09 +01:00
|
|
|
|
|
|
|
DDSURFACEDESC surface_desc;
|
1999-04-06 09:10:48 +02:00
|
|
|
|
1999-05-29 13:00:27 +02:00
|
|
|
/* For Get / Release DC methods */
|
2000-04-09 16:30:50 +02:00
|
|
|
HBITMAP DIBsection;
|
|
|
|
void *bitmap_data;
|
|
|
|
HDC hdc;
|
|
|
|
HGDIOBJ holdbitmap;
|
|
|
|
LPDIRECTDRAWCLIPPER lpClipper;
|
1999-05-29 13:00:27 +02:00
|
|
|
|
1999-04-06 09:10:48 +02:00
|
|
|
/* Callback for loaded textures */
|
2000-04-09 16:30:50 +02:00
|
|
|
struct IDirect3DTexture2Impl* texture;
|
|
|
|
HRESULT WINAPI (*SetColorKey_cb)(struct IDirect3DTexture2Impl *texture, DWORD dwFlags, LPDDCOLORKEY ckey ) ;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
2000-04-09 16:30:50 +02:00
|
|
|
extern IDirectDrawSurface4Impl* _common_find_flipto(IDirectDrawSurface4Impl* This,IDirectDrawSurface4Impl* flipto);
|
1999-03-27 17:53:09 +01:00
|
|
|
|
|
|
|
struct IDirectDrawSurfaceImpl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDrawSurface);
|
1999-03-27 17:53:09 +01:00
|
|
|
DWORD ref;
|
2000-04-09 16:30:50 +02:00
|
|
|
|
1999-03-27 17:53:09 +01:00
|
|
|
/* IDirectDrawSurface fields */
|
|
|
|
struct _common_directdrawsurface s;
|
2000-04-09 16:30:50 +02:00
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawSurface2 implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDrawSurface2Impl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDrawSurface2);
|
1999-03-27 17:53:09 +01:00
|
|
|
DWORD ref;
|
|
|
|
/* IDirectDrawSurface2 fields */
|
|
|
|
struct _common_directdrawsurface s;
|
2000-04-09 16:30:50 +02:00
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawSurface3 implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDrawSurface3Impl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDrawSurface3);
|
1999-03-27 17:53:09 +01:00
|
|
|
DWORD ref;
|
|
|
|
/* IDirectDrawSurface3 fields */
|
|
|
|
struct _common_directdrawsurface s;
|
2000-04-09 16:30:50 +02:00
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IDirectDrawSurface4 implementation structure
|
|
|
|
*/
|
|
|
|
struct IDirectDrawSurface4Impl
|
|
|
|
{
|
|
|
|
/* IUnknown fields */
|
1999-10-31 02:59:23 +01:00
|
|
|
ICOM_VFIELD(IDirectDrawSurface4);
|
1999-03-27 17:53:09 +01:00
|
|
|
DWORD ref;
|
1999-12-04 04:55:58 +01:00
|
|
|
|
1999-03-27 17:53:09 +01:00
|
|
|
/* IDirectDrawSurface4 fields */
|
|
|
|
struct _common_directdrawsurface s;
|
2000-04-09 16:30:50 +02:00
|
|
|
LPVOID private;
|
1999-03-27 17:53:09 +01:00
|
|
|
} ;
|
|
|
|
|
1999-07-03 13:57:29 +02:00
|
|
|
struct _surface_chain {
|
|
|
|
IDirectDrawSurface4Impl **surfaces;
|
|
|
|
int nrofsurfaces;
|
|
|
|
};
|
2000-04-09 16:30:50 +02:00
|
|
|
extern HRESULT common_off_screen_CreateSurface(IDirectDraw2Impl* This,IDirectDrawSurfaceImpl* lpdsf);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_Lock(LPDIRECTDRAWSURFACE4 iface,LPRECT lprect,LPDDSURFACEDESC lpddsd,DWORD flags, HANDLE hnd);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_Unlock( LPDIRECTDRAWSURFACE4 iface,LPVOID surface);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_Blt(LPDIRECTDRAWSURFACE4 iface,LPRECT rdst,LPDIRECTDRAWSURFACE4 src,LPRECT rsrc,DWORD dwFlags,LPDDBLTFX lpbltfx);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_BltFast(LPDIRECTDRAWSURFACE4 iface,DWORD dstx,DWORD dsty,LPDIRECTDRAWSURFACE4 src,LPRECT rsrc,DWORD trans);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_BltBatch(LPDIRECTDRAWSURFACE4 iface,LPDDBLTBATCH ddbltbatch,DWORD x,DWORD y);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetCaps(LPDIRECTDRAWSURFACE4 iface,LPDDSCAPS caps);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetSurfaceDesc(LPDIRECTDRAWSURFACE4 iface,LPDDSURFACEDESC ddsd);
|
|
|
|
extern ULONG WINAPI IDirectDrawSurface4Impl_AddRef(LPDIRECTDRAWSURFACE4 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetAttachedSurface(LPDIRECTDRAWSURFACE4 iface,LPDDSCAPS lpddsd,LPDIRECTDRAWSURFACE4 *lpdsf);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_Initialize(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAW ddraw,LPDDSURFACEDESC lpdsfd);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPixelFormat(LPDIRECTDRAWSURFACE4 iface,LPDDPIXELFORMAT pf);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetBltStatus(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetOverlayPosition(LPDIRECTDRAWSURFACE4 iface,LPLONG x1,LPLONG x2);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_SetClipper(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER lpClipper);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_AddAttachedSurface(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWSURFACE4 surf);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetDC(LPDIRECTDRAWSURFACE4 iface,HDC* lphdc);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_ReleaseDC(LPDIRECTDRAWSURFACE4 iface,HDC hdc);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_QueryInterface(LPDIRECTDRAWSURFACE4 iface,REFIID refiid,LPVOID *obj);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_IsLost(LPDIRECTDRAWSURFACE4 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE4 iface,LPVOID context,LPDDENUMSURFACESCALLBACK esfcb);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_Restore(LPDIRECTDRAWSURFACE4 iface);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_SetColorKey(LPDIRECTDRAWSURFACE4 iface, DWORD dwFlags, LPDDCOLORKEY ckey);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE4 iface,LPRECT lpRect);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_DeleteAttachedSurface(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_EnumOverlayZOrders(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPVOID lpContext,LPDDENUMSURFACESCALLBACK lpfnCallback);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetClipper(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWCLIPPER* lplpDDClipper);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetColorKey(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDDCOLORKEY lpDDColorKey);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetFlipStatus(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPalette(LPDIRECTDRAWSURFACE4 iface,LPDIRECTDRAWPALETTE* lplpDDPalette);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_SetOverlayPosition(LPDIRECTDRAWSURFACE4 iface,LONG lX,LONG lY);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlay(LPDIRECTDRAWSURFACE4 iface,LPRECT lpSrcRect,LPDIRECTDRAWSURFACE4 lpDDDestSurface,LPRECT lpDestRect,DWORD dwFlags,LPDDOVERLAYFX lpDDOverlayFx);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlayDisplay(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_UpdateOverlayZOrder(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags,LPDIRECTDRAWSURFACE4 lpDDSReference);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetDDInterface(LPDIRECTDRAWSURFACE4 iface,LPVOID* lplpDD);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_PageLock(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_PageUnlock(LPDIRECTDRAWSURFACE4 iface,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_SetSurfaceDesc(LPDIRECTDRAWSURFACE4 iface,LPDDSURFACEDESC lpDDSD,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_SetPrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag,LPVOID lpData,DWORD cbSize,DWORD dwFlags);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetPrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag,LPVOID lpBuffer,LPDWORD lpcbBufferSize);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_FreePrivateData(LPDIRECTDRAWSURFACE4 iface,REFGUID guidTag);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_GetUniquenessValue(LPDIRECTDRAWSURFACE4 iface,LPDWORD lpValue);
|
|
|
|
extern HRESULT WINAPI IDirectDrawSurface4Impl_ChangeUniquenessValue(LPDIRECTDRAWSURFACE4 iface);
|
|
|
|
|
|
|
|
extern void _common_IDirectDrawImpl_SetDisplayMode(IDirectDrawImpl* This);
|
|
|
|
|
|
|
|
/* Get DDSCAPS of surface (shortcutmacro) */
|
|
|
|
#define SDDSCAPS(iface) ((iface)->s.surface_desc.ddsCaps.dwCaps)
|
|
|
|
/* Get the number of bytes per pixel for a given surface */
|
|
|
|
#define PFGET_BPP(pf) (pf.dwFlags&DDPF_PALETTEINDEXED8?1:(pf.u.dwRGBBitCount/8))
|
|
|
|
#define GET_BPP(desc) PFGET_BPP(desc.ddpfPixelFormat)
|
|
|
|
|
|
|
|
extern int _common_depth_to_pixelformat(DWORD depth, DDPIXELFORMAT *pixelformat,DDPIXELFORMAT *screen_pixelformat, int *pix_depth);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
unsigned short bpp,depth;
|
|
|
|
unsigned int rmask,gmask,bmask;
|
|
|
|
} ConvertMode;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
void (*pixel_convert)(void *src, void *dst, DWORD width, DWORD height, LONG pitch, IDirectDrawPaletteImpl* palette);
|
|
|
|
void (*palette_convert)(LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count);
|
|
|
|
} ConvertFuncs;
|
1999-07-03 13:57:29 +02:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
typedef struct {
|
|
|
|
ConvertMode screen, dest;
|
|
|
|
ConvertFuncs funcs;
|
|
|
|
} Convert;
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
extern Convert ModeEmulations[5];
|
|
|
|
extern int _common_depth_to_pixelformat(
|
|
|
|
DWORD depth,DDPIXELFORMAT *pixelformat,
|
|
|
|
DDPIXELFORMAT *screen_pixelformat, int *pix_depth
|
|
|
|
);
|
1999-03-27 17:53:09 +01:00
|
|
|
|
2000-04-09 16:30:50 +02:00
|
|
|
extern HRESULT create_direct3d(LPVOID *obj,IDirectDraw2Impl*);
|
|
|
|
extern HRESULT create_direct3d2(LPVOID *obj,IDirectDraw2Impl*);
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* Debugging / Flags output functions
|
|
|
|
*/
|
|
|
|
extern void _dump_DDBLTFX(DWORD flagmask);
|
|
|
|
extern void _dump_DDBLTFAST(DWORD flagmask);
|
|
|
|
extern void _dump_DDBLT(DWORD flagmask);
|
|
|
|
extern void _dump_DDSCAPS(void *in);
|
|
|
|
extern void _dump_pixelformat_flag(DWORD flagmask);
|
|
|
|
extern void _dump_paletteformat(DWORD dwFlags);
|
|
|
|
extern void _dump_pixelformat(void *in);
|
|
|
|
extern void _dump_colorkeyflag(DWORD ck);
|
|
|
|
extern void _dump_surface_desc(DDSURFACEDESC *lpddsd);
|
|
|
|
extern void _dump_cooperativelevel(DWORD cooplevel);
|
|
|
|
extern void _dump_surface_desc(DDSURFACEDESC *lpddsd);
|
|
|
|
extern void _dump_DDCOLORKEY(void *in);
|
|
|
|
#endif /* __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H */
|