- Move and add to print driver file for printing functions.

svn path=/trunk/; revision=41108
This commit is contained in:
James Tabor 2009-05-25 04:22:03 +00:00
parent cb9820f1c3
commit bdef7903ef
5 changed files with 181 additions and 179 deletions

View file

@ -41,6 +41,7 @@
<file>linedda.c</file>
<file>metafile.c</file>
<file>painting.c</file>
<file>printdrv.c</file>
<file>palette.c</file>
<file>pen.c</file>
<file>region.c</file>

View file

@ -504,142 +504,6 @@ SetColorAdjustment(
return FALSE;
}
/*
* @unimplemented
*/
int
WINAPI
EndDoc(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
StartPage(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
EndPage(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
AbortDoc(
HDC hdc
)
{
PLDC pldc;
int Ret = SP_ERROR;
ULONG hType = GDI_HANDLE_GET_TYPE(hdc);
if (hType == GDILoObjType_LO_DC_TYPE || hType == GDILoObjType_LO_METADC16_TYPE)
{
SetLastError(ERROR_INVALID_HANDLE);
return SP_ERROR;
}
pldc = GdiGetLDC(hdc);
if ( !pldc )
{
SetLastError(ERROR_INVALID_HANDLE);
return SP_ERROR;
}
if ( !(pldc->Flags & LDC_INIT_DOCUMENT) ) return 1;
/* winspool:DocumentEvent printer driver */
((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins = 0;
if ( pldc->Flags & LDC_META_PRINT)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return Ret;
}
if (NtGdiAbortDoc(hdc))
{
/* winspool:AbortPrinter driver */
Ret = 1;
}
else
Ret = SP_ERROR;
pldc->Flags &= ~(LDC_META_PRINT|LDC_STARTPAGE|LDC_INIT_PAGE|LDC_INIT_DOCUMENT|LDC_SAPCALLBACK);
return Ret;
}
/*
* @implemented
*/
int
WINAPI
SetAbortProc(
HDC hdc,
ABORTPROC lpAbortProc)
{
PLDC pldc;
ULONG hType = GDI_HANDLE_GET_TYPE(hdc);
if (hType == GDILoObjType_LO_DC_TYPE || hType == GDILoObjType_LO_METADC16_TYPE)
return SP_ERROR;
pldc = GdiGetLDC(hdc);
if ( pldc )
{
if ( lpAbortProc )
{
if ( pldc->Flags & LDC_INIT_DOCUMENT )
{
pldc->Flags |= LDC_SAPCALLBACK;
pldc->CallBackTick = GetTickCount();
}
}
else
{
pldc->Flags &= ~LDC_SAPCALLBACK;
}
pldc->pAbortProc = lpAbortProc;
return 1;
}
else
{
SetLastError(ERROR_INVALID_HANDLE);
}
return SP_ERROR;
}
/*
* @implemented
*/
@ -1167,18 +1031,6 @@ ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEn
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
EndFormPage(HDC hdc)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/

View file

@ -35,23 +35,6 @@ GetCharacterPlacementA(
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
StartDocA(
HDC hdc,
CONST DOCINFOA *lpdi
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/

View file

@ -1263,20 +1263,6 @@ ResetDCA(
}
/*
* @implemented
*/
int
WINAPI
StartDocW(
HDC hdc,
CONST DOCINFOW *a1
)
{
return NtGdiStartDoc ( hdc, (DOCINFOW *)a1, NULL, 0);
}
/*
* @implemented
*/

View file

@ -0,0 +1,180 @@
#include "precomp.h"
#define NDEBUG
#include <debug.h>
/*
* @unimplemented
*/
int
WINAPI
EndDoc(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
StartDocW(
HDC hdc,
CONST DOCINFOW *a1
)
{
return NtGdiStartDoc ( hdc, (DOCINFOW *)a1, NULL, 0);
}
/*
* @unimplemented
*/
int
WINAPI
StartDocA(
HDC hdc,
CONST DOCINFOA *lpdi
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
StartPage(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
EndFormPage(HDC hdc)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
EndPage(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
int
WINAPI
AbortDoc(
HDC hdc
)
{
PLDC pldc;
int Ret = SP_ERROR;
ULONG hType = GDI_HANDLE_GET_TYPE(hdc);
if (hType == GDILoObjType_LO_DC_TYPE || hType == GDILoObjType_LO_METADC16_TYPE)
{
SetLastError(ERROR_INVALID_HANDLE);
return SP_ERROR;
}
pldc = GdiGetLDC(hdc);
if ( !pldc )
{
SetLastError(ERROR_INVALID_HANDLE);
return SP_ERROR;
}
if ( !(pldc->Flags & LDC_INIT_DOCUMENT) ) return 1;
/* winspool:DocumentEvent printer driver */
((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins = 0;
if ( pldc->Flags & LDC_META_PRINT)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return Ret;
}
if (NtGdiAbortDoc(hdc))
{
/* winspool:AbortPrinter driver */
Ret = 1;
}
else
Ret = SP_ERROR;
pldc->Flags &= ~(LDC_META_PRINT|LDC_STARTPAGE|LDC_INIT_PAGE|LDC_INIT_DOCUMENT|LDC_SAPCALLBACK);
return Ret;
}
/*
* @implemented
*/
int
WINAPI
SetAbortProc(
HDC hdc,
ABORTPROC lpAbortProc)
{
PLDC pldc;
ULONG hType = GDI_HANDLE_GET_TYPE(hdc);
if (hType == GDILoObjType_LO_DC_TYPE || hType == GDILoObjType_LO_METADC16_TYPE)
return SP_ERROR;
pldc = GdiGetLDC(hdc);
if ( pldc )
{
if ( lpAbortProc )
{
if ( pldc->Flags & LDC_INIT_DOCUMENT )
{
pldc->Flags |= LDC_SAPCALLBACK;
pldc->CallBackTick = GetTickCount();
}
}
else
{
pldc->Flags &= ~LDC_SAPCALLBACK;
}
pldc->pAbortProc = lpAbortProc;
return 1;
}
else
{
SetLastError(ERROR_INVALID_HANDLE);
}
return SP_ERROR;
}