gdi32: Add a common header to the physdev structure.

This commit is contained in:
Alexandre Julliard 2011-03-08 19:25:09 +01:00
parent 76645c5e6d
commit 5f5c7020f3
8 changed files with 19 additions and 2 deletions

View File

@ -667,6 +667,8 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
goto error;
}
dc->physDev->funcs = funcs;
dc->physDev->hdc = hdc;
dc->vis_rect.left = 0;
dc->vis_rect.top = 0;
dc->vis_rect.right = GetDeviceCaps( hdc, DESKTOPHORZRES );
@ -791,6 +793,8 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
goto error;
}
dc->physDev->funcs = funcs;
dc->physDev->hdc = hdc;
DC_InitDC( dc );
release_dc_ptr( dc );
return ret;

View File

@ -32,6 +32,7 @@
typedef struct
{
struct gdi_physdev dev;
HDC hdc;
ENHMETAHEADER *emh; /* Pointer to enhanced metafile header */
UINT handles_size, cur_handles;

View File

@ -320,6 +320,8 @@ HDC WINAPI CreateEnhMetaFileW(
return 0;
}
dc->physDev = (PHYSDEV)physDev;
physDev->dev.funcs = &EMFDRV_Funcs;
physDev->dev.hdc = dc->hSelf;
physDev->hdc = dc->hSelf;
if(description) { /* App name\0Title\0\0 */

View File

@ -72,7 +72,11 @@ typedef struct tagGDIOBJHDR
/* Device functions for the Wine driver interface */
typedef struct { int opaque; } *PHYSDEV; /* PHYSDEV is an opaque pointer */
typedef struct gdi_physdev
{
const struct tagDC_FUNCS *funcs;
HDC hdc;
} *PHYSDEV;
typedef struct tagDC_FUNCS
{

View File

@ -172,6 +172,8 @@ static DC *MFDRV_AllocMetaFile(void)
return NULL;
}
dc->physDev = (PHYSDEV)physDev;
physDev->dev.funcs = &MFDRV_Funcs;
physDev->dev.hdc = dc->hSelf;
physDev->hdc = dc->hSelf;
if (!(physDev->mh = HeapAlloc( GetProcessHeap(), 0, sizeof(*physDev->mh) )))

View File

@ -32,6 +32,7 @@
typedef struct
{
struct gdi_physdev dev;
HDC hdc;
METAHEADER *mh; /* Pointer to metafile header */
UINT handles_size, cur_handles;

View File

@ -351,7 +351,9 @@ typedef struct {
BOOL had_passthrough_rect; /* See the comment in PSDRV_Rectangle */
} JOB;
typedef struct {
typedef struct
{
void *reserved[2]; /* reserved for gdi */
HDC hdc;
PSFONT font; /* Current PS font */
DOWNLOAD *downloaded_fonts;

View File

@ -144,6 +144,7 @@ struct xrender_info;
/* X physical device */
typedef struct
{
void *reserved[2]; /* reserved for gdi */
HDC hdc;
GC gc; /* X Window GC */
Drawable drawable;