mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
Should get win16drv AbortProc working. Hopefully.
This commit is contained in:
parent
8bf078bfc8
commit
980992a3ca
4 changed files with 17 additions and 7 deletions
|
@ -288,15 +288,22 @@ static INT32 WIN16DRV_Escape( DC *dc, INT32 nEscape, INT32 cbInput,
|
|||
FIXME(win16drv,"Escape: GETPAIRKERNTABLE ignored.\n");
|
||||
nRet = 0;
|
||||
break;
|
||||
case SETABORTPROC:
|
||||
case SETABORTPROC: {
|
||||
/* FIXME: The AbortProc should be called:
|
||||
- After every write to printer port or spool file
|
||||
- Several times when no more disk space
|
||||
- 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;
|
||||
}
|
||||
|
||||
case NEXTBAND:
|
||||
{
|
||||
|
@ -364,7 +371,7 @@ BOOL16 WINAPI QueryAbort(HDC16 hdc, INT16 reserved)
|
|||
|
||||
if ((!dc) || (!dc->w.lpfnPrint))
|
||||
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)
|
|||
else
|
||||
nRet = cch;
|
||||
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 )))
|
||||
{
|
||||
|
|
|
@ -168,7 +168,8 @@ static const CALLBACKS_TABLE CALLBACK_EmulatorTable =
|
|||
(void *)CallTo16_long_lwlll, /* CallDrvRealizeProc */
|
||||
(void *)CallTo16_word_lwwwwlwwwwllll, /* CallDrvStretchBltProc */
|
||||
(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
|
|||
WORD );
|
||||
WORD (CALLBACK *CallDrvGetCharWidthProc)( FARPROC16, SEGPTR, SEGPTR, WORD,
|
||||
WORD, SEGPTR, SEGPTR, SEGPTR );
|
||||
BOOL16 (CALLBACK *CallDrvAbortProc)( FARPROC16, HDC16, INT16 );
|
||||
} CALLBACKS_TABLE;
|
||||
|
||||
extern const CALLBACKS_TABLE *Callbacks;
|
||||
|
|
|
@ -276,7 +276,8 @@ static const CALLBACKS_TABLE CALLBACK_WinelibTable =
|
|||
NULL, /* CallDrvRealizeProc */
|
||||
NULL, /* CallDrvStretchBltProc */
|
||||
NULL, /* CallDrvExtTextOutProc */
|
||||
NULL /* CallDrvGetCharWidth */
|
||||
NULL, /* CallDrvGetCharWidth */
|
||||
NULL /* CallDrvAbortProc */
|
||||
};
|
||||
|
||||
const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;
|
||||
|
|
Loading…
Reference in a new issue