Commit 5f5c7020 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Add a common header to the physdev structure.

parent 76645c5e
......@@ -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;
......
......@@ -32,6 +32,7 @@
typedef struct
{
struct gdi_physdev dev;
HDC hdc;
ENHMETAHEADER *emh; /* Pointer to enhanced metafile header */
UINT handles_size, cur_handles;
......
......@@ -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 */
......
......@@ -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
{
......
......@@ -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) )))
......
......@@ -32,6 +32,7 @@
typedef struct
{
struct gdi_physdev dev;
HDC hdc;
METAHEADER *mh; /* Pointer to metafile header */
UINT handles_size, cur_handles;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment