gdi32: Store abort proc in DC_ATTR.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-09-02 14:14:25 +02:00 committed by Alexandre Julliard
parent 02d2bc944d
commit 711ce415c0
4 changed files with 14 additions and 17 deletions

View File

@ -1821,6 +1821,18 @@ BOOL WINAPI CancelDC(HDC hdc)
return TRUE;
}
/**********************************************************************
* SetAbortProc (GDI32.@)
*/
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;
return TRUE;
}
/***********************************************************************
* SetICMMode (GDI32.@)
*/

View File

@ -101,7 +101,6 @@ typedef struct tagDC
INT breakExtra; /* breakTotalExtra / breakCount */
INT breakRem; /* breakTotalExtra % breakCount */
ABORTPROC pAbortProc; /* AbortProc for Printing */
XFORM xformWorld2Wnd; /* World-to-window transformation */
XFORM xformWorld2Vport; /* World-to-viewport transformation */
XFORM xformVport2World; /* Inverse of the above transformation */

View File

@ -76,7 +76,7 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
if(!dc) return SP_ERROR;
if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 )) ret = 0;
if (dc->attr->abort_proc && !dc->attr->abort_proc( hdc, 0 )) ret = 0;
else
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pStartDoc );
@ -204,18 +204,3 @@ INT WINAPI AbortDoc(HDC hdc)
}
return ret;
}
/**********************************************************************
* SetAbortProc (GDI32.@)
*
*/
INT WINAPI SetAbortProc(HDC hdc, ABORTPROC abrtprc)
{
DC *dc = get_dc_ptr( hdc );
if (!dc) return FALSE;
dc->pAbortProc = abrtprc;
release_dc_ptr( dc );
return TRUE;
}

View File

@ -169,6 +169,7 @@ typedef struct DC_ATTR
UINT font_code_page;
RECTL emf_bounds;
void *emf;
ABORTPROC abort_proc; /* AbortProc for printing */
} DC_ATTR;
struct font_enum_entry