[PATCH 1/3] wineps.drv: Add stubs for escapes required by Adobe PageMaker.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Feb 13 02:07:35 CST 2019
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/gdi32/tests/dc.c | 7 -------
dlls/wineps.drv/escape.c | 41 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index 3179c97e46..82cf200f4c 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -1402,9 +1402,7 @@ static void print_something(HDC hdc)
strcpy(buf, "deadbeef");
ret = ExtEscape(hdc, DOWNLOADHEADER, 0, NULL, sizeof(buf), buf );
-todo_wine
ok(ret == 1, "DOWNLOADHEADER failed\n");
-todo_wine
ok(strcmp(buf, "deadbeef") != 0, "DOWNLOADHEADER failed\n");
strcpy(buf + 2, "\n% ===> after DOWNLOADHEADER <===\n");
@@ -1464,22 +1462,18 @@ static void test_pscript_printer_dc(void)
query = DOWNLOADFACE;
ret = Escape(hdc, QUERYESCSUPPORT, sizeof(query), (LPCSTR)&query, NULL);
-todo_wine
ok(ret == 1, "DOWNLOADFACE is not supported\n");
query = OPENCHANNEL;
ret = Escape(hdc, QUERYESCSUPPORT, sizeof(query), (LPCSTR)&query, NULL);
-todo_wine
ok(ret == 1, "OPENCHANNEL is not supported\n");
query = DOWNLOADHEADER;
ret = Escape(hdc, QUERYESCSUPPORT, sizeof(query), (LPCSTR)&query, NULL);
-todo_wine
ok(ret == 1, "DOWNLOADHEADER is not supported\n");
query = CLOSECHANNEL;
ret = Escape(hdc, QUERYESCSUPPORT, sizeof(query), (LPCSTR)&query, NULL);
-todo_wine
ok(ret == 1, "CLOSECHANNEL is not supported\n");
query = POSTSCRIPT_PASSTHROUGH;
@@ -1487,7 +1481,6 @@ todo_wine
ok(ret == 1, "POSTSCRIPT_PASSTHROUGH is not supported\n");
ret = ExtEscape(hdc, GETFACENAME, 0, NULL, sizeof(buf), buf);
-todo_wine
ok(ret == 1, "GETFACENAME failed\n");
trace("face name: %s\n", buf);
diff --git a/dlls/wineps.drv/escape.c b/dlls/wineps.drv/escape.c
index 43bbe18bb5..44d790b298 100644
--- a/dlls/wineps.drv/escape.c
+++ b/dlls/wineps.drv/escape.c
@@ -97,14 +97,55 @@ INT PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
case CLIP_TO_PATH:
case END_PATH:
/*case DRAWPATTERNRECT:*/
+
+ /* PageMaker checks for it */
+ case DOWNLOADHEADER:
+
+ /* PageMaker doesn't check for DOWNLOADFACE and GETFACENAME but
+ * uses them, they are supposed to be supported by any PS printer.
+ */
+ case DOWNLOADFACE:
+
+ /* PageMaker checks for these as a part of process of detecting
+ * a "fully compatible" PS printer, but doesn't actually use them.
+ */
+ case OPENCHANNEL:
+ case CLOSECHANNEL:
return TRUE;
+ /* Windows PS driver reports 0, but still supports this escape */
+ case GETFACENAME:
+ return FALSE; /* suppress the FIXME below */
+
default:
FIXME("QUERYESCSUPPORT(%d) - not supported.\n", num);
return FALSE;
}
}
+ case OPENCHANNEL:
+ FIXME("OPENCHANNEL: stub\n");
+ return 1;
+
+ case CLOSECHANNEL:
+ FIXME("CLOSECHANNEL: stub\n");
+ return 1;
+
+ case DOWNLOADHEADER:
+ FIXME("DOWNLOADHEADER: stub\n");
+ /* should return name of the downloaded procset */
+ *(char *)out_data = 0;
+ return 1;
+
+ case GETFACENAME:
+ FIXME("GETFACENAME: stub\n");
+ lstrcpynA(out_data, "Courier", cbOutput);
+ return 1;
+
+ case DOWNLOADFACE:
+ FIXME("DOWNLOADFACE: stub\n");
+ return 1;
+
case MFCOMMENT:
{
FIXME("MFCOMMENT(%p, %d)\n", in_data, cbInput);
--
2.20.1
More information about the wine-devel
mailing list