1 | /*
|
---|
2 | * GDI32: public dc data definitions
|
---|
3 | *
|
---|
4 | *
|
---|
5 | * Copyright 1999 Daniela Engert (dani@ngrt.de)
|
---|
6 | *
|
---|
7 | *
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 | #ifndef __DCDATA_H__
|
---|
12 | #define __DCDATA_H__
|
---|
13 |
|
---|
14 | //Flags for Reserved DWORD in DCData structure
|
---|
15 | #define DC_FLAG_SEND_POSTSCRIPT_SETUP_STRING 1
|
---|
16 | #define DC_FLAG_POLYGON_PRINTER_HACK 2
|
---|
17 |
|
---|
18 | enum PS_Type { MICRO_CACHED, MICRO, NORMAL };
|
---|
19 | enum HDC_Type{ TYPE_0, TYPE_1, TYPE_2, TYPE_3, TYPE_4 };
|
---|
20 |
|
---|
21 | typedef struct _tagXFORM
|
---|
22 | {
|
---|
23 | FLOAT eM11;
|
---|
24 | FLOAT eM12;
|
---|
25 | FLOAT eM21;
|
---|
26 | FLOAT eM22;
|
---|
27 | FLOAT eDx;
|
---|
28 | FLOAT eDy;
|
---|
29 | } XFORM_W, *PXFORM_W, *LPXFORM_W;
|
---|
30 |
|
---|
31 | #ifndef USING_OPEN32
|
---|
32 | #ifndef GPI_INCLUDED
|
---|
33 | typedef struct _SIZEF
|
---|
34 | {
|
---|
35 | FIXED cx;
|
---|
36 | FIXED cy;
|
---|
37 | } SIZEF;
|
---|
38 | typedef SIZEF *PSIZEF;
|
---|
39 |
|
---|
40 | typedef struct _MATRIXLF
|
---|
41 | {
|
---|
42 | FIXED fxM11;
|
---|
43 | FIXED fxM12;
|
---|
44 | LONG lM13;
|
---|
45 | FIXED fxM21;
|
---|
46 | FIXED fxM22;
|
---|
47 | LONG lM23;
|
---|
48 | LONG lM31;
|
---|
49 | LONG lM32;
|
---|
50 | LONG lM33;
|
---|
51 | } MATRIXLF;
|
---|
52 | typedef MATRIXLF *PMATRIXLF;
|
---|
53 |
|
---|
54 | typedef ULONG HPS;
|
---|
55 |
|
---|
56 | typedef struct _CHARBUNDLE
|
---|
57 | {
|
---|
58 | LONG lColor;
|
---|
59 | LONG lBackColor;
|
---|
60 | USHORT usMixMode;
|
---|
61 | USHORT usBackMixMode;
|
---|
62 | USHORT usSet;
|
---|
63 | USHORT usPrecision;
|
---|
64 | SIZEF sizfxCell;
|
---|
65 | POINTL ptlAngle;
|
---|
66 | POINTL ptlShear;
|
---|
67 | USHORT usDirection;
|
---|
68 | USHORT usTextAlign;
|
---|
69 | FIXED fxExtra;
|
---|
70 | FIXED fxBreakExtra;
|
---|
71 | } CHARBUNDLE;
|
---|
72 | typedef CHARBUNDLE *PCHARBUNDLE;
|
---|
73 |
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | #pragma pack(4)
|
---|
77 | typedef struct _DCData
|
---|
78 | {
|
---|
79 | HDC hdc;
|
---|
80 | HWND hwnd;
|
---|
81 | HPS hps;
|
---|
82 |
|
---|
83 | UINT lastBrushKey;
|
---|
84 | PVOID lastBrushObject;
|
---|
85 | UINT lastPenKey;
|
---|
86 | struct _penobject *lastPenObject;
|
---|
87 | UINT lastFontKey;
|
---|
88 | PVOID lastFontObject;
|
---|
89 | UINT lastBitmapKey;
|
---|
90 | PVOID lastBitmapObject;
|
---|
91 | UINT lastPaletteKey;
|
---|
92 | PVOID lastPaletteObject;
|
---|
93 |
|
---|
94 | UINT nullBitmapHandle;
|
---|
95 |
|
---|
96 | COLORREF BkColor;
|
---|
97 | COLORREF TextColor;
|
---|
98 | ULONG BkColor_PM;
|
---|
99 | ULONG TextColor_PM;
|
---|
100 |
|
---|
101 | int BkMode;
|
---|
102 | ULONG BkMode_PM;
|
---|
103 |
|
---|
104 | int ROP2Mode;
|
---|
105 | int ROP2Mode_PM;
|
---|
106 |
|
---|
107 | unsigned isMemoryPS:1;
|
---|
108 | unsigned isMetaPS:1;
|
---|
109 | unsigned isPrinter:1;
|
---|
110 | unsigned isFrameWindow:1;
|
---|
111 | unsigned isOD_QUEUED:1;
|
---|
112 | unsigned isOD_INFO:1;
|
---|
113 | unsigned isClient:1;
|
---|
114 | unsigned isClientArea:1;
|
---|
115 | unsigned isLeftLeft:1;
|
---|
116 | unsigned isTopTop:1;
|
---|
117 | unsigned isWideLine:1;
|
---|
118 | unsigned alignUpdateCP:1;
|
---|
119 | unsigned isCacheable:1;
|
---|
120 | unsigned penIsExtPen:1;
|
---|
121 | unsigned isValid:1;
|
---|
122 | unsigned inPath:1;
|
---|
123 | unsigned isStartDoc:1;
|
---|
124 | unsigned resetStockFonts:1;
|
---|
125 | #ifdef CUSTOM_CURPOS
|
---|
126 | unsigned curPosSet:1;
|
---|
127 | #endif
|
---|
128 | unsigned bAttrSet:1;
|
---|
129 | unsigned bFirstSet:1;
|
---|
130 | unsigned unused:11;
|
---|
131 |
|
---|
132 | ULONG MapMode;
|
---|
133 | HBITMAP bitmapHandle;
|
---|
134 | ULONG bitmapHeight;
|
---|
135 | ULONG bitmapWidth;
|
---|
136 | HMETAFILE hMeta;
|
---|
137 | PVOID pMetaFileObject;
|
---|
138 | int polyFillMode;
|
---|
139 | int arcDirection;
|
---|
140 | int stretchBltMode;
|
---|
141 | int graphicsMode;
|
---|
142 | HRGN hrgnHDC;
|
---|
143 |
|
---|
144 | PS_Type psType;
|
---|
145 |
|
---|
146 | HDC_Type hdcType;
|
---|
147 | USHORT usUnused;
|
---|
148 | POINTL viewportOrg;
|
---|
149 | double viewportXExt;
|
---|
150 | double viewportYExt;
|
---|
151 | POINTL windowOrg;
|
---|
152 | SIZEL windowExt;
|
---|
153 | HRGN hrgnWin32Clip; //current Win32 clip region handle
|
---|
154 |
|
---|
155 | POINTL ptlOrigin;
|
---|
156 |
|
---|
157 | ULONG printPageHeight;
|
---|
158 | PVOID printerObject;
|
---|
159 |
|
---|
160 | LONG taMode;
|
---|
161 | XFORM_W xform;
|
---|
162 | INT worldYDeltaFor1Pixel;
|
---|
163 | INT worldXDeltaFor1Pixel;
|
---|
164 | ULONG colorMode;
|
---|
165 | PULONG pLogColorTable;
|
---|
166 |
|
---|
167 | ULONG lcidBitfield;
|
---|
168 | HWND hwndRealize;
|
---|
169 | ULONG cpeMap;
|
---|
170 | LONG lTechnology;
|
---|
171 | LONG lWndXExtSave, lWndYExtSave,
|
---|
172 | lVwpXExtSave, lVwpYExtSave;
|
---|
173 | int height;
|
---|
174 | POINTL brushOrgPoint;
|
---|
175 | PVOID pEnhMetaPalette;
|
---|
176 | ABORTPROC lpAbortProc;
|
---|
177 | ULONG HPStoHDCInversionHeight;
|
---|
178 | int saveLevel;
|
---|
179 | CHARBUNDLE CBundle;
|
---|
180 | CHARBUNDLE CSetBundle;
|
---|
181 | ULONG ulCharMask;
|
---|
182 | ULONG ulDefCharMask;
|
---|
183 | #ifdef CUSTOM_CURPOS
|
---|
184 | POINTL curPos;
|
---|
185 | #endif
|
---|
186 | MATRIXLF defView;
|
---|
187 | int yInvert;
|
---|
188 | int yInvert4Enable;
|
---|
189 |
|
---|
190 | ULONG Reserved;
|
---|
191 |
|
---|
192 | HRGN hrgnWinVis; //current Win32 visible region handle
|
---|
193 | struct _DCData *nextHPS_HDC;
|
---|
194 | } tDCData, *pDCData;
|
---|
195 | #pragma pack()
|
---|
196 | #else
|
---|
197 |
|
---|
198 | #ifndef GPI_INCLUDED
|
---|
199 | typedef struct _SIZEF
|
---|
200 | {
|
---|
201 | FIXED cx;
|
---|
202 | FIXED cy;
|
---|
203 | } SIZEF;
|
---|
204 | typedef SIZEF *PSIZEF;
|
---|
205 |
|
---|
206 | typedef struct _MATRIXLF
|
---|
207 | {
|
---|
208 | FIXED fxM11;
|
---|
209 | FIXED fxM12;
|
---|
210 | LONG lM13;
|
---|
211 | FIXED fxM21;
|
---|
212 | FIXED fxM22;
|
---|
213 | LONG lM23;
|
---|
214 | LONG lM31;
|
---|
215 | LONG lM32;
|
---|
216 | LONG lM33;
|
---|
217 | } MATRIXLF;
|
---|
218 | typedef MATRIXLF *PMATRIXLF;
|
---|
219 |
|
---|
220 | typedef ULONG HPS;
|
---|
221 | #endif
|
---|
222 |
|
---|
223 | typedef struct _DCData
|
---|
224 | {
|
---|
225 | HDC hdc;
|
---|
226 | HWND hwnd;
|
---|
227 | HPS hps;
|
---|
228 |
|
---|
229 | UINT lastBrushKey;
|
---|
230 | PVOID lastBrushObject;
|
---|
231 | UINT lastPenHandle;
|
---|
232 | struct _penobject *lastPenObject;
|
---|
233 | UINT lastFontHandle;
|
---|
234 | PVOID lastFontObject;
|
---|
235 | UINT lastBitmapHandle;
|
---|
236 | PVOID lastBitmapObject;
|
---|
237 | UINT lastPaletteHandle;
|
---|
238 | PVOID lastPaletteObject;
|
---|
239 |
|
---|
240 | UINT nullBitmapHandle;
|
---|
241 |
|
---|
242 | ULONG BkColor;
|
---|
243 | ULONG TextColor;
|
---|
244 | ULONG BkColor_PM;
|
---|
245 | ULONG TextColor_PM;
|
---|
246 |
|
---|
247 | int BkMode;
|
---|
248 | ULONG BkMode_PM;
|
---|
249 |
|
---|
250 | int ROP2Mode;
|
---|
251 | int ROP2Mode_PM;
|
---|
252 |
|
---|
253 | unsigned isMemoryPS:1;
|
---|
254 | unsigned isMetaPS:1;
|
---|
255 | unsigned isPrinter:1;
|
---|
256 | unsigned isFrameWindow:1;
|
---|
257 | unsigned isOD_QUEUED:1;
|
---|
258 | unsigned isOD_INFO:1;
|
---|
259 | unsigned isClient:1;
|
---|
260 | unsigned isClientArea:1;
|
---|
261 | unsigned isLeftLeft:1;
|
---|
262 | unsigned isTopTop:1;
|
---|
263 | unsigned isWideLine:1;
|
---|
264 | unsigned alignUpdateCP:1;
|
---|
265 | unsigned isCacheable:1;
|
---|
266 | unsigned penIsExtPen:1;
|
---|
267 | unsigned isValid:1;
|
---|
268 | unsigned inPath:1;
|
---|
269 | unsigned isStartDoc:1;
|
---|
270 | unsigned resetStockFonts:1;
|
---|
271 | unsigned unused:14;
|
---|
272 |
|
---|
273 | ULONG MapMode;
|
---|
274 | HBITMAP bitmapHandle;
|
---|
275 | ULONG bitmapHeight;
|
---|
276 | ULONG bitmapWidth;
|
---|
277 | ULONG hMeta;
|
---|
278 | PVOID pMetaFileObject;
|
---|
279 | int polyFillMode;
|
---|
280 | int arcDirection;
|
---|
281 | int stretchBltMode;
|
---|
282 | int graphicsMode;
|
---|
283 | HRGN hrgnHDC;
|
---|
284 |
|
---|
285 | PS_Type psType;
|
---|
286 |
|
---|
287 | HDC_Type hdcType;
|
---|
288 | USHORT usFiller;
|
---|
289 | POINTL viewportOrg;
|
---|
290 | double viewportXExt;
|
---|
291 | double viewportYExt;
|
---|
292 | POINTL windowOrg;
|
---|
293 | SIZEL windowExt;
|
---|
294 | HRGN hrgnVis;
|
---|
295 | POINTL ptlOrigin;
|
---|
296 | ULONG printPageHeight;
|
---|
297 | PVOID printerObject;
|
---|
298 |
|
---|
299 | LONG taMode;
|
---|
300 | XFORM_W xform;
|
---|
301 |
|
---|
302 | INT worldYDeltaFor1Pixel;
|
---|
303 | INT worldXDeltaFor1Pixel;
|
---|
304 | ULONG colorMode;
|
---|
305 | PULONG pLogColorTable;
|
---|
306 |
|
---|
307 | ULONG lcidBitfield;
|
---|
308 |
|
---|
309 | HWND hwndRealize;
|
---|
310 | ULONG cpeMap;
|
---|
311 |
|
---|
312 | LONG lTechnology;
|
---|
313 |
|
---|
314 | LONG lWndXExtSave, lWndYExtSave,
|
---|
315 | lVwpXExtSave, lVwpYExtSave;
|
---|
316 |
|
---|
317 | int height;
|
---|
318 |
|
---|
319 | POINTL brushOrgPoint;
|
---|
320 |
|
---|
321 | PVOID pEnhMetaPalette;
|
---|
322 | PVOID lpAbortProc;
|
---|
323 | ULONG HPStoHDCInversionHeight;
|
---|
324 |
|
---|
325 | int saveLevel;
|
---|
326 |
|
---|
327 | struct _DCData *nextDCData;
|
---|
328 | } tDCData, *pDCData;
|
---|
329 | #endif
|
---|
330 |
|
---|
331 | #endif //__DCDATA_H__
|
---|