Commit e39b676a authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Implement DocumentProperties, DeviceCapabilities, beginnings of

Open/Get/ClosePrinter. Additions to PSDRV_DeviceCapabilities. Split off WINSPOOL into its own directory. Several functions added to DC_Funcs. Based largely on a patch by Pascal Lessard <pascal@macadamian.com>
parent 2b898806
...@@ -43,6 +43,7 @@ LIBSUBDIRS = \ ...@@ -43,6 +43,7 @@ LIBSUBDIRS = \
dlls/ver \ dlls/ver \
dlls/version \ dlls/version \
dlls/winaspi \ dlls/winaspi \
dlls/winspool \
dlls/wnaspi32 \ dlls/wnaspi32 \
files \ files \
graphics \ graphics \
...@@ -118,6 +119,7 @@ LIBOBJS = \ ...@@ -118,6 +119,7 @@ LIBOBJS = \
dlls/ver/ver.o \ dlls/ver/ver.o \
dlls/version/version.o \ dlls/version/version.o \
dlls/winaspi/winaspi.o \ dlls/winaspi/winaspi.o \
dlls/winspool/winspool.o \
dlls/wnaspi32/wnaspi32.o \ dlls/wnaspi32/wnaspi32.o \
files/files.o \ files/files.o \
graphics/graphics.o \ graphics/graphics.o \
......
...@@ -5214,6 +5214,7 @@ dlls/tapi32/Makefile ...@@ -5214,6 +5214,7 @@ dlls/tapi32/Makefile
dlls/ver/Makefile dlls/ver/Makefile
dlls/version/Makefile dlls/version/Makefile
dlls/winaspi/Makefile dlls/winaspi/Makefile
dlls/winspool/Makefile
dlls/wnaspi32/Makefile dlls/wnaspi32/Makefile
documentation/Makefile documentation/Makefile
files/Makefile files/Makefile
...@@ -5381,6 +5382,7 @@ dlls/tapi32/Makefile ...@@ -5381,6 +5382,7 @@ dlls/tapi32/Makefile
dlls/ver/Makefile dlls/ver/Makefile
dlls/version/Makefile dlls/version/Makefile
dlls/winaspi/Makefile dlls/winaspi/Makefile
dlls/winspool/Makefile
dlls/wnaspi32/Makefile dlls/wnaspi32/Makefile
documentation/Makefile documentation/Makefile
files/Makefile files/Makefile
......
...@@ -742,6 +742,7 @@ dlls/tapi32/Makefile ...@@ -742,6 +742,7 @@ dlls/tapi32/Makefile
dlls/ver/Makefile dlls/ver/Makefile
dlls/version/Makefile dlls/version/Makefile
dlls/winaspi/Makefile dlls/winaspi/Makefile
dlls/winspool/Makefile
dlls/wnaspi32/Makefile dlls/wnaspi32/Makefile
documentation/Makefile documentation/Makefile
files/Makefile files/Makefile
......
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winspool
C_SRCS = \
info.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
#include "heap.h" #include "heap.h"
#include "debugtools.h" #include "debugtools.h"
DECLARE_DEBUG_CHANNEL(driver) DEFAULT_DEBUG_CHANNEL(driver)
DECLARE_DEBUG_CHANNEL(gdi)
typedef struct tagGRAPHICS_DRIVER typedef struct tagGRAPHICS_DRIVER
{ {
...@@ -40,7 +39,7 @@ BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs ) ...@@ -40,7 +39,7 @@ BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs )
/* No name -> it's the generic driver */ /* No name -> it's the generic driver */
if (genericDriver) if (genericDriver)
{ {
WARN_(driver)(" already a generic driver\n" ); WARN(" already a generic driver\n" );
HeapFree( SystemHeap, 0, driver ); HeapFree( SystemHeap, 0, driver );
return FALSE; return FALSE;
} }
...@@ -57,6 +56,7 @@ const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name ) ...@@ -57,6 +56,7 @@ const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name )
{ {
GRAPHICS_DRIVER *driver = firstDriver; GRAPHICS_DRIVER *driver = firstDriver;
TRACE(": %s\n", name);
while (driver && name) while (driver && name)
{ {
if (!strcasecmp( driver->name, name )) return driver->funcs; if (!strcasecmp( driver->name, name )) return driver->funcs;
...@@ -97,7 +97,22 @@ BOOL DRIVER_UnregisterDriver( LPCSTR name ) ...@@ -97,7 +97,22 @@ BOOL DRIVER_UnregisterDriver( LPCSTR name )
} }
} }
/*****************************************************************************
* DRIVER_GetDriverName
*
*/
BOOL DRIVER_GetDriverName( LPCSTR device, LPSTR driver, DWORD size )
{
char *p;
size = GetProfileStringA("devices", device, "", driver, size);
if(!size) return FALSE;
p = strchr(driver, ',');
if(!p) return FALSE;
*p = '\0';
TRACE("Found '%s' for '%s'\n", driver, device);
return TRUE;
}
/***************************************************************************** /*****************************************************************************
* GDI_CallDevInstall16 [GDI32.100] * GDI_CallDevInstall16 [GDI32.100]
...@@ -107,7 +122,7 @@ BOOL DRIVER_UnregisterDriver( LPCSTR name ) ...@@ -107,7 +122,7 @@ BOOL DRIVER_UnregisterDriver( LPCSTR name )
INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd, INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd,
LPSTR lpModelName, LPSTR OldPort, LPSTR NewPort ) LPSTR lpModelName, LPSTR OldPort, LPSTR NewPort )
{ {
FIXME_(gdi)("(%p, %04x, %s, %s, %s)\n", FIXME("(%p, %04x, %s, %s, %s)\n",
lpfnDevInstallProc, hWnd, lpModelName, OldPort, NewPort ); lpfnDevInstallProc, hWnd, lpModelName, OldPort, NewPort );
return -1; return -1;
} }
...@@ -132,7 +147,7 @@ INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd, ...@@ -132,7 +147,7 @@ INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd,
INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice, INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice,
LPCSTR lpszPort, LPVOID lpPropSheet ) LPCSTR lpszPort, LPVOID lpPropSheet )
{ {
FIXME_(gdi)("(%04x, %s, %s, %p)\n", FIXME("(%04x, %s, %s, %p)\n",
hWnd, lpszDevice, lpszPort, lpPropSheet ); hWnd, lpszDevice, lpszPort, lpPropSheet );
return -1; return -1;
} }
...@@ -144,14 +159,22 @@ INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice, ...@@ -144,14 +159,22 @@ INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice,
* ExtDeviceMode proc. * ExtDeviceMode proc.
*/ */
INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd, INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
LPDEVMODE16 lpdmOutput, LPSTR lpszDevice, LPDEVMODEA lpdmOutput, LPSTR lpszDevice,
LPSTR lpszPort, LPDEVMODE16 lpdmInput, LPSTR lpszPort, LPDEVMODEA lpdmInput,
LPSTR lpszProfile, DWORD fwMode ) LPSTR lpszProfile, DWORD fwMode )
{ {
FIXME_(gdi)("(%04x, %p, %s, %s, %p, %s, %ld)\n", char buf[300];
const DC_FUNCTIONS *funcs;
TRACE("(%04x, %p, %s, %s, %p, %s, %ld)\n",
hwnd, lpdmOutput, lpszDevice, lpszPort, hwnd, lpdmOutput, lpszDevice, lpszPort,
lpdmInput, lpszProfile, fwMode ); lpdmInput, lpszProfile, fwMode );
return -1;
if(!DRIVER_GetDriverName( lpszDevice, buf, sizeof(buf) )) return -1;
funcs = DRIVER_FindDriver( buf );
if(!funcs || !funcs->pExtDeviceMode) return -1;
return funcs->pExtDeviceMode(hwnd, lpdmOutput, lpszDevice, lpszPort,
lpdmInput, lpszProfile, fwMode);
} }
/**************************************************************************** /****************************************************************************
...@@ -161,9 +184,9 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd, ...@@ -161,9 +184,9 @@ INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
* AdvancedSetupDialog proc. * AdvancedSetupDialog proc.
*/ */
INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice, INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice,
LPDEVMODE16 devin, LPDEVMODE16 devout ) LPDEVMODEA devin, LPDEVMODEA devout )
{ {
FIXME_(gdi)("(%04x, %s, %p, %p)\n", TRACE("(%04x, %s, %p, %p)\n",
hwnd, lpszDevice, devin, devout ); hwnd, lpszDevice, devin, devout );
return -1; return -1;
} }
...@@ -174,12 +197,22 @@ INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice, ...@@ -174,12 +197,22 @@ INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice,
* This should load the correct driver for lpszDevice and calls this driver's * This should load the correct driver for lpszDevice and calls this driver's
* DeviceCapabilities proc. * DeviceCapabilities proc.
*/ */
DWORD WINAPI GDI_CallDeviceCapabilities16( LPSTR lpszDevice, LPSTR lpszPort, DWORD WINAPI GDI_CallDeviceCapabilities16( LPCSTR lpszDevice, LPCSTR lpszPort,
DWORD fwCapability, LPSTR lpszOutput, WORD fwCapability, LPSTR lpszOutput,
LPDEVMODE16 lpdm ) LPDEVMODEA lpdm )
{ {
FIXME_(gdi)("(%s, %s, %ld, %p, %p)\n", char buf[300];
const DC_FUNCTIONS *funcs;
TRACE("(%s, %s, %d, %p, %p)\n",
lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm ); lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
return -1L;
if(!DRIVER_GetDriverName( lpszDevice, buf, sizeof(buf) )) return -1;
funcs = DRIVER_FindDriver( buf );
if(!funcs || !funcs->pDeviceCapabilities) return -1;
return funcs->pDeviceCapabilities( lpszDevice, lpszPort, fwCapability,
lpszOutput, lpdm);
} }
...@@ -20,20 +20,25 @@ DEFAULT_DEBUG_CHANNEL(enhmetafile) ...@@ -20,20 +20,25 @@ DEFAULT_DEBUG_CHANNEL(enhmetafile)
static const DC_FUNCTIONS EMFDRV_Funcs = static const DC_FUNCTIONS EMFDRV_Funcs =
{ {
NULL, /* pAbortDoc */
EMFDRV_Arc, /* pArc */ EMFDRV_Arc, /* pArc */
NULL, /* pBitBlt */ NULL, /* pBitBlt */
NULL, /* pBitmapBits */ NULL, /* pBitmapBits */
EMFDRV_Chord, /* pChord */ EMFDRV_Chord, /* pChord */
NULL, /* pCreateBitmap */ NULL, /* pCreateBitmap */
NULL, /* no implementation */ /* pCreateDC */ NULL, /* no implementation */ /* pCreateDC */
NULL, /* no implementation */ /* pDeleteDC */
NULL, /* pCreateDIBSection */ NULL, /* pCreateDIBSection */
NULL, /* pCreateDIBSection16 */ NULL, /* pCreateDIBSection16 */
NULL, /* no implementation */ /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
EMFDRV_Ellipse, /* pEllipse */ EMFDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEnumDeviceFonts */ NULL, /* pEnumDeviceFonts */
NULL, /* pEscape */ NULL, /* pEscape */
EMFDRV_ExcludeClipRect, /* pExcludeClipRect */ EMFDRV_ExcludeClipRect, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */
EMFDRV_ExtFloodFill, /* pExtFloodFill */ EMFDRV_ExtFloodFill, /* pExtFloodFill */
NULL, /* pExtTextOut */ NULL, /* pExtTextOut */
EMFDRV_FillRgn, /* pFillRgn */ EMFDRV_FillRgn, /* pFillRgn */
...@@ -87,6 +92,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs = ...@@ -87,6 +92,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_SetViewportOrg, /* pSetViewportOrg */ EMFDRV_SetViewportOrg, /* pSetViewportOrg */
EMFDRV_SetWindowExt, /* pSetWindowExt */ EMFDRV_SetWindowExt, /* pSetWindowExt */
EMFDRV_SetWindowOrg, /* pSetWindowOrg */ EMFDRV_SetWindowOrg, /* pSetWindowOrg */
NULL, /* pStartDoc */
NULL, /* pStartPage */
NULL, /* pStretchBlt */ NULL, /* pStretchBlt */
NULL /* pStretchDIBits */ NULL /* pStretchDIBits */
}; };
......
...@@ -75,7 +75,7 @@ static ATOM PortNameToAtom(LPCSTR lpPortName, BOOL16 add) ...@@ -75,7 +75,7 @@ static ATOM PortNameToAtom(LPCSTR lpPortName, BOOL16 add)
/*********************************************************************** /***********************************************************************
* GetEnvironment (GDI.134) * GetEnvironment (GDI.134)
*/ */
INT16 WINAPI GetEnvironment16(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nMaxSize) INT16 WINAPI GetEnvironment16(LPCSTR lpPortName, LPDEVMODEA lpdev, UINT16 nMaxSize)
{ {
ATOM atom; ATOM atom;
LPCSTR p; LPCSTR p;
...@@ -104,7 +104,7 @@ INT16 WINAPI GetEnvironment16(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nMaxS ...@@ -104,7 +104,7 @@ INT16 WINAPI GetEnvironment16(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nMaxS
/*********************************************************************** /***********************************************************************
* SetEnvironment (GDI.132) * SetEnvironment (GDI.132)
*/ */
INT16 WINAPI SetEnvironment16(LPCSTR lpPortName, LPDEVMODE16 lpdev, UINT16 nCount) INT16 WINAPI SetEnvironment16(LPCSTR lpPortName, LPDEVMODEA lpdev, UINT16 nCount)
{ {
ATOM atom; ATOM atom;
BOOL16 nullport = FALSE; BOOL16 nullport = FALSE;
......
...@@ -34,8 +34,11 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -34,8 +34,11 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
segin = (SEGPTR)lpszInData; segin = (SEGPTR)lpszInData;
segout = (SEGPTR)lpvOutData; segout = (SEGPTR)lpvOutData;
switch (nEscape) { switch (nEscape) {
/* Escape(hdc,QUERYESCSUPPORT,LPINT32,NULL) */ /* Escape(hdc,QUERYESCSUPPORT,LPINT,NULL) */
case QUERYESCSUPPORT: { /* Escape(hdc,EXT_DEVICE_CAPS,LPINT,NULL) */
case QUERYESCSUPPORT:
case EXT_DEVICE_CAPS:
{
LPINT16 x = (LPINT16)SEGPTR_NEW(INT16); LPINT16 x = (LPINT16)SEGPTR_NEW(INT16);
*x = *(INT*)lpszInData; *x = *(INT*)lpszInData;
segin = SEGPTR_GET(x); segin = SEGPTR_GET(x);
...@@ -101,6 +104,9 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput, ...@@ -101,6 +104,9 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
TRACE("target DC implements Escape %d\n",nEscape); TRACE("target DC implements Escape %d\n",nEscape);
SEGPTR_FREE(PTR_SEG_TO_LIN(segin)); SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
break; break;
case EXT_DEVICE_CAPS:
SEGPTR_FREE(PTR_SEG_TO_LIN(segin));
break;
case GETSCALINGFACTOR: case GETSCALINGFACTOR:
case GETPRINTINGOFFSET: case GETPRINTINGOFFSET:
case GETPHYSPAGESIZE: { case GETPHYSPAGESIZE: {
......
...@@ -19,20 +19,25 @@ DEFAULT_DEBUG_CHANNEL(metafile) ...@@ -19,20 +19,25 @@ DEFAULT_DEBUG_CHANNEL(metafile)
static const DC_FUNCTIONS MFDRV_Funcs = static const DC_FUNCTIONS MFDRV_Funcs =
{ {
NULL, /* pAbortDoc */
MFDRV_Arc, /* pArc */ MFDRV_Arc, /* pArc */
MFDRV_BitBlt, /* pBitBlt */ MFDRV_BitBlt, /* pBitBlt */
NULL, /* pBitmapBits */ NULL, /* pBitmapBits */
MFDRV_Chord, /* pChord */ MFDRV_Chord, /* pChord */
NULL, /* pCreateBitmap */ NULL, /* pCreateBitmap */
NULL, /* no implementation */ /* pCreateDC */ NULL, /* no implementation */ /* pCreateDC */
NULL, /* no implementation */ /* pDeleteDC */
NULL, /* pCreateDIBSection */ NULL, /* pCreateDIBSection */
NULL, /* pCreateDIBSection16 */ NULL, /* pCreateDIBSection16 */
NULL, /* no implementation */ /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
MFDRV_Ellipse, /* pEllipse */ MFDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEnumDeviceFonts */ NULL, /* pEnumDeviceFonts */
NULL, /* pEscape */ NULL, /* pEscape */
MFDRV_ExcludeClipRect, /* pExcludeClipRect */ MFDRV_ExcludeClipRect, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */
MFDRV_ExtFloodFill, /* pExtFloodFill */ MFDRV_ExtFloodFill, /* pExtFloodFill */
MFDRV_ExtTextOut, /* pExtTextOut */ MFDRV_ExtTextOut, /* pExtTextOut */
MFDRV_FillRgn, /* pFillRgn */ MFDRV_FillRgn, /* pFillRgn */
...@@ -86,6 +91,8 @@ static const DC_FUNCTIONS MFDRV_Funcs = ...@@ -86,6 +91,8 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetViewportOrg, /* pSetViewportOrg */ MFDRV_SetViewportOrg, /* pSetViewportOrg */
MFDRV_SetWindowExt, /* pSetWindowExt */ MFDRV_SetWindowExt, /* pSetWindowExt */
MFDRV_SetWindowOrg, /* pSetWindowOrg */ MFDRV_SetWindowOrg, /* pSetWindowOrg */
NULL, /* pStartDoc */
NULL, /* pStartPage */
MFDRV_StretchBlt, /* pStretchBlt */ MFDRV_StretchBlt, /* pStretchBlt */
MFDRV_StretchDIBits /* pStretchDIBits */ MFDRV_StretchDIBits /* pStretchDIBits */
}; };
......
...@@ -17,25 +17,30 @@ ...@@ -17,25 +17,30 @@
DEFAULT_DEBUG_CHANNEL(psdrv) DEFAULT_DEBUG_CHANNEL(psdrv)
static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16* initData ); LPCSTR output, const DEVMODEA* initData );
static BOOL PSDRV_DeleteDC( DC *dc ); static BOOL PSDRV_DeleteDC( DC *dc );
static const DC_FUNCTIONS PSDRV_Funcs = static const DC_FUNCTIONS PSDRV_Funcs =
{ {
NULL, /* pAbortDoc */
PSDRV_Arc, /* pArc */ PSDRV_Arc, /* pArc */
NULL, /* pBitBlt */ NULL, /* pBitBlt */
NULL, /* pBitmapBits */ NULL, /* pBitmapBits */
PSDRV_Chord, /* pChord */ PSDRV_Chord, /* pChord */
NULL, /* pCreateBitmap */ NULL, /* pCreateBitmap */
PSDRV_CreateDC, /* pCreateDC */ PSDRV_CreateDC, /* pCreateDC */
PSDRV_DeleteDC, /* pDeleteDC */
NULL, /* pCreateDIBSection */ NULL, /* pCreateDIBSection */
NULL, /* pCreateDIBSection16 */ NULL, /* pCreateDIBSection16 */
PSDRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
PSDRV_DeviceCapabilities, /* pDeviceCapabilities */
PSDRV_Ellipse, /* pEllipse */ PSDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
PSDRV_EnumDeviceFonts, /* pEnumDeviceFonts */ PSDRV_EnumDeviceFonts, /* pEnumDeviceFonts */
PSDRV_Escape, /* pEscape */ PSDRV_Escape, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
PSDRV_ExtDeviceMode, /* pExtDeviceMode */
NULL, /* pExtFloodFill */ NULL, /* pExtFloodFill */
PSDRV_ExtTextOut, /* pExtTextOut */ PSDRV_ExtTextOut, /* pExtTextOut */
NULL, /* pFillRgn */ NULL, /* pFillRgn */
...@@ -89,6 +94,8 @@ static const DC_FUNCTIONS PSDRV_Funcs = ...@@ -89,6 +94,8 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL, /* pSetViewportOrg (optional) */ NULL, /* pSetViewportOrg (optional) */
NULL, /* pSetWindowExt (optional) */ NULL, /* pSetWindowExt (optional) */
NULL, /* pSetWindowOrg (optional) */ NULL, /* pSetWindowOrg (optional) */
NULL, /* pStartDoc */
NULL, /* pStartPage */
NULL, /* pStretchBlt */ NULL, /* pStretchBlt */
PSDRV_StretchDIBits /* pStretchDIBits */ PSDRV_StretchDIBits /* pStretchDIBits */
}; };
...@@ -121,10 +128,9 @@ static DeviceCaps PSDRV_DevCaps = { ...@@ -121,10 +128,9 @@ static DeviceCaps PSDRV_DevCaps = {
PC_INTERIORS, PC_INTERIORS,
/* textCaps */ TC_CR_ANY, /* psdrv 0x59f7 */ /* textCaps */ TC_CR_ANY, /* psdrv 0x59f7 */
/* clipCaps */ CP_RECTANGLE, /* clipCaps */ CP_RECTANGLE,
/* rasterCaps */ RC_BITBLT | RC_BANDING | RC_SCALING | RC_BITMAP64 | /* rasterCaps */ RC_BITBLT | RC_BITMAP64 | RC_GDI20_OUTPUT |
RC_DI_BITMAP | RC_DIBTODEV | RC_BIGFONT | RC_DIBTODEV | RC_STRETCHBLT |
RC_STRETCHBLT | RC_STRETCHDIB | RC_DEVBITS, RC_STRETCHDIB, /* psdrv 0x6e99 */
/* psdrv 0x6e99 */
/* aspectX */ 600, /* aspectX */ 600,
/* aspectY */ 600, /* aspectY */ 600,
/* aspectXY */ 848, /* aspectXY */ 848,
...@@ -135,22 +141,26 @@ static DeviceCaps PSDRV_DevCaps = { ...@@ -135,22 +141,26 @@ static DeviceCaps PSDRV_DevCaps = {
/* palette size */ 0, /* palette size */ 0,
/* ..etc */ 0, 0 }; /* ..etc */ 0, 0 };
static PSDRV_DEVMODE16 DefaultDevmode = static PSDRV_DEVMODEA DefaultDevmode =
{ {
{ /* dmPublic */ { /* dmPublic */
/* dmDeviceName */ "Wine PostScript Driver", /* dmDeviceName */ "Wine PostScript Driver",
/* dmSpecVersion */ 0x30a, /* dmSpecVersion */ 0x30a,
/* dmDriverVersion */ 0x001, /* dmDriverVersion */ 0x001,
/* dmSize */ sizeof(DEVMODE16), /* dmSize */ sizeof(DEVMODEA),
/* dmDriverExtra */ 0, /* dmDriverExtra */ 0,
/* dmFields */ DM_ORIENTATION | DM_PAPERSIZE | DM_PAPERLENGTH | /* dmFields */ DM_ORIENTATION | DM_PAPERSIZE | DM_PAPERLENGTH |
DM_PAPERWIDTH | DM_SCALE | DM_COPIES | DM_PAPERWIDTH | DM_SCALE | DM_COPIES |
DM_DEFAULTSOURCE | DM_COLOR | DM_DUPLEX | DM_DEFAULTSOURCE | DM_COLOR | DM_DUPLEX |
DM_YRESOLUTION | DM_TTOPTION, DM_YRESOLUTION | DM_TTOPTION,
{ /* u1 */
{ /* s1 */
/* dmOrientation */ DMORIENT_PORTRAIT, /* dmOrientation */ DMORIENT_PORTRAIT,
/* dmPaperSize */ DMPAPER_A4, /* dmPaperSize */ DMPAPER_A4,
/* dmPaperLength */ 2969, /* dmPaperLength */ 2969,
/* dmPaperWidth */ 2101, /* dmPaperWidth */ 2101
}
},
/* dmScale */ 100, /* ?? */ /* dmScale */ 100, /* ?? */
/* dmCopies */ 1, /* dmCopies */ 1,
/* dmDefaultSource */ DMBIN_AUTO, /* dmDefaultSource */ DMBIN_AUTO,
...@@ -203,7 +213,7 @@ BOOL PSDRV_Init(void) ...@@ -203,7 +213,7 @@ BOOL PSDRV_Init(void)
* PSDRV_CreateDC * PSDRV_CreateDC
*/ */
static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16* initData ) LPCSTR output, const DEVMODEA* initData )
{ {
PSDRV_PDEVICE *physDev; PSDRV_PDEVICE *physDev;
PRINTERINFO *pi = PSDRV_FindPrinterInfo(device); PRINTERINFO *pi = PSDRV_FindPrinterInfo(device);
...@@ -225,29 +235,29 @@ static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, ...@@ -225,29 +235,29 @@ static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
physDev->pi = pi; physDev->pi = pi;
physDev->Devmode = (PSDRV_DEVMODE16 *)HeapAlloc( PSDRV_Heap, 0, physDev->Devmode = (PSDRV_DEVMODEA *)HeapAlloc( PSDRV_Heap, 0,
sizeof(PSDRV_DEVMODE16) ); sizeof(PSDRV_DEVMODEA) );
if(!physDev->Devmode) { if(!physDev->Devmode) {
HeapFree( PSDRV_Heap, 0, physDev ); HeapFree( PSDRV_Heap, 0, physDev );
return FALSE; return FALSE;
} }
memcpy( physDev->Devmode, pi->Devmode, sizeof(PSDRV_DEVMODE16) ); memcpy( physDev->Devmode, pi->Devmode, sizeof(PSDRV_DEVMODEA) );
if(initData) { if(initData) {
PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODE16 *)initData, pi); PSDRV_MergeDevmodes(physDev->Devmode, (PSDRV_DEVMODEA *)initData, pi);
} }
devCaps = HeapAlloc( PSDRV_Heap, 0, sizeof(PSDRV_DevCaps) ); devCaps = HeapAlloc( PSDRV_Heap, 0, sizeof(PSDRV_DevCaps) );
memcpy(devCaps, &PSDRV_DevCaps, sizeof(PSDRV_DevCaps)); memcpy(devCaps, &PSDRV_DevCaps, sizeof(PSDRV_DevCaps));
if(physDev->Devmode->dmPublic.dmOrientation == DMORIENT_PORTRAIT) { if(physDev->Devmode->dmPublic.u1.s1.dmOrientation == DMORIENT_PORTRAIT) {
devCaps->horzSize = physDev->Devmode->dmPublic.dmPaperWidth / 10; devCaps->horzSize = physDev->Devmode->dmPublic.u1.s1.dmPaperWidth / 10;
devCaps->vertSize = physDev->Devmode->dmPublic.dmPaperLength / 10; devCaps->vertSize = physDev->Devmode->dmPublic.u1.s1.dmPaperLength / 10;
} else { } else {
devCaps->horzSize = physDev->Devmode->dmPublic.dmPaperLength / 10; devCaps->horzSize = physDev->Devmode->dmPublic.u1.s1.dmPaperLength / 10;
devCaps->vertSize = physDev->Devmode->dmPublic.dmPaperWidth / 10; devCaps->vertSize = physDev->Devmode->dmPublic.u1.s1.dmPaperWidth / 10;
} }
devCaps->horzRes = physDev->pi->ppd->DefaultResolution * devCaps->horzRes = physDev->pi->ppd->DefaultResolution *
...@@ -278,7 +288,8 @@ static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, ...@@ -278,7 +288,8 @@ static BOOL PSDRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
dc->w.devCaps->vertRes); dc->w.devCaps->vertRes);
dc->w.hFont = PSDRV_DefaultFont; dc->w.hFont = PSDRV_DefaultFont;
physDev->job.output = HEAP_strdupA( PSDRV_Heap, 0, output ); physDev->job.output = output ? HEAP_strdupA( PSDRV_Heap, 0, output ) :
NULL;
physDev->job.hJob = 0; physDev->job.hJob = 0;
return TRUE; return TRUE;
} }
......
...@@ -433,7 +433,8 @@ PPD *PSDRV_ParsePPD(char *fname) ...@@ -433,7 +433,8 @@ PPD *PSDRV_ParsePPD(char *fname)
TRACE(psdrv, "ColorDevice = %d\n", (int)ppd->ColorDevice); TRACE(psdrv, "ColorDevice = %d\n", (int)ppd->ColorDevice);
} }
else if(!strcmp("*DefaultResolution", tuple.key)) { else if((!strcmp("*DefaultResolution", tuple.key)) ||
(!strcmp("*DefaultJCLResolution", tuple.key))) {
sscanf(tuple.value, "%d", &(ppd->DefaultResolution)); sscanf(tuple.value, "%d", &(ppd->DefaultResolution));
TRACE(psdrv, "DefaultResolution = %d\n", ppd->DefaultResolution); TRACE(psdrv, "DefaultResolution = %d\n", ppd->DefaultResolution);
} }
...@@ -628,6 +629,8 @@ PPD *PSDRV_ParsePPD(char *fname) ...@@ -628,6 +629,8 @@ PPD *PSDRV_ParsePPD(char *fname)
PAGESIZE *page; PAGESIZE *page;
CONSTRAINT *con; CONSTRAINT *con;
INPUTSLOT *slot; INPUTSLOT *slot;
OPTION *option;
OPTIONENTRY *optionEntry;
for(fn = ppd->InstalledFonts; fn; fn = fn->next) for(fn = ppd->InstalledFonts; fn; fn = fn->next)
TRACE(psdrv, "'%s'\n", fn->Name); TRACE(psdrv, "'%s'\n", fn->Name);
...@@ -645,11 +648,20 @@ PPD *PSDRV_ParsePPD(char *fname) ...@@ -645,11 +648,20 @@ PPD *PSDRV_ParsePPD(char *fname)
} }
for(con = ppd->Constraints; con; con = con->next) for(con = ppd->Constraints; con; con = con->next)
TRACE(psdrv, "%s %s %s %s\n", con->Feature1, con->Value1, TRACE(psdrv, "CONSTRAINTS@ %s %s %s %s\n", con->Feature1,
con->Feature2, con->Value2); con->Value1, con->Feature2, con->Value2);
for(option = ppd->InstalledOptions; option; option = option->next) {
TRACE(psdrv, "OPTION: %s %s %s\n", option->OptionName,
option->FullName, option->DefaultOption);
for(optionEntry = option->Options; optionEntry;
optionEntry = optionEntry->next)
TRACE(psdrv, "\tOPTIONENTRY: %s %s %s\n", optionEntry->Name,
optionEntry->FullName, optionEntry->InvocationString);
}
for(slot = ppd->InputSlots; slot; slot = slot->next) for(slot = ppd->InputSlots; slot; slot = slot->next)
TRACE(psdrv, "Slot '%s' Name '%s' (%d) Invocation '%s'\n", TRACE(psdrv, "INPUTSLOTS '%s' Name '%s' (%d) Invocation '%s'\n",
slot->Name, slot->FullName, slot->WinBin, slot->Name, slot->FullName, slot->WinBin,
slot->InvocationString); slot->InvocationString);
} }
......
...@@ -286,7 +286,7 @@ INT PSDRV_WriteHeader( DC *dc, char *title, int len ) ...@@ -286,7 +286,7 @@ INT PSDRV_WriteHeader( DC *dc, char *title, int len )
return 0; return 0;
} }
if(physDev->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE) { if(physDev->Devmode->dmPublic.u1.s1.dmOrientation == DMORIENT_LANDSCAPE) {
/* BBox co-ords are in default user co-ord system so urx < ury even in /* BBox co-ords are in default user co-ord system so urx < ury even in
landscape mode */ landscape mode */
urx = (int) (dc->w.devCaps->vertSize * 72.0 / 25.4); urx = (int) (dc->w.devCaps->vertSize * 72.0 / 25.4);
...@@ -348,7 +348,7 @@ INT PSDRV_WriteHeader( DC *dc, char *title, int len ) ...@@ -348,7 +348,7 @@ INT PSDRV_WriteHeader( DC *dc, char *title, int len )
} }
for(page = physDev->pi->ppd->PageSizes; page; page = page->next) { for(page = physDev->pi->ppd->PageSizes; page; page = page->next) {
if(page->WinPage == physDev->Devmode->dmPublic.dmPaperSize) { if(page->WinPage == physDev->Devmode->dmPublic.u1.s1.dmPaperSize) {
if(page->InvocationString) { if(page->InvocationString) {
PSDRV_WriteFeature(physDev->job.hJob, "*PageSize", page->Name, PSDRV_WriteFeature(physDev->job.hJob, "*PageSize", page->Name,
page->InvocationString); page->InvocationString);
...@@ -419,7 +419,7 @@ INT PSDRV_WriteNewPage( DC *dc ) ...@@ -419,7 +419,7 @@ INT PSDRV_WriteNewPage( DC *dc )
return 0; return 0;
} }
if(physDev->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE) { if(physDev->Devmode->dmPublic.u1.s1.dmOrientation == DMORIENT_LANDSCAPE) {
if(physDev->pi->ppd->LandscapeOrientation == -90) { if(physDev->pi->ppd->LandscapeOrientation == -90) {
xtrans = dc->w.devCaps->vertRes; xtrans = dc->w.devCaps->vertRes;
ytrans = dc->w.devCaps->horzRes; ytrans = dc->w.devCaps->horzRes;
......
...@@ -17,21 +17,26 @@ DEFAULT_DEBUG_CHANNEL(ttydrv) ...@@ -17,21 +17,26 @@ DEFAULT_DEBUG_CHANNEL(ttydrv)
static const DC_FUNCTIONS TTYDRV_DC_Driver = static const DC_FUNCTIONS TTYDRV_DC_Driver =
{ {
NULL, /* pAbortDoc */
NULL, /* pArc */ NULL, /* pArc */
NULL, /* pBitBlt */ NULL, /* pBitBlt */
NULL, /* pBitmapBits */ NULL, /* pBitmapBits */
NULL, /* pChord */ NULL, /* pChord */
NULL, /* pCreateBitmap */ NULL, /* pCreateBitmap */
TTYDRV_DC_CreateDC, /* pCreateDC */ TTYDRV_DC_CreateDC, /* pCreateDC */
TTYDRV_DC_DeleteDC, /* pDeleteDC */
NULL, /* pCreateDIBSection */ NULL, /* pCreateDIBSection */
NULL, /* pCreateDIBSection16 */ NULL, /* pCreateDIBSection16 */
TTYDRV_DC_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */ NULL, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEnumDeviceFonts */ NULL, /* pEnumDeviceFonts */
TTYDRV_DC_Escape, /* pEscape */ TTYDRV_DC_Escape, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExcludeVisRect */ NULL, /* pExcludeVisRect */
NULL, /* pExtDeviceMode */
NULL, /* pExtFloodFill */ NULL, /* pExtFloodFill */
NULL, /* pExtTextOut */ NULL, /* pExtTextOut */
NULL, /* pGetCharWidth */ NULL, /* pGetCharWidth */
...@@ -83,6 +88,8 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver = ...@@ -83,6 +88,8 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
NULL, /* pSetViewportOrg (optional) */ NULL, /* pSetViewportOrg (optional) */
NULL, /* pSetWindowExt (optional) */ NULL, /* pSetWindowExt (optional) */
NULL, /* pSetWindowOrg (optional) */ NULL, /* pSetWindowOrg (optional) */
NULL, /* pStartDoc */
NULL, /* pStartPage */
NULL, /* pStretchBlt */ NULL, /* pStretchBlt */
NULL /* pStretchDIBits */ NULL /* pStretchDIBits */
}; };
...@@ -172,7 +179,7 @@ void TTYDRV_GDI_Finalize(void) ...@@ -172,7 +179,7 @@ void TTYDRV_GDI_Finalize(void)
* TTYDRV_DC_CreateDC * TTYDRV_DC_CreateDC
*/ */
BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device, BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16 *initData) LPCSTR output, const DEVMODEA *initData)
{ {
FIXME(ttydrv, "(%p, %s, %s, %s, %p): semistub\n", FIXME(ttydrv, "(%p, %s, %s, %s, %p): semistub\n",
dc, debugstr_a(driver), debugstr_a(device), dc, debugstr_a(driver), debugstr_a(device),
......
...@@ -38,26 +38,31 @@ LPDRAWMODE win16drv_DrawModeP; ...@@ -38,26 +38,31 @@ LPDRAWMODE win16drv_DrawModeP;
static BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, static BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16* initData ); LPCSTR output, const DEVMODEA* initData );
static INT WIN16DRV_Escape( DC *dc, INT nEscape, INT cbInput, static INT WIN16DRV_Escape( DC *dc, INT nEscape, INT cbInput,
SEGPTR lpInData, SEGPTR lpOutData ); SEGPTR lpInData, SEGPTR lpOutData );
static const DC_FUNCTIONS WIN16DRV_Funcs = static const DC_FUNCTIONS WIN16DRV_Funcs =
{ {
NULL, /* pAbortDoc */
NULL, /* pArc */ NULL, /* pArc */
NULL, /* pBitBlt */ NULL, /* pBitBlt */
NULL, /* pBitmapBits */ NULL, /* pBitmapBits */
NULL, /* pChord */ NULL, /* pChord */
NULL, /* pCreateBitmap */ NULL, /* pCreateBitmap */
WIN16DRV_CreateDC, /* pCreateDC */ WIN16DRV_CreateDC, /* pCreateDC */
NULL, /* pDeleteDC */
NULL, /* pCreateDIBSection */ NULL, /* pCreateDIBSection */
NULL, /* pCreateDIBSection16 */ NULL, /* pCreateDIBSection16 */
NULL, /* pDeleteDC */
NULL, /* pDeleteObject */ NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
WIN16DRV_Ellipse, /* pEllipse */ WIN16DRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
WIN16DRV_EnumDeviceFonts, /* pEnumDeviceFonts */ WIN16DRV_EnumDeviceFonts, /* pEnumDeviceFonts */
WIN16DRV_Escape, /* pEscape */ WIN16DRV_Escape, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */
NULL, /* pExtFloodFill */ NULL, /* pExtFloodFill */
WIN16DRV_ExtTextOut, /* pExtTextOut */ WIN16DRV_ExtTextOut, /* pExtTextOut */
NULL, /* pFillRgn */ NULL, /* pFillRgn */
...@@ -111,6 +116,8 @@ static const DC_FUNCTIONS WIN16DRV_Funcs = ...@@ -111,6 +116,8 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL, /* pSetViewportOrgEx */ NULL, /* pSetViewportOrgEx */
NULL, /* pSetWindowExtEx */ NULL, /* pSetWindowExtEx */
NULL, /* pSetWindowOrgEx */ NULL, /* pSetWindowOrgEx */
NULL, /* pStartDoc */
NULL, /* pStartPage */
NULL, /* pStretchBlt */ NULL, /* pStretchBlt */
NULL /* pStretchDIBits */ NULL /* pStretchDIBits */
}; };
...@@ -164,7 +171,7 @@ void InitDrawMode(LPDRAWMODE lpDrawMode) ...@@ -164,7 +171,7 @@ void InitDrawMode(LPDRAWMODE lpDrawMode)
} }
BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODE16* initData ) const DEVMODEA* initData )
{ {
LOADED_PRINTER_DRIVER *pLPD; LOADED_PRINTER_DRIVER *pLPD;
WORD wRet; WORD wRet;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
DEFAULT_DEBUG_CHANNEL(x11drv) DEFAULT_DEBUG_CHANNEL(x11drv)
static BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, static BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16* initData ); LPCSTR output, const DEVMODEA* initData );
static BOOL X11DRV_DeleteDC( DC *dc ); static BOOL X11DRV_DeleteDC( DC *dc );
static INT X11DRV_Escape( DC *dc, INT nEscape, INT cbInput, static INT X11DRV_Escape( DC *dc, INT nEscape, INT cbInput,
...@@ -32,20 +32,25 @@ static INT X11DRV_Escape( DC *dc, INT nEscape, INT cbInput, ...@@ -32,20 +32,25 @@ static INT X11DRV_Escape( DC *dc, INT nEscape, INT cbInput,
static const DC_FUNCTIONS X11DRV_Funcs = static const DC_FUNCTIONS X11DRV_Funcs =
{ {
NULL, /* pAbortDoc */
X11DRV_Arc, /* pArc */ X11DRV_Arc, /* pArc */
X11DRV_BitBlt, /* pBitBlt */ X11DRV_BitBlt, /* pBitBlt */
X11DRV_BitmapBits, /* pBitmapBits */ X11DRV_BitmapBits, /* pBitmapBits */
X11DRV_Chord, /* pChord */ X11DRV_Chord, /* pChord */
X11DRV_CreateBitmap, /* pCreateBitmap */ X11DRV_CreateBitmap, /* pCreateBitmap */
X11DRV_CreateDC, /* pCreateDC */ X11DRV_CreateDC, /* pCreateDC */
X11DRV_DeleteDC, /* pDeleteDC */
X11DRV_DIB_CreateDIBSection, /* pCreateDIBSection */ X11DRV_DIB_CreateDIBSection, /* pCreateDIBSection */
X11DRV_DIB_CreateDIBSection16, /* pCreateDIBSection16 */ X11DRV_DIB_CreateDIBSection16, /* pCreateDIBSection16 */
X11DRV_DeleteDC, /* pDeleteDC */
X11DRV_DeleteObject, /* pDeleteObject */ X11DRV_DeleteObject, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
X11DRV_Ellipse, /* pEllipse */ X11DRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
X11DRV_EnumDeviceFonts, /* pEnumDeviceFonts */ X11DRV_EnumDeviceFonts, /* pEnumDeviceFonts */
X11DRV_Escape, /* pEscape */ X11DRV_Escape, /* pEscape */
NULL, /* pExcludeClipRect */ NULL, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */
X11DRV_ExtFloodFill, /* pExtFloodFill */ X11DRV_ExtFloodFill, /* pExtFloodFill */
X11DRV_ExtTextOut, /* pExtTextOut */ X11DRV_ExtTextOut, /* pExtTextOut */
NULL, /* pFillRgn */ NULL, /* pFillRgn */
...@@ -99,6 +104,8 @@ static const DC_FUNCTIONS X11DRV_Funcs = ...@@ -99,6 +104,8 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL, /* pSetViewportOrg (optional) */ NULL, /* pSetViewportOrg (optional) */
NULL, /* pSetWindowExt (optional) */ NULL, /* pSetWindowExt (optional) */
NULL, /* pSetWindowOrg (optional) */ NULL, /* pSetWindowOrg (optional) */
NULL, /* pStartDoc */
NULL, /* pStartPage */
X11DRV_StretchBlt, /* pStretchBlt */ X11DRV_StretchBlt, /* pStretchBlt */
NULL /* pStretchDIBits */ NULL /* pStretchDIBits */
}; };
...@@ -208,7 +215,7 @@ void X11DRV_GDI_Finalize(void) ...@@ -208,7 +215,7 @@ void X11DRV_GDI_Finalize(void)
* X11DRV_CreateDC * X11DRV_CreateDC
*/ */
static BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, static BOOL X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODE16* initData ) LPCSTR output, const DEVMODEA* initData )
{ {
X11DRV_PDEVICE *physDev; X11DRV_PDEVICE *physDev;
......
...@@ -162,11 +162,12 @@ int dbch_win16drv = 150; ...@@ -162,11 +162,12 @@ int dbch_win16drv = 150;
int dbch_win32 = 151; int dbch_win32 = 151;
int dbch_wing = 152; int dbch_wing = 152;
int dbch_winsock = 153; int dbch_winsock = 153;
int dbch_wnet = 154; int dbch_winspool = 154;
int dbch_x11 = 155; int dbch_wnet = 155;
int dbch_x11drv = 156; int dbch_x11 = 156;
int dbch_x11drv = 157;
#define DEBUG_CHANNEL_COUNT 157 #define DEBUG_CHANNEL_COUNT 158
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = { char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0}, {1, 1, 0, 0},
...@@ -325,6 +326,7 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = { ...@@ -325,6 +326,7 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0}, {1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0} {1, 1, 0, 0}
}; };
...@@ -483,6 +485,7 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = { ...@@ -483,6 +485,7 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
"win32", "win32",
"wing", "wing",
"winsock", "winsock",
"winspool",
"wnet", "wnet",
"x11", "x11",
"x11drv" "x11drv"
......
...@@ -165,22 +165,28 @@ typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONT16,LPNEWTEXTMETRIC16,UINT16,LPARA ...@@ -165,22 +165,28 @@ typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONT16,LPNEWTEXTMETRIC16,UINT16,LPARA
typedef struct tagDC_FUNCS typedef struct tagDC_FUNCS
{ {
INT (*pAbortDoc)(DC*);
BOOL (*pArc)(DC*,INT,INT,INT,INT,INT,INT,INT,INT); BOOL (*pArc)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);
BOOL (*pBitBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,DWORD); BOOL (*pBitBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,DWORD);
LONG (*pBitmapBits)(HBITMAP,void*,LONG,WORD); LONG (*pBitmapBits)(HBITMAP,void*,LONG,WORD);
BOOL (*pChord)(DC*,INT,INT,INT,INT,INT,INT,INT,INT); BOOL (*pChord)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);
BOOL (*pCreateBitmap)(HBITMAP); BOOL (*pCreateBitmap)(HBITMAP);
BOOL (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODE16*); BOOL (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
BOOL (*pDeleteDC)(DC*);
HBITMAP (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE, HBITMAP (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE,
DWORD); DWORD);
HBITMAP16 (*pCreateDIBSection16)(DC *,BITMAPINFO *,UINT16,SEGPTR *,HANDLE, HBITMAP16 (*pCreateDIBSection16)(DC *,BITMAPINFO *,UINT16,SEGPTR *,HANDLE,
DWORD); DWORD);
BOOL (*pDeleteDC)(DC*);
BOOL (*pDeleteObject)(HGDIOBJ); BOOL (*pDeleteObject)(HGDIOBJ);
DWORD (*pDeviceCapabilities)(LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA);
BOOL (*pEllipse)(DC*,INT,INT,INT,INT); BOOL (*pEllipse)(DC*,INT,INT,INT,INT);
INT (*pEndDoc)(DC*);
INT (*pEndPage)(DC*);
BOOL (*pEnumDeviceFonts)(DC*,LPLOGFONT16,DEVICEFONTENUMPROC,LPARAM); BOOL (*pEnumDeviceFonts)(DC*,LPLOGFONT16,DEVICEFONTENUMPROC,LPARAM);
INT (*pEscape)(DC*,INT,INT,SEGPTR,SEGPTR); INT (*pEscape)(DC*,INT,INT,SEGPTR,SEGPTR);
INT (*pExcludeClipRect)(DC*,INT,INT,INT,INT); INT (*pExcludeClipRect)(DC*,INT,INT,INT,INT);
INT (*pExtDeviceMode)(HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,
DWORD);
BOOL (*pExtFloodFill)(DC*,INT,INT,COLORREF,UINT); BOOL (*pExtFloodFill)(DC*,INT,INT,COLORREF,UINT);
BOOL (*pExtTextOut)(DC*,INT,INT,UINT,const RECT*,LPCSTR,UINT, BOOL (*pExtTextOut)(DC*,INT,INT,UINT,const RECT*,LPCSTR,UINT,
const INT*); const INT*);
...@@ -236,6 +242,8 @@ typedef struct tagDC_FUNCS ...@@ -236,6 +242,8 @@ typedef struct tagDC_FUNCS
BOOL (*pSetViewportOrg)(DC*,INT,INT); BOOL (*pSetViewportOrg)(DC*,INT,INT);
BOOL (*pSetWindowExt)(DC*,INT,INT); BOOL (*pSetWindowExt)(DC*,INT,INT);
BOOL (*pSetWindowOrg)(DC*,INT,INT); BOOL (*pSetWindowOrg)(DC*,INT,INT);
INT (*pStartDoc)(DC*,const DOCINFOA*);
INT (*pStartPage)(DC*);
BOOL (*pStretchBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,INT,INT,DWORD); BOOL (*pStretchBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,INT,INT,DWORD);
INT (*pStretchDIBits)(DC*,INT,INT,INT,INT,INT,INT,INT,INT, INT (*pStretchDIBits)(DC*,INT,INT,INT,INT,INT,INT,INT,INT,
const void *,const BITMAPINFO *,UINT,DWORD); const void *,const BITMAPINFO *,UINT,DWORD);
...@@ -439,5 +447,5 @@ extern GDIOBJHDR * GDI_GetObjPtr( HGDIOBJ16, WORD ); ...@@ -439,5 +447,5 @@ extern GDIOBJHDR * GDI_GetObjPtr( HGDIOBJ16, WORD );
extern BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs ); extern BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs );
extern const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name ); extern const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name );
extern BOOL DRIVER_UnregisterDriver( LPCSTR name ); extern BOOL DRIVER_UnregisterDriver( LPCSTR name );
extern BOOL DRIVER_GetDriverName( LPCSTR device, LPSTR driver, DWORD size );
#endif /* __WINE_GDI_H */ #endif /* __WINE_GDI_H */
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "font.h" #include "font.h"
#include "pen.h" #include "pen.h"
#include "brush.h" #include "brush.h"
#include "wine/wingdi16.h"
typedef struct { typedef struct {
float llx, lly, urx, ury; float llx, lly, urx, ury;
...@@ -142,7 +143,7 @@ typedef struct { ...@@ -142,7 +143,7 @@ typedef struct {
} PPD; } PPD;
typedef struct { typedef struct {
DEVMODE16 dmPublic; DEVMODEA dmPublic;
struct _tagdocprivate { struct _tagdocprivate {
int dummy; int dummy;
} dmDocPrivate; } dmDocPrivate;
...@@ -157,12 +158,12 @@ numInstalledOptions of OPTIONs ...@@ -157,12 +158,12 @@ numInstalledOptions of OPTIONs
*/ */
} PSDRV_DEVMODE16; } PSDRV_DEVMODEA;
typedef struct _tagPI { typedef struct _tagPI {
char *FriendlyName; char *FriendlyName;
PPD *ppd; PPD *ppd;
PSDRV_DEVMODE16 *Devmode; PSDRV_DEVMODEA *Devmode;
FONTFAMILY *Fonts; FONTFAMILY *Fonts;
struct _tagPI *next; struct _tagPI *next;
} PRINTERINFO; } PRINTERINFO;
...@@ -225,14 +226,19 @@ typedef struct { ...@@ -225,14 +226,19 @@ typedef struct {
PSCOLOR bkColor; PSCOLOR bkColor;
PSCOLOR inkColor; /* Last colour set */ PSCOLOR inkColor; /* Last colour set */
JOB job; JOB job;
PSDRV_DEVMODE16 *Devmode; PSDRV_DEVMODEA *Devmode;
PRINTERINFO *pi; PRINTERINFO *pi;
} PSDRV_PDEVICE; } PSDRV_PDEVICE;
extern INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
LPDEVMODEA lpdmOutput, LPSTR lpszDevice, LPSTR lpszPort,
LPDEVMODEA lpdmInput, LPSTR lpszProfile, WORD fwMode);
extern HANDLE PSDRV_Heap; extern HANDLE PSDRV_Heap;
extern char *PSDRV_ANSIVector[256]; extern char *PSDRV_ANSIVector[256];
extern void PSDRV_MergeDevmodes(PSDRV_DEVMODE16 *dm1, PSDRV_DEVMODE16 *dm2, extern void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
PRINTERINFO *pi); PRINTERINFO *pi);
extern BOOL PSDRV_GetFontMetrics(void); extern BOOL PSDRV_GetFontMetrics(void);
extern PPD *PSDRV_ParsePPD(char *fname); extern PPD *PSDRV_ParsePPD(char *fname);
...@@ -340,6 +346,13 @@ extern INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, ...@@ -340,6 +346,13 @@ extern INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst,
INT ySrc, INT widthSrc, INT heightSrc, INT ySrc, INT widthSrc, INT heightSrc,
const void *bits, const BITMAPINFO *info, const void *bits, const BITMAPINFO *info,
UINT wUsage, DWORD dwRop ); UINT wUsage, DWORD dwRop );
extern INT PSDRV_ExtDeviceMode(HWND hwnd, LPDEVMODEA lpdmOutput,
LPSTR lpszDevice, LPSTR lpszPort,
LPDEVMODEA lpdmInput, LPSTR lpszProfile,
DWORD dwMode);
extern DWORD PSDRV_DeviceCapabilities(LPCSTR lpszDevice, LPCSTR lpszPort,
WORD fwCapability, LPSTR lpszOutput,
LPDEVMODEA lpdm);
#endif #endif
......
...@@ -41,7 +41,7 @@ typedef struct { ...@@ -41,7 +41,7 @@ typedef struct {
int dummy; int dummy;
} TTYDRV_PDEVICE; } TTYDRV_PDEVICE;
extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE16 *initData); extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODEA *initData);
extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc); extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc);
extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData); extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData);
......
...@@ -254,37 +254,6 @@ typedef struct ...@@ -254,37 +254,6 @@ typedef struct
typedef INT16 (CALLBACK *MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*, typedef INT16 (CALLBACK *MFENUMPROC16)(HDC16,HANDLETABLE16*,METARECORD*,
INT16,LPARAM); INT16,LPARAM);
typedef struct
{
BYTE dmDeviceName[CCHDEVICENAME];
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
INT16 dmOrientation;
INT16 dmPaperSize;
INT16 dmPaperLength;
INT16 dmPaperWidth;
INT16 dmScale;
INT16 dmCopies;
INT16 dmDefaultSource;
INT16 dmPrintQuality;
INT16 dmColor;
INT16 dmDuplex;
INT16 dmYResolution;
INT16 dmTTOption;
INT16 dmCollate;
BYTE dmFormName[CCHFORMNAME];
WORD dmUnusedPadding;
WORD dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
DWORD dmDisplayFlags;
DWORD dmDisplayFrequency;
} DEVMODE16, *LPDEVMODE16;
typedef struct typedef struct
{ {
INT16 cbSize; INT16 cbSize;
...@@ -294,6 +263,9 @@ typedef struct ...@@ -294,6 +263,9 @@ typedef struct
typedef BOOL16 (CALLBACK* ABORTPROC16)(HDC16, INT16); typedef BOOL16 (CALLBACK* ABORTPROC16)(HDC16, INT16);
#define INT_PD_DEFAULT_DEVMODE 1
#define INT_PD_DEFAULT_MODEL 2
#include "poppack.h" #include "poppack.h"
...@@ -314,7 +286,7 @@ HBITMAP16 WINAPI CreateBitmapIndirect16(const BITMAP16*); ...@@ -314,7 +286,7 @@ HBITMAP16 WINAPI CreateBitmapIndirect16(const BITMAP16*);
HBRUSH16 WINAPI CreateBrushIndirect16(const LOGBRUSH16*); HBRUSH16 WINAPI CreateBrushIndirect16(const LOGBRUSH16*);
HBITMAP16 WINAPI CreateCompatibleBitmap16(HDC16,INT16,INT16); HBITMAP16 WINAPI CreateCompatibleBitmap16(HDC16,INT16,INT16);
HDC16 WINAPI CreateCompatibleDC16(HDC16); HDC16 WINAPI CreateCompatibleDC16(HDC16);
HDC16 WINAPI CreateDC16(LPCSTR,LPCSTR,LPCSTR,const DEVMODE16*); HDC16 WINAPI CreateDC16(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
HBITMAP16 WINAPI CreateDIBitmap16(HDC16,const BITMAPINFOHEADER*,DWORD, HBITMAP16 WINAPI CreateDIBitmap16(HDC16,const BITMAPINFOHEADER*,DWORD,
LPCVOID,const BITMAPINFO*,UINT16); LPCVOID,const BITMAPINFO*,UINT16);
HBRUSH16 WINAPI CreateDIBPatternBrush16(HGLOBAL16,UINT16); HBRUSH16 WINAPI CreateDIBPatternBrush16(HGLOBAL16,UINT16);
...@@ -327,7 +299,7 @@ HFONT16 WINAPI CreateFont16(INT16,INT16,INT16,INT16,INT16,BYTE,BYTE,BYTE, ...@@ -327,7 +299,7 @@ HFONT16 WINAPI CreateFont16(INT16,INT16,INT16,INT16,INT16,BYTE,BYTE,BYTE,
BYTE,BYTE,BYTE,BYTE,BYTE,LPCSTR); BYTE,BYTE,BYTE,BYTE,BYTE,LPCSTR);
HFONT16 WINAPI CreateFontIndirect16(const LOGFONT16*); HFONT16 WINAPI CreateFontIndirect16(const LOGFONT16*);
HBRUSH16 WINAPI CreateHatchBrush16(INT16,COLORREF); HBRUSH16 WINAPI CreateHatchBrush16(INT16,COLORREF);
HDC16 WINAPI CreateIC16(LPCSTR,LPCSTR,LPCSTR,const DEVMODE16*); HDC16 WINAPI CreateIC16(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
HDC16 WINAPI CreateMetaFile16(LPCSTR); HDC16 WINAPI CreateMetaFile16(LPCSTR);
HPALETTE16 WINAPI CreatePalette16(const LOGPALETTE*); HPALETTE16 WINAPI CreatePalette16(const LOGPALETTE*);
HBRUSH16 WINAPI CreatePatternBrush16(HBITMAP16); HBRUSH16 WINAPI CreatePatternBrush16(HBITMAP16);
...@@ -392,7 +364,7 @@ HDC16 WINAPI GetDCState16(HDC16); ...@@ -392,7 +364,7 @@ HDC16 WINAPI GetDCState16(HDC16);
INT16 WINAPI GetDeviceCaps16(HDC16,INT16); INT16 WINAPI GetDeviceCaps16(HDC16,INT16);
UINT16 WINAPI GetDIBColorTable16(HDC16,UINT16,UINT16,RGBQUAD*); UINT16 WINAPI GetDIBColorTable16(HDC16,UINT16,UINT16,RGBQUAD*);
INT16 WINAPI GetDIBits16(HDC16,HBITMAP16,UINT16,UINT16,LPVOID,LPBITMAPINFO,UINT16); INT16 WINAPI GetDIBits16(HDC16,HBITMAP16,UINT16,UINT16,LPVOID,LPBITMAPINFO,UINT16);
INT16 WINAPI GetEnvironment16(LPCSTR,LPDEVMODE16,UINT16); INT16 WINAPI GetEnvironment16(LPCSTR,LPDEVMODEA,UINT16);
DWORD WINAPI GetFontLanguageInfo16(HDC16); DWORD WINAPI GetFontLanguageInfo16(HDC16);
DWORD WINAPI GetGlyphOutline16(HDC16,UINT16,UINT16,LPGLYPHMETRICS16,DWORD,LPVOID,const MAT2*); DWORD WINAPI GetGlyphOutline16(HDC16,UINT16,UINT16,LPGLYPHMETRICS16,DWORD,LPVOID,const MAT2*);
INT16 WINAPI GetKerningPairs16(HDC16,INT16,LPKERNINGPAIR16); INT16 WINAPI GetKerningPairs16(HDC16,INT16,LPKERNINGPAIR16);
...@@ -472,7 +444,7 @@ BOOL16 WINAPI Rectangle16(HDC16,INT16,INT16,INT16,INT16); ...@@ -472,7 +444,7 @@ BOOL16 WINAPI Rectangle16(HDC16,INT16,INT16,INT16,INT16);
BOOL16 WINAPI RectInRegion16(HRGN16,const RECT16 *); BOOL16 WINAPI RectInRegion16(HRGN16,const RECT16 *);
BOOL16 WINAPI RectVisible16(HDC16,const RECT16*); BOOL16 WINAPI RectVisible16(HDC16,const RECT16*);
BOOL16 WINAPI RemoveFontResource16(SEGPTR); BOOL16 WINAPI RemoveFontResource16(SEGPTR);
HDC16 WINAPI ResetDC16(HDC16,const DEVMODE16 *); HDC16 WINAPI ResetDC16(HDC16,const DEVMODEA *);
BOOL16 WINAPI ResizePalette16(HPALETTE16,UINT16); BOOL16 WINAPI ResizePalette16(HPALETTE16,UINT16);
BOOL16 WINAPI RestoreDC16(HDC16,INT16); BOOL16 WINAPI RestoreDC16(HDC16,INT16);
INT16 WINAPI RestoreVisRgn16(HDC16); INT16 WINAPI RestoreVisRgn16(HDC16);
...@@ -506,7 +478,7 @@ UINT16 WINAPI SetDIBColorTable16(HDC16,UINT16,UINT16,RGBQUAD*); ...@@ -506,7 +478,7 @@ UINT16 WINAPI SetDIBColorTable16(HDC16,UINT16,UINT16,RGBQUAD*);
INT16 WINAPI SetDIBits16(HDC16,HBITMAP16,UINT16,UINT16,LPCVOID,const BITMAPINFO*,UINT16); INT16 WINAPI SetDIBits16(HDC16,HBITMAP16,UINT16,UINT16,LPCVOID,const BITMAPINFO*,UINT16);
INT16 WINAPI SetDIBitsToDevice16(HDC16,INT16,INT16,INT16,INT16,INT16, INT16 WINAPI SetDIBitsToDevice16(HDC16,INT16,INT16,INT16,INT16,INT16,
INT16,UINT16,UINT16,LPCVOID,const BITMAPINFO*,UINT16); INT16,UINT16,UINT16,LPCVOID,const BITMAPINFO*,UINT16);
INT16 WINAPI SetEnvironment16(LPCSTR,LPDEVMODE16,UINT16); INT16 WINAPI SetEnvironment16(LPCSTR,LPDEVMODEA,UINT16);
WORD WINAPI SetHookFlags16(HDC16,WORD); WORD WINAPI SetHookFlags16(HDC16,WORD);
INT16 WINAPI SetMapMode16(HDC16,INT16); INT16 WINAPI SetMapMode16(HDC16,INT16);
DWORD WINAPI SetMapperFlags16(HDC16,DWORD); DWORD WINAPI SetMapperFlags16(HDC16,DWORD);
......
...@@ -2625,10 +2625,15 @@ typedef struct ...@@ -2625,10 +2625,15 @@ typedef struct
WORD dmSize; WORD dmSize;
WORD dmDriverExtra; WORD dmDriverExtra;
DWORD dmFields; DWORD dmFields;
union {
struct {
SHORT dmOrientation; SHORT dmOrientation;
SHORT dmPaperSize; SHORT dmPaperSize;
SHORT dmPaperLength; SHORT dmPaperLength;
SHORT dmPaperWidth; SHORT dmPaperWidth;
} s1;
POINTL dmPosition;
} u1;
SHORT dmScale; SHORT dmScale;
SHORT dmCopies; SHORT dmCopies;
SHORT dmDefaultSource; SHORT dmDefaultSource;
...@@ -2663,10 +2668,15 @@ typedef struct ...@@ -2663,10 +2668,15 @@ typedef struct
WORD dmSize; WORD dmSize;
WORD dmDriverExtra; WORD dmDriverExtra;
DWORD dmFields; DWORD dmFields;
union {
struct {
SHORT dmOrientation; SHORT dmOrientation;
SHORT dmPaperSize; SHORT dmPaperSize;
SHORT dmPaperLength; SHORT dmPaperLength;
SHORT dmPaperWidth; SHORT dmPaperWidth;
} s1;
POINTL dmPosition;
} u1;
SHORT dmScale; SHORT dmScale;
SHORT dmCopies; SHORT dmCopies;
SHORT dmDefaultSource; SHORT dmDefaultSource;
...@@ -2713,6 +2723,7 @@ DECL_WINELIB_TYPE_AW(LPDEVMODE) ...@@ -2713,6 +2723,7 @@ DECL_WINELIB_TYPE_AW(LPDEVMODE)
#define DM_PAPERLENGTH 0x00000004L #define DM_PAPERLENGTH 0x00000004L
#define DM_PAPERWIDTH 0x00000008L #define DM_PAPERWIDTH 0x00000008L
#define DM_SCALE 0x00000010L #define DM_SCALE 0x00000010L
#define DM_POSITION 0x00000020L
#define DM_COPIES 0x00000100L #define DM_COPIES 0x00000100L
#define DM_DEFAULTSOURCE 0x00000200L #define DM_DEFAULTSOURCE 0x00000200L
#define DM_PRINTQUALITY 0x00000400L #define DM_PRINTQUALITY 0x00000400L
...@@ -2720,17 +2731,20 @@ DECL_WINELIB_TYPE_AW(LPDEVMODE) ...@@ -2720,17 +2731,20 @@ DECL_WINELIB_TYPE_AW(LPDEVMODE)
#define DM_DUPLEX 0x00001000L #define DM_DUPLEX 0x00001000L
#define DM_YRESOLUTION 0x00002000L #define DM_YRESOLUTION 0x00002000L
#define DM_TTOPTION 0x00004000L #define DM_TTOPTION 0x00004000L
#define DM_COLLATE 0x00008000L
#define DM_FORMNAME 0x00010000L
#define DM_LOGPIXELS 0x00020000L
#define DM_BITSPERPEL 0x00040000L #define DM_BITSPERPEL 0x00040000L
#define DM_PELSWIDTH 0x00080000L #define DM_PELSWIDTH 0x00080000L
#define DM_PELSHEIGHT 0x00100000L #define DM_PELSHEIGHT 0x00100000L
#define DM_DISPLAYFLAGS 0x00200000L #define DM_DISPLAYFLAGS 0x00200000L
#define DM_DISPLAYFREQUENCY 0x00400000L #define DM_DISPLAYFREQUENCY 0x00400000L
#define DM_PANNINGHEIGHT 0x00800000L #define DM_ICMMETHOD 0x00800000L
#define DM_PANNINGWIDTH 0x01000000L #define DM_ICMINTENT 0x01000000L
#define DM_ICMMETHOD 0x02000000L #define DM_MEDIATYPE 0x02000000L
#define DM_ICMINTENT 0x04000000L #define DM_DITHERTYPE 0x04000000L
#define DM_MEDIATYPE 0x08000000L #define DM_PANNINGWIDTH 0x08000000L
#define DM_DITHERTYPE 0x10000000L #define DM_PANNINGHEIGHT 0x10000000L
#define DMORIENT_PORTRAIT 1 #define DMORIENT_PORTRAIT 1
#define DMORIENT_LANDSCAPE 2 #define DMORIENT_LANDSCAPE 2
...@@ -3029,6 +3043,10 @@ BOOL WINAPI FixBrushOrgEx(HDC,INT,INT,LPPOINT); ...@@ -3029,6 +3043,10 @@ BOOL WINAPI FixBrushOrgEx(HDC,INT,INT,LPPOINT);
BOOL WINAPI FlattenPath(HDC); BOOL WINAPI FlattenPath(HDC);
BOOL WINAPI FloodFill(HDC,INT,INT,COLORREF); BOOL WINAPI FloodFill(HDC,INT,INT,COLORREF);
BOOL WINAPI FrameRgn(HDC,HRGN,HBRUSH,INT,INT); BOOL WINAPI FrameRgn(HDC,HRGN,HBRUSH,INT,INT);
DWORD WINAPI GDI_CallDeviceCapabilities16(LPCSTR,LPCSTR,WORD,LPSTR,
LPDEVMODEA);
INT WINAPI GDI_CallExtDeviceMode16(HWND,LPDEVMODEA,LPSTR,LPSTR,
LPDEVMODEA,LPSTR,DWORD);
BOOL WINAPI GdiComment(HDC,UINT,const BYTE *); BOOL WINAPI GdiComment(HDC,UINT,const BYTE *);
INT WINAPI GetArcDirection(HDC); INT WINAPI GetArcDirection(HDC);
BOOL WINAPI GetAspectRatioFilterEx(HDC,LPSIZE); BOOL WINAPI GetAspectRatioFilterEx(HDC,LPSIZE);
......
...@@ -17,8 +17,6 @@ extern "C" { ...@@ -17,8 +17,6 @@ extern "C" {
#endif #endif
/* DEFINES */ /* DEFINES */
#define INT_PD_DEFAULT_DEVMODE 1
#define INT_PD_DEFAULT_MODEL 2
#define PRINTER_ATTRIBUTE_QUEUED 0x00000001 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
#define PRINTER_ATTRIBUTE_DIRECT 0x00000002 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
...@@ -234,8 +232,8 @@ int WINAPI EndSpoolPage16(HANDLE16 hJob); ...@@ -234,8 +232,8 @@ int WINAPI EndSpoolPage16(HANDLE16 hJob);
DWORD WINAPI GetSpoolJob16(int nOption, LONG param); DWORD WINAPI GetSpoolJob16(int nOption, LONG param);
int WINAPI WriteDialog16(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg); int WINAPI WriteDialog16(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg);
INT WINAPI DeviceCapabilitiesA(LPCSTR printer,LPCSTR target,WORD z, INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability,
LPSTR a,LPDEVMODEA b); LPSTR pOutput, LPDEVMODEA pDevMode);
INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort, INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
WORD fwCapability, LPWSTR pOutput, WORD fwCapability, LPWSTR pOutput,
const DEVMODEW *pDevMode); const DEVMODEW *pDevMode);
......
...@@ -24,7 +24,6 @@ C_SRCS = \ ...@@ -24,7 +24,6 @@ C_SRCS = \
registry.c \ registry.c \
shell.c \ shell.c \
sound.c \ sound.c \
spooler.c \
spy.c \ spy.c \
stress.c \ stress.c \
string.c \ string.c \
......
...@@ -503,12 +503,18 @@ BOOL WINAPI RestoreDC( HDC hdc, INT level ) ...@@ -503,12 +503,18 @@ BOOL WINAPI RestoreDC( HDC hdc, INT level )
* CreateDC16 (GDI.53) * CreateDC16 (GDI.53)
*/ */
HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output, HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODE16 *initData ) const DEVMODEA *initData )
{ {
DC * dc; DC * dc;
const DC_FUNCTIONS *funcs; const DC_FUNCTIONS *funcs;
char buf[300];
if (device) {
if(!DRIVER_GetDriverName( device, buf, sizeof(buf) )) return 0;
} else
strcpy(buf, driver);
if (!(funcs = DRIVER_FindDriver( driver ))) return 0; if (!(funcs = DRIVER_FindDriver( buf ))) return 0;
if (!(dc = DC_AllocDC( funcs ))) return 0; if (!(dc = DC_AllocDC( funcs ))) return 0;
dc->w.flags = 0; dc->w.flags = 0;
...@@ -535,7 +541,7 @@ HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output, ...@@ -535,7 +541,7 @@ HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output,
HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output, HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA *initData ) const DEVMODEA *initData )
{ {
return CreateDC16( driver, device, output, (const DEVMODE16 *)initData ); return CreateDC16( driver, device, output, (const DEVMODEA *)initData );
} }
...@@ -549,7 +555,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ...@@ -549,7 +555,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
LPSTR deviceA = HEAP_strdupWtoA( GetProcessHeap(), 0, device ); LPSTR deviceA = HEAP_strdupWtoA( GetProcessHeap(), 0, device );
LPSTR outputA = HEAP_strdupWtoA( GetProcessHeap(), 0, output ); LPSTR outputA = HEAP_strdupWtoA( GetProcessHeap(), 0, output );
HDC res = CreateDC16( driverA, deviceA, outputA, HDC res = CreateDC16( driverA, deviceA, outputA,
(const DEVMODE16 *)initData /*FIXME*/ ); (const DEVMODEA *)initData /*FIXME*/ );
HeapFree( GetProcessHeap(), 0, driverA ); HeapFree( GetProcessHeap(), 0, driverA );
HeapFree( GetProcessHeap(), 0, deviceA ); HeapFree( GetProcessHeap(), 0, deviceA );
HeapFree( GetProcessHeap(), 0, outputA ); HeapFree( GetProcessHeap(), 0, outputA );
...@@ -561,7 +567,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ...@@ -561,7 +567,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
* CreateIC16 (GDI.153) * CreateIC16 (GDI.153)
*/ */
HDC16 WINAPI CreateIC16( LPCSTR driver, LPCSTR device, LPCSTR output, HDC16 WINAPI CreateIC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODE16* initData ) const DEVMODEA* initData )
{ {
/* Nothing special yet for ICs */ /* Nothing special yet for ICs */
return CreateDC16( driver, device, output, initData ); return CreateDC16( driver, device, output, initData );
...@@ -702,7 +708,7 @@ BOOL WINAPI DeleteDC( HDC hdc ) ...@@ -702,7 +708,7 @@ BOOL WINAPI DeleteDC( HDC hdc )
/*********************************************************************** /***********************************************************************
* ResetDC16 (GDI.376) * ResetDC16 (GDI.376)
*/ */
HDC16 WINAPI ResetDC16( HDC16 hdc, const DEVMODE16 *devmode ) HDC16 WINAPI ResetDC16( HDC16 hdc, const DEVMODEA *devmode )
{ {
FIXME(dc, "stub\n" ); FIXME(dc, "stub\n" );
return hdc; return hdc;
...@@ -745,9 +751,33 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap ) ...@@ -745,9 +751,33 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
INT ret; INT ret;
POINT pt;
if (!dc) return 0; if (!dc) return 0;
/* Device capabilities for the printer */
switch (cap)
{
case PHYSICALWIDTH:
if(Escape(hdc, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
return pt.x;
case PHYSICALHEIGHT:
if(Escape(hdc, GETPHYSPAGESIZE, 0, NULL, (LPVOID)&pt) > 0)
return pt.y;
case PHYSICALOFFSETX:
if(Escape(hdc, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
return pt.x;
case PHYSICALOFFSETY:
if(Escape(hdc, GETPRINTINGOFFSET, 0, NULL, (LPVOID)&pt) > 0)
return pt.y;
case SCALINGFACTORX:
if(Escape(hdc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
return pt.x;
case SCALINGFACTORY:
if(Escape(hdc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0)
return pt.y;
}
if ((cap < 0) || (cap > sizeof(DeviceCaps)-sizeof(WORD))) if ((cap < 0) || (cap > sizeof(DeviceCaps)-sizeof(WORD)))
{ {
GDI_HEAP_UNLOCK( hdc ); GDI_HEAP_UNLOCK( hdc );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment