Dmitry Timoshkov : wineps.drv: Add stubs for escapes required by Adobe PageMaker.
Alexandre Julliard
julliard at winehq.org
Wed Feb 13 15:30:40 CST 2019
Module: wine
Branch: master
Commit: 7338641e8944403bb39b0cc0b2ad3da3e8e9928b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7338641e8944403bb39b0cc0b2ad3da3e8e9928b
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed Feb 13 11:40:29 2019 +0000
wineps.drv: Add stubs for escapes required by Adobe PageMaker.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 3179c97..82cf200 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 43bbe18..44d790b 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);
More information about the wine-cvs
mailing list