Commit 2b6647cd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use platform-independent layout for DC_ATTR.

parent fa8a5692
......@@ -2154,6 +2154,7 @@ BOOL WINAPI CancelDC(HDC hdc)
INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc )
{
DC_ATTR *dc_attr;
ABORTPROC proc;
TRACE("DocName %s, Output %s, Datatype %s, fwType %#lx\n",
debugstr_w(doc->lpszDocName), debugstr_w(doc->lpszOutput),
......@@ -2161,7 +2162,8 @@ INT WINAPI StartDocW( HDC hdc, const DOCINFOW *doc )
if (!(dc_attr = get_dc_attr( hdc ))) return SP_ERROR;
if (dc_attr->abort_proc && !dc_attr->abort_proc( hdc, 0 )) return 0;
proc = (ABORTPROC)(UINT_PTR)dc_attr->abort_proc;
if (proc && !proc( hdc, 0 )) return 0;
return NtGdiStartDoc( hdc, doc, NULL, 0 );
}
......@@ -2247,7 +2249,7 @@ INT WINAPI SetAbortProc( HDC hdc, ABORTPROC abrtprc )
DC_ATTR *dc_attr;
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
dc_attr->abort_proc = abrtprc;
dc_attr->abort_proc = (UINT_PTR)abrtprc;
return TRUE;
}
......
......@@ -230,7 +230,8 @@ DC *alloc_dc_ptr( DWORD magic )
free( dc );
return NULL;
}
dc->attr->hdc = dc->nulldrv.hdc = dc->hSelf;
dc->nulldrv.hdc = dc->hSelf;
dc->attr->hdc = HandleToUlong( dc->hSelf );
set_gdi_client_ptr( dc->hSelf, dc->attr );
if (!font_driver.pCreateDC( &dc->physDev, NULL, NULL, NULL ))
......
......@@ -165,7 +165,7 @@ enum
typedef struct DC_ATTR
{
HDC hdc; /* handle to self */
UINT hdc; /* handle to self */
LONG disabled; /* disabled flag, controlled by DCHF_(DISABLE|ENABLE)DC */
int save_level;
COLORREF background_color;
......@@ -196,8 +196,8 @@ typedef struct DC_ATTR
SIZE virtual_size;
UINT font_code_page;
RECTL emf_bounds;
void *emf;
ABORTPROC abort_proc; /* AbortProc for printing */
UINT64 emf; /* client EMF record pointer */
UINT64 abort_proc; /* AbortProc for printing */
} DC_ATTR;
struct font_enum_entry
......
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