diff --git a/dlls/wineps/escape.c b/dlls/wineps/escape.c index 83c83acab5e..2e1c680a6be 100644 --- a/dlls/wineps/escape.c +++ b/dlls/wineps/escape.c @@ -79,6 +79,7 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput, case SETCHARSET: case EXT_DEVICE_CAPS: case SET_BOUNDS: + case EPSPRINTING: case PASSTHROUGH: case POSTSCRIPT_PASSTHROUGH: return TRUE; @@ -314,17 +315,37 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput, return 0; } + case EPSPRINTING: + { + UINT16 epsprint = *(UINT16*)MapSL(lpInData); + /* FIXME: In this mode we do not need to send page intros and page + * ends according to the doc. But I just ignore that detail + * for now. + */ + TRACE("EPS Printing support %sable.\n",epsprint?"en":"dis"); + return 1; + } case PASSTHROUGH: case POSTSCRIPT_PASSTHROUGH: { /* Write directly to spool file, bypassing normal PS driver * processing that is done along with writing PostScript code * to the spool. + * (Usually we have a WORD before the data counting the size, but + * cbInput is just this +2.) */ - return WriteSpool16(physDev->job.hJob, ((char *)lpInData) + 2, - cbInput); + return WriteSpool16(physDev->job.hJob,((char*)lpInData)+2,cbInput-2); } + case GETSETPRINTORIENT: + { + /* If lpInData is present, it is a 20 byte structure, first 32 + * bit LONG value is the orientation. if lpInData is NULL, it + * returns the current orientation. + */ + FIXME("GETSETPRINTORIENT not implemented (lpInData %ld)!\n",lpInData); + return 1; + } default: FIXME("Unimplemented code 0x%x\n", nEscape); return 0; diff --git a/graphics/escape.c b/graphics/escape.c index d53f92360e4..974c39059af 100644 --- a/graphics/escape.c +++ b/graphics/escape.c @@ -50,8 +50,10 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, switch (nEscape) { /* Escape(hdc,QUERYESCSUPPORT,LPINT,NULL) */ /* Escape(hdc,CLIP_TO_PATH,LPINT,NULL) */ + /* Escape(hdc,EPSPRINTING,LPINT,NULL) */ case QUERYESCSUPPORT: case CLIP_TO_PATH: + case EPSPRINTING: { LPINT16 x = (LPINT16)SEGPTR_NEW(INT16); *x = *(INT*)lpszInData; diff --git a/include/wingdi.h b/include/wingdi.h index 90963ec5cb7..f14026487a7 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -327,6 +327,13 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE) #define CLOSECHANNEL 4112 #define POSTSCRIPT_PASSTHROUGH 4115 #define ENCAPSULATED_POSTSCRIPT 4116 +#define POSTSCRIPT_IDENTIFY 4117 +#define POSTSCRIPT_INJECTION 4118 + +/* for POSTSCRIPT_IDENTIFY */ +#define PSIDENT_GDICENTRIC 0 +#define PSIDENT_PSCENTRIC 1 + #define QDI_SETDIBITS 1 #define QDI_GETDIBITS 2