9bcfc0ab838147a167171c76d7f078cd9823b975
[reactos.git] / subsystems / win32 / win32k / include / inteng.h
1 #pragma once
2
3 typedef ULONG HCLIP;
4
5 #define ENUM_RECT_LIMIT 50
6
7 typedef struct _RECT_ENUM
8 {
9 ULONG c;
10 RECTL arcl[ENUM_RECT_LIMIT];
11 } RECT_ENUM;
12
13 typedef struct tagSPAN
14 {
15 LONG Y;
16 LONG X;
17 ULONG Width;
18 } SPAN, *PSPAN;
19
20 #define R3_OPINDEX_SRCCOPY 0xcc
21 #define R3_OPINDEX_NOOP 0xaa
22 #define R4_NOOP ((R3_OPINDEX_NOOP << 8) | R3_OPINDEX_NOOP)
23 #define R4_MASK ((R3_OPINDEX_NOOP << 8) | R3_OPINDEX_SRCCOPY)
24
25 #define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2))
26 #define ROP3_USES_DEST(Rop3) ((((Rop3) & 0xAA0000) >> 1) != ((Rop3) & 0x550000))
27 #define ROP4_USES_DEST(Rop4) (((((Rop4) & 0xAA) >> 1) != ((Rop4) & 0x55)) || ((((Rop4) & 0xAA00) >> 1) != ((Rop4) & 0x5500)))
28 #define ROP3_USES_SOURCE(Rop3) ((((Rop3) & 0xCC0000) >> 2) != ((Rop3) & 0x330000))
29 #define ROP4_USES_SOURCE(Rop4) (((((Rop4) & 0xCC) >> 2) != ((Rop4) & 0x33)) || ((((Rop4) & 0xCC00) >> 2) != ((Rop4) & 0x3300)))
30 #define ROP3_USES_PATTERN(Rop3) ((((Rop3) & 0xF00000) >> 4) != ((Rop3) & 0x0F0000))
31 #define ROP4_USES_PATTERN(Rop4) (((((Rop4) & 0xF0) >> 4) != ((Rop4) & 0x0F)) || ((((Rop4) & 0xF000) >> 4) != ((Rop4) & 0x0F00)))
32 #define ROP3_TO_ROP4(Rop3) ((((Rop3) >> 8) & 0xff00) | (((Rop3) >> 16) & 0x00ff))
33
34 /* Definitions of IntEngXxx functions */
35
36 BOOL APIENTRY
37 IntEngLineTo(SURFOBJ *Surface,
38 CLIPOBJ *Clip,
39 BRUSHOBJ *Brush,
40 LONG x1,
41 LONG y1,
42 LONG x2,
43 LONG y2,
44 RECTL *RectBounds,
45 MIX mix);
46
47 BOOL APIENTRY
48 IntEngBitBlt(SURFOBJ *DestObj,
49 SURFOBJ *SourceObj,
50 SURFOBJ *Mask,
51 CLIPOBJ *ClipRegion,
52 XLATEOBJ *ColorTranslation,
53 RECTL *DestRect,
54 POINTL *SourcePoint,
55 POINTL *MaskOrigin,
56 BRUSHOBJ *Brush,
57 POINTL *BrushOrigin,
58 ROP4 Rop4);
59
60 BOOL APIENTRY
61 IntEngStretchBlt(SURFOBJ *DestObj,
62 SURFOBJ *SourceObj,
63 SURFOBJ *Mask,
64 CLIPOBJ *ClipRegion,
65 XLATEOBJ *ColorTranslation,
66 RECTL *DestRect,
67 RECTL *SourceRect,
68 POINTL *pMaskOrigin,
69 BRUSHOBJ *Brush,
70 POINTL *BrushOrigin,
71 ULONG Mode);
72
73 BOOL APIENTRY
74 IntEngGradientFill(SURFOBJ *psoDest,
75 CLIPOBJ *pco,
76 XLATEOBJ *pxlo,
77 TRIVERTEX *pVertex,
78 ULONG nVertex,
79 PVOID pMesh,
80 ULONG nMesh,
81 RECTL *prclExtents,
82 POINTL *pptlDitherOrg,
83 ULONG ulMode);
84
85 VOID InitXlateImpl(VOID);
86
87 XLATEOBJ* FASTCALL
88 IntEngCreateXlate(USHORT DestPalType,
89 USHORT SourcePalType,
90 HPALETTE PaletteDest,
91 HPALETTE PaletteSource);
92
93 XLATEOBJ* FASTCALL
94 IntEngCreateMonoXlate(USHORT SourcePalType,
95 HPALETTE PaletteDest,
96 HPALETTE PaletteSource,
97 ULONG BackgroundColor);
98
99 XLATEOBJ* FASTCALL
100 IntEngCreateSrcMonoXlate(HPALETTE PaletteDest,
101 ULONG Color0,
102 ULONG Color1);
103
104 XLATEOBJ*
105 IntCreateBrushXlate(BRUSH *pbrush, SURFACE * psurf, COLORREF crBackgroundClr);
106
107 HPALETTE FASTCALL
108 IntEngGetXlatePalette(XLATEOBJ *XlateObj,
109 ULONG Palette);
110
111 BOOL APIENTRY
112 IntEngPolyline(SURFOBJ *DestSurf,
113 CLIPOBJ *Clip,
114 BRUSHOBJ *Brush,
115 CONST LPPOINT pt,
116 LONG dCount,
117 MIX mix);
118
119 CLIPOBJ* FASTCALL
120 IntEngCreateClipRegion(ULONG count,
121 PRECTL pRect,
122 PRECTL rcBounds);
123
124 VOID FASTCALL
125 IntEngDeleteClipRegion(CLIPOBJ *ClipObj);
126
127 BOOLEAN FASTCALL
128 ClipobjToSpans(PSPAN *Spans,
129 UINT *Count,
130 CLIPOBJ *ClipRegion,
131 PRECTL Boundary);
132
133 BOOL FASTCALL
134 IntEngTransparentBlt(SURFOBJ *Dest,
135 SURFOBJ *Source,
136 CLIPOBJ *Clip,
137 XLATEOBJ *ColorTranslation,
138 PRECTL DestRect,
139 PRECTL SourceRect,
140 ULONG iTransColor,
141 ULONG Reserved);
142
143 BOOL APIENTRY
144 IntEngPaint(IN SURFOBJ *Surface,
145 IN CLIPOBJ *ClipRegion,
146 IN BRUSHOBJ *Brush,
147 IN POINTL *BrushOrigin,
148 IN MIX Mix);
149
150 VOID APIENTRY
151 IntEngMovePointer(IN SURFOBJ *pso,
152 IN LONG x,
153 IN LONG y,
154 IN RECTL *prcl);
155
156 ULONG APIENTRY
157 IntEngSetPointerShape(
158 IN SURFOBJ *pso,
159 IN SURFOBJ *psoMask,
160 IN SURFOBJ *psoColor,
161 IN XLATEOBJ *pxlo,
162 IN LONG xHot,
163 IN LONG yHot,
164 IN LONG x,
165 IN LONG y,
166 IN RECTL *prcl,
167 IN FLONG fl);
168
169 BOOL APIENTRY
170 IntEngAlphaBlend(IN SURFOBJ *Dest,
171 IN SURFOBJ *Source,
172 IN CLIPOBJ *ClipRegion,
173 IN XLATEOBJ *ColorTranslation,
174 IN PRECTL DestRect,
175 IN PRECTL SourceRect,
176 IN BLENDOBJ *BlendObj);
177
178 BOOL APIENTRY
179 IntEngCopyBits(SURFOBJ *psoDest,
180 SURFOBJ *psoSource,
181 CLIPOBJ *pco,
182 XLATEOBJ *pxlo,
183 RECTL *prclDest,
184 POINTL *ptlSource);