Author: jimtabor Date: Mon May 25 08:22:03 2009 New Revision: 41108
URL: http://svn.reactos.org/svn/reactos?rev=41108&view=rev Log: - Move and add to print driver file for printing functions.
Added: trunk/reactos/dll/win32/gdi32/objects/printdrv.c (with props) Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild trunk/reactos/dll/win32/gdi32/misc/stubs.c trunk/reactos/dll/win32/gdi32/misc/stubsa.c trunk/reactos/dll/win32/gdi32/objects/dc.c
Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.rbuil... ============================================================================== --- trunk/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] Mon May 25 08:22:03 2009 @@ -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>
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.... ============================================================================== --- trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] Mon May 25 08:22:03 2009 @@ -505,142 +505,6 @@ }
/* - * @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 */ BOOL @@ -1161,18 +1025,6 @@ BOOL WINAPI ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - -/* - * @unimplemented - */ -int -WINAPI -EndFormPage(HDC hdc) { UNIMPLEMENTED; SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
Modified: trunk/reactos/dll/win32/gdi32/misc/stubsa.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubsa... ============================================================================== --- trunk/reactos/dll/win32/gdi32/misc/stubsa.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/misc/stubsa.c [iso-8859-1] Mon May 25 08:22:03 2009 @@ -34,23 +34,6 @@ SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } - - -/* - * @unimplemented - */ -int -WINAPI -StartDocA( - HDC hdc, - CONST DOCINFOA *lpdi - ) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} -
/* * @unimplemented
Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc.... ============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c [iso-8859-1] Mon May 25 08:22:03 2009 @@ -1266,20 +1266,6 @@ /* * @implemented */ -int -WINAPI -StartDocW( - HDC hdc, - CONST DOCINFOW *a1 - ) -{ - return NtGdiStartDoc ( hdc, (DOCINFOW *)a1, NULL, 0); -} - - -/* - * @implemented - */ DWORD WINAPI GetObjectType(
Added: trunk/reactos/dll/win32/gdi32/objects/printdrv.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pri... ============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/printdrv.c (added) +++ trunk/reactos/dll/win32/gdi32/objects/printdrv.c [iso-8859-1] Mon May 25 08:22:03 2009 @@ -1,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; +} + +
Propchange: trunk/reactos/dll/win32/gdi32/objects/printdrv.c ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/gdi32/objects/printdrv.c ------------------------------------------------------------------------------ svn:mime-type = text/plain