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