ReactOS  0.4.14-dev-57-g333b8f1
gdi32p.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS System Libraries
4  * FILE: win32ss/gdi/gdi32/include/gdi32p.h
5  * PURPOSE: User-Mode Win32 GDI Library Private Header
6  * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7  */
8 
9 #pragma once
10 
11 /* DATA **********************************************************************/
12 
15 extern HANDLE hProcessHeap;
17 extern DWORD GDI_BatchLimit;
18 extern PDEVCAPS GdiDevCaps;
19 extern BOOL gbLpk; // Global bool LanguagePack
20 extern HANDLE ghSpooler;
22 
23 typedef INT
25  HDC hdc,
26  INT iFunction,
27  HANDLE hPageQuery
28 );
29 
30 typedef BOOL
32  HDC hdc,
33  int x,
34  int y,
35  UINT fuOptions,
36  const RECT *lprc,
37  LPCWSTR lpString,
38  UINT uCount,
39  const INT *lpDx,
40  INT unknown
41 );
42 
43 typedef DWORD
45  HDC hdc,
46  LPCWSTR lpString,
47  INT uCount,
48  INT nMaxExtent,
49  LPGCP_RESULTSW lpResults,
50  DWORD dwFlags,
51  DWORD dwUnused
52 );
53 
54 typedef BOOL
56  HDC hdc,
57  LPCWSTR lpString,
58  INT cString,
59  INT nMaxExtent,
60  LPINT lpnFit,
61  LPINT lpnDx,
62  LPSIZE lpSize,
63  DWORD dwUnused,
64  int unknown
65 );
66 
67 extern HINSTANCE hLpk;
68 extern LPKETO LpkExtTextOut;
71 
72 /* DEFINES *******************************************************************/
73 
74 #define HANDLE_LIST_INC 20
75 
76 #define METAFILE_MEMORY 1
77 #define METAFILE_DISK 2
78 
79 #define SAPCALLBACKDELAY 244
80 
81 #define LPK_INIT 1
82 #define LPK_ETO 2
83 #define LPK_GCP 3
84 #define LPK_GTEP 4
85 
86 /* MACRO ********************************************************************/
87 
88 #define ROP_USES_SOURCE(Rop) (((Rop) << 2 ^ Rop) & 0xCC0000)
89 #define RCAST(_Type, _Value) (*((_Type*)&_Value))
90 
91 
92 /* TYPES *********************************************************************/
93 
94 // Based on wmfapi.h and Wine.
95 typedef struct tagMETAFILEDC
96 {
104  HPEN hPen;
105  HBRUSH hBrush;
108  HPALETTE hPalette;
111  HRGN hRegion;
114  HPEN hExtPen;
117  HCOLORSPACE hColorSpace;
120 
121 // Metafile Entry handle
122 typedef struct tagMF_ENTRY
123 {
125  HGDIOBJ hmDC; // Handle return from NtGdiCreateClientObj.
127 } MF_ENTRY, *PMF_ENTRY;
128 
129 typedef struct tagENHMETAFILE
130 {
132  HANDLE hFile; /* Handle for disk based MetaFile */
147 
148 
149 #define PDEV_UMPD_ID 0xFEDCBA98
150 // UMPDEV flags
151 #define UMPDEV_NO_ESCAPE 0x0002
152 #define UMPDEV_SUPPORT_ESCAPE 0x0004
153 typedef struct _UMPDEV
154 {
155  DWORD_PTR Sig; // Init with PDEV_UMPD_ID
161  DWORD dwConfigVersion; // Number of times the configuration
162  // file for this driver has been upgraded
163  // or downgraded since the last spooler restart.
164  DWORD dwDriverCount; // After init should be 2
168  PVOID apfn[INDEX_LAST]; // Print Driver pfn
169 } UMPDEV, *PUMPDEV;
170 
171 #define LOCALFONT_COUNT 10
172 typedef struct _LOCALFONT
173 {
176 
177 // sdk/winspool.h
187 typedef HANDLE (WINAPI *GETSPOOLFILEHANDLE) (HANDLE); // W2k8
195 // ddk/winsplp.h
198 // Same as ddk/winsplp.h DriverUnloadComplete?
200 // Driver support:
201 // DrvDocumentEvent api/winddiui.h not W2k8 DocumentEventAW
203 // DrvQueryColorProfile
205 // Unknown:
208 
211 
212 /* FUNCTIONS *****************************************************************/
213 
214 PVOID
216 
217 NTSTATUS
219  LPWSTR* ppszW,
220  LPCSTR lpszA
221 );
222 
223 VOID
225 
226 VOID
227 FASTCALL
229  const TEXTMETRICW *ptmW,
230  LPTEXTMETRICA ptmA
231 );
232 
233 VOID
234 FASTCALL
236  NEWTEXTMETRICA *tma,
237  NEWTEXTMETRICW *tmw
238 );
239 
240 VOID
241 FASTCALL
243  NEWTEXTMETRICEXA *tma,
244  NEWTEXTMETRICEXW *tmw
245 );
246 
247 BOOL
248 FASTCALL
249 DeleteRegion( HRGN );
250 
251 BOOL
252 WINAPI
254 
255 BOOL
257  HGDIOBJ hGdiObj,
259  PVOID *UserData
260 );
261 
262 PLDC
263 FASTCALL
264 GdiGetLDC(HDC hDC);
265 
266 BOOL
267 FASTCALL
268 GdiSetLDC(HDC hdc, PVOID pvLDC);
269 
270 HGDIOBJ
271 WINAPI
273 
274 BOOL
275 WINAPI
277  CONST BITMAPINFOHEADER *BitmapInfoHeader,
278  UINT *ColorSpec,
279  UINT *ColorTableSize
280 );
281 
283 WINAPI
285  CONST BITMAPINFO *BitmapInfo,
286  UINT ColorSpec,
287  UINT *BitmapInfoSize,
288  BOOL FollowedByData
289 );
290 
291 DWORD
292 WINAPI
294  _In_ HDC hdc,
295  _In_ UINT u,
296  _In_ DWORD dwIn,
297  _In_ ULONG ulMFId,
298  _In_ USHORT usMF16Id,
299  _In_ DWORD dwError);
300 
301 DWORD
302 WINAPI
303 GetDCDWord(
304  _In_ HDC hdc,
305  _In_ UINT u,
306  _In_ DWORD dwError);
307 
308 HGDIOBJ
309 WINAPI
310 GetDCObject( HDC, INT);
311 
312 VOID
313 NTAPI
314 LogFontA2W(
315  LPLOGFONTW pW,
316  CONST LOGFONTA *pA
317 );
318 
319 VOID
320 NTAPI
321 LogFontW2A(
322  LPLOGFONTA pA,
323  CONST LOGFONTW *pW
324 );
325 
326 VOID
327 WINAPI
329  LPENUMLOGFONTEXA fontA,
331 
332 BOOL
333 WINAPI
334 LoadLPK(
335  INT LpkFunctionID
336 );
337 
338 VOID
339 WINAPI
341  _In_ DWORD InitParam);
342 
343 VOID
344 WINAPI
346  _In_ FARPROC *hookfuncs);
347 
348 BOOL
349 WINAPI
350 GetETM(HDC hdc,
351  EXTTEXTMETRIC *petm);
352 
353 /* FIXME: Put in some public header */
354 UINT
355 WINAPI
357 
358 int
359 WINAPI
361 
362 VOID
363 WINAPI
364 GdiSetLastError( DWORD dwErrCode );
365 
367 
368 int
369 WINAPI
371 
372 VOID GdiSAPCallback(PLDC pldc);
374 
378 
380 PVOID
382  HDC hdc,
383  USHORT Cmd)
384 {
385  PTEB pTeb;
386  USHORT cjSize;
387  PGDIBATCHHDR pHdr;
388 
389  /* Get a pointer to the TEB */
390  pTeb = NtCurrentTeb();
391 
392  /* Check if we have a valid environment */
393  if (!pTeb || !pTeb->Win32ThreadInfo) return NULL;
394 
395  /* Get the size of the entry */
396  if (Cmd == GdiBCPatBlt) cjSize = sizeof(GDIBSPATBLT);
397  else if (Cmd == GdiBCPolyPatBlt) cjSize = sizeof(GDIBSPPATBLT);
398  else if (Cmd == GdiBCTextOut) cjSize = sizeof(GDIBSTEXTOUT);
399  else if (Cmd == GdiBCExtTextOut) cjSize = sizeof(GDIBSEXTTEXTOUT);
400  else if (Cmd == GdiBCSetBrushOrg) cjSize = sizeof(GDIBSSETBRHORG);
401  else if (Cmd == GdiBCExtSelClipRgn) cjSize = sizeof(GDIBSEXTSELCLPRGN);
402  else if (Cmd == GdiBCSelObj) cjSize = sizeof(GDIBSOBJECT);
403  else if (Cmd == GdiBCDelRgn) cjSize = sizeof(GDIBSOBJECT);
404  else if (Cmd == GdiBCDelObj) cjSize = sizeof(GDIBSOBJECT);
405  else cjSize = 0;
406 
407  /* Unsupported operation */
408  if (cjSize == 0) return NULL;
409 
410  /* Do we use a DC? */
411  if (hdc)
412  {
413  /* If the batch DC is NULL, we set this one as the new one */
414  if (!pTeb->GdiTebBatch.HDC) pTeb->GdiTebBatch.HDC = hdc;
415 
416  /* If not, check if the batch DC equal to our DC */
417  else if (pTeb->GdiTebBatch.HDC != hdc) return NULL;
418  }
419 
420  /* Check if the buffer is full */
421  if ((pTeb->GdiBatchCount >= GDI_BatchLimit) ||
423  {
424  /* Call win32k, the kernel will call NtGdiFlushUserBatch to flush
425  the current batch */
426  NtGdiFlush();
427 
428  // If Flushed, lose the hDC for this batch job! See CORE-15839.
429  if (hdc)
430  {
431  if (!pTeb->GdiTebBatch.HDC) pTeb->GdiTebBatch.HDC = hdc;
432  }
433  }
434 
435  /* Get the head of the entry */
436  pHdr = (PVOID)((PUCHAR)pTeb->GdiTebBatch.Buffer + pTeb->GdiTebBatch.Offset);
437 
438  /* Update Offset and batch count */
439  pTeb->GdiTebBatch.Offset += cjSize;
440  pTeb->GdiBatchCount++;
441 
442  /* Fill in the core fields */
443  pHdr->Cmd = Cmd;
444  pHdr->Size = cjSize;
445 
446  return pHdr;
447 }
448 
450 PDC_ATTR
452 {
453  GDILOOBJTYPE eDcObjType;
454  PDC_ATTR pdcattr;
455 
456  /* Check DC object type */
457  eDcObjType = GDI_HANDLE_GET_TYPE(hdc);
458  if ((eDcObjType != GDILoObjType_LO_DC_TYPE) &&
459  (eDcObjType != GDILoObjType_LO_ALTDC_TYPE))
460  {
461  return NULL;
462  }
463 
464  /* Get the DC attribute */
465  if (!GdiGetHandleUserData((HGDIOBJ)hdc, eDcObjType, (PVOID*)&pdcattr))
466  {
467  return NULL;
468  }
469 
470  return pdcattr;
471 }
472 
474 PRGN_ATTR
476 {
477  PRGN_ATTR prgnattr;
478 
479  /* Get the region attribute */
481  {
482  return NULL;
483  }
484 
485  return prgnattr;
486 }
487 
488 #ifdef _M_IX86
490 #define FOtoF(pfo) EFtoF((EFLOAT_S*)pfo)
491 #else
492 #define FOtoF(pfo) (*(pfo))
493 #endif
494 
495 /* This is an inlined version of lrintf. */
497 int
498 _lrintf(float f)
499 {
500 #if defined(_M_IX86) && defined(__GNUC__)
501  int result;
502  __asm__ __volatile__ ("fistpl %0" : "=m" (result) : "t" (f) : "st");
503  return result;
504 #elif defined(_M_IX86) && defined(_MSC_VER)
505  int result;
506  __asm
507  {
508  fld f;
509  fistp result;
510  }
511 #else
512  /* slow, but portable */
513  return (int)(f >= 0 ? f+0.5 : f-0.5);
514 #endif
515 }
516 
517 HBRUSH
518 WINAPI
520  _In_ HDC hdc,
521  _In_ HBRUSH hbr);
522 
523 HPEN
524 WINAPI
526  _In_ HDC hdc,
527  _In_ HPEN hpen);
528 
529 HFONT
530 WINAPI
532  _In_ HDC hdc,
533  _In_ HFONT hfont);
534 
535 HGDIOBJ
536 WINAPI
538  _In_ PVOID pvObject,
539  _In_ GDILOOBJTYPE eObjType);
540 
541 PVOID
542 WINAPI
544  _In_ HGDIOBJ hobj);
545 
546 BOOL
547 WINAPI
549  _In_ HGDIOBJ hobj,
550  _In_ PVOID pvObject);
551 
552 PVOID
553 WINAPI
555  _In_ HGDIOBJ hobj);
556 
557 PVOID
558 WINAPI
560  _In_ HGDIOBJ hobj);
561 
562 extern ULONG gcClientObj;
563 
564 VOID
565 WINAPI
567 
568 BOOL
569 WINAPI
571  _In_ HDC hdc);
572 
573 INT
574 WINAPI
576  _In_ HDC hdc,
577  _In_ INT nEscape,
578  _In_ INT cbInput,
579  _In_ LPCSTR lpvInData,
580  _Out_ LPVOID lpvOutData);
581 
582 BOOL
583 WINAPI
585  HDC hdc,
586  INT x,
587  INT y,
588  UINT fuOptions,
589  const RECT *lprc,
590  LPCWSTR lpString,
591  UINT cchString,
592  const INT *lpDx);
593 
594 BOOL
595 WINAPI
597  _In_ HDC hdc,
598  _In_ INT xLeft,
599  _In_ INT yTop,
600  _In_ INT nWidth,
601  _In_ INT nHeight,
602  _In_ DWORD dwRop);
603 
604 
605 /* The following METADC_* functions follow this pattern: */
606 #define HANDLE_METADC0P(_RetType, _Func, dwError, hdc, ...) \
607  if (GDI_HANDLE_GET_TYPE(hdc) != GDILoObjType_LO_DC_TYPE) \
608  { \
609  DWORD_PTR dwResult; \
610  if (METADC_Dispatch(DCFUNC_##_Func, &dwResult, (DWORD_PTR)dwError, hdc)) \
611  { \
612  return (_RetType)dwResult; \
613  } \
614  }
615 
616 #define HANDLE_METADC(_RetType, _Func, dwError, hdc, ...) \
617  if (GDI_HANDLE_GET_TYPE(hdc) != GDILoObjType_LO_DC_TYPE) \
618  { \
619  DWORD_PTR dwResult = 1; \
620  if (METADC_Dispatch(DCFUNC_##_Func, &dwResult, (DWORD_PTR)dwError, hdc, __VA_ARGS__)) \
621  { \
622  return (_RetType)dwResult; \
623  } \
624  }
625 
626 
627 typedef enum _DCFUNC
628 {
629  //DCFUNC_AbortDoc,
631  DCFUNC_AlphaBlend, // UNIMPLEMENTED
632  DCFUNC_AngleArc, // UNIMPLEMENTED
634  DCFUNC_ArcTo, // UNIMPLEMENTED
636  //DCFUNC_BitBlt,
652  DCFUNC_GradientFill, // UNIMPLEMENTED
656  DCFUNC_MaskBlt, // UNIMPLEMENTED
662  DCFUNC_PathToRegion, // UNIMPLEMENTED
665  DCFUNC_PlgBlt, // UNIMPLEMENTED
692  //DCFUNC_SetMapMode,
709  DCFUNC_TransparentBlt, // UNIMPLEMENTED
711 
712 } DCFUNC;
713 
714 BOOL
716  _In_ DCFUNC eFunction,
718  _In_ DWORD_PTR dwError,
719  _In_ HDC hdc,
720  ...);
721 
722 #define HANDLE_METADC2(_RetType, _Func, hdc, ...) \
723  if (GDI_HANDLE_GET_TYPE(hdc) != GDILoObjType_LO_DC_TYPE) \
724  { \
725  _RetType result; \
726  if (METADC_##_Func(&result, hdc, __VA_ARGS__)) \
727  { \
728  return result; \
729  } \
730  }
731 
732 BOOL
733 WINAPI
736  _In_ HDC hdc,
737  _In_ UINT u,
738  _In_ DWORD dwIn,
739  _In_ ULONG ulMFId,
740  _In_ USHORT usMF16Id,
741  _In_ DWORD dwError);
742 
744 
745 /* EOF */
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
WORD reserved
Definition: gdi32p.h:102
HGDIOBJ WINAPI GetDCObject(HDC, INT)
ObjectType
Definition: metafile.c:80
HPEN WINAPI GdiSelectPen(_In_ HDC hdc, _In_ HPEN hpen)
Definition: dc.c:1416
VOID HEAP_free(LPVOID memory)
Definition: heap.c:63
struct tagMF_ENTRY * PMF_ENTRY
struct _GDIBSSETBRHORG GDIBSSETBRHORG
HDC WINAPI GdiConvertAndCheckDC(HDC hdc)
Definition: dc.c:414
int FASTCALL DocumentEventEx(PVOID, HANDLE, HDC, int, ULONG, PVOID, ULONG, PVOID)
Definition: printdrv.c:152
INT technology
Definition: gdi32p.h:144
HANDLE(WINAPI * COMMITSPOOLDATA)(HANDLE, HANDLE, DWORD)
Definition: gdi32p.h:181
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR * pdv
Definition: winddi.h:3723
DWORD dwDriverAttributes
Definition: gdi32p.h:160
BOOL(WINAPI * READPRINTER)(HANDLE, PVOID, DWORD, PDWORD)
Definition: gdi32p.h:190
FORCEINLINE int _lrintf(float f)
Definition: gdi32p.h:498
enum _DCFUNC DCFUNC
struct _devicemodeW * PDEVMODEW
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4366
LONG(WINAPI * DOCUMENTPROPERTIESW)(HWND, HANDLE, LPWSTR, PDEVMODEW, PDEVMODEW, DWORD)
Definition: gdi32p.h:182
BOOL(WINAPI * ENDDOCPRINTER)(HANDLE)
Definition: gdi32p.h:183
INT(WINAPI * DOCUMENTEVENT)(HANDLE, HDC, INT, ULONG, PVOID, ULONG, PVOID)
Definition: gdi32p.h:202
HPALETTE hPalette
Definition: gdi32p.h:108
VOID FASTCALL NewTextMetricW2A(NEWTEXTMETRICA *tma, NEWTEXTMETRICW *tmw)
Definition: font.c:191
INT bitspixel
Definition: gdi32p.h:141
DWORD GDI_BatchLimit
Definition: misc.c:36
HGDIOBJ hEnhMetaFile
Definition: gdi32p.h:116
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI METADC_DeleteDC(_In_ HDC hdc)
Definition: rosglue.c:1270
PVOID WINAPI GdiGetClientObjLink(_In_ HGDIOBJ hobj)
Definition: clientobj.c:61
PVOID WINAPI GdiRemoveClientObjLink(_In_ HGDIOBJ hobj)
Definition: clientobj.c:98
SHORT Size
Definition: ntgdityp.h:457
PVOID Win32ThreadInfo
Definition: compat.h:495
BOOL FASTCALL GdiSetLDC(HDC hdc, PVOID pvLDC)
Definition: misc.c:802
int WINAPI GdiGetBitmapBitsSize(BITMAPINFO *lpbmi)
Definition: bitmap.c:161
FONT_ATTR lfa[LOCALFONT_COUNT]
Definition: gdi32p.h:174
unsigned char * PUCHAR
Definition: retypes.h:3
FORCEINLINE PDC_ATTR GdiGetDcAttr(HDC hdc)
Definition: gdi32p.h:451
UINT WINAPI UserRealizePalette(HDC hDC)
Definition: painting.c:2336
SHORT Cmd
Definition: ntgdityp.h:458
LONG NTSTATUS
Definition: precomp.h:26
PDEVCAPS GdiDevCaps
Definition: dllmain.c:9
#define INT
Definition: polytest.cpp:20
BOOL(WINAPI * CLOSESPOOLFILEHANDLE)(HANDLE, HANDLE)
Definition: gdi32p.h:180
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI METADC_PatBlt(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT nWidth, _In_ INT nHeight, _In_ DWORD dwRop)
DWORD dwConfigVersion
Definition: gdi32p.h:161
UINT handles_size
Definition: gdi32p.h:136
HANDLE HWND
Definition: compat.h:13
HGDIOBJ WINAPI GdiCreateClientObj(_In_ PVOID pvObject, _In_ GDILOOBJTYPE eObjType)
Definition: clientobj.c:148
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HPEN hExtPen
Definition: gdi32p.h:114
BOOL(WINAPI * ENDPAGEPRINTER)(HANDLE)
Definition: gdi32p.h:184
_DCFUNC
Definition: gdi32p.h:627
static HPEN hpen
HGDIOBJ hMetafile
Definition: gdi32p.h:112
struct tagMF_ENTRY MF_ENTRY
BOOL(WINAPI * CLOSEPRINTER)(HANDLE)
Definition: gdi32p.h:179
HLOCAL MFObjList
Definition: gdi32p.h:103
BOOL(WINAPI * SPLREADPRINTER)(HANDLE, LPBYTE *, DWORD)
Definition: gdi32p.h:197
VOID FASTCALL FONT_TextMetricWToA(const TEXTMETRICW *ptmW, LPTEXTMETRICA ptmA)
Definition: font.c:79
BOOL(WINAPI * RESETPRINTERW)(HANDLE, LPPRINTER_DEFAULTSW)
Definition: gdi32p.h:191
#define BOOL
Definition: nt_native.h:43
#define FASTCALL
Definition: nt_native.h:50
FLOATL FASTCALL EFtoF(EFLOAT_S *efp)
Definition: efloat.c:20
static char memory[1024 *256]
Definition: process.c:116
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
BOOL(WINAPI * SPLDRIVERUNLOADCOMPLETE)(LPWSTR)
Definition: gdi32p.h:199
PDRIVER_INFO_5W pdi5Info
Definition: gdi32p.h:157
Definition: gdi32p.h:122
VOID NTAPI LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA)
Definition: utils.c:348
struct _UMPDEV UMPDEV
DWORD(WINAPI * QUERYSPOOLMODE)(HANDLE, DWORD, DWORD)
Definition: gdi32p.h:206
FORCEINLINE PRGN_ATTR GdiGetRgnAttr(HRGN hrgn)
Definition: gdi32p.h:475
struct _UMPDEV * PUMPDEV
unsigned char * LPBYTE
Definition: typedefs.h:52
ULONG Buffer[GDI_BATCH_BUFFER_SIZE]
Definition: compat.h:482
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOL WINAPI LoadLPK(INT LpkFunctionID)
Definition: utils.c:423
_In_ FLONG fl
Definition: winddi.h:1279
DWORD WOW64_hMod
Definition: gdi32p.h:166
BOOL WINAPI GdiCreateClientObjLink(_In_ HGDIOBJ hobj, _In_ PVOID pvObject)
Definition: clientobj.c:24
BOOL(WINAPI * GETPRINTERW)(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD)
Definition: gdi32p.h:185
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HGDIOBJ hmDC
Definition: gdi32p.h:125
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
HGDIOBJ hMemDc
Definition: gdi32p.h:113
HANDLE hFile
Definition: gdi32p.h:132
BOOL METADC_Dispatch(_In_ DCFUNC eFunction, _Out_ PDWORD_PTR pdwResult, _In_ DWORD_PTR dwError, _In_ HDC hdc,...)
Definition: rosglue.c:1120
BOOL WINAPI CalculateColorTableSize(CONST BITMAPINFOHEADER *BitmapInfoHeader, UINT *ColorSpec, UINT *ColorTableSize)
Definition: utils.c:32
VOID WINAPI GdiInitializeLanguagePack(_In_ DWORD InitParam)
struct _GDIBSPPATBLT GDIBSPPATBLT
struct _GDIBSOBJECT GDIBSOBJECT
#define GDIBATCHBUFSIZE
Definition: ntgdityp.h:199
struct tagMETAFILEDC METAFILEDC
HGDIOBJ * handles
Definition: gdi32p.h:137
DWORD WINAPI GdiGetCodePage(HDC)
smooth NULL
Definition: ftsmooth.c:416
HANDLE ghSpooler
Definition: printdrv.c:40
NTSTATUS HEAP_strdupA2W(LPWSTR *ppszW, LPCSTR lpszA)
Definition: heap.c:43
BOOL FASTCALL EndPagePrinterEx(PVOID, HANDLE)
Definition: printdrv.c:178
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
INT textcaps
Definition: gdi32p.h:142
struct _PRINTER_DEFAULTSW * LPPRINTER_DEFAULTSW
DWORD Size
Definition: gdi32p.h:99
DWORD(WINAPI * LPKGCP)(HDC hdc, LPCWSTR lpString, INT uCount, INT nMaxExtent, LPGCP_RESULTSW lpResults, DWORD dwFlags, DWORD dwUnused)
Definition: gdi32p.h:44
const char * LPCSTR
Definition: xmlstorage.h:183
void * PVOID
Definition: retypes.h:9
INT horzsize
Definition: gdi32p.h:139
HGDIOBJ WINAPI GdiFixUpHandle(HGDIOBJ hGO)
Definition: misc.c:734
PGDI_TABLE_ENTRY GdiHandleTable
Definition: gdihv.c:26
unsigned long FLONG
Definition: ntbasedef.h:373
static HFONT hfont
PENHMETAHEADER emf
Definition: gdi32p.h:135
PVOID apfn[INDEX_LAST]
Definition: gdi32p.h:168
#define GDI_HANDLE_GET_TYPE(h)
Definition: gdi.h:31
UINT cur_handles
Definition: gdi32p.h:136
VOID NTAPI LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)
Definition: utils.c:375
int WINAPI GdiAddFontResourceW(LPCWSTR lpszFilename, FLONG fl, DESIGNVECTOR *pdv)
Definition: font.c:2404
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiFlush(VOID)
Definition: gdibatch.c:471
HANDLE CurrentProcessId
Definition: misc.c:35
__kernel_size_t size_t
Definition: linux.h:237
VOID GdiSAPCallback(PLDC pldc)
Definition: misc.c:819
BOOL FASTCALL DeleteRegion(HRGN)
GLfloat f
Definition: glext.h:7540
PLDC FASTCALL GdiGetLDC(HDC hDC)
Definition: misc.c:785
BOOL(WINAPI * STARTPAGEPRINTER)(HANDLE)
Definition: gdi32p.h:194
BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, DWORD ObjectType, PVOID *UserData)
Definition: misc.c:761
DWORD(WINAPI * STARTDOCPRINTERW)(HANDLE, DWORD, PBYTE)
Definition: gdi32p.h:193
__wchar_t WCHAR
Definition: xmlstorage.h:180
PMETAFILEDC pmfDC
Definition: gdi32p.h:126
DWORD COLORREF
Definition: windef.h:285
DWORD_PTR Sig
Definition: gdi32p.h:155
LIST_ENTRY List
Definition: gdi32p.h:124
DWORD WINAPI GetDCDWord(_In_ HDC hdc, _In_ UINT u, _In_ DWORD dwError)
Definition: dc.c:763
struct _GDIBSTEXTOUT GDIBSTEXTOUT
#define MAX_PATH
Definition: compat.h:26
INT logpixelsy
Definition: gdi32p.h:140
#define WINAPI
Definition: msvc.h:8
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
Definition: misc.c:34
BOOL(WINAPI * LPKGTEP)(HDC hdc, LPCWSTR lpString, INT cString, INT nMaxExtent, LPINT lpnFit, LPINT lpnDx, LPSIZE lpSize, DWORD dwUnused, int unknown)
Definition: gdi32p.h:55
VOID FASTCALL NewTextMetricExW2A(NEWTEXTMETRICEXA *tma, NEWTEXTMETRICEXW *tmw)
Definition: font.c:201
unsigned short WORD
Definition: ntddk_ex.h:93
PVOID WINAPI GdiDeleteClientObj(_In_ HGDIOBJ hobj)
Definition: clientobj.c:173
PVOID HANDLE
Definition: typedefs.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE hFile
Definition: gdi32p.h:98
ULONG_PTR * PDWORD_PTR
Definition: basetsd.h:184
HANDLE(WINAPI * GETSPOOLFILEHANDLE)(HANDLE)
Definition: gdi32p.h:187
DWORD dwDriverCount
Definition: gdi32p.h:164
Definition: id3.c:18
INT logpixelsx
Definition: gdi32p.h:140
struct tagMETAFILEDC * PMETAFILEDC
Definition: ntgdihdl.h:275
BOOL(WINAPI * QUERYCOLORPROFILE)(HANDLE, PDEVMODEW, ULONG, VOID *, ULONG, FLONG)
Definition: gdi32p.h:204
GDI_TEB_BATCH GdiTebBatch
Definition: compat.h:506
#define INDEX_LAST
Definition: winddi.h:521
static const WCHAR fontW[]
Definition: editor.c:78
union _LARGE_INTEGER LARGE_INTEGER
ULONG GdiBatchCount
Definition: compat.h:536
#define LPDWORD
Definition: nt_native.h:46
HBRUSH WINAPI GdiSelectBrush(_In_ HDC hdc, _In_ HBRUSH hbr)
Definition: dc.c:1386
HGDIOBJ hMetaDc
Definition: gdi32p.h:107
HDC hdc
Definition: main.c:9
Definition: sacdrv.h:277
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
struct _LOCALFONT LOCALFONT
HFONT hFont
Definition: gdi32p.h:109
static HRGN hrgn
Definition: win.c:55
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
GLenum GLsizei len
Definition: glext.h:6722
BOOL(WINAPI * GETPRINTERDRIVERW)(HANDLE, LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD)
Definition: gdi32p.h:186
Definition: typedefs.h:117
uint32_t DWORD_PTR
Definition: typedefs.h:63
HFONT WINAPI GdiSelectFont(_In_ HDC hdc, _In_ HFONT hfont)
Definition: dc.c:1446
struct _UMPDEV * pumpdNext
Definition: gdi32p.h:156
#define LOCALFONT_COUNT
Definition: gdi32p.h:171
struct tagENHMETAFILE ENHMETAFILE
HPEN hPen
Definition: gdi32p.h:104
#define _In_
Definition: no_sal2.h:204
Definition: gdi.h:1
struct _GDIBSEXTSELCLPRGN GDIBSEXTSELCLPRGN
FLOAT FLOATL
Definition: winddi.h:114
static HDC hDC
Definition: 3dtext.c:33
VOID WINAPI GdiSetLastError(DWORD dwErrCode)
Definition: misc.c:873
Definition: compat.h:484
ULONG Offset
Definition: compat.h:480
PVOID HEAP_alloc(DWORD len)
Definition: heap.c:35
struct _GDIBSPATBLT GDIBSPATBLT
BOOL(WINAPI * ABORTPRINTER)(HANDLE)
Definition: gdi32p.h:178
struct _GDIBSEXTTEXTOUT GDIBSEXTTEXTOUT
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
_In_ UINT _In_ DWORD _Out_ DWORD * pdwResult
Definition: ntgdi.h:248
unsigned short USHORT
Definition: pedump.c:61
#define f
Definition: ke_i.h:83
HGDIOBJ FASTCALL hGetPEBHandle(HANDLECACHETYPE, COLORREF)
Definition: misc.c:880
INT vertsize
Definition: gdi32p.h:139
HMODULE hModule
Definition: gdi32p.h:158
VOID WINAPI METADC_DeleteObject(HGDIOBJ hobj)
Definition: rosglue.c:1229
unsigned int UINT
Definition: ndis.h:50
DWORD WINAPI GetAndSetDCDWord(_In_ HDC hdc, _In_ UINT u, _In_ DWORD dwIn, _In_ ULONG ulMFId, _In_ USHORT usMF16Id, _In_ DWORD dwError)
Definition: dc.c:735
BOOL WINAPI METADC_ExtTextOutW(HDC hdc, INT x, INT y, UINT fuOptions, const RECT *lprc, LPCWSTR lpString, UINT cchString, const INT *lpDx)
HANDLE hProcessHeap
Definition: kbswitch.c:25
BOOL WINAPI GetETM(HDC hdc, EXTTEXTMETRIC *petm)
OPENPRINTERW fpOpenPrinterW
Definition: printdrv.c:55
RTL_CRITICAL_SECTION semLocal
Definition: dllmain.c:12
METAHEADER mh
Definition: gdi32p.h:101
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
LPKGCP LpkGetCharacterPlacement
Definition: utils.c:6
DWORD * PDWORD
Definition: pedump.c:68
_In_ UINT _In_ DWORD dwIn
Definition: ntgdi.h:248
DWORD dwWritten
Definition: gdi32p.h:100
enum _HANDLECACHETYPE HANDLECACHETYPE
BOOL(WINAPI * SEEKPRINTER)(HANDLE, LARGE_INTEGER, PLARGE_INTEGER, DWORD, BOOL)
Definition: gdi32p.h:196
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
HINSTANCE hLpk
Definition: utils.c:4
DWORD WOW64_UMPDev
Definition: gdi32p.h:165
HBITMAP hBitmap
Definition: gdi32p.h:110
BOOL(WINAPI * ISVALIDDEVMODEW)(PDEVMODEW, size_t)
Definition: gdi32p.h:188
BOOL gbLpk
Definition: dllmain.c:11
DWORD Size
Definition: gdi32p.h:133
HRGN hRegion
Definition: gdi32p.h:111
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONG cjSize
Definition: winddi.h:3634
INT(CALLBACK * EMFPLAYPROC)(HDC hdc, INT iFunction, HANDLE hPageQuery)
Definition: gdi32p.h:24
BOOL WINAPI METADC_GetAndSetDCDWord(_Out_ PDWORD pdwResult, _In_ HDC hdc, _In_ UINT u, _In_ DWORD dwIn, _In_ ULONG ulMFId, _In_ USHORT usMF16Id, _In_ DWORD dwError)
LPBITMAPINFO WINAPI ConvertBitmapInfo(CONST BITMAPINFO *BitmapInfo, UINT ColorSpec, UINT *BitmapInfoSize, BOOL FollowedByData)
Definition: utils.c:178
HBRUSH hBrush
Definition: gdi32p.h:105
static HBITMAP
Definition: button.c:44
FORCEINLINE PVOID GdiAllocBatchCommand(HDC hdc, USHORT Cmd)
Definition: gdi32p.h:381
BOOL FASTCALL LoadTheSpoolerDrv(VOID)
Definition: printdrv.c:188
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HGDIOBJ hEnhMetaDc
Definition: gdi32p.h:115
CLOSEPRINTER fpClosePrinter
Definition: printdrv.c:43
BOOL(WINAPI * LPKETO)(HDC hdc, int x, int y, UINT fuOptions, const RECT *lprc, LPCWSTR lpString, UINT uCount, const INT *lpDx, INT unknown)
Definition: gdi32p.h:31
LPKETO LpkExtTextOut
Definition: utils.c:5
enum GDILoObjType GDILOOBJTYPE
VOID WINAPI EnumLogFontExW2A(LPENUMLOGFONTEXA fontA, CONST ENUMLOGFONTEXW *fontW)
Definition: utils.c:402
struct tagENHMETAFILE * PENHMETAFILE
BOOL(WINAPI * OPENPRINTERW)(LPWSTR, PHANDLE, LPPRINTER_DEFAULTSW)
Definition: gdi32p.h:189
HANDLE HDC
Definition: compat.h:481
GLuint64EXT * result
Definition: glext.h:11304
PVOID pvMetaBuffer
Definition: gdi32p.h:97
HCOLORSPACE hColorSpace
Definition: gdi32p.h:117
ULONG gcClientObj
Definition: clientobj.c:11
BYTE * PBYTE
Definition: pedump.c:66
DWORD Unknown
Definition: gdi32p.h:167
#define CONST
Definition: pedump.c:81
union _LARGE_INTEGER * PLARGE_INTEGER
Definition: file.c:85
int(* FARPROC)()
Definition: compat.h:28
DWORD dwFlags
Definition: gdi32p.h:159
PVOID pvMetaBuffer
Definition: gdi32p.h:131
LPWSTR(WINAPI * STARTDOCDLGW)(HANDLE, DOCINFOW *)
Definition: gdi32p.h:192
BOOL WINAPI GdiValidateHandle(HGDIOBJ)
Definition: misc.c:712
INT rastercaps
Definition: gdi32p.h:143
DWORD(WINAPI * QUERYREMOTEFONTS)(DWORD, DWORD, DWORD)
Definition: gdi32p.h:207
LPKGTEP LpkGetTextExtentExPoint
Definition: utils.c:7
INT WINAPI METADC16_Escape(_In_ HDC hdc, _In_ INT nEscape, _In_ INT cbInput, _In_ LPCSTR lpvInData, _Out_ LPVOID lpvOutData)
Definition: rosglue.c:1285
int * LPINT
Definition: windef.h:178
VOID WINAPI InitializeLpkHooks(_In_ FARPROC *hookfuncs)
struct _LOCALFONT * PLOCALFONT
WCHAR Filename[MAX_PATH+2]
Definition: gdi32p.h:118