More DirectDraw groundwork by Peter Bajusz
[reactos.git] / reactos / include / ddk / winddi.h
1 /*
2 * WinDDI.h - definition of the GDI - DDI interface
3 */
4
5 #ifndef __DDK_WINDDI_H
6 #define __DDK_WINDDI_H
7
8 #if defined(WIN32_LEAN_AND_MEAN) && defined(_GNU_H_WINDOWS32_STRUCTURES)
9 #error "windows.h cannot be included before winddi.h if WIN32_LEAN_AND_MEAN is defined"
10 #endif
11
12 #ifdef WIN32_LEAN_AND_MEAN
13 #undef WIN32_LEAN_AND_MEAN
14 #include <windows.h>
15 #define WIN32_LEAN_AND_MEAN
16 #else
17 #include <windows.h>
18 #endif
19 #include <ddk/ddrawint.h>
20
21 #ifndef IN
22 #define IN
23 #define OUT
24 #define OPTIONAL
25 #endif
26
27 #ifndef PTRDIFF
28 typedef DWORD PTRDIFF;
29 #endif
30
31 #define DDI_DRIVER_VERSION_NT4 0x20000
32 #define DDI_DRIVER_VERSION_SP3 0x20003
33 #define DDI_DRIVER_VERSION_NT5 0x30000
34 #define DDI_DRIVER_VERSION_NT5_01 0x30100
35
36 #define GDI_DRIVER_VERSION 0x4000 /* NT 4 compatibility */
37
38 typedef struct _FONTINFO
39 {
40 ULONG cjThis;
41 FLONG flCaps;
42 ULONG cGlyphsSupported;
43 ULONG cjMaxGlyph1;
44 ULONG cjMaxGlyph4;
45 ULONG cjMaxGlyph8;
46 ULONG cjMaxGlyph32;
47 } FONTINFO, *PFONTINFO;
48
49 typedef BYTE GAMMA_TABLES[2][256];
50 typedef GAMMA_TABLES *PGAMMA_TABLES;
51 typedef COLORADJUSTMENT *PCOLORADJUSTMENT;
52
53 typedef ULONG MIX;
54 typedef ULONG ROP4;
55 #define DDI_DRIVER_VERSION 0x00010000
56
57 #define HS_DDI_MAX 6
58
59 /* XLate types */
60 #define XO_TRIVIAL 0x00000001
61 #define XO_TABLE 0x00000002
62 #define XO_TO_MONO 0x00000004
63
64 #define XO_SRCPALETTE 1
65 #define XO_DESTPALETTE 2
66 #define XO_DESTDCPALETTE 3
67
68 /* EngCreateBitmap format types */
69 enum _BMF_TYPES
70 {
71 BMF_1BPP = 1,
72 BMF_4BPP,
73 BMF_8BPP,
74 BMF_16BPP,
75 BMF_24BPP,
76 BMF_32BPP,
77 BMF_4RLE,
78 BMF_8RLE,
79 BMF_JPEG,
80 BMF_PNG
81 };
82
83 #define BMF_TOPDOWN 0x00000001
84 #define BMF_NOZEROINIT 0x00000002
85 #define BMF_DONTCACHE 0x00000004
86 #define BMF_USERMEM 0x00000008
87 #define BMF_KMSECTION 0x00000010
88 #define BMF_NOTSYSMEM 0x0020
89 #define BMF_WINDOW_BLT 0x0040
90 #define BMF_UMPDMEM 0x0080
91 #define BMF_RESERVED 0xFF00
92
93 #define DC_TRIVIAL 0
94 #define DC_RECT 1
95 #define DC_COMPLEX 3
96
97 #define FC_RECT 1
98 #define FC_RECT4 2
99 #define FC_COMPLEX 3
100
101 #define TC_RECTANGLES 0
102 #define TC_PATHOBJ 2
103
104 #define OC_BANK_CLIP 1
105
106 #define CT_RECTANGLES 0L
107
108 #define CD_LEFTWARDS 1L
109 #define CD_UPWARDS 2L
110
111 /* Options for CLIPOBJ_cEnumStart BuildOrder field */
112 enum _CD_ORDERS
113 {
114 CD_RIGHTDOWN,
115 CD_LEFTDOWN,
116 CD_RIGHTUP,
117 CD_LEFTUP,
118 CD_ANY
119 };
120
121 /* Options for CLIPOBJ_cEnumStart Type field */
122 #define CT_RECTANGLE 1
123
124 #define DCR_SOLID 0
125 #define DCR_DRIVER 1
126 #define DCR_HALFTONE 2
127
128 #define DMMAXDEVICENAME 32
129 #define DMMAXFORMNAME 32
130
131 #define DM_DEFAULT 0x00000001
132 #define DM_MONOCHROME 0x00000002
133
134 #define ED_ABORTDOC 0x00000001
135
136 enum _ESCAPE_CODES
137 {
138 ESC_PASSTHROUGH,
139 ESC_QUERYESCSUPPORT
140 };
141
142 #define FM_INFO_TECH_TRUETYPE 0x00000001
143 #define FM_INFO_TECH_BITMAP 0x00000002
144 #define FM_INFO_TECH_STROKE 0x00000004
145 #define FM_INFO_TECH_OUTLINE_NOT_TRUETYPE 0x00000008
146 #define FM_INFO_ARB_XFORMS 0x00000010
147 #define FM_INFO_1BPP 0x00000020
148 #define FM_INFO_4BPP 0x00000040
149 #define FM_INFO_8BPP 0x00000080
150 #define FM_INFO_16BPP 0x00000100
151 #define FM_INFO_24BPP 0x00000200
152 #define FM_INFO_32BPP 0x00000400
153 #define FM_INFO_INTEGER_WIDTH 0x00000800
154 #define FM_INFO_CONSTANT_WIDTH 0x00001000
155 #define FM_INFO_NOT_CONTIGUOUS 0x00002000
156 #define FM_INFO_PID_EMBEDDED 0x00004000
157 #define FM_INFO_RETURNS_OUTLINES 0x00008000
158 #define FM_INFO_RETURNS_STROKES 0x00010000
159 #define FM_INFO_RETURNS_BITMAPS 0x00020000
160 #define FM_INFO_UNICODE_COMPLIANT 0x00040000
161 #define FM_INFO_RIGHT_HANDED 0x00080000
162 #define FM_INFO_INTEGRAL_SCALING 0x00100000
163 #define FM_INFO_90DEGREE_ROTATIONS 0x00200000
164 #define FM_INFO_OPTICALLY_FIXED_PITCH 0x00400000
165 #define FM_INFO_DO_NOT_ENUMERATE 0x00800000
166 #define FM_INFO_ISOTROPIC_SCALING_ONLY 0x01000000
167 #define FM_INFO_ANISOTROPIC_SCALING_ONLY 0x02000000
168 #define FM_INFO_TID_EMBEDDED 0x04000000
169 #define FM_INFO_FAMILY_EQUIV 0x08000000
170 #define FM_INFO_DBCS_FIXED_PITCH 0x10000000
171 #define FM_INFO_NONNEGATIVE_AC 0x20000000
172 #define FM_INFO_IGNORE_TC_RA_ABLE 0x40000000
173 #define FM_INFO_TECH_TYPE1 0x80000000
174
175 #define FM_SEL_ITALIC 0x00000001
176 #define FM_SEL_UNDERSCORE 0x00000002
177 #define FM_SEL_NEGATIVE 0x00000004
178 #define FM_SEL_OUTLINED 0x00000008
179 #define FM_SEL_STRIKEOUT 0x00000010
180 #define FM_SEL_BOLD 0x00000020
181 #define FM_SEL_REGULAR 0x00000040
182
183 #define FM_TYPE_LICENSED 0x00000002
184 #define FM_READONLY_EMBED 0x00000004
185 #define FM_EDITABLE_EMBED 0x00000008
186 #define FM_NO_EMBEDDING 0x00000002
187
188 #define FO_TYPE_RASTER RASTER_FONTTYPE
189 #define FO_TYPE_DEVICE DEVICE_FONTTYPE
190 #define FO_TYPE_TRUETYPE TRUETYPE_FONTTYPE
191 #define FO_SIM_BOLD 0x00002000
192 #define FO_SIM_ITALIC 0x00004000
193 #define FO_EM_HEIGHT 0x00008000
194 #define FO_GRAY16 0x00010000
195 #define FO_NOGRAY16 0x00020000
196 #define FO_NOHINTS 0x00040000
197 #define FO_NO_CHOICE 0x00080000
198
199 enum _FP_MODES
200 {
201 FP_ALTERNATEMODE = 1,
202 FP_WINDINGMODE
203 };
204
205 typedef struct _FD_GLYPHATTR {
206 ULONG cjThis;
207 ULONG cGlyphs;
208 ULONG iMode;
209 BYTE aGlyphAttr[1];
210 } FD_GLYPHATTR, *PFD_GLYPHATTR;
211
212 enum _GLYPH_MODE
213 {
214 FO_HGLYPHS,
215 FO_GLYPHBITS,
216 FO_PATHOBJ
217 };
218
219 /* Allowed values for GDIINFO.ulPrimaryOrder. */
220
221 #define PRIMARY_ORDER_ABC 0
222 #define PRIMARY_ORDER_ACB 1
223 #define PRIMARY_ORDER_BAC 2
224 #define PRIMARY_ORDER_BCA 3
225 #define PRIMARY_ORDER_CBA 4
226 #define PRIMARY_ORDER_CAB 5
227
228 /* Allowed values for GDIINFO.ulHTPatternSize. */
229
230 #define HT_PATSIZE_2x2 0
231 #define HT_PATSIZE_2x2_M 1
232 #define HT_PATSIZE_4x4 2
233 #define HT_PATSIZE_4x4_M 3
234 #define HT_PATSIZE_6x6 4
235 #define HT_PATSIZE_6x6_M 5
236 #define HT_PATSIZE_8x8 6
237 #define HT_PATSIZE_8x8_M 7
238 #define HT_PATSIZE_10x10 8
239 #define HT_PATSIZE_10x10_M 9
240 #define HT_PATSIZE_12x12 10
241 #define HT_PATSIZE_12x12_M 11
242 #define HT_PATSIZE_14x14 12
243 #define HT_PATSIZE_14x14_M 13
244 #define HT_PATSIZE_16x16 14
245 #define HT_PATSIZE_16x16_M 15
246 #define HT_PATSIZE_MAX_INDEX HT_PATSIZE_16x16_M
247 #define HT_PATSIZE_DEFAULT HT_PATSIZE_4x4_M
248
249 /* Allowed values for GDIINFO.ulHTOutputFormat. */
250
251 #define HT_FORMAT_1BPP 0
252 #define HT_FORMAT_4BPP 2
253 #define HT_FORMAT_4BPP_IRGB 3
254 #define HT_FORMAT_8BPP 4
255 #define HT_FORMAT_16BPP 5
256 #define HT_FORMAT_24BPP 6
257 #define HT_FORMAT_32BPP 7
258
259 /* Allowed values for GDIINFO.flHTFlags. */
260
261 #define HT_FLAG_SQUARE_DEVICE_PEL 0x00000001
262 #define HT_FLAG_HAS_BLACK_DYE 0x00000002
263 #define HT_FLAG_ADDITIVE_PRIMS 0x00000004
264 #define HT_FLAG_OUTPUT_CMY 0x00000100
265
266 #define GCAPS_BEZIERS 0x00000001
267 #define GCAPS_GEOMETRICWIDE 0x00000002
268 #define GCAPS_ALTERNATEFILL 0x00000004
269 #define GCAPS_WINDINGFILL 0x00000008
270 #define GCAPS_HALFTONE 0x00000010
271 #define GCAPS_COLOR_DITHER 0x00000020
272 #define GCAPS_HORIZSTRIKE 0x00000040
273 #define GCAPS_VERTSTRIKE 0x00000080
274 #define GCAPS_OPAQUERECT 0x00000100
275 #define GCAPS_VECTORFONT 0x00000200
276 #define GCAPS_MONO_DITHER 0x00000400
277 #define GCAPS_ASYNCCHANGE 0x00000800
278 #define GCAPS_ASYNCMOVE 0x00001000
279 #define GCAPS_DONTJOURNAL 0x00002000
280 #define GCAPS_DIRECTDRAW 0x00004000
281 #define GCAPS_ARBRUSHOPAQUE 0x00008000
282 #define GCAPS_PANNING 0x00010000
283 #define GCAPS_HIGHRESTEXT 0x00040000
284 #define GCAPS_PALMANAGED 0x00080000
285 #define GCAPS_DITHERONREALIZE 0x00200000
286 #define GCAPS_NO64BITMEMACCESS 0x00400000
287 #define GCAPS_FORCEDITHER 0x00800000
288 #define GCAPS_GRAY16 0x01000000
289
290 /* EngAssocateSurface hook flags */
291 #define HOOK_BITBLT 0x00000001
292 #define HOOK_STRETCHBLT 0x00000002
293 #define HOOK_PLGBLT 0x00000004
294 #define HOOK_TEXTOUT 0x00000008
295 #define HOOK_PAINT 0x00000010
296 #define HOOK_STROKEPATH 0x00000020
297 #define HOOK_FILLPATH 0x00000040
298 #define HOOK_STROKEANDFILLPATH 0x00000080
299 #define HOOK_LINETO 0x00000100
300 #define HOOK_COPYBITS 0x00000400
301 #define HOOK_SYNCHRONIZE 0x00001000
302 #define HOOK_SYNCHRONIZEACCESS 0x00004000
303 #define HOOK_TRANSPARENTBLT 0x00008000
304
305 enum _DRV_HOOK_FUNCS
306 {
307 INDEX_DrvEnablePDEV,
308 INDEX_DrvCompletePDEV,
309 INDEX_DrvDisablePDEV,
310 INDEX_DrvEnableSurface,
311 INDEX_DrvDisableSurface,
312 INDEX_DrvAssertMode,
313 INDEX_DrvResetPDEV = 7,
314 INDEX_DrvDisableDriver,
315 INDEX_DrvCreateDeviceBitmap = 10,
316 INDEX_DrvDeleteDeviceBitmap,
317 INDEX_DrvRealizeBrush,
318 INDEX_DrvDitherColor,
319 INDEX_DrvStrokePath,
320 INDEX_DrvFillPath,
321 INDEX_DrvStrokeAndFillPath,
322 INDEX_DrvPaint,
323 INDEX_DrvBitBlt,
324 INDEX_DrvCopyBits,
325 INDEX_DrvStretchBlt,
326 INDEX_DrvSetPalette = 22,
327 INDEX_DrvTextOut,
328 INDEX_DrvEscape,
329 INDEX_DrvDrawEscape,
330 INDEX_DrvQueryFont,
331 INDEX_DrvQueryFontTree,
332 INDEX_DrvQueryFontData,
333 INDEX_DrvSetPointerShape,
334 INDEX_DrvMovePointer,
335 INDEX_DrvLineTo,
336 INDEX_DrvSendPage,
337 INDEX_DrvStartPage,
338 INDEX_DrvEndDoc,
339 INDEX_DrvStartDoc,
340 INDEX_DrvGetGlyphMode = 37,
341 INDEX_DrvSynchronize,
342 INDEX_DrvSaveScreenBits = 40,
343 INDEX_DrvGetModes,
344 INDEX_DrvFree,
345 INDEX_DrvDestroyFont,
346 INDEX_DrvQueryFontCaps,
347 INDEX_DrvLoadFontFile,
348 INDEX_DrvUnloadFontFile,
349 INDEX_DrvFontManagement,
350 INDEX_DrvQueryTrueTypeTable,
351 INDEX_DrvQueryTrueTypeOutline,
352 INDEX_DrvGetTrueTypeFile,
353 INDEX_DrvQueryFontFile,
354 INDEX_DrvMovePanning,
355 INDEX_DrvQueryAdvanceWidths,
356 INDEX_DrvSetPixelFormat,
357 INDEX_DrvDescribePixelFormat,
358 INDEX_DrvSwapBuffers,
359 INDEX_DrvStartBanding,
360 INDEX_DrvNextBand,
361 INDEX_DrvGetDirectDrawInfo,
362 INDEX_DrvEnableDirectDraw,
363 INDEX_DrvDisableDirectDraw,
364 INDEX_DrvQuerySpoolType,
365 INDEX_DrvIcmCreateColorTransform,
366 INDEX_DrvIcmDeleteColorTransform,
367 INDEX_DrvIcmCheckBitmapBits,
368 INDEX_DrvIcmSetDeviceGammaRamp,
369 INDEX_DrvGradientFill,
370 INDEX_DrvStretchBltROP,
371 INDEX_DrvPlgBlt,
372 INDEX_DrvAlphaBlend,
373 INDEX_DrvSynthesizeFont,
374 INDEX_DrvGetSynthesizedFontFiles,
375 INDEX_DrvTransparentBlt,
376 INDEX_DrvQueryPerBandInfo,
377 INDEX_DrvQueryDeviceSupport,
378 INDEX_DrvReserved1,
379 INDEX_DrvReserved2,
380 INDEX_DrvReserved3,
381 INDEX_DrvReserved4,
382 INDEX_DrvReserved5,
383 INDEX_DrvReserved6,
384 INDEX_DrvReserved7,
385 INDEX_DrvReserved8,
386 INDEX_DrvQueryGlyphAttrs,
387 INDEX_DrvNotify,
388 INDEX_DrvSynchronizeSurface,
389 INDEX_DrvResetDevice,
390 INDEX_DrvReserved9,
391 INDEX_DrvReserved10,
392 INDEX_DrvReserved11,
393 INDEX_DrvDeriveSurface = 85,
394 INDEX_LAST
395 };
396
397 /* EngCreatePalette mode types */
398 #define PAL_INDEXED 0x00000001
399 #define PAL_BITFIELDS 0x00000002
400 #define PAL_RGB 0x00000004
401 #define PAL_BGR 0x00000008
402
403 enum _QUERY_ADVANCE_WIDTH_TYPES
404 {
405 QAW_GETWIDTHS = 1,
406 QAW_GETEASYWIDTHS
407 };
408
409 #define QC_OUTLINES 0x00000001
410 #define QC_1BIT 0x00000002
411 #define QC_4BIT 0x00000004
412
413 enum _QFF_MODES
414 {
415 QFF_DESCRIPTION = 1,
416 QFF_NUMFACES
417 };
418
419 #define RB_DITHERCOLOR 0x80000000
420
421 enum _SPS_RC
422 {
423 SPS_ERROR,
424 SPS_DECLINE,
425 SPS_ACCEPT_NOEXCLUDE,
426 SPS_ACCEPT_EXCLUDE
427 };
428
429 #define SPS_CHANGE 0x00000001L
430 #define SPS_ASYNCCHANGE 0x00000002L
431 #define SPS_ANIMATESTART 0x00000004L
432 #define SPS_ANIMATEUPDATE 0x00000008L
433
434 #define SS_SAVE 0
435 #define SS_RESTORE 1
436 #define SS_FREE 2
437
438 enum _SURF_TYPES
439 {
440 STYPE_BITMAP = 0,
441 STYPE_DEVICE = 1,
442 STYPE_DEVBITMAP = 3
443 };
444
445 #define WO_RGN_CLIENT_DELTA 0x00000001
446 #define WO_RGN_CLIENT 0x00000002
447 #define WO_RGN_SURFACE_DELTA 0x00000004
448 #define WO_RGN_SURFACE 0x00000008
449 #define WO_RGN_UPDATE_ALL 0x00000010
450
451 #define WOC_RGN_CLIENT_DELTA 0x00000001
452 #define WOC_RGN_CLIENT 0x00000002
453 #define WOC_RGN_SURFACE_DELTA 0x00000004
454 #define WOC_RGN_SURFACE 0x00000008
455 #define WOC_CHANGED 0x00000010
456 #define WOC_DELETE 0x00000020
457
458 typedef HANDLE HDEV;
459 typedef HANDLE HGLYPH;
460 typedef HANDLE HSURF;
461 typedef HANDLE DHPDEV;
462 typedef HANDLE DHSURF;
463 typedef ULONG (*PFN)(VOID);
464 typedef ULONG IDENT;
465
466 typedef struct _DRVFN
467 {
468 ULONG iFunc;
469 PFN pfn;
470 } DRVFN, *PDRVFN;
471
472 /*
473 * DRVENABLEDATA - this structure is passed to the DDI from the GDI
474 * in the function DrvEnableDriver to determine driver parameters.
475 */
476
477 typedef struct _DRVENABLEDATA
478 {
479 ULONG iDriverVersion;
480 ULONG c;
481 DRVFN *pdrvfn;
482 } DRVENABLEDATA, *PDRVENABLEDATA;
483
484 typedef LONG LDECI4;
485
486 typedef struct _CIECHROMA
487 {
488 LDECI4 x;
489 LDECI4 y;
490 LDECI4 Y;
491 } CIECHROMA, *PCIECHROMA;
492
493 typedef struct _COLORINFO
494 {
495 CIECHROMA Red;
496 CIECHROMA Green;
497 CIECHROMA Blue;
498 CIECHROMA Cyan;
499 CIECHROMA Magenta;
500 CIECHROMA Yellow;
501 CIECHROMA AlignmentWhite;
502 LDECI4 RedGamma;
503 LDECI4 GreenGamma;
504 LDECI4 BlueGamma;
505 LDECI4 MagentaInCyanDye;
506 LDECI4 YellowInCyanDye;
507 LDECI4 CyanInMagentaDye;
508 LDECI4 YellowInMagentaDye;
509 LDECI4 CyanInYellowDye;
510 LDECI4 MagentaInYellowDye;
511 } COLORINFO, *PCOLORINFO;
512
513 typedef struct _DEVINFO
514 {
515 ULONG flGraphicsCaps;
516 LOGFONTW lfDefaultFont;
517 LOGFONTW lfAnsiVarFont;
518 LOGFONTW lfAnsiFixFont;
519 ULONG cFonts;
520 ULONG iDitherFormat;
521 USHORT cxDither;
522 USHORT cyDither;
523 HPALETTE hpalDefault;
524 } DEVINFO, *PDEVINFO;
525
526 typedef struct _GDIINFO
527 {
528 ULONG ulVersion;
529 ULONG ulTechnology;
530 ULONG ulHorzSize;
531 ULONG ulVertSize;
532 ULONG ulHorzRes;
533 ULONG ulVertRes;
534 ULONG cBitsPixel;
535 ULONG cPlanes;
536 ULONG ulNumColors;
537 ULONG flRaster;
538 ULONG ulLogPixelsX;
539 ULONG ulLogPixelsY;
540 ULONG flTextCaps;
541 ULONG ulDACRed;
542 ULONG ulDACGreen;
543 ULONG ulDACBlue;
544 ULONG ulAspectX;
545 ULONG ulAspectY;
546 ULONG ulAspectXY;
547 LONG xStyleStep;
548 LONG yStyleStep;
549 LONG denStyleStep;
550 POINTL ptlPhysOffset;
551 SIZEL szlPhysSize;
552 ULONG ulNumPalReg;
553 COLORINFO ciDevice;
554 ULONG ulDevicePelsDPI;
555 ULONG ulPrimaryOrder;
556 ULONG ulHTPatternSize;
557 ULONG ulHTOutputFormat;
558 ULONG flHTFlags;
559 ULONG ulVRefresh;
560 ULONG ulBltAlignment;
561 ULONG ulPanningHorzRes;
562 ULONG ulPanningVertRes;
563 } GDIINFO, *PGDIINFO;
564
565 typedef struct _BRUSHOBJ
566 {
567 ULONG iSolidColor;
568 PVOID pvRbrush;
569 FLONG flColorType;
570 /* remainder of fields are for GDI internal use */
571 LOGBRUSH logbrush;
572 } BRUSHOBJ, *PBRUSHOBJ;
573
574 typedef struct _CLIPOBJ
575 {
576 ULONG iUniq;
577 RECTL rclBounds;
578 BYTE iDComplexity;
579 BYTE iFComplexity;
580 BYTE iMode;
581 BYTE fjOptions;
582 } CLIPOBJ, *PCLIPOBJ;
583
584 typedef struct _ENUMRECTS
585 {
586 ULONG c;
587 RECTL arcl[1];
588 } ENUMRECTS, *PENUMRECTS;
589
590 typedef struct _BLENDOBJ
591 {
592 BLENDFUNCTION BlendFunction;
593 }BLENDOBJ,*PBLENDOBJ;
594
595 typedef struct
596 {
597 DWORD nSize;
598 HDC hdc;
599 PBYTE pvEMF;
600 PBYTE pvCurrentRecord;
601 } EMFINFO, *PEMFINFO;
602
603 typedef struct _FONTOBJ
604 {
605 ULONG iUniq;
606 ULONG iFace;
607 ULONG cxMax;
608 ULONG flFontType;
609 ULONG iTTUniq;
610 ULONG iFile;
611 SIZE sizLogResPpi;
612 ULONG ulStyleSize;
613 PVOID pvConsumer;
614 PVOID pvProducer;
615 } FONTOBJ, *PFONTOBJ;
616
617 typedef struct _IFIMETRICS
618 {
619 ULONG cjThis;
620 ULONG ulVersion;
621 PTRDIFF dpwszFamilyName;
622 PTRDIFF dpwszStyleName;
623 PTRDIFF dpwszFaceName;
624 PTRDIFF dpwszUniqueName;
625 PTRDIFF dpFontSim;
626 LONG lEmbedId;
627 LONG lItalicAngle;
628 LONG lCharBias;
629 PTRDIFF dpCharSets;
630 BYTE jWinCharSet;
631 BYTE jWinPitchAndFamily;
632 USHORT usWinWeight;
633 ULONG flInfo;
634 USHORT fsSelection;
635 USHORT fsType;
636 WORD fwdUnitsPerEm;
637 WORD fwdLowestPPEm;
638 WORD fwdWinAscender;
639 WORD fwdWinDescender;
640 WORD fwdMacAscender;
641 WORD fwdMacDescender;
642 WORD fwdMacLineGap;
643 WORD fwdTypoAscender;
644 WORD fwdTypoDescender;
645 WORD fwdTypoLineGap;
646 WORD fwdAveCharWidth;
647 WORD fwdMaxCharInc;
648 WORD fwdCapHeight;
649 WORD fwdXHeight;
650 WORD fwdSubScriptXSize;
651 WORD fwdSubScriptYSize;
652 WORD fwdSubScriptXOffset;
653 WORD fwdSubScriptYOffset;
654 WORD fwdSuperScriptXSize;
655 WORD fwdSuperScriptYSize;
656 WORD fwdSuperScriptXOffset;
657 WORD fwdSuperScriptYOffset;
658 WORD fwdUnderscoreSize;
659 WORD fwdUnderscorePosition;
660 WORD fwdStrikeoutSize;
661 WORD fwdStrikeoutPosition;
662 BYTE chFirstChar;
663 BYTE chLastChar;
664 BYTE chDefaultChar;
665 BYTE chBreakChar;
666 WCHAR wcFirstChar;
667 WCHAR wcLastChar;
668 WCHAR wcDefaultChar;
669 WCHAR wcBreakChar;
670 POINTL ptlBaseline;
671 POINTL ptlAspect;
672 POINTL ptlCaret;
673 RECTL rclFontBox;
674 BYTE achVendId[4];
675 ULONG cKerningPairs;
676 ULONG ulPanoseCulture;
677 PANOSE panose;
678 } IFIMETRICS, *PIFIMETRICS;
679
680 #define NB_RESERVED_COLORS 20 /* number of fixed colors in system palette */
681
682 typedef struct _XLATEOBJ
683 {
684 ULONG iUniq;
685 ULONG flXlate;
686 USHORT iSrcType;
687 USHORT iDstType;
688 ULONG cEntries;
689 ULONG *pulXlate;
690 } XLATEOBJ, *PXLATEOBJ;
691
692 typedef struct _PALOBJ
693 {
694 ULONG ulReserved;
695 PXLATEOBJ logicalToSystem;
696 int *mapping;
697 PLOGPALETTE logpalette; /* _MUST_ be the last field */
698 } PALOBJ, *PPALOBJ;
699
700 typedef struct _PATHOBJ
701 {
702 ULONG fl;
703 ULONG cCurves;
704 } PATHOBJ, *PPATHOBJ;
705
706 typedef struct _SURFOBJ
707 {
708 DHSURF dhsurf;
709 HSURF hsurf;
710 DHPDEV dhpdev;
711 HDEV hdev;
712 SIZEL sizlBitmap;
713 ULONG cjBits;
714 PVOID pvBits;
715 PVOID pvScan0;
716 LONG lDelta;
717 ULONG iUniq;
718 ULONG iBitmapFormat;
719 USHORT iType;
720 USHORT fjBitmap;
721 } SURFOBJ, *PSURFOBJ;
722
723 typedef struct _WNDOBJ
724 {
725 CLIPOBJ coClient;
726 PVOID pvConsumer;
727 RECTL rclClient;
728 } WNDOBJ, *PWNDOBJ;
729
730 typedef VOID (CALLBACK * WNDOBJCHANGEPROC)(PWNDOBJ WndObj, ULONG Flags);
731
732 typedef struct _XFORMOBJ
733 {
734 ULONG ulReserved;
735 } XFORMOBJ, *PXFORMOBJ;
736
737 typedef struct _GLYPHBITS
738 {
739 POINTL ptlOrigin;
740 SIZEL sizlBitmap;
741 BYTE aj[1];
742 } GLYPHBITS;
743
744 typedef union _GLYPHDEF
745 {
746 GLYPHBITS *pgb;
747 PATHOBJ *ppo;
748 } GLYPHDEF;
749
750 typedef struct _POINTQF
751 {
752 LARGE_INTEGER x;
753 LARGE_INTEGER y;
754 } POINTQF, *PPOINTQF;
755
756 typedef struct _GLYPHDATA {
757 GLYPHDEF gdf;
758 HGLYPH hg;
759 FIX fxD;
760 FIX fxA;
761 FIX fxAB;
762 FIX fxInkTop;
763 FIX fxInkBottom;
764 RECTL rclInk;
765 POINTQF ptqD;
766 } GLYPHDATA, *PGLYPHDATA;
767
768 typedef struct _GLYPHPOS
769 {
770 HGLYPH hg;
771 GLYPHDEF *pgdf;
772 POINTL *ptl;
773 } GLYPHPOS, *PGLYPHPOS;
774
775 typedef struct _STROBJ
776 {
777 ULONG cGlyphs;
778 FLONG flAccel;
779 ULONG ulCharInc;
780 RECTL rclBkGround;
781 GLYPHPOS *pgp;
782 LPWSTR pwszOrg;
783 } STROBJ, *PSTROBJ;
784
785 typedef struct _WCRUN
786 {
787 WCHAR wcLow;
788 USHORT cGlyphs;
789 HGLYPH *phg;
790 } WCRUN, *PWCRUN;
791
792 typedef struct _FD_GLYPHSET
793 {
794 ULONG cjThis;
795 FLONG flAccel;
796 ULONG cGlyphsSupported;
797 ULONG cRuns;
798 WCRUN awcrun[1];
799 } FD_GLYPHSET, *PFD_GLYPHSET;
800
801 struct _DRIVEROBJ;
802
803 typedef BOOL (CALLBACK * FREEOBJPROC) (struct _DRIVEROBJ* pDriverObj);
804
805 typedef struct _DRIVEROBJ
806 {
807 PVOID pvObj;
808 FREEOBJPROC pFreeProc;
809 HDEV hdev;
810 DHPDEV dhpdev;
811 } DRIVEROBJ;
812
813 typedef struct _TYPE1_FONT
814 {
815 HANDLE hPFM;
816 HANDLE hPFB;
817 ULONG ulIdentifier;
818 } TYPE1_FONT;
819
820 typedef struct _ENG_TIME_FIELDS
821 {
822 USHORT usYear;
823 USHORT usMonth;
824 USHORT usDay;
825 USHORT usHour;
826 USHORT usMinute;
827 USHORT usSecond;
828 USHORT usMilliseconds;
829 USHORT usWeekday;
830 } ENG_TIME_FIELDS, *PENG_TIME_FIELDS;
831
832 typedef struct _LINEATTRS
833 {
834 FLONG fl;
835 ULONG iJoin;
836 ULONG iEndCap;
837 FLOAT_LONG elWidth;
838 FLOATL eMiterLimit;
839 ULONG cstyle;
840 PFLOAT_LONG pstyle;
841 FLOAT_LONG elStyleState;
842 } LINEATTRS, *PLINEATTRS;
843
844 typedef struct _FLOATOBJ
845 {
846 ULONG ul1,
847 ul2;
848 } FLOATOBJ, *PFLOATOBJ;
849
850 typedef struct _POINTFIX
851 {
852 FIX x,
853 y;
854 } POINTFIX;
855
856 typedef struct _PATHDATA
857 {
858 FLONG flags;
859 ULONG count;
860 POINTFIX *pptfx;
861 } PATHDATA, *PPATHDATA;
862
863 typedef struct _RUN
864 {
865 LONG iStart;
866 LONG iStop;
867 } RUN, *PRUN;
868
869 typedef struct _CLIPLINE
870 {
871 POINTFIX ptfxA;
872 POINTFIX ptfxB;
873 LONG lStyleState;
874 ULONG c;
875 RUN arun[1];
876 } CLIPLINE, *PCLIPLINE;
877
878 typedef struct _RECTFX
879 {
880 FIX xLeft,
881 yTop,
882 xRight,
883 yBottom;
884 } RECTFX, *PRECTFX;
885
886 typedef struct
887 {
888 FLOATOBJ eM11,
889 eM12,
890 eM21,
891 eM22,
892 eDx,
893 eDy;
894 } FLOATOBJ_XFORM, *PFLOATOBJ_XFORM, FAR *LPFLOATOBJ_XFORM;
895
896 typedef struct _XFORML
897 {
898 FLOATL eM11,
899 eM12,
900 eM21,
901 eM22,
902 eDx,
903 eDy;
904 } XFORML, *PXFORML;
905
906 /*
907 * Functions Prefixed with Drv are calls made from GDI to DDI, and
908 * everything else are calls made from DDI to GDI. DDI is
909 * not allowed to make calls to any other kernel or user modules.
910 */
911
912 /* GDI --> DDI calls */
913 BOOL STDCALL
914 DrvAssertMode(IN DHPDEV PDev,
915 IN BOOL ShouldEnable);
916
917 BOOL STDCALL
918 DrvBitBlt(IN PSURFOBJ DestSurface,
919 IN PSURFOBJ SrcSurface,
920 IN PSURFOBJ MaskSurface,
921 IN PCLIPOBJ ClipObj,
922 IN PXLATEOBJ XLateObj,
923 IN PRECTL DestRectL,
924 IN PPOINTL SrcPointL,
925 IN PPOINTL MaskPointL,
926 IN PBRUSHOBJ BrushObj,
927 IN PPOINTL BrushPointL,
928 IN ROP4 RasterOp);
929 VOID STDCALL
930 DrvCompletePDEV(IN DHPDEV PDev,
931 IN HDEV Dev);
932 BOOL STDCALL
933 DrvCopyBits(OUT PSURFOBJ DestSurface,
934 IN PSURFOBJ SrcSurface,
935 IN PCLIPOBJ ClipObj,
936 IN PXLATEOBJ XLateObj,
937 IN PRECTL DestRectL,
938 IN PPOINTL SrcPointL);
939 HBITMAP STDCALL
940 DrvCreateDeviceBitmap(IN DHPDEV DPev,
941 IN SIZEL SizeL,
942 IN ULONG Format);
943 VOID STDCALL
944 DrvDeleteDeviceBitmap(IN DHSURF Surface);
945 LONG STDCALL
946 DrvDescribePixelFormat(IN DHPDEV DPev,
947 IN LONG PixelFormat,
948 IN ULONG DescriptorSize,
949 OUT PPIXELFORMATDESCRIPTOR PFD);
950 VOID STDCALL
951 DrvDestroyFont(IN PFONTOBJ FontObj);
952 VOID STDCALL
953 DrvDisableDirectDraw(IN DHPDEV PDev);
954 VOID STDCALL
955 DrvDisableDriver(VOID);
956 VOID STDCALL
957 DrvDisablePDEV(IN DHPDEV PDev);
958 VOID STDCALL
959 DrvDisableSurface(IN DHPDEV PDev);
960 ULONG STDCALL
961 DrvDitherColor(IN DHPDEV DPev,
962 IN ULONG Mode,
963 IN ULONG RGB,
964 OUT PULONG DitherBits);
965 ULONG STDCALL
966 DrvDrawEscape(IN PSURFOBJ SurfObj,
967 IN ULONG EscCode,
968 IN PCLIPOBJ ClipObj,
969 IN PRECTL RectL,
970 IN ULONG InputSize,
971 IN PVOID *InputData);
972 BOOL STDCALL
973 DrvEnableDirectDraw(IN DHPDEV PDev,
974 IN PDD_CALLBACKS Callbacks,
975 IN PDD_SURFACECALLBACKS SurfaceCallbacks,
976 IN PDD_PALETTECALLBACKS PaletteCallbacks);
977 BOOL STDCALL
978 DrvEnableDriver(IN ULONG Version,
979 IN ULONG DEDSize,
980 OUT PDRVENABLEDATA DED);
981 DHPDEV STDCALL
982 DrvEnablePDEV(IN DEVMODEW *DM,
983 IN LPWSTR LogAddress,
984 IN ULONG PatternCount,
985 OUT HSURF *SurfPatterns,
986 IN ULONG GDIInfoSize,
987 OUT GDIINFO *GDIInfo,
988 IN ULONG DevInfoSize,
989 OUT DEVINFO *DevInfo,
990 IN LPWSTR DevDataFile,
991 IN LPWSTR DeviceName,
992 IN HANDLE Driver);
993 HSURF STDCALL
994 DrvEnableSurface(IN DHPDEV PDev);
995 BOOL STDCALL
996 DrvEndDoc(IN PSURFOBJ SurfObj,
997 IN ULONG Flags);
998 ULONG STDCALL
999 DrvEscape(IN PSURFOBJ SurfObj,
1000 IN ULONG EscCode,
1001 IN ULONG InputSize,
1002 IN PVOID *InputData,
1003 IN ULONG OutputSize,
1004 OUT PVOID *OutputData);
1005 BOOL STDCALL
1006 DrvFillPath(IN PSURFOBJ SurfObj,
1007 IN PPATHOBJ PathObj,
1008 IN PCLIPOBJ ClipObj,
1009 IN PBRUSHOBJ BrushObj,
1010 IN PPOINTL BrushOrg,
1011 IN MIX Mix,
1012 IN ULONG Options);
1013 ULONG STDCALL
1014 DrvFontManagement(IN PSURFOBJ SurfObj,
1015 IN PFONTOBJ FontObj,
1016 IN ULONG Mode,
1017 IN ULONG InputSize,
1018 IN PVOID InputData,
1019 IN ULONG OutputSize,
1020 OUT PVOID OutputData);
1021 VOID STDCALL
1022 DrvFree(IN PVOID Obj,
1023 IN ULONG ID);
1024 BOOL STDCALL
1025 DrvGetDirectDrawInfo(IN DHPDEV PDev,
1026 IN PDD_HALINFO HalInfo,
1027 IN PDWORD NumHeaps,
1028 IN PVIDEOMEMORY List,
1029 IN PDWORD NumFourCCCodes,
1030 IN PDWORD FourCC);
1031 ULONG STDCALL
1032 DrvGetGlyphMode(IN DHPDEV DPev,
1033 IN PFONTOBJ FontObj);
1034 ULONG STDCALL
1035 DrvGetModes(IN HANDLE Driver,
1036 IN ULONG DataSize,
1037 OUT PDEVMODEW DM);
1038 PVOID STDCALL
1039 DrvGetTrueTypeFile(IN ULONG FileNumber,
1040 IN PULONG Size);
1041 BOOL STDCALL
1042 DrvLineTo(IN PSURFOBJ SurfObj,
1043 IN PCLIPOBJ ClipObj,
1044 IN PBRUSHOBJ BrushObj,
1045 IN LONG x1,
1046 IN LONG y1,
1047 IN LONG x2,
1048 IN LONG y2,
1049 IN PRECTL Bounds,
1050 IN MIX Mix);
1051 ULONG STDCALL
1052 DrvLoadFontFile(IN ULONG FileNumber,
1053 IN PVOID ViewData,
1054 IN ULONG ViewSize,
1055 IN ULONG LangID);
1056 VOID STDCALL
1057 DrvMovePointer(IN PSURFOBJ SurfObj,
1058 IN LONG x,
1059 IN LONG y,
1060 IN PRECTL RectL);
1061 BOOL STDCALL
1062 DrvNextBand(IN PSURFOBJ SurfObj,
1063 OUT PPOINTL PointL);
1064 BOOL STDCALL
1065 DrvPaint(IN PSURFOBJ SurfObj,
1066 IN PCLIPOBJ ClipObj,
1067 IN PBRUSHOBJ BrushObj,
1068 IN PPOINTL BrushOrg,
1069 IN MIX Mix);
1070 BOOL STDCALL
1071 DrvQueryAdvanceWidths(IN DHPDEV DPev,
1072 IN PFONTOBJ FontObj,
1073 IN ULONG Mode,
1074 IN HGLYPH Glyph,
1075 OUT PVOID *Widths,
1076 IN ULONG NumGlyphs);
1077 PIFIMETRICS STDCALL
1078 DrvQueryFont(IN DHPDEV PDev,
1079 IN ULONG FileNumber,
1080 IN ULONG FaceIndex,
1081 IN PULONG Identifier);
1082 LONG STDCALL
1083 DrvQueryFontCaps(IN ULONG CapsSize,
1084 OUT PULONG CapsData);
1085 LONG STDCALL
1086 DrvQueryFontData(IN DHPDEV DPev,
1087 IN PFONTOBJ FontObj,
1088 IN ULONG Mode,
1089 IN HGLYPH Glyph,
1090 IN PGLYPHDATA GlyphData,
1091 IN PVOID DataBuffer,
1092 IN ULONG BufferSize);
1093 LONG STDCALL
1094 DrvQueryFontFile(IN ULONG FileNumber,
1095 IN ULONG Mode,
1096 IN ULONG BufSize,
1097 OUT PULONG Buf);
1098 PVOID STDCALL
1099 DrvQueryFontTree(IN DHPDEV PDev,
1100 IN ULONG FileNumber,
1101 IN ULONG FaceIndex,
1102 IN ULONG Mode,
1103 OUT ULONG *ID);
1104 BOOL STDCALL
1105 DrvQuerySpoolType(DHPDEV PDev,
1106 LPWSTR SpoolType);
1107 LONG STDCALL
1108 DrvQueryTrueTypeOutline(IN DHPDEV PDev,
1109 IN PFONTOBJ FontObj,
1110 IN HGLYPH Glyph,
1111 IN BOOL MetricsOnly,
1112 IN PGLYPHDATA GlyphData,
1113 IN ULONG BufSize,
1114 OUT PTTPOLYGONHEADER Polygons);
1115 LONG STDCALL
1116 DrvQueryTrueTypeTable(IN ULONG FileNumber,
1117 IN ULONG Font,
1118 IN ULONG Tag,
1119 IN PTRDIFF Start,
1120 IN ULONG BufSize,
1121 OUT BYTE *Buf);
1122 BOOL STDCALL
1123 DrvRealizeBrush(IN PBRUSHOBJ BrushObj,
1124 IN PSURFOBJ TargetSurface,
1125 IN PSURFOBJ PatternSurface,
1126 IN PSURFOBJ MaskSurface,
1127 IN PXLATEOBJ XLateObj,
1128 IN ULONG iHatch);
1129 BOOL STDCALL
1130 DrvResetPDEV(IN DHPDEV PDevOld,
1131 IN DHPDEV PDevNew);
1132 ULONG STDCALL
1133 DrvSaveScreenBits(IN PSURFOBJ SurfObj,
1134 IN ULONG Mode,
1135 IN ULONG ID,
1136 IN PRECTL RectL);
1137 BOOL STDCALL
1138 DrvSendPage(IN PSURFOBJ SurfObj);
1139 BOOL STDCALL
1140 DrvSetPalette(IN DHPDEV PDev,
1141 IN PPALOBJ PaletteObj,
1142 IN ULONG Flags,
1143 IN ULONG Start,
1144 IN ULONG NumColors);
1145 ULONG STDCALL
1146 DrvSetPointerShape(IN PSURFOBJ SurfObj,
1147 IN PSURFOBJ MaskSurface,
1148 IN PSURFOBJ ColorSurface,
1149 IN PXLATEOBJ XLateObj,
1150 IN LONG xHot,
1151 IN LONG yHot,
1152 IN LONG x,
1153 IN LONG y,
1154 IN PRECTL RectL,
1155 IN ULONG Flags);
1156 BOOL STDCALL
1157 DrvStartBanding(IN PSURFOBJ SurfObj,
1158 IN PPOINTL PointL);
1159 BOOL STDCALL
1160 DrvStartDoc(IN PSURFOBJ SurfObj,
1161 IN LPWSTR DocName,
1162 IN DWORD JobID);
1163 BOOL STDCALL
1164 DrvStartPage(IN PSURFOBJ SurfObj);
1165 BOOL STDCALL
1166 DrvStretchBlt(IN PSURFOBJ DestSurface,
1167 IN PSURFOBJ SrcSurface,
1168 IN PSURFOBJ MaskSurface,
1169 IN PCLIPOBJ ClipObj,
1170 IN PXLATEOBJ XLateObj,
1171 IN PCOLORADJUSTMENT CA,
1172 IN PPOINTL HTOrg,
1173 IN PRECTL Dest,
1174 IN PRECTL Src,
1175 IN PPOINTL Mask,
1176 IN ULONG Mode);
1177 BOOL STDCALL
1178 DrvStrokeAndFillPath(IN PSURFOBJ SurfObj,
1179 IN PPATHOBJ PathObj,
1180 IN PCLIPOBJ ClipObj,
1181 IN PXFORMOBJ XFormObj,
1182 IN PBRUSHOBJ StrokeBrush,
1183 IN PLINEATTRS LineAttrs,
1184 IN PBRUSHOBJ FillBrush,
1185 IN PPOINTL BrushOrg,
1186 IN MIX MixFill,
1187 IN ULONG Options);
1188 BOOL STDCALL
1189 DrvStrokePath(IN PSURFOBJ SurfObj,
1190 IN PPATHOBJ PathObj,
1191 IN PCLIPOBJ PClipObj,
1192 IN PXFORMOBJ XFormObj,
1193 IN PBRUSHOBJ BrushObj,
1194 IN PPOINTL BrushOrg,
1195 IN PLINEATTRS LineAttrs,
1196 IN MIX Mix);
1197 VOID STDCALL
1198 DrvSynchronize(IN DHPDEV PDev,
1199 IN PRECTL RectL);
1200 BOOL STDCALL
1201 DrvTextOut(IN PSURFOBJ SurfObj,
1202 IN PSTROBJ StrObj,
1203 IN PFONTOBJ FontObj,
1204 IN PCLIPOBJ ClipObj,
1205 IN PRECTL ExtraRect,
1206 IN PRECTL OpaqueRect,
1207 IN PBRUSHOBJ ForegroundBrush,
1208 IN PBRUSHOBJ OpaqueBrush,
1209 IN PPOINTL OrgPoint,
1210 IN MIX Mix);
1211 BOOL STDCALL
1212 DrvTransparentBlt(PSURFOBJ Dest,
1213 PSURFOBJ Source,
1214 PCLIPOBJ Clip,
1215 PXLATEOBJ ColorTranslation,
1216 PRECTL DestRect,
1217 PRECTL SourceRect,
1218 ULONG TransparentColor,
1219 ULONG Reserved);
1220 BOOL STDCALL
1221 DrvUnloadFontFile(IN ULONG FileNumber);
1222
1223 /* DDI --> GDI calls */
1224 PVOID STDCALL
1225 BRUSHOBJ_pvAllocRbrush(IN PBRUSHOBJ BrushObj,
1226 IN ULONG ObjSize);
1227 PVOID STDCALL
1228 BRUSHOBJ_pvGetRbrush(IN PBRUSHOBJ BrushObj);
1229
1230 BOOL STDCALL
1231 CLIPOBJ_bEnum(IN PCLIPOBJ ClipObj,
1232 IN ULONG ObjSize,
1233 OUT ULONG *EnumRects);
1234
1235 ULONG STDCALL
1236 CLIPOBJ_cEnumStart(IN PCLIPOBJ ClipObj,
1237 IN BOOL ShouldDoAll,
1238 IN ULONG ClipType,
1239 IN ULONG BuildOrder,
1240 IN ULONG MaxRects);
1241
1242 PPATHOBJ STDCALL
1243 CLIPOBJ_ppoGetPath(PCLIPOBJ ClipObj);
1244
1245 #define FL_ZERO_MEMORY 1
1246 #define FL_NONPAGED_MEMORY 2
1247
1248 PVOID STDCALL
1249 EngAllocMem(ULONG Flags,
1250 ULONG MemSize,
1251 ULONG Tag);
1252
1253 PVOID STDCALL
1254 EngAllocUserMem(ULONG cj,
1255 ULONG tag);
1256
1257 BOOL STDCALL
1258 EngAssociateSurface(IN HSURF Surface,
1259 IN HDEV Dev,
1260 IN ULONG Hooks);
1261
1262 BOOL STDCALL
1263 EngBitBlt(SURFOBJ *Dest,
1264 SURFOBJ *Source,
1265 SURFOBJ *Mask,
1266 CLIPOBJ *ClipRegion,
1267 XLATEOBJ *ColorTranslation,
1268 RECTL *DestRect,
1269 POINTL *SourcePoint,
1270 POINTL *MaskRect,
1271 BRUSHOBJ *Brush,
1272 POINTL *BrushOrigin,
1273 ROP4 rop4);
1274
1275 /*
1276 EngComputeGlyphSet
1277 */
1278
1279 BOOL STDCALL
1280 EngCopyBits(SURFOBJ *Dest,
1281 SURFOBJ *Source,
1282 CLIPOBJ *Clip,
1283 XLATEOBJ *ColorTranslation,
1284 RECTL *DestRect,
1285 POINTL *SourcePoint);
1286
1287 HBITMAP STDCALL
1288 EngCreateBitmap(IN SIZEL Size,
1289 IN LONG Width,
1290 IN ULONG Format,
1291 IN ULONG Flags,
1292 IN PVOID Bits);
1293
1294 PCLIPOBJ STDCALL
1295 EngCreateClip(VOID);
1296
1297 HBITMAP STDCALL
1298 EngCreateDeviceBitmap(IN DHSURF Surface,
1299 IN SIZEL Size,
1300 IN ULONG Format);
1301
1302 HSURF STDCALL
1303 EngCreateDeviceSurface(IN DHSURF Surface,
1304 IN SIZEL Size,
1305 IN ULONG FormatVersion);
1306
1307 /*
1308 EngCreateDriverObj
1309 EngCreateEvent
1310 */
1311
1312 HPALETTE STDCALL
1313 EngCreatePalette(IN ULONG Mode,
1314 IN ULONG NumColors,
1315 IN ULONG *Colors,
1316 IN ULONG Red,
1317 IN ULONG Green,
1318 IN ULONG Blue);
1319
1320 HSEMAPHORE
1321 STDCALL
1322 EngCreateSemaphore ( VOID );
1323
1324 VOID
1325 STDCALL
1326 EngAcquireSemaphore ( IN HSEMAPHORE hsem );
1327
1328 VOID
1329 STDCALL
1330 EngReleaseSemaphore ( IN HSEMAPHORE hsem );
1331
1332 VOID
1333 STDCALL
1334 EngDeleteSemaphore ( IN HSEMAPHORE hsem );
1335
1336 BOOL
1337 STDCALL
1338 EngIsSemaphoreOwned ( IN HSEMAPHORE hsem );
1339
1340 BOOL
1341 STDCALL
1342 EngIsSemaphoreOwnedByCurrentThread ( IN HSEMAPHORE hsem );
1343
1344 /*
1345 EngCreatePath
1346 EngCreateSemaphore
1347 EngCreateWnd
1348 */
1349
1350 VOID STDCALL
1351 EngDebugBreak(VOID);
1352
1353 VOID STDCALL
1354 EngDebugPrint(PCHAR StandardPrefix,
1355 PCHAR DebugMessage,
1356 va_list ArgList);
1357
1358 VOID STDCALL
1359 EngDeleteClip(CLIPOBJ *ClipRegion);
1360
1361 /*
1362 EngDeleteDriverObj
1363 EngDeleteEvent
1364 */
1365
1366 BOOL STDCALL
1367 EngDeletePalette(IN HPALETTE Palette);
1368
1369 BOOL STDCALL
1370 EngDeleteSurface(IN HSURF Surface);
1371
1372 /*
1373 EngDeleteWnd
1374 */
1375
1376 DWORD STDCALL
1377 EngDeviceIoControl(HANDLE hDevice,
1378 DWORD dwIoControlCode,
1379 LPVOID lpInBuffer,
1380 DWORD nInBufferSize,
1381 LPVOID lpOutBuffer,
1382 DWORD nOutBufferSize,
1383 DWORD *lpBytesReturned);
1384
1385 /*
1386 EngEnumForms
1387 */
1388
1389 BOOL STDCALL
1390 EngEraseSurface(SURFOBJ *Surface,
1391 RECTL *Rect,
1392 ULONG iColor);
1393
1394 /*
1395 EngFindImageProcAddress
1396 EngFindResource
1397 */
1398
1399 VOID STDCALL
1400 EngFreeMem(PVOID Mem);
1401
1402 /*
1403 EngFreeModule
1404 */
1405
1406 VOID STDCALL
1407 EngFreeUserMem(PVOID pv);
1408
1409 VOID STDCALL
1410 EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
1411 OUT PUSHORT AnsiCodePage);
1412
1413 /*
1414 EngGetFileChangeTime
1415 EngGetFilePath
1416 EngGetForm
1417 EngGetLastError
1418 EngGetPrinter
1419 EngGetPrinterData
1420 EngGetProcessHandle
1421 EngGetType1FontList
1422 */
1423
1424 BOOL STDCALL
1425 EngLineTo(SURFOBJ *Surface,
1426 CLIPOBJ *Clip,
1427 BRUSHOBJ *Brush,
1428 LONG x1,
1429 LONG y1,
1430 LONG x2,
1431 LONG y2,
1432 RECTL *RectBounds,
1433 MIX mix);
1434
1435 HANDLE STDCALL
1436 EngLoadImage(LPWSTR DriverName);
1437
1438 /*
1439 EngLoadModuleForWrite
1440 EngLockDriverObj
1441 */
1442
1443 SURFOBJ * STDCALL
1444 EngLockSurface(IN HSURF Surface);
1445
1446 /*
1447 EngMapEvent
1448 EngMapFontFile
1449 EngMapModule
1450 EngMovePointer
1451 */
1452
1453 INT STDCALL
1454 EngMulDiv(IN INT nMultiplicand,
1455 IN INT nMultiplier,
1456 IN INT nDivisor);
1457
1458 VOID STDCALL
1459 EngMultiByteToUnicodeN(OUT LPWSTR UnicodeString,
1460 IN ULONG MaxBytesInUnicodeString,
1461 OUT PULONG BytesInUnicodeString,
1462 IN PCHAR MultiByteString,
1463 IN ULONG BytesInMultiByteString);
1464
1465 BOOL STDCALL
1466 EngPaint(IN SURFOBJ *Surface,
1467 IN CLIPOBJ *ClipRegion,
1468 IN BRUSHOBJ *Brush,
1469 IN POINTL *BrushOrigin,
1470 IN MIX Mix);
1471
1472 /*
1473 EngProbeForRead
1474 EngProbeForReadAndWrite = NTOSKRNL.ProbeForWrite
1475 EngQueryLocalTime
1476 EngQueryPalette
1477 EngQueryPerformanceCounter
1478 EngQueryPerformanceFrequency
1479 EngRestoreFloatingPointState
1480 EngSaveFloatingPointState
1481 EngSecureMem
1482 EngSetEvent
1483 EngSetLastError
1484 EngSetPointerShape
1485 EngSetPointerTag
1486 EngSetPrinterData
1487 */
1488
1489 typedef int CDECL (*SORTCOMP)(const void *Elem1, const void *Elem2);
1490
1491 void STDCALL
1492 EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc);
1493
1494 /*
1495 EngStrokeAndFillPath
1496 EngStrokePath
1497 EngTextOut
1498 */
1499
1500 BOOL STDCALL
1501 EngTransparentBlt(IN PSURFOBJ Dest,
1502 IN PSURFOBJ Source,
1503 IN PCLIPOBJ Clip,
1504 IN PXLATEOBJ ColorTranslation,
1505 IN PRECTL DestRect,
1506 IN PRECTL SourceRect,
1507 IN ULONG TransparentColor,
1508 IN ULONG Reserved);
1509
1510 VOID STDCALL
1511 EngUnicodeToMultiByteN(OUT PCHAR MultiByteString,
1512 IN ULONG MaxBytesInMultiByteString,
1513 OUT PULONG BytesInMultiByteString,
1514 IN PWSTR UnicodeString,
1515 IN ULONG BytesInUnicodeString);
1516
1517 /*
1518 EngUnloadImage
1519 EngUnlockDriverObj
1520 EngUnmapEvent
1521 EngUnmapFontFile
1522 EngUnsecureMem = NTOSKRNL.MmUnsecureVirtualMemory
1523 EngWaitForSingleObject
1524 EngWideCharToMultiByte
1525 EngWritePrinter
1526 FLOATOBJ_Add
1527 FLOATOBJ_AddFloat
1528 FLOATOBJ_AddFloatObj
1529 FLOATOBJ_AddLong
1530 FLOATOBJ_Div
1531 FLOATOBJ_DivFloat
1532 FLOATOBJ_DivFloatObj
1533 FLOATOBJ_DivLong
1534 FLOATOBJ_Equal
1535 FLOATOBJ_EqualLong
1536 FLOATOBJ_GetFloat
1537 FLOATOBJ_GetLong
1538 FLOATOBJ_GreaterThan
1539 FLOATOBJ_GreaterThanLong
1540 FLOATOBJ_LessThan
1541 FLOATOBJ_LessThanLong
1542 FLOATOBJ_Mul
1543 FLOATOBJ_MulFloat
1544 FLOATOBJ_MulFloatObj
1545 FLOATOBJ_MulLong
1546 FLOATOBJ_Neg
1547 FLOATOBJ_SetFloat
1548 FLOATOBJ_SetLong
1549 FLOATOBJ_Sub
1550 FLOATOBJ_SubFloat
1551 FLOATOBJ_SubFloatObj
1552 FLOATOBJ_SubLong
1553 */
1554
1555 ULONG
1556 STDCALL
1557 FONTOBJ_cGetAllGlyphHandles(IN PFONTOBJ FontObj,
1558 IN HGLYPH *Glyphs);
1559
1560 ULONG
1561 STDCALL
1562 FONTOBJ_cGetGlyphs(IN PFONTOBJ FontObj,
1563 IN ULONG Mode,
1564 IN ULONG NumGlyphs,
1565 IN HGLYPH *GlyphHandles,
1566 IN PVOID *OutGlyphs);
1567
1568 PGAMMA_TABLES
1569 STDCALL
1570 FONTOBJ_pGetGammaTables(IN PFONTOBJ FontObj);
1571
1572 IFIMETRICS*
1573 STDCALL
1574 FONTOBJ_pifi(IN PFONTOBJ FontObj);
1575
1576 PVOID
1577 STDCALL
1578 FONTOBJ_pvTrueTypeFontFile(IN PFONTOBJ FontObj,
1579 IN ULONG *FileSize);
1580
1581 XFORMOBJ*
1582 STDCALL
1583 FONTOBJ_pxoGetXform(IN PFONTOBJ FontObj);
1584
1585 VOID
1586 STDCALL
1587 FONTOBJ_vGetInfo(IN PFONTOBJ FontObj,
1588 IN ULONG InfoSize,
1589 OUT PFONTINFO FontInfo);
1590
1591 /*
1592 HT_ComputeRGBGammaTable
1593 HT_Get8BPPFormatPalette
1594 */
1595
1596 ULONG
1597 STDCALL
1598 PALOBJ_cGetColors(PALOBJ *PalObj,
1599 ULONG Start,
1600 ULONG Colors,
1601 ULONG *PaletteEntry);
1602
1603 /*
1604 PATHOBJ_bCloseFigure
1605 PATHOBJ_bEnumClipLines
1606 PATHOBJ_bMoveTo
1607 PATHOBJ_bPolyBezierTo
1608 PATHOBJ_bPolyLineTo
1609 PATHOBJ_vEnumStart
1610 PATHOBJ_vEnumStartClipLines
1611 RtlAnsiCharToUnicodeChar = NTOSKRNL.RtlAnsiCharToUnicodeChar
1612 RtlMultiByteToUnicodeN = NTOSKRNL.RtlMultiByteToUnicodeN
1613 RtlRaiseException = NTOSKRNL.RtlRaiseException
1614 RtlUnicodeToMultiByteN = NTOSKRNL.RtlUnicodeToMultiByteN
1615 RtlUnicodeToMultiByteSize = NTOSKRNL.RtlUnicodeToMultiByteSize
1616 RtlUnwind = NTOSKRNL.RtlUnwind
1617 RtlUpcaseUnicodeChar = NTOSKRNL.RtlUpcaseUnicodeChar
1618 RtlUpcaseUnicodeToMultiByteN = NTOSKRNL.RtlUpcaseUnicodeToMultiByteN
1619 STROBJ_bEnum
1620 STROBJ_dwGetCodePage
1621 STROBJ_vEnumStart
1622 WNDOBJ_bEnum
1623 WNDOBJ_cEnumStart
1624 WNDOBJ_vSetConsumer
1625 XFORMOBJ_bApplyXform
1626 XFORMOBJ_iGetFloatObjXform
1627 XFORMOBJ_iGetXform
1628 */
1629
1630 ULONG STDCALL
1631 XLATEOBJ_cGetPalette(XLATEOBJ *XlateObj,
1632 ULONG PalOutType,
1633 ULONG cPal,
1634 ULONG *OutPal);
1635
1636 ULONG STDCALL
1637 XLATEOBJ_iXlate(XLATEOBJ *XlateObj,
1638 ULONG Color);
1639
1640 ULONG * STDCALL
1641 XLATEOBJ_piVector(XLATEOBJ *XlateObj);
1642
1643 HANDLE STDCALL
1644 BRUSHOBJ_hGetColorTransform(BRUSHOBJ *pbo);
1645 ULONG STDCALL
1646 BRUSHOBJ_ulGetBrushColor(BRUSHOBJ *pbo);
1647 BOOL STDCALL
1648 EngAlphaBlend(SURFOBJ *psoDest,SURFOBJ *psoSrc,CLIPOBJ *pco,XLATEOBJ *pxlo,RECTL *prclDest,RECTL *prclSrc,BLENDOBJ *pBlendObj);
1649 BOOL STDCALL
1650 EngCheckAbort(SURFOBJ *pso);
1651 FD_GLYPHSET* STDCALL
1652 EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars);
1653 VOID STDCALL
1654 EngDeletePath(PATHOBJ *ppo);
1655 BOOL STDCALL
1656 EngFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,MIX mix,FLONG flOptions);
1657 PVOID STDCALL
1658 EngFindResource(HANDLE h,int iName,int iType,PULONG pulSize);
1659 VOID STDCALL
1660 EngFreeModule(HANDLE h);
1661 LPWSTR STDCALL
1662 EngGetDriverName(HDEV hdev);
1663 LPWSTR STDCALL
1664 EngGetPrinterDataFileName(HDEV hdev);
1665 BOOL STDCALL
1666 EngGradientFill(SURFOBJ *psoDest,CLIPOBJ *pco,XLATEOBJ *pxlo,TRIVERTEX *pVertex,ULONG nVertex,PVOID pMesh,ULONG nMesh,RECTL *prclExtents,POINTL *pptlDitherOrg,ULONG ulMode);
1667 HANDLE STDCALL
1668 EngLoadModule(LPWSTR pwsz);
1669 BOOL STDCALL
1670 EngMarkBandingSurface(HSURF hsurf);
1671 INT STDCALL
1672 EngMultiByteToWideChar(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString);
1673 BOOL STDCALL
1674 EngPlgBlt(SURFOBJ *psoTrg,SURFOBJ *psoSrc,SURFOBJ *psoMsk,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlBrushOrg,POINTFIX *pptfx,RECTL *prcl,POINTL *pptl,ULONG iMode);
1675 BOOL STDCALL
1676 EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo);
1677 VOID STDCALL
1678 EngQueryLocalTime(PENG_TIME_FIELDS etf);
1679 BOOL STDCALL
1680 EngStretchBlt(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode);
1681 BOOL STDCALL
1682 EngStretchBltROP(SURFOBJ *psoDest,SURFOBJ *psoSrc,SURFOBJ *psoMask,CLIPOBJ *pco,XLATEOBJ *pxlo,COLORADJUSTMENT *pca,POINTL *pptlHTOrg,RECTL *prclDest,RECTL *prclSrc,POINTL *pptlMask,ULONG iMode,BRUSHOBJ *pbo,DWORD rop4);
1683 BOOL STDCALL
1684 EngStrokeAndFillPath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pboStroke,LINEATTRS *plineattrs,BRUSHOBJ *pboFill,POINTL *pptlBrushOrg,MIX mixFill,FLONG flOptions);
1685 BOOL STDCALL
1686 EngStrokePath(SURFOBJ *pso,PATHOBJ *ppo,CLIPOBJ *pco,XFORMOBJ *pxo,BRUSHOBJ *pbo,POINTL *pptlBrushOrg,LINEATTRS *plineattrs,MIX mix);
1687 BOOL STDCALL
1688 EngTextOut(SURFOBJ *pso,STROBJ *pstro,FONTOBJ *pfo,CLIPOBJ *pco,RECTL *prclExtra,RECTL *prclOpaque,BRUSHOBJ *pboFore,BRUSHOBJ *pboOpaque,POINTL *pptlOrg,MIX mix);
1689 VOID STDCALL
1690 EngUnlockSurface(SURFOBJ *pso);
1691 INT STDCALL
1692 EngWideCharToMultiByte(UINT CodePage,LPWSTR WideCharString,INT BytesInWideCharString,LPSTR MultiByteString,INT BytesInMultiByteString);
1693 PFD_GLYPHATTR STDCALL
1694 FONTOBJ_pQueryGlyphAttrs(FONTOBJ *pfo,ULONG iMode);
1695 VOID STDCALL
1696 PATHOBJ_vGetBounds(PATHOBJ *ppo,PRECTFX prectfx);
1697 FD_GLYPHSET *STDCALL
1698 FONTOBJ_pfdg(FONTOBJ *pfo);
1699 BOOL STDCALL
1700 PATHOBJ_bEnum(PATHOBJ *ppo,PATHDATA *ppd);
1701 BOOL STDCALL
1702 PATHOBJ_bEnumClipLines(PATHOBJ *ppo,ULONG cb,CLIPLINE *pcl);
1703 VOID STDCALL
1704 PATHOBJ_vEnumStart(PATHOBJ *ppo);
1705 VOID STDCALL
1706 PATHOBJ_vEnumStartClipLines(PATHOBJ *ppo,CLIPOBJ *pco,SURFOBJ *pso,LINEATTRS *pla);
1707 BOOL STDCALL
1708 STROBJ_bEnum(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos);
1709 BOOL STDCALL
1710 STROBJ_bEnumPositionsOnly(STROBJ *pstro,ULONG *pc,PGLYPHPOS *ppgpos);
1711 BOOL STDCALL
1712 STROBJ_bGetAdvanceWidths(STROBJ *pso,ULONG iFirst,ULONG c,POINTQF *pptqD);
1713 DWORD STDCALL
1714 STROBJ_dwGetCodePage(STROBJ *pstro);
1715 VOID STDCALL
1716 STROBJ_vEnumStart(STROBJ *pstro);
1717 ULONG STDCALL
1718 XFORMOBJ_iGetXform(XFORMOBJ *pxo,XFORML *pxform);
1719 BOOL STDCALL
1720 XFORMOBJ_bApplyXform(XFORMOBJ *pxo,ULONG iMode,ULONG cPoints,PVOID pvIn,PVOID pvOut);
1721 HANDLE STDCALL
1722 XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo);
1723
1724 #endif