wineandroid: Use logical co-ords to call GdiAlphaBlend().
[wine.git] / dlls / wineps16.drv16 / driver.c
blobb4d54ddeef7dff25a324f6ac2ac50199ab5b7516
1 /*
2 * Exported functions from the PostScript driver.
4 * Copyright 1998 Huw D M Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "wine/winuser16.h"
27 #include "wownt32.h"
28 #include "winspool.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
34 /**************************************************************
35 * AdvancedSetupDialog [WINEPS16.93]
37 WORD WINAPI PSDRV_AdvancedSetupDialog16(HWND16 hwnd, HANDLE16 hDriver,
38 LPDEVMODEA devin, LPDEVMODEA devout)
40 TRACE("hwnd = %04x, hDriver = %04x devin=%p devout=%p\n", hwnd, hDriver, devin, devout);
41 return IDCANCEL;
44 /***************************************************************
45 * ExtDeviceMode [WINEPS16.90]
47 INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
48 LPDEVMODEA lpdmOutput, LPSTR lpszDevice,
49 LPSTR lpszPort, LPDEVMODEA lpdmInput,
50 LPSTR lpszProfile, WORD fwMode)
53 return DocumentPropertiesA( HWND_32(hwnd), 0, lpszDevice, lpdmOutput, lpdmInput, fwMode );
56 /**************************************************************
57 * DeviceCapabilities [WINEPS16.91]
59 DWORD WINAPI PSDRV_DeviceCapabilities16(LPCSTR lpszDevice,
60 LPCSTR lpszPort, WORD fwCapability,
61 LPSTR lpszOutput, LPDEVMODEA lpdm)
63 int i, ret;
64 POINT *pt;
65 POINT16 *pt16;
67 if (fwCapability != DC_PAPERSIZE || !lpszOutput)
68 return DeviceCapabilitiesA( lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
70 /* for DC_PAPERSIZE, map POINT to POINT16 */
72 ret = DeviceCapabilitiesA( lpszDevice, lpszPort, DC_PAPERSIZE, NULL, lpdm );
73 if (ret <= 0) return ret;
75 pt16 = (POINT16 *)lpszOutput;
76 pt = HeapAlloc( GetProcessHeap(), 0, ret * sizeof(POINT) );
77 ret = DeviceCapabilitiesA( lpszDevice, lpszPort, DC_PAPERSIZE, (LPSTR)pt, lpdm );
78 for (i = 0; i < ret; i++)
80 pt16[i].x = pt[i].x;
81 pt16[i].y = pt[i].y;
83 HeapFree( GetProcessHeap(), 0, pt );
84 return ret;
87 /***************************************************************
88 * DeviceMode [WINEPS16.13]
91 void WINAPI PSDRV_DeviceMode16(HWND16 hwnd, HANDLE16 hDriver, LPSTR lpszDevice, LPSTR lpszPort)
93 PSDRV_ExtDeviceMode16( hwnd, hDriver, NULL, lpszDevice, lpszPort, NULL, NULL, DM_PROMPT );