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