2 * Implementation of some printer driver bits
4 * Copyright 1996 John Harvey
5 * Copyright 1998 Huw Davies
6 * Copyright 1998 Andreas Mohr
7 * Copyright 1999 Klaas van Gend
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
36 #include "wine/debug.h"
37 #include "ntgdi_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(print
);
41 /******************************************************************
42 * NtGdiGetSpoolMessage (win32u.@)
44 DWORD WINAPI
NtGdiGetSpoolMessage( void *ptr1
, DWORD data2
, void *ptr3
, DWORD data4
)
48 TRACE( "(%p 0x%x %p 0x%x) stub\n", ptr1
, (int)data2
, ptr3
, (int)data4
);
50 /* avoid 100% cpu usage with spoolsv.exe from w2k
51 (spoolsv.exe from xp does Sleep 1000/1500/2000 in a loop) */
52 time
.QuadPart
= 500 * -10000;
53 NtDelayExecution( FALSE
, &time
);
57 /******************************************************************
58 * NtGdiInitSpool (win32u.@)
60 DWORD WINAPI
NtGdiInitSpool(void)
66 /******************************************************************
67 * NtGdiStartDoc (win32u.@)
69 INT WINAPI
NtGdiStartDoc( HDC hdc
, const DOCINFOW
*doc
, BOOL
*banding
, INT job
)
72 DC
*dc
= get_dc_ptr( hdc
);
74 TRACE("DocName %s, Output %s, Datatype %s, fwType %#x\n",
75 debugstr_w(doc
->lpszDocName
), debugstr_w(doc
->lpszOutput
),
76 debugstr_w(doc
->lpszDatatype
), (int)doc
->fwType
);
80 PHYSDEV physdev
= GET_DC_PHYSDEV( dc
, pStartDoc
);
81 ret
= physdev
->funcs
->pStartDoc( physdev
, doc
);
88 /******************************************************************
89 * NtGdiEndDoc (win32u.@)
91 INT WINAPI
NtGdiEndDoc( HDC hdc
)
94 DC
*dc
= get_dc_ptr( hdc
);
98 PHYSDEV physdev
= GET_DC_PHYSDEV( dc
, pEndDoc
);
99 ret
= physdev
->funcs
->pEndDoc( physdev
);
100 release_dc_ptr( dc
);
106 /******************************************************************
107 * NtGdiStartPage (win32u.@)
109 INT WINAPI
NtGdiStartPage( HDC hdc
)
112 DC
*dc
= get_dc_ptr( hdc
);
116 PHYSDEV physdev
= GET_DC_PHYSDEV( dc
, pStartPage
);
117 ret
= physdev
->funcs
->pStartPage( physdev
);
118 release_dc_ptr( dc
);
124 /******************************************************************
125 * NtGdiEndPage (win32u.@)
127 INT WINAPI
NtGdiEndPage( HDC hdc
)
130 DC
*dc
= get_dc_ptr( hdc
);
134 PHYSDEV physdev
= GET_DC_PHYSDEV( dc
, pEndPage
);
135 ret
= physdev
->funcs
->pEndPage( physdev
);
136 release_dc_ptr( dc
);
142 /***********************************************************************
143 * NtGdiAbortDoc (win32u.@)
145 INT WINAPI
NtGdiAbortDoc( HDC hdc
)
148 DC
*dc
= get_dc_ptr( hdc
);
152 PHYSDEV physdev
= GET_DC_PHYSDEV( dc
, pAbortDoc
);
153 ret
= physdev
->funcs
->pAbortDoc( physdev
);
154 release_dc_ptr( dc
);