Commit 01fdc50f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Remove no longer used printer config driver entry points.

parent 689046b2
......@@ -636,13 +636,11 @@ const struct gdi_dc_funcs dib_driver =
dibdrv_CreateDC, /* pCreateDC */
dibdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
dibdrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
dibdrv_ExtFloodFill, /* pExtFloodFill */
dibdrv_ExtTextOut, /* pExtTextOut */
......@@ -1201,13 +1199,11 @@ static const struct gdi_dc_funcs window_driver =
windrv_CreateDC, /* pCreateDC */
windrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
windrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
windrv_ExtFloodFill, /* pExtFloodFill */
windrv_ExtTextOut, /* pExtTextOut */
......
......@@ -311,12 +311,6 @@ static BOOL CDECL nulldrv_DeleteObject( PHYSDEV dev, HGDIOBJ obj )
return TRUE;
}
static DWORD CDECL nulldrv_DeviceCapabilities( LPSTR buffer, LPCSTR device, LPCSTR port,
WORD cap, LPSTR output, DEVMODEA *devmode )
{
return -1;
}
static BOOL CDECL nulldrv_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{
return TRUE;
......@@ -337,12 +331,6 @@ static BOOL CDECL nulldrv_EnumFonts( PHYSDEV dev, LOGFONTW *logfont, FONTENUMPRO
return TRUE;
}
static INT CDECL nulldrv_ExtDeviceMode( LPSTR buffer, HWND hwnd, DEVMODEA *output, LPSTR device,
LPSTR port, DEVMODEA *input, LPSTR profile, DWORD mode )
{
return -1;
}
static INT CDECL nulldrv_ExtEscape( PHYSDEV dev, INT escape, INT in_size, const void *in_data,
INT out_size, void *out_data )
{
......@@ -817,13 +805,11 @@ const struct gdi_dc_funcs null_driver =
nulldrv_CreateDC, /* pCreateDC */
nulldrv_DeleteDC, /* pDeleteDC */
nulldrv_DeleteObject, /* pDeleteObject */
nulldrv_DeviceCapabilities, /* pDeviceCapabilities */
nulldrv_Ellipse, /* pEllipse */
nulldrv_EndDoc, /* pEndDoc */
nulldrv_EndPage, /* pEndPage */
nulldrv_EndPath, /* pEndPath */
nulldrv_EnumFonts, /* pEnumFonts */
nulldrv_ExtDeviceMode, /* pExtDeviceMode */
nulldrv_ExtEscape, /* pExtEscape */
nulldrv_ExtFloodFill, /* pExtFloodFill */
nulldrv_ExtTextOut, /* pExtTextOut */
......
......@@ -461,13 +461,11 @@ static const struct gdi_dc_funcs emfdrv_driver =
NULL, /* pCreateDC */
EMFDRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
EMFDRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
NULL, /* pExtFloodFill */
EMFDRV_ExtTextOut, /* pExtTextOut */
......
......@@ -3848,13 +3848,11 @@ const struct gdi_dc_funcs font_driver =
font_CreateDC, /* pCreateDC */
font_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
font_EnumFonts, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
NULL, /* pExtFloodFill */
NULL, /* pExtTextOut */
......
......@@ -2040,13 +2040,11 @@ const struct gdi_dc_funcs path_driver =
pathdrv_CreateDC, /* pCreateDC */
pathdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
pathdrv_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
pathdrv_EndPath, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
NULL, /* pExtFloodFill */
pathdrv_ExtTextOut, /* pExtTextOut */
......
......@@ -297,13 +297,11 @@ static const struct gdi_dc_funcs android_drv_funcs =
ANDROID_CreateDC, /* pCreateDC */
ANDROID_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
NULL, /* pExtFloodFill */
NULL, /* pExtTextOut */
......
......@@ -277,13 +277,11 @@ static const struct gdi_dc_funcs macdrv_funcs =
macdrv_CreateDC, /* pCreateDC */
macdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
NULL, /* pExtFloodFill */
NULL, /* pExtTextOut */
......
......@@ -435,47 +435,6 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
static HPROPSHEETPAGE (WINAPI *pCreatePropertySheetPage) (LPCPROPSHEETPAGEW);
static int (WINAPI *pPropertySheet) (LPCPROPSHEETHEADERW);
/***********************************************************
* DEVMODEdupWtoA
*
* Creates an ascii copy of supplied devmode on the process heap
*
* Copied from dlls/winspool/info.c until full unicodification
*/
static DEVMODEA *DEVMODEdupWtoA( const DEVMODEW *dmW )
{
DEVMODEA *dmA;
DWORD size;
BOOL formname;
/* there is no pointer dereference here, if your code checking tool complains it's broken */
ptrdiff_t off_formname = (const char *)dmW->dmFormName - (const char *)dmW;
if (!dmW) return NULL;
formname = (dmW->dmSize > off_formname);
size = dmW->dmSize - CCHDEVICENAME - (formname ? CCHFORMNAME : 0);
dmA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size + dmW->dmDriverExtra );
WideCharToMultiByte( CP_ACP, 0, dmW->dmDeviceName, -1, (LPSTR)dmA->dmDeviceName,
CCHDEVICENAME, NULL, NULL );
if (!formname)
{
memcpy( &dmA->dmSpecVersion, &dmW->dmSpecVersion,
dmW->dmSize - CCHDEVICENAME * sizeof(WCHAR) );
}
else
{
memcpy( &dmA->dmSpecVersion, &dmW->dmSpecVersion,
off_formname - CCHDEVICENAME * sizeof(WCHAR) );
WideCharToMultiByte( CP_ACP, 0, dmW->dmFormName, -1, (LPSTR)dmA->dmFormName,
CCHFORMNAME, NULL, NULL );
memcpy( &dmA->dmLogPixels, &dmW->dmLogPixels, dmW->dmSize -
(off_formname + CCHFORMNAME * sizeof(WCHAR)) );
}
dmA->dmSize = size;
memcpy( (char *)dmA + dmA->dmSize, (const char *)dmW + dmW->dmSize,
dmW->dmDriverExtra );
return dmA;
}
/******************************************************************************
* DrvDocumentProperties (wineps.drv.@)
*
......@@ -561,112 +520,6 @@ INT WINAPI DrvDocumentProperties(HWND hwnd, const WCHAR *device, DEVMODEW *outpu
return IDOK;
}
INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
LPSTR lpszDevice, LPSTR lpszPort, LPDEVMODEA lpdmInput,
LPSTR lpszProfile, DWORD dwMode)
{
DEVMODEW *outputW = NULL, *inputW = NULL;
WCHAR *device = NULL;
unsigned int len;
int ret;
len = MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, NULL, 0);
if (len) {
device = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, device, len);
}
if (lpdmOutput && (dwMode & (DM_COPY | DM_UPDATE))) {
ret = DrvDocumentProperties(hwnd, device, NULL, NULL, 0);
if (ret <= 0) {
HeapFree(GetProcessHeap(), 0, device);
return -1;
}
outputW = HeapAlloc(GetProcessHeap(), 0, ret);
}
if (lpdmInput) inputW = GdiConvertToDevmodeW( lpdmInput );
ret = DrvDocumentProperties(hwnd, device, outputW, inputW, dwMode);
if (ret >= 0 && outputW && (dwMode & (DM_COPY | DM_UPDATE))) {
DEVMODEA *dmA = DEVMODEdupWtoA( outputW );
if (dmA) memcpy( lpdmOutput, dmA, dmA->dmSize + dmA->dmDriverExtra );
HeapFree( GetProcessHeap(), 0, dmA );
}
HeapFree(GetProcessHeap(), 0, device);
HeapFree(GetProcessHeap(), 0, inputW);
HeapFree(GetProcessHeap(), 0, outputW);
if (!dwMode && ret > 0) ret -= CCHDEVICENAME + CCHFORMNAME;
return ret;
}
/***********************************************************************
* PSDRV_DeviceCapabilities
*
* Retrieves the capabilities of a printer device driver.
*
* Parameters
* lpszDriver -- printer driver name
* lpszDevice -- printer name
* lpszPort -- port name
* fwCapability -- device capability
* lpszOutput -- output buffer
* lpDevMode -- device data buffer
*
* Returns
* Result depends on the setting of fwCapability. -1 indicates failure.
*/
DWORD CDECL PSDRV_DeviceCapabilities(char *driver, const char *device, const char *port,
WORD capability, char *output, DEVMODEA *devmodeA)
{
WCHAR *device_name = NULL;
DEVMODEW *devmode = NULL;
DWORD ret, len;
len = MultiByteToWideChar(CP_ACP, 0, device, -1, NULL, 0);
if (len) {
device_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, device, -1, device_name, len);
}
if (devmodeA) devmode = GdiConvertToDevmodeW( devmodeA );
if (output && (capability == DC_BINNAMES ||
capability == DC_FILEDEPENDENCIES ||
capability == DC_PAPERNAMES)) {
/* These need A -> W translation */
unsigned int size = 0, i;
WCHAR *outputW;
ret = DrvDeviceCapabilities(NULL, device_name, capability, NULL, devmode);
if (ret == -1) return ret;
switch (capability) {
case DC_BINNAMES:
size = 24;
break;
case DC_PAPERNAMES:
case DC_FILEDEPENDENCIES:
size = 64;
break;
}
outputW = HeapAlloc(GetProcessHeap(), 0, size * ret * sizeof(WCHAR));
ret = DrvDeviceCapabilities(NULL, device_name, capability, outputW, devmode);
for (i = 0; i < ret; i++)
WideCharToMultiByte(CP_ACP, 0, outputW + (i * size), -1,
output + (i * size), size, NULL, NULL);
HeapFree(GetProcessHeap(), 0, outputW);
} else {
ret = DrvDeviceCapabilities(NULL, device_name, capability, output, devmode);
}
HeapFree(GetProcessHeap(), 0, device_name);
HeapFree(GetProcessHeap(), 0, devmode);
return ret;
}
/******************************************************************************
* DrvDeviceCapabilities (wineps.drv.@)
*/
......
......@@ -791,13 +791,11 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_CreateDC, /* pCreateDC */
PSDRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
PSDRV_DeviceCapabilities, /* pDeviceCapabilities */
PSDRV_Ellipse, /* pEllipse */
PSDRV_EndDoc, /* pEndDoc */
PSDRV_EndPage, /* pEndPage */
NULL, /* pEndPath */
PSDRV_EnumFonts, /* pEnumFonts */
PSDRV_ExtDeviceMode, /* pExtDeviceMode */
PSDRV_ExtEscape, /* pExtEscape */
NULL, /* pExtFloodFill */
PSDRV_ExtTextOut, /* pExtTextOut */
......
......@@ -425,15 +425,10 @@ extern BOOL CDECL PSDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bott
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL PSDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern DWORD CDECL PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszPort,
WORD fwCapability, LPSTR lpszOutput, LPDEVMODEA lpDevMode) DECLSPEC_HIDDEN;
extern BOOL CDECL PSDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN;
extern INT CDECL PSDRV_EndDoc( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern INT CDECL PSDRV_EndPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL PSDRV_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LPARAM lp ) DECLSPEC_HIDDEN;
extern INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
LPSTR lpszDevice, LPSTR lpszPort, LPDEVMODEA lpdmInput,
LPSTR lpszProfile, DWORD dwMode) DECLSPEC_HIDDEN;
extern INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
INT cbOutput, LPVOID out_data ) DECLSPEC_HIDDEN;
extern BOOL CDECL PSDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
......
......@@ -356,13 +356,11 @@ static const struct gdi_dc_funcs x11drv_funcs =
X11DRV_CreateDC, /* pCreateDC */
X11DRV_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
X11DRV_Ellipse, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
X11DRV_ExtEscape, /* pExtEscape */
X11DRV_ExtFloodFill, /* pExtFloodFill */
NULL, /* pExtTextOut */
......
......@@ -2168,13 +2168,11 @@ static const struct gdi_dc_funcs xrender_funcs =
xrenderdrv_CreateDC, /* pCreateDC */
xrenderdrv_DeleteDC, /* pDeleteDC */
NULL, /* pDeleteObject */
NULL, /* pDeviceCapabilities */
NULL, /* pEllipse */
NULL, /* pEndDoc */
NULL, /* pEndPage */
NULL, /* pEndPath */
NULL, /* pEnumFonts */
NULL, /* pExtDeviceMode */
xrenderdrv_ExtEscape, /* pExtEscape */
NULL, /* pExtFloodFill */
xrenderdrv_ExtTextOut, /* pExtTextOut */
......
......@@ -81,13 +81,11 @@ struct gdi_dc_funcs
BOOL (CDECL *pCreateDC)(PHYSDEV*,LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
BOOL (CDECL *pDeleteDC)(PHYSDEV);
BOOL (CDECL *pDeleteObject)(PHYSDEV,HGDIOBJ);
DWORD (CDECL *pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA);
BOOL (CDECL *pEllipse)(PHYSDEV,INT,INT,INT,INT);
INT (CDECL *pEndDoc)(PHYSDEV);
INT (CDECL *pEndPage)(PHYSDEV);
BOOL (CDECL *pEndPath)(PHYSDEV);
BOOL (CDECL *pEnumFonts)(PHYSDEV,LPLOGFONTW,FONTENUMPROCW,LPARAM);
INT (CDECL *pExtDeviceMode)(LPSTR,HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,DWORD);
INT (CDECL *pExtEscape)(PHYSDEV,INT,INT,LPCVOID,INT,LPVOID);
BOOL (CDECL *pExtFloodFill)(PHYSDEV,INT,INT,COLORREF,UINT);
BOOL (CDECL *pExtTextOut)(PHYSDEV,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
......@@ -168,7 +166,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 67
#define WINE_GDI_DRIVER_VERSION 68
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
......
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