gdi32: Add null driver entry points for the print spooler functions.
This commit is contained in:
parent
7e3a871497
commit
22f920df8e
|
@ -312,6 +312,11 @@ done:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_AbortDoc( PHYSDEV dev )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL CDECL nulldrv_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
static BOOL CDECL nulldrv_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||||
INT xstart, INT ystart, INT xend, INT yend )
|
INT xstart, INT ystart, INT xend, INT yend )
|
||||||
{
|
{
|
||||||
|
@ -329,6 +334,16 @@ static BOOL CDECL nulldrv_Ellipse( PHYSDEV dev, INT left, INT top, INT right, IN
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_EndDoc( PHYSDEV dev )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_EndPage( PHYSDEV dev )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL CDECL nulldrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT type )
|
static BOOL CDECL nulldrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT type )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -398,9 +413,19 @@ static COLORREF CDECL nulldrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF colo
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_StartDoc( PHYSDEV dev, const DOCINFOW *info )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static INT CDECL nulldrv_StartPage( PHYSDEV dev )
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
const DC_FUNCTIONS null_driver =
|
const DC_FUNCTIONS null_driver =
|
||||||
{
|
{
|
||||||
NULL, /* pAbortDoc */
|
nulldrv_AbortDoc, /* pAbortDoc */
|
||||||
NULL, /* pAbortPath */
|
NULL, /* pAbortPath */
|
||||||
NULL, /* pAlphaBlend */
|
NULL, /* pAlphaBlend */
|
||||||
nulldrv_AngleArc, /* pAngleArc */
|
nulldrv_AngleArc, /* pAngleArc */
|
||||||
|
@ -420,8 +445,8 @@ const DC_FUNCTIONS null_driver =
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
NULL, /* pDeviceCapabilities */
|
NULL, /* pDeviceCapabilities */
|
||||||
nulldrv_Ellipse, /* pEllipse */
|
nulldrv_Ellipse, /* pEllipse */
|
||||||
NULL, /* pEndDoc */
|
nulldrv_EndDoc, /* pEndDoc */
|
||||||
NULL, /* pEndPage */
|
nulldrv_EndPage, /* pEndPage */
|
||||||
NULL, /* pEndPath */
|
NULL, /* pEndPath */
|
||||||
NULL, /* pEnumICMProfiles */
|
NULL, /* pEnumICMProfiles */
|
||||||
NULL, /* pEnumDeviceFonts */
|
NULL, /* pEnumDeviceFonts */
|
||||||
|
@ -510,8 +535,8 @@ const DC_FUNCTIONS null_driver =
|
||||||
NULL, /* pSetWindowExt */
|
NULL, /* pSetWindowExt */
|
||||||
NULL, /* pSetWindowOrg */
|
NULL, /* pSetWindowOrg */
|
||||||
NULL, /* pSetWorldTransform */
|
NULL, /* pSetWorldTransform */
|
||||||
NULL, /* pStartDoc */
|
nulldrv_StartDoc, /* pStartDoc */
|
||||||
NULL, /* pStartPage */
|
nulldrv_StartPage, /* pStartPage */
|
||||||
NULL, /* pStretchBlt */
|
NULL, /* pStretchBlt */
|
||||||
NULL, /* pStretchDIBits */
|
NULL, /* pStretchDIBits */
|
||||||
NULL, /* pStrokeAndFillPath */
|
NULL, /* pStrokeAndFillPath */
|
||||||
|
|
|
@ -69,7 +69,7 @@ DWORD WINAPI GdiInitSpool(void)
|
||||||
*/
|
*/
|
||||||
INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
|
INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
|
|
||||||
TRACE("DocName = %s Output = %s Datatype = %s\n",
|
TRACE("DocName = %s Output = %s Datatype = %s\n",
|
||||||
|
@ -78,13 +78,12 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
|
||||||
|
|
||||||
if(!dc) return SP_ERROR;
|
if(!dc) return SP_ERROR;
|
||||||
|
|
||||||
if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 ))
|
if (dc->pAbortProc && !dc->pAbortProc( hdc, 0 )) ret = 0;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
release_dc_ptr( dc );
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pStartDoc );
|
||||||
return ret;
|
ret = physdev->funcs->pStartDoc( physdev, doc );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dc->funcs->pStartDoc) ret = dc->funcs->pStartDoc( dc->physDev, doc );
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -140,12 +139,15 @@ INT WINAPI StartDocA(HDC hdc, const DOCINFOA* doc)
|
||||||
*/
|
*/
|
||||||
INT WINAPI EndDoc(HDC hdc)
|
INT WINAPI EndDoc(HDC hdc)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret = SP_ERROR;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
if(!dc) return SP_ERROR;
|
|
||||||
|
|
||||||
if (dc->funcs->pEndDoc) ret = dc->funcs->pEndDoc( dc->physDev );
|
if (dc)
|
||||||
release_dc_ptr( dc );
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pEndDoc );
|
||||||
|
ret = physdev->funcs->pEndDoc( physdev );
|
||||||
|
release_dc_ptr( dc );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,15 +158,15 @@ INT WINAPI EndDoc(HDC hdc)
|
||||||
*/
|
*/
|
||||||
INT WINAPI StartPage(HDC hdc)
|
INT WINAPI StartPage(HDC hdc)
|
||||||
{
|
{
|
||||||
INT ret = 1;
|
INT ret = SP_ERROR;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
if(!dc) return SP_ERROR;
|
|
||||||
|
|
||||||
if(dc->funcs->pStartPage)
|
if (dc)
|
||||||
ret = dc->funcs->pStartPage( dc->physDev );
|
{
|
||||||
else
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pStartPage );
|
||||||
FIXME("stub\n");
|
ret = physdev->funcs->pStartPage( physdev );
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,12 +177,15 @@ INT WINAPI StartPage(HDC hdc)
|
||||||
*/
|
*/
|
||||||
INT WINAPI EndPage(HDC hdc)
|
INT WINAPI EndPage(HDC hdc)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret = SP_ERROR;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
if(!dc) return SP_ERROR;
|
|
||||||
|
|
||||||
if (dc->funcs->pEndPage) ret = dc->funcs->pEndPage( dc->physDev );
|
if (dc)
|
||||||
release_dc_ptr( dc );
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pEndPage );
|
||||||
|
ret = physdev->funcs->pEndPage( physdev );
|
||||||
|
release_dc_ptr( dc );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,12 +195,15 @@ INT WINAPI EndPage(HDC hdc)
|
||||||
*/
|
*/
|
||||||
INT WINAPI AbortDoc(HDC hdc)
|
INT WINAPI AbortDoc(HDC hdc)
|
||||||
{
|
{
|
||||||
INT ret = 0;
|
INT ret = SP_ERROR;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
if(!dc) return SP_ERROR;
|
|
||||||
|
|
||||||
if (dc->funcs->pAbortDoc) ret = dc->funcs->pAbortDoc( dc->physDev );
|
if (dc)
|
||||||
release_dc_ptr( dc );
|
{
|
||||||
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pAbortDoc );
|
||||||
|
ret = physdev->funcs->pAbortDoc( physdev );
|
||||||
|
release_dc_ptr( dc );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue