[NTOSKRNL:FSRTL] Fix memory corruption when pruning tunnel cache
[reactos.git] / win32ss / include / ntgdityp.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Win32 Graphical Subsystem (WIN32K)
4 * FILE: win32ss/include/ntgdityp.h
5 * PURPOSE: Win32 Shared GDI Types for NtGdi*
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #ifndef _NTGDITYP_
12 #define _NTGDITYP_
13
14 #include "ntwin32.h"
15
16 /* ENUMERATIONS **************************************************************/
17
18 typedef enum _ARCTYPE
19 {
20 GdiTypeArc,
21 GdiTypeArcTo,
22 GdiTypeChord,
23 GdiTypePie,
24 } ARCTYPE, *PARCTYPE;
25
26 typedef enum _PALFUNCTYPE
27 {
28 GdiPalAnimate,
29 GdiPalSetEntries,
30 GdiPalGetEntries,
31 GdiPalGetSystemEntries,
32 GdiPalSetColorTable,
33 GdiPalGetColorTable,
34 } PALFUNCTYPE, *PPALFUNCTYPE;
35
36 typedef enum _POLYFUNCTYPE
37 {
38 GdiPolyPolygon = 1,
39 GdiPolyPolyLine,
40 GdiPolyBezier,
41 GdiPolyLineTo,
42 GdiPolyBezierTo,
43 GdiPolyPolyRgn,
44 } POLYFUNCTYPE, *PPOLYFUNCTYPE;
45
46 typedef enum _GETDCDWORD
47 {
48 GdiGetJournal,
49 GdiGetRelAbs,
50 GdiGetBreakExtra,
51 GdiGerCharBreak,
52 GdiGetArcDirection,
53 GdiGetEMFRestorDc,
54 GdiGetFontLanguageInfo,
55 GdiGetIsMemDc,
56 GdiGetMapMode,
57 GdiGetTextCharExtra,
58 } GETDCDWORD, *PGETDCDWORD;
59
60 typedef enum _GETSETDCDWORD
61 {
62 GdiGetSetEPSPrintingEscape = 1,
63 GdiGetSetCopyCount,
64 GdiGetSetTextAlign,
65 GdiGetSetRelAbs,
66 GdiGetSetTextCharExtra,
67 GdiGetSetSelectFont,
68 GdiGetSetMapperFlagsInternal,
69 GdiGetSetMapMode,
70 GdiGetSetArcDirection,
71 } GETSETDCDWORD, *PGETSETDCDWORD;
72
73 typedef enum _GETDCPOINT
74 {
75 GdiGetViewPortExt = 1,
76 GdiGetWindowExt,
77 GdiGetViewPortOrg,
78 GdiGetWindowOrg,
79 GdiGetAspectRatioFilter,
80 GdiGetDCOrg = 6,
81 } GETDCPOINT, *PGETDCPOINT;
82
83
84 typedef enum _GDIBATCHCMD
85 {
86 GdiBCPatBlt,
87 GdiBCPolyPatBlt,
88 GdiBCTextOut,
89 GdiBCExtTextOut,
90 GdiBCSetBrushOrg,
91 GdiBCExtSelClipRgn,
92 GdiBCSelObj,
93 GdiBCDelObj,
94 GdiBCDelRgn,
95 } GDIBATCHCMD, *PGDIBATCHCMD;
96
97 typedef enum _TRANSFORMTYPE
98 {
99 GdiDpToLp,
100 GdiLpToDp,
101 } TRANSFORMTYPE, *PTRANSFORMTYPE;
102
103 /* MATRIX flAccel flags */
104 enum
105 {
106 XFORM_SCALE = 1,
107 XFORM_UNITY = 2,
108 XFORM_Y_NEG = 4,
109 XFORM_FORMAT_LTOFX = 8,
110 XFORM_FORMAT_FXTOL = 0x10,
111 XFORM_FORMAT_LTOL = 0x20,
112 XFORM_NO_TRANSLATION = 0x40,
113
114 /* ReactOS specific */
115 XFORM_INTEGER = 0x1000,
116 };
117
118 typedef enum GDIObjType
119 {
120 GDIObjType_DEF_TYPE = 0x00,
121 GDIObjType_DC_TYPE = 0x01,
122 GDIObjType_UNUSED1_TYPE = 0x02,
123 GDIObjType_UNUSED2_TYPE = 0x03,
124 GDIObjType_RGN_TYPE = 0x04,
125 GDIObjType_SURF_TYPE = 0x05,
126 GDIObjType_CLIENTOBJ_TYPE = 0x06,
127 GDIObjType_PATH_TYPE = 0x07,
128 GDIObjType_PAL_TYPE = 0x08,
129 GDIObjType_ICMLCS_TYPE = 0x09,
130 GDIObjType_LFONT_TYPE = 0x0a,
131 GDIObjType_RFONT_TYPE = 0x0b,
132 GDIObjType_PFE_TYPE = 0x0c,
133 GDIObjType_PFT_TYPE = 0x0d,
134 GDIObjType_ICMCXF_TYPE = 0x0e,
135 GDIObjType_SPRITE_TYPE = 0x0f,
136 GDIObjType_BRUSH_TYPE = 0x10,
137 GDIObjType_UMPD_TYPE = 0x11,
138 GDIObjType_UNUSED4_TYPE = 0x12,
139 GDIObjType_SPACE_TYPE = 0x13,
140 GDIObjType_UNUSED5_TYPE = 0x14,
141 GDIObjType_META_TYPE = 0x15,
142 GDIObjType_EFSTATE_TYPE = 0x16,
143 GDIObjType_BMFD_TYPE = 0x17,
144 GDIObjType_VTFD_TYPE = 0x18,
145 GDIObjType_TTFD_TYPE = 0x19,
146 GDIObjType_RC_TYPE = 0x1a,
147 GDIObjType_TEMP_TYPE = 0x1b,
148 GDIObjType_DRVOBJ_TYPE = 0x1c,
149 GDIObjType_DCIOBJ_TYPE = 0x1d,
150 GDIObjType_SPOOL_TYPE = 0x1e,
151 GDIObjType_MAX_TYPE = 0x1e,
152 GDIObjTypeTotal = 0x1f,
153 } GDIOBJTYPE, *PGDIOBJTYPE;
154
155 typedef enum GDILoObjType
156 {
157 GDILoObjType_LO_BRUSH_TYPE = 0x100000,
158 GDILoObjType_LO_DC_TYPE = 0x10000,
159 GDILoObjType_LO_BITMAP_TYPE = 0x50000,
160 GDILoObjType_LO_PALETTE_TYPE = 0x80000,
161 GDILoObjType_LO_FONT_TYPE = 0xa0000,
162 GDILoObjType_LO_REGION_TYPE = 0x40000,
163 GDILoObjType_LO_ICMLCS_TYPE = 0x90000,
164 GDILoObjType_LO_CLIENTOBJ_TYPE = 0x60000,
165 GDILoObjType_LO_UMPD_TYPE = 0x110000,
166 GDILoObjType_LO_META_TYPE = 0x150000,
167 GDILoObjType_LO_ALTDC_TYPE = 0x210000,
168 GDILoObjType_LO_PEN_TYPE = 0x300000,
169 GDILoObjType_LO_EXTPEN_TYPE = 0x500000,
170 GDILoObjType_LO_DIBSECTION_TYPE = 0x250000,
171 GDILoObjType_LO_METAFILE16_TYPE = 0x260000,
172 GDILoObjType_LO_METAFILE_TYPE = 0x460000,
173 GDILoObjType_LO_METADC16_TYPE = 0x660000
174 } GDILOOBJTYPE, *PGDILOOBJTYPE;
175
176 /**
177 World Transform modification modes
178 See [MS-EMF] Section 2.1.24
179 */
180 #define MWT_SET 0x04
181
182 #define GdiWorldSpaceToPageSpace 0x203
183 #define GdiWorldSpaceToDeviceSpace 0x204
184 #define GdiPageSpaceToDeviceSpace 0x304
185 #define GdiDeviceSpaceToWorldSpace 0x402
186
187 /* FIXME: Unknown */
188 typedef DWORD FULLSCREENCONTROL;
189 typedef DWORD LFTYPE;
190
191 /* Public LAST_STOCK = 19, plus 2 more internal entries */
192 #define NB_STOCK_OBJECTS 22
193
194 /* extra stock object: default 1x1 bitmap for memory DCs */
195 #define DEFAULT_BITMAP (21)
196
197
198 /* DEFINES *******************************************************************/
199
200 #define GDIBATCHBUFSIZE 0x136*4
201 #define GDI_BATCH_LIMIT 20
202
203 // NtGdiGetCharWidthW Flags
204 #define GCW_WIN32 0x0001
205 #define GCW_NOFLOAT 0x0002
206 #define GCW_INDICES 0x0008
207
208 // NtGdiGetCharABCWidthW Flags
209 #define GCABCW_NOFLOAT 0x0001
210 #define GCABCW_INDICES 0x0002
211
212 // NtGdiGetTextExtent* flags (reactos own)
213 #define GTEF_INDICES 0x1
214
215 /* CAPS1 support */
216 #define CAPS1 94
217 //#define C1_TRANSPARENT 0x0001
218 #define TC_TT_ABLE 0x0002
219 #define C1_TT_CR_ANY 0x0004
220 #define C1_EMF_COMPLIANT 0x0008
221 #define C1_DIBENGINE 0x0010
222 #define C1_GAMMA_RAMP 0x0040
223 #define C1_REINIT_ABLE 0x0080
224 #define C1_GLYPH_INDEX 0x0100
225 #define C1_BIT_PACKED 0x0200
226 #define C1_BYTE_PACKED 0x0400
227 #define C1_COLORCURSOR 0x0800
228 #define C1_CMYK_ABLE 0x1000
229 #define C1_SLOW_CARD 0x2000
230 #define C1_MIRRORING 0X4000
231
232 // NtGdiGetRandomRgn iCodes
233 #define CLIPRGN 1 // GetClipRgn
234 #define METARGN 2 // GetMetaRgn
235 #define APIRGN 3
236
237 /* New flag for fdwInit in CreateDIBitmap. See support.microsoft.com/kb/kbview/108497*/
238 #define CBM_CREATDIB 2
239
240 /* New color use parameter. See support.microsoft.com/kb/kbview/108497 */
241 #define DIB_PAL_INDICES 2
242
243 /* Get/SetBounds/Rect support. */
244 #define DCB_WINDOWMGR 0x8000 /* Queries the Windows bounding rectangle instead of the application's */
245
246 #define GDITAG_TYPE_EMF 'XEFM' // EnhMetaFile
247 #define GDITAG_TYPE_MFP '_PFM' // MetaFile Picture
248
249 /* TYPES *********************************************************************/
250
251 typedef PVOID KERNEL_PVOID;
252 typedef PVOID PUMDHPDEV;
253 typedef D3DNTHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEI;
254 #if !defined(_WINDDI_)
255 typedef LONG FIX;
256 #endif
257
258 typedef struct _CHWIDTHINFO // Based on FD_DEVICEMETRICS
259 {
260 LONG lMinA;
261 LONG lMinC;
262 LONG lMinD;
263 } CHWIDTHINFO, *PCHWIDTHINFO;
264
265 typedef struct _UNIVERSAL_FONT_ID
266 {
267 ULONG CheckSum;
268 ULONG Index;
269 } UNIVERSAL_FONT_ID, *PUNIVERSAL_FONT_ID;
270
271 #define RI_TECH_BITMAP 1
272 #define RI_TECH_FIXED 2
273 #define RI_TECH_SCALABLE 3
274
275 typedef struct _REALIZATION_INFO
276 {
277 DWORD iTechnology;
278 DWORD iUniq;
279 DWORD dwUnknown;
280 } REALIZATION_INFO, *PREALIZATION_INFO;
281
282 typedef struct _WIDTHDATA
283 {
284 USHORT sOverhang;
285 USHORT sHeight;
286 USHORT sCharInc;
287 USHORT sBreak;
288 BYTE jFirst;
289 BYTE jLast;
290 BYTE jBreak;
291 BYTE jDefault;
292 USHORT sDBCSInc;
293 USHORT sDefaultInc;
294 } WIDTHDATA, *PWIDTHDATA;
295
296 typedef struct _DEVCAPS // Very similar to GDIINFO
297 {
298 ULONG ulVersion;
299 ULONG ulTechnology;
300 ULONG ulHorzSizeM;
301 ULONG ulVertSizeM;
302 ULONG ulHorzSize;
303 ULONG ulVertSize;
304 ULONG ulHorzRes;
305 ULONG ulVertRes;
306 ULONG ulBitsPixel;
307 ULONG ulPlanes;
308 ULONG ulNumPens;
309 ULONG ulNumFonts;
310 ULONG ulNumColors;
311 ULONG ulRasterCaps;
312 ULONG ulAspectX;
313 ULONG ulAspectY;
314 ULONG ulAspectXY;
315 ULONG ulLogPixelsX;
316 ULONG ulLogPixelsY;
317 ULONG ulSizePalette;
318 ULONG ulColorRes;
319 ULONG ulPhysicalWidth;
320 ULONG ulPhysicalHeight;
321 ULONG ulPhysicalOffsetX;
322 ULONG ulPhysicalOffsetY;
323 ULONG ulTextCaps;
324 ULONG ulVRefresh;
325 ULONG ulDesktopHorzRes;
326 ULONG ulDesktopVertRes;
327 ULONG ulBltAlignment;
328 ULONG ulPanningHorzRes;
329 ULONG ulPanningVertRes;
330 ULONG xPanningAlignment;
331 ULONG yPanningAlignment;
332 ULONG ulShadeBlend;
333 ULONG ulColorMgmtCaps;
334 } DEVCAPS, *PDEVCAPS;
335
336 /* Gdi Handle Cache Types and Structures */
337 #define GDI_CACHED_HANDLE_TYPES 4
338 #define CACHE_BRUSH_ENTRIES 10
339 #define CACHE_PEN_ENTRIES 8
340 #define CACHE_REGION_ENTRIES 8
341 #define CACHE_LFONT_ENTRIES 1
342
343 typedef enum _HANDLECACHETYPE
344 {
345 hctBrushHandle,
346 hctPenHandle,
347 hctRegionHandle,
348 hctLFontHandle
349 } HANDLECACHETYPE,*PHANDLECACHETYPE;
350
351 typedef struct _GDIHANDLECACHE
352 {
353 ULONG ulLock;
354 ULONG ulNumHandles[GDI_CACHED_HANDLE_TYPES];
355 HANDLE Handle[CACHE_BRUSH_ENTRIES+CACHE_PEN_ENTRIES+CACHE_REGION_ENTRIES+CACHE_LFONT_ENTRIES];
356 } GDIHANDLECACHE, *PGDIHANDLECACHE;
357
358 /* Font Structures */
359 typedef struct _TMDIFF
360 {
361 ULONG cjotma;
362 CHAR chFirst;
363 CHAR chLast;
364 CHAR ChDefault;
365 CHAR ChBreak;
366 } TMDIFF, *PTMDIFF;
367
368 typedef struct _TMW_INTERNAL
369 {
370 TEXTMETRICW TextMetric;
371 TMDIFF Diff;
372 } TMW_INTERNAL, *PTMW_INTERNAL;
373
374 typedef struct _NTMW_INTERNAL
375 {
376 TMDIFF tmd;
377 NEWTEXTMETRICEXW ntmw;
378 } NTMW_INTERNAL, *PNTMW_INTERNAL;
379
380 typedef struct _ENUMFONTDATAW
381 {
382 ULONG cbSize;
383 ULONG ulNtmwiOffset;
384 DWORD dwFontType;
385 ENUMLOGFONTEXDVW elfexdv; /* variable size! */
386 /* NTMW_INTERNAL ntmwi; use ulNtwmOffset */
387 } ENUMFONTDATAW, *PENUMFONTDATAW;
388
389 /* Number Representation */
390 typedef struct _EFLOAT_S
391 {
392 LONG lMant;
393 LONG lExp;
394 } EFLOAT_S;
395
396 /* XFORM Structures */
397 typedef struct _MATRIX_S
398 {
399 EFLOAT_S efM11;
400 EFLOAT_S efM12;
401 EFLOAT_S efM21;
402 EFLOAT_S efM22;
403 EFLOAT_S efDx;
404 EFLOAT_S efDy;
405 FIX fxDx;
406 FIX fxDy;
407 FLONG flAccel;
408 } MATRIX_S;
409
410 typedef struct _MATRIX
411 {
412 FLOATOBJ efM11;
413 FLOATOBJ efM12;
414 FLOATOBJ efM21;
415 FLOATOBJ efM22;
416 FLOATOBJ efDx;
417 FLOATOBJ efDy;
418 FIX fxDx;
419 FIX fxDy;
420 FLONG flAccel;
421 } MATRIX, *PMATRIX;
422
423 /* Gdi XForm storage union */
424 typedef union
425 {
426 FLOAT f;
427 ULONG l;
428 } gxf_long;
429
430 #define CFONT_REALIZATION 0x0080
431
432 typedef struct _CFONT
433 {
434 struct _CFONT *pcfNext;
435 HFONT hf;
436 ULONG cRef; // Count of all pointers to this CFONT.
437 FLONG fl;
438 LONG lHeight; // Precomputed logical height.
439 HDC hdc; // HDC of realization. 0 for display.
440 EFLOAT_S efM11; // efM11 of WtoD of DC of realization
441 EFLOAT_S efM22; // efM22 of WtoD of DC of realization
442 EFLOAT_S efDtoWBaseline; // Precomputed back transform. (FXtoL)
443 EFLOAT_S efDtoWAscent; // Precomputed back transform. (FXtoL)
444 WIDTHDATA wd;
445 FLONG flInfo;
446 USHORT sWidth[256]; // Widths in pels.
447 ULONG ulAveWidth; // bogus average used by USER
448 TMW_INTERNAL tmw; // cached metrics
449 DWORD iTechnology;
450 DWORD iUniq;
451 DWORD dwUnknown;
452 DWORD dwCFCount;
453 } CFONT, *PCFONT;
454
455 /* GDI Batch structures. */
456 typedef struct _GDIBATCHHDR
457 {
458 SHORT Size;
459 SHORT Cmd;
460 } GDIBATCHHDR, *PGDIBATCHHDR;
461
462 typedef struct _GDIBSPATBLT
463 {
464 GDIBATCHHDR gbHdr;
465 int nXLeft;
466 int nYLeft;
467 int nWidth;
468 int nHeight;
469 HANDLE hbrush;
470 DWORD dwRop;
471 COLORREF crForegroundClr;
472 COLORREF crBackgroundClr;
473 COLORREF crBrushClr;
474 INT IcmBrushColor;
475 POINTL ptlViewportOrg;
476 ULONG ulForegroundClr;
477 ULONG ulBackgroundClr;
478 ULONG ulBrushClr;
479 } GDIBSPATBLT, *PGDIBSPATBLT;
480
481 /* FIXME: this should go to some "public" GDI32 header */
482 typedef struct _PATRECT
483 {
484 RECT r;
485 HBRUSH hBrush;
486 } PATRECT, * PPATRECT;
487
488 typedef struct _GDIBSPPATBLT
489 {
490 GDIBATCHHDR gbHdr;
491 DWORD rop4;
492 DWORD Mode;
493 DWORD Count;
494 COLORREF crForegroundClr;
495 COLORREF crBackgroundClr;
496 COLORREF crBrushClr;
497 ULONG ulForegroundClr;
498 ULONG ulBackgroundClr;
499 ULONG ulBrushClr;
500 POINTL ptlViewportOrg;
501 PATRECT pRect[1]; // POLYPATBLT
502 } GDIBSPPATBLT, *PGDIBSPPATBLT;
503
504 //
505 // Both ExtSelectClipRgn and TextOut pass a nill RECT.
506 //
507 #define GDIBS_NORECT 0x80000000
508
509 typedef struct _GDIBSTEXTOUT
510 {
511 GDIBATCHHDR gbHdr;
512 COLORREF crForegroundClr;
513 COLORREF crBackgroundClr;
514 LONG lBkMode;
515 ULONG ulForegroundClr;
516 ULONG ulBackgroundClr;
517 int x;
518 int y;
519 UINT Options;
520 RECT Rect;
521 DWORD iCS_CP;
522 UINT cbCount;
523 UINT Size;
524 HANDLE hlfntNew;
525 FLONG flTextAlign;
526 POINTL ptlViewportOrg;
527 union {
528 WCHAR String[2];
529 ULONG Buffer[1];
530 };
531 } GDIBSTEXTOUT, *PGDIBSTEXTOUT;
532
533 typedef struct _GDIBSEXTTEXTOUT
534 {
535 GDIBATCHHDR gbHdr;
536 UINT Count;
537 UINT Options;
538 RECT Rect;
539 POINTL ptlViewportOrg;
540 ULONG ulBackgroundClr;
541 } GDIBSEXTTEXTOUT, *PGDIBSEXTTEXTOUT;
542
543 typedef struct _GDIBSSETBRHORG
544 {
545 GDIBATCHHDR gbHdr;
546 POINTL ptlBrushOrigin;
547 } GDIBSSETBRHORG, *PGDIBSSETBRHORG;
548
549 typedef struct _GDIBSEXTSELCLPRGN
550 {
551 GDIBATCHHDR gbHdr;
552 int fnMode;
553 RECTL rcl;
554 } GDIBSEXTSELCLPRGN, *PGDIBSEXTSELCLPRGN;
555
556 /* Use with GdiBCSelObj, GdiBCDelObj and GdiBCDelRgn. */
557 typedef struct _GDIBSOBJECT
558 {
559 GDIBATCHHDR gbHdr;
560 HGDIOBJ hgdiobj;
561 } GDIBSOBJECT, *PGDIBSOBJECT;
562
563 /* Declaration missing in ddk/winddi.h */
564 typedef VOID (APIENTRY *PFN_DrvMovePanning)(LONG, LONG, FLONG);
565
566 /* Most of these are defined in ddk/winddi.h */
567 typedef struct _DRIVER_FUNCTIONS
568 {
569 PFN_DrvEnablePDEV EnablePDEV;
570 PFN_DrvCompletePDEV CompletePDEV;
571 PFN_DrvDisablePDEV DisablePDEV;
572 PFN_DrvEnableSurface EnableSurface;
573 PFN_DrvDisableSurface DisableSurface;
574 PFN_DrvAssertMode AssertMode;
575 PFN_DrvOffset Offset;
576 PFN_DrvResetPDEV ResetPDEV;
577 PFN_DrvDisableDriver DisableDriver;
578 PVOID Unknown1;
579 PFN_DrvCreateDeviceBitmap CreateDeviceBitmap;
580 PFN_DrvDeleteDeviceBitmap DeleteDeviceBitmap;
581 PFN_DrvRealizeBrush RealizeBrush;
582 PFN_DrvDitherColor DitherColor;
583 PFN_DrvStrokePath StrokePath;
584 PFN_DrvFillPath FillPath;
585 PFN_DrvStrokeAndFillPath StrokeAndFillPath;
586 PFN_DrvPaint Paint;
587 PFN_DrvBitBlt BitBlt;
588 PFN_DrvCopyBits CopyBits;
589 PFN_DrvStretchBlt StretchBlt;
590 PVOID Unknown2;
591 PFN_DrvSetPalette SetPalette;
592 PFN_DrvTextOut TextOut;
593 PFN_DrvEscape Escape;
594 PFN_DrvDrawEscape DrawEscape;
595 PFN_DrvQueryFont QueryFont;
596 PFN_DrvQueryFontTree QueryFontTree;
597 PFN_DrvQueryFontData QueryFontData;
598 PFN_DrvSetPointerShape SetPointerShape;
599 PFN_DrvMovePointer MovePointer;
600 PFN_DrvLineTo LineTo;
601 PFN_DrvSendPage SendPage;
602 PFN_DrvStartPage StartPage;
603 PFN_DrvEndDoc EndDoc;
604 PFN_DrvStartDoc StartDoc;
605 PVOID Unknown3;
606 PFN_DrvGetGlyphMode GetGlyphMode;
607 PFN_DrvSynchronize Synchronize;
608 PVOID Unknown4;
609 PFN_DrvSaveScreenBits SaveScreenBits;
610 PFN_DrvGetModes GetModes;
611 PFN_DrvFree Free;
612 PFN_DrvDestroyFont DestroyFont;
613 PFN_DrvQueryFontCaps QueryFontCaps;
614 PFN_DrvLoadFontFile LoadFontFile;
615 PFN_DrvUnloadFontFile UnloadFontFile;
616 PFN_DrvFontManagement FontManagement;
617 PFN_DrvQueryTrueTypeTable QueryTrueTypeTable;
618 PFN_DrvQueryTrueTypeOutline QueryTrueTypeOutline;
619 PFN_DrvGetTrueTypeFile GetTrueTypeFile;
620 PFN_DrvQueryFontFile QueryFontFile;
621 PFN_DrvMovePanning MovePanning;
622 PFN_DrvQueryAdvanceWidths QueryAdvanceWidths;
623 PFN_DrvSetPixelFormat SetPixelFormat;
624 PFN_DrvDescribePixelFormat DescribePixelFormat;
625 PFN_DrvSwapBuffers SwapBuffers;
626 PFN_DrvStartBanding StartBanding;
627 PFN_DrvNextBand NextBand;
628 PFN_DrvGetDirectDrawInfo GetDirectDrawInfo;
629 PFN_DrvEnableDirectDraw EnableDirectDraw;
630 PFN_DrvDisableDirectDraw DisableDirectDraw;
631 PFN_DrvQuerySpoolType QuerySpoolType;
632 PVOID Unknown5;
633 PFN_DrvIcmCreateColorTransform IcmCreateColorTransform;
634 PFN_DrvIcmDeleteColorTransform IcmDeleteColorTransform;
635 PFN_DrvIcmCheckBitmapBits IcmCheckBitmapBits;
636 PFN_DrvIcmSetDeviceGammaRamp IcmSetDeviceGammaRamp;
637 PFN_DrvGradientFill GradientFill;
638 PFN_DrvStretchBltROP StretchBltROP;
639 PFN_DrvPlgBlt PlgBlt;
640 PFN_DrvAlphaBlend AlphaBlend;
641 PVOID SynthesizeFont;
642 PVOID GetSynthesizedFontFiles;
643 PFN_DrvTransparentBlt TransparentBlt;
644 PFN_DrvQueryPerBandInfo QueryPerBandInfo;
645 PFN_DrvQueryDeviceSupport QueryDeviceSupport;
646 PVOID Reserved1;
647 PVOID Reserved2;
648 PVOID Reserved3;
649 PVOID Reserved4;
650 PVOID Reserved5;
651 PVOID Reserved6;
652 PVOID Reserved7;
653 PVOID Reserved8;
654 PFN_DrvDeriveSurface DeriveSurface;
655 PFN_DrvQueryGlyphAttrs QueryGlyphAttrs;
656 PFN_DrvNotify Notify;
657 PFN_DrvSynchronizeSurface SynchronizeSurface;
658 PFN_DrvResetDevice ResetDevice;
659 PVOID Reserved9;
660 PVOID Reserved10;
661 PVOID Reserved11; /* 92 */
662
663 /* ReactOS specify */
664 PFN_DrvEnableDriver EnableDriver; //ReactOS Extra
665 } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS;
666
667 #define ASSERT_PFN(pfn) \
668 C_ASSERT(FIELD_OFFSET(DRIVER_FUNCTIONS, pfn) == sizeof(PVOID) * INDEX_Drv##pfn)
669
670 ASSERT_PFN(EnablePDEV);
671 ASSERT_PFN(CompletePDEV);
672 ASSERT_PFN(DisablePDEV);
673 ASSERT_PFN(EnableSurface);
674 ASSERT_PFN(DisableSurface);
675 ASSERT_PFN(AssertMode);
676 ASSERT_PFN(Offset);
677 ASSERT_PFN(ResetPDEV);
678 ASSERT_PFN(DisableDriver);
679 ASSERT_PFN(CreateDeviceBitmap);
680 ASSERT_PFN(DeleteDeviceBitmap);
681 ASSERT_PFN(RealizeBrush);
682 ASSERT_PFN(DitherColor);
683 ASSERT_PFN(StrokePath);
684 ASSERT_PFN(FillPath);
685 ASSERT_PFN(StrokeAndFillPath);
686 ASSERT_PFN(Paint);
687 ASSERT_PFN(BitBlt);
688 ASSERT_PFN(CopyBits);
689 ASSERT_PFN(StretchBlt);
690 ASSERT_PFN(SetPalette);
691 ASSERT_PFN(TextOut);
692 ASSERT_PFN(Escape);
693 ASSERT_PFN(DrawEscape);
694 ASSERT_PFN(QueryFont);
695 ASSERT_PFN(QueryFontTree);
696 ASSERT_PFN(QueryFontData);
697 ASSERT_PFN(SetPointerShape);
698 ASSERT_PFN(MovePointer);
699 ASSERT_PFN(LineTo);
700 ASSERT_PFN(SendPage);
701 ASSERT_PFN(StartPage);
702 ASSERT_PFN(EndDoc);
703 ASSERT_PFN(StartDoc);
704 ASSERT_PFN(GetGlyphMode);
705 ASSERT_PFN(Synchronize);
706 ASSERT_PFN(SaveScreenBits);
707 ASSERT_PFN(GetModes);
708 ASSERT_PFN(Free);
709 ASSERT_PFN(DestroyFont);
710 ASSERT_PFN(QueryFontCaps);
711 ASSERT_PFN(LoadFontFile);
712 ASSERT_PFN(UnloadFontFile);
713 ASSERT_PFN(FontManagement);
714 ASSERT_PFN(QueryTrueTypeTable);
715 ASSERT_PFN(QueryTrueTypeOutline);
716 ASSERT_PFN(GetTrueTypeFile);
717 ASSERT_PFN(QueryFontFile);
718 ASSERT_PFN(MovePanning);
719 ASSERT_PFN(QueryAdvanceWidths);
720 ASSERT_PFN(SetPixelFormat);
721 ASSERT_PFN(DescribePixelFormat);
722 ASSERT_PFN(SwapBuffers);
723 ASSERT_PFN(StartBanding);
724 ASSERT_PFN(NextBand);
725 ASSERT_PFN(GetDirectDrawInfo);
726 ASSERT_PFN(EnableDirectDraw);
727 ASSERT_PFN(DisableDirectDraw);
728 ASSERT_PFN(QuerySpoolType);
729 ASSERT_PFN(IcmCreateColorTransform);
730 ASSERT_PFN(IcmDeleteColorTransform);
731 ASSERT_PFN(IcmCheckBitmapBits);
732 ASSERT_PFN(IcmSetDeviceGammaRamp);
733 ASSERT_PFN(GradientFill);
734 ASSERT_PFN(StretchBltROP);
735 ASSERT_PFN(PlgBlt);
736 ASSERT_PFN(AlphaBlend);
737 ASSERT_PFN(SynthesizeFont);
738 ASSERT_PFN(GetSynthesizedFontFiles);
739 ASSERT_PFN(TransparentBlt);
740 ASSERT_PFN(QueryPerBandInfo);
741 ASSERT_PFN(QueryDeviceSupport);
742 ASSERT_PFN(Reserved1);
743 ASSERT_PFN(Reserved2);
744 ASSERT_PFN(Reserved3);
745 ASSERT_PFN(Reserved4);
746 ASSERT_PFN(Reserved5);
747 ASSERT_PFN(Reserved6);
748 ASSERT_PFN(Reserved7);
749 ASSERT_PFN(Reserved8);
750 ASSERT_PFN(DeriveSurface);
751 ASSERT_PFN(QueryGlyphAttrs);
752 ASSERT_PFN(Notify);
753 ASSERT_PFN(SynchronizeSurface);
754 ASSERT_PFN(ResetDevice);
755
756 #endif