ReactOS 0.4.15-dev-7906-g1b85a5f
winddi.h
Go to the documentation of this file.
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@users.sourceforge.net>
10 * Annotations by Timo Kreuzer <timo.kreuzer@reactos.org>
11 *
12 * THIS SOFTWARE IS NOT COPYRIGHTED
13 *
14 * This source code is offered for use in the public domain. You may
15 * use, modify or distribute it freely.
16 *
17 * This code is distributed in the hope that it will be useful but
18 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
19 * DISCLAIMED. This includes but is not limited to warranties of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 */
23
24#ifndef _WINDDI_
25#define _WINDDI_
26#pragma once
27
28#ifdef __VIDEO_H__
29#error video.h cannot be included with winddi.h
30#else
31
32//#include <winapifamily.h>
33#include <ddrawint.h>
34#include <d3dnthal.h>
35#include <specstrings.h>
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#ifndef DECLSPEC_IMPORT
42#define DECLSPEC_IMPORT __attribute__((dllimport))
43#endif
44
45#if defined(_ENGINE_EXPORT_)
46 #define ENGAPI
47#else
48 #define ENGAPI DECLSPEC_IMPORT
49#endif
50
51#ifndef _NO_DDRAWINT_NO_COM
52
53#if !defined(EXTERN_C)
54 #ifdef __cplusplus
55 #define EXTERN_C extern "C"
56 #define __EXTERN_C extern "C"
57 #else
58 #define EXTERN_C extern
59 #define __EXTERN_C
60 #endif
61#endif /* !defined(EXTERN_C) */
62
63#if !defined(DEFINE_GUID)
64 #ifdef INITGUID
65 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
66 __EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
67 #else /* !INITGUID */
68 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
69 EXTERN_C const GUID FAR name
70 #endif /* !INITGUID */
71#endif /* !defined(DEFINE_GUID) */
72
73#if !defined(DEFINE_GUIDEX)
74 #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
75#endif /* !defined(DEFINE_GUIDEX) */
76
77#if !defined(STATICGUIDOF)
78 #define STATICGUIDOF(guid) STATIC_##guid
79#endif /* !defined(STATICGUIDOF) */
80
81#if !defined(GUID_DEFINED)
82 #define GUID_DEFINED
83 typedef struct _GUID
84 {
90#endif /* !defined(GUID_DEFINED) */
91
92#if !defined(IsEqualGUID)
93 #define IsEqualGUID(guid1, guid2) \
94 (!memcmp((guid1), (guid2), sizeof(GUID)))
95#endif /* !defined(IsEqualGUID) */
96
97#ifndef IsEqualIID
98 #define IsEqualIID IsEqualGUID
99#endif /* !defined(IsEqualIID) */
100
101#endif /* !_NO_DDRAWINT_NO_COM */
102
103#define DDI_DRIVER_VERSION_NT4 0x00020000
104#define DDI_DRIVER_VERSION_SP3 0x00020003
105#define DDI_DRIVER_VERSION_NT5 0x00030000
106#define DDI_DRIVER_VERSION_NT5_01 0x00030100
107#define DDI_DRIVER_VERSION_NT5_01_SP1 0x00030101
108
109#define GDI_DRIVER_VERSION 0x4000
110
111#if defined(_X86_) && !defined(USERMODE_DRIVER) && !defined(BUILD_WOW6432)
112typedef DWORD FLOATL;
113#else
114typedef FLOAT FLOATL;
115#endif
116
117typedef SHORT FWORD;
118typedef LONG LDECI4;
119typedef ULONG IDENT;
120
123
124typedef LONG PTRDIFF;
126typedef LONG FIX;
127typedef FIX *PFIX;
128typedef ULONG ROP4;
129typedef ULONG MIX;
130typedef ULONG HGLYPH;
132
133typedef LONG_PTR (APIENTRY *PFN)();
134
142
144
145#ifndef _NTDDVDEO_
146typedef struct _ENG_EVENT *PEVENT;
147#endif
148
149#define OPENGL_CMD 4352
150#define OPENGL_GETINFO 4353
151#define WNDOBJ_SETUP 4354
152
153#define FD_ERROR 0xFFFFFFFF
154#define DDI_ERROR 0xFFFFFFFF
155
156#define HFF_INVALID ((HFF) 0)
157#define HFC_INVALID ((HFC) 0)
158#define HGLYPH_INVALID ((HGLYPH) -1)
159
160#define FP_ALTERNATEMODE 1
161#define FP_WINDINGMODE 2
162
163#define DN_ACCELERATION_LEVEL 1
164#define DN_DEVICE_ORIGIN 2
165#define DN_SLEEP_MODE 3
166#define DN_DRAWING_BEGIN 4
167#if (NTDDI_VERSION >= NTDDI_WIN8)
168#define DN_ASSOCIATE_WINDOW 5
169#define DN_COMPOSITION_CHANGED 6
170#define DN_DRAWING_BEGIN_APIBITMAP 7
171#define DN_SURFOBJ_DESTRUCTION 8
172#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
173
174#define SGI_EXTRASPACE 0
175
176#define DCR_SOLID 0
177#define DCR_DRIVER 1
178#define DCR_HALFTONE 2
179
180#define GX_IDENTITY 0
181#define GX_OFFSET 1
182#define GX_SCALE 2
183#define GX_GENERAL 3
184
185#define LTOFX(x) ((x) << 4)
186#define FXTOL(x) ((x) >> 4)
187#define FXTOLFLOOR(x) ((x) >> 4)
188#define FXTOLCEILING(x) ((x + 0x0F) >> 4)
189#define FXTOLROUND(x) ((((x) >> 3) + 1) >> 1)
190
191#define SIZEOFDV(cAxes) (offsetof(DESIGNVECTOR, dvValues) + (cAxes) * sizeof(LONG))
192#define SIZEOFAXIW(cAxes) (offsetof(AXESLISTW, axlAxisInfo) + (cAxes) * sizeof(AXISINFOW))
193#define SIZEOFAXIA(cAxes) (offsetof(AXESLISTA, axlAxisInfo) + (cAxes) * sizeof(AXISINFOA))
194
195typedef struct _POINTE {
199
200typedef union _FLOAT_LONG {
204
205typedef struct _POINTFIX {
209
210typedef struct _RECTFX {
216
217typedef struct _POINTQF {
221
222
223typedef struct _BLENDOBJ {
226
227/* BRUSHOBJ.flColorType */
228#define BR_DEVICE_ICM 0x01
229#define BR_HOST_ICM 0x02
230#define BR_CMYKCOLOR 0x04
231#define BR_ORIGCOLOR 0x08
232
233typedef struct _BRUSHOBJ {
238
239typedef struct _CIECHROMA {
244
245typedef struct _RUN {
249
250typedef struct _CLIPLINE {
257
258/* CLIPOBJ.iDComplexity constants */
259#define DC_TRIVIAL 0
260#define DC_RECT 1
261#define DC_COMPLEX 3
262
263/* CLIPOBJ.iFComplexity constants */
264#define FC_RECT 1
265#define FC_RECT4 2
266#define FC_COMPLEX 3
267
268/* CLIPOBJ.iMode constants */
269#define TC_RECTANGLES 0
270#define TC_PATHOBJ 2
271
272/* CLIPOBJ.fjOptions constants */
273#define OC_BANK_CLIP 1
274
275typedef struct _CLIPOBJ {
283
284typedef struct _COLORINFO {
302
303/* DEVHTADJDATA.DeviceFlags constants */
304#define DEVHTADJF_COLOR_DEVICE 0x00000001
305#define DEVHTADJF_ADDITIVE_DEVICE 0x00000002
306
307typedef struct _DEVHTINFO {
313
314typedef struct _DEVHTADJDATA {
321
322/* DEVINFO.flGraphicsCaps flags */
323#define GCAPS_BEZIERS 0x00000001
324#define GCAPS_GEOMETRICWIDE 0x00000002
325#define GCAPS_ALTERNATEFILL 0x00000004
326#define GCAPS_WINDINGFILL 0x00000008
327#define GCAPS_HALFTONE 0x00000010
328#define GCAPS_COLOR_DITHER 0x00000020
329#define GCAPS_HORIZSTRIKE 0x00000040
330#define GCAPS_VERTSTRIKE 0x00000080
331#define GCAPS_OPAQUERECT 0x00000100
332#define GCAPS_VECTORFONT 0x00000200
333#define GCAPS_MONO_DITHER 0x00000400
334#define GCAPS_ASYNCCHANGE 0x00000800
335#define GCAPS_ASYNCMOVE 0x00001000
336#define GCAPS_DONTJOURNAL 0x00002000
337#define GCAPS_DIRECTDRAW 0x00004000
338#define GCAPS_ARBRUSHOPAQUE 0x00008000
339#define GCAPS_PANNING 0x00010000
340#define GCAPS_HIGHRESTEXT 0x00040000
341#define GCAPS_PALMANAGED 0x00080000
342#define GCAPS_DITHERONREALIZE 0x00200000
343#define GCAPS_NO64BITMEMACCESS 0x00400000
344#define GCAPS_FORCEDITHER 0x00800000
345#define GCAPS_GRAY16 0x01000000
346#define GCAPS_ICM 0x02000000
347#define GCAPS_CMYKCOLOR 0x04000000
348#define GCAPS_LAYERED 0x08000000
349#define GCAPS_ARBRUSHTEXT 0x10000000
350#define GCAPS_SCREENPRECISION 0x20000000
351#define GCAPS_FONT_RASTERIZER 0x40000000
352#define GCAPS_NUP 0x80000000
353
354/* DEVINFO.iDitherFormat constants */
355#define BMF_1BPP 1L
356#define BMF_4BPP 2L
357#define BMF_8BPP 3L
358#define BMF_16BPP 4L
359#define BMF_24BPP 5L
360#define BMF_32BPP 6L
361#define BMF_4RLE 7L
362#define BMF_8RLE 8L
363#define BMF_JPEG 9L
364#define BMF_PNG 10L
365
366/* DEVINFO.flGraphicsCaps2 flags */
367#define GCAPS2_JPEGSRC 0x00000001
368#define GCAPS2_xxxx 0x00000002
369#define GCAPS2_PNGSRC 0x00000008
370#define GCAPS2_CHANGEGAMMARAMP 0x00000010
371#define GCAPS2_ALPHACURSOR 0x00000020
372#define GCAPS2_SYNCFLUSH 0x00000040
373#define GCAPS2_SYNCTIMER 0x00000080
374#define GCAPS2_ICD_MULTIMON 0x00000100
375#define GCAPS2_MOUSETRAILS 0x00000200
376#define GCAPS2_RESERVED1 0x00000400
377#if (NTDDI_VERSION >= NTDDI_VISTA)
378#define GCAPS2_EXCLUDELAYERED 0x00000800
379#define GCAPS2_INCLUDEAPIBITMAPS 0x00001000
380#define GCAPS2_SHOWHIDDENPOINTER 0x00002000
381#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
382#if (NTDDI_VERSION >= NTDDI_WIN7)
383#define GCAPS2_CLEARTYPE 0x00004000
384#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
385#if (NTDDI_VERSION >= NTDDI_WIN8)
386#define GCAPS2_ACC_DRIVER 0x00008000
387#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
388
389typedef struct _DEVINFO {
398 HPALETTE hpalDefault;
401
402struct _DRIVEROBJ;
403
404typedef BOOL
405(APIENTRY CALLBACK *FREEOBJPROC)(
406 _In_ struct _DRIVEROBJ *pDriverObj);
407
408typedef struct _DRIVEROBJ {
410 FREEOBJPROC pFreeProc;
411 HDEV hdev;
414
415/* DRVFN.iFunc constants */
416#define INDEX_DrvEnablePDEV 0L
417#define INDEX_DrvCompletePDEV 1L
418#define INDEX_DrvDisablePDEV 2L
419#define INDEX_DrvEnableSurface 3L
420#define INDEX_DrvDisableSurface 4L
421#define INDEX_DrvAssertMode 5L
422#define INDEX_DrvOffset 6L
423#define INDEX_DrvResetPDEV 7L
424#define INDEX_DrvDisableDriver 8L
425#define INDEX_DrvUnknown1 9L
426#define INDEX_DrvCreateDeviceBitmap 10L
427#define INDEX_DrvDeleteDeviceBitmap 11L
428#define INDEX_DrvRealizeBrush 12L
429#define INDEX_DrvDitherColor 13L
430#define INDEX_DrvStrokePath 14L
431#define INDEX_DrvFillPath 15L
432#define INDEX_DrvStrokeAndFillPath 16L
433#define INDEX_DrvPaint 17L
434#define INDEX_DrvBitBlt 18L
435#define INDEX_DrvCopyBits 19L
436#define INDEX_DrvStretchBlt 20L
437#define INDEX_DrvUnknown2 21L
438#define INDEX_DrvSetPalette 22L
439#define INDEX_DrvTextOut 23L
440#define INDEX_DrvEscape 24L
441#define INDEX_DrvDrawEscape 25L
442#define INDEX_DrvQueryFont 26L
443#define INDEX_DrvQueryFontTree 27L
444#define INDEX_DrvQueryFontData 28L
445#define INDEX_DrvSetPointerShape 29L
446#define INDEX_DrvMovePointer 30L
447#define INDEX_DrvLineTo 31L
448#define INDEX_DrvSendPage 32L
449#define INDEX_DrvStartPage 33L
450#define INDEX_DrvEndDoc 34L
451#define INDEX_DrvStartDoc 35L
452#define INDEX_DrvUnknown3 36L
453#define INDEX_DrvGetGlyphMode 37L
454#define INDEX_DrvSynchronize 38L
455#define INDEX_DrvUnknown4 39L
456#define INDEX_DrvSaveScreenBits 40L
457#define INDEX_DrvGetModes 41L
458#define INDEX_DrvFree 42L
459#define INDEX_DrvDestroyFont 43L
460#define INDEX_DrvQueryFontCaps 44L
461#define INDEX_DrvLoadFontFile 45L
462#define INDEX_DrvUnloadFontFile 46L
463#define INDEX_DrvFontManagement 47L
464#define INDEX_DrvQueryTrueTypeTable 48L
465#define INDEX_DrvQueryTrueTypeOutline 49L
466#define INDEX_DrvGetTrueTypeFile 50L
467#define INDEX_DrvQueryFontFile 51L
468#define INDEX_DrvMovePanning 52L
469#define INDEX_DrvQueryAdvanceWidths 53L
470#define INDEX_DrvSetPixelFormat 54L
471#define INDEX_DrvDescribePixelFormat 55L
472#define INDEX_DrvSwapBuffers 56L
473#define INDEX_DrvStartBanding 57L
474#define INDEX_DrvNextBand 58L
475#define INDEX_DrvGetDirectDrawInfo 59L
476#define INDEX_DrvEnableDirectDraw 60L
477#define INDEX_DrvDisableDirectDraw 61L
478#define INDEX_DrvQuerySpoolType 62L
479#define INDEX_DrvUnknown5 63L
480#define INDEX_DrvIcmCreateColorTransform 64L
481#define INDEX_DrvIcmDeleteColorTransform 65L
482#define INDEX_DrvIcmCheckBitmapBits 66L
483#define INDEX_DrvIcmSetDeviceGammaRamp 67L
484#define INDEX_DrvGradientFill 68L
485#define INDEX_DrvStretchBltROP 69L
486#define INDEX_DrvPlgBlt 70L
487#define INDEX_DrvAlphaBlend 71L
488#define INDEX_DrvSynthesizeFont 72L
489#define INDEX_DrvGetSynthesizedFontFiles 73L
490#define INDEX_DrvTransparentBlt 74L
491#define INDEX_DrvQueryPerBandInfo 75L
492#define INDEX_DrvQueryDeviceSupport 76L
493#define INDEX_DrvReserved1 77L
494#define INDEX_DrvReserved2 78L
495#define INDEX_DrvReserved3 79L
496#define INDEX_DrvReserved4 80L
497#define INDEX_DrvReserved5 81L
498#define INDEX_DrvReserved6 82L
499#define INDEX_DrvReserved7 83L
500#define INDEX_DrvReserved8 84L
501#define INDEX_DrvDeriveSurface 85L
502#define INDEX_DrvQueryGlyphAttrs 86L
503#define INDEX_DrvNotify 87L
504#define INDEX_DrvSynchronizeSurface 88L
505#define INDEX_DrvResetDevice 89L
506#define INDEX_DrvReserved9 90L
507#define INDEX_DrvReserved10 91L
508#define INDEX_DrvReserved11 92L
509#if (NTDDI_VERSION >= NTDDI_VISTA)
510#define INDEX_DrvRenderHint 93L
511#if (NTDDI_VERSION >= NTDDI_WIN7)
512#define INDEX_DrvCreateDeviceBitmapEx 94L
513#define INDEX_DrvDeleteDeviceBitmapEx 95L
514#define INDEX_DrvAssociateSharedSurface 96L
515#define INDEX_DrvSynchronizeRedirectionBitmaps 97L
516#define INDEX_DrvAccumulateD3DDirtyRect 98L
517#define INDEX_DrvStartDxInterop 99L
518#define INDEX_DrvEndDxInterop 100L
519#define INDEX_DrvLockDisplayArea 101L
520#define INDEX_DrvUnlockDisplayArea 102L
521#define INDEX_LAST 103L
522#else /* (NTDDI_VERSION >= NTDDI_WIN7) */
523#define INDEX_LAST 94L
524#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
525#else /* (NTDDI_VERSION >= NTDDI_VISTA) */
526#define INDEX_LAST 93L
527#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
528
529typedef struct _DRVFN {
533
534/* DRVENABLEDATA.iDriverVersion constants */
535#define DDI_DRIVER_VERSION_NT4 0x00020000
536#define DDI_DRIVER_VERSION_SP3 0x00020003
537#define DDI_DRIVER_VERSION_NT5 0x00030000
538#define DDI_DRIVER_VERSION_NT5_01 0x00030100
539#define DDI_DRIVER_VERSION_NT5_01_SP1 0x00030101
540
541typedef struct tagDRVENABLEDATA {
546
547/* Font file status values */
548#define FF_SIGNATURE_VERIFIED 0x00000001L
549#define FF_IGNORED_SIGNATURE 0x00000002L
550
551 /* Obsolete in Windows 2000 and later */
552typedef struct {
558
559typedef struct _ENGSAFESEMAPHORE {
563
564typedef struct _ENG_TIME_FIELDS {
566 _Field_range_(1,12) USHORT usMonth;
568 _Field_range_(0,23) USHORT usHour;
569 _Field_range_(0,59) USHORT usMinute;
570 _Field_range_(0,59) USHORT usSecond;
571 _Field_range_(0,999) USHORT usMilliseconds;
572 _Field_range_(0,6) USHORT usWeekday; // 0 == Sunday
574
577 RECTL arcl[1];
579
580typedef struct _FD_XFORM {
586
587/* FD_DEVICEMETRICS.flRealizedType constants */
588#define FDM_TYPE_BM_SIDE_CONST 0x00000001
589#define FDM_TYPE_MAXEXT_EQUAL_BM_SIDE 0x00000002
590#define FDM_TYPE_CHAR_INC_EQUAL_BM_BASE 0x00000004
591#define FDM_TYPE_ZERO_BEARINGS 0x00000008
592#define FDM_TYPE_CONST_BEARINGS 0x00000010
593
594typedef struct _FD_DEVICEMETRICS {
616 LONG alReserved[1];
618
619/* FD_GLYPHATTR.iMode constants */
620#define FO_ATTR_MODE_ROTATE 1
621
622typedef struct _FD_GLYPHATTR {
626 _Field_size_((cGlyphs+7)/8) BYTE aGlyphAttr[1];
628
629/* FD_GLYPHSET.flAccel */
630#define GS_UNICODE_HANDLES 0x00000001
631#define GS_8BIT_HANDLES 0x00000002
632#define GS_16BIT_HANDLES 0x00000004
633
634typedef struct _WCRUN {
639
640typedef struct _FD_GLYPHSET {
645 _Field_size_(cRuns) WCRUN awcrun[1];
647
648typedef struct _FD_KERNINGPAIR {
653
654 /* Obsolete in Windows 2000 and later */
655typedef struct _LIGATURE {
659 HGLYPH ahglyph[1];
661
662 /* Obsolete in Windows 2000 and later */
663typedef struct _FD_LIGATURE {
667 LIGATURE alig[1];
669
670#if defined(_X86_) && !defined(USERMODE_DRIVER)
671typedef struct _FLOATOBJ
672{
673 ULONG ul1;
674 ULONG ul2;
676#else
678#endif
679
680#ifndef USERMODE_DRIVER
681typedef struct tagFLOATOBJ_XFORM {
689#else
691#endif
692
693/* FONTDIFF.fsSelection */
694#define FM_SEL_ITALIC 0x0001
695#define FM_SEL_UNDERSCORE 0x0002
696#define FM_SEL_NEGATIVE 0x0004
697#define FM_SEL_OUTLINED 0x0008
698#define FM_SEL_STRIKEOUT 0x0010
699#define FM_SEL_BOLD 0x0020
700#define FM_SEL_REGULAR 0x0040
701
702typedef struct _FONTDIFF {
713
714typedef struct _FONTSIM {
719
720/* FONTINFO.flCaps constants */
721#define FO_DEVICE_FONT 1L
722#define FO_OUTLINE_CAPABLE 2L
723
724typedef struct _FONTINFO {
733
734/* FONTOBJ.flFontType constants */
735#define FO_TYPE_RASTER RASTER_FONTTYPE
736#define FO_TYPE_DEVICE DEVICE_FONTTYPE
737#define FO_TYPE_TRUETYPE TRUETYPE_FONTTYPE
738#define FO_TYPE_OPENTYPE OPENTYPE_FONTTYPE
739
740#define FO_SIM_BOLD 0x00002000
741#define FO_SIM_ITALIC 0x00004000
742#define FO_EM_HEIGHT 0x00008000
743#define FO_GRAY16 0x00010000
744#define FO_NOGRAY16 0x00020000
745#define FO_NOHINTS 0x00040000
746#define FO_NO_CHOICE 0x00080000
747#define FO_CFF 0x00100000
748#define FO_POSTSCRIPT 0x00200000
749#define FO_MULTIPLEMASTER 0x00400000
750#define FO_VERT_FACE 0x00800000
751#define FO_DBCS_FONT 0X01000000
752#define FO_NOCLEARTYPE 0x02000000
753#define FO_CLEARTYPE_X 0x10000000
754#define FO_CLEARTYPE_Y 0x20000000
755#define FO_CLEARTYPENATURAL_X 0x40000000
756
757#define FD_NEGATIVE_FONT 1L /* Obsolete in Windows 2000 and later */
758#define FO_DEVICE_FONT 1L
759#define FO_OUTLINE_CAPABLE 2L
760
761typedef struct _FONTOBJ {
773
774typedef struct _GAMMARAMP {
775 WORD Red[256];
777 WORD Blue[256];
779
780/* GDIINFO.ulPrimaryOrder constants */
781#define PRIMARY_ORDER_ABC 0
782#define PRIMARY_ORDER_ACB 1
783#define PRIMARY_ORDER_BAC 2
784#define PRIMARY_ORDER_BCA 3
785#define PRIMARY_ORDER_CBA 4
786#define PRIMARY_ORDER_CAB 5
787
788/* GDIINFO.ulHTPatternSize constants */
789#define HT_PATSIZE_2x2 0
790#define HT_PATSIZE_2x2_M 1
791#define HT_PATSIZE_4x4 2
792#define HT_PATSIZE_4x4_M 3
793#define HT_PATSIZE_6x6 4
794#define HT_PATSIZE_6x6_M 5
795#define HT_PATSIZE_8x8 6
796#define HT_PATSIZE_8x8_M 7
797#define HT_PATSIZE_10x10 8
798#define HT_PATSIZE_10x10_M 9
799#define HT_PATSIZE_12x12 10
800#define HT_PATSIZE_12x12_M 11
801#define HT_PATSIZE_14x14 12
802#define HT_PATSIZE_14x14_M 13
803#define HT_PATSIZE_16x16 14
804#define HT_PATSIZE_16x16_M 15
805#define HT_PATSIZE_SUPERCELL 16
806#define HT_PATSIZE_SUPERCELL_M 17
807#define HT_PATSIZE_USER 18
808#define HT_PATSIZE_MAX_INDEX HT_PATSIZE_USER
809#define HT_PATSIZE_DEFAULT HT_PATSIZE_SUPERCELL_M
810#define HT_USERPAT_CX_MIN 4
811#define HT_USERPAT_CX_MAX 256
812#define HT_USERPAT_CY_MIN 4
813#define HT_USERPAT_CY_MAX 256
814
815/* GDIINFO.ulHTOutputFormat constants */
816#define HT_FORMAT_1BPP 0
817#define HT_FORMAT_4BPP 2
818#define HT_FORMAT_4BPP_IRGB 3
819#define HT_FORMAT_8BPP 4
820#define HT_FORMAT_16BPP 5
821#define HT_FORMAT_24BPP 6
822#define HT_FORMAT_32BPP 7
823
824/* GDIINFO.flHTFlags */
825#define HT_FLAG_SQUARE_DEVICE_PEL 0x00000001
826#define HT_FLAG_HAS_BLACK_DYE 0x00000002
827#define HT_FLAG_ADDITIVE_PRIMS 0x00000004
828#define HT_FLAG_USE_8BPP_BITMASK 0x00000008
829#define HT_FLAG_INK_HIGH_ABSORPTION 0x00000010
830#define HT_FLAG_INK_ABSORPTION_INDICES 0x00000060
831#define HT_FLAG_DO_DEVCLR_XFORM 0x00000080
832#define HT_FLAG_OUTPUT_CMY 0x00000100
833#define HT_FLAG_PRINT_DRAFT_MODE 0x00000200
834#define HT_FLAG_INVERT_8BPP_BITMASK_IDX 0x00000400
835#define HT_FLAG_8BPP_CMY332_MASK 0xFF000000
836
837#define MAKE_CMYMASK_BYTE(c,m,y) ((BYTE)(((BYTE)(c) & 0x07) << 5) \
838 |(BYTE)(((BYTE)(m) & 0x07) << 2) \
839 |(BYTE)((BYTE)(y) & 0x03))
840
841#define MAKE_CMY332_MASK(c,m,y) ((DWORD)(((DWORD)(c) & 0x07) << 29)\
842 |(DWORD)(((DWORD)(m) & 0x07) << 26)\
843 |(DWORD)(((DWORD)(y) & 0x03) << 24))
844
845/* GDIINFO.flHTFlags constants */
846#define HT_FLAG_INK_ABSORPTION_IDX0 0x00000000
847#define HT_FLAG_INK_ABSORPTION_IDX1 0x00000020
848#define HT_FLAG_INK_ABSORPTION_IDX2 0x00000040
849#define HT_FLAG_INK_ABSORPTION_IDX3 0x00000060
850
851#define HT_FLAG_HIGHEST_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
852 |HT_FLAG_INK_ABSORPTION_IDX3)
853#define HT_FLAG_HIGHER_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
854 |HT_FLAG_INK_ABSORPTION_IDX2)
855#define HT_FLAG_HIGH_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
856 |HT_FLAG_INK_ABSORPTION_IDX1)
857#define HT_FLAG_NORMAL_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX0
858#define HT_FLAG_LOW_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX1
859#define HT_FLAG_LOWER_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX2
860#define HT_FLAG_LOWEST_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX3
861
862#define HT_BITMASKPALRGB (DWORD)'0BGR'
863#define HT_SET_BITMASKPAL2RGB(pPal) (*((LPDWORD)(pPal)) = HT_BITMASKPALRGB)
864#define HT_IS_BITMASKPALRGB(pPal) (*((LPDWORD)(pPal)) == (DWORD)0)
865
866/* GDIINFO.ulPhysicalPixelCharacteristics constants */
867#define PPC_DEFAULT 0x0
868#define PPC_UNDEFINED 0x1
869#define PPC_RGB_ORDER_VERTICAL_STRIPES 0x2
870#define PPC_BGR_ORDER_VERTICAL_STRIPES 0x3
871#define PPC_RGB_ORDER_HORIZONTAL_STRIPES 0x4
872#define PPC_BGR_ORDER_HORIZONTAL_STRIPES 0x5
873
874#define PPG_DEFAULT 0
875#define PPG_SRGB 1
876
877typedef struct _GDIINFO {
924
925/* PATHDATA.flags constants */
926#define PD_BEGINSUBPATH 0x00000001
927#define PD_ENDSUBPATH 0x00000002
928#define PD_RESETSTYLE 0x00000004
929#define PD_CLOSEFIGURE 0x00000008
930#define PD_BEZIERS 0x00000010
931#define PD_ALL (PD_BEGINSUBPATH \
932 |PD_ENDSUBPATH \
933 |PD_RESETSTYLE \
934 |PD_CLOSEFIGURE \
935 PD_BEZIERS)
936
937typedef struct _PATHDATA {
942
943/* PATHOBJ.fl constants */
944#define PO_BEZIERS 0x00000001
945#define PO_ELLIPSE 0x00000002
946#define PO_ALL_INTEGERS 0x00000004
947#define PO_ENUM_AS_INTEGERS 0x00000008
948#if (NTDDI_VERSION >= NTDDI_WIN7)
949#define PO_WIDENED 0x00000010
950#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
951
952typedef struct _PATHOBJ {
956
957typedef BYTE GAMMA_TABLES[2][256];
958
959typedef struct _GLYPHBITS {
962 BYTE aj[1];
964
965typedef union _GLYPHDEF {
969
970typedef struct _GLYPHPOS {
975
976typedef struct _GLYPHDATA {
987
988typedef struct _IFIEXTRA {
994 ULONG aulReserved[1];
996
997/* IFIMETRICS constants */
998
999#define FM_VERSION_NUMBER 0x0
1000
1001/* IFIMETRICS.fsType constants */
1002#define FM_TYPE_LICENSED 0x2
1003#define FM_READONLY_EMBED 0x4
1004#define FM_EDITABLE_EMBED 0x8
1005#define FM_NO_EMBEDDING FM_TYPE_LICENSED
1006
1007/* IFIMETRICS.flInfo constants */
1008#define FM_INFO_TECH_TRUETYPE 0x00000001
1009#define FM_INFO_TECH_BITMAP 0x00000002
1010#define FM_INFO_TECH_STROKE 0x00000004
1011#define FM_INFO_TECH_OUTLINE_NOT_TRUETYPE 0x00000008
1012#define FM_INFO_ARB_XFORMS 0x00000010
1013#define FM_INFO_1BPP 0x00000020
1014#define FM_INFO_4BPP 0x00000040
1015#define FM_INFO_8BPP 0x00000080
1016#define FM_INFO_16BPP 0x00000100
1017#define FM_INFO_24BPP 0x00000200
1018#define FM_INFO_32BPP 0x00000400
1019#define FM_INFO_INTEGER_WIDTH 0x00000800
1020#define FM_INFO_CONSTANT_WIDTH 0x00001000
1021#define FM_INFO_NOT_CONTIGUOUS 0x00002000
1022#define FM_INFO_TECH_MM 0x00004000
1023#define FM_INFO_RETURNS_OUTLINES 0x00008000
1024#define FM_INFO_RETURNS_STROKES 0x00010000
1025#define FM_INFO_RETURNS_BITMAPS 0x00020000
1026#define FM_INFO_DSIG 0x00040000
1027#define FM_INFO_RIGHT_HANDED 0x00080000
1028#define FM_INFO_INTEGRAL_SCALING 0x00100000
1029#define FM_INFO_90DEGREE_ROTATIONS 0x00200000
1030#define FM_INFO_OPTICALLY_FIXED_PITCH 0x00400000
1031#define FM_INFO_DO_NOT_ENUMERATE 0x00800000
1032#define FM_INFO_ISOTROPIC_SCALING_ONLY 0x01000000
1033#define FM_INFO_ANISOTROPIC_SCALING_ONLY 0x02000000
1034#define FM_INFO_TECH_CFF 0x04000000
1035#define FM_INFO_FAMILY_EQUIV 0x08000000
1036#define FM_INFO_DBCS_FIXED_PITCH 0x10000000
1037#define FM_INFO_NONNEGATIVE_AC 0x20000000
1038#define FM_INFO_IGNORE_TC_RA_ABLE 0x40000000
1039#define FM_INFO_TECH_TYPE1 0x80000000
1040
1041#define MAXCHARSETS 16 /* Obsolete in Windows 2000 and later */
1042
1043/* IFIMETRICS.ulPanoseCulture constants */
1044#define FM_PANOSE_CULTURE_LATIN 0x0
1045
1046typedef struct _IFIMETRICS {
1102 BYTE achVendId[4];
1106#if defined(_WIN64)
1107 PVOID Align;
1108#endif
1110
1111/* LINEATTRS.fl */
1112#define LA_GEOMETRIC 0x00000001
1113#define LA_ALTERNATE 0x00000002
1114#define LA_STARTGAP 0x00000004
1115#define LA_STYLED 0x00000008
1116
1117/* LINEATTRS.iJoin */
1118#define JOIN_ROUND 0L
1119#define JOIN_BEVEL 1L
1120#define JOIN_MITER 2L
1121
1122/* LINEATTRS.iEndCap */
1123#define ENDCAP_ROUND 0L
1124#define ENDCAP_SQUARE 1L
1125#define ENDCAP_BUTT 2L
1126
1127typedef struct _LINEATTRS {
1137
1138typedef struct _PALOBJ {
1141
1142typedef struct _PERBANDINFO {
1148
1149/* STROBJ.flAccel constants */
1150#define SO_FLAG_DEFAULT_PLACEMENT 0x00000001
1151#define SO_HORIZONTAL 0x00000002
1152#define SO_VERTICAL 0x00000004
1153#define SO_REVERSED 0x00000008
1154#define SO_ZERO_BEARINGS 0x00000010
1155#define SO_CHAR_INC_EQUAL_BM_BASE 0x00000020
1156#define SO_MAXEXT_EQUAL_BM_SIDE 0x00000040
1157#define SO_DO_NOT_SUBSTITUTE_DEVICE_FONT 0x00000080
1158#define SO_GLYPHINDEX_TEXTOUT 0x00000100
1159#define SO_ESC_NOT_ORIENT 0x00000200
1160#define SO_DXDY 0x00000400
1161#define SO_CHARACTER_EXTRA 0x00000800
1162#define SO_BREAK_EXTRA 0x00001000
1163
1164typedef struct _STROBJ {
1172
1173
1174/* SURFOBJ.iType constants */
1175#define STYPE_BITMAP 0L
1176#define STYPE_DEVICE 1L
1177#define STYPE_DEVBITMAP 3L
1178
1179/* SURFOBJ.fjBitmap constants */
1180#define BMF_TOPDOWN 0x0001
1181#define BMF_NOZEROINIT 0x0002
1182#define BMF_DONTCACHE 0x0004
1183#define BMF_USERMEM 0x0008
1184#define BMF_KMSECTION 0x0010
1185#define BMF_NOTSYSMEM 0x0020
1186#define BMF_WINDOW_BLT 0x0040
1187#define BMF_UMPDMEM 0x0080
1188#if (NTDDI_VERSION >= NTDDI_WIN7)
1189#define BMF_TEMP_ALPHA 0x0100
1190#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
1191#if (NTDDI_VERSION >= NTDDI_WIN8)
1192#define BMF_ACC_NOTIFY 0x8000
1193#define BMF_RMT_ENTER 0x4000
1194#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
1195
1196#if (NTDDI_VERSION >= NTDDI_WIN8)
1197#define BMF_RESERVED 0x3E00
1198#elif (NTDDI_VERSION >= NTDDI_WIN7)
1199#define BMF_RESERVED 0xFE00
1200#else
1201#define BMF_RESERVED 0xFF00
1202#endif
1203
1204typedef struct _SURFOBJ {
1205 DHSURF dhsurf;
1208 HDEV hdev;
1219
1220typedef struct _TYPE1_FONT {
1225
1226typedef struct _WNDOBJ {
1232
1233typedef struct _XFORML {
1241
1242typedef struct _XFORMOBJ {
1245
1246/* XLATEOBJ.flXlate constants */
1247#define XO_TRIVIAL 0x00000001
1248#define XO_TABLE 0x00000002
1249#define XO_TO_MONO 0x00000004
1250#define XO_FROM_CMYK 0x00000008
1251#define XO_DEVICE_ICM 0x00000010
1252#define XO_HOST_ICM 0x00000020
1253
1254typedef struct _XLATEOBJ {
1262
1263/* WNDOBJCHANGEPROC.fl constants */
1264#define WOC_RGN_CLIENT_DELTA 0x00000001
1265#define WOC_RGN_CLIENT 0x00000002
1266#define WOC_RGN_SURFACE_DELTA 0x00000004
1267#define WOC_RGN_SURFACE 0x00000008
1268#define WOC_CHANGED 0x00000010
1269#define WOC_DELETE 0x00000020
1270#define WOC_DRAWN 0x00000040
1271#define WOC_SPRITE_OVERLAP 0x00000080
1272#define WOC_SPRITE_NO_OVERLAP 0x00000100
1273#if (NTDDI_VERSION >= NTDDI_VISTA)
1274#define WOC_RGN_SPRITE 0x00000200
1275#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
1276
1277typedef VOID (APIENTRY CALLBACK *WNDOBJCHANGEPROC)(
1278 _In_ WNDOBJ *pwo,
1280
1281
1282ENGAPI
1283HANDLE
1286 _In_ BRUSHOBJ *pbo);
1287
1289ENGAPI
1290PVOID
1293 _In_ BRUSHOBJ *pbo,
1294 _In_ ULONG cj);
1295
1296ENGAPI
1297PVOID
1300 _In_ BRUSHOBJ *pbo);
1301
1302ENGAPI
1303ULONG
1306 _In_ BRUSHOBJ *pbo);
1307
1308ENGAPI
1309BOOL
1312 _In_ CLIPOBJ *pco,
1313 _In_ ULONG cj,
1314 _Out_bytecap_(cj) ULONG *pul);
1315
1316/* CLIPOBJ_cEnumStart.iType constants */
1317#define CT_RECTANGLES 0L
1318
1319/* CLIPOBJ_cEnumStart.iDirection constants */
1320#define CD_RIGHTDOWN 0x00000000
1321#define CD_LEFTDOWN 0x00000001
1322#define CD_LEFTWARDS 0x00000001
1323#define CD_RIGHTUP 0x00000002
1324#define CD_UPWARDS 0x00000002
1325#define CD_LEFTUP 0x00000003
1326#define CD_ANY 0x00000004
1327
1328ENGAPI
1329ULONG
1333 _In_ BOOL bAll,
1335 _In_ ULONG iDirection,
1336 _In_ ULONG cLimit);
1337
1338ENGAPI
1339PATHOBJ*
1342 _In_ CLIPOBJ *pco);
1343
1344#if (NTDDI_VERSION >= NTDDI_VISTA)
1345ENGAPI
1346HANDLE
1349 _In_ CLIPOBJ* pco);
1350#endif
1351
1352ENGAPI
1353VOID
1356 _Inout_ HSEMAPHORE hsem);
1357
1358#define FL_ZERO_MEMORY 0x00000001
1359#define FL_NONPAGED_MEMORY 0x00000002
1360#if (NTDDI_VERSION >= NTDDI_WIN7)
1361#define FL_NON_SESSION 0x00000004
1362#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
1363
1364#ifdef USERMODE_DRIVER
1365
1366#define EngAllocMem(fl, cj, tag) ((PVOID)GlobalAlloc(((fl) & FL_ZERO_MEMORY) ? GPTR : GMEM_FIXED, cj))
1367#define EngAllocPrivateUserMem(psl, cj, tag) ((PVOID)GlobalAlloc(GMEM_FIXED, cj))
1368#define EngAllocUserMem(cj, tag) ((PVOID)GlobalAlloc(GMEM_FIXED, cj))
1369
1370#else /* !USERMODE_DRIVER */
1371
1376ENGAPI
1377PVOID
1380 _In_ ULONG fl,
1382 _In_ ULONG ulTag);
1383
1386__drv_allocatesMem(PrivateUserMem)
1387ENGAPI
1388PVOID
1390EngAllocPrivateUserMem(
1393 _In_ ULONG ulTag);
1394
1397__drv_allocatesMem(UserMem)
1398ENGAPI
1399PVOID
1401EngAllocUserMem(
1403 _In_ ULONG ulTag);
1404
1405#endif /* !USERMODE_DRIVER */
1406
1407ENGAPI
1408BOOL
1411 _Inout_ SURFOBJ *psoDest,
1418
1419/* EngAssociateSurface.flHooks constants */
1420#define HOOK_BITBLT 0x00000001
1421#define HOOK_STRETCHBLT 0x00000002
1422#define HOOK_PLGBLT 0x00000004
1423#define HOOK_TEXTOUT 0x00000008
1424#define HOOK_PAINT 0x00000010
1425#define HOOK_STROKEPATH 0x00000020
1426#define HOOK_FILLPATH 0x00000040
1427#define HOOK_STROKEANDFILLPATH 0x00000080
1428#define HOOK_LINETO 0x00000100
1429#define HOOK_COPYBITS 0x00000400
1430#define HOOK_MOVEPANNING 0x00000800
1431#define HOOK_SYNCHRONIZE 0x00001000
1432#define HOOK_STRETCHBLTROP 0x00002000
1433#define HOOK_SYNCHRONIZEACCESS 0x00004000
1434#define HOOK_TRANSPARENTBLT 0x00008000
1435#define HOOK_ALPHABLEND 0x00010000
1436#define HOOK_GRADIENTFILL 0x00020000
1437#if (NTDDI_VERSION >= NTDDI_VISTA)
1438#define HOOK_FLAGS 0x0003b5ef
1439#else
1440#define HOOK_FLAGS 0x0003b5ff
1441#endif
1442
1443ENGAPI
1444BOOL
1447 _In_ HSURF hsurf,
1448 _In_ HDEV hdev,
1449 _In_ FLONG flHooks);
1450
1451ENGAPI
1452BOOL
1454EngBitBlt(
1455 _Inout_ SURFOBJ *psoTrg,
1465 _In_ ROP4 rop4);
1466
1467ENGAPI
1468BOOL
1471 _In_ SURFOBJ *pso);
1472
1473ENGAPI
1474VOID
1477 _In_ PEVENT pEvent);
1478
1479_Success_(return != 0)
1480ENGAPI
1484 _In_ INT nCodePage,
1487
1488/* EngControlSprites.fl constants */
1489#define ECS_TEARDOWN 0x00000001
1490#define ECS_REDRAW 0x00000002
1491
1492ENGAPI
1493BOOL
1497 _In_ FLONG fl);
1498
1499ENGAPI
1500BOOL
1503 _In_ SURFOBJ *psoDest,
1507 _In_ __in_data_source(USER_MODE) RECTL *prclDest,
1508 _In_ __in_data_source(USER_MODE) POINTL *pptlSrc);
1509
1510ENGAPI
1511HBITMAP
1514 _In_ SIZEL sizl,
1515 _In_ LONG lWidth,
1517 _In_ FLONG fl,
1518 _In_opt_ PVOID pvBits);
1519
1520ENGAPI
1521CLIPOBJ*
1524
1526ENGAPI
1527HBITMAP
1530 _In_ DHSURF dhsurf,
1531 _In_ SIZEL sizl,
1532 _In_ ULONG iFormatCompat);
1533
1535ENGAPI
1536HSURF
1539 _In_ DHSURF dhsurf,
1540 _In_ SIZEL sizl,
1541 _In_ ULONG iFormatCompat);
1542
1544ENGAPI
1545HDRVOBJ
1548 _In_ PVOID pvObj,
1549 _In_opt_ FREEOBJPROC pFreeObjProc,
1550 _In_ HDEV hdev);
1551
1553_Success_(return != FALSE)
1554ENGAPI
1555BOOL
1557EngCreateEvent(
1558 _Outptr_ PEVENT *ppEvent);
1559
1560/* EngCreatePalette.iMode constants */
1561#define PAL_INDEXED 0x00000001
1562#define PAL_BITFIELDS 0x00000002
1563#define PAL_RGB 0x00000004
1564#define PAL_BGR 0x00000008
1565#define PAL_CMYK 0x00000010
1566
1568ENGAPI
1569HPALETTE
1573 _In_ ULONG cColors,
1574 _In_ ULONG *pulColors,
1575 _In_ FLONG flRed,
1576 _In_ FLONG flGreen,
1577 _In_ FLONG flBlue);
1578
1579ENGAPI
1580PATHOBJ*
1583
1586ENGAPI
1590 VOID);
1591
1592/* EngCreateWnd.fl constants */
1593#define WO_RGN_CLIENT_DELTA 0x00000001
1594#define WO_RGN_CLIENT 0x00000002
1595#define WO_RGN_SURFACE_DELTA 0x00000004
1596#define WO_RGN_SURFACE 0x00000008
1597#define WO_RGN_UPDATE_ALL 0x00000010
1598#define WO_RGN_WINDOW 0x00000020
1599#define WO_DRAW_NOTIFY 0x00000040
1600#define WO_SPRITE_NOTIFY 0x00000080
1601#define WO_RGN_DESKTOP_COORD 0x00000100
1602#if (NTDDI_VERSION >= NTDDI_VISTA)
1603#define WO_RGN_SPRITE 0x00000200
1604#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
1605
1607ENGAPI
1608WNDOBJ*
1611 _In_ SURFOBJ *pso,
1612 _In_ HWND hwnd,
1613 _In_ WNDOBJCHANGEPROC pfn,
1614 _In_ FLONG fl,
1616
1618ENGAPI
1619VOID
1622
1623ENGAPI
1624VOID
1627 _In_z_ PCHAR StandardPrefix,
1628 _In_z_ PCHAR DebugMessage,
1629 _In_ va_list ap);
1630
1631ENGAPI
1632VOID
1636
1637ENGAPI
1638BOOL
1641 _In_ _Post_ptr_invalid_ HDRVOBJ hdo,
1642 _In_ BOOL bCallBack,
1643 _In_ BOOL bLocked);
1644
1645ENGAPI
1646BOOL
1650
1651ENGAPI
1652BOOL
1655 _In_ LPWSTR pwszFileName);
1656
1657ENGAPI
1658BOOL
1661 _In_ _Post_ptr_invalid_ HPALETTE hpal);
1662
1663ENGAPI
1664VOID
1668
1669ENGAPI
1670VOID
1674
1676ENGAPI
1677VOID
1681
1682ENGAPI
1683BOOL
1687
1688ENGAPI
1689VOID
1693
1694_Success_(return==0)
1695ENGAPI
1696DWORD
1698EngDeviceIoControl(
1699 _In_ HANDLE hDevice,
1706
1707#define DM_DEFAULT 0x00000001
1708#define DM_MONOCHROME 0x00000002
1709
1710ENGAPI
1711ULONG
1714 _In_ HDEV hdev,
1716 _In_ ULONG rgb,
1719 ULONG *pul);
1720
1721/* Obsolete in Windows 2000 and later */
1722ENGAPI
1723HRESULT
1726 _In_ ULONG ulIoctl,
1728 _In_ ULONG ulBufferSize);
1729
1730#ifdef USERMODE_DRIVER
1731#define EngEnumForms EnumForms
1732#else /* !USERMODE_DRIVER */
1733ENGAPI
1734BOOL
1737 _In_ HANDLE hPrinter,
1739 _Out_writes_bytes_opt_(cbBuf) LPBYTE pForm,
1740 _In_ DWORD cbBuf,
1742 _Out_ LPDWORD pcReturned);
1743#endif /* !USERMODE_DRIVER */
1744
1745ENGAPI
1746BOOL
1749 _In_ SURFOBJ *pso,
1750 _In_ RECTL *prcl,
1751 _In_ ULONG iColor);
1752
1753ENGAPI
1754BOOL
1758 _In_ PATHOBJ *ppo,
1759 _In_ CLIPOBJ *pco,
1760 _In_ BRUSHOBJ *pbo,
1762 _In_ MIX mix,
1764
1765#ifdef USERMODE_DRIVER
1766#define EngFindImageProcAddress(h, procname) ((PVOID) GetProcAddress(h, procname))
1767#else /* !USERMODE_DRIVER */
1768ENGAPI
1769PVOID
1773 _In_ LPSTR lpProcName);
1774#endif /* !USERMODE_DRIVER */
1775
1776ENGAPI
1777PVOID
1780 _In_ HANDLE h,
1781 _In_ INT iName,
1782 _In_ INT iType,
1784
1787ENGAPI
1788PVOID
1790EngFntCacheAlloc(
1792 _In_ ULONG cjSize);
1793
1794/* EngFntCacheFault.iFaultMode constants */
1795#define ENG_FNT_CACHE_READ_FAULT 0x00000001
1796#define ENG_FNT_CACHE_WRITE_FAULT 0x00000002
1797
1798ENGAPI
1799VOID
1803 _In_ ULONG iFaultMode);
1804
1805ENGAPI
1806PVOID
1809 _In_ ULONG FastCheckSum,
1811
1812#ifdef USERMODE_DRIVER
1813
1814#define EngFreeMem(p) GlobalFree((HGLOBAL) (p))
1815#define EngFreePrivateUserMem( psl, p) GlobalFree((HGLOBAL) (p))
1816#define EngFreeUserMem(p) GlobalFree((HGLOBAL) (p))
1817
1818#else /* !USERMODE_DRIVER */
1819
1820ENGAPI
1821VOID
1825
1826ENGAPI
1827VOID
1831 _Pre_notnull_ __drv_freesMem(PrivateUserMem) PVOID pv);
1832
1833ENGAPI
1834VOID
1837 _Pre_notnull_ __drv_freesMem(UserMem) PVOID pv);
1838
1839#endif /* !USERMODE_DRIVER */
1840
1841ENGAPI
1842VOID
1846
1847
1848ENGAPI
1849VOID
1854
1855ENGAPI
1856HANDLE
1859
1860ENGAPI
1861HANDLE
1864
1866ENGAPI
1867LPWSTR
1870 _In_ HDEV hdev);
1871
1872ENGAPI
1873BOOL
1876 _In_ HANDLE h,
1877 _Out_ LARGE_INTEGER *pChangeTime);
1878
1879ENGAPI
1880BOOL
1883 _In_ HANDLE h,
1884 _Out_ WCHAR (*pDest)[MAX_PATH+1]);
1885
1886#ifdef USERMODE_DRIVER
1887#define EngGetForm GetForm
1888#define EngGetLastError GetLastError
1889#define EngGetPrinter GetPrinter
1890#define EngGetPrinterData GetPrinterData
1891#else /* !USERMODE_DRIVER */
1892ENGAPI
1893BOOL
1896 _In_ HANDLE hPrinter,
1897 _In_ LPWSTR pFormName,
1899 _In_reads_bytes_opt_(cbBuf) LPBYTE pForm,
1900 _In_ DWORD cbBuf,
1902
1903ENGAPI
1904ULONG
1907
1908ENGAPI
1909BOOL
1912 _In_ HANDLE hPrinter,
1913 _In_ DWORD dwLevel,
1914 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrinter,
1915 _In_ DWORD cbBuf,
1917
1918ENGAPI
1919DWORD
1922 _In_ HANDLE hPrinter,
1923 _In_ LPWSTR pValueName,
1924 _Out_opt_ LPDWORD pType,
1927 _Out_ LPDWORD pcjNeeded);
1928#endif /* !USERMODE_DRIVER */
1929
1930ENGAPI
1931LPWSTR
1934 _In_ HDEV hdev);
1935
1936#ifdef USERMODE_DRIVER
1937#define EngGetPrinterDriver GetPrinterDriver
1938#else /* !USERMODE_DRIVER */
1939ENGAPI
1940BOOL
1943 _In_ HANDLE hPrinter,
1944 _In_opt_ LPWSTR pEnvironment,
1945 _In_ DWORD dwLevel,
1946 _Out_writes_bytes_opt_(cjBufSize) BYTE *lpbDrvInfo,
1947 _In_ DWORD cjBufSize,
1948 _Out_ DWORD *pcjNeeded);
1949#endif /* !USERMODE_DRIVER */
1950
1951ENGAPI
1952HANDLE
1955
1956ENGAPI
1957BOOL
1960 _In_ HDEV hdev,
1961 _Out_writes_bytes_opt_(cjType1Buffer) TYPE1_FONT *pType1Buffer,
1962 _In_ ULONG cjType1Buffer,
1963 _Out_ PULONG pulLocalFonts,
1964 _Out_ PULONG pulRemoteFonts,
1965 _Out_ LARGE_INTEGER *pLastModified);
1966
1967ENGAPI
1968BOOL
1971 _Inout_ SURFOBJ *psoDest,
1972 _In_ CLIPOBJ *pco,
1980 _In_ ULONG ulMode);
1981
1982/* EngHangNotification return values */
1983#define EHN_RESTORED 0x00000000
1984#define EHN_ERROR 0x00000001
1985
1986ENGAPI
1987ULONG
1990 _In_ HDEV hDev,
1992
1993ENGAPI
1994BOOL
1997 _Out_ ENGSAFESEMAPHORE *pssem);
1998
1999ENGAPI
2000BOOL
2003 _In_ HSEMAPHORE hsem);
2004
2005ENGAPI
2006BOOL
2009 _In_ HSEMAPHORE hsem);
2010
2011ENGAPI
2012BOOL
2014EngLineTo(
2016 _In_ CLIPOBJ *pco,
2017 _In_ BRUSHOBJ *pbo,
2018 _In_ LONG x1,
2019 _In_ LONG y1,
2020 _In_ LONG x2,
2021 _In_ LONG y2,
2023 _In_ MIX mix);
2024
2025#ifdef USERMODE_DRIVER
2026#define EngLoadImage(pwszDriver) ((HANDLE)LoadLibraryW(pwszDriver))
2027#else /* !USERMODE_DRIVER */
2028ENGAPI
2029HANDLE
2032 _In_ LPWSTR pwszDriver);
2033#endif /* !USERMODE_DRIVER */
2034
2035ENGAPI
2036HANDLE
2039 _In_ LPWSTR pwsz);
2040
2041ENGAPI
2042HANDLE
2045 _In_ LPWSTR pwsz,
2046 _In_ ULONG cjSizeOfModule);
2047
2048ENGAPI
2052 _In_ HANDLE hSurface);
2053
2054ENGAPI
2055DRIVEROBJ*
2058 _In_ HDRVOBJ hdo);
2059
2060ENGAPI
2061SURFOBJ*
2064 _In_ HSURF hsurf);
2065
2066ENGAPI
2067BOOL
2070
2071ENGAPI
2072PEVENT
2075 _In_ HDEV hDev,
2076 _In_ HANDLE hUserObject,
2080
2081_Success_(return != 0)
2083ENGAPI
2084PVOID
2086EngMapFile(
2087 _In_ LPWSTR pwsz,
2090
2091__drv_preferredFunction("EngMapFontFileFD", "Obsolete")
2094ENGAPI
2095BOOL
2097EngMapFontFile(
2100 _Out_ ULONG *pcjBuf);
2101
2104ENGAPI
2105BOOL
2107EngMapFontFileFD(
2111
2115ENGAPI
2116PVOID
2118EngMapModule(
2119 _In_ HANDLE h,
2121
2122ENGAPI
2123BOOL
2126 _In_ HSURF hsurf);
2127
2128/* EngModifySurface.flSurface constants */
2129#define MS_NOTSYSTEMMEMORY 0x00000001
2130#define MS_SHAREDACCESS 0x00000002
2131#define MS_CDDDEVICEBITMAP 0x00000004
2132
2133ENGAPI
2134BOOL
2137 _In_ HSURF hsurf,
2138 _In_ HDEV hdev,
2139 _In_ FLONG flHooks,
2140 _In_ FLONG flSurface,
2141 _In_ DHSURF dhsurf,
2142 _In_ PVOID pvScan0,
2143 _In_ LONG lDelta,
2145
2146ENGAPI
2147VOID
2150 _In_ SURFOBJ *pso,
2151 _In_ LONG x,
2152 _In_ LONG y,
2153 _In_ RECTL *prcl);
2154
2155#ifdef USERMODE_DRIVER
2156#define EngMulDiv MulDiv
2157#else /* !USERMODE_DRIVER */
2158ENGAPI
2159INT
2161EngMulDiv(
2162 _In_ INT a,
2163 _In_ INT b,
2164 _In_ INT c);
2165#endif /* !USERMODE_DRIVER */
2166
2167ENGAPI
2168VOID
2176
2177ENGAPI
2178INT
2181 _In_ UINT CodePage,
2182 _Out_writes_bytes_opt_(cjWideCharString) LPWSTR WideCharString,
2183 _In_ INT cjWideCharString,
2184 _In_reads_bytes_opt_(cjMultiByteString) LPSTR MultiByteString,
2185 _In_ INT cjMultiByteString);
2186
2187ENGAPI
2188BOOL
2190EngPaint(
2191 _In_ SURFOBJ *pso,
2192 _In_ CLIPOBJ *pco,
2193 _In_ BRUSHOBJ *pbo,
2195 _In_ __in_data_source(USER_MODE) MIX mix);
2196
2197ENGAPI
2198BOOL
2201 _In_ SURFOBJ *psoTrg,
2204 _In_ CLIPOBJ *pco,
2209 _In_ RECTL *prcl,
2211 _In_ __in_data_source(USER_MODE) ULONG iMode);
2212
2213ENGAPI
2214VOID
2220
2221ENGAPI
2222VOID
2228
2233
2234ENGAPI
2235BOOL
2238 _In_ HDEV hdev,
2239 _In_ ENG_DEVICE_ATTRIBUTE devAttr,
2240 _In_reads_bytes_(cjInSize) PVOID pvIn,
2241 _In_ ULONG cjInSize,
2242 _Out_writes_bytes_(cjOutSize) PVOID pvOut,
2243 _In_ ULONG cjOutSize);
2244
2245/* Obsolete in Windows 2000 and later */
2249 _In_ HDEV hdev,
2250 _Out_ EMFINFO *pEMFInfo);
2251
2252ENGAPI
2256 _In_ LPWSTR pwsz);
2257
2258ENGAPI
2259VOID
2263
2264ENGAPI
2265ULONG
2268 _In_ HPALETTE hPal,
2269 _Out_ ULONG *piMode,
2270 _In_ ULONG cColors,
2271 _Out_writes_opt_(cColors) ULONG *pulColors);
2272
2273ENGAPI
2274VOID
2277 _Out_ LONGLONG *pPerformanceCount);
2278
2279ENGAPI
2280VOID
2283 _Out_ LONGLONG *pFrequency);
2284
2291
2292#define QSA_MMX 0x00000100
2293#define QSA_SSE 0x00002000
2294#define QSA_3DNOW 0x00004000
2295#if (NTDDI_VERSION >= NTDDI_VISTA)
2296#define QSA_SSE1 QSA_SSE
2297#define QSA_SSE2 0x00010000
2298#define QSA_SSE3 0x00080000
2299#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
2300
2302_Success_(return)
2303ENGAPI
2304BOOL
2309
2310ENGAPI
2311LONG
2314 _In_ PEVENT pEvent);
2315
2317_Releases_lock_(*hsem)
2318_Releases_lock_(_Global_critical_region_)
2319ENGAPI
2320VOID
2323 _Inout_ HSEMAPHORE hsem);
2324
2325#if defined(_M_AMD64) && (NTDDI_VERSION >= NTDDI_VISTA)
2326
2328_Success_(return)
2331 _Kernel_releases_resource_(EngFloatState))
2332ENGAPI
2333BOOL
2335EngRestoreFloatingPointState(
2336 _In_reads_(_Inexpressible_(statesize))
2337 PVOID pBuffer)
2338{
2340 return TRUE;
2341}
2342
2344_Success_(((pBuffer != NULL && cjBufferSize != 0) && return == 1) ||
2345 ((pBuffer == NULL || cjBufferSize == 0) && return > 0))
2346_When_(pBuffer != NULL && cjBufferSize != 0 && return == 1, _Kernel_float_saved_
2349ENGAPI
2350ULONG
2352EngSaveFloatingPointState(
2354 _Out_writes_bytes_opt_(cjBufferSize) PVOID pBuffer,
2355 _Inout_ ULONG cjBufferSize)
2356{
2357 return ((((pBuffer) == NULL) || ((cjBufferSize) == 0)) ? 8 : TRUE);
2358}
2359
2360#else /* !(defined(_M_AMD64) && (NTDDI_VERSION >= NTDDI_VISTA)) */
2361
2363_Success_(return)
2366 _Kernel_releases_resource_(EngFloatState))
2367ENGAPI
2368BOOL
2370EngRestoreFloatingPointState(
2371 _In_reads_(_Inexpressible_(statesize)) PVOID pBuffer);
2372
2374_Success_(((pBuffer != NULL && cjBufferSize != 0) && return == 1) ||
2375 ((pBuffer == NULL || cjBufferSize == 0) && return > 0))
2376_When_(pBuffer != NULL && cjBufferSize != 0 && return == 1, _Kernel_float_saved_
2379ENGAPI
2380ULONG
2382EngSaveFloatingPointState(
2384 _Out_writes_bytes_opt_(cjBufferSize) PVOID pBuffer,
2385 _Inout_ ULONG cjBufferSize);
2386
2387
2388#endif /* defined(_M_AMD64) && (NTDDI_VERSION >= NTDDI_VISTA) */
2389
2390ENGAPI
2391HANDLE
2394 _In_reads_bytes_(cjLength) PVOID Address,
2395 _In_ ULONG cjLength);
2396
2397ENGAPI
2398LONG
2401 _In_ PEVENT pEvent);
2402
2403#ifdef USERMODE_DRIVER
2404#define EngSetLastError SetLastError
2405#else /* !USERMODE_DRIVER */
2406ENGAPI
2407VOID
2410 _In_ ULONG iError);
2411#endif /* !USERMODE_DRIVER */
2412
2413ENGAPI
2414ULONG
2417 _In_ SURFOBJ *pso,
2421 _In_ LONG xHot,
2422 _In_ LONG yHot,
2423 _In_ LONG x,
2424 _In_ LONG y,
2425 _In_ RECTL *prcl,
2426 _In_ FLONG fl);
2427
2428__drv_preferredFunction("(see documentation)", "Obsolete, always returns false. ")
2429ENGAPI
2430BOOL
2432EngSetPointerTag(
2433 _In_ HDEV hdev,
2437 _In_ FLONG fl);
2438
2439#ifdef USERMODE_DRIVER
2440#define EngSetPrinterData SetPrinterData
2441#else /* !USERMODE_DRIVER */
2442ENGAPI
2443DWORD
2446 _In_ HANDLE hPrinter,
2447 _In_ LPWSTR pType,
2448 _In_ DWORD dwType,
2449 _In_reads_bytes_(cjPrinterData) LPBYTE lpbPrinterData,
2450 _In_ DWORD cjPrinterData);
2451#endif /* !USERMODE_DRIVER */
2452
2453typedef int (__cdecl /*CDECL*/ *SORTCOMP)(const void *pv1, const void *pv2);
2454
2455ENGAPI
2456VOID
2459 _Inout_updates_bytes_(c * cjElem) PBYTE pjBuf,
2460 _In_ ULONG c,
2461 _In_ ULONG cjElem,
2462 _In_ SORTCOMP pfnComp);
2463
2464ENGAPI
2465BOOL
2468 _In_ SURFOBJ *psoDest,
2478 _In_ ULONG iMode);
2479
2480ENGAPI
2481BOOL
2484 _In_ SURFOBJ *psoDest,
2496 _In_ DWORD rop4);
2497
2498ENGAPI
2499BOOL
2503 _In_ PATHOBJ *ppo,
2504 _In_ CLIPOBJ *pco,
2505 _In_ XFORMOBJ *pxo,
2510 _In_ __in_data_source(USER_MODE) MIX mixFill,
2512
2513ENGAPI
2514BOOL
2517 _In_ SURFOBJ *pso,
2518 _In_ PATHOBJ *ppo,
2519 _In_ CLIPOBJ *pco,
2520 _In_ XFORMOBJ *pxo,
2521 _In_ BRUSHOBJ *pbo,
2524 _In_ MIX mix);
2525
2526ENGAPI
2527BOOL
2530 _In_ SURFOBJ *pso,
2531 _In_ STROBJ *pstro,
2532 _In_ FONTOBJ *pfo,
2533 _In_ CLIPOBJ *pco,
2539 _In_ MIX mix);
2540
2541ENGAPI
2542BOOL
2545 _In_ SURFOBJ *psoDst,
2553
2554ENGAPI
2555VOID
2558 _Out_writes_bytes_to_(cjMultiByteBuf, *pcjMultiByteString) PCHAR pchMultiByteString,
2559 _In_ ULONG cjMultiByteBuf,
2560 _Out_opt_ PULONG pcjMultiByteString,
2561 _In_reads_bytes_(cjUnicodeString) PWSTR pwszUnicodeString,
2562 _In_ ULONG cjUnicodeString);
2563
2564#ifdef USERMODE_DRIVER
2565#define EngUnloadImage(h) FreeLibrary((HMODULE) (h))
2566#else /* !USERMODE_DRIVER */
2567ENGAPI
2568VOID
2572#endif /* !USERMODE_DRIVER */
2573
2574ENGAPI
2575BOOL
2579
2580ENGAPI
2581BOOL
2584 _In_ _Post_ptr_invalid_ HDRVOBJ hdo);
2585
2586ENGAPI
2587VOID
2591
2592ENGAPI
2593BOOL
2596 _In_ PEVENT pEvent);
2597
2598ENGAPI
2599BOOL
2603
2604__drv_preferredFunction("EngUnmapFontFileFD", "Obsolete")
2605ENGAPI
2606VOID
2610
2611ENGAPI
2612VOID
2616
2617ENGAPI
2618VOID
2621 _In_ HANDLE hSecure);
2622
2623ENGAPI
2624BOOL
2627 _In_ PEVENT pEvent,
2628 _In_opt_ PLARGE_INTEGER pTimeOut);
2629
2630ENGAPI
2631INT
2634 _In_ UINT CodePage,
2635 _In_reads_bytes_opt_(cjWideCharString) LPWSTR pwszWideCharString,
2636 _In_ INT cjWideCharString,
2637 _Out_z_bytecap_(cjMultiByteString) LPSTR pszMultiByteString,
2638 _In_ INT cjMultiByteString);
2639
2640#ifdef USERMODE_DRIVER
2641#define EngWritePrinter WritePrinter
2642#else /* !USERMODE_DRIVER */
2643ENGAPI
2644BOOL
2647 _In_ HANDLE hPrinter,
2650 _Out_ LPDWORD pcWritten);
2651#endif /* !USERMODE_DRIVER */
2652
2653#if defined(_X86_) && !defined(USERMODE_DRIVER)
2654ENGAPI
2655VOID
2658 _Inout_ PFLOATOBJ pf,
2659 _In_ PFLOATOBJ pf1);
2660
2661ENGAPI
2662VOID
2665 _Inout_ PFLOATOBJ pf,
2666 _In_ FLOATL f);
2667
2668ENGAPI
2669VOID
2672 _Inout_ PFLOATOBJ pf,
2673 _In_ LONG l);
2674
2675ENGAPI
2676VOID
2679 _Inout_ PFLOATOBJ pf,
2680 _In_ PFLOATOBJ pf1);
2681
2682ENGAPI
2683VOID
2686 _Inout_ PFLOATOBJ pf,
2687 _In_ FLOATL f);
2688
2689ENGAPI
2690VOID
2693 _Inout_ PFLOATOBJ pf,
2694 _In_ LONG l);
2695
2696ENGAPI
2697BOOL
2700 _In_ PFLOATOBJ pf,
2701 _In_ PFLOATOBJ pf1);
2702
2703ENGAPI
2704BOOL
2707 _In_ PFLOATOBJ pf,
2708 _In_ LONG l);
2709
2710ENGAPI
2711LONG
2714 _In_ PFLOATOBJ pf);
2715
2716ENGAPI
2717LONG
2720 _In_ PFLOATOBJ pf);
2721
2722ENGAPI
2723BOOL
2726 _In_ PFLOATOBJ pf,
2727 _In_ PFLOATOBJ pf1);
2728
2729ENGAPI
2730BOOL
2733 _In_ PFLOATOBJ pf,
2734 _In_ LONG l);
2735
2736ENGAPI
2737BOOL
2740 _In_ PFLOATOBJ pf,
2741 _In_ PFLOATOBJ pf1);
2742
2743ENGAPI
2744BOOL
2747 _In_ PFLOATOBJ pf,
2748 _In_ LONG l);
2749
2750ENGAPI
2751VOID
2754 _Inout_ PFLOATOBJ pf,
2755 _In_ PFLOATOBJ pf1);
2756
2757ENGAPI
2758VOID
2761 _Inout_ PFLOATOBJ pf,
2762 _In_ FLOATL f);
2763
2764ENGAPI
2765VOID
2768 _Inout_ PFLOATOBJ pf,
2769 _In_ LONG l);
2770
2771ENGAPI
2772VOID
2775 _Inout_ PFLOATOBJ pf);
2776
2777ENGAPI
2778VOID
2781 _Out_ PFLOATOBJ pf,
2782 _In_ FLOATL f);
2783
2784ENGAPI
2785VOID
2788 _Out_ PFLOATOBJ pf,
2789 _In_ LONG l);
2790
2791ENGAPI
2792VOID
2795 _Inout_ PFLOATOBJ pf,
2796 _In_ PFLOATOBJ pf1);
2797
2798ENGAPI
2799VOID
2802 _Inout_ PFLOATOBJ pf,
2803 _In_ FLOATL f);
2804
2805ENGAPI
2806VOID
2809 _Inout_ PFLOATOBJ pf,
2810 _In_ LONG l);
2811
2812#else
2813
2814#define FLOATOBJ_SetFloat(pf, f) {*(pf) = (f);}
2815#define FLOATOBJ_SetLong(pf, l) {*(pf) = (FLOAT)(l);}
2816#define FLOATOBJ_GetFloat(pf) (*(PULONG)(pf))
2817#define FLOATOBJ_GetLong(pf) ((LONG)*(pf))
2818#define FLOATOBJ_Add(pf, pf1) {*(pf) += *(pf1);}
2819#define FLOATOBJ_AddFloat(pf, f) {*(pf) += (f);}
2820#define FLOATOBJ_AddLong(pf, l) {*(pf) += (l);}
2821#define FLOATOBJ_Sub(pf, pf1) {*(pf) -= *(pf1);}
2822#define FLOATOBJ_SubFloat(pf, f) {*(pf) -= (f);}
2823#define FLOATOBJ_SubLong(pf, l) {*(pf) -= (l);}
2824#define FLOATOBJ_Mul(pf, pf1) {*(pf) *= *(pf1);}
2825#define FLOATOBJ_MulFloat(pf, f) {*(pf) *= (f);}
2826#define FLOATOBJ_MulLong(pf, l) {*(pf) *= (l);}
2827#define FLOATOBJ_Div(pf, pf1) {*(pf) /= *(pf1);}
2828#define FLOATOBJ_DivFloat(pf, f) {*(pf) /= (f);}
2829#define FLOATOBJ_DivLong(pf, l) {*(pf) /= (l);}
2830#define FLOATOBJ_Neg(pf) {*(pf) = -(*(pf));}
2831#define FLOATOBJ_Equal(pf, pf1) (*(pf) == *(pf1))
2832#define FLOATOBJ_GreaterThan(pf, pf1) (*(pf) > *(pf1))
2833#define FLOATOBJ_LessThan(pf, pf1) (*(pf) < *(pf1))
2834#define FLOATOBJ_EqualLong(pf, l) (*(pf) == (FLOAT)(l))
2835#define FLOATOBJ_GreaterThanLong(pf, l) (*(pf) > (FLOAT)(l))
2836#define FLOATOBJ_LessThanLong(pf, l) (*(pf) < (FLOAT)(l))
2837
2838#endif
2839
2840ENGAPI
2841ULONG
2844 _In_ FONTOBJ *pfo,
2845 _Out_opt_ HGLYPH *phg);
2846
2847ENGAPI
2848ULONG
2851 _In_ FONTOBJ *pfo,
2853 _In_ ULONG cGlyph,
2854 _In_count_(cGlyph) HGLYPH *phg,
2855 _Out_ PVOID *ppvGlyph);
2856
2857ENGAPI
2861 _In_ FONTOBJ *pfo);
2862
2863ENGAPI
2867 _In_ FONTOBJ *pfo);
2868
2870ENGAPI
2871PBYTE
2874 _In_ FONTOBJ *pfo,
2877
2878ENGAPI
2882 _In_ FONTOBJ *pfo,
2883 _In_ ULONG iMode);
2884
2885_Ret_opt_bytecount_(*pcjFile)
2886ENGAPI
2887PVOID
2890 _In_ FONTOBJ *pfo,
2891 _Out_ ULONG *pcjFile);
2892
2893ENGAPI
2894LPWSTR
2897 _In_ FONTOBJ *pfo,
2898 _Out_ ULONG *pcwc);
2899
2900ENGAPI
2901XFORMOBJ*
2904 _In_ FONTOBJ *pfo);
2905
2906ENGAPI
2907VOID
2910 _In_ FONTOBJ *pfo,
2913
2914#if (NTDDI_VERSION <= NTDDI_WINXP)
2915 /* Obsolete in Windows 2000 and later */
2919 _In_ FONTOBJ *pfo);
2920#endif
2921
2922ENGAPI
2923LONG
2926 _In_ USHORT GammaTableEntries,
2927 _In_ USHORT GammaTableType,
2928 _In_ USHORT RedGamma,
2929 _In_ USHORT GreenGamma,
2930 _In_ USHORT BlueGamma,
2931 _Out_writes_bytes_(GammaTableEntries * 3) LPBYTE pGammaTable);
2932
2933ENGAPI
2934LONG
2937 _Out_opt_ LPPALETTEENTRY pPaletteEntry,
2938 _In_ USHORT RedGamma,
2939 _In_ USHORT GreenGamma,
2940 _In_ USHORT BlueGamma);
2941
2942ENGAPI
2943LONG
2946 _Out_opt_ LPPALETTEENTRY pPaletteEntry,
2947 _In_ BOOL Use8BPPMaskPal,
2948 _In_ BYTE CMYMask,
2949 _In_ USHORT RedGamma,
2950 _In_ USHORT GreenGamma,
2951 _In_ USHORT BlueGamma);
2952
2953ENGAPI
2954LONG
2957 _In_ LPSTR pDeviceName,
2958 _Out_ PDEVHTADJDATA pDevHTAdjData);
2959
2960ENGAPI
2961ULONG
2964 _In_ PALOBJ *ppalo,
2966 _In_ ULONG cColors,
2967 _Out_writes_(cColors) ULONG *pulColors);
2968
2969ENGAPI
2970BOOL
2973 _In_ PATHOBJ *ppo);
2974
2975ENGAPI
2976BOOL
2979 _In_ PATHOBJ *ppo,
2980 _Out_ PATHDATA *ppd);
2981
2982ENGAPI
2983BOOL
2986 _In_ PATHOBJ *ppo,
2987 _In_ ULONG cj,
2988 _Out_bytecap_(cj) CLIPLINE *pcl);
2989
2990ENGAPI
2991BOOL
2994 _In_ PATHOBJ *ppo,
2995 _In_ POINTFIX ptfx);
2996
2997ENGAPI
2998BOOL
3001 _In_ PATHOBJ *ppo,
3002 _In_count_(cptfx) POINTFIX *pptfx,
3003 _In_ ULONG cptfx);
3004
3005ENGAPI
3006BOOL
3009 _In_ PATHOBJ *ppo,
3010 _In_count_(cptfx) POINTFIX *pptfx,
3011 _In_ ULONG cptfx);
3012
3013ENGAPI
3014VOID
3018
3019ENGAPI
3020VOID
3024 _In_ CLIPOBJ *pco,
3025 _In_ SURFOBJ *pso,
3026 _In_ LINEATTRS *pla);
3027
3028ENGAPI
3029VOID
3032 _In_ PATHOBJ *ppo,
3033 _Out_ PRECTFX prectfx);
3034
3035ENGAPI
3036BOOL
3040 _Out_ ULONG *pc,
3041 _Out_ PGLYPHPOS *ppgpos); // FIXME_ size?
3042
3043ENGAPI
3044BOOL
3047 _In_ STROBJ *pstro,
3048 _Out_ ULONG *pc,
3049 _Out_ PGLYPHPOS *ppgpos); // FIXME_ size?
3050
3051ENGAPI
3052BOOL
3055 _In_ STROBJ *pso,
3056 _In_ ULONG iFirst,
3057 _In_ ULONG c,
3058 _Out_cap_(c) POINTQF *pptqD);
3059
3060ENGAPI
3061DWORD
3064 _In_ STROBJ *pstro);
3065
3066ENGAPI
3067FIX
3070 _In_ STROBJ *pstro);
3071
3072ENGAPI
3073FIX
3076 _In_ STROBJ *pstro);
3077
3078ENGAPI
3079VOID
3083
3084ENGAPI
3085BOOL
3089 _In_ ULONG cj,
3090 _Out_bytecap_(cj) ULONG *pul);
3091
3092ENGAPI
3093ULONG
3098 _In_ ULONG iDirection,
3099 _In_ ULONG cLimit);
3100
3101ENGAPI
3102VOID
3106 _In_ PVOID pvConsumer);
3107
3108/* XFORMOBJ_bApplyXform.iMode constants */
3109#define XF_LTOL 0L
3110#define XF_INV_LTOL 1L
3111#define XF_LTOFX 2L
3112#define XF_INV_FXTOL 3L
3113
3114ENGAPI
3115BOOL
3118 _In_ XFORMOBJ *pxo,
3120 _In_ ULONG cPoints,
3121 _In_reads_bytes_(cPoints * sizeof(POINTL)) PVOID pvIn,
3122 _Out_writes_bytes_(cPoints * sizeof(POINTL)) PVOID pvOut);
3123
3124/* Obsolete in Windows 2000 and later */
3126ENGAPI
3127HANDLE
3130 XFORMOBJ *pxo);
3131
3132#if !defined(USERMODE_DRIVER)
3133ENGAPI
3134ULONG
3137 _In_ XFORMOBJ *pxo,
3138 _Out_ FLOATOBJ_XFORM *pxfo);
3139#else
3140#define XFORMOBJ_iGetFloatObjXform XFORMOBJ_iGetXform
3141#endif
3142
3143ENGAPI
3144ULONG
3147 _In_ XFORMOBJ *pxo,
3148 _Out_ XFORML *pxform);
3149
3150/* XLATEOBJ_cGetPalette.iPal constants */
3151#define XO_SRCPALETTE 1
3152#define XO_DESTPALETTE 2
3153#define XO_DESTDCPALETTE 3
3154#define XO_SRCBITFIELDS 4
3155#define XO_DESTBITFIELDS 5
3156
3157ENGAPI
3158ULONG
3162 _In_ ULONG iPal,
3163 _In_ ULONG cPal,
3164 _Out_cap_(cPal) ULONG *pPal);
3165
3166ENGAPI
3167HANDLE
3170 _In_ XLATEOBJ *pxlo);
3171
3172ENGAPI
3173ULONG
3177 _In_ ULONG iColor);
3178
3179ENGAPI
3180ULONG*
3183 _In_ XLATEOBJ *pxlo);
3184
3185#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
3186
3187ENGAPI
3188VOID
3191 _In_ ULONG BugCheckCode,
3192 _In_ ULONG_PTR P1,
3193 _In_ ULONG_PTR P2,
3194 _In_ ULONG_PTR P3,
3195 _In_ ULONG_PTR P4);
3196
3197#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) */
3198
3199#if (NTDDI_VERSION >= NTDDI_VISTA)
3200
3201ENGAPI
3202HANDLE
3205 _In_ INT left,
3206 _In_ INT top,
3207 _In_ INT right,
3208 _In_ INT bottom);
3209
3210ENGAPI
3211VOID
3214 _In_ HANDLE hrgn);
3215
3216ENGAPI
3217INT
3220 _In_ HANDLE hrgnTrg,
3223 _In_ INT iMode);
3224
3225ENGAPI
3226INT
3229 _In_ HANDLE hrgnDst,
3231
3232ENGAPI
3233INT
3236 _In_ HANDLE hrgnResult,
3238 _In_ HANDLE hRgnB);
3239
3240ENGAPI
3241INT
3244 _In_ HANDLE hrgnResult,
3246 _In_ HANDLE hRgnB);
3247
3248ENGAPI
3249INT
3252 _In_ HANDLE hrgnResult,
3254 _In_ HANDLE hRgnB);
3255
3256ENGAPI
3257INT
3260 _In_ HANDLE hrgnResult,
3262 _In_ HANDLE hRgnB);
3263
3264ENGAPI
3265BOOL
3269 _In_ LPRECT prcl);
3270
3271ENGAPI
3272BOOL
3275 _In_ HANDLE hrgn1,
3276 _In_ HANDLE hrgn2);
3277
3278ENGAPI
3279DWORD
3283 _In_ DWORD nCount,
3284 _Out_cap_(nCount) LPRGNDATA lpRgnData);
3285
3286ENGAPI
3287BOOL
3291 _In_ INT left,
3292 _In_ INT top,
3293 _In_ INT right,
3294 _In_ INT bottom);
3295
3296ENGAPI
3297INT
3301 _Out_ LPRECT prcl);
3302
3303ENGAPI
3304INT
3308 _In_ INT x,
3309 _In_ INT y);
3310
3311ENGAPI
3312VOID
3315 _In_ DHPDEV dhpdev,
3319
3322_Acquires_lock_(_Global_critical_region_)
3323ENGAPI
3324VOID
3327 _Inout_ HSEMAPHORE hsem);
3328
3329ENGAPI
3330BOOL
3333 _In_ HSEMAPHORE hsem);
3334
3335_Acquires_lock_(_Global_critical_region_)
3338ENGAPI
3339VOID
3340NTAPI
3341EngAcquireSemaphoreShared(
3342 _Inout_ HSEMAPHORE hsem);
3343
3344ENGAPI
3345BOOL
3348 _In_ HSEMAPHORE hsem);
3349
3350DECLARE_HANDLE(HFASTMUTEX);
3351
3352ENGAPI
3353HFASTMUTEX
3356 VOID);
3357
3358ENGAPI
3359VOID
3362 _In_ HFASTMUTEX hfm);
3363
3364ENGAPI
3365VOID
3368 _In_ HFASTMUTEX hfm);
3369
3370ENGAPI
3371VOID
3374 _In_ HFASTMUTEX hfm);
3375
3376ENGAPI
3377BOOL
3380 _In_ SURFOBJ *pso,
3381 _Inout_ CLIPOBJ **ppco);
3382
3383#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
3384
3385#if (NTDDI_VERSION >= NTDDI_WIN7)
3386
3387ENGAPI
3388HBITMAP
3391 __in_data_source(USER_MODE) DHSURF dhsurf,
3392 __in_data_source(USER_MODE) SIZEL sizl,
3393 _In_ ULONG iFormatCompat);
3394
3395VOID
3398 _In_ ULONG ulGamma,
3399 _Out_ CONST BYTE** pGammaTable,
3400 _Out_ CONST BYTE** pInverseGammaTable);
3401
3402ULONG
3405 _In_ HDEV hdev);
3406
3407#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
3408
3409/* Graphics Driver Functions */
3410
3411typedef BOOL
3412(APIENTRY FN_DrvAlphaBlend)(
3413 _Inout_ SURFOBJ *psoDest,
3420typedef FN_DrvAlphaBlend *PFN_DrvAlphaBlend;
3421extern FN_DrvAlphaBlend DrvAlphaBlend;
3422
3423typedef BOOL
3424(APIENTRY FN_DrvAssertMode)(
3425 _In_ DHPDEV dhpdev,
3427typedef FN_DrvAssertMode *PFN_DrvAssertMode;
3428extern FN_DrvAssertMode DrvAssertMode;
3429
3430typedef BOOL
3431(APIENTRY FN_DrvBitBlt)(
3432 _Inout_ SURFOBJ *psoTrg,
3435 _In_ CLIPOBJ *pco,
3443typedef FN_DrvBitBlt *PFN_DrvBitBlt;
3444extern FN_DrvBitBlt DrvBitBlt;
3445
3446typedef VOID
3447(APIENTRY FN_DrvCompletePDEV)(
3448 _In_ DHPDEV dhpdev,
3449 _In_ HDEV hdev);
3450typedef FN_DrvCompletePDEV *PFN_DrvCompletePDEV;
3451extern FN_DrvCompletePDEV DrvCompletePDEV;
3452
3453typedef BOOL
3454(APIENTRY FN_DrvCopyBits)(
3455 _In_ SURFOBJ *psoDest,
3457 _In_ CLIPOBJ *pco,
3461typedef FN_DrvCopyBits *PFN_DrvCopyBits;
3462extern FN_DrvCopyBits DrvCopyBits;
3463
3464typedef HBITMAP
3465(APIENTRY FN_DrvCreateDeviceBitmap)(
3466 _In_ DHPDEV dhpdev,
3469typedef FN_DrvCreateDeviceBitmap *PFN_DrvCreateDeviceBitmap;
3470extern FN_DrvCreateDeviceBitmap DrvCreateDeviceBitmap;
3471
3472typedef VOID
3473(APIENTRY FN_DrvDeleteDeviceBitmap)(
3474 _In_ _Post_ptr_invalid_ DHSURF dhsurf);
3475typedef FN_DrvDeleteDeviceBitmap *PFN_DrvDeleteDeviceBitmap;
3476extern FN_DrvDeleteDeviceBitmap DrvDeleteDeviceBitmap;
3477
3478typedef HBITMAP
3479(APIENTRY FN_DrvDeriveSurface)(
3480 _In_ DD_DIRECTDRAW_GLOBAL *pDirectDraw,
3482typedef FN_DrvDeriveSurface *PFN_DrvDeriveSurface;
3483extern FN_DrvDeriveSurface DrvDeriveSurface;
3484
3485typedef LONG
3486(APIENTRY FN_DrvDescribePixelFormat)(
3487 _In_ DHPDEV dhpdev,
3491typedef FN_DrvDescribePixelFormat *PFN_DrvDescribePixelFormat;
3492extern FN_DrvDescribePixelFormat DrvDescribePixelFormat;
3493
3494typedef VOID
3495(APIENTRY FN_DrvDestroyFont)(
3496 _In_ FONTOBJ *pfo);
3497typedef FN_DrvDestroyFont *PFN_DrvDestroyFont;
3498extern FN_DrvDestroyFont DrvDestroyFont;
3499
3500typedef VOID
3501(APIENTRY FN_DrvDisableDriver)(VOID);
3502typedef FN_DrvDisableDriver *PFN_DrvDisableDriver;
3503extern FN_DrvDisableDriver DrvDisableDriver;
3504
3505typedef VOID
3506(APIENTRY FN_DrvDisablePDEV)(
3507 _In_ DHPDEV dhpdev);
3508typedef FN_DrvDisablePDEV *PFN_DrvDisablePDEV;
3509extern FN_DrvDisablePDEV DrvDisablePDEV;
3510
3511typedef VOID
3512(APIENTRY FN_DrvDisableSurface)(
3513 _In_ DHPDEV dhpdev);
3514typedef FN_DrvDisableSurface *PFN_DrvDisableSurface;
3515extern FN_DrvDisableSurface DrvDisableSurface;
3516
3517typedef ULONG
3518(APIENTRY FN_DrvDitherColor)(
3519 _In_ DHPDEV dhpdev,
3522 _Inout_updates_(8 * 8) ULONG *pul); // FIXME: compare EngDitherColor
3523typedef FN_DrvDitherColor *PFN_DrvDitherColor;
3524extern FN_DrvDitherColor DrvDitherColor;
3525
3526typedef ULONG
3527(APIENTRY FN_DrvDrawEscape)(
3528 _In_ SURFOBJ *pso,
3530 _In_ CLIPOBJ *pco,
3534typedef FN_DrvDrawEscape *PFN_DrvDrawEscape;
3535extern FN_DrvDrawEscape DrvDrawEscape;
3536
3537typedef BOOL
3538(APIENTRY FN_DrvEnableDriver)(
3539 _In_ ULONG iEngineVersion,
3541 _Inout_bytecount_(cj) DRVENABLEDATA *pded); // Zero initialized
3542typedef FN_DrvEnableDriver *PFN_DrvEnableDriver;
3543extern FN_DrvEnableDriver DrvEnableDriver;
3544
3545typedef DHPDEV
3546(APIENTRY FN_DrvEnablePDEV)(
3547 _In_ DEVMODEW *pdm,
3550 _Out_opt_cap_(cPat) HSURF *phsurfPatterns,
3555 _In_ HDEV hdev,
3558typedef FN_DrvEnablePDEV *PFN_DrvEnablePDEV;
3559extern FN_DrvEnablePDEV DrvEnablePDEV;
3560
3561typedef HSURF
3562(APIENTRY FN_DrvEnableSurface)(
3563 _In_ DHPDEV dhpdev);
3564typedef FN_DrvEnableSurface *PFN_DrvEnableSurface;
3565extern FN_DrvEnableSurface DrvEnableSurface;
3566
3567/* DrvEndDoc.fl constants */
3568#define ED_ABORTDOC 0x00000001
3569
3570typedef BOOL
3571(APIENTRY FN_DrvEndDoc)(
3572 _In_ SURFOBJ *pso,
3573 _In_ FLONG fl);
3574typedef FN_DrvEndDoc *PFN_DrvEndDoc;
3575extern FN_DrvEndDoc DrvEndDoc;
3576
3577typedef ULONG
3578(APIENTRY FN_DrvEscape)(
3579 _In_ SURFOBJ *pso,
3580 _In_ ULONG iEsc,
3581 _In_ ULONG cjIn,
3584 _Out_bytecap_(cjOut) PVOID pvOut);
3585typedef FN_DrvEscape *PFN_DrvEscape;
3586extern FN_DrvEscape DrvEscape;
3587
3588typedef BOOL
3589(APIENTRY FN_DrvFillPath)(
3592 _In_ CLIPOBJ *pco,
3593 _In_ BRUSHOBJ *pbo,
3597typedef FN_DrvFillPath *PFN_DrvFillPath;
3598extern FN_DrvFillPath DrvFillPath;
3599
3600typedef ULONG
3601(APIENTRY FN_DrvFontManagement)(
3602 _In_ SURFOBJ *pso,
3605 _In_ ULONG cjIn,
3608 _Out_bytecap_(cjOut) PVOID pvOut);
3609typedef FN_DrvFontManagement *PFN_DrvFontManagement;
3610extern FN_DrvFontManagement DrvFontManagement;
3611
3612typedef VOID
3613(APIENTRY FN_DrvFree)(
3616typedef FN_DrvFree *PFN_DrvFree;
3617extern FN_DrvFree DrvFree;
3618
3619/* DrvGetGlyphMode return values */
3620#define FO_HGLYPHS 0L
3621#define FO_GLYPHBITS 1L
3622#define FO_PATHOBJ 2L
3623
3624typedef ULONG
3625(APIENTRY FN_DrvGetGlyphMode)(
3626 _In_ DHPDEV dhpdev,
3627 _In_ FONTOBJ *pfo);
3628typedef FN_DrvGetGlyphMode *PFN_DrvGetGlyphMode;
3629extern FN_DrvGetGlyphMode DrvGetGlyphMode;
3630
3631typedef ULONG
3632(APIENTRY FN_DrvGetModes)(
3636typedef FN_DrvGetModes *PFN_DrvGetModes;
3637extern FN_DrvGetModes DrvGetModes;
3638
3639typedef PVOID
3640(APIENTRY FN_DrvGetTrueTypeFile)(
3643typedef FN_DrvGetTrueTypeFile *PFN_DrvGetTrueTypeFile;
3644extern FN_DrvGetTrueTypeFile DrvGetTrueTypeFile;
3645
3646typedef BOOL
3647(APIENTRY FN_DrvGradientFill)(
3648 _Inout_ SURFOBJ *psoDest,
3649 _In_ CLIPOBJ *pco,
3658typedef FN_DrvGradientFill *PFN_DrvGradientFill;
3659extern FN_DrvGradientFill DrvGradientFill;
3660
3661typedef BOOL
3662(APIENTRY FN_DrvIcmCheckBitmapBits)(
3663 _In_ DHPDEV dhpdev,
3666 _Out_bytecap_(pso->sizlBitmap.cx * pso->sizlBitmap.cy) PBYTE paResults);
3667typedef FN_DrvIcmCheckBitmapBits *PFN_DrvIcmCheckBitmapBits;
3668extern FN_DrvIcmCheckBitmapBits DrvIcmCheckBitmapBits;
3669
3670typedef HANDLE
3671(APIENTRY FN_DrvIcmCreateColorTransform)(
3672 _In_ DHPDEV dhpdev,
3676 _In_reads_bytes_(cjDestProfile) PVOID pvDestProfile,
3681typedef FN_DrvIcmCreateColorTransform *PFN_DrvIcmCreateColorTransform;
3682extern FN_DrvIcmCreateColorTransform DrvIcmCreateColorTransform;
3683
3684typedef BOOL
3685(APIENTRY FN_DrvIcmDeleteColorTransform)(
3686 _In_ DHPDEV dhpdev,
3688typedef FN_DrvIcmDeleteColorTransform *PFN_DrvIcmDeleteColorTransform;
3689extern FN_DrvIcmDeleteColorTransform DrvIcmDeleteColorTransform;
3690
3691/* DrvIcmSetDeviceGammaRamp.iFormat constants */
3692#define IGRF_RGB_256BYTES 0x00000000
3693#define IGRF_RGB_256WORDS 0x00000001
3694
3695typedef BOOL
3696(APIENTRY FN_DrvIcmSetDeviceGammaRamp)(
3697 _In_ DHPDEV dhpdev,
3699 _In_bytecount_(sizeof(GAMMARAMP)) LPVOID lpRamp);
3700typedef FN_DrvIcmSetDeviceGammaRamp *PFN_DrvIcmSetDeviceGammaRamp;
3701extern FN_DrvIcmSetDeviceGammaRamp DrvIcmSetDeviceGammaRamp;
3702
3703typedef BOOL
3704(APIENTRY FN_DrvLineTo)(
3706 _In_ CLIPOBJ *pco,
3707 _In_ BRUSHOBJ *pbo,
3713 _In_ MIX mix);
3714typedef FN_DrvLineTo *PFN_DrvLineTo;
3715extern FN_DrvLineTo DrvLineTo;
3716
3718(APIENTRY FN_DrvLoadFontFile)(
3719 _In_ ULONG cFiles,
3721 _In_count_(cFiles) PVOID *ppvView,
3722 _In_count_(cFiles) ULONG *pcjView,
3726typedef FN_DrvLoadFontFile *PFN_DrvLoadFontFile;
3727extern FN_DrvLoadFontFile DrvLoadFontFile;
3728
3729typedef VOID
3730(APIENTRY FN_DrvMovePointer)(
3731 _In_ SURFOBJ *pso,
3735typedef FN_DrvMovePointer *PFN_DrvMovePointer;
3736extern FN_DrvMovePointer DrvMovePointer;
3737
3738typedef BOOL
3739(APIENTRY FN_DrvNextBand)(
3740 _In_ SURFOBJ *pso,
3742typedef FN_DrvNextBand *PFN_DrvNextBand;
3743extern FN_DrvNextBand DrvNextBand;
3744
3745typedef VOID
3746(APIENTRY FN_DrvNotify)(
3747 _In_ SURFOBJ *pso,
3750typedef FN_DrvNotify *PFN_DrvNotify;
3751extern FN_DrvNotify DrvNotify;
3752
3753typedef BOOL
3754(APIENTRY FN_DrvOffset)(
3755 _In_ SURFOBJ *pso,
3756 _In_ LONG x,
3757 _In_ LONG y,
3759typedef FN_DrvOffset *PFN_DrvOffset;
3760extern FN_DrvOffset DrvOffset;
3761
3762typedef BOOL
3763(APIENTRY FN_DrvPaint)(
3765 _In_ CLIPOBJ *pco,
3766 _In_ BRUSHOBJ *pbo,
3768 _In_ MIX mix);
3769typedef FN_DrvPaint *PFN_DrvPaint;
3770extern FN_DrvPaint DrvPaint;
3771
3772typedef BOOL
3773(APIENTRY FN_DrvPlgBlt)(
3774 _Inout_ SURFOBJ *psoTrg,
3777 _In_ CLIPOBJ *pco,
3782 _In_ RECTL *prcl,
3784 _In_ ULONG iMode);
3785typedef FN_DrvPlgBlt *PFN_DrvPlgBlt;
3786extern FN_DrvPlgBlt DrvPlgBlt;
3787
3788/* DrvQueryAdvanceWidths.iMode constants */
3789#define QAW_GETWIDTHS 0
3790#define QAW_GETEASYWIDTHS 1
3791
3792typedef BOOL
3793(APIENTRY FN_DrvQueryAdvanceWidths)(
3794 _In_ DHPDEV dhpdev,
3795 _In_ FONTOBJ *pfo,
3800typedef FN_DrvQueryAdvanceWidths *PFN_DrvQueryAdvanceWidths;
3801extern FN_DrvQueryAdvanceWidths DrvQueryAdvanceWidths;
3802
3803/* DrvQueryDeviceSupport.iType constants */
3804#define QDS_CHECKJPEGFORMAT 0x00000000
3805#define QDS_CHECKPNGFORMAT 0x00000001
3806
3807typedef BOOL
3808(APIENTRY FN_DrvQueryDeviceSupport)(
3809 _In_ SURFOBJ *pso,
3813 _In_ ULONG cjIn,
3816 _Out_bytecap_(cjOut) PVOID pvOut);
3817typedef FN_DrvQueryDeviceSupport *PFN_DrvQueryDeviceSupport;
3818extern FN_DrvQueryDeviceSupport DrvQueryDeviceSupport;
3819
3820/* DrvQueryDriverInfo.dwMode constants */
3821#define DRVQUERY_USERMODE 0x00000001
3822
3823typedef BOOL
3824(APIENTRY FN_DrvQueryDriverInfo)(
3825 _In_ DWORD dwMode,
3829typedef FN_DrvQueryDriverInfo *PFN_DrvQueryDriverInfo;
3830extern FN_DrvQueryDriverInfo DrvQueryDriverInfo;
3831
3833(APIENTRY FN_DrvQueryFont)(
3834 _In_ DHPDEV dhpdev,
3838typedef FN_DrvQueryFont *PFN_DrvQueryFont;
3839extern FN_DrvQueryFont DrvQueryFont;
3840
3841/* DrvQueryFontCaps.pulCaps constants */
3842#define QC_OUTLINES 0x00000001
3843#define QC_1BIT 0x00000002
3844#define QC_4BIT 0x00000004
3845#define QC_FONTDRIVERCAPS (QC_OUTLINES | QC_1BIT | QC_4BIT)
3846
3847typedef LONG
3848(APIENTRY FN_DrvQueryFontCaps)(
3849 _In_ ULONG culCaps,
3850 _Out_cap_(culCaps) ULONG *pulCaps);
3851typedef FN_DrvQueryFontCaps *PFN_DrvQueryFontCaps;
3852extern FN_DrvQueryFontCaps DrvQueryFontCaps;
3853
3854/* DrvQueryFontData.iMode constants */
3855#define QFD_GLYPHANDBITMAP 1L
3856#define QFD_GLYPHANDOUTLINE 2L
3857#define QFD_MAXEXTENTS 3L
3858#define QFD_TT_GLYPHANDBITMAP 4L
3859#define QFD_TT_GRAY1_BITMAP 5L
3860#define QFD_TT_GRAY2_BITMAP 6L
3861#define QFD_TT_GRAY4_BITMAP 8L
3862#define QFD_TT_GRAY8_BITMAP 9L
3863
3864#define QFD_TT_MONO_BITMAP QFD_TT_GRAY1_BITMAP
3865
3866typedef LONG
3867(APIENTRY FN_DrvQueryFontData)(
3868 _In_ DHPDEV dhpdev,
3869 _In_ FONTOBJ *pfo,