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