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
26 #include "wine/winuser16.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
32 static HMODULE wineps;
33 static INT (CDECL *pExtDeviceMode)(LPSTR,HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,DWORD);
34 static DWORD (CDECL *pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA);
36 static HMODULE load_wineps(void)
40 wineps = LoadLibraryA( "wineps.drv" );
41 pExtDeviceMode = (void *)GetProcAddress( wineps, "ExtDeviceMode" );
42 pDeviceCapabilities = (void *)GetProcAddress( wineps, "DeviceCapabilities" );
47 /**************************************************************
48 * AdvancedSetupDialog [WINEPS16.93]
50 WORD WINAPI PSDRV_AdvancedSetupDialog16(HWND16 hwnd, HANDLE16 hDriver,
51 LPDEVMODEA devin, LPDEVMODEA devout)
53 TRACE("hwnd = %04x, hDriver = %04x devin=%p devout=%p\n", hwnd, hDriver, devin, devout);
57 /***************************************************************
58 * ExtDeviceMode [WINEPS16.90]
60 INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
61 LPDEVMODEA lpdmOutput, LPSTR lpszDevice,
62 LPSTR lpszPort, LPDEVMODEA lpdmInput,
63 LPSTR lpszProfile, WORD fwMode)
66 if (!load_wineps() || !pExtDeviceMode) return -1;
67 return pExtDeviceMode( NULL, HWND_32(hwnd), lpdmOutput, lpszDevice,
68 lpszPort, lpdmInput, lpszProfile, fwMode );
71 /**************************************************************
72 * DeviceCapabilities [WINEPS16.91]
74 DWORD WINAPI PSDRV_DeviceCapabilities16(LPCSTR lpszDevice,
75 LPCSTR lpszPort, WORD fwCapability,
76 LPSTR lpszOutput, LPDEVMODEA lpdm)
78 if (!load_wineps() || !pDeviceCapabilities) return 0;
79 return pDeviceCapabilities( NULL, lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
82 /***************************************************************
83 * DeviceMode [WINEPS16.13]
86 void WINAPI PSDRV_DeviceMode16(HWND16 hwnd, HANDLE16 hDriver, LPSTR lpszDevice, LPSTR lpszPort)
88 PSDRV_ExtDeviceMode16( hwnd, hDriver, NULL, lpszDevice, lpszPort, NULL, NULL, DM_PROMPT );