Home | History | Annotate | Download | only in include
      1 /*
      2  * winddi.h
      3  *
      4  * GDI device driver interface
      5  *
      6  * This file is part of the w32api package.
      7  *
      8  * Contributors:
      9  *   Created by Casper S. Hornstrup <chorns (at) users.sourceforge.net>
     10  *
     11  * THIS SOFTWARE IS NOT COPYRIGHTED
     12  *
     13  * This source code is offered for use in the public domain. You may
     14  * use, modify or distribute it freely.
     15  *
     16  * This code is distributed in the hope that it will be useful but
     17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
     18  * DISCLAIMED. This includes but is not limited to warranties of
     19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     20  *
     21  */
     22 
     23 #ifndef _WINDDI_
     24 #define _WINDDI_
     25 
     26 #ifdef __VIDEO_H__
     27 #error video.h cannot be included with winddi.h
     28 #else
     29 
     30 #include <ddrawint.h>
     31 #include <d3dnthal.h>
     32 
     33 #ifdef __cplusplus
     34 extern "C" {
     35 #endif
     36 
     37 #ifndef DECLSPEC_IMPORT
     38 #define DECLSPEC_IMPORT __attribute__((dllimport))
     39 #endif
     40 
     41 #ifndef WIN32KAPI
     42 #define WIN32KAPI DECLSPEC_ADDRSAFE
     43 #endif
     44 
     45 #define DDI_DRIVER_VERSION_NT4            0x00020000
     46 #define DDI_DRIVER_VERSION_SP3            0x00020003
     47 #define DDI_DRIVER_VERSION_NT5            0x00030000
     48 #define DDI_DRIVER_VERSION_NT5_01         0x00030100
     49 
     50 #define GDI_DRIVER_VERSION                0x4000
     51 
     52 #ifdef _X86_
     53 
     54 typedef DWORD FLOATL;
     55 
     56 #else /* !_X86_ */
     57 
     58 typedef FLOAT FLOATL;
     59 
     60 #endif
     61 
     62 typedef SHORT FWORD;
     63 typedef LONG LDECI4;
     64 typedef ULONG IDENT;
     65 
     66 typedef ULONG_PTR HFF;
     67 typedef ULONG_PTR HFC;
     68 
     69 typedef LONG PTRDIFF;
     70 typedef PTRDIFF *PPTRDIFF;
     71 typedef LONG FIX;
     72 typedef FIX *PFIX;
     73 typedef ULONG ROP4;
     74 typedef ULONG MIX;
     75 typedef ULONG HGLYPH;
     76 typedef HGLYPH *PHGLYPH;
     77 
     78 typedef LONG_PTR (APIENTRY *PFN)();
     79 
     80 DECLARE_HANDLE(HBM);
     81 DECLARE_HANDLE(HDEV);
     82 DECLARE_HANDLE(HSURF);
     83 DECLARE_HANDLE(DHSURF);
     84 DECLARE_HANDLE(DHPDEV);
     85 DECLARE_HANDLE(HDRVOBJ);
     86 
     87 #ifndef _NTDDVDEO_
     88 typedef struct _ENG_EVENT *PEVENT;
     89 #endif
     90 
     91 #define OPENGL_CMD                        4352
     92 #define OPENGL_GETINFO                    4353
     93 #define WNDOBJ_SETUP                      4354
     94 
     95 #define FD_ERROR                          0xFFFFFFFF
     96 #define DDI_ERROR                         0xFFFFFFFF
     97 
     98 #define HFF_INVALID                       ((HFF) 0)
     99 #define HFC_INVALID                       ((HFC) 0)
    100 #define HGLYPH_INVALID                    ((HGLYPH) -1)
    101 
    102 #define FP_ALTERNATEMODE                  1
    103 #define FP_WINDINGMODE                    2
    104 
    105 #define DN_ACCELERATION_LEVEL             1
    106 #define DN_DEVICE_ORIGIN                  2
    107 #define DN_SLEEP_MODE                     3
    108 #define DN_DRAWING_BEGIN                  4
    109 
    110 #define DCR_SOLID                         0
    111 #define DCR_DRIVER                        1
    112 #define DCR_HALFTONE                      2
    113 
    114 #define GX_IDENTITY                       0
    115 #define GX_OFFSET                         1
    116 #define GX_SCALE                          2
    117 #define GX_GENERAL                        3
    118 
    119 #define LTOFX(x)        ((x) << 4)
    120 #define FXTOL(x)        ((x) >> 4)
    121 #define FXTOLFLOOR(x)   ((x) >> 4)
    122 #define FXTOLCEILING(x) ((x + 0x0F) >> 4)
    123 #define FXTOLROUND(x)   ((((x) >> 3) + 1) >> 1)
    124 
    125 typedef struct _POINTE {
    126 	FLOATL  x;
    127 	FLOATL  y;
    128 } POINTE, *PPOINTE;
    129 
    130 typedef union _FLOAT_LONG {
    131   FLOATL  e;
    132   LONG  l;
    133 } FLOAT_LONG, *PFLOAT_LONG;
    134 
    135 typedef struct _POINTFIX {
    136   FIX  x;
    137   FIX  y;
    138 } POINTFIX, *PPOINTFIX;
    139 
    140 typedef struct _RECTFX {
    141   FIX  xLeft;
    142   FIX  yTop;
    143   FIX  xRight;
    144   FIX  yBottom;
    145 } RECTFX, *PRECTFX;
    146 
    147 typedef struct _POINTQF {
    148   LARGE_INTEGER  x;
    149   LARGE_INTEGER  y;
    150 } POINTQF, *PPOINTQF;
    151 
    152 
    153 typedef struct _BLENDOBJ {
    154   BLENDFUNCTION  BlendFunction;
    155 } BLENDOBJ,*PBLENDOBJ;
    156 
    157 /* BRUSHOBJ.flColorType */
    158 #define BR_DEVICE_ICM    0x01
    159 #define BR_HOST_ICM      0x02
    160 #define BR_CMYKCOLOR     0x04
    161 #define BR_ORIGCOLOR     0x08
    162 
    163 typedef struct _BRUSHOBJ {
    164   ULONG  iSolidColor;
    165   PVOID  pvRbrush;
    166   FLONG  flColorType;
    167 } BRUSHOBJ;
    168 
    169 typedef struct _CIECHROMA {
    170   LDECI4  x;
    171   LDECI4  y;
    172   LDECI4  Y;
    173 } CIECHROMA;
    174 
    175 typedef struct _RUN {
    176   LONG  iStart;
    177   LONG  iStop;
    178 } RUN, *PRUN;
    179 
    180 typedef struct _CLIPLINE {
    181   POINTFIX  ptfxA;
    182   POINTFIX  ptfxB;
    183   LONG  lStyleState;
    184   ULONG  c;
    185   RUN  arun[1];
    186 } CLIPLINE, *PCLIPLINE;
    187 
    188 /* CLIPOBJ.iDComplexity constants */
    189 #define DC_TRIVIAL                        0
    190 #define DC_RECT                           1
    191 #define DC_COMPLEX                        3
    192 
    193 /* CLIPOBJ.iFComplexity constants */
    194 #define FC_RECT                           1
    195 #define FC_RECT4                          2
    196 #define FC_COMPLEX                        3
    197 
    198 /* CLIPOBJ.iMode constants */
    199 #define TC_RECTANGLES                     0
    200 #define TC_PATHOBJ                        2
    201 
    202 /* CLIPOBJ.fjOptions constants */
    203 #define OC_BANK_CLIP                      1
    204 
    205 typedef struct _CLIPOBJ {
    206   ULONG  iUniq;
    207   RECTL  rclBounds;
    208   BYTE  iDComplexity;
    209   BYTE  iFComplexity;
    210   BYTE  iMode;
    211   BYTE  fjOptions;
    212 } CLIPOBJ;
    213 
    214 typedef struct _COLORINFO {
    215   CIECHROMA  Red;
    216   CIECHROMA  Green;
    217   CIECHROMA  Blue;
    218   CIECHROMA  Cyan;
    219   CIECHROMA  Magenta;
    220   CIECHROMA  Yellow;
    221   CIECHROMA  AlignmentWhite;
    222   LDECI4  RedGamma;
    223   LDECI4  GreenGamma;
    224   LDECI4  BlueGamma;
    225   LDECI4  MagentaInCyanDye;
    226   LDECI4  YellowInCyanDye;
    227   LDECI4  CyanInMagentaDye;
    228   LDECI4  YellowInMagentaDye;
    229   LDECI4  CyanInYellowDye;
    230   LDECI4  MagentaInYellowDye;
    231 } COLORINFO, *PCOLORINFO;
    232 
    233 /* DEVHTADJDATA.DeviceFlags constants */
    234 #define DEVHTADJF_COLOR_DEVICE            0x00000001
    235 #define DEVHTADJF_ADDITIVE_DEVICE         0x00000002
    236 
    237 typedef struct _DEVHTINFO {
    238   DWORD  HTFlags;
    239   DWORD  HTPatternSize;
    240   DWORD  DevPelsDPI;
    241   COLORINFO  ColorInfo;
    242 } DEVHTINFO, *PDEVHTINFO;
    243 
    244 typedef struct _DEVHTADJDATA {
    245   DWORD   DeviceFlags;
    246   DWORD   DeviceXDPI;
    247   DWORD   DeviceYDPI;
    248   PDEVHTINFO  pDefHTInfo;
    249   PDEVHTINFO  pAdjHTInfo;
    250 } DEVHTADJDATA, *PDEVHTADJDATA;
    251 
    252 /* DEVINFO.flGraphicsCaps flags */
    253 #define GCAPS_BEZIERS           0x00000001
    254 #define GCAPS_GEOMETRICWIDE     0x00000002
    255 #define GCAPS_ALTERNATEFILL     0x00000004
    256 #define GCAPS_WINDINGFILL       0x00000008
    257 #define GCAPS_HALFTONE          0x00000010
    258 #define GCAPS_COLOR_DITHER      0x00000020
    259 #define GCAPS_HORIZSTRIKE       0x00000040
    260 #define GCAPS_VERTSTRIKE        0x00000080
    261 #define GCAPS_OPAQUERECT        0x00000100
    262 #define GCAPS_VECTORFONT        0x00000200
    263 #define GCAPS_MONO_DITHER       0x00000400
    264 #define GCAPS_ASYNCCHANGE       0x00000800
    265 #define GCAPS_ASYNCMOVE         0x00001000
    266 #define GCAPS_DONTJOURNAL       0x00002000
    267 #define GCAPS_DIRECTDRAW        0x00004000
    268 #define GCAPS_ARBRUSHOPAQUE     0x00008000
    269 #define GCAPS_PANNING           0x00010000
    270 #define GCAPS_HIGHRESTEXT       0x00040000
    271 #define GCAPS_PALMANAGED        0x00080000
    272 #define GCAPS_DITHERONREALIZE   0x00200000
    273 #define GCAPS_NO64BITMEMACCESS  0x00400000
    274 #define GCAPS_FORCEDITHER       0x00800000
    275 #define GCAPS_GRAY16            0x01000000
    276 #define GCAPS_ICM               0x02000000
    277 #define GCAPS_CMYKCOLOR         0x04000000
    278 #define GCAPS_LAYERED           0x08000000
    279 #define GCAPS_ARBRUSHTEXT       0x10000000
    280 #define GCAPS_SCREENPRECISION   0x20000000
    281 #define GCAPS_FONT_RASTERIZER   0x40000000
    282 #define GCAPS_NUP               0x80000000
    283 
    284 /* DEVINFO.iDitherFormat constants */
    285 #define BMF_1BPP       __MSABI_LONG(1)
    286 #define BMF_4BPP       __MSABI_LONG(2)
    287 #define BMF_8BPP       __MSABI_LONG(3)
    288 #define BMF_16BPP      __MSABI_LONG(4)
    289 #define BMF_24BPP      __MSABI_LONG(5)
    290 #define BMF_32BPP      __MSABI_LONG(6)
    291 #define BMF_4RLE       __MSABI_LONG(7)
    292 #define BMF_8RLE       __MSABI_LONG(8)
    293 #define BMF_JPEG       __MSABI_LONG(9)
    294 #define BMF_PNG       __MSABI_LONG(10)
    295 
    296 /* DEVINFO.flGraphicsCaps2 flags */
    297 #define GCAPS2_JPEGSRC          0x00000001
    298 #define GCAPS2_xxxx             0x00000002
    299 #define GCAPS2_PNGSRC           0x00000008
    300 #define GCAPS2_CHANGEGAMMARAMP  0x00000010
    301 #define GCAPS2_ALPHACURSOR      0x00000020
    302 #define GCAPS2_SYNCFLUSH        0x00000040
    303 #define GCAPS2_SYNCTIMER        0x00000080
    304 #define GCAPS2_ICD_MULTIMON     0x00000100
    305 #define GCAPS2_MOUSETRAILS      0x00000200
    306 #define GCAPS2_RESERVED1        0x00000400
    307 
    308 typedef struct _DEVINFO {
    309   FLONG  flGraphicsCaps;
    310   LOGFONTW  lfDefaultFont;
    311   LOGFONTW  lfAnsiVarFont;
    312   LOGFONTW  lfAnsiFixFont;
    313   ULONG  cFonts;
    314   ULONG  iDitherFormat;
    315   USHORT  cxDither;
    316   USHORT  cyDither;
    317   HPALETTE  hpalDefault;
    318   FLONG  flGraphicsCaps2;
    319 } DEVINFO, *PDEVINFO;
    320 
    321 struct _DRIVEROBJ;
    322 
    323 typedef WINBOOL
    324 (APIENTRY CALLBACK *FREEOBJPROC)(
    325   struct _DRIVEROBJ  *pDriverObj);
    326 
    327 typedef struct _DRIVEROBJ {
    328   PVOID  pvObj;
    329   FREEOBJPROC  pFreeProc;
    330   HDEV  hdev;
    331   DHPDEV  dhpdev;
    332 } DRIVEROBJ;
    333 
    334 /* DRVFN.iFunc constants */
    335 #define INDEX_DrvEnablePDEV               __MSABI_LONG(0)
    336 #define INDEX_DrvCompletePDEV             __MSABI_LONG(1)
    337 #define INDEX_DrvDisablePDEV              __MSABI_LONG(2)
    338 #define INDEX_DrvEnableSurface            __MSABI_LONG(3)
    339 #define INDEX_DrvDisableSurface           __MSABI_LONG(4)
    340 #define INDEX_DrvAssertMode               __MSABI_LONG(5)
    341 #define INDEX_DrvOffset                   __MSABI_LONG(6)
    342 #define INDEX_DrvResetPDEV                __MSABI_LONG(7)
    343 #define INDEX_DrvDisableDriver            __MSABI_LONG(8)
    344 #define INDEX_DrvUnknown1                 __MSABI_LONG(9)
    345 #define INDEX_DrvCreateDeviceBitmap       __MSABI_LONG(10)
    346 #define INDEX_DrvDeleteDeviceBitmap       __MSABI_LONG(11)
    347 #define INDEX_DrvRealizeBrush             __MSABI_LONG(12)
    348 #define INDEX_DrvDitherColor              __MSABI_LONG(13)
    349 #define INDEX_DrvStrokePath               __MSABI_LONG(14)
    350 #define INDEX_DrvFillPath                 __MSABI_LONG(15)
    351 #define INDEX_DrvStrokeAndFillPath        __MSABI_LONG(16)
    352 #define INDEX_DrvPaint                    __MSABI_LONG(17)
    353 #define INDEX_DrvBitBlt                   __MSABI_LONG(18)
    354 #define INDEX_DrvCopyBits                 __MSABI_LONG(19)
    355 #define INDEX_DrvStretchBlt               __MSABI_LONG(20)
    356 #define INDEX_DrvUnknown2                 __MSABI_LONG(21)
    357 #define INDEX_DrvSetPalette               __MSABI_LONG(22)
    358 #define INDEX_DrvTextOut                  __MSABI_LONG(23)
    359 #define INDEX_DrvEscape                   __MSABI_LONG(24)
    360 #define INDEX_DrvDrawEscape               __MSABI_LONG(25)
    361 #define INDEX_DrvQueryFont                __MSABI_LONG(26)
    362 #define INDEX_DrvQueryFontTree            __MSABI_LONG(27)
    363 #define INDEX_DrvQueryFontData            __MSABI_LONG(28)
    364 #define INDEX_DrvSetPointerShape          __MSABI_LONG(29)
    365 #define INDEX_DrvMovePointer              __MSABI_LONG(30)
    366 #define INDEX_DrvLineTo                   __MSABI_LONG(31)
    367 #define INDEX_DrvSendPage                 __MSABI_LONG(32)
    368 #define INDEX_DrvStartPage                __MSABI_LONG(33)
    369 #define INDEX_DrvEndDoc                   __MSABI_LONG(34)
    370 #define INDEX_DrvStartDoc                 __MSABI_LONG(35)
    371 #define INDEX_DrvUnknown3                 __MSABI_LONG(36)
    372 #define INDEX_DrvGetGlyphMode             __MSABI_LONG(37)
    373 #define INDEX_DrvSynchronize              __MSABI_LONG(38)
    374 #define INDEX_DrvUnknown4                 __MSABI_LONG(39)
    375 #define INDEX_DrvSaveScreenBits           __MSABI_LONG(40)
    376 #define INDEX_DrvGetModes                 __MSABI_LONG(41)
    377 #define INDEX_DrvFree                     __MSABI_LONG(42)
    378 #define INDEX_DrvDestroyFont              __MSABI_LONG(43)
    379 #define INDEX_DrvQueryFontCaps            __MSABI_LONG(44)
    380 #define INDEX_DrvLoadFontFile             __MSABI_LONG(45)
    381 #define INDEX_DrvUnloadFontFile           __MSABI_LONG(46)
    382 #define INDEX_DrvFontManagement           __MSABI_LONG(47)
    383 #define INDEX_DrvQueryTrueTypeTable       __MSABI_LONG(48)
    384 #define INDEX_DrvQueryTrueTypeOutline     __MSABI_LONG(49)
    385 #define INDEX_DrvGetTrueTypeFile          __MSABI_LONG(50)
    386 #define INDEX_DrvQueryFontFile            __MSABI_LONG(51)
    387 #define INDEX_DrvMovePanning              __MSABI_LONG(52)
    388 #define INDEX_DrvQueryAdvanceWidths       __MSABI_LONG(53)
    389 #define INDEX_DrvSetPixelFormat           __MSABI_LONG(54)
    390 #define INDEX_DrvDescribePixelFormat      __MSABI_LONG(55)
    391 #define INDEX_DrvSwapBuffers              __MSABI_LONG(56)
    392 #define INDEX_DrvStartBanding             __MSABI_LONG(57)
    393 #define INDEX_DrvNextBand                 __MSABI_LONG(58)
    394 #define INDEX_DrvGetDirectDrawInfo        __MSABI_LONG(59)
    395 #define INDEX_DrvEnableDirectDraw         __MSABI_LONG(60)
    396 #define INDEX_DrvDisableDirectDraw        __MSABI_LONG(61)
    397 #define INDEX_DrvQuerySpoolType           __MSABI_LONG(62)
    398 #define INDEX_DrvUnknown5                 __MSABI_LONG(63)
    399 #define INDEX_DrvIcmCreateColorTransform  __MSABI_LONG(64)
    400 #define INDEX_DrvIcmDeleteColorTransform  __MSABI_LONG(65)
    401 #define INDEX_DrvIcmCheckBitmapBits       __MSABI_LONG(66)
    402 #define INDEX_DrvIcmSetDeviceGammaRamp    __MSABI_LONG(67)
    403 #define INDEX_DrvGradientFill             __MSABI_LONG(68)
    404 #define INDEX_DrvStretchBltROP            __MSABI_LONG(69)
    405 #define INDEX_DrvPlgBlt                   __MSABI_LONG(70)
    406 #define INDEX_DrvAlphaBlend               __MSABI_LONG(71)
    407 #define INDEX_DrvSynthesizeFont           __MSABI_LONG(72)
    408 #define INDEX_DrvGetSynthesizedFontFiles  __MSABI_LONG(73)
    409 #define INDEX_DrvTransparentBlt           __MSABI_LONG(74)
    410 #define INDEX_DrvQueryPerBandInfo         __MSABI_LONG(75)
    411 #define INDEX_DrvQueryDeviceSupport       __MSABI_LONG(76)
    412 #define INDEX_DrvReserved1                __MSABI_LONG(77)
    413 #define INDEX_DrvReserved2                __MSABI_LONG(78)
    414 #define INDEX_DrvReserved3                __MSABI_LONG(79)
    415 #define INDEX_DrvReserved4                __MSABI_LONG(80)
    416 #define INDEX_DrvReserved5                __MSABI_LONG(81)
    417 #define INDEX_DrvReserved6                __MSABI_LONG(82)
    418 #define INDEX_DrvReserved7                __MSABI_LONG(83)
    419 #define INDEX_DrvReserved8                __MSABI_LONG(84)
    420 #define INDEX_DrvDeriveSurface            __MSABI_LONG(85)
    421 #define INDEX_DrvQueryGlyphAttrs          __MSABI_LONG(86)
    422 #define INDEX_DrvNotify                   __MSABI_LONG(87)
    423 #define INDEX_DrvSynchronizeSurface       __MSABI_LONG(88)
    424 #define INDEX_DrvResetDevice              __MSABI_LONG(89)
    425 #define INDEX_DrvReserved9                __MSABI_LONG(90)
    426 #define INDEX_DrvReserved10               __MSABI_LONG(91)
    427 #define INDEX_DrvReserved11               __MSABI_LONG(92)
    428 #define INDEX_LAST                        __MSABI_LONG(93)
    429 
    430 typedef struct _DRVFN {
    431   ULONG  iFunc;
    432   PFN  pfn;
    433 } DRVFN, *PDRVFN;
    434 
    435 /* DRVENABLEDATA.iDriverVersion constants */
    436 #define DDI_DRIVER_VERSION_NT4            0x00020000
    437 #define DDI_DRIVER_VERSION_SP3            0x00020003
    438 #define DDI_DRIVER_VERSION_NT5            0x00030000
    439 #define DDI_DRIVER_VERSION_NT5_01         0x00030100
    440 #define DDI_DRIVER_VERSION_NT5_01_SP1     0x00030101
    441 
    442 typedef struct _DRVENABLEDATA {
    443   ULONG  iDriverVersion;
    444   ULONG  c;
    445   DRVFN  *pdrvfn;
    446 } DRVENABLEDATA, *PDRVENABLEDATA;
    447 
    448 DECLARE_HANDLE(HSEMAPHORE);
    449 
    450 typedef struct {
    451   DWORD  nSize;
    452   HDC  hdc;
    453   PBYTE  pvEMF;
    454   PBYTE  pvCurrentRecord;
    455 } EMFINFO, *PEMFINFO;
    456 
    457 typedef struct _ENGSAFESEMAPHORE {
    458   HSEMAPHORE  hsem;
    459   LONG  lCount;
    460 } ENGSAFESEMAPHORE;
    461 
    462 typedef struct _ENG_TIME_FIELDS {
    463   USHORT  usYear;
    464   USHORT  usMonth;
    465   USHORT  usDay;
    466   USHORT  usHour;
    467   USHORT  usMinute;
    468   USHORT  usSecond;
    469   USHORT  usMilliseconds;
    470   USHORT  usWeekday;
    471 } ENG_TIME_FIELDS, *PENG_TIME_FIELDS;
    472 
    473 typedef struct _ENUMRECTS {
    474   ULONG  c;
    475   RECTL  arcl[1];
    476 } ENUMRECTS;
    477 
    478 typedef struct _FD_XFORM {
    479   FLOATL  eXX;
    480   FLOATL  eXY;
    481   FLOATL  eYX;
    482   FLOATL  eYY;
    483 } FD_XFORM, *PFD_XFORM;
    484 
    485 /* FD_DEVICEMETRICS.flRealizedType constants */
    486 #define FDM_TYPE_BM_SIDE_CONST            0x00000001
    487 #define FDM_TYPE_MAXEXT_EQUAL_BM_SIDE     0x00000002
    488 #define FDM_TYPE_CHAR_INC_EQUAL_BM_BASE   0x00000004
    489 #define FDM_TYPE_ZERO_BEARINGS            0x00000008
    490 #define FDM_TYPE_CONST_BEARINGS           0x00000010
    491 
    492 typedef struct _FD_DEVICEMETRICS {
    493   FLONG  flRealizedType;
    494   POINTE  pteBase;
    495   POINTE  pteSide;
    496   LONG  lD;
    497   FIX  fxMaxAscender;
    498   FIX  fxMaxDescender;
    499   POINTL  ptlUnderline1;
    500   POINTL  ptlStrikeout;
    501   POINTL  ptlULThickness;
    502   POINTL  ptlSOThickness;
    503   ULONG  cxMax;
    504   ULONG  cyMax;
    505   ULONG  cjGlyphMax;
    506   FD_XFORM  fdxQuantized;
    507   LONG  lNonLinearExtLeading;
    508   LONG  lNonLinearIntLeading;
    509   LONG  lNonLinearMaxCharWidth;
    510   LONG  lNonLinearAvgCharWidth;
    511   LONG  lMinA;
    512   LONG  lMinC;
    513   LONG  lMinD;
    514   LONG  alReserved[1];
    515 } FD_DEVICEMETRICS, *PFD_DEVICEMETRICS;
    516 
    517 /* FD_GLYPHATTR.iMode constants */
    518 #define FO_ATTR_MODE_ROTATE               1
    519 
    520 typedef struct _FD_GLYPHATTR {
    521   ULONG  cjThis;
    522   ULONG  cGlyphs;
    523   ULONG  iMode;
    524   BYTE  aGlyphAttr[1];
    525 } FD_GLYPHATTR, *PFD_GLYPHATTR;
    526 
    527 /* FD_GLYPHSET.flAccel */
    528 #define GS_UNICODE_HANDLES                0x00000001
    529 #define GS_8BIT_HANDLES                   0x00000002
    530 #define GS_16BIT_HANDLES                  0x00000004
    531 
    532 typedef struct _WCRUN {
    533   WCHAR  wcLow;
    534   USHORT  cGlyphs;
    535   HGLYPH  *phg;
    536 } WCRUN, *PWCRUN;
    537 
    538 typedef struct _FD_GLYPHSET {
    539   ULONG  cjThis;
    540   FLONG  flAccel;
    541   ULONG  cGlyphsSupported;
    542   ULONG  cRuns;
    543   WCRUN  awcrun[1];
    544 } FD_GLYPHSET, *PFD_GLYPHSET;
    545 
    546 typedef struct _FD_KERNINGPAIR {
    547   WCHAR  wcFirst;
    548   WCHAR  wcSecond;
    549   FWORD  fwdKern;
    550 } FD_KERNINGPAIR;
    551 
    552 #if defined(_X86_) && !defined(USERMODE_DRIVER)
    553 typedef struct _FLOATOBJ
    554 {
    555   ULONG  ul1;
    556   ULONG  ul2;
    557 } FLOATOBJ, *PFLOATOBJ;
    558 #else
    559 typedef FLOAT FLOATOBJ, *PFLOATOBJ;
    560 #endif
    561 
    562 typedef struct _FLOATOBJ_XFORM {
    563   FLOATOBJ  eM11;
    564   FLOATOBJ  eM12;
    565   FLOATOBJ  eM21;
    566   FLOATOBJ  eM22;
    567   FLOATOBJ  eDx;
    568   FLOATOBJ  eDy;
    569 } FLOATOBJ_XFORM, *PFLOATOBJ_XFORM, FAR *LPFLOATOBJ_XFORM;
    570 
    571 /* FONTDIFF.fsSelection */
    572 #define FM_SEL_ITALIC                     0x0001
    573 #define FM_SEL_UNDERSCORE                 0x0002
    574 #define FM_SEL_NEGATIVE                   0x0004
    575 #define FM_SEL_OUTLINED                   0x0008
    576 #define FM_SEL_STRIKEOUT                  0x0010
    577 #define FM_SEL_BOLD                       0x0020
    578 #define FM_SEL_REGULAR                    0x0040
    579 
    580 typedef struct _FONTDIFF {
    581   BYTE  jReserved1;
    582   BYTE  jReserved2;
    583   BYTE  jReserved3;
    584   BYTE  bWeight;
    585   USHORT  usWinWeight;
    586   FSHORT  fsSelection;
    587   FWORD  fwdAveCharWidth;
    588   FWORD  fwdMaxCharInc;
    589   POINTL  ptlCaret;
    590 } FONTDIFF;
    591 
    592 typedef struct _FONTSIM {
    593   PTRDIFF  dpBold;
    594   PTRDIFF  dpItalic;
    595   PTRDIFF  dpBoldItalic;
    596 } FONTSIM;
    597 
    598 /* FONTINFO.flCaps constants */
    599 #define FO_DEVICE_FONT                    __MSABI_LONG(1)
    600 #define FO_OUTLINE_CAPABLE                __MSABI_LONG(2)
    601 
    602 typedef struct _FONTINFO {
    603   ULONG  cjThis;
    604   FLONG  flCaps;
    605   ULONG  cGlyphsSupported;
    606   ULONG  cjMaxGlyph1;
    607   ULONG  cjMaxGlyph4;
    608   ULONG  cjMaxGlyph8;
    609   ULONG  cjMaxGlyph32;
    610 } FONTINFO, *PFONTINFO;
    611 
    612 /* FONTOBJ.flFontType constants */
    613 #define FO_TYPE_RASTER   RASTER_FONTTYPE
    614 #define FO_TYPE_DEVICE   DEVICE_FONTTYPE
    615 #define FO_TYPE_TRUETYPE TRUETYPE_FONTTYPE
    616 #define FO_TYPE_OPENTYPE OPENTYPE_FONTTYPE
    617 
    618 #define FO_SIM_BOLD      0x00002000
    619 #define FO_SIM_ITALIC    0x00004000
    620 #define FO_EM_HEIGHT     0x00008000
    621 #define FO_GRAY16        0x00010000
    622 #define FO_NOGRAY16      0x00020000
    623 #define FO_NOHINTS       0x00040000
    624 #define FO_NO_CHOICE     0x00080000
    625 #define FO_CFF            0x00100000
    626 #define FO_POSTSCRIPT     0x00200000
    627 #define FO_MULTIPLEMASTER 0x00400000
    628 #define FO_VERT_FACE      0x00800000
    629 #define FO_DBCS_FONT      0X01000000
    630 #define FO_NOCLEARTYPE    0x02000000
    631 #define FO_CLEARTYPE_X    0x10000000
    632 #define FO_CLEARTYPE_Y    0x20000000
    633 
    634 typedef struct _FONTOBJ {
    635   ULONG  iUniq;
    636   ULONG  iFace;
    637   ULONG  cxMax;
    638   FLONG  flFontType;
    639   ULONG_PTR  iTTUniq;
    640   ULONG_PTR  iFile;
    641   SIZE  sizLogResPpi;
    642   ULONG  ulStyleSize;
    643   PVOID  pvConsumer;
    644   PVOID  pvProducer;
    645 } FONTOBJ;
    646 
    647 typedef struct _GAMMARAMP {
    648   WORD  Red[256];
    649   WORD  Green[256];
    650   WORD  Blue[256];
    651 } GAMMARAMP, *PGAMMARAMP;
    652 
    653 /* GDIINFO.ulPrimaryOrder constants */
    654 #define PRIMARY_ORDER_ABC                 0
    655 #define PRIMARY_ORDER_ACB                 1
    656 #define PRIMARY_ORDER_BAC                 2
    657 #define PRIMARY_ORDER_BCA                 3
    658 #define PRIMARY_ORDER_CBA                 4
    659 #define PRIMARY_ORDER_CAB                 5
    660 
    661 /* GDIINFO.ulHTPatternSize constants */
    662 #define HT_PATSIZE_2x2                    0
    663 #define HT_PATSIZE_2x2_M                  1
    664 #define HT_PATSIZE_4x4                    2
    665 #define HT_PATSIZE_4x4_M                  3
    666 #define HT_PATSIZE_6x6                    4
    667 #define HT_PATSIZE_6x6_M                  5
    668 #define HT_PATSIZE_8x8                    6
    669 #define HT_PATSIZE_8x8_M                  7
    670 #define HT_PATSIZE_10x10                  8
    671 #define HT_PATSIZE_10x10_M                9
    672 #define HT_PATSIZE_12x12                  10
    673 #define HT_PATSIZE_12x12_M                11
    674 #define HT_PATSIZE_14x14                  12
    675 #define HT_PATSIZE_14x14_M                13
    676 #define HT_PATSIZE_16x16                  14
    677 #define HT_PATSIZE_16x16_M                15
    678 #define HT_PATSIZE_SUPERCELL              16
    679 #define HT_PATSIZE_SUPERCELL_M            17
    680 #define HT_PATSIZE_USER                   18
    681 #define HT_PATSIZE_MAX_INDEX              HT_PATSIZE_USER
    682 #define HT_PATSIZE_DEFAULT                HT_PATSIZE_SUPERCELL_M
    683 #define HT_USERPAT_CX_MIN                 4
    684 #define HT_USERPAT_CX_MAX                 256
    685 #define HT_USERPAT_CY_MIN                 4
    686 #define HT_USERPAT_CY_MAX                 256
    687 
    688 /* GDIINFO.ulHTOutputFormat constants */
    689 #define HT_FORMAT_1BPP                    0
    690 #define HT_FORMAT_4BPP                    2
    691 #define HT_FORMAT_4BPP_IRGB               3
    692 #define HT_FORMAT_8BPP                    4
    693 #define HT_FORMAT_16BPP                   5
    694 #define HT_FORMAT_24BPP                   6
    695 #define HT_FORMAT_32BPP                   7
    696 
    697 /* GDIINFO.flHTFlags */
    698 #define HT_FLAG_SQUARE_DEVICE_PEL         0x00000001
    699 #define HT_FLAG_HAS_BLACK_DYE             0x00000002
    700 #define HT_FLAG_ADDITIVE_PRIMS            0x00000004
    701 #define HT_FLAG_USE_8BPP_BITMASK          0x00000008
    702 #define HT_FLAG_INK_HIGH_ABSORPTION       0x00000010
    703 #define HT_FLAG_INK_ABSORPTION_INDICES    0x00000060
    704 #define HT_FLAG_DO_DEVCLR_XFORM           0x00000080
    705 #define HT_FLAG_OUTPUT_CMY                0x00000100
    706 #define HT_FLAG_PRINT_DRAFT_MODE          0x00000200
    707 #define HT_FLAG_INVERT_8BPP_BITMASK_IDX   0x00000400
    708 #define HT_FLAG_8BPP_CMY332_MASK          0xFF000000
    709 
    710 #define MAKE_CMYMASK_BYTE(c,m,y)          ((BYTE)(((BYTE)(c) & 0x07) << 5) \
    711                                           |(BYTE)(((BYTE)(m) & 0x07) << 2) \
    712                                           |(BYTE)((BYTE)(y) & 0x03))
    713 
    714 #define MAKE_CMY332_MASK(c,m,y)           ((DWORD)(((DWORD)(c) & 0x07) << 29)\
    715                                           |(DWORD)(((DWORD)(m) & 0x07) << 26)\
    716                                           |(DWORD)(((DWORD)(y) & 0x03) << 24))
    717 
    718 /* GDIINFO.flHTFlags constants */
    719 #define HT_FLAG_INK_ABSORPTION_IDX0       0x00000000
    720 #define HT_FLAG_INK_ABSORPTION_IDX1       0x00000020
    721 #define HT_FLAG_INK_ABSORPTION_IDX2       0x00000040
    722 #define HT_FLAG_INK_ABSORPTION_IDX3       0x00000060
    723 
    724 #define HT_FLAG_HIGHEST_INK_ABSORPTION    (HT_FLAG_INK_HIGH_ABSORPTION \
    725                                           |HT_FLAG_INK_ABSORPTION_IDX3)
    726 #define HT_FLAG_HIGHER_INK_ABSORPTION     (HT_FLAG_INK_HIGH_ABSORPTION \
    727                                           |HT_FLAG_INK_ABSORPTION_IDX2)
    728 #define HT_FLAG_HIGH_INK_ABSORPTION       (HT_FLAG_INK_HIGH_ABSORPTION \
    729                                           |HT_FLAG_INK_ABSORPTION_IDX1)
    730 #define HT_FLAG_NORMAL_INK_ABSORPTION     HT_FLAG_INK_ABSORPTION_IDX0
    731 #define HT_FLAG_LOW_INK_ABSORPTION        HT_FLAG_INK_ABSORPTION_IDX1
    732 #define HT_FLAG_LOWER_INK_ABSORPTION      HT_FLAG_INK_ABSORPTION_IDX2
    733 #define HT_FLAG_LOWEST_INK_ABSORPTION     HT_FLAG_INK_ABSORPTION_IDX3
    734 
    735 #define HT_BITMASKPALRGB                  (DWORD)'0BGR'
    736 #define HT_SET_BITMASKPAL2RGB(pPal)       (*((LPDWORD)(pPal)) = HT_BITMASKPALRGB)
    737 #define HT_IS_BITMASKPALRGB(pPal)         (*((LPDWORD)(pPal)) == (DWORD)0)
    738 
    739 /* GDIINFO.ulPhysicalPixelCharacteristics constants */
    740 #define PPC_DEFAULT                       0x0
    741 #define PPC_UNDEFINED                     0x1
    742 #define PPC_RGB_ORDER_VERTICAL_STRIPES    0x2
    743 #define PPC_BGR_ORDER_VERTICAL_STRIPES    0x3
    744 #define PPC_RGB_ORDER_HORIZONTAL_STRIPES  0x4
    745 #define PPC_BGR_ORDER_HORIZONTAL_STRIPES  0x5
    746 
    747 #define PPG_DEFAULT                       0
    748 #define PPG_SRGB                          1
    749 
    750 typedef struct _GDIINFO {
    751   ULONG  ulVersion;
    752   ULONG  ulTechnology;
    753   ULONG  ulHorzSize;
    754   ULONG  ulVertSize;
    755   ULONG  ulHorzRes;
    756   ULONG  ulVertRes;
    757   ULONG  cBitsPixel;
    758   ULONG  cPlanes;
    759   ULONG  ulNumColors;
    760   ULONG  flRaster;
    761   ULONG  ulLogPixelsX;
    762   ULONG  ulLogPixelsY;
    763   ULONG  flTextCaps;
    764   ULONG  ulDACRed;
    765   ULONG  ulDACGreen;
    766   ULONG  ulDACBlue;
    767   ULONG  ulAspectX;
    768   ULONG  ulAspectY;
    769   ULONG  ulAspectXY;
    770   LONG  xStyleStep;
    771   LONG  yStyleStep;
    772   LONG  denStyleStep;
    773   POINTL  ptlPhysOffset;
    774   SIZEL  szlPhysSize;
    775   ULONG  ulNumPalReg;
    776   COLORINFO  ciDevice;
    777   ULONG  ulDevicePelsDPI;
    778   ULONG  ulPrimaryOrder;
    779   ULONG  ulHTPatternSize;
    780   ULONG  ulHTOutputFormat;
    781   ULONG  flHTFlags;
    782   ULONG  ulVRefresh;
    783   ULONG  ulBltAlignment;
    784   ULONG  ulPanningHorzRes;
    785   ULONG  ulPanningVertRes;
    786   ULONG  xPanningAlignment;
    787   ULONG  yPanningAlignment;
    788   ULONG  cxHTPat;
    789   ULONG  cyHTPat;
    790   LPBYTE  pHTPatA;
    791   LPBYTE  pHTPatB;
    792   LPBYTE  pHTPatC;
    793   ULONG  flShadeBlend;
    794   ULONG  ulPhysicalPixelCharacteristics;
    795   ULONG  ulPhysicalPixelGamma;
    796 } GDIINFO, *PGDIINFO;
    797 
    798 /* PATHDATA.flags constants */
    799 #define PD_BEGINSUBPATH                   0x00000001
    800 #define PD_ENDSUBPATH                     0x00000002
    801 #define PD_RESETSTYLE                     0x00000004
    802 #define PD_CLOSEFIGURE                    0x00000008
    803 #define PD_BEZIERS                        0x00000010
    804 #define PD_ALL                            (PD_BEGINSUBPATH \
    805                                           |PD_ENDSUBPATH \
    806                                           |PD_RESETSTYLE \
    807                                           |PD_CLOSEFIGURE \
    808                                           PD_BEZIERS)
    809 
    810 typedef struct _PATHDATA {
    811   FLONG  flags;
    812   ULONG  count;
    813   POINTFIX  *pptfx;
    814 } PATHDATA, *PPATHDATA;
    815 
    816 /* PATHOBJ.fl constants */
    817 #define PO_BEZIERS                        0x00000001
    818 #define PO_ELLIPSE                        0x00000002
    819 #define PO_ALL_INTEGERS                   0x00000004
    820 #define PO_ENUM_AS_INTEGERS               0x00000008
    821 
    822 typedef struct _PATHOBJ {
    823   FLONG  fl;
    824   ULONG  cCurves;
    825 } PATHOBJ;
    826 
    827 typedef struct _GLYPHBITS {
    828   POINTL  ptlOrigin;
    829   SIZEL  sizlBitmap;
    830   BYTE  aj[1];
    831 } GLYPHBITS;
    832 
    833 typedef union _GLYPHDEF {
    834   GLYPHBITS  *pgb;
    835   PATHOBJ  *ppo;
    836 } GLYPHDEF;
    837 
    838 typedef struct _GLYPHPOS {
    839   HGLYPH  hg;
    840   GLYPHDEF  *pgdf;
    841   POINTL  ptl;
    842 } GLYPHPOS, *PGLYPHPOS;
    843 
    844 typedef struct _GLYPHDATA {
    845   GLYPHDEF  gdf;
    846   HGLYPH  hg;
    847   FIX  fxD;
    848   FIX  fxA;
    849   FIX  fxAB;
    850   FIX  fxInkTop;
    851   FIX  fxInkBottom;
    852   RECTL  rclInk;
    853   POINTQF  ptqD;
    854 } GLYPHDATA;
    855 
    856 typedef struct _IFIEXTRA {
    857   ULONG  ulIdentifier;
    858   PTRDIFF  dpFontSig;
    859   ULONG  cig;
    860   PTRDIFF  dpDesignVector;
    861   PTRDIFF  dpAxesInfoW;
    862   ULONG  aulReserved[1];
    863 } IFIEXTRA, *PIFIEXTRA;
    864 
    865 /* IFIMETRICS constants */
    866 
    867 #define FM_VERSION_NUMBER                 0x0
    868 
    869 /* IFIMETRICS.fsType constants */
    870 #define FM_TYPE_LICENSED                  0x2
    871 #define FM_READONLY_EMBED                 0x4
    872 #define FM_EDITABLE_EMBED                 0x8
    873 #define FM_NO_EMBEDDING                   FM_TYPE_LICENSED
    874 
    875 /* IFIMETRICS.flInfo constants */
    876 #define FM_INFO_TECH_TRUETYPE             0x00000001
    877 #define FM_INFO_TECH_BITMAP               0x00000002
    878 #define FM_INFO_TECH_STROKE               0x00000004
    879 #define FM_INFO_TECH_OUTLINE_NOT_TRUETYPE 0x00000008
    880 #define FM_INFO_ARB_XFORMS                0x00000010
    881 #define FM_INFO_1BPP                      0x00000020
    882 #define FM_INFO_4BPP                      0x00000040
    883 #define FM_INFO_8BPP                      0x00000080
    884 #define FM_INFO_16BPP                     0x00000100
    885 #define FM_INFO_24BPP                     0x00000200
    886 #define FM_INFO_32BPP                     0x00000400
    887 #define FM_INFO_INTEGER_WIDTH             0x00000800
    888 #define FM_INFO_CONSTANT_WIDTH            0x00001000
    889 #define FM_INFO_NOT_CONTIGUOUS            0x00002000
    890 #define FM_INFO_TECH_MM                   0x00004000
    891 #define FM_INFO_RETURNS_OUTLINES          0x00008000
    892 #define FM_INFO_RETURNS_STROKES           0x00010000
    893 #define FM_INFO_RETURNS_BITMAPS           0x00020000
    894 #define FM_INFO_DSIG                      0x00040000
    895 #define FM_INFO_RIGHT_HANDED              0x00080000
    896 #define FM_INFO_INTEGRAL_SCALING          0x00100000
    897 #define FM_INFO_90DEGREE_ROTATIONS        0x00200000
    898 #define FM_INFO_OPTICALLY_FIXED_PITCH     0x00400000
    899 #define FM_INFO_DO_NOT_ENUMERATE          0x00800000
    900 #define FM_INFO_ISOTROPIC_SCALING_ONLY    0x01000000
    901 #define FM_INFO_ANISOTROPIC_SCALING_ONLY  0x02000000
    902 #define FM_INFO_TECH_CFF                  0x04000000
    903 #define FM_INFO_FAMILY_EQUIV              0x08000000
    904 #define FM_INFO_DBCS_FIXED_PITCH          0x10000000
    905 #define FM_INFO_NONNEGATIVE_AC            0x20000000
    906 #define FM_INFO_IGNORE_TC_RA_ABLE         0x40000000
    907 #define FM_INFO_TECH_TYPE1                0x80000000
    908 
    909 #define MAXCHARSETS                       16
    910 
    911 /* IFIMETRICS.ulPanoseCulture constants */
    912 #define  FM_PANOSE_CULTURE_LATIN          0x0
    913 
    914 typedef struct _IFIMETRICS {
    915   ULONG  cjThis;
    916   ULONG  cjIfiExtra;
    917   PTRDIFF  dpwszFamilyName;
    918   PTRDIFF  dpwszStyleName;
    919   PTRDIFF  dpwszFaceName;
    920   PTRDIFF  dpwszUniqueName;
    921   PTRDIFF  dpFontSim;
    922   LONG  lEmbedId;
    923   LONG  lItalicAngle;
    924   LONG  lCharBias;
    925   PTRDIFF  dpCharSets;
    926   BYTE  jWinCharSet;
    927   BYTE  jWinPitchAndFamily;
    928   USHORT  usWinWeight;
    929   ULONG  flInfo;
    930   USHORT  fsSelection;
    931   USHORT  fsType;
    932   FWORD  fwdUnitsPerEm;
    933   FWORD  fwdLowestPPEm;
    934   FWORD  fwdWinAscender;
    935   FWORD  fwdWinDescender;
    936   FWORD  fwdMacAscender;
    937   FWORD  fwdMacDescender;
    938   FWORD  fwdMacLineGap;
    939   FWORD  fwdTypoAscender;
    940   FWORD  fwdTypoDescender;
    941   FWORD  fwdTypoLineGap;
    942   FWORD  fwdAveCharWidth;
    943   FWORD  fwdMaxCharInc;
    944   FWORD  fwdCapHeight;
    945   FWORD  fwdXHeight;
    946   FWORD  fwdSubscriptXSize;
    947   FWORD  fwdSubscriptYSize;
    948   FWORD  fwdSubscriptXOffset;
    949   FWORD  fwdSubscriptYOffset;
    950   FWORD  fwdSuperscriptXSize;
    951   FWORD  fwdSuperscriptYSize;
    952   FWORD  fwdSuperscriptXOffset;
    953   FWORD  fwdSuperscriptYOffset;
    954   FWORD  fwdUnderscoreSize;
    955   FWORD  fwdUnderscorePosition;
    956   FWORD  fwdStrikeoutSize;
    957   FWORD  fwdStrikeoutPosition;
    958   BYTE  chFirstChar;
    959   BYTE  chLastChar;
    960   BYTE  chDefaultChar;
    961   BYTE  chBreakChar;
    962   WCHAR  wcFirstChar;
    963   WCHAR  wcLastChar;
    964   WCHAR  wcDefaultChar;
    965   WCHAR  wcBreakChar;
    966   POINTL  ptlBaseline;
    967   POINTL  ptlAspect;
    968   POINTL  ptlCaret;
    969   RECTL  rclFontBox;
    970   BYTE  achVendId[4];
    971   ULONG  cKerningPairs;
    972   ULONG  ulPanoseCulture;
    973   PANOSE  panose;
    974 #if defined(_WIN64)
    975   PVOID  Align;
    976 #endif
    977 } IFIMETRICS, *PIFIMETRICS;
    978 
    979 /* LINEATTRS.fl */
    980 #define LA_GEOMETRIC                      0x00000001
    981 #define LA_ALTERNATE                      0x00000002
    982 #define LA_STARTGAP                       0x00000004
    983 #define LA_STYLED                         0x00000008
    984 
    985 /* LINEATTRS.iJoin */
    986 #define JOIN_ROUND                        __MSABI_LONG(0)
    987 #define JOIN_BEVEL                        __MSABI_LONG(1)
    988 #define JOIN_MITER                        __MSABI_LONG(2)
    989 
    990 /* LINEATTRS.iEndCap */
    991 #define ENDCAP_ROUND                      __MSABI_LONG(0)
    992 #define ENDCAP_SQUARE                     __MSABI_LONG(1)
    993 #define ENDCAP_BUTT                       __MSABI_LONG(2)
    994 
    995 typedef struct _LINEATTRS {
    996   FLONG  fl;
    997   ULONG  iJoin;
    998   ULONG  iEndCap;
    999   FLOAT_LONG  elWidth;
   1000   FLOATL  eMiterLimit;
   1001   ULONG  cstyle;
   1002   PFLOAT_LONG  pstyle;
   1003   FLOAT_LONG  elStyleState;
   1004 } LINEATTRS, *PLINEATTRS;
   1005 
   1006 typedef struct _PALOBJ {
   1007   ULONG  ulReserved;
   1008 } PALOBJ;
   1009 
   1010 typedef struct _PERBANDINFO {
   1011   WINBOOL  bRepeatThisBand;
   1012   SIZEL  szlBand;
   1013   ULONG  ulHorzRes;
   1014   ULONG  ulVertRes;
   1015 } PERBANDINFO, *PPERBANDINFO;
   1016 
   1017 /* STROBJ.flAccel constants */
   1018 #define SO_FLAG_DEFAULT_PLACEMENT        0x00000001
   1019 #define SO_HORIZONTAL                    0x00000002
   1020 #define SO_VERTICAL                      0x00000004
   1021 #define SO_REVERSED                      0x00000008
   1022 #define SO_ZERO_BEARINGS                 0x00000010
   1023 #define SO_CHAR_INC_EQUAL_BM_BASE        0x00000020
   1024 #define SO_MAXEXT_EQUAL_BM_SIDE          0x00000040
   1025 #define SO_DO_NOT_SUBSTITUTE_DEVICE_FONT 0x00000080
   1026 #define SO_GLYPHINDEX_TEXTOUT            0x00000100
   1027 #define SO_ESC_NOT_ORIENT                0x00000200
   1028 #define SO_DXDY                          0x00000400
   1029 #define SO_CHARACTER_EXTRA               0x00000800
   1030 #define SO_BREAK_EXTRA                   0x00001000
   1031 
   1032 typedef struct _STROBJ {
   1033   ULONG  cGlyphs;
   1034   FLONG  flAccel;
   1035   ULONG  ulCharInc;
   1036   RECTL  rclBkGround;
   1037   GLYPHPOS  *pgp;
   1038   LPWSTR  pwszOrg;
   1039 } STROBJ;
   1040 
   1041 
   1042 
   1043 /* SURFOBJ.iType constants */
   1044 #define STYPE_BITMAP                      __MSABI_LONG(0)
   1045 #define STYPE_DEVICE                      __MSABI_LONG(1)
   1046 #define STYPE_DEVBITMAP                   __MSABI_LONG(3)
   1047 
   1048 /* SURFOBJ.fjBitmap constants */
   1049 #define BMF_TOPDOWN                       0x0001
   1050 #define BMF_NOZEROINIT                    0x0002
   1051 #define BMF_DONTCACHE                     0x0004
   1052 #define BMF_USERMEM                       0x0008
   1053 #define BMF_KMSECTION                     0x0010
   1054 #define BMF_NOTSYSMEM                     0x0020
   1055 #define BMF_WINDOW_BLT                    0x0040
   1056 #define BMF_UMPDMEM                       0x0080
   1057 #define BMF_RESERVED                      0xFF00
   1058 
   1059 typedef struct _SURFOBJ {
   1060   DHSURF  dhsurf;
   1061   HSURF  hsurf;
   1062   DHPDEV  dhpdev;
   1063   HDEV  hdev;
   1064   SIZEL  sizlBitmap;
   1065   ULONG  cjBits;
   1066   PVOID  pvBits;
   1067   PVOID  pvScan0;
   1068   LONG  lDelta;
   1069   ULONG  iUniq;
   1070   ULONG  iBitmapFormat;
   1071   USHORT  iType;
   1072   USHORT  fjBitmap;
   1073 } SURFOBJ;
   1074 
   1075 typedef struct _TYPE1_FONT {
   1076   HANDLE  hPFM;
   1077   HANDLE  hPFB;
   1078   ULONG  ulIdentifier;
   1079 } TYPE1_FONT;
   1080 
   1081 typedef struct _WNDOBJ {
   1082   CLIPOBJ  coClient;
   1083   PVOID  pvConsumer;
   1084   RECTL  rclClient;
   1085   SURFOBJ  *psoOwner;
   1086 } WNDOBJ, *PWNDOBJ;
   1087 
   1088 typedef struct _XFORML {
   1089   FLOATL  eM11;
   1090   FLOATL  eM12;
   1091   FLOATL  eM21;
   1092   FLOATL  eM22;
   1093   FLOATL  eDx;
   1094   FLOATL  eDy;
   1095 } XFORML, *PXFORML;
   1096 
   1097 typedef struct _XFORMOBJ {
   1098   ULONG  ulReserved;
   1099 } XFORMOBJ;
   1100 
   1101 /* XLATEOBJ.flXlate constants */
   1102 #define XO_TRIVIAL                        0x00000001
   1103 #define XO_TABLE                          0x00000002
   1104 #define XO_TO_MONO                        0x00000004
   1105 #define XO_FROM_CMYK                      0x00000008
   1106 #define XO_DEVICE_ICM                     0x00000010
   1107 #define XO_HOST_ICM                       0x00000020
   1108 
   1109 typedef struct _XLATEOBJ {
   1110   ULONG  iUniq;
   1111   FLONG  flXlate;
   1112   USHORT  iSrcType;
   1113   USHORT  iDstType;
   1114   ULONG  cEntries;
   1115   ULONG  *pulXlate;
   1116 } XLATEOBJ;
   1117 
   1118 /* WNDOBJCHANGEPROC.fl constants */
   1119 #define WOC_RGN_CLIENT_DELTA              0x00000001
   1120 #define WOC_RGN_CLIENT                    0x00000002
   1121 #define WOC_RGN_SURFACE_DELTA             0x00000004
   1122 #define WOC_RGN_SURFACE                   0x00000008
   1123 #define WOC_CHANGED                       0x00000010
   1124 #define WOC_DELETE                        0x00000020
   1125 #define WOC_DRAWN                         0x00000040
   1126 #define WOC_SPRITE_OVERLAP                0x00000080
   1127 #define WOC_SPRITE_NO_OVERLAP             0x00000100
   1128 
   1129 typedef VOID (APIENTRY CALLBACK *WNDOBJCHANGEPROC)(
   1130   WNDOBJ  *pwo,
   1131   FLONG  fl);
   1132 
   1133 
   1134 WIN32KAPI
   1135 HANDLE
   1136 APIENTRY
   1137 BRUSHOBJ_hGetColorTransform(
   1138   BRUSHOBJ  *pbo);
   1139 
   1140 WIN32KAPI
   1141 PVOID
   1142 APIENTRY
   1143 BRUSHOBJ_pvAllocRbrush(
   1144   BRUSHOBJ  *pbo,
   1145   ULONG  cj);
   1146 
   1147 WIN32KAPI
   1148 PVOID
   1149 APIENTRY
   1150 BRUSHOBJ_pvGetRbrush(
   1151   BRUSHOBJ  *pbo);
   1152 
   1153 WIN32KAPI
   1154 ULONG
   1155 APIENTRY
   1156 BRUSHOBJ_ulGetBrushColor(
   1157   BRUSHOBJ  *pbo);
   1158 
   1159 WIN32KAPI
   1160 WINBOOL
   1161 APIENTRY
   1162 CLIPOBJ_bEnum(
   1163   CLIPOBJ  *pco,
   1164   ULONG  cj,
   1165   ULONG  *pv);
   1166 
   1167 /* CLIPOBJ_cEnumStart.iType constants */
   1168 #define CT_RECTANGLES                     __MSABI_LONG(0)
   1169 
   1170 /* CLIPOBJ_cEnumStart.iDirection constants */
   1171 #define CD_RIGHTDOWN                      0x00000000
   1172 #define CD_LEFTDOWN                       0x00000001
   1173 #define CD_LEFTWARDS                      0x00000001
   1174 #define CD_RIGHTUP                        0x00000002
   1175 #define CD_UPWARDS                        0x00000002
   1176 #define CD_LEFTUP                         0x00000003
   1177 #define CD_ANY                            0x00000004
   1178 
   1179 WIN32KAPI
   1180 ULONG
   1181 APIENTRY
   1182 CLIPOBJ_cEnumStart(
   1183   CLIPOBJ  *pco,
   1184   WINBOOL  bAll,
   1185   ULONG  iType,
   1186   ULONG  iDirection,
   1187   ULONG  cLimit);
   1188 
   1189 WIN32KAPI
   1190 PATHOBJ*
   1191 APIENTRY
   1192 CLIPOBJ_ppoGetPath(
   1193   CLIPOBJ  *pco);
   1194 
   1195 WIN32KAPI
   1196 VOID
   1197 APIENTRY
   1198 EngAcquireSemaphore(
   1199   HSEMAPHORE  hsem);
   1200 
   1201 #define FL_ZERO_MEMORY                    0x00000001
   1202 #define FL_NONPAGED_MEMORY                0x00000002
   1203 
   1204 WIN32KAPI
   1205 PVOID
   1206 APIENTRY
   1207 EngAllocMem(
   1208   ULONG  Flags,
   1209   ULONG  MemSize,
   1210   ULONG  Tag);
   1211 
   1212 WIN32KAPI
   1213 PVOID
   1214 APIENTRY
   1215 EngAllocPrivateUserMem(
   1216   PDD_SURFACE_LOCAL  psl,
   1217   SIZE_T  cj,
   1218   ULONG  tag);
   1219 
   1220 WIN32KAPI
   1221 PVOID
   1222 APIENTRY
   1223 EngAllocUserMem(
   1224   SIZE_T  cj,
   1225   ULONG  tag);
   1226 
   1227 WIN32KAPI
   1228 WINBOOL
   1229 APIENTRY
   1230 EngAlphaBlend(
   1231   SURFOBJ  *psoDest,
   1232   SURFOBJ  *psoSrc,
   1233   CLIPOBJ  *pco,
   1234   XLATEOBJ  *pxlo,
   1235   RECTL  *prclDest,
   1236   RECTL  *prclSrc,
   1237   BLENDOBJ  *pBlendObj);
   1238 
   1239 /* EngAssociateSurface.flHooks constants */
   1240 #define HOOK_BITBLT                       0x00000001
   1241 #define HOOK_STRETCHBLT                   0x00000002
   1242 #define HOOK_PLGBLT                       0x00000004
   1243 #define HOOK_TEXTOUT                      0x00000008
   1244 #define HOOK_PAINT                        0x00000010
   1245 #define HOOK_STROKEPATH                   0x00000020
   1246 #define HOOK_FILLPATH                     0x00000040
   1247 #define HOOK_STROKEANDFILLPATH            0x00000080
   1248 #define HOOK_LINETO                       0x00000100
   1249 #define HOOK_COPYBITS                     0x00000400
   1250 #define HOOK_MOVEPANNING                  0x00000800
   1251 #define HOOK_SYNCHRONIZE                  0x00001000
   1252 #define HOOK_STRETCHBLTROP                0x00002000
   1253 #define HOOK_SYNCHRONIZEACCESS            0x00004000
   1254 #define HOOK_TRANSPARENTBLT               0x00008000
   1255 #define HOOK_ALPHABLEND                   0x00010000
   1256 #define HOOK_GRADIENTFILL                 0x00020000
   1257 #define HOOK_FLAGS                        0x0003b5ff
   1258 
   1259 WIN32KAPI
   1260 WINBOOL
   1261 APIENTRY
   1262 EngAssociateSurface(
   1263   HSURF  hsurf,
   1264   HDEV  hdev,
   1265   FLONG  flHooks);
   1266 
   1267 WIN32KAPI
   1268 WINBOOL
   1269 APIENTRY
   1270 EngBitBlt(
   1271   SURFOBJ  *psoTrg,
   1272   SURFOBJ  *psoSrc,
   1273   SURFOBJ  *psoMask,
   1274   CLIPOBJ  *pco,
   1275   XLATEOBJ  *pxlo,
   1276   RECTL  *prclTrg,
   1277   POINTL  *pptlSrc,
   1278   POINTL  *pptlMask,
   1279   BRUSHOBJ  *pbo,
   1280   POINTL  *pptlBrush,
   1281   ROP4  rop4);
   1282 
   1283 WIN32KAPI
   1284 WINBOOL
   1285 APIENTRY
   1286 EngCheckAbort(
   1287   SURFOBJ  *pso);
   1288 
   1289 WIN32KAPI
   1290 VOID
   1291 APIENTRY
   1292 EngClearEvent(
   1293   PEVENT  pEvent);
   1294 
   1295 WIN32KAPI
   1296 FD_GLYPHSET*
   1297 APIENTRY
   1298 EngComputeGlyphSet(
   1299   INT  nCodePage,
   1300   INT  nFirstChar,
   1301   INT  cChars);
   1302 
   1303 /* EngControlSprites.fl constants */
   1304 #define ECS_TEARDOWN                      0x00000001
   1305 #define ECS_REDRAW                        0x00000002
   1306 
   1307 WIN32KAPI
   1308 WINBOOL
   1309 APIENTRY
   1310 EngControlSprites(
   1311   WNDOBJ  *pwo,
   1312   FLONG  fl);
   1313 
   1314 WIN32KAPI
   1315 WINBOOL
   1316 APIENTRY
   1317 EngCopyBits(
   1318   SURFOBJ  *psoDest,
   1319   SURFOBJ  *psoSrc,
   1320   CLIPOBJ  *pco,
   1321   XLATEOBJ  *pxlo,
   1322   RECTL  *prclDest,
   1323   POINTL  *pptlSrc);
   1324 
   1325 WIN32KAPI
   1326 HBITMAP
   1327 APIENTRY
   1328 EngCreateBitmap(
   1329   SIZEL  sizl,
   1330   LONG  lWidth,
   1331   ULONG  iFormat,
   1332   FLONG  fl,
   1333   PVOID  pvBits);
   1334 
   1335 WIN32KAPI
   1336 CLIPOBJ*
   1337 APIENTRY
   1338 EngCreateClip(
   1339   VOID);
   1340 
   1341 WIN32KAPI
   1342 HBITMAP
   1343 APIENTRY
   1344 EngCreateDeviceBitmap(
   1345   DHSURF  dhsurf,
   1346   SIZEL  sizl,
   1347   ULONG  iFormatCompat);
   1348 
   1349 WIN32KAPI
   1350 HSURF
   1351 APIENTRY
   1352 EngCreateDeviceSurface(
   1353   DHSURF  dhsurf,
   1354   SIZEL  sizl,
   1355   ULONG  iFormatCompat);
   1356 
   1357 #if 0
   1358 WIN32KAPI
   1359 HDRVOBJ
   1360 APIENTRY
   1361 EngCreateDriverObj(
   1362   PVOID  pvObj,
   1363   FREEOBJPROC  pFreeObjProc,
   1364   HDEV  hdev);
   1365 #endif
   1366 
   1367 WIN32KAPI
   1368 WINBOOL
   1369 APIENTRY
   1370 EngCreateEvent(
   1371   PEVENT  *ppEvent);
   1372 
   1373 /* EngCreatePalette.iMode constants */
   1374 #define PAL_INDEXED                       0x00000001
   1375 #define PAL_BITFIELDS                     0x00000002
   1376 #define PAL_RGB                           0x00000004
   1377 #define PAL_BGR                           0x00000008
   1378 #define PAL_CMYK                          0x00000010
   1379 
   1380 WIN32KAPI
   1381 HPALETTE
   1382 APIENTRY
   1383 EngCreatePalette(
   1384   ULONG  iMode,
   1385   ULONG  cColors,
   1386   ULONG  *pulColors,
   1387   FLONG  flRed,
   1388   FLONG  flGreen,
   1389   FLONG  flBlue);
   1390 
   1391 WIN32KAPI
   1392 PATHOBJ*
   1393 APIENTRY
   1394 EngCreatePath(
   1395   VOID);
   1396 
   1397 WIN32KAPI
   1398 HSEMAPHORE
   1399 APIENTRY
   1400 EngCreateSemaphore(
   1401   VOID);
   1402 
   1403 /* EngCreateWnd.fl constants */
   1404 #define WO_RGN_CLIENT_DELTA               0x00000001
   1405 #define WO_RGN_CLIENT                     0x00000002
   1406 #define WO_RGN_SURFACE_DELTA              0x00000004
   1407 #define WO_RGN_SURFACE                    0x00000008
   1408 #define WO_RGN_UPDATE_ALL                 0x00000010
   1409 #define WO_RGN_WINDOW                     0x00000020
   1410 #define WO_DRAW_NOTIFY                    0x00000040
   1411 #define WO_SPRITE_NOTIFY                  0x00000080
   1412 #define WO_RGN_DESKTOP_COORD              0x00000100
   1413 
   1414 WIN32KAPI
   1415 WNDOBJ*
   1416 APIENTRY
   1417 EngCreateWnd(
   1418   SURFOBJ  *pso,
   1419   HWND  hwnd,
   1420   WNDOBJCHANGEPROC  pfn,
   1421   FLONG  fl,
   1422   int  iPixelFormat);
   1423 
   1424 WIN32KAPI
   1425 VOID
   1426 APIENTRY
   1427 EngDebugBreak(
   1428   VOID);
   1429 
   1430 WIN32KAPI
   1431 VOID
   1432 APIENTRY
   1433 EngDebugPrint(
   1434   PCHAR StandardPrefix,
   1435   PCHAR DebugMessage,
   1436   va_list ap);
   1437 
   1438 WIN32KAPI
   1439 VOID
   1440 APIENTRY
   1441 EngDeleteClip(
   1442   CLIPOBJ  *pco);
   1443 
   1444 WIN32KAPI
   1445 WINBOOL
   1446 APIENTRY
   1447 EngDeleteDriverObj(
   1448   HDRVOBJ  hdo,
   1449   WINBOOL  bCallBack,
   1450   WINBOOL  bLocked);
   1451 
   1452 WIN32KAPI
   1453 WINBOOL
   1454 APIENTRY
   1455 EngDeleteEvent(
   1456   PEVENT  pEvent);
   1457 
   1458 WIN32KAPI
   1459 WINBOOL
   1460 APIENTRY
   1461 EngDeleteFile(
   1462   LPWSTR  pwszFileName);
   1463 
   1464 WIN32KAPI
   1465 WINBOOL
   1466 APIENTRY
   1467 EngDeletePalette(
   1468   HPALETTE  hpal);
   1469 
   1470 WIN32KAPI
   1471 VOID
   1472 APIENTRY
   1473 EngDeletePath(
   1474   PATHOBJ  *ppo);
   1475 
   1476 WIN32KAPI
   1477 VOID
   1478 APIENTRY
   1479 EngDeleteSafeSemaphore(
   1480   ENGSAFESEMAPHORE  *pssem);
   1481 
   1482 WIN32KAPI
   1483 VOID
   1484 APIENTRY
   1485 EngDeleteSemaphore(
   1486   HSEMAPHORE  hsem);
   1487 
   1488 WIN32KAPI
   1489 WINBOOL
   1490 APIENTRY
   1491 EngDeleteSurface(
   1492   HSURF  hsurf);
   1493 
   1494 WIN32KAPI
   1495 VOID
   1496 APIENTRY
   1497 EngDeleteWnd(
   1498   WNDOBJ  *pwo);
   1499 
   1500 WIN32KAPI
   1501 DWORD
   1502 APIENTRY
   1503 EngDeviceIoControl(
   1504   HANDLE  hDevice,
   1505   DWORD  dwIoControlCode,
   1506   LPVOID  lpInBuffer,
   1507   DWORD  nInBufferSize,
   1508   LPVOID  lpOutBuffer,
   1509   DWORD  nOutBufferSize,
   1510   LPDWORD  lpBytesReturned);
   1511 
   1512 WIN32KAPI
   1513 ULONG
   1514 APIENTRY
   1515 EngDitherColor(
   1516   HDEV  hdev,
   1517   ULONG  iMode,
   1518   ULONG  rgb,
   1519   ULONG  *pul);
   1520 
   1521 WIN32KAPI
   1522 WINBOOL
   1523 APIENTRY
   1524 EngEnumForms(
   1525   HANDLE  hPrinter,
   1526   DWORD  Level,
   1527   LPBYTE  pForm,
   1528   DWORD  cbBuf,
   1529   LPDWORD  pcbNeeded,
   1530   LPDWORD  pcReturned);
   1531 
   1532 WIN32KAPI
   1533 WINBOOL
   1534 APIENTRY
   1535 EngEraseSurface(
   1536   SURFOBJ  *pso,
   1537   RECTL  *prcl,
   1538   ULONG  iColor);
   1539 
   1540 WIN32KAPI
   1541 WINBOOL
   1542 APIENTRY
   1543 EngFillPath(
   1544   SURFOBJ  *pso,
   1545   PATHOBJ  *ppo,
   1546   CLIPOBJ  *pco,
   1547   BRUSHOBJ  *pbo,
   1548   POINTL  *pptlBrushOrg,
   1549   MIX  mix,
   1550   FLONG  flOptions);
   1551 
   1552 WIN32KAPI
   1553 PVOID
   1554 APIENTRY
   1555 EngFindImageProcAddress(
   1556   HANDLE  hModule,
   1557   LPSTR  lpProcName);
   1558 
   1559 WIN32KAPI
   1560 PVOID
   1561 APIENTRY
   1562 EngFindResource(
   1563   HANDLE  h,
   1564   int  iName,
   1565   int  iType,
   1566   PULONG  pulSize);
   1567 
   1568 WIN32KAPI
   1569 PVOID
   1570 APIENTRY
   1571 EngFntCacheAlloc(
   1572   ULONG  FastCheckSum,
   1573   ULONG  ulSize);
   1574 
   1575 /* EngFntCacheFault.iFaultMode constants */
   1576 #define ENG_FNT_CACHE_READ_FAULT          0x00000001
   1577 #define ENG_FNT_CACHE_WRITE_FAULT         0x00000002
   1578 
   1579 WIN32KAPI
   1580 VOID
   1581 APIENTRY
   1582 EngFntCacheFault(
   1583   ULONG  ulFastCheckSum,
   1584   ULONG  iFaultMode);
   1585 
   1586 WIN32KAPI
   1587 PVOID
   1588 APIENTRY
   1589 EngFntCacheLookUp(
   1590   ULONG  FastCheckSum,
   1591   ULONG  *pulSize);
   1592 
   1593 WIN32KAPI
   1594 VOID
   1595 APIENTRY
   1596 EngFreeMem(
   1597   PVOID  Mem);
   1598 
   1599 WIN32KAPI
   1600 VOID
   1601 APIENTRY
   1602 EngFreeModule(
   1603   HANDLE  h);
   1604 
   1605 WIN32KAPI
   1606 VOID
   1607 APIENTRY
   1608 EngFreePrivateUserMem(
   1609   PDD_SURFACE_LOCAL  psl,
   1610   PVOID  pv);
   1611 
   1612 WIN32KAPI
   1613 VOID
   1614 APIENTRY
   1615 EngFreeUserMem(
   1616   PVOID  pv);
   1617 
   1618 WIN32KAPI
   1619 VOID
   1620 APIENTRY
   1621 EngGetCurrentCodePage(
   1622   PUSHORT  OemCodePage,
   1623   PUSHORT  AnsiCodePage);
   1624 
   1625 WIN32KAPI
   1626 HANDLE
   1627 APIENTRY
   1628 EngGetCurrentProcessId(
   1629   VOID);
   1630 
   1631 WIN32KAPI
   1632 HANDLE
   1633 APIENTRY
   1634 EngGetCurrentThreadId(
   1635   VOID);
   1636 
   1637 WIN32KAPI
   1638 LPWSTR
   1639 APIENTRY
   1640 EngGetDriverName(
   1641   HDEV  hdev);
   1642 
   1643 WIN32KAPI
   1644 WINBOOL
   1645 APIENTRY
   1646 EngGetFileChangeTime(
   1647   HANDLE  h,
   1648   LARGE_INTEGER  *pChangeTime);
   1649 
   1650 WIN32KAPI
   1651 WINBOOL
   1652 APIENTRY
   1653 EngGetFilePath(
   1654   HANDLE  h,
   1655   WCHAR  (*pDest)[MAX_PATH+1]);
   1656 
   1657 WIN32KAPI
   1658 WINBOOL
   1659 APIENTRY
   1660 EngGetForm(
   1661   HANDLE  hPrinter,
   1662   LPWSTR  pFormName,
   1663   DWORD  Level,
   1664   LPBYTE  pForm,
   1665   DWORD  cbBuf,
   1666   LPDWORD  pcbNeeded);
   1667 
   1668 WIN32KAPI
   1669 ULONG
   1670 APIENTRY
   1671 EngGetLastError(
   1672   VOID);
   1673 
   1674 WIN32KAPI
   1675 WINBOOL
   1676 APIENTRY
   1677 EngGetPrinter(
   1678   HANDLE  hPrinter,
   1679   DWORD  dwLevel,
   1680   LPBYTE  pPrinter,
   1681   DWORD  cbBuf,
   1682   LPDWORD  pcbNeeded);
   1683 
   1684 WIN32KAPI
   1685 DWORD
   1686 APIENTRY
   1687 EngGetPrinterData(
   1688   HANDLE  hPrinter,
   1689   LPWSTR  pValueName,
   1690   LPDWORD  pType,
   1691   LPBYTE  pData,
   1692   DWORD  nSize,
   1693   LPDWORD  pcbNeeded);
   1694 
   1695 WIN32KAPI
   1696 LPWSTR
   1697 APIENTRY
   1698 EngGetPrinterDataFileName(
   1699   HDEV  hdev);
   1700 
   1701 WIN32KAPI
   1702 WINBOOL
   1703 APIENTRY
   1704 EngGetPrinterDriver(
   1705   HANDLE  hPrinter,
   1706   LPWSTR  pEnvironment,
   1707   DWORD  dwLevel,
   1708   BYTE  *lpbDrvInfo,
   1709   DWORD  cbBuf,
   1710   DWORD  *pcbNeeded);
   1711 
   1712 WIN32KAPI
   1713 HANDLE
   1714 APIENTRY
   1715 EngGetProcessHandle(
   1716   VOID);
   1717 
   1718 WIN32KAPI
   1719 WINBOOL
   1720 APIENTRY
   1721 EngGetType1FontList(
   1722   HDEV  hdev,
   1723   TYPE1_FONT  *pType1Buffer,
   1724   ULONG  cjType1Buffer,
   1725   PULONG  pulLocalFonts,
   1726   PULONG  pulRemoteFonts,
   1727   LARGE_INTEGER  *pLastModified);
   1728 
   1729 WIN32KAPI
   1730 WINBOOL
   1731 APIENTRY
   1732 EngGradientFill(
   1733   SURFOBJ  *psoDest,
   1734   CLIPOBJ  *pco,
   1735   XLATEOBJ  *pxlo,
   1736   TRIVERTEX  *pVertex,
   1737   ULONG  nVertex,
   1738   PVOID  pMesh,
   1739   ULONG  nMesh,
   1740   RECTL  *prclExtents,
   1741   POINTL  *pptlDitherOrg,
   1742   ULONG  ulMode);
   1743 
   1744 /* EngHangNotification return values */
   1745 #define EHN_RESTORED                      0x00000000
   1746 #define EHN_ERROR                         0x00000001
   1747 
   1748 WIN32KAPI
   1749 ULONG
   1750 APIENTRY
   1751 EngHangNotification(
   1752   HDEV  hDev,
   1753   PVOID  Reserved);
   1754 
   1755 WIN32KAPI
   1756 WINBOOL
   1757 APIENTRY
   1758 EngInitializeSafeSemaphore(
   1759   ENGSAFESEMAPHORE  *pssem);
   1760 
   1761 WIN32KAPI
   1762 WINBOOL
   1763 APIENTRY
   1764 EngIsSemaphoreOwned(
   1765   HSEMAPHORE  hsem);
   1766 
   1767 WIN32KAPI
   1768 WINBOOL
   1769 APIENTRY
   1770 EngIsSemaphoreOwnedByCurrentThread(
   1771   HSEMAPHORE  hsem);
   1772 
   1773 WIN32KAPI
   1774 WINBOOL
   1775 APIENTRY
   1776 EngLineTo(
   1777   SURFOBJ  *pso,
   1778   CLIPOBJ  *pco,
   1779   BRUSHOBJ  *pbo,
   1780   LONG  x1,
   1781   LONG  y1,
   1782   LONG  x2,
   1783   LONG  y2,
   1784   RECTL  *prclBounds,
   1785   MIX  mix);
   1786 
   1787 WIN32KAPI
   1788 HANDLE
   1789 APIENTRY
   1790 EngLoadImage(
   1791   LPWSTR  pwszDriver);
   1792 
   1793 WIN32KAPI
   1794 HANDLE
   1795 APIENTRY
   1796 EngLoadModule(
   1797   LPWSTR  pwsz);
   1798 
   1799 WIN32KAPI
   1800 HANDLE
   1801 APIENTRY
   1802 EngLoadModuleForWrite(
   1803   LPWSTR  pwsz,
   1804   ULONG  cjSizeOfModule);
   1805 
   1806 WIN32KAPI
   1807 PDD_SURFACE_LOCAL
   1808 APIENTRY
   1809 EngLockDirectDrawSurface(
   1810   HANDLE  hSurface);
   1811 
   1812 WIN32KAPI
   1813 DRIVEROBJ*
   1814 APIENTRY
   1815 EngLockDriverObj(
   1816   HDRVOBJ  hdo);
   1817 
   1818 WIN32KAPI
   1819 SURFOBJ*
   1820 APIENTRY
   1821 EngLockSurface(
   1822   HSURF  hsurf);
   1823 
   1824 WIN32KAPI
   1825 WINBOOL
   1826 APIENTRY
   1827 EngLpkInstalled(
   1828   VOID);
   1829 
   1830 WIN32KAPI
   1831 PEVENT
   1832 APIENTRY
   1833 EngMapEvent(
   1834   HDEV  hDev,
   1835   HANDLE  hUserObject,
   1836   PVOID  Reserved1,
   1837   PVOID  Reserved2,
   1838   PVOID  Reserved3);
   1839 
   1840 WIN32KAPI
   1841 PVOID
   1842 APIENTRY
   1843 EngMapFile(
   1844   LPWSTR  pwsz,
   1845   ULONG  cjSize,
   1846   ULONG_PTR  *piFile);
   1847 
   1848 WIN32KAPI
   1849 WINBOOL
   1850 APIENTRY
   1851 EngMapFontFile(
   1852   ULONG_PTR  iFile,
   1853   PULONG  *ppjBuf,
   1854   ULONG  *pcjBuf);
   1855 
   1856 WIN32KAPI
   1857 WINBOOL
   1858 APIENTRY
   1859 EngMapFontFileFD(
   1860   ULONG_PTR  iFile,
   1861   PULONG  *ppjBuf,
   1862   ULONG  *pcjBuf);
   1863 
   1864 WIN32KAPI
   1865 PVOID
   1866 APIENTRY
   1867 EngMapModule(
   1868   HANDLE  h,
   1869   PULONG  pSize);
   1870 
   1871 WIN32KAPI
   1872 WINBOOL
   1873 APIENTRY
   1874 EngMarkBandingSurface(
   1875   HSURF  hsurf);
   1876 
   1877 /* EngModifySurface.flSurface constants */
   1878 #define MS_NOTSYSTEMMEMORY                0x00000001
   1879 #define MS_SHAREDACCESS                   0x00000002
   1880 
   1881 WIN32KAPI
   1882 WINBOOL
   1883 APIENTRY
   1884 EngModifySurface(
   1885   HSURF  hsurf,
   1886   HDEV  hdev,
   1887   FLONG  flHooks,
   1888   FLONG  flSurface,
   1889   DHSURF  dhsurf,
   1890   VOID  *pvScan0,
   1891   LONG  lDelta,
   1892   VOID  *pvReserved);
   1893 
   1894 WIN32KAPI
   1895 VOID
   1896 APIENTRY
   1897 EngMovePointer(
   1898   SURFOBJ  *pso,
   1899   LONG  x,
   1900   LONG  y,
   1901   RECTL  *prcl);
   1902 
   1903 WIN32KAPI
   1904 int
   1905 APIENTRY
   1906 EngMulDiv(
   1907   int  a,
   1908   int  b,
   1909   int  c);
   1910 
   1911 WIN32KAPI
   1912 VOID
   1913 APIENTRY
   1914 EngMultiByteToUnicodeN(
   1915   LPWSTR  UnicodeString,
   1916   ULONG  MaxBytesInUnicodeString,
   1917   PULONG  BytesInUnicodeString,
   1918   PCHAR  MultiByteString,
   1919   ULONG  BytesInMultiByteString);
   1920 
   1921 WIN32KAPI
   1922 INT
   1923 APIENTRY
   1924 EngMultiByteToWideChar(
   1925   UINT  CodePage,
   1926   LPWSTR  WideCharString,
   1927   INT  BytesInWideCharString,
   1928   LPSTR  MultiByteString,
   1929   INT  BytesInMultiByteString);
   1930 
   1931 WIN32KAPI
   1932 WINBOOL
   1933 APIENTRY
   1934 EngPaint(
   1935   SURFOBJ  *pso,
   1936   CLIPOBJ  *pco,
   1937   BRUSHOBJ  *pbo,
   1938   POINTL  *pptlBrushOrg,
   1939   MIX  mix);
   1940 
   1941 WIN32KAPI
   1942 WINBOOL
   1943 APIENTRY
   1944 EngPlgBlt(
   1945   SURFOBJ  *psoTrg,
   1946   SURFOBJ  *psoSrc,
   1947   SURFOBJ  *psoMsk,
   1948   CLIPOBJ  *pco,
   1949   XLATEOBJ  *pxlo,
   1950   COLORADJUSTMENT  *pca,
   1951   POINTL  *pptlBrushOrg,
   1952   POINTFIX  *pptfx,
   1953   RECTL  *prcl,
   1954   POINTL  *pptl,
   1955   ULONG  iMode);
   1956 
   1957 WIN32KAPI
   1958 VOID
   1959 APIENTRY
   1960 EngProbeForRead(
   1961   PVOID  Address,
   1962   ULONG  Length,
   1963   ULONG  Alignment);
   1964 
   1965 WIN32KAPI
   1966 VOID
   1967 APIENTRY
   1968 EngProbeForReadAndWrite(
   1969   PVOID  Address,
   1970   ULONG  Length,
   1971   ULONG  Alignment);
   1972 
   1973 typedef enum _ENG_DEVICE_ATTRIBUTE {
   1974   QDA_RESERVED = 0,
   1975   QDA_ACCELERATION_LEVEL
   1976 } ENG_DEVICE_ATTRIBUTE;
   1977 
   1978 WIN32KAPI
   1979 WINBOOL
   1980 APIENTRY
   1981 EngQueryDeviceAttribute(
   1982   HDEV  hdev,
   1983   ENG_DEVICE_ATTRIBUTE  devAttr,
   1984   VOID  *pvIn,
   1985   ULONG  ulInSize,
   1986   VOID  *pvOut,
   1987   ULONG  ulOutSize);
   1988 
   1989 WIN32KAPI
   1990 LARGE_INTEGER
   1991 APIENTRY
   1992 EngQueryFileTimeStamp(
   1993   LPWSTR  pwsz);
   1994 
   1995 WIN32KAPI
   1996 VOID
   1997 APIENTRY
   1998 EngQueryLocalTime(
   1999   PENG_TIME_FIELDS  ptf);
   2000 
   2001 WIN32KAPI
   2002 ULONG
   2003 APIENTRY
   2004 EngQueryPalette(
   2005   HPALETTE  hPal,
   2006   ULONG  *piMode,
   2007   ULONG  cColors,
   2008   ULONG  *pulColors);
   2009 
   2010 WIN32KAPI
   2011 VOID
   2012 APIENTRY
   2013 EngQueryPerformanceCounter(
   2014   LONGLONG  *pPerformanceCount);
   2015 
   2016 WIN32KAPI
   2017 VOID
   2018 APIENTRY
   2019 EngQueryPerformanceFrequency(
   2020   LONGLONG  *pFrequency);
   2021 
   2022 typedef enum _ENG_SYSTEM_ATTRIBUTE {
   2023   EngProcessorFeature = 1,
   2024   EngNumberOfProcessors,
   2025   EngOptimumAvailableUserMemory,
   2026   EngOptimumAvailableSystemMemory,
   2027 } ENG_SYSTEM_ATTRIBUTE;
   2028 
   2029 #define QSA_MMX                           0x00000100
   2030 #define QSA_SSE                           0x00002000
   2031 #define QSA_3DNOW                         0x00004000
   2032 
   2033 WIN32KAPI
   2034 WINBOOL
   2035 APIENTRY
   2036 EngQuerySystemAttribute(
   2037   ENG_SYSTEM_ATTRIBUTE  CapNum,
   2038   PDWORD  pCapability);
   2039 
   2040 WIN32KAPI
   2041 LONG
   2042 APIENTRY
   2043 EngReadStateEvent(
   2044   PEVENT  pEvent);
   2045 
   2046 WIN32KAPI
   2047 VOID
   2048 APIENTRY
   2049 EngReleaseSemaphore(
   2050   HSEMAPHORE  hsem);
   2051 
   2052 WIN32KAPI
   2053 WINBOOL
   2054 APIENTRY
   2055 EngRestoreFloatingPointState(
   2056   VOID  *pBuffer);
   2057 
   2058 WIN32KAPI
   2059 ULONG
   2060 APIENTRY
   2061 EngSaveFloatingPointState(
   2062   VOID  *pBuffer,
   2063   ULONG  cjBufferSize);
   2064 
   2065 WIN32KAPI
   2066 HANDLE
   2067 APIENTRY
   2068 EngSecureMem(
   2069   PVOID  Address,
   2070   ULONG  Length);
   2071 
   2072 WIN32KAPI
   2073 LONG
   2074 APIENTRY
   2075 EngSetEvent(
   2076   PEVENT  pEvent);
   2077 
   2078 WIN32KAPI
   2079 VOID
   2080 APIENTRY
   2081 EngSetLastError(
   2082   ULONG  iError);
   2083 
   2084 WIN32KAPI
   2085 ULONG
   2086 APIENTRY
   2087 EngSetPointerShape(
   2088   SURFOBJ  *pso,
   2089   SURFOBJ  *psoMask,
   2090   SURFOBJ  *psoColor,
   2091   XLATEOBJ  *pxlo,
   2092   LONG  xHot,
   2093   LONG  yHot,
   2094   LONG  x,
   2095   LONG  y,
   2096   RECTL  *prcl,
   2097   FLONG  fl);
   2098 
   2099 WIN32KAPI
   2100 WINBOOL
   2101 APIENTRY
   2102 EngSetPointerTag(
   2103   HDEV  hdev,
   2104   SURFOBJ  *psoMask,
   2105   SURFOBJ  *psoColor,
   2106   XLATEOBJ  *pxlo,
   2107   FLONG  fl);
   2108 
   2109 WIN32KAPI
   2110 DWORD
   2111 APIENTRY
   2112 EngSetPrinterData(
   2113   HANDLE  hPrinter,
   2114   LPWSTR  pType,
   2115   DWORD  dwType,
   2116   LPBYTE  lpbPrinterData,
   2117   DWORD  cjPrinterData);
   2118 
   2119 typedef int (CDECL *SORTCOMP)(const void *pv1, const void *pv2);
   2120 
   2121 WIN32KAPI
   2122 VOID
   2123 APIENTRY
   2124 EngSort(
   2125   PBYTE  pjBuf,
   2126   ULONG  c,
   2127   ULONG  cjElem,
   2128   SORTCOMP  pfnComp);
   2129 
   2130 WIN32KAPI
   2131 WINBOOL
   2132 APIENTRY
   2133 EngStretchBlt(
   2134   SURFOBJ  *psoDest,
   2135   SURFOBJ  *psoSrc,
   2136   SURFOBJ  *psoMask,
   2137   CLIPOBJ  *pco,
   2138   XLATEOBJ  *pxlo,
   2139   COLORADJUSTMENT  *pca,
   2140   POINTL  *pptlHTOrg,
   2141   RECTL  *prclDest,
   2142   RECTL  *prclSrc,
   2143   POINTL  *pptlMask,
   2144   ULONG  iMode);
   2145 
   2146 WIN32KAPI
   2147 WINBOOL
   2148 APIENTRY
   2149 EngStretchBltROP(
   2150   SURFOBJ  *psoDest,
   2151   SURFOBJ  *psoSrc,
   2152   SURFOBJ  *psoMask,
   2153   CLIPOBJ  *pco,
   2154   XLATEOBJ  *pxlo,
   2155   COLORADJUSTMENT  *pca,
   2156   POINTL  *pptlHTOrg,
   2157   RECTL  *prclDest,
   2158   RECTL  *prclSrc,
   2159   POINTL  *pptlMask,
   2160   ULONG  iMode,
   2161   BRUSHOBJ  *pbo,
   2162   DWORD  rop4);
   2163 
   2164 WIN32KAPI
   2165 WINBOOL
   2166 APIENTRY
   2167 EngStrokeAndFillPath(
   2168   SURFOBJ  *pso,
   2169   PATHOBJ  *ppo,
   2170   CLIPOBJ  *pco,
   2171   XFORMOBJ  *pxo,
   2172   BRUSHOBJ  *pboStroke,
   2173   LINEATTRS  *plineattrs,
   2174   BRUSHOBJ  *pboFill,
   2175   POINTL  *pptlBrushOrg,
   2176   MIX  mixFill,
   2177   FLONG  flOptions);
   2178 
   2179 WIN32KAPI
   2180 WINBOOL
   2181 APIENTRY
   2182 EngStrokePath(
   2183   SURFOBJ  *pso,
   2184   PATHOBJ  *ppo,
   2185   CLIPOBJ  *pco,
   2186   XFORMOBJ  *pxo,
   2187   BRUSHOBJ  *pbo,
   2188   POINTL  *pptlBrushOrg,
   2189   LINEATTRS  *plineattrs,
   2190   MIX  mix);
   2191 
   2192 WIN32KAPI
   2193 WINBOOL
   2194 APIENTRY
   2195 EngTextOut(
   2196   SURFOBJ  *pso,
   2197   STROBJ  *pstro,
   2198   FONTOBJ  *pfo,
   2199   CLIPOBJ  *pco,
   2200   RECTL  *prclExtra,
   2201   RECTL  *prclOpaque,
   2202   BRUSHOBJ  *pboFore,
   2203   BRUSHOBJ  *pboOpaque,
   2204   POINTL  *pptlOrg,
   2205   MIX  mix);
   2206 
   2207 WIN32KAPI
   2208 WINBOOL
   2209 APIENTRY
   2210 EngTransparentBlt(
   2211   SURFOBJ  *psoDst,
   2212   SURFOBJ  *psoSrc,
   2213   CLIPOBJ  *pco,
   2214   XLATEOBJ  *pxlo,
   2215   RECTL  *prclDst,
   2216   RECTL  *prclSrc,
   2217   ULONG  iTransColor,
   2218   ULONG  ulReserved);
   2219 
   2220 WIN32KAPI
   2221 VOID
   2222 APIENTRY
   2223 EngUnicodeToMultiByteN(
   2224   PCHAR  MultiByteString,
   2225   ULONG  MaxBytesInMultiByteString,
   2226   PULONG  BytesInMultiByteString,
   2227   PWSTR  UnicodeString,
   2228   ULONG  BytesInUnicodeString);
   2229 
   2230 WIN32KAPI
   2231 VOID
   2232 APIENTRY
   2233 EngUnloadImage(
   2234   HANDLE  hModule);
   2235 
   2236 WIN32KAPI
   2237 WINBOOL
   2238 APIENTRY
   2239 EngUnlockDirectDrawSurface(
   2240   PDD_SURFACE_LOCAL  pSurface);
   2241 
   2242 WIN32KAPI
   2243 WINBOOL
   2244 APIENTRY
   2245 EngUnlockDriverObj(
   2246   HDRVOBJ  hdo);
   2247 
   2248 WIN32KAPI
   2249 VOID
   2250 APIENTRY
   2251 EngUnlockSurface(
   2252   SURFOBJ  *pso);
   2253 
   2254 WIN32KAPI
   2255 WINBOOL
   2256 APIENTRY
   2257 EngUnmapEvent(
   2258   PEVENT  pEvent);
   2259 
   2260 WIN32KAPI
   2261 WINBOOL
   2262 APIENTRY
   2263 EngUnmapFile(
   2264   ULONG_PTR  iFile);
   2265 
   2266 WIN32KAPI
   2267 VOID
   2268 APIENTRY
   2269 EngUnmapFontFile(
   2270   ULONG_PTR  iFile);
   2271 
   2272 WIN32KAPI
   2273 VOID
   2274 APIENTRY
   2275 EngUnmapFontFileFD(
   2276   ULONG_PTR  iFile);
   2277 
   2278 WIN32KAPI
   2279 VOID
   2280 APIENTRY
   2281 EngUnsecureMem(
   2282   HANDLE  hSecure);
   2283 
   2284 WIN32KAPI
   2285 WINBOOL
   2286 APIENTRY
   2287 EngWaitForSingleObject(
   2288   PEVENT  pEvent,
   2289   PLARGE_INTEGER  pTimeOut);
   2290 
   2291 WIN32KAPI
   2292 INT
   2293 APIENTRY
   2294 EngWideCharToMultiByte(
   2295   UINT  CodePage,
   2296   LPWSTR  WideCharString,
   2297   INT  BytesInWideCharString,
   2298   LPSTR  MultiByteString,
   2299   INT  BytesInMultiByteString);
   2300 
   2301 WIN32KAPI
   2302 WINBOOL
   2303 APIENTRY
   2304 EngWritePrinter(
   2305   HANDLE  hPrinter,
   2306   LPVOID  pBuf,
   2307   DWORD  cbBuf,
   2308   LPDWORD  pcWritten);
   2309 
   2310 #if defined(_X86_) && !defined(USERMODE_DRIVER)
   2311 WIN32KAPI
   2312 VOID
   2313 APIENTRY
   2314 FLOATOBJ_Add(
   2315   PFLOATOBJ  pf,
   2316   PFLOATOBJ  pf1);
   2317 
   2318 WIN32KAPI
   2319 VOID
   2320 APIENTRY
   2321 FLOATOBJ_AddFloat(
   2322   PFLOATOBJ  pf,
   2323   FLOATL  f);
   2324 
   2325 WIN32KAPI
   2326 VOID
   2327 APIENTRY
   2328 FLOATOBJ_AddLong(
   2329   PFLOATOBJ  pf,
   2330   LONG  l);
   2331 
   2332 WIN32KAPI
   2333 VOID
   2334 APIENTRY
   2335 FLOATOBJ_Div(
   2336   PFLOATOBJ  pf,
   2337   PFLOATOBJ  pf1);
   2338 
   2339 WIN32KAPI
   2340 VOID
   2341 APIENTRY
   2342 FLOATOBJ_DivFloat(
   2343   PFLOATOBJ  pf,
   2344   FLOATL  f);
   2345 
   2346 WIN32KAPI
   2347 VOID
   2348 APIENTRY
   2349 FLOATOBJ_DivLong(
   2350   PFLOATOBJ  pf,
   2351   LONG  l);
   2352 
   2353 WIN32KAPI
   2354 WINBOOL
   2355 APIENTRY
   2356 FLOATOBJ_Equal(
   2357   PFLOATOBJ  pf,
   2358   PFLOATOBJ  pf1);
   2359 
   2360 WIN32KAPI
   2361 WINBOOL
   2362 APIENTRY
   2363 FLOATOBJ_EqualLong(
   2364   PFLOATOBJ  pf,
   2365   LONG  l);
   2366 
   2367 WIN32KAPI
   2368 LONG
   2369 APIENTRY
   2370 FLOATOBJ_GetFloat(
   2371   PFLOATOBJ  pf);
   2372 
   2373 WIN32KAPI
   2374 LONG
   2375 APIENTRY
   2376 FLOATOBJ_GetLong(
   2377   PFLOATOBJ  pf);
   2378 
   2379 WIN32KAPI
   2380 WINBOOL
   2381 APIENTRY
   2382 FLOATOBJ_GreaterThan(
   2383   PFLOATOBJ  pf,
   2384   PFLOATOBJ  pf1);
   2385 
   2386 WIN32KAPI
   2387 WINBOOL
   2388 APIENTRY
   2389 FLOATOBJ_GreaterThanLong(
   2390   PFLOATOBJ  pf,
   2391   LONG  l);
   2392 
   2393 WIN32KAPI
   2394 WINBOOL
   2395 APIENTRY
   2396 FLOATOBJ_LessThan(
   2397   PFLOATOBJ  pf,
   2398   PFLOATOBJ  pf1);
   2399 
   2400 WIN32KAPI
   2401 WINBOOL
   2402 APIENTRY
   2403 FLOATOBJ_LessThanLong(
   2404   PFLOATOBJ  pf,
   2405   LONG  l);
   2406 
   2407 WIN32KAPI
   2408 VOID
   2409 APIENTRY
   2410 FLOATOBJ_Mul(
   2411   PFLOATOBJ  pf,
   2412   PFLOATOBJ  pf1);
   2413 
   2414 WIN32KAPI
   2415 VOID
   2416 APIENTRY
   2417 FLOATOBJ_MulFloat(
   2418   PFLOATOBJ  pf,
   2419   FLOATL  f);
   2420 
   2421 WIN32KAPI
   2422 VOID
   2423 APIENTRY
   2424 FLOATOBJ_MulLong(
   2425   PFLOATOBJ  pf,
   2426   LONG  l);
   2427 
   2428 WIN32KAPI
   2429 VOID
   2430 APIENTRY
   2431 FLOATOBJ_Neg(
   2432   PFLOATOBJ  pf);
   2433 
   2434 WIN32KAPI
   2435 VOID
   2436 APIENTRY
   2437 FLOATOBJ_SetFloat(
   2438   PFLOATOBJ  pf,
   2439   FLOATL  f);
   2440 
   2441 WIN32KAPI
   2442 VOID
   2443 APIENTRY
   2444 FLOATOBJ_SetLong(
   2445   PFLOATOBJ  pf,
   2446   LONG  l);
   2447 
   2448 WIN32KAPI
   2449 VOID
   2450 APIENTRY
   2451 FLOATOBJ_Sub(
   2452   PFLOATOBJ  pf,
   2453   PFLOATOBJ  pf1);
   2454 
   2455 WIN32KAPI
   2456 VOID
   2457 APIENTRY
   2458 FLOATOBJ_SubFloat(
   2459   PFLOATOBJ  pf,
   2460   FLOATL  f);
   2461 
   2462 WIN32KAPI
   2463 VOID
   2464 APIENTRY
   2465 FLOATOBJ_SubLong(
   2466   PFLOATOBJ  pf,
   2467   LONG  l);
   2468 
   2469 #else
   2470 
   2471 #define FLOATOBJ_SetFloat(pf, f)        {*(pf) = (f);}
   2472 #define FLOATOBJ_SetLong(pf, l)         {*(pf) = (FLOAT)(l);}
   2473 #define FLOATOBJ_GetFloat(pf)           (*(PULONG)(pf))
   2474 #define FLOATOBJ_GetLong(pf)            ((LONG)*(pf))
   2475 #define FLOATOBJ_Add(pf, pf1)           {*(pf) += *(pf1);}
   2476 #define FLOATOBJ_AddFloat(pf, f)        {*(pf) += (f);}
   2477 #define FLOATOBJ_AddLong(pf, l)         {*(pf) += (l);}
   2478 #define FLOATOBJ_Sub(pf, pf1)           {*(pf) -= *(pf1);}
   2479 #define FLOATOBJ_SubFloat(pf, f)        {*(pf) -= (f);}
   2480 #define FLOATOBJ_SubLong(pf, l)         {*(pf) -= (l);}
   2481 #define FLOATOBJ_Mul(pf, pf1)           {*(pf) *= *(pf1);}
   2482 #define FLOATOBJ_MulFloat(pf, f)        {*(pf) *= (f);}
   2483 #define FLOATOBJ_MulLong(pf, l)         {*(pf) *= (l);}
   2484 #define FLOATOBJ_Div(pf, pf1)           {*(pf) /= *(pf1);}
   2485 #define FLOATOBJ_DivFloat(pf, f)        {*(pf) /= (f);}
   2486 #define FLOATOBJ_DivLong(pf, l)         {*(pf) /= (l);}
   2487 #define FLOATOBJ_Neg(pf)                {*(pf) = -(*(pf));}
   2488 #define FLOATOBJ_Equal(pf, pf1)         (*(pf) == *(pf1))
   2489 #define FLOATOBJ_GreaterThan(pf, pf1)   (*(pf) > *(pf1))
   2490 #define FLOATOBJ_LessThan(pf, pf1)      (*(pf) < *(pf1))
   2491 #define FLOATOBJ_EqualLong(pf, l)       (*(pf) == (FLOAT)(l))
   2492 #define FLOATOBJ_GreaterThanLong(pf, l) (*(pf) > (FLOAT)(l))
   2493 #define FLOATOBJ_LessThanLong(pf, l)    (*(pf) < (FLOAT)(l))
   2494 
   2495 #endif
   2496 
   2497 WIN32KAPI
   2498 ULONG
   2499 APIENTRY
   2500 FONTOBJ_cGetAllGlyphHandles(
   2501   FONTOBJ  *pfo,
   2502   HGLYPH  *phg);
   2503 
   2504 WIN32KAPI
   2505 ULONG
   2506 APIENTRY
   2507 FONTOBJ_cGetGlyphs(
   2508   FONTOBJ  *pfo,
   2509   ULONG  iMode,
   2510   ULONG  cGlyph,
   2511   HGLYPH  *phg,
   2512   PVOID  *ppvGlyph);
   2513 
   2514 WIN32KAPI
   2515 FD_GLYPHSET*
   2516 APIENTRY
   2517 FONTOBJ_pfdg(
   2518   FONTOBJ  *pfo);
   2519 
   2520 WIN32KAPI
   2521 IFIMETRICS*
   2522 APIENTRY
   2523 FONTOBJ_pifi(
   2524   FONTOBJ  *pfo);
   2525 
   2526 WIN32KAPI
   2527 PBYTE
   2528 APIENTRY
   2529 FONTOBJ_pjOpenTypeTablePointer(
   2530   FONTOBJ  *pfo,
   2531   ULONG  ulTag,
   2532   ULONG  *pcjTable);
   2533 
   2534 WIN32KAPI
   2535 PFD_GLYPHATTR
   2536 APIENTRY
   2537 FONTOBJ_pQueryGlyphAttrs(
   2538   FONTOBJ  *pfo,
   2539   ULONG  iMode);
   2540 
   2541 WIN32KAPI
   2542 PVOID
   2543 APIENTRY
   2544 FONTOBJ_pvTrueTypeFontFile(
   2545   FONTOBJ  *pfo,
   2546   ULONG  *pcjFile);
   2547 
   2548 WIN32KAPI
   2549 LPWSTR
   2550 APIENTRY
   2551 FONTOBJ_pwszFontFilePaths(
   2552   FONTOBJ  *pfo,
   2553   ULONG  *pcwc);
   2554 
   2555 WIN32KAPI
   2556 XFORMOBJ*
   2557 APIENTRY
   2558 FONTOBJ_pxoGetXform(
   2559   FONTOBJ  *pfo);
   2560 
   2561 WIN32KAPI
   2562 VOID
   2563 APIENTRY
   2564 FONTOBJ_vGetInfo(
   2565   FONTOBJ  *pfo,
   2566   ULONG  cjSize,
   2567   FONTINFO  *pfi);
   2568 
   2569 
   2570 
   2571 WIN32KAPI
   2572 LONG
   2573 APIENTRY
   2574 HT_ComputeRGBGammaTable(
   2575   USHORT  GammaTableEntries,
   2576   USHORT  GammaTableType,
   2577   USHORT  RedGamma,
   2578   USHORT  GreenGamma,
   2579   USHORT  BlueGamma,
   2580   LPBYTE  pGammaTable);
   2581 
   2582 WIN32KAPI
   2583 LONG
   2584 APIENTRY
   2585 HT_Get8BPPFormatPalette(
   2586   LPPALETTEENTRY  pPaletteEntry,
   2587   USHORT  RedGamma,
   2588   USHORT  GreenGamma,
   2589   USHORT  BlueGamma);
   2590 
   2591 WIN32KAPI
   2592 LONG
   2593 APIENTRY
   2594 HT_Get8BPPMaskPalette(
   2595   LPPALETTEENTRY  pPaletteEntry,
   2596   WINBOOL  Use8BPPMaskPal,
   2597   BYTE  CMYMask,
   2598   USHORT  RedGamma,
   2599   USHORT  GreenGamma,
   2600   USHORT  BlueGamma);
   2601 
   2602 WIN32KAPI
   2603 LONG
   2604 APIENTRY
   2605 HTUI_DeviceColorAdjustment(
   2606   LPSTR  pDeviceName,
   2607   PDEVHTADJDATA  pDevHTAdjData);
   2608 
   2609 WIN32KAPI
   2610 ULONG
   2611 APIENTRY
   2612 PALOBJ_cGetColors(
   2613   PALOBJ  *ppalo,
   2614   ULONG  iStart,
   2615   ULONG  cColors,
   2616   ULONG  *pulColors);
   2617 
   2618 WIN32KAPI
   2619 WINBOOL
   2620 APIENTRY
   2621 PATHOBJ_bCloseFigure(
   2622   PATHOBJ  *ppo);
   2623 
   2624 WIN32KAPI
   2625 WINBOOL
   2626 APIENTRY
   2627 PATHOBJ_bEnum(
   2628   PATHOBJ  *ppo,
   2629   PATHDATA  *ppd);
   2630 
   2631 WIN32KAPI
   2632 WINBOOL
   2633 APIENTRY
   2634 PATHOBJ_bEnumClipLines(
   2635   PATHOBJ  *ppo,
   2636   ULONG  cb,
   2637   CLIPLINE  *pcl);
   2638 
   2639 WIN32KAPI
   2640 WINBOOL
   2641 APIENTRY
   2642 PATHOBJ_bMoveTo(
   2643   PATHOBJ  *ppo,
   2644   POINTFIX  ptfx);
   2645 
   2646 WIN32KAPI
   2647 WINBOOL
   2648 APIENTRY
   2649 PATHOBJ_bPolyBezierTo(
   2650   PATHOBJ  *ppo,
   2651   POINTFIX  *pptfx,
   2652   ULONG  cptfx);
   2653 
   2654 WIN32KAPI
   2655 WINBOOL
   2656 APIENTRY
   2657 PATHOBJ_bPolyLineTo(
   2658   PATHOBJ  *ppo,
   2659   POINTFIX  *pptfx,
   2660   ULONG  cptfx);
   2661 
   2662 WIN32KAPI
   2663 VOID
   2664 APIENTRY
   2665 PATHOBJ_vEnumStart(
   2666   PATHOBJ  *ppo);
   2667 
   2668 WIN32KAPI
   2669 VOID
   2670 APIENTRY
   2671 PATHOBJ_vEnumStartClipLines(
   2672   PATHOBJ  *ppo,
   2673   CLIPOBJ  *pco,
   2674   SURFOBJ  *pso,
   2675   LINEATTRS  *pla);
   2676 
   2677 WIN32KAPI
   2678 VOID
   2679 APIENTRY
   2680 PATHOBJ_vGetBounds(
   2681   PATHOBJ  *ppo,
   2682   PRECTFX  prectfx);
   2683 
   2684 WIN32KAPI
   2685 WINBOOL
   2686 APIENTRY
   2687 STROBJ_bEnum(
   2688   STROBJ  *pstro,
   2689   ULONG  *pc,
   2690   PGLYPHPOS  *ppgpos);
   2691 
   2692 WIN32KAPI
   2693 WINBOOL
   2694 APIENTRY
   2695 STROBJ_bEnumPositionsOnly(
   2696   STROBJ  *pstro,
   2697   ULONG  *pc,
   2698   PGLYPHPOS  *ppgpos);
   2699 
   2700 WIN32KAPI
   2701 WINBOOL
   2702 APIENTRY
   2703 STROBJ_bGetAdvanceWidths(
   2704   STROBJ  *pso,
   2705   ULONG  iFirst,
   2706   ULONG  c,
   2707   POINTQF  *pptqD);
   2708 
   2709 WIN32KAPI
   2710 DWORD
   2711 APIENTRY
   2712 STROBJ_dwGetCodePage(
   2713   STROBJ  *pstro);
   2714 
   2715 WIN32KAPI
   2716 FIX
   2717 APIENTRY
   2718 STROBJ_fxBreakExtra(
   2719   STROBJ  *pstro);
   2720 
   2721 WIN32KAPI
   2722 FIX
   2723 APIENTRY
   2724 STROBJ_fxCharacterExtra(
   2725   STROBJ  *pstro);
   2726 
   2727 WIN32KAPI
   2728 VOID
   2729 APIENTRY
   2730 STROBJ_vEnumStart(
   2731   STROBJ  *pstro);
   2732 
   2733 WIN32KAPI
   2734 WINBOOL
   2735 APIENTRY
   2736 WNDOBJ_bEnum(
   2737   WNDOBJ  *pwo,
   2738   ULONG  cj,
   2739   ULONG  *pul);
   2740 
   2741 WIN32KAPI
   2742 ULONG
   2743 APIENTRY
   2744 WNDOBJ_cEnumStart(
   2745   WNDOBJ  *pwo,
   2746   ULONG  iType,
   2747   ULONG  iDirection,
   2748   ULONG  cLimit);
   2749 
   2750 WIN32KAPI
   2751 VOID
   2752 APIENTRY
   2753 WNDOBJ_vSetConsumer(
   2754   WNDOBJ  *pwo,
   2755   PVOID  pvConsumer);
   2756 
   2757 /* XFORMOBJ_bApplyXform.iMode constants */
   2758 #define XF_LTOL                           __MSABI_LONG(0)
   2759 #define XF_INV_LTOL                       __MSABI_LONG(1)
   2760 #define XF_LTOFX                          __MSABI_LONG(2)
   2761 #define XF_INV_FXTOL                      __MSABI_LONG(3)
   2762 
   2763 WIN32KAPI
   2764 WINBOOL
   2765 APIENTRY
   2766 XFORMOBJ_bApplyXform(
   2767   XFORMOBJ  *pxo,
   2768   ULONG  iMode,
   2769   ULONG  cPoints,
   2770   PVOID  pvIn,
   2771   PVOID  pvOut);
   2772 
   2773 WIN32KAPI
   2774 ULONG
   2775 APIENTRY
   2776 XFORMOBJ_iGetFloatObjXform(
   2777   XFORMOBJ  *pxo,
   2778   FLOATOBJ_XFORM  *pxfo);
   2779 
   2780 WIN32KAPI
   2781 ULONG
   2782 APIENTRY
   2783 XFORMOBJ_iGetXform(
   2784   XFORMOBJ  *pxo,
   2785   XFORML  *pxform);
   2786 
   2787 /* XLATEOBJ_cGetPalette.iPal constants */
   2788 #define XO_SRCPALETTE                     1
   2789 #define XO_DESTPALETTE                    2
   2790 #define XO_DESTDCPALETTE                  3
   2791 #define XO_SRCBITFIELDS                   4
   2792 #define XO_DESTBITFIELDS                  5
   2793 
   2794 WIN32KAPI
   2795 ULONG
   2796 APIENTRY
   2797 XLATEOBJ_cGetPalette(
   2798   XLATEOBJ  *pxlo,
   2799   ULONG  iPal,
   2800   ULONG  cPal,
   2801   ULONG  *pPal);
   2802 
   2803 WIN32KAPI
   2804 HANDLE
   2805 APIENTRY
   2806 XLATEOBJ_hGetColorTransform(
   2807   XLATEOBJ  *pxlo);
   2808 
   2809 WIN32KAPI
   2810 ULONG
   2811 APIENTRY
   2812 XLATEOBJ_iXlate(
   2813   XLATEOBJ  *pxlo,
   2814   ULONG  iColor);
   2815 
   2816 WIN32KAPI
   2817 ULONG*
   2818 APIENTRY
   2819 XLATEOBJ_piVector(
   2820   XLATEOBJ  *pxlo);
   2821 
   2822 
   2823 
   2824 /* Graphics Driver Functions */
   2825 
   2826 WINBOOL
   2827 APIENTRY
   2828 DrvAlphaBlend(
   2829   SURFOBJ  *psoDest,
   2830   SURFOBJ  *psoSrc,
   2831   CLIPOBJ  *pco,
   2832   XLATEOBJ  *pxlo,
   2833   RECTL  *prclDest,
   2834   RECTL  *prclSrc,
   2835   BLENDOBJ  *pBlendObj);
   2836 
   2837 WINBOOL
   2838 APIENTRY
   2839 DrvAssertMode(
   2840   DHPDEV  dhpdev,
   2841   WINBOOL  bEnable);
   2842 
   2843 WINBOOL
   2844 APIENTRY
   2845 DrvBitBlt(
   2846   SURFOBJ  *psoTrg,
   2847   SURFOBJ  *psoSrc,
   2848   SURFOBJ  *psoMask,
   2849   CLIPOBJ  *pco,
   2850   XLATEOBJ  *pxlo,
   2851   RECTL  *prclTrg,
   2852   POINTL  *pptlSrc,
   2853   POINTL  *pptlMask,
   2854   BRUSHOBJ  *pbo,
   2855   POINTL  *pptlBrush,
   2856   ROP4  rop4);
   2857 
   2858 VOID
   2859 APIENTRY
   2860 DrvCompletePDEV(
   2861   DHPDEV  dhpdev,
   2862   HDEV  hdev);
   2863 
   2864 WINBOOL
   2865 APIENTRY
   2866 DrvCopyBits(
   2867   SURFOBJ  *psoDest,
   2868   SURFOBJ  *psoSrc,
   2869   CLIPOBJ  *pco,
   2870   XLATEOBJ  *pxlo,
   2871   RECTL  *prclDest,
   2872   POINTL  *pptlSrc);
   2873 
   2874 HBITMAP
   2875 APIENTRY
   2876 DrvCreateDeviceBitmap(
   2877   DHPDEV  dhpdev,
   2878   SIZEL  sizl,
   2879   ULONG  iFormat);
   2880 
   2881 VOID
   2882 APIENTRY
   2883 DrvDeleteDeviceBitmap(
   2884   DHSURF  dhsurf);
   2885 
   2886 HBITMAP
   2887 APIENTRY
   2888 DrvDeriveSurface(
   2889   DD_DIRECTDRAW_GLOBAL  *pDirectDraw,
   2890   DD_SURFACE_LOCAL  *pSurface);
   2891 
   2892 LONG
   2893 APIENTRY
   2894 DrvDescribePixelFormat(
   2895   DHPDEV  dhpdev,
   2896   LONG  iPixelFormat,
   2897   ULONG  cjpfd,
   2898   PIXELFORMATDESCRIPTOR  *ppfd);
   2899 
   2900 VOID
   2901 APIENTRY
   2902 DrvDestroyFont(
   2903   FONTOBJ  *pfo);
   2904 
   2905 VOID
   2906 APIENTRY
   2907 DrvDisableDriver(
   2908   VOID);
   2909 
   2910 VOID
   2911 APIENTRY
   2912 DrvDisablePDEV(
   2913   DHPDEV  dhpdev);
   2914 
   2915 VOID
   2916 APIENTRY
   2917 DrvDisableSurface(
   2918   DHPDEV  dhpdev);
   2919 
   2920 #define DM_DEFAULT                        0x00000001
   2921 #define DM_MONOCHROME                     0x00000002
   2922 
   2923 ULONG
   2924 APIENTRY
   2925 DrvDitherColor(
   2926   DHPDEV  dhpdev,
   2927   ULONG  iMode,
   2928   ULONG  rgb,
   2929   ULONG  *pul);
   2930 
   2931 ULONG
   2932 APIENTRY
   2933 DrvDrawEscape(
   2934   SURFOBJ  *pso,
   2935   ULONG  iEsc,
   2936   CLIPOBJ  *pco,
   2937   RECTL  *prcl,
   2938   ULONG  cjIn,
   2939   PVOID  pvIn);
   2940 
   2941 WINBOOL
   2942 APIENTRY
   2943 DrvEnableDriver(
   2944   ULONG  iEngineVersion,
   2945   ULONG  cj,
   2946   DRVENABLEDATA  *pded);
   2947 
   2948 DHPDEV
   2949 APIENTRY
   2950 DrvEnablePDEV(
   2951   DEVMODEW  *pdm,
   2952   LPWSTR  pwszLogAddress,
   2953   ULONG  cPat,
   2954   HSURF  *phsurfPatterns,
   2955   ULONG  cjCaps,
   2956   ULONG  *pdevcaps,
   2957   ULONG  cjDevInfo,
   2958   DEVINFO  *pdi,
   2959   HDEV  hdev,
   2960   LPWSTR  pwszDeviceName,
   2961   HANDLE  hDriver);
   2962 
   2963 HSURF
   2964 APIENTRY
   2965 DrvEnableSurface(
   2966   DHPDEV  dhpdev);
   2967 
   2968 /* DrvEndDoc.fl constants */
   2969 #define ED_ABORTDOC                       0x00000001
   2970 
   2971 WINBOOL
   2972 APIENTRY
   2973 DrvEndDoc(
   2974   SURFOBJ  *pso,
   2975   FLONG  fl);
   2976 
   2977 ULONG
   2978 APIENTRY
   2979 DrvEscape(
   2980   SURFOBJ  *pso,
   2981   ULONG  iEsc,
   2982   ULONG  cjIn,
   2983   PVOID  pvIn,
   2984   ULONG  cjOut,
   2985   PVOID  pvOut);
   2986 
   2987 WINBOOL
   2988 APIENTRY
   2989 DrvFillPath(
   2990   SURFOBJ  *pso,
   2991   PATHOBJ  *ppo,
   2992   CLIPOBJ  *pco,
   2993   BRUSHOBJ  *pbo,
   2994   POINTL  *pptlBrushOrg,
   2995   MIX  mix,
   2996   FLONG  flOptions);
   2997 
   2998 ULONG
   2999 APIENTRY
   3000 DrvFontManagement(
   3001   SURFOBJ  *pso,
   3002   FONTOBJ  *pfo,
   3003   ULONG  iMode,
   3004   ULONG  cjIn,
   3005   PVOID  pvIn,
   3006   ULONG  cjOut,
   3007   PVOID  pvOut);
   3008 
   3009 VOID
   3010 APIENTRY
   3011 DrvFree(
   3012   PVOID  pv,
   3013   ULONG_PTR  id);
   3014 
   3015 /* DrvGetGlyphMode return values */
   3016 #define FO_HGLYPHS                        __MSABI_LONG(0)
   3017 #define FO_GLYPHBITS                      __MSABI_LONG(1)
   3018 #define FO_PATHOBJ                        __MSABI_LONG(2)
   3019 
   3020 ULONG
   3021 APIENTRY
   3022 DrvGetGlyphMode(
   3023   DHPDEV  dhpdev,
   3024   FONTOBJ  *pfo);
   3025 
   3026 ULONG
   3027 APIENTRY
   3028 DrvGetModes(
   3029   HANDLE  hDriver,
   3030   ULONG  cjSize,
   3031   DEVMODEW  *pdm);
   3032 
   3033 PVOID
   3034 APIENTRY
   3035 DrvGetTrueTypeFile(
   3036   ULONG_PTR  iFile,
   3037   ULONG  *pcj);
   3038 
   3039 WINBOOL
   3040 APIENTRY
   3041 DrvGradientFill(
   3042   SURFOBJ  *psoDest,
   3043   CLIPOBJ  *pco,
   3044   XLATEOBJ  *pxlo,
   3045   TRIVERTEX  *pVertex,
   3046   ULONG  nVertex,
   3047   PVOID  pMesh,
   3048   ULONG  nMesh,
   3049   RECTL  *prclExtents,
   3050   POINTL  *pptlDitherOrg,
   3051   ULONG  ulMode);
   3052 
   3053 WINBOOL
   3054 APIENTRY
   3055 DrvIcmCheckBitmapBits(
   3056   DHPDEV  dhpdev,
   3057   HANDLE  hColorTransform,
   3058   SURFOBJ  *pso,
   3059   PBYTE  paResults);
   3060 
   3061 HANDLE
   3062 APIENTRY
   3063 DrvIcmCreateColorTransform(
   3064   DHPDEV  dhpdev,
   3065   LPLOGCOLORSPACEW  pLogColorSpace,
   3066   PVOID  pvSourceProfile,
   3067   ULONG  cjSourceProfile,
   3068   PVOID  pvDestProfile,
   3069   ULONG  cjDestProfile,
   3070   PVOID  pvTargetProfile,
   3071   ULONG  cjTargetProfile,
   3072   DWORD  dwReserved);
   3073 
   3074 WINBOOL
   3075 APIENTRY
   3076 DrvIcmDeleteColorTransform(
   3077   DHPDEV  dhpdev,
   3078   HANDLE  hcmXform);
   3079 
   3080 /* DrvIcmSetDeviceGammaRamp.iFormat constants */
   3081 #define IGRF_RGB_256BYTES                 0x00000000
   3082 #define IGRF_RGB_256WORDS                 0x00000001
   3083 
   3084 WINBOOL
   3085 APIENTRY
   3086 DrvIcmSetDeviceGammaRamp(
   3087   DHPDEV  dhpdev,
   3088   ULONG  iFormat,
   3089   LPVOID  lpRamp);
   3090 
   3091 WINBOOL
   3092 APIENTRY
   3093 DrvLineTo(
   3094   SURFOBJ  *pso,
   3095   CLIPOBJ  *pco,
   3096   BRUSHOBJ  *pbo,
   3097   LONG  x1,
   3098   LONG  y1,
   3099   LONG  x2,
   3100   LONG  y2,
   3101   RECTL  *prclBounds,
   3102   MIX  mix);
   3103 
   3104 ULONG_PTR
   3105 APIENTRY
   3106 DrvLoadFontFile(
   3107   ULONG  cFiles,
   3108   ULONG_PTR  *piFile,
   3109   PVOID  *ppvView,
   3110   ULONG  *pcjView,
   3111   DESIGNVECTOR  *pdv,
   3112   ULONG  ulLangID,
   3113   ULONG  ulFastCheckSum);
   3114 
   3115 VOID
   3116 APIENTRY
   3117 DrvMovePointer(
   3118   SURFOBJ  *pso,
   3119   LONG  x,
   3120   LONG  y,
   3121   RECTL  *prcl);
   3122 
   3123 WINBOOL
   3124 APIENTRY
   3125 DrvNextBand(
   3126   SURFOBJ  *pso,
   3127   POINTL  *pptl);
   3128 
   3129 VOID
   3130 APIENTRY
   3131 DrvNotify(
   3132   SURFOBJ  *pso,
   3133   ULONG  iType,
   3134   PVOID  pvData);
   3135 
   3136 WINBOOL
   3137 APIENTRY
   3138 DrvOffset(
   3139   SURFOBJ  *pso,
   3140   LONG  x,
   3141   LONG  y,
   3142   FLONG  flReserved);
   3143 
   3144 WINBOOL
   3145 APIENTRY
   3146 DrvPaint(
   3147   SURFOBJ  *pso,
   3148   CLIPOBJ  *pco,
   3149   BRUSHOBJ  *pbo,
   3150   POINTL  *pptlBrushOrg,
   3151   MIX  mix);
   3152 
   3153 WINBOOL
   3154 APIENTRY
   3155 DrvPlgBlt(
   3156   SURFOBJ  *psoTrg,
   3157   SURFOBJ  *psoSrc,
   3158   SURFOBJ  *psoMsk,
   3159   CLIPOBJ  *pco,
   3160   XLATEOBJ  *pxlo,
   3161   COLORADJUSTMENT  *pca,
   3162   POINTL  *pptlBrushOrg,
   3163   POINTFIX  *pptfx,
   3164   RECTL  *prcl,
   3165   POINTL  *pptl,
   3166   ULONG  iMode);
   3167 
   3168 /* DrvQueryAdvanceWidths.iMode constants */
   3169 #define QAW_GETWIDTHS                     0
   3170 #define QAW_GETEASYWIDTHS                 1
   3171 
   3172 WINBOOL
   3173 APIENTRY
   3174 DrvQueryAdvanceWidths(
   3175   DHPDEV  dhpdev,
   3176   FONTOBJ  *pfo,
   3177   ULONG  iMode,
   3178   HGLYPH  *phg,
   3179   PVOID  pvWidths,
   3180   ULONG  cGlyphs);
   3181 
   3182 /* DrvQueryDeviceSupport.iType constants */
   3183 #define QDS_CHECKJPEGFORMAT               0x00000000
   3184 #define QDS_CHECKPNGFORMAT                0x00000001
   3185 
   3186 WINBOOL
   3187 APIENTRY
   3188 DrvQueryDeviceSupport(
   3189   SURFOBJ  *pso,
   3190   XLATEOBJ  *pxlo,
   3191   XFORMOBJ  *pxo,
   3192   ULONG  iType,
   3193   ULONG  cjIn,
   3194   PVOID  pvIn,
   3195   ULONG  cjOut,
   3196   PVOID  pvOut);
   3197 
   3198 /* DrvQueryDriverInfo.dwMode constants */
   3199 #define DRVQUERY_USERMODE                 0x00000001
   3200 
   3201 WINBOOL
   3202 APIENTRY
   3203 DrvQueryDriverInfo(
   3204   DWORD  dwMode,
   3205   PVOID  pBuffer,
   3206   DWORD  cbBuf,
   3207   PDWORD  pcbNeeded);
   3208 
   3209 PIFIMETRICS
   3210 APIENTRY
   3211 DrvQueryFont(
   3212   DHPDEV  dhpdev,
   3213   ULONG_PTR  iFile,
   3214   ULONG  iFace,
   3215   ULONG_PTR  *pid);
   3216 
   3217 /* DrvQueryFontCaps.pulCaps constants */
   3218 #define QC_OUTLINES                       0x00000001
   3219 #define QC_1BIT                           0x00000002
   3220 #define QC_4BIT                           0x00000004
   3221 
   3222 #define QC_FONTDRIVERCAPS (QC_OUTLINES | QC_1BIT | QC_4BIT)
   3223 
   3224 LONG
   3225 APIENTRY
   3226 DrvQueryFontCaps(
   3227   ULONG  culCaps,
   3228   ULONG  *pulCaps);
   3229 
   3230 /* DrvQueryFontData.iMode constants */
   3231 #define QFD_GLYPHANDBITMAP                __MSABI_LONG(1)
   3232 #define QFD_GLYPHANDOUTLINE               __MSABI_LONG(2)
   3233 #define QFD_MAXEXTENTS                    __MSABI_LONG(3)
   3234 #define QFD_TT_GLYPHANDBITMAP             __MSABI_LONG(4)
   3235 #define QFD_TT_GRAY1_BITMAP               __MSABI_LONG(5)
   3236 #define QFD_TT_GRAY2_BITMAP               __MSABI_LONG(6)
   3237 #define QFD_TT_GRAY4_BITMAP               __MSABI_LONG(8)
   3238 #define QFD_TT_GRAY8_BITMAP               __MSABI_LONG(9)
   3239 
   3240 #define QFD_TT_MONO_BITMAP QFD_TT_GRAY1_BITMAP
   3241 
   3242 LONG
   3243 APIENTRY
   3244 DrvQueryFontData(
   3245   DHPDEV  dhpdev,
   3246   FONTOBJ  *pfo,
   3247   ULONG  iMode,
   3248   HGLYPH  hg,
   3249   GLYPHDATA  *pgd,
   3250   PVOID  pv,
   3251   ULONG  cjSize);
   3252 
   3253 /* DrvQueryFontFile.ulMode constants */
   3254 #define QFF_DESCRIPTION                   0x00000001
   3255 #define QFF_NUMFACES                      0x00000002
   3256 
   3257 LONG
   3258 APIENTRY
   3259 DrvQueryFontFile(
   3260   ULONG_PTR  iFile,
   3261   ULONG  ulMode,
   3262   ULONG  cjBuf,
   3263   ULONG  *pulBuf);
   3264 
   3265 /* DrvQueryFontTree.iMode constants */
   3266 #define QFT_UNICODE                       __MSABI_LONG(0)
   3267 #define QFT_LIGATURES                     __MSABI_LONG(1)
   3268 #define QFT_KERNPAIRS                     __MSABI_LONG(2)
   3269 #define QFT_GLYPHSET                      __MSABI_LONG(3)
   3270 
   3271 PVOID
   3272 APIENTRY
   3273 DrvQueryFontTree(
   3274   DHPDEV  dhpdev,
   3275   ULONG_PTR  iFile,
   3276   ULONG  iFace,
   3277   ULONG  iMode,
   3278   ULONG_PTR  *pid);
   3279 
   3280 PFD_GLYPHATTR
   3281 APIENTRY
   3282 DrvQueryGlyphAttrs(
   3283   FONTOBJ  *pfo,
   3284   ULONG  iMode);
   3285 
   3286 ULONG
   3287 APIENTRY
   3288 DrvQueryPerBandInfo(
   3289   SURFOBJ  *pso,
   3290   PERBANDINFO  *pbi);
   3291 
   3292 /* DrvQueryTrueTypeOutline.bMetricsOnly constants */
   3293 #define TTO_METRICS_ONLY                  0x00000001
   3294 #define TTO_QUBICS                        0x00000002
   3295 #define TTO_UNHINTED                      0x00000004
   3296 
   3297 LONG
   3298 APIENTRY
   3299 DrvQueryTrueTypeOutline(
   3300   DHPDEV  dhpdev,
   3301   FONTOBJ  *pfo,
   3302   HGLYPH  hglyph,
   3303   WINBOOL  bMetricsOnly,
   3304   GLYPHDATA  *pgldt,
   3305   ULONG  cjBuf,
   3306   TTPOLYGONHEADER  *ppoly);
   3307 
   3308 LONG
   3309 APIENTRY
   3310 DrvQueryTrueTypeTable(
   3311   ULONG_PTR  iFile,
   3312   ULONG  ulFont,
   3313   ULONG  ulTag,
   3314   PTRDIFF  dpStart,
   3315   ULONG  cjBuf,
   3316   BYTE  *pjBuf,
   3317   PBYTE  *ppjTable,
   3318   ULONG *pcjTable);
   3319 
   3320 /* DrvRealizeBrush.iHatch constants */
   3321 #define RB_DITHERCOLOR                    __MSABI_LONG(0x80000000)
   3322 
   3323 #define HS_DDI_MAX                        6
   3324 
   3325 WINBOOL
   3326 APIENTRY
   3327 DrvRealizeBrush(
   3328   BRUSHOBJ  *pbo,
   3329   SURFOBJ  *psoTarget,
   3330   SURFOBJ  *psoPattern,
   3331   SURFOBJ  *psoMask,
   3332   XLATEOBJ  *pxlo,
   3333   ULONG  iHatch);
   3334 
   3335 /* DrvResetDevice return values */
   3336 #define DRD_SUCCESS                       0
   3337 #define DRD_ERROR                         1
   3338 
   3339 ULONG
   3340 APIENTRY
   3341 DrvResetDevice(
   3342   DHPDEV dhpdev,
   3343   PVOID Reserved);
   3344 
   3345 WINBOOL
   3346 APIENTRY
   3347 DrvResetPDEV(
   3348   DHPDEV  dhpdevOld,
   3349   DHPDEV  dhpdevNew);
   3350 
   3351 /* DrvSaveScreenBits.iMode constants */
   3352 #define SS_SAVE                           0x00000000
   3353 #define SS_RESTORE                        0x00000001
   3354 #define SS_FREE                           0x00000002
   3355 
   3356 ULONG_PTR
   3357 APIENTRY
   3358 DrvSaveScreenBits(
   3359   SURFOBJ  *pso,
   3360   ULONG  iMode,
   3361   ULONG_PTR  ident,
   3362   RECTL  *prcl);
   3363 
   3364 WINBOOL
   3365 APIENTRY
   3366 DrvSendPage(
   3367   SURFOBJ  *pso);
   3368 
   3369 WINBOOL
   3370 APIENTRY
   3371 DrvSetPalette(
   3372   DHPDEV  dhpdev,
   3373   PALOBJ  *ppalo,
   3374   FLONG  fl,
   3375   ULONG  iStart,
   3376   ULONG  cColors);
   3377 
   3378 WINBOOL
   3379 APIENTRY
   3380 DrvSetPixelFormat(
   3381   SURFOBJ  *pso,
   3382   LONG  iPixelFormat,
   3383   HWND  hwnd);
   3384 
   3385 /* DrvSetPointerShape return values */
   3386 #define SPS_ERROR                         0x00000000
   3387 #define SPS_DECLINE                       0x00000001
   3388 #define SPS_ACCEPT_NOEXCLUDE              0x00000002
   3389 #define SPS_ACCEPT_EXCLUDE                0x00000003
   3390 #define SPS_ACCEPT_SYNCHRONOUS            0x00000004
   3391 
   3392 /* DrvSetPointerShape.fl constants */
   3393 #define SPS_CHANGE                        __MSABI_LONG(0x00000001)
   3394 #define SPS_ASYNCCHANGE                   __MSABI_LONG(0x00000002)
   3395 #define SPS_ANIMATESTART                  __MSABI_LONG(0x00000004)
   3396 #define SPS_ANIMATEUPDATE                 __MSABI_LONG(0x00000008)
   3397 #define SPS_ALPHA                         __MSABI_LONG(0x00000010)
   3398 #define SPS_LENGTHMASK                    __MSABI_LONG(0x00000F00)
   3399 #define SPS_FREQMASK                      __MSABI_LONG(0x000FF000)
   3400 
   3401 ULONG
   3402 APIENTRY
   3403 DrvSetPointerShape(
   3404   SURFOBJ  *pso,
   3405   SURFOBJ  *psoMask,
   3406   SURFOBJ  *psoColor,
   3407   XLATEOBJ  *pxlo,
   3408   LONG  xHot,
   3409   LONG  yHot,
   3410   LONG  x,
   3411   LONG  y,
   3412   RECTL  *prcl,
   3413   FLONG  fl);
   3414 
   3415 WINBOOL
   3416 APIENTRY
   3417 DrvStartBanding(
   3418   SURFOBJ  *pso,
   3419   POINTL  *pptl);
   3420 
   3421 WINBOOL
   3422 APIENTRY
   3423 DrvStartDoc(
   3424   SURFOBJ  *pso,
   3425   LPWSTR  pwszDocName,
   3426   DWORD  dwJobId);
   3427 
   3428 WINBOOL
   3429 APIENTRY
   3430 DrvStartPage(
   3431   SURFOBJ  *pso);
   3432 
   3433 WINBOOL
   3434 APIENTRY
   3435 DrvStretchBlt(
   3436   SURFOBJ  *psoDest,
   3437   SURFOBJ  *psoSrc,
   3438   SURFOBJ  *psoMask,
   3439   CLIPOBJ  *pco,
   3440   XLATEOBJ  *pxlo,
   3441   COLORADJUSTMENT  *pca,
   3442   POINTL  *pptlHTOrg,
   3443   RECTL  *prclDest,
   3444   RECTL  *prclSrc,
   3445   POINTL  *pptlMask,
   3446   ULONG  iMode);
   3447 
   3448 WINBOOL
   3449 APIENTRY
   3450 DrvStretchBltROP(
   3451   SURFOBJ  *psoDest,
   3452   SURFOBJ  *psoSrc,
   3453   SURFOBJ  *psoMask,
   3454   CLIPOBJ  *pco,
   3455   XLATEOBJ  *pxlo,
   3456   COLORADJUSTMENT  *pca,
   3457   POINTL  *pptlHTOrg,
   3458   RECTL  *prclDest,
   3459   RECTL  *prclSrc,
   3460   POINTL  *pptlMask,
   3461   ULONG  iMode,
   3462   BRUSHOBJ  *pbo,
   3463   DWORD  rop4);
   3464 
   3465 WINBOOL
   3466 APIENTRY
   3467 DrvStrokeAndFillPath(
   3468   SURFOBJ  *pso,
   3469   PATHOBJ  *ppo,
   3470   CLIPOBJ  *pco,
   3471   XFORMOBJ  *pxo,
   3472   BRUSHOBJ  *pboStroke,
   3473   LINEATTRS  *plineattrs,
   3474   BRUSHOBJ  *pboFill,
   3475   POINTL  *pptlBrushOrg,
   3476   MIX  mixFill,
   3477   FLONG  flOptions);
   3478 
   3479 WINBOOL
   3480 APIENTRY
   3481 DrvStrokePath(
   3482   SURFOBJ  *pso,
   3483   PATHOBJ  *ppo,
   3484   CLIPOBJ  *pco,
   3485   XFORMOBJ  *pxo,
   3486   BRUSHOBJ  *pbo,
   3487   POINTL  *pptlBrushOrg,
   3488   LINEATTRS  *plineattrs,
   3489   MIX  mix);
   3490 
   3491 WINBOOL
   3492 APIENTRY
   3493 DrvSwapBuffers(
   3494   SURFOBJ  *pso,
   3495   WNDOBJ  *pwo);
   3496 
   3497 VOID
   3498 APIENTRY
   3499 DrvSynchronize(
   3500   DHPDEV  dhpdev,
   3501   RECTL  *prcl);
   3502 
   3503 /* DrvSynchronizeSurface.fl constants */
   3504 #define DSS_TIMER_EVENT                   0x00000001
   3505 #define DSS_FLUSH_EVENT                   0x00000002
   3506 
   3507 VOID
   3508 APIENTRY
   3509 DrvSynchronizeSurface(
   3510   SURFOBJ  *pso,
   3511   RECTL  *prcl,
   3512   FLONG  fl);
   3513 
   3514 WINBOOL
   3515 APIENTRY
   3516 DrvTextOut(
   3517   SURFOBJ  *pso,
   3518   STROBJ  *pstro,
   3519   FONTOBJ  *pfo,
   3520   CLIPOBJ  *pco,
   3521   RECTL  *prclExtra,
   3522   RECTL  *prclOpaque,
   3523   BRUSHOBJ  *pboFore,
   3524   BRUSHOBJ  *pboOpaque,
   3525   POINTL  *pptlOrg,
   3526   MIX  mix);
   3527 
   3528 WINBOOL
   3529 APIENTRY
   3530 DrvTransparentBlt(
   3531   SURFOBJ  *psoDst,
   3532   SURFOBJ  *psoSrc,
   3533   CLIPOBJ  *pco,
   3534   XLATEOBJ  *pxlo,
   3535   RECTL  *prclDst,
   3536   RECTL  *prclSrc,
   3537   ULONG  iTransColor,
   3538   ULONG  ulReserved);
   3539 
   3540 WINBOOL
   3541 APIENTRY
   3542 DrvUnloadFontFile(
   3543   ULONG_PTR  iFile);
   3544 
   3545 typedef WINBOOL
   3546 (APIENTRY *PFN_DrvAlphaBlend)(
   3547   SURFOBJ  *psoDest,
   3548   SURFOBJ  *psoSrc,
   3549   CLIPOBJ  *pco,
   3550   XLATEOBJ  *pxlo,
   3551   RECTL  *prclDest,
   3552   RECTL  *prclSrc,
   3553   BLENDOBJ  *pBlendObj);
   3554 
   3555 typedef WINBOOL
   3556 (APIENTRY *PFN_DrvAssertMode)(
   3557   DHPDEV  dhpdev,
   3558   WINBOOL  bEnable);
   3559 
   3560 typedef WINBOOL
   3561 (APIENTRY *PFN_DrvBitBlt)(
   3562   SURFOBJ  *psoTrg,
   3563   SURFOBJ  *psoSrc,
   3564   SURFOBJ  *psoMask,
   3565   CLIPOBJ  *pco,
   3566   XLATEOBJ  *pxlo,
   3567   RECTL  *prclTrg,
   3568   POINTL  *pptlSrc,
   3569   POINTL  *pptlMask,
   3570   BRUSHOBJ  *pbo,
   3571   POINTL  *pptlBrush,
   3572   ROP4  rop4);
   3573 
   3574 typedef VOID
   3575 (APIENTRY *PFN_DrvCompletePDEV)(
   3576   DHPDEV  dhpdev,
   3577   HDEV  hdev);
   3578 
   3579 typedef WINBOOL
   3580 (APIENTRY *PFN_DrvCopyBits)(
   3581   SURFOBJ  *psoDest,
   3582   SURFOBJ  *psoSrc,
   3583   CLIPOBJ  *pco,
   3584   XLATEOBJ  *pxlo,
   3585   RECTL  *prclDest,
   3586   POINTL  *pptlSrc);
   3587 
   3588 typedef HBITMAP
   3589 (APIENTRY *PFN_DrvCreateDeviceBitmap)(
   3590   DHPDEV  dhpdev,
   3591   SIZEL  sizl,
   3592   ULONG  iFormat);
   3593 
   3594 typedef VOID
   3595 (APIENTRY *PFN_DrvDeleteDeviceBitmap)(
   3596   DHSURF  dhsurf);
   3597 
   3598 typedef HBITMAP
   3599 (APIENTRY *PFN_DrvDeriveSurface)(
   3600   DD_DIRECTDRAW_GLOBAL  *pDirectDraw,
   3601   DD_SURFACE_LOCAL  *pSurface);
   3602 
   3603 typedef LONG
   3604 (APIENTRY *PFN_DrvDescribePixelFormat)(
   3605   DHPDEV  dhpdev,
   3606   LONG  iPixelFormat,
   3607   ULONG  cjpfd,
   3608   PIXELFORMATDESCRIPTOR  *ppfd);
   3609 
   3610 typedef VOID
   3611 (APIENTRY *PFN_DrvDestroyFont)(
   3612   FONTOBJ  *pfo);
   3613 
   3614 typedef VOID
   3615 (APIENTRY *PFN_DrvDisableDriver)(
   3616   VOID);
   3617 
   3618 typedef VOID
   3619 (APIENTRY *PFN_DrvDisablePDEV)(
   3620   DHPDEV  dhpdev);
   3621 
   3622 typedef VOID
   3623 (APIENTRY *PFN_DrvDisableSurface)(
   3624   DHPDEV  dhpdev);
   3625 
   3626 typedef ULONG
   3627 (APIENTRY *PFN_DrvDitherColor)(
   3628   DHPDEV  dhpdev,
   3629   ULONG  iMode,
   3630   ULONG  rgb,
   3631   ULONG  *pul);
   3632 
   3633 typedef ULONG
   3634 (APIENTRY *PFN_DrvDrawEscape)(
   3635   SURFOBJ  *pso,
   3636   ULONG  iEsc,
   3637   CLIPOBJ  *pco,
   3638   RECTL  *prcl,
   3639   ULONG  cjIn,
   3640   PVOID  pvIn);
   3641 
   3642 typedef WINBOOL
   3643 (APIENTRY *PFN_DrvEnableDriver)(
   3644   ULONG  iEngineVersion,
   3645   ULONG  cj,
   3646   DRVENABLEDATA  *pded);
   3647 
   3648 typedef DHPDEV
   3649 (APIENTRY *PFN_DrvEnablePDEV)(
   3650   DEVMODEW  *pdm,
   3651   LPWSTR  pwszLogAddress,
   3652   ULONG  cPat,
   3653   HSURF  *phsurfPatterns,
   3654   ULONG  cjCaps,
   3655   GDIINFO  *pdevcaps,
   3656   ULONG  cjDevInfo,
   3657   DEVINFO  *pdi,
   3658   HDEV  hdev,
   3659   LPWSTR  pwszDeviceName,
   3660   HANDLE  hDriver);
   3661 
   3662 typedef HSURF
   3663 (APIENTRY *PFN_DrvEnableSurface)(
   3664   DHPDEV  dhpdev);
   3665 
   3666 typedef WINBOOL
   3667 (APIENTRY *PFN_DrvEndDoc)(
   3668   SURFOBJ  *pso,
   3669   FLONG  fl);
   3670 
   3671 typedef ULONG
   3672 (APIENTRY *PFN_DrvEscape)(
   3673   SURFOBJ  *pso,
   3674   ULONG  iEsc,
   3675   ULONG  cjIn,
   3676   PVOID  pvIn,
   3677   ULONG  cjOut,
   3678   PVOID  pvOut);
   3679 
   3680 typedef WINBOOL
   3681 (APIENTRY *PFN_DrvFillPath)(
   3682   SURFOBJ  *pso,
   3683   PATHOBJ  *ppo,
   3684   CLIPOBJ  *pco,
   3685   BRUSHOBJ  *pbo,
   3686   POINTL  *pptlBrushOrg,
   3687   MIX  mix,
   3688   FLONG  flOptions);
   3689 
   3690 typedef ULONG
   3691 (APIENTRY *PFN_DrvFontManagement)(
   3692   SURFOBJ  *pso,
   3693   FONTOBJ  *pfo,
   3694   ULONG  iMode,
   3695   ULONG  cjIn,
   3696   PVOID  pvIn,
   3697   ULONG  cjOut,
   3698   PVOID  pvOut);
   3699 
   3700 typedef VOID
   3701 (APIENTRY *PFN_DrvFree)(
   3702   PVOID  pv,
   3703   ULONG_PTR  id);
   3704 
   3705 typedef ULONG
   3706 (APIENTRY *PFN_DrvGetGlyphMode)(
   3707   DHPDEV  dhpdev,
   3708   FONTOBJ  *pfo);
   3709 
   3710 typedef ULONG
   3711 (APIENTRY *PFN_DrvGetModes)(
   3712   HANDLE  hDriver,
   3713   ULONG  cjSize,
   3714   DEVMODEW  *pdm);
   3715 
   3716 typedef PVOID
   3717 (APIENTRY *PFN_DrvGetTrueTypeFile)(
   3718   ULONG_PTR  iFile,
   3719   ULONG  *pcj);
   3720 
   3721 typedef WINBOOL
   3722 (APIENTRY *PFN_DrvGradientFill)(
   3723   SURFOBJ  *psoDest,
   3724   CLIPOBJ  *pco,
   3725   XLATEOBJ  *pxlo,
   3726   TRIVERTEX  *pVertex,
   3727   ULONG  nVertex,
   3728   PVOID  pMesh,
   3729   ULONG  nMesh,
   3730   RECTL  *prclExtents,
   3731   POINTL  *pptlDitherOrg,
   3732   ULONG  ulMode);
   3733 
   3734 typedef WINBOOL
   3735 (APIENTRY *PFN_DrvIcmCheckBitmapBits)(
   3736   DHPDEV  dhpdev,
   3737   HANDLE  hColorTransform,
   3738   SURFOBJ  *pso,
   3739   PBYTE  paResults);
   3740 
   3741 typedef HANDLE
   3742 (APIENTRY *PFN_DrvIcmCreateColorTransform)(
   3743   DHPDEV  dhpdev,
   3744   LPLOGCOLORSPACEW  pLogColorSpace,
   3745   PVOID  pvSourceProfile,
   3746   ULONG  cjSourceProfile,
   3747   PVOID  pvDestProfile,
   3748   ULONG  cjDestProfile,
   3749   PVOID  pvTargetProfile,
   3750   ULONG  cjTargetProfile,
   3751   DWORD  dwReserved);
   3752 
   3753 typedef WINBOOL
   3754 (APIENTRY *PFN_DrvIcmDeleteColorTransform)(
   3755   DHPDEV  dhpdev,
   3756   HANDLE  hcmXform);
   3757 
   3758 typedef WINBOOL
   3759 (APIENTRY *PFN_DrvIcmSetDeviceGammaRamp)(
   3760   DHPDEV  dhpdev,
   3761   ULONG  iFormat,
   3762   LPVOID  lpRamp);
   3763 
   3764 typedef WINBOOL
   3765 (APIENTRY *PFN_DrvLineTo)(
   3766   SURFOBJ  *pso,
   3767   CLIPOBJ  *pco,
   3768   BRUSHOBJ  *pbo,
   3769   LONG  x1,
   3770   LONG  y1,
   3771   LONG  x2,
   3772   LONG  y2,
   3773   RECTL  *prclBounds,
   3774   MIX  mix);
   3775 
   3776 typedef ULONG_PTR
   3777 (APIENTRY *PFN_DrvLoadFontFile)(
   3778   ULONG  cFiles,
   3779   ULONG_PTR  *piFile,
   3780   PVOID  *ppvView,
   3781   ULONG  *pcjView,
   3782   DESIGNVECTOR  *pdv,
   3783   ULONG  ulLangID,
   3784   ULONG  ulFastCheckSum);
   3785 
   3786 typedef VOID
   3787 (APIENTRY *PFN_DrvMovePointer)(
   3788   SURFOBJ  *pso,
   3789   LONG  x,
   3790   LONG  y,
   3791   RECTL  *prcl);
   3792 
   3793 typedef WINBOOL
   3794 (APIENTRY *PFN_DrvNextBand)(
   3795   SURFOBJ  *pso,
   3796   POINTL  *pptl);
   3797 
   3798 typedef VOID
   3799 (APIENTRY *PFN_DrvNotify)(
   3800   SURFOBJ  *pso,
   3801   ULONG  iType,
   3802   PVOID  pvData);
   3803 
   3804 typedef WINBOOL
   3805 (APIENTRY *PFN_DrvOffset)(
   3806   SURFOBJ  *pso,
   3807   LONG  x,
   3808   LONG  y,
   3809   FLONG  flReserved);
   3810 
   3811 typedef WINBOOL
   3812 (APIENTRY *PFN_DrvPaint)(
   3813   SURFOBJ  *pso,
   3814   CLIPOBJ  *pco,
   3815   BRUSHOBJ  *pbo,
   3816   POINTL  *pptlBrushOrg,
   3817   MIX  mix);
   3818 
   3819 typedef WINBOOL
   3820 (APIENTRY *PFN_DrvPlgBlt)(
   3821   SURFOBJ  *psoTrg,
   3822   SURFOBJ  *psoSrc,
   3823   SURFOBJ  *psoMsk,
   3824   CLIPOBJ  *pco,
   3825   XLATEOBJ  *pxlo,
   3826   COLORADJUSTMENT  *pca,
   3827   POINTL  *pptlBrushOrg,
   3828   POINTFIX  *pptfx,
   3829   RECTL  *prcl,
   3830   POINTL  *pptl,
   3831   ULONG  iMode);
   3832 
   3833 typedef WINBOOL
   3834 (APIENTRY *PFN_DrvQueryAdvanceWidths)(
   3835   DHPDEV  dhpdev,
   3836   FONTOBJ  *pfo,
   3837   ULONG  iMode,
   3838   HGLYPH  *phg,
   3839   PVOID  pvWidths,
   3840   ULONG  cGlyphs);
   3841 
   3842 typedef WINBOOL
   3843 (APIENTRY *PFN_DrvQueryDeviceSupport)(
   3844   SURFOBJ  *pso,
   3845   XLATEOBJ  *pxlo,
   3846   XFORMOBJ  *pxo,
   3847   ULONG  iType,
   3848   ULONG  cjIn,
   3849   PVOID  pvIn,
   3850   ULONG  cjOut,
   3851   PVOID  pvOut);
   3852 
   3853 typedef WINBOOL
   3854 (APIENTRY *PFN_DrvQueryDriverInfo)(
   3855   DWORD  dwMode,
   3856   PVOID  pBuffer,
   3857   DWORD  cbBuf,
   3858   PDWORD  pcbNeeded);
   3859 
   3860 typedef PIFIMETRICS
   3861 (APIENTRY *PFN_DrvQueryFont)(
   3862   DHPDEV  dhpdev,
   3863   ULONG_PTR  iFile,
   3864   ULONG  iFace,
   3865   ULONG_PTR  *pid);
   3866 
   3867 typedef LONG
   3868 (APIENTRY *PFN_DrvQueryFontCaps)(
   3869   ULONG  culCaps,
   3870   ULONG  *pulCaps);
   3871 
   3872 typedef LONG
   3873 (APIENTRY *PFN_DrvQueryFontData)(
   3874   DHPDEV  dhpdev,
   3875   FONTOBJ  *pfo,
   3876   ULONG  iMode,
   3877   HGLYPH  hg,
   3878   GLYPHDATA  *pgd,
   3879   PVOID  pv,
   3880   ULONG  cjSize);
   3881 
   3882 typedef LONG
   3883 (APIENTRY *PFN_DrvQueryFontFile)(
   3884   ULONG_PTR  iFile,
   3885   ULONG  ulMode,
   3886   ULONG  cjBuf,
   3887   ULONG  *pulBuf);
   3888 
   3889 typedef PVOID
   3890 (APIENTRY *PFN_DrvQueryFontTree)(
   3891   DHPDEV  dhpdev,
   3892   ULONG_PTR  iFile,
   3893   ULONG  iFace,
   3894   ULONG  iMode,
   3895   ULONG_PTR  *pid);
   3896 
   3897 typedef PFD_GLYPHATTR
   3898 (APIENTRY *PFN_DrvQueryGlyphAttrs)(
   3899   FONTOBJ  *pfo,
   3900   ULONG  iMode);
   3901 
   3902 typedef ULONG
   3903 (APIENTRY *PFN_DrvQueryPerBandInfo)(
   3904   SURFOBJ  *pso,
   3905   PERBANDINFO  *pbi);
   3906 
   3907 typedef LONG
   3908 (APIENTRY *PFN_DrvQueryTrueTypeOutline)(
   3909   DHPDEV  dhpdev,
   3910   FONTOBJ  *pfo,
   3911   HGLYPH  hglyph,
   3912   WINBOOL  bMetricsOnly,
   3913   GLYPHDATA  *pgldt,
   3914   ULONG  cjBuf,
   3915   TTPOLYGONHEADER  *ppoly);
   3916 
   3917 typedef LONG
   3918 (APIENTRY *PFN_DrvQueryTrueTypeTable)(
   3919   ULONG_PTR  iFile,
   3920   ULONG  ulFont,
   3921   ULONG  ulTag,
   3922   PTRDIFF  dpStart,
   3923   ULONG  cjBuf,
   3924   BYTE  *pjBuf,
   3925   PBYTE  *ppjTable,
   3926   ULONG *pcjTable);
   3927 
   3928 typedef WINBOOL
   3929 (APIENTRY *PFN_DrvRealizeBrush)(
   3930   BRUSHOBJ  *pbo,
   3931   SURFOBJ  *psoTarget,
   3932   SURFOBJ  *psoPattern,
   3933   SURFOBJ  *psoMask,
   3934   XLATEOBJ  *pxlo,
   3935   ULONG  iHatch);
   3936 
   3937 typedef ULONG
   3938 (APIENTRY *PFN_DrvResetDevice)(
   3939   DHPDEV dhpdev,
   3940   PVOID Reserved);
   3941 
   3942 typedef WINBOOL
   3943 (APIENTRY *PFN_DrvResetPDEV)(
   3944   DHPDEV  dhpdevOld,
   3945   DHPDEV  dhpdevNew);
   3946 
   3947 typedef ULONG_PTR
   3948 (APIENTRY *PFN_DrvSaveScreenBits)(
   3949   SURFOBJ  *pso,
   3950   ULONG  iMode,
   3951   ULONG_PTR  ident,
   3952   RECTL  *prcl);
   3953 
   3954 typedef WINBOOL
   3955 (APIENTRY *PFN_DrvSendPage)(
   3956   SURFOBJ  *pso);
   3957 
   3958 typedef WINBOOL
   3959 (APIENTRY *PFN_DrvSetPalette)(
   3960   DHPDEV  dhpdev,
   3961   PALOBJ  *ppalo,
   3962   FLONG  fl,
   3963   ULONG  iStart,
   3964   ULONG  cColors);
   3965 
   3966 typedef WINBOOL
   3967 (APIENTRY *PFN_DrvSetPixelFormat)(
   3968   SURFOBJ  *pso,
   3969   LONG  iPixelFormat,
   3970   HWND  hwnd);
   3971 
   3972 typedef ULONG
   3973 (APIENTRY *PFN_DrvSetPointerShape)(
   3974   SURFOBJ  *pso,
   3975   SURFOBJ  *psoMask,
   3976   SURFOBJ  *psoColor,
   3977   XLATEOBJ  *pxlo,
   3978   LONG  xHot,
   3979   LONG  yHot,
   3980   LONG  x,
   3981   LONG  y,
   3982   RECTL  *prcl,
   3983   FLONG  fl);
   3984 
   3985 typedef WINBOOL
   3986 (APIENTRY *PFN_DrvStartBanding)(
   3987   SURFOBJ  *pso,
   3988   POINTL  *pptl);
   3989 
   3990 typedef WINBOOL
   3991 (APIENTRY *PFN_DrvStartDoc)(
   3992   SURFOBJ  *pso,
   3993   LPWSTR  pwszDocName,
   3994   DWORD  dwJobId);
   3995 
   3996 typedef WINBOOL
   3997 (APIENTRY *PFN_DrvStartPage)(
   3998   SURFOBJ  *pso);
   3999 
   4000 typedef WINBOOL
   4001 (APIENTRY *PFN_DrvStretchBlt)(
   4002   SURFOBJ  *psoDest,
   4003   SURFOBJ  *psoSrc,
   4004   SURFOBJ  *psoMask,
   4005   CLIPOBJ  *pco,
   4006   XLATEOBJ  *pxlo,
   4007   COLORADJUSTMENT  *pca,
   4008   POINTL  *pptlHTOrg,
   4009   RECTL  *prclDest,
   4010   RECTL  *prclSrc,
   4011   POINTL  *pptlMask,
   4012   ULONG  iMode);
   4013 
   4014 typedef WINBOOL
   4015 (APIENTRY *PFN_DrvStretchBltROP)(
   4016   SURFOBJ  *psoDest,
   4017   SURFOBJ  *psoSrc,
   4018   SURFOBJ  *psoMask,
   4019   CLIPOBJ  *pco,
   4020   XLATEOBJ  *pxlo,
   4021   COLORADJUSTMENT  *pca,
   4022   POINTL  *pptlHTOrg,
   4023   RECTL  *prclDest,
   4024   RECTL  *prclSrc,
   4025   POINTL  *pptlMask,
   4026   ULONG  iMode,
   4027   BRUSHOBJ  *pbo,
   4028   DWORD  rop4);
   4029 
   4030 typedef WINBOOL
   4031 (APIENTRY *PFN_DrvStrokeAndFillPath)(
   4032   SURFOBJ  *pso,
   4033   PATHOBJ  *ppo,
   4034   CLIPOBJ  *pco,
   4035   XFORMOBJ  *pxo,
   4036   BRUSHOBJ  *pboStroke,
   4037   LINEATTRS  *plineattrs,
   4038   BRUSHOBJ  *pboFill,
   4039   POINTL  *pptlBrushOrg,
   4040   MIX  mixFill,
   4041   FLONG  flOptions);
   4042 
   4043 typedef WINBOOL
   4044 (APIENTRY *PFN_DrvStrokePath)(
   4045   SURFOBJ  *pso,
   4046   PATHOBJ  *ppo,
   4047   CLIPOBJ  *pco,
   4048   XFORMOBJ  *pxo,
   4049   BRUSHOBJ  *pbo,
   4050   POINTL  *pptlBrushOrg,
   4051   LINEATTRS  *plineattrs,
   4052   MIX  mix);
   4053 
   4054 typedef WINBOOL
   4055 (APIENTRY *PFN_DrvSwapBuffers)(
   4056   SURFOBJ  *pso,
   4057   WNDOBJ  *pwo);
   4058 
   4059 typedef VOID
   4060 (APIENTRY *PFN_DrvSynchronize)(
   4061   DHPDEV  dhpdev,
   4062   RECTL  *prcl);
   4063 
   4064 typedef VOID
   4065 (APIENTRY *PFN_DrvSynchronizeSurface)(
   4066   SURFOBJ  *pso,
   4067   RECTL  *prcl,
   4068   FLONG  fl);
   4069 
   4070 typedef WINBOOL
   4071 (APIENTRY *PFN_DrvTextOut)(
   4072   SURFOBJ  *pso,
   4073   STROBJ  *pstro,
   4074   FONTOBJ  *pfo,
   4075   CLIPOBJ  *pco,
   4076   RECTL  *prclExtra,
   4077   RECTL  *prclOpaque,
   4078   BRUSHOBJ  *pboFore,
   4079   BRUSHOBJ  *pboOpaque,
   4080   POINTL  *pptlOrg,
   4081   MIX  mix);
   4082 
   4083 typedef WINBOOL
   4084 (APIENTRY *PFN_DrvTransparentBlt)(
   4085   SURFOBJ  *psoDst,
   4086   SURFOBJ  *psoSrc,
   4087   CLIPOBJ  *pco,
   4088   XLATEOBJ  *pxlo,
   4089   RECTL  *prclDst,
   4090   RECTL  *prclSrc,
   4091   ULONG  iTransColor,
   4092   ULONG  ulReserved);
   4093 
   4094 typedef WINBOOL
   4095 (APIENTRY *PFN_DrvUnloadFontFile)(
   4096   ULONG_PTR  iFile);
   4097 
   4098 
   4099 WIN32KAPI
   4100 VOID
   4101 APIENTRY
   4102 DrvDisableDirectDraw(
   4103   DHPDEV  dhpdev);
   4104 
   4105 typedef VOID
   4106 (APIENTRY *PFN_DrvDisableDirectDraw)(
   4107   DHPDEV  dhpdev);
   4108 
   4109 WIN32KAPI
   4110 WINBOOL
   4111 APIENTRY
   4112 DrvEnableDirectDraw(
   4113   DHPDEV  dhpdev,
   4114   DD_CALLBACKS  *pCallBacks,
   4115   DD_SURFACECALLBACKS  *pSurfaceCallBacks,
   4116   DD_PALETTECALLBACKS  *pPaletteCallBacks);
   4117 
   4118 typedef WINBOOL
   4119 (APIENTRY *PFN_DrvEnableDirectDraw)(
   4120   DHPDEV  dhpdev,
   4121   DD_CALLBACKS  *pCallBacks,
   4122   DD_SURFACECALLBACKS  *pSurfaceCallBacks,
   4123   DD_PALETTECALLBACKS  *pPaletteCallBacks);
   4124 
   4125 WIN32KAPI
   4126 WINBOOL
   4127 APIENTRY
   4128 DrvGetDirectDrawInfo(
   4129   DHPDEV  dhpdev,
   4130   DD_HALINFO  *pHalInfo,
   4131   DWORD  *pdwNumHeaps,
   4132   VIDEOMEMORY  *pvmList,
   4133   DWORD  *pdwNumFourCCCodes,
   4134   DWORD  *pdwFourCC);
   4135 
   4136 typedef WINBOOL
   4137 (APIENTRY *PFN_DrvGetDirectDrawInfo)(
   4138   DHPDEV  dhpdev,
   4139   DD_HALINFO  *pHalInfo,
   4140   DWORD  *pdwNumHeaps,
   4141   VIDEOMEMORY  *pvmList,
   4142   DWORD  *pdwNumFourCCCodes,
   4143   DWORD  *pdwFourCC);
   4144 
   4145 //DECLSPEC_DEPRECATED_DDK
   4146 WINBOOL
   4147 APIENTRY
   4148 DrvQuerySpoolType(
   4149   DHPDEV dhpdev,
   4150   LPWSTR pwchType);
   4151 
   4152 typedef WINBOOL
   4153 (APIENTRY *PFN_DrvQuerySpoolType)(
   4154   DHPDEV dhpdev,
   4155   LPWSTR pwchType);
   4156 
   4157 
   4158 #ifdef __cplusplus
   4159 }
   4160 #endif
   4161 
   4162 #endif /* defined __VIDEO_H__ */
   4163 
   4164 #endif /* _WINDDI_ */
   4165