[WIN32K]
[reactos.git] / reactos / 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_NOOP 0xAA
21
22 #define R3_OPINDEX_BLACKNESS 0x00
23 #define R3_OPINDEX_NOTSRCERASE 0x11
24 #define R3_OPINDEX_NOTSRCCOPY 0x33
25 #define R3_OPINDEX_SRCERASE 0x44
26 #define R3_OPINDEX_DSTINVERT 0x55
27 #define R3_OPINDEX_PATINVERT 0x5A
28 #define R3_OPINDEX_SRCINVERT 0x66
29 #define R3_OPINDEX_SRCAND 0x88
30 #define R3_OPINDEX_MERGEPAINT 0xBB
31 #define R3_OPINDEX_MERGECOPY 0xC0
32 #define R3_OPINDEX_SRCCOPY 0xCC
33 #define R3_OPINDEX_SRCPAINT 0xEE
34 #define R3_OPINDEX_PATCOPY 0xF0
35 #define R3_OPINDEX_PATPAINT 0xFB
36 #define R3_OPINDEX_WHITENESS 0xFF
37
38 #define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2))
39
40 #define ROP4_FROM_INDEX(index) ((index) | ((index) << 8))
41
42 #define ROP4_USES_SOURCE(Rop4) (((((Rop4) & 0xCC00) >> 2) != ((Rop4) & 0x3300)) || ((((Rop4) & 0xCC) >> 2) != ((Rop4) & 0x33)))
43 #define ROP4_USES_MASK(Rop4) (((Rop4) & 0xFF00) != (((Rop4) & 0xff) << 8))
44 #define ROP4_USES_DEST(Rop4) (((((Rop4) & 0xAA) >> 1) != ((Rop4) & 0x55)) || ((((Rop4) & 0xAA00) >> 1) != ((Rop4) & 0x5500)))
45 #define ROP4_USES_PATTERN(Rop4) (((((Rop4) & 0xF0) >> 4) != ((Rop4) & 0x0F)) || ((((Rop4) & 0xF000) >> 4) != ((Rop4) & 0x0F00)))
46
47 #define IS_VALID_ROP4(rop) (((rop) & 0xFFFF0000) == 0)
48
49 #define ROP4_FGND(Rop4) ((Rop4) & 0x00FF)
50 #define ROP4_BKGND(Rop4) (((Rop4) & 0xFF00) >> 8)
51
52 #define ROP4_NOOP (R3_OPINDEX_NOOP | (R3_OPINDEX_NOOP << 8))
53 #define ROP4_MASK (R3_OPINDEX_SRCCOPY | (R3_OPINDEX_NOOP << 8))
54
55 /* Definitions of IntEngXxx functions */
56
57 BOOL APIENTRY
58 IntEngLineTo(SURFOBJ *Surface,
59 CLIPOBJ *Clip,
60 BRUSHOBJ *Brush,
61 LONG x1,
62 LONG y1,
63 LONG x2,
64 LONG y2,
65 RECTL *RectBounds,
66 MIX mix);
67
68 BOOL APIENTRY
69 IntEngBitBlt(SURFOBJ *DestObj,
70 SURFOBJ *SourceObj,
71 SURFOBJ *Mask,
72 CLIPOBJ *ClipRegion,
73 XLATEOBJ *ColorTranslation,
74 RECTL *DestRect,
75 POINTL *SourcePoint,
76 POINTL *MaskOrigin,
77 BRUSHOBJ *Brush,
78 POINTL *BrushOrigin,
79 ROP4 Rop4);
80
81 BOOL APIENTRY
82 IntEngStretchBlt(SURFOBJ *DestObj,
83 SURFOBJ *SourceObj,
84 SURFOBJ *Mask,
85 CLIPOBJ *ClipRegion,
86 XLATEOBJ *ColorTranslation,
87 RECTL *DestRect,
88 RECTL *SourceRect,
89 POINTL *pMaskOrigin,
90 BRUSHOBJ *Brush,
91 POINTL *BrushOrigin,
92 ULONG Mode);
93
94 BOOL APIENTRY
95 IntEngGradientFill(SURFOBJ *psoDest,
96 CLIPOBJ *pco,
97 XLATEOBJ *pxlo,
98 TRIVERTEX *pVertex,
99 ULONG nVertex,
100 PVOID pMesh,
101 ULONG nMesh,
102 RECTL *prclExtents,
103 POINTL *pptlDitherOrg,
104 ULONG ulMode);
105
106 BOOL APIENTRY
107 IntEngPolyline(SURFOBJ *DestSurf,
108 CLIPOBJ *Clip,
109 BRUSHOBJ *Brush,
110 CONST LPPOINT pt,
111 LONG dCount,
112 MIX mix);
113
114 CLIPOBJ* FASTCALL
115 IntEngCreateClipRegion(ULONG count,
116 PRECTL pRect,
117 PRECTL rcBounds);
118
119 VOID FASTCALL
120 IntEngDeleteClipRegion(CLIPOBJ *ClipObj);
121
122 BOOLEAN FASTCALL
123 ClipobjToSpans(PSPAN *Spans,
124 UINT *Count,
125 CLIPOBJ *ClipRegion,
126 PRECTL Boundary);
127
128 BOOL FASTCALL
129 IntEngTransparentBlt(SURFOBJ *Dest,
130 SURFOBJ *Source,
131 CLIPOBJ *Clip,
132 XLATEOBJ *ColorTranslation,
133 PRECTL DestRect,
134 PRECTL SourceRect,
135 ULONG iTransColor,
136 ULONG Reserved);
137
138 BOOL APIENTRY
139 IntEngPaint(IN SURFOBJ *Surface,
140 IN CLIPOBJ *ClipRegion,
141 IN BRUSHOBJ *Brush,
142 IN POINTL *BrushOrigin,
143 IN MIX Mix);
144
145 VOID APIENTRY
146 IntEngMovePointer(IN SURFOBJ *pso,
147 IN LONG x,
148 IN LONG y,
149 IN RECTL *prcl);
150
151 ULONG APIENTRY
152 IntEngSetPointerShape(
153 IN SURFOBJ *pso,
154 IN SURFOBJ *psoMask,
155 IN SURFOBJ *psoColor,
156 IN XLATEOBJ *pxlo,
157 IN LONG xHot,
158 IN LONG yHot,
159 IN LONG x,
160 IN LONG y,
161 IN RECTL *prcl,
162 IN FLONG fl);
163
164 BOOL APIENTRY
165 IntEngAlphaBlend(IN SURFOBJ *Dest,
166 IN SURFOBJ *Source,
167 IN CLIPOBJ *ClipRegion,
168 IN XLATEOBJ *ColorTranslation,
169 IN PRECTL DestRect,
170 IN PRECTL SourceRect,
171 IN BLENDOBJ *BlendObj);
172
173 BOOL APIENTRY
174 IntEngCopyBits(SURFOBJ *psoDest,
175 SURFOBJ *psoSource,
176 CLIPOBJ *pco,
177 XLATEOBJ *pxlo,
178 RECTL *prclDest,
179 POINTL *ptlSource);