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