makefiles: Don't use standard libs for programs that specify -nodefaultlibs.
[wine/zf.git] / dlls / wineps16.drv16 / driver.c
blobf230f107b781ddc507186903904f4a73b814312c
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 <stdarg.h>
23 #include "windef.h"
24 #include "wine/winuser16.h"
25 #include "wownt32.h"
26 #include "winspool.h"
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
32 /**************************************************************
33 * AdvancedSetupDialog [WINEPS16.93]
35 WORD WINAPI PSDRV_AdvancedSetupDialog16(HWND16 hwnd, HANDLE16 hDriver,
36 LPDEVMODEA devin, LPDEVMODEA devout)
38 TRACE("hwnd = %04x, hDriver = %04x devin=%p devout=%p\n", hwnd, hDriver, devin, devout);
39 return IDCANCEL;
42 /***************************************************************
43 * ExtDeviceMode [WINEPS16.90]
45 INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
46 LPDEVMODEA lpdmOutput, LPSTR lpszDevice,
47 LPSTR lpszPort, LPDEVMODEA lpdmInput,
48 LPSTR lpszProfile, WORD fwMode)
51 return DocumentPropertiesA( HWND_32(hwnd), 0, lpszDevice, lpdmOutput, lpdmInput, fwMode );
54 /**************************************************************
55 * DeviceCapabilities [WINEPS16.91]
57 DWORD WINAPI PSDRV_DeviceCapabilities16(LPCSTR lpszDevice,
58 LPCSTR lpszPort, WORD fwCapability,
59 LPSTR lpszOutput, LPDEVMODEA lpdm)
61 int i, ret;
62 POINT *pt;
63 POINT16 *pt16;
65 if (fwCapability != DC_PAPERSIZE || !lpszOutput)
66 return DeviceCapabilitiesA( lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
68 /* for DC_PAPERSIZE, map POINT to POINT16 */
70 ret = DeviceCapabilitiesA( lpszDevice, lpszPort, DC_PAPERSIZE, NULL, lpdm );
71 if (ret <= 0) return ret;
73 pt16 = (POINT16 *)lpszOutput;
74 pt = HeapAlloc( GetProcessHeap(), 0, ret * sizeof(POINT) );
75 ret = DeviceCapabilitiesA( lpszDevice, lpszPort, DC_PAPERSIZE, (LPSTR)pt, lpdm );
76 for (i = 0; i < ret; i++)
78 pt16[i].x = pt[i].x;
79 pt16[i].y = pt[i].y;
81 HeapFree( GetProcessHeap(), 0, pt );
82 return ret;
85 /***************************************************************
86 * DeviceMode [WINEPS16.13]
89 void WINAPI PSDRV_DeviceMode16(HWND16 hwnd, HANDLE16 hDriver, LPSTR lpszDevice, LPSTR lpszPort)
91 PSDRV_ExtDeviceMode16( hwnd, hDriver, NULL, lpszDevice, lpszPort, NULL, NULL, DM_PROMPT );