Commit 980992a3 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Should get win16drv AbortProc working. Hopefully.

parent 8bf078bf
...@@ -288,15 +288,22 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput, ...@@ -288,15 +288,22 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
FIXME(win16drv,"Escape: GETPAIRKERNTABLE ignored.\n"); FIXME(win16drv,"Escape: GETPAIRKERNTABLE ignored.\n");
nRet = 0; nRet = 0;
break; break;
case SETABORTPROC: case SETABORTPROC: {
/* FIXME: The AbortProc should be called: /* FIXME: The AbortProc should be called:
- After every write to printer port or spool file - After every write to printer port or spool file
- Several times when no more disk space - Several times when no more disk space
- Before every metafile record when GDI does banding - Before every metafile record when GDI does banding
*/ */
/* dc->w.lpfnPrint = (FARPROC16)lpInData; FIXME! */
nRet = 1; /* save the callback address and call Control with hdc as lpInData */
HDC16 *seghdc = SEGPTR_NEW(HDC16);
*seghdc = dc->hSelf;
dc->w.lpfnPrint = (FARPROC16)lpInData;
nRet = PRTDRV_Control(physDev->segptrPDEVICE, nEscape,
SEGPTR_GET(seghdc), lpOutData);
SEGPTR_FREE(seghdc);
break; break;
}
case NEXTBAND: case NEXTBAND:
{ {
...@@ -364,7 +371,7 @@ BOOL16 WINAPI QueryAbort(HDC16 hdc, INT16 reserved) ...@@ -364,7 +371,7 @@ BOOL16 WINAPI QueryAbort(HDC16 hdc, INT16 reserved)
if ((!dc) || (!dc->w.lpfnPrint)) if ((!dc) || (!dc->w.lpfnPrint))
return TRUE; return TRUE;
return dc->w.lpfnPrint(hdc, 0); return Callbacks->CallDrvAbortProc(dc->w.lpfnPrint, hdc, 0);
} }
/********************************************************************** /**********************************************************************
...@@ -661,7 +668,7 @@ int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch) ...@@ -661,7 +668,7 @@ int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch)
else else
nRet = cch; nRet = cch;
if (pPrintJob->hDC == 0) { if (pPrintJob->hDC == 0) {
ERR(print, "hDC == 0 !\n"); TRACE(print, "hDC == 0 so no QueryAbort\n");
} }
else if (!(QueryAbort(pPrintJob->hDC, (nRet == SP_OUTOFDISK) ? nRet : 0 ))) else if (!(QueryAbort(pPrintJob->hDC, (nRet == SP_OUTOFDISK) ? nRet : 0 )))
{ {
......
...@@ -168,7 +168,8 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable = ...@@ -168,7 +168,8 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
(void *)CallTo16_long_lwlll, /* CallDrvRealizeProc */ (void *)CallTo16_long_lwlll, /* CallDrvRealizeProc */
(void *)CallTo16_word_lwwwwlwwwwllll, /* CallDrvStretchBltProc */ (void *)CallTo16_word_lwwwwlwwwwllll, /* CallDrvStretchBltProc */
(void *)CallTo16_long_lwwllwlllllw, /* CallDrvExtTextOutProc */ (void *)CallTo16_long_lwwllwlllllw, /* CallDrvExtTextOutProc */
(void *)CallTo16_word_llwwlll /* CallDrvGetCharWidth */ (void *)CallTo16_word_llwwlll, /* CallDrvGetCharWidth */
(void *)CallTo16_word_ww /* CallDrvAbortProc */
}; };
......
...@@ -65,6 +65,7 @@ typedef struct ...@@ -65,6 +65,7 @@ typedef struct
WORD ); WORD );
WORD (CALLBACK *CallDrvGetCharWidthProc)( FARPROC16, SEGPTR, SEGPTR, WORD, WORD (CALLBACK *CallDrvGetCharWidthProc)( FARPROC16, SEGPTR, SEGPTR, WORD,
WORD, SEGPTR, SEGPTR, SEGPTR ); WORD, SEGPTR, SEGPTR, SEGPTR );
BOOL16 (CALLBACK *CallDrvAbortProc)( FARPROC16, HDC16, INT16 );
} CALLBACKS_TABLE; } CALLBACKS_TABLE;
extern const CALLBACKS_TABLE *Callbacks; extern const CALLBACKS_TABLE *Callbacks;
......
...@@ -276,7 +276,8 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable = ...@@ -276,7 +276,8 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
NULL, /* CallDrvRealizeProc */ NULL, /* CallDrvRealizeProc */
NULL, /* CallDrvStretchBltProc */ NULL, /* CallDrvStretchBltProc */
NULL, /* CallDrvExtTextOutProc */ NULL, /* CallDrvExtTextOutProc */
NULL /* CallDrvGetCharWidth */ NULL, /* CallDrvGetCharWidth */
NULL /* CallDrvAbortProc */
}; };
const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable; const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;
......
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