📄 winddi.h
字号:
#if defined(_WIN64)
//
// IFIMETRICS must begin on a 64-bit boundary
//
PVOID Align;
#endif
} IFIMETRICS, *PIFIMETRICS;
// rather than adding the fields of IFIEXTRA to IFIMETRICS itself
// we add them as a separate structure. This structure, if present at all,
// lies below IFIMETRICS in memory.
// If IFIEXTRA is present at all, ifi.cjIfiExtra (formerly ulVersion)
// will contain size of IFIEXTRA including any reserved fields.
// That way ulVersion = 0 (NT 3.51 or less) printer minidrivers
// will work with NT 4.0.
typedef struct _IFIEXTRA
{
ULONG ulIdentifier; // used for Type 1 fonts only
PTRDIFF dpFontSig; // nontrivial for tt only, at least for now.
ULONG cig; // maxp->numGlyphs, # of distinct glyph indicies
PTRDIFF dpDesignVector; // offset to design vector for mm instances
PTRDIFF dpAxesInfoW; // offset to full axes info for base mm font
ULONG aulReserved[1]; // in case we need even more stuff in the future
} IFIEXTRA, *PIFIEXTRA;
#define SIZEOFDV(cAxes) (offsetof(DESIGNVECTOR,dvValues) + (cAxes)*sizeof(LONG))
#define SIZEOFAXIW(cAxes) (offsetof(AXESLISTW,axlAxisInfo) + (cAxes)*sizeof(AXISINFOW))
#define SIZEOFAXIA(cAxes) (offsetof(AXESLISTA,axlAxisInfo) + (cAxes)*sizeof(AXISINFOA))
/**************************************************************************\
*
\**************************************************************************/
/* OpenGL DDI ExtEscape escape numbers (4352 - 4607) */
#define OPENGL_CMD 4352 /* for OpenGL ExtEscape */
#define OPENGL_GETINFO 4353 /* for OpenGL ExtEscape */
#define WNDOBJ_SETUP 4354 /* for live video ExtEscape */
#define DDI_DRIVER_VERSION 0x00020000
#define DDI_DRIVER_VERSION_NT4 0x00020000
#define DDI_DRIVER_VERSION_SP3 0x00020003
#define DDI_DRIVER_VERSION_NT5 0x00030000
#define GDI_DRIVER_VERSION 0x4000 /* for NT version 4.0.00 */
typedef LONG_PTR (APIENTRY *PFN)();
typedef struct _DRVFN /* drvfn */
{
ULONG iFunc;
PFN pfn;
} DRVFN, *PDRVFN;
/* Required functions */
#define INDEX_DrvEnablePDEV 0L
#define INDEX_DrvCompletePDEV 1L
#define INDEX_DrvDisablePDEV 2L
#define INDEX_DrvEnableSurface 3L
#define INDEX_DrvDisableSurface 4L
/* Other functions */
#define INDEX_DrvAssertMode 5L
#define INDEX_DrvOffset 6L // Obsolete
#define INDEX_DrvResetPDEV 7L
#define INDEX_DrvDisableDriver 8L
#define INDEX_DrvCreateDeviceBitmap 10L
#define INDEX_DrvDeleteDeviceBitmap 11L
#define INDEX_DrvRealizeBrush 12L
#define INDEX_DrvDitherColor 13L
#define INDEX_DrvStrokePath 14L
#define INDEX_DrvFillPath 15L
#define INDEX_DrvStrokeAndFillPath 16L
#define INDEX_DrvPaint 17L
#define INDEX_DrvBitBlt 18L
#define INDEX_DrvCopyBits 19L
#define INDEX_DrvStretchBlt 20L
#define INDEX_DrvSetPalette 22L
#define INDEX_DrvTextOut 23L
#define INDEX_DrvEscape 24L
#define INDEX_DrvDrawEscape 25L
#define INDEX_DrvQueryFont 26L
#define INDEX_DrvQueryFontTree 27L
#define INDEX_DrvQueryFontData 28L
#define INDEX_DrvSetPointerShape 29L
#define INDEX_DrvMovePointer 30L
#define INDEX_DrvLineTo 31L
#define INDEX_DrvSendPage 32L
#define INDEX_DrvStartPage 33L
#define INDEX_DrvEndDoc 34L
#define INDEX_DrvStartDoc 35L
#define INDEX_DrvGetGlyphMode 37L
#define INDEX_DrvSynchronize 38L
#define INDEX_DrvSaveScreenBits 40L
#define INDEX_DrvGetModes 41L
#define INDEX_DrvFree 42L
#define INDEX_DrvDestroyFont 43L
#define INDEX_DrvQueryFontCaps 44L
#define INDEX_DrvLoadFontFile 45L
#define INDEX_DrvUnloadFontFile 46L
#define INDEX_DrvFontManagement 47L
#define INDEX_DrvQueryTrueTypeTable 48L
#define INDEX_DrvQueryTrueTypeOutline 49L
#define INDEX_DrvGetTrueTypeFile 50L
#define INDEX_DrvQueryFontFile 51L
#define INDEX_DrvMovePanning 52L
#define INDEX_DrvQueryAdvanceWidths 53L
#define INDEX_DrvSetPixelFormat 54L
#define INDEX_DrvDescribePixelFormat 55L
#define INDEX_DrvSwapBuffers 56L
#define INDEX_DrvStartBanding 57L
#define INDEX_DrvNextBand 58L
#define INDEX_DrvGetDirectDrawInfo 59L
#define INDEX_DrvEnableDirectDraw 60L
#define INDEX_DrvDisableDirectDraw 61L
#define INDEX_DrvQuerySpoolType 62L
#define INDEX_DrvIcmCreateColorTransform 64L
#define INDEX_DrvIcmDeleteColorTransform 65L
#define INDEX_DrvIcmCheckBitmapBits 66L
#define INDEX_DrvIcmSetDeviceGammaRamp 67L
#define INDEX_DrvGradientFill 68L
#define INDEX_DrvStretchBltROP 69L
#define INDEX_DrvPlgBlt 70L
#define INDEX_DrvAlphaBlend 71L
#define INDEX_DrvSynthesizeFont 72L
#define INDEX_DrvGetSynthesizedFontFiles 73L
#define INDEX_DrvTransparentBlt 74L
#define INDEX_DrvQueryPerBandInfo 75L
#define INDEX_DrvQueryDeviceSupport 76L
#define INDEX_DrvReserved1 77L
#define INDEX_DrvReserved2 78L
#define INDEX_DrvReserved3 79L
#define INDEX_DrvReserved4 80L
#define INDEX_DrvReserved5 81L
#define INDEX_DrvReserved6 82L
#define INDEX_DrvReserved7 83L
#define INDEX_DrvReserved8 84L
#define INDEX_DrvDeriveSurface 85L
#define INDEX_DrvQueryGlyphAttrs 86L
#define INDEX_DrvNotify 87L
#define INDEX_DrvSynchronizeSurface 88L
/* The total number of dispatched functions */
#define INDEX_LAST 89L
typedef struct tagDRVENABLEDATA
{
ULONG iDriverVersion;
ULONG c;
DRVFN *pdrvfn;
} DRVENABLEDATA, *PDRVENABLEDATA;
typedef struct tagDEVINFO
{
FLONG flGraphicsCaps;
LOGFONTW lfDefaultFont;
LOGFONTW lfAnsiVarFont;
LOGFONTW lfAnsiFixFont;
ULONG cFonts;
ULONG iDitherFormat;
USHORT cxDither;
USHORT cyDither;
HPALETTE hpalDefault;
FLONG flGraphicsCaps2;
} DEVINFO, *PDEVINFO;
// flGraphicsCaps flags for DEVINFO:
#define GCAPS_BEZIERS 0x00000001
#define GCAPS_GEOMETRICWIDE 0x00000002
#define GCAPS_ALTERNATEFILL 0x00000004
#define GCAPS_WINDINGFILL 0x00000008
#define GCAPS_HALFTONE 0x00000010
#define GCAPS_COLOR_DITHER 0x00000020
#define GCAPS_HORIZSTRIKE 0x00000040 // Obsolete
#define GCAPS_VERTSTRIKE 0x00000080 // Obsolete
#define GCAPS_OPAQUERECT 0x00000100
#define GCAPS_VECTORFONT 0x00000200
#define GCAPS_MONO_DITHER 0x00000400
#define GCAPS_ASYNCCHANGE 0x00000800 // Obsolete
#define GCAPS_ASYNCMOVE 0x00001000
#define GCAPS_DONTJOURNAL 0x00002000
#define GCAPS_DIRECTDRAW 0x00004000 // Obsolete
#define GCAPS_ARBRUSHOPAQUE 0x00008000
#define GCAPS_PANNING 0x00010000
#define GCAPS_HIGHRESTEXT 0x00040000
#define GCAPS_PALMANAGED 0x00080000
#define GCAPS_DITHERONREALIZE 0x00200000
#define GCAPS_NO64BITMEMACCESS 0x00400000 // Obsolete
#define GCAPS_FORCEDITHER 0x00800000
#define GCAPS_GRAY16 0x01000000
#define GCAPS_ICM 0x02000000
#define GCAPS_CMYKCOLOR 0x04000000
#define GCAPS_LAYERED 0x08000000
#define GCAPS_ARBRUSHTEXT 0x10000000
#define GCAPS_SCREENPRECISION 0x20000000
#define GCAPS_FONT_RASTERIZER 0x40000000 // the device has built in tt rasterizer
#define GCAPS_NUP 0x80000000
// flGraphicsCaps2 flags for DEVINFO:
#define GCAPS2_JPEGSRC 0x00000001
#define GCAPS2_xxxx 0x00000002
#define GCAPS2_PNGSRC 0x00000008
#define GCAPS2_CHANGEGAMMARAMP 0x00000010
#define GCAPS2_ALPHACURSOR 0x00000020
#define GCAPS2_SYNCFLUSH 0x00000040
#define GCAPS2_SYNCTIMER 0x00000080
#define GCAPS2_ICD_MULTIMON 0x00000100
typedef struct _LINEATTRS
{
FLONG fl;
ULONG iJoin;
ULONG iEndCap;
FLOAT_LONG elWidth;
FLOATL eMiterLimit;
ULONG cstyle;
PFLOAT_LONG pstyle;
FLOAT_LONG elStyleState;
} LINEATTRS, *PLINEATTRS;
#define LA_GEOMETRIC 0x00000001
#define LA_ALTERNATE 0x00000002
#define LA_STARTGAP 0x00000004
#define LA_STYLED 0x00000008
#define JOIN_ROUND 0L
#define JOIN_BEVEL 1L
#define JOIN_MITER 2L
#define ENDCAP_ROUND 0L
#define ENDCAP_SQUARE 1L
#define ENDCAP_BUTT 2L
typedef LONG LDECI4;
typedef struct _XFORML {
FLOATL eM11;
FLOATL eM12;
FLOATL eM21;
FLOATL eM22;
FLOATL eDx;
FLOATL eDy;
} XFORML, *PXFORML;
typedef struct _CIECHROMA
{
LDECI4 x;
LDECI4 y;
LDECI4 Y;
}CIECHROMA;
typedef struct _COLORINFO
{
CIECHROMA Red;
CIECHROMA Green;
CIECHROMA Blue;
CIECHROMA Cyan;
CIECHROMA Magenta;
CIECHROMA Yellow;
CIECHROMA AlignmentWhite;
LDECI4 RedGamma;
LDECI4 GreenGamma;
LDECI4 BlueGamma;
LDECI4 MagentaInCyanDye;
LDECI4 YellowInCyanDye;
LDECI4 CyanInMagentaDye;
LDECI4 YellowInMagentaDye;
LDECI4 CyanInYellowDye;
LDECI4 MagentaInYellowDye;
}COLORINFO, *PCOLORINFO;
// Allowed values for GDIINFO.ulPrimaryOrder.
#define PRIMARY_ORDER_ABC 0
#define PRIMARY_ORDER_ACB 1
#define PRIMARY_ORDER_BAC 2
#define PRIMARY_ORDER_BCA 3
#define PRIMARY_ORDER_CBA 4
#define PRIMARY_ORDER_CAB 5
// Allowed values for GDIINFO.ulHTPatternSize.
#define HT_PATSIZE_2x2 0
#define HT_PATSIZE_2x2_M 1
#define HT_PATSIZE_4x4 2
#define HT_PATSIZE_4x4_M 3
#define HT_PATSIZE_6x6 4
#define HT_PATSIZE_6x6_M 5
#define HT_PATSIZE_8x8 6
#define HT_PATSIZE_8x8_M 7
#define HT_PATSIZE_10x10 8
#define HT_PATSIZE_10x10_M 9
#define HT_PATSIZE_12x12 10
#define HT_PATSIZE_12x12_M 11
#define HT_PATSIZE_14x14 12
#define HT_PATSIZE_14x14_M 13
#define HT_PATSIZE_16x16 14
#define HT_PATSIZE_16x16_M 15
#define HT_PATSIZE_SUPERCELL 16
#define HT_PATSIZE_SUPERCELL_M 17
#define HT_PATSIZE_USER 18
#define HT_PATSIZE_MAX_INDEX HT_PATSIZE_USER
#define HT_PATSIZE_DEFAULT HT_PATSIZE_SUPERCELL_M
#define HT_USERPAT_CX_MIN 4
#define HT_USERPAT_CX_MAX 256
#define HT_USERPAT_CY_MIN 4
#define HT_USERPAT_CY_MAX 256
// Allowed values for GDIINFO.ulHTOutputFormat.
#define HT_FORMAT_1BPP 0
#define HT_FORMAT_4BPP 2
#define HT_FORMAT_4BPP_IRGB 3
#define HT_FORMAT_8BPP 4
#define HT_FORMAT_16BPP 5
#define HT_FORMAT_24BPP 6
#define HT_FORMAT_32BPP 7
// Allowed values for GDIINFO.flHTFlags.
#define HT_FLAG_SQUARE_DEVICE_PEL 0x00000001
#define HT_FLAG_HAS_BLACK_DYE 0x00000002
#define HT_FLAG_ADDITIVE_PRIMS 0x00000004
#define HT_FLAG_USE_8BPP_BITMASK 0x00000008
#define HT_FLAG_INK_HIGH_ABSORPTION 0x00000010
#define HT_FLAG_INK_ABSORPTION_INDICES 0x00000060
#define HT_FLAG_DO_DEVCLR_XFORM 0x00000080
#define HT_FLAG_OUTPUT_CMY 0x00000100
#define HT_FLAG_PRINT_DRAFT_MODE 0x00000200
#define HT_FLAG_8BPP_CMY332_MASK 0xFF000000
#define MAKE_CMYMASK_BYTE(c,m,y) ((BYTE)(((BYTE)(c) & 0x07) << 5) | \
(BYTE)(((BYTE)(m) & 0x07) << 2) | \
(BYTE)((BYTE)(y) & 0x03))
#define MAKE_CMY332_MASK(c,m,y) ((DWORD)(((DWORD)(c) & 0x07) << 29) | \
(DWORD)(((DWORD)(m) & 0x07) << 26) | \
(DWORD)(((DWORD)(y) & 0x03) << 24))
#define HT_FLAG_INK_ABSORPTION_IDX0 0x00000000
#define HT_FLAG_INK_ABSORPTION_IDX1 0x00000020
#define HT_FLAG_INK_ABSORPTION_IDX2 0x00000040
#define HT_FLAG_INK_ABSORPTION_IDX3 0x00000060
#define HT_FLAG_HIGHEST_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION | \
HT_FLAG_INK_ABSORPTION_IDX3)
#define HT_FLAG_HIGHER_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION | \
HT_FLAG_INK_ABSORPTION_IDX2)
#define HT_FLAG_HIGH_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION | \
HT_FLAG_INK_ABSORPTION_IDX1)
#define HT_FLAG_NORMAL_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX0
#define HT_FLAG_LOW_INK_ABSORPTION (HT_FLAG_INK_ABSORPTION_IDX1)
#define HT_FLAG_LOWER_INK_ABSORPTION (HT_FLAG_INK_ABSORPTION_IDX2)
#define HT_FLAG_LOWEST_INK_ABSORPTION (HT_FLAG_INK_ABSORPTION_IDX3)
// Allowed values for GDIINFO.ulPhysicalPixelCharacteristics
#define PPC_DEFAULT 0x0
#define PPC_UNDEFINED 0x1
#define PPC_RGB_ORDER_VERTICAL_STRIPES 0x2
#define PPC_BGR_ORDER_VERTICAL_STRIPES 0x3
#define PPC_RGB_ORDER_HORIZONTAL_STRIPES 0x4
#define PPC_BGR_ORDER_HORIZONTAL_STRIPES 0x5
// GDIINFO.ulPhysicalPixelGamma should be set either to the scaled
// gamma (x1000) of the physical pixel or one of the following
// values. For example, a 2.2 gamma would be represented as 2200
#define PPG_DEFAULT 0
#define PPG_SRGB 1
//
// HT_FLAG_DO_DEVCLR_XFORM flag specified devices and/or drivers are required
// gdi halftone to do a device transform when ICM is off, the device transform
// take a input RGB value and map it to the device color space to produced
// perceived density same as input RGB color values. This flag only valid if
// it is a printer device surface and its format is 16bpp or 24bpp.
//
// ** If devices are additive and/or device surface is 1bpp, 4bpp or 8bpp, then
// gdi halftone will always performed device transform regardless the
// setting of HT_FLAG_DO_DEVCLR_XFORM flag.
//
// HT_FLAG_8BPP_CMY332_MASK - define the bit mask for 8-bpp format halftone
// palette, this palette only used if a HT_FORMAT_8BPP is specified in
// flHTOutputFormat and HT_FLAG_USE_8BPP_BITMASK bit is set in the flHTFlags.
// if HT_FLAG_USE_8BPP_BITMAP is not set then a standard NT4.0 8-bpp format is
// assumed. The format of 8BPP is set per PDEV, it cannot be changed after
// the pDEV is created.
//
// To set HT_FLAG_8BPP_CMY332_MASK, macro MAKE_CMY332_MASK() can be used. When
// specified, the bit mask cover total of 8 bits area which describe the
// highest of level of CYAN, MAGENTA and YELLOW primary color, the maximum of
// Cyan is 3 bits (7 levels), Magenta is 3 bits (7 levels) and Yellow is 2 bit
// (3 levels).
//
// 0xE0000000 -- Cyan Bits (3 bits, 0 to 7 levels)
// 0x1C000000 -- Magenta Bits (3 bits, 0 to 7 levels)
// 0x03000000 -- Yellow Bits (2 bits, 0 to 3 levels)
//
// a 0x6F000000 specified Cyan=3 levels, Magenta=3 levels, Yellow=3 levels
// a 0xFF000000 specified Cyan=7 levels, Magenta=7 levels, Yellow=3 levels
// a 0x25000000 specified Cyan=1 level, Magenta=1 level, Yellow=1 level,
// is same as using CMY 4bpp
//
// if any of Cyan, Magenta, Yellow level bits is 0 (zero) then it specified
// 8bpp output format is 256 level gray scale with index 0 equal to WHITE and
// index 255 equal to BLACK,
//
// The Palette indics are arranged as CMY entries with CYAN at highest bit
// numbers and YELLOW at lowest bit number as shown below for palette indics
// bit's (8 bit) definition.
//
// Pallete Index BIT#: 7 6 5 4 3 2 1 0
// | | | | | |
// +---C---+ +---M---+ +-Y-+
// 0xe0 0x1c 0x03
//
// If a primray color level in an index is greater than the prmary color
// levels then it is eqaul to the maximum primary color level, for example
// if C=7 (0xe0), and Cyan level only 5 then level 6 and 7 are same as 5
//
// To retrieve the palette definition for 8bpp format, use
//
// LONG APIENTRY
// HT_Get8BPPMaskPalette(PPALETTEENTRY pPaletteEntry,
// BOOL Use8BPPMaskPal,
// BYTE CMYMask,
// USHORT RedGamma,
// USHORT GreenGamma,
// USHORT BlueGamma);
//
// pPaletteEntry - Pointer to the PALETTEENTRY, if NULL it return palette
// count needed
//
// Use8BPPmaskPal - FALSE if a NT4.0 standard 8bpp palette requested, FALSE
// if a CMYMask 8bpp mask palette is needed.
//
// CMYMask - CMY bit mask for CMY as defined above. This must be the
// same primary level as defined in GDIInfo.flHTFlags.
// It should be same as ((GDIInfo.flHTFlags >> 24) & 0xFF).
// The CMYMask also can be specified using predefined macro
// MAKS_CMYMASK_BYTE(cLevel, mLevel, yLevel)
//
// RedGamma - Red gamma if Use8BPPMaskPal is FALSE, Cyan gamma
// if Use8BPPMaskPal is TRUE
//
// GreenGamma - Green gamma if Use8BPPMaskPal is FALSE, Magenta gamma
// if Use8BPPMaskPal is TRUE
//
// BlueGamma - Blue gamma if Use8BPPMaskPal is FALSE, Yellow gamma
// if Use8BPPMaskPal is TRUE
//
typedef struct _GDIINFO
{
ULONG ulVersion;
ULONG ulTechnology;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -