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