29#error video.h cannot be included with winddi.h
41#ifndef DECLSPEC_IMPORT
42#define DECLSPEC_IMPORT __attribute__((dllimport))
45#if defined(_ENGINE_EXPORT_)
48 #define ENGAPI DECLSPEC_IMPORT
51#ifndef _NO_DDRAWINT_NO_COM
55 #define EXTERN_C extern "C"
56 #define __EXTERN_C extern "C"
58 #define EXTERN_C extern
63#if !defined(DEFINE_GUID)
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 } }
68 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
69 EXTERN_C const GUID FAR name
73#if !defined(DEFINE_GUIDEX)
74 #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
77#if !defined(STATICGUIDOF)
78 #define STATICGUIDOF(guid) STATIC_##guid
81#if !defined(GUID_DEFINED)
92#if !defined(IsEqualGUID)
93 #define IsEqualGUID(guid1, guid2) \
94 (!memcmp((guid1), (guid2), sizeof(GUID)))
98 #define IsEqualIID IsEqualGUID
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
109#define GDI_DRIVER_VERSION 0x4000
111#if defined(_X86_) && !defined(USERMODE_DRIVER) && !defined(BUILD_WOW6432)
149#define OPENGL_CMD 4352
150#define OPENGL_GETINFO 4353
151#define WNDOBJ_SETUP 4354
153#define FD_ERROR 0xFFFFFFFF
154#define DDI_ERROR 0xFFFFFFFF
156#define HFF_INVALID ((HFF) 0)
157#define HFC_INVALID ((HFC) 0)
158#define HGLYPH_INVALID ((HGLYPH) -1)
160#define FP_ALTERNATEMODE 1
161#define FP_WINDINGMODE 2
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
174#define SGI_EXTRASPACE 0
178#define DCR_HALFTONE 2
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)
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))
228#define BR_DEVICE_ICM 0x01
229#define BR_HOST_ICM 0x02
230#define BR_CMYKCOLOR 0x04
231#define BR_ORIGCOLOR 0x08
269#define TC_RECTANGLES 0
273#define OC_BANK_CLIP 1
304#define DEVHTADJF_COLOR_DEVICE 0x00000001
305#define DEVHTADJF_ADDITIVE_DEVICE 0x00000002
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
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
382#if (NTDDI_VERSION >= NTDDI_WIN7)
383#define GCAPS2_CLEARTYPE 0x00004000
385#if (NTDDI_VERSION >= NTDDI_WIN8)
386#define GCAPS2_ACC_DRIVER 0x00008000
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
523#define INDEX_LAST 94L
526#define INDEX_LAST 93L
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
548#define FF_SIGNATURE_VERIFIED 0x00000001L
549#define FF_IGNORED_SIGNATURE 0x00000002L
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
620#define FO_ATTR_MODE_ROTATE 1
630#define GS_UNICODE_HANDLES 0x00000001
631#define GS_8BIT_HANDLES 0x00000002
632#define GS_16BIT_HANDLES 0x00000004
670#if defined(_X86_) && !defined(USERMODE_DRIVER)
671typedef struct _FLOATOBJ
680#ifndef USERMODE_DRIVER
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
721#define FO_DEVICE_FONT 1L
722#define FO_OUTLINE_CAPABLE 2L
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
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
757#define FD_NEGATIVE_FONT 1L
758#define FO_DEVICE_FONT 1L
759#define FO_OUTLINE_CAPABLE 2L
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
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
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
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
837#define MAKE_CMYMASK_BYTE(c,m,y) ((BYTE)(((BYTE)(c) & 0x07) << 5) \
838 |(BYTE)(((BYTE)(m) & 0x07) << 2) \
839 |(BYTE)((BYTE)(y) & 0x03))
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))
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
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
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)
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
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 \
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
999#define FM_VERSION_NUMBER 0x0
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
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
1041#define MAXCHARSETS 16
1044#define FM_PANOSE_CULTURE_LATIN 0x0
1112#define LA_GEOMETRIC 0x00000001
1113#define LA_ALTERNATE 0x00000002
1114#define LA_STARTGAP 0x00000004
1115#define LA_STYLED 0x00000008
1118#define JOIN_ROUND 0L
1119#define JOIN_BEVEL 1L
1120#define JOIN_MITER 2L
1123#define ENDCAP_ROUND 0L
1124#define ENDCAP_SQUARE 1L
1125#define ENDCAP_BUTT 2L
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
1175#define STYPE_BITMAP 0L
1176#define STYPE_DEVICE 1L
1177#define STYPE_DEVBITMAP 3L
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
1191#if (NTDDI_VERSION >= NTDDI_WIN8)
1192#define BMF_ACC_NOTIFY 0x8000
1193#define BMF_RMT_ENTER 0x4000
1196#if (NTDDI_VERSION >= NTDDI_WIN8)
1197#define BMF_RESERVED 0x3E00
1198#elif (NTDDI_VERSION >= NTDDI_WIN7)
1199#define BMF_RESERVED 0xFE00
1201#define BMF_RESERVED 0xFF00
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
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
1317#define CT_RECTANGLES 0L
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
1344#if (NTDDI_VERSION >= NTDDI_VISTA)
1358#define FL_ZERO_MEMORY 0x00000001
1359#define FL_NONPAGED_MEMORY 0x00000002
1360#if (NTDDI_VERSION >= NTDDI_WIN7)
1361#define FL_NON_SESSION 0x00000004
1364#ifdef USERMODE_DRIVER
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))
1390EngAllocPrivateUserMem(
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
1440#define HOOK_FLAGS 0x0003b5ff
1489#define ECS_TEARDOWN 0x00000001
1490#define ECS_REDRAW 0x00000002
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
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
1613 _In_ WNDOBJCHANGEPROC pfn,
1707#define DM_DEFAULT 0x00000001
1708#define DM_MONOCHROME 0x00000002
1730#ifdef USERMODE_DRIVER
1731#define EngEnumForms EnumForms
1765#ifdef USERMODE_DRIVER
1766#define EngFindImageProcAddress(h, procname) ((PVOID) GetProcAddress(h, procname))
1795#define ENG_FNT_CACHE_READ_FAULT 0x00000001
1796#define ENG_FNT_CACHE_WRITE_FAULT 0x00000002
1812#ifdef USERMODE_DRIVER
1814#define EngFreeMem(p) GlobalFree((HGLOBAL) (p))
1815#define EngFreePrivateUserMem( psl, p) GlobalFree((HGLOBAL) (p))
1816#define EngFreeUserMem(p) GlobalFree((HGLOBAL) (p))
1886#ifdef USERMODE_DRIVER
1887#define EngGetForm GetForm
1888#define EngGetLastError GetLastError
1889#define EngGetPrinter GetPrinter
1890#define EngGetPrinterData GetPrinterData
1936#ifdef USERMODE_DRIVER
1937#define EngGetPrinterDriver GetPrinterDriver
1983#define EHN_RESTORED 0x00000000
1984#define EHN_ERROR 0x00000001
2025#ifdef USERMODE_DRIVER
2026#define EngLoadImage(pwszDriver) ((HANDLE)LoadLibraryW(pwszDriver))
2129#define MS_NOTSYSTEMMEMORY 0x00000001
2130#define MS_SHAREDACCESS 0x00000002
2131#define MS_CDDDEVICEBITMAP 0x00000004
2155#ifdef USERMODE_DRIVER
2156#define EngMulDiv MulDiv
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
2325#if defined(_M_AMD64) && (NTDDI_VERSION >= NTDDI_VISTA)
2335EngRestoreFloatingPointState(
2345 ((
pBuffer ==
NULL || cjBufferSize == 0) &&
return > 0))
2352EngSaveFloatingPointState(
2370EngRestoreFloatingPointState(
2375 ((
pBuffer ==
NULL || cjBufferSize == 0) &&
return > 0))
2382EngSaveFloatingPointState(
2403#ifdef USERMODE_DRIVER
2404#define EngSetLastError SetLastError
2439#ifdef USERMODE_DRIVER
2440#define EngSetPrinterData SetPrinterData
2462 _In_ SORTCOMP pfnComp);
2564#ifdef USERMODE_DRIVER
2565#define EngUnloadImage(h) FreeLibrary((HMODULE) (h))
2640#ifdef USERMODE_DRIVER
2641#define EngWritePrinter WritePrinter
2653#if defined(_X86_) && !defined(USERMODE_DRIVER)
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))
2914#if (NTDDI_VERSION <= NTDDI_WINXP)
3110#define XF_INV_LTOL 1L
3112#define XF_INV_FXTOL 3L
3132#if !defined(USERMODE_DRIVER)
3140#define XFORMOBJ_iGetFloatObjXform XFORMOBJ_iGetXform
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
3185#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
3199#if (NTDDI_VERSION >= NTDDI_VISTA)
3341EngAcquireSemaphoreShared(
3362 _In_ HFASTMUTEX hfm);
3368 _In_ HFASTMUTEX hfm);
3374 _In_ HFASTMUTEX hfm);
3385#if (NTDDI_VERSION >= NTDDI_WIN7)
3465(
APIENTRY FN_DrvCreateDeviceBitmap)(
3473(
APIENTRY FN_DrvDeleteDeviceBitmap)(
3486(
APIENTRY FN_DrvDescribePixelFormat)(
3568#define ED_ABORTDOC 0x00000001
3620#define FO_HGLYPHS 0L
3621#define FO_GLYPHBITS 1L
3622#define FO_PATHOBJ 2L
3662(
APIENTRY FN_DrvIcmCheckBitmapBits)(
3671(
APIENTRY FN_DrvIcmCreateColorTransform)(
3685(
APIENTRY FN_DrvIcmDeleteColorTransform)(
3692#define IGRF_RGB_256BYTES 0x00000000
3693#define IGRF_RGB_256WORDS 0x00000001
3696(
APIENTRY FN_DrvIcmSetDeviceGammaRamp)(
3789#define QAW_GETWIDTHS 0
3790#define QAW_GETEASYWIDTHS 1
3793(
APIENTRY FN_DrvQueryAdvanceWidths)(
3804#define QDS_CHECKJPEGFORMAT 0x00000000
3805#define QDS_CHECKPNGFORMAT 0x00000001
3808(
APIENTRY FN_DrvQueryDeviceSupport)(
3821#define DRVQUERY_USERMODE 0x00000001
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)
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
3864#define QFD_TT_MONO_BITMAP QFD_TT_GRAY1_BITMAP