1 |
27 |
unneback |
/* wingdi.h*/
|
2 |
|
|
/*
|
3 |
|
|
* Copyright (c) 1999,2000,2001 Greg Haerr <greg@censoft.com>
|
4 |
|
|
*
|
5 |
|
|
* Win32 GDI structures and API
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/* portable coordinate definition*/
|
9 |
|
|
typedef MWCOORD GDICOORD;
|
10 |
|
|
|
11 |
|
|
/* inherit RECT and POINT from mwtypes.h*/
|
12 |
|
|
typedef MWRECT RECT;
|
13 |
|
|
typedef MWPOINT POINT;
|
14 |
|
|
|
15 |
|
|
#if 0000
|
16 |
|
|
typedef struct tagRECT {
|
17 |
|
|
GDICOORD left;
|
18 |
|
|
GDICOORD top;
|
19 |
|
|
GDICOORD right;
|
20 |
|
|
GDICOORD bottom;
|
21 |
|
|
} RECT;
|
22 |
|
|
|
23 |
|
|
typedef struct tagPOINT {
|
24 |
|
|
GDICOORD x;
|
25 |
|
|
GDICOORD y;
|
26 |
|
|
} POINT;
|
27 |
|
|
#endif
|
28 |
|
|
|
29 |
|
|
typedef RECT NEAR *PRECT, FAR *LPRECT;
|
30 |
|
|
|
31 |
|
|
typedef POINT NEAR *PPOINT, FAR *LPPOINT;
|
32 |
|
|
|
33 |
|
|
typedef struct tagSIZE {
|
34 |
|
|
GDICOORD cx;
|
35 |
|
|
GDICOORD cy;
|
36 |
|
|
} SIZE, NEAR *PSIZE, FAR *LPSIZE;
|
37 |
|
|
|
38 |
|
|
/* GetDCEx flags*/
|
39 |
|
|
#define DCX_WINDOW 0x00000001L
|
40 |
|
|
#define DCX_CACHE 0x00000002L
|
41 |
|
|
#define DCX_NORESETATTRS 0x00000004L
|
42 |
|
|
#define DCX_CLIPCHILDREN 0x00000008L
|
43 |
|
|
#define DCX_CLIPSIBLINGS 0x00000010L
|
44 |
|
|
#define DCX_PARENTCLIP 0x00000020L
|
45 |
|
|
#define DCX_EXCLUDERGN 0x00000040L
|
46 |
|
|
#define DCX_INTERSECTRGN 0x00000080L
|
47 |
|
|
#define DCX_EXCLUDEUPDATE 0x00000100L
|
48 |
|
|
#define DCX_INTERSECTUPDATE 0x00000200L
|
49 |
|
|
#define DCX_LOCKWINDOWUPDATE 0x00000400L
|
50 |
|
|
#define DCX_VALIDATE 0x00200000L
|
51 |
|
|
#define DCX_DEFAULTCLIP 0x80000000L /* microwin only*/
|
52 |
|
|
|
53 |
|
|
HDC WINAPI GetDCEx(HWND hwnd,HRGN hrgnClip,DWORD flags);
|
54 |
|
|
HDC WINAPI GetDC(HWND hWnd);
|
55 |
|
|
HDC WINAPI GetWindowDC(HWND hWnd);
|
56 |
|
|
int WINAPI ReleaseDC(HWND hWnd, HDC hDC);
|
57 |
|
|
BOOL WINAPI DeleteDC(HDC hdc);
|
58 |
|
|
|
59 |
|
|
typedef struct tagPAINTSTRUCT {
|
60 |
|
|
HDC hdc;
|
61 |
|
|
BOOL fErase; /* indicates bkgnd needs erasing*/
|
62 |
|
|
RECT rcPaint; /* nyi*/
|
63 |
|
|
BOOL fRestore; /* nyi*/
|
64 |
|
|
BOOL fIncUpdate; /* nyi*/
|
65 |
|
|
BYTE rgbReserved[32];
|
66 |
|
|
} PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, FAR *LPPAINTSTRUCT;
|
67 |
|
|
|
68 |
|
|
HDC WINAPI BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint);
|
69 |
|
|
BOOL WINAPI EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint);
|
70 |
|
|
|
71 |
|
|
#define RGB(r,g,b) MWRGB(r,g,b)
|
72 |
|
|
#define GetRValue(rgb) ((BYTE)(rgb))
|
73 |
|
|
#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
|
74 |
|
|
#define GetBValue(rgb) ((BYTE)((rgb)>>16))
|
75 |
|
|
|
76 |
|
|
/* Background Modes */
|
77 |
|
|
#define TRANSPARENT 1
|
78 |
|
|
#define OPAQUE 2
|
79 |
|
|
|
80 |
|
|
/* Text Alignment*/
|
81 |
|
|
#define TA_NOUPDATECP 0
|
82 |
|
|
#define TA_UPDATECP 1
|
83 |
|
|
|
84 |
|
|
#define TA_LEFT 0
|
85 |
|
|
#define TA_RIGHT 2
|
86 |
|
|
#define TA_CENTER 6
|
87 |
|
|
|
88 |
|
|
#define TA_TOP 0
|
89 |
|
|
#define TA_BOTTOM 8
|
90 |
|
|
#define TA_BASELINE 24
|
91 |
|
|
#define TA_RTLREADING 256
|
92 |
|
|
#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
|
93 |
|
|
|
94 |
|
|
COLORREF WINAPI SetTextColor(HDC, COLORREF);
|
95 |
|
|
COLORREF WINAPI SetBkColor(HDC, COLORREF);
|
96 |
|
|
int WINAPI SetBkMode(HDC, int);
|
97 |
|
|
UINT WINAPI SetTextAlign(HDC hdc, UINT fMode);
|
98 |
|
|
|
99 |
|
|
/* Binary raster ops*/
|
100 |
|
|
#define R2_BLACK (MWMODE_CLEAR+1) /* 0 */
|
101 |
|
|
#define R2_NOTMERGEPEN (MWMODE_NOR+1) /* DPon */
|
102 |
|
|
#define R2_MASKNOTPEN (MWMODE_ANDINVERTED+1) /* DPna */
|
103 |
|
|
#define R2_NOTCOPYPEN (MWMODE_COPYINVERTED+1) /* Pn */
|
104 |
|
|
#define R2_MASKPENNOT (MWMODE_ANDREVERSE+1) /* PDna */
|
105 |
|
|
#define R2_NOT (MWMODE_INVERT+1) /* Dn */
|
106 |
|
|
#define R2_XORPEN (MWMODE_XOR+1) /* DPx */
|
107 |
|
|
#define R2_NOTMASKPEN (MWMODE_NAND+1) /* DPan */
|
108 |
|
|
#define R2_MASKPEN (MWMODE_AND+1) /* DPa */
|
109 |
|
|
#define R2_NOTXORPEN (MWMODE_EQUIV+1) /* DPxn */
|
110 |
|
|
#define R2_NOP (MWMODE_NOOP+1) /* D */
|
111 |
|
|
#define R2_MERGENOTPEN (MWMODE_ORINVERTED+1) /* DPno */
|
112 |
|
|
#define R2_COPYPEN (MWMODE_COPY+1) /* P */
|
113 |
|
|
#define R2_MERGEPENNOT (MWMODE_ORREVERSE+1) /* PDno */
|
114 |
|
|
#define R2_MERGEPEN (MWMODE_OR+1) /* DPo */
|
115 |
|
|
#define R2_WHITE (MWMODE_SETTO1+1) /* 1 */
|
116 |
|
|
#define R2_LAST 16
|
117 |
|
|
|
118 |
|
|
int WINAPI SetROP2(HDC hdc, int fnDrawMode);
|
119 |
|
|
|
120 |
|
|
#define GDI_ERROR (0xFFFFFFFFL)
|
121 |
|
|
#define CLR_INVALID 0xFFFFFFFF
|
122 |
|
|
|
123 |
|
|
COLORREF WINAPI GetPixel(HDC hdc, int x, int y);
|
124 |
|
|
COLORREF WINAPI SetPixel(HDC hdc, int x, int y, COLORREF crColor);
|
125 |
|
|
BOOL WINAPI MoveToEx(HDC hdc, int x, int y, LPPOINT lpPoint);
|
126 |
|
|
BOOL WINAPI LineTo(HDC hdc, int x, int y);
|
127 |
|
|
BOOL WINAPI Polyline(HDC hdc, CONST POINT *lppt, int cPoints);
|
128 |
|
|
BOOL WINAPI PolyPolygon(HDC hdc, CONST POINT *lpPoints, LPINT lpPolyCounts,
|
129 |
|
|
int nCount);
|
130 |
|
|
BOOL WINAPI Rectangle(HDC hdc, int nLeft, int nTop, int nRight,int nBottom);
|
131 |
|
|
BOOL WINAPI Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
132 |
|
|
int nBottomRect);
|
133 |
|
|
BOOL WINAPI Arc(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
134 |
|
|
int nBottomRect, int nXStartArc, int nYStartArc,
|
135 |
|
|
int nXEndArc, int nYEndArc);
|
136 |
|
|
BOOL WINAPI Pie(HDC hdc, int nLeftRect, int nTopRect, int nRightRect,
|
137 |
|
|
int nBottomRect, int nXRadial1, int nYRadial1,
|
138 |
|
|
int nXRadial2, int nYRadial2);
|
139 |
|
|
BOOL WINAPI Polygon(HDC hdc, CONST POINT *lpPoints, int nCount);
|
140 |
|
|
int WINAPI FillRect(HDC hDC, CONST RECT *lprc, HBRUSH hbr);
|
141 |
|
|
|
142 |
|
|
/* ExTextOut options*/
|
143 |
|
|
#define ETO_OPAQUE 0x0002
|
144 |
|
|
#define ETO_CLIPPED 0x0004 /* nyi*/
|
145 |
|
|
|
146 |
|
|
BOOL WINAPI TextOut(HDC hdc, int x, int y, LPCSTR lpszString, int cbString);
|
147 |
|
|
BOOL WINAPI ExtTextOut(HDC hdc, int x, int y, UINT fuOptions,
|
148 |
|
|
CONST RECT *lprc, LPCSTR lpszString, UINT cbCount,
|
149 |
|
|
CONST INT *lpDx);
|
150 |
|
|
BOOL WINAPI ExtTextOutW(HDC hdc, int x, int y, UINT fuOptions,
|
151 |
|
|
CONST RECT *lprc, LPCWSTR lpszString, UINT cbCount,
|
152 |
|
|
CONST INT *lpDx);
|
153 |
|
|
|
154 |
|
|
/* DrawText options*/
|
155 |
|
|
#define DT_TOP 0x00000000
|
156 |
|
|
#define DT_LEFT 0x00000000
|
157 |
|
|
#define DT_CENTER 0x00000001
|
158 |
|
|
#define DT_RIGHT 0x00000002
|
159 |
|
|
#define DT_VCENTER 0x00000004
|
160 |
|
|
#define DT_BOTTOM 0x00000008
|
161 |
|
|
#define DT_WORDBREAK 0x00000010
|
162 |
|
|
#define DT_SINGLELINE 0x00000020
|
163 |
|
|
#define DT_EXPANDTABS 0x00000040
|
164 |
|
|
#define DT_TABSTOP 0x00000080
|
165 |
|
|
#define DT_NOCLIP 0x00000100
|
166 |
|
|
#define DT_EXTERNALLEADING 0x00000200
|
167 |
|
|
#define DT_CALCRECT 0x00000400
|
168 |
|
|
#define DT_NOPREFIX 0x00000800
|
169 |
|
|
#define DT_INTERNAL 0x00001000
|
170 |
|
|
#define DT_EDITCONTROL 0x00002000
|
171 |
|
|
#define DT_PATH_ELLIPSIS 0x00004000
|
172 |
|
|
#define DT_END_ELLIPSIS 0x00008000
|
173 |
|
|
#define DT_MODIFYSTRING 0x00010000
|
174 |
|
|
#define DT_RTLREADING 0x00020000
|
175 |
|
|
#define DT_WORD_ELLIPSIS 0x00040000
|
176 |
|
|
|
177 |
|
|
int WINAPI DrawTextA(HDC hdc, LPCSTR lpString, int nCount, LPRECT lpRect,
|
178 |
|
|
UINT uFormat);
|
179 |
|
|
int WINAPI DrawTextW(HDC hdc, LPCWSTR lpString, int nCount, LPRECT lpRect,
|
180 |
|
|
UINT uFormat);
|
181 |
|
|
#define DrawText DrawTextA
|
182 |
|
|
|
183 |
|
|
BOOL WINAPI DrawDIB(HDC hdc,int x, int y,PMWIMAGEHDR pimage); /* microwin*/
|
184 |
|
|
|
185 |
|
|
/* GetSysColor, FillRect colors*/
|
186 |
|
|
#define COLOR_SCROLLBAR 0
|
187 |
|
|
#define COLOR_BACKGROUND 1
|
188 |
|
|
#define COLOR_ACTIVECAPTION 2
|
189 |
|
|
#define COLOR_INACTIVECAPTION 3
|
190 |
|
|
#define COLOR_MENU 4
|
191 |
|
|
#define COLOR_WINDOW 5
|
192 |
|
|
#define COLOR_WINDOWFRAME 6
|
193 |
|
|
#define COLOR_MENUTEXT 7
|
194 |
|
|
#define COLOR_WINDOWTEXT 8
|
195 |
|
|
#define COLOR_CAPTIONTEXT 9
|
196 |
|
|
#define COLOR_ACTIVEBORDER 10
|
197 |
|
|
#define COLOR_INACTIVEBORDER 11
|
198 |
|
|
#define COLOR_APPWORKSPACE 12
|
199 |
|
|
#define COLOR_HIGHLIGHT 13
|
200 |
|
|
#define COLOR_HIGHLIGHTTEXT 14
|
201 |
|
|
#define COLOR_BTNFACE 15
|
202 |
|
|
#define COLOR_BTNSHADOW 16
|
203 |
|
|
#define COLOR_GRAYTEXT 17
|
204 |
|
|
#define COLOR_BTNTEXT 18
|
205 |
|
|
#define COLOR_INACTIVECAPTIONTEXT 19
|
206 |
|
|
#define COLOR_BTNHIGHLIGHT 20
|
207 |
|
|
#define COLOR_3DDKSHADOW 21
|
208 |
|
|
#define COLOR_3DLIGHT 22
|
209 |
|
|
#define COLOR_INFOTEXT 23
|
210 |
|
|
#define COLOR_INFOBK 24
|
211 |
|
|
#define COLOR_DESKTOP COLOR_BACKGROUND
|
212 |
|
|
#define COLOR_3DFACE COLOR_BTNFACE
|
213 |
|
|
#define COLOR_3DSHADOW COLOR_BTNSHADOW
|
214 |
|
|
#define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
|
215 |
|
|
#define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
|
216 |
|
|
#define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
|
217 |
|
|
#define COLOR_ALTERNATEBUTTONFACE 25
|
218 |
|
|
#define COLOR_HOTLIGHT 26
|
219 |
|
|
#define COLOR_GRADIENTACTIVECAPTION 27
|
220 |
|
|
#define COLOR_GRADIENTINACTIVECAPTION 28
|
221 |
|
|
|
222 |
|
|
DWORD WINAPI GetSysColor(int nIndex);
|
223 |
|
|
COLORREF WINAPI SetSysColor(int nIndex, COLORREF crColor);/* Microwindows only*/
|
224 |
|
|
|
225 |
|
|
/* Stock Logical Objects */
|
226 |
|
|
#define WHITE_BRUSH 0
|
227 |
|
|
#define LTGRAY_BRUSH 1
|
228 |
|
|
#define GRAY_BRUSH 2
|
229 |
|
|
#define DKGRAY_BRUSH 3
|
230 |
|
|
#define BLACK_BRUSH 4
|
231 |
|
|
#define NULL_BRUSH 5
|
232 |
|
|
#define HOLLOW_BRUSH NULL_BRUSH
|
233 |
|
|
#define WHITE_PEN 6
|
234 |
|
|
#define BLACK_PEN 7
|
235 |
|
|
#define NULL_PEN 8
|
236 |
|
|
#define OEM_FIXED_FONT 10
|
237 |
|
|
#define ANSI_FIXED_FONT 11
|
238 |
|
|
#define ANSI_VAR_FONT 12
|
239 |
|
|
#define SYSTEM_FONT 13
|
240 |
|
|
#define DEVICE_DEFAULT_FONT 14
|
241 |
|
|
#define DEFAULT_PALETTE 15
|
242 |
|
|
#define SYSTEM_FIXED_FONT 16
|
243 |
|
|
#define DEFAULT_GUI_FONT 17
|
244 |
|
|
#define DC_BRUSH 18
|
245 |
|
|
#define DC_PEN 19
|
246 |
|
|
#define STOCK_LAST 19
|
247 |
|
|
|
248 |
|
|
/* Object types*/
|
249 |
|
|
#define OBJ_PEN 1
|
250 |
|
|
#define OBJ_BRUSH 2
|
251 |
|
|
#define OBJ_DC 3
|
252 |
|
|
#define OBJ_METADC 4
|
253 |
|
|
#define OBJ_PAL 5
|
254 |
|
|
#define OBJ_FONT 6
|
255 |
|
|
#define OBJ_BITMAP 7
|
256 |
|
|
#define OBJ_REGION 8
|
257 |
|
|
#define OBJ_METAFILE 9
|
258 |
|
|
#define OBJ_MEMDC 10
|
259 |
|
|
#define OBJ_EXTPEN 11
|
260 |
|
|
#define OBJ_ENHMETADC 12
|
261 |
|
|
#define OBJ_ENHMETAFILE 13
|
262 |
|
|
|
263 |
|
|
HGDIOBJ WINAPI GetStockObject(int nObject);
|
264 |
|
|
HGDIOBJ WINAPI SelectObject(HDC hdc, HGDIOBJ hObject);
|
265 |
|
|
BOOL WINAPI DeleteObject(HGDIOBJ hObject);
|
266 |
|
|
int WINAPI SelectClipRgn(HDC hdc, HRGN hrgn);
|
267 |
|
|
int WINAPI ExtSelectClipRgn(HDC hdc, HRGN hrgn, int fnMode);
|
268 |
|
|
int WINAPI GetUpdateRgn(HWND hwnd, HRGN hrgn, BOOL bErase);
|
269 |
|
|
BOOL WINAPI GetUpdateRect(HWND hwnd, LPRECT lpRect, BOOL bErase);
|
270 |
|
|
|
271 |
|
|
/* Brush Styles */
|
272 |
|
|
#define BS_SOLID 0
|
273 |
|
|
#define BS_NULL 1
|
274 |
|
|
#define BS_HOLLOW BS_NULL
|
275 |
|
|
|
276 |
|
|
HBRUSH WINAPI CreateSolidBrush(COLORREF crColor);
|
277 |
|
|
|
278 |
|
|
/* Pen Styles */
|
279 |
|
|
#define PS_SOLID 0
|
280 |
|
|
#define PS_NULL 5
|
281 |
|
|
|
282 |
|
|
HPEN WINAPI CreatePen(int nPenStyle, int nWidth, COLORREF crColor);
|
283 |
|
|
|
284 |
|
|
HBITMAP WINAPI CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight);
|
285 |
|
|
HDC WINAPI CreateCompatibleDC(HDC hdc);
|
286 |
|
|
|
287 |
|
|
/* BitBlit raster opcodes*/
|
288 |
|
|
#define SRCCOPY (DWORD)MWROP_COPY /* source */
|
289 |
|
|
#define SRCPAINT (DWORD)MWROP_OR /* source OR dest */
|
290 |
|
|
#define SRCAND (DWORD)MWROP_AND /* source AND dest */
|
291 |
|
|
#define SRCINVERT (DWORD)MWROP_XOR /* source XOR dest */
|
292 |
|
|
#define SRCERASE (DWORD)MWROP_ANDREVERSE /* source AND (NOT dest ) */
|
293 |
|
|
#define NOTSRCCOPY (DWORD)MWROP_COPYINVERTED /* (NOT source) */
|
294 |
|
|
#define NOTSRCERASE (DWORD)MWROP_NOR /* (NOT src) AND (NOT dest) */
|
295 |
|
|
#define MERGEPAINT (DWORD)MWROP_ORINVERTED /* (NOT source) OR dest */
|
296 |
|
|
#define DSTINVERT (DWORD)MWROP_INVERT /* (NOT dest) */
|
297 |
|
|
#define BLACKNESS (DWORD)MWROP_CLEAR /* BLACK */
|
298 |
|
|
#define WHITENESS (DWORD)MWROP_SET /* WHITE */
|
299 |
|
|
#if 0
|
300 |
|
|
#define MERGECOPY (DWORD)0x00C000CA /* (source AND pattern) */
|
301 |
|
|
#define PATCOPY (DWORD)0x00F00021 /* pattern */
|
302 |
|
|
#define PATPAINT (DWORD)0x00FB0A09 /* DPSnoo */
|
303 |
|
|
#define PATINVERT (DWORD)0x005A0049 /* pattern XOR dest */
|
304 |
|
|
#endif
|
305 |
|
|
|
306 |
|
|
BOOL WINAPI BitBlt(HDC hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,
|
307 |
|
|
HDC hdcSrc,int nXSrc,int nYSrc,DWORD dwRop);
|
308 |
|
|
BOOL WINAPI StretchBlt(HDC hdcDest,int nXOriginDest,int nYOriginDest,
|
309 |
|
|
int nWidthDest,int nHeightDest,HDC hdcSrc,
|
310 |
|
|
int nXOriginSrc,int nYOriginSrc,int nWidthSrc,
|
311 |
|
|
int nHeightSrc, DWORD dwRop);
|
312 |
|
|
|
313 |
|
|
/* Palette entry flags*/
|
314 |
|
|
#define PC_RESERVED 0x01
|
315 |
|
|
#define PC_EXPLICIT 0x02
|
316 |
|
|
#define PC_NOCOLLAPSE 0x04
|
317 |
|
|
|
318 |
|
|
typedef struct tagPALETTEENTRY {
|
319 |
|
|
BYTE peRed;
|
320 |
|
|
BYTE peGreen;
|
321 |
|
|
BYTE peBlue;
|
322 |
|
|
BYTE peFlags;
|
323 |
|
|
} PALETTEENTRY, *PPALETTEENTRY, FAR *LPPALETTEENTRY;
|
324 |
|
|
|
325 |
|
|
UINT WINAPI GetSystemPaletteEntries(HDC hdc,UINT iStartIndex,UINT nEntries,
|
326 |
|
|
LPPALETTEENTRY lppe);
|
327 |
|
|
|
328 |
|
|
/* GetDeviceCaps parameters*/
|
329 |
|
|
#define HORZRES 8 /* Horizontal width in pixels */
|
330 |
|
|
#define VERTRES 10 /* Vertical height in pixels */
|
331 |
|
|
#define BITSPIXEL 12 /* Number of bits per pixel */
|
332 |
|
|
#define PLANES 14 /* Number of planes */
|
333 |
|
|
#define LOGPIXELSX 88 /* Logical pixels/inch in X */
|
334 |
|
|
#define LOGPIXELSY 90 /* Logical pixels/inch in Y */
|
335 |
|
|
#define SIZEPALETTE 104 /* Number of entries in physical palette */
|
336 |
|
|
|
337 |
|
|
int WINAPI GetDeviceCaps(HDC hdc, int nIndex);
|
338 |
|
|
|
339 |
|
|
/* Region flags*/
|
340 |
|
|
#define ERRORREGION MWREGION_ERROR
|
341 |
|
|
#define NULLREGION MWREGION_NULL
|
342 |
|
|
#define SIMPLEREGION MWREGION_SIMPLE
|
343 |
|
|
#define COMPLEXREGION MWREGION_COMPLEX
|
344 |
|
|
/* kluge for VxWorks*/
|
345 |
|
|
#ifdef ERROR
|
346 |
|
|
#undef ERROR
|
347 |
|
|
#endif
|
348 |
|
|
#define ERROR ERRORREGION
|
349 |
|
|
#define RGN_ERROR ERRORREGION
|
350 |
|
|
|
351 |
|
|
/* CombineRgn() Styles */
|
352 |
|
|
#define RGN_AND 1
|
353 |
|
|
#define RGN_OR 2
|
354 |
|
|
#define RGN_XOR 3
|
355 |
|
|
#define RGN_DIFF 4
|
356 |
|
|
#define RGN_COPY 5
|
357 |
|
|
#define RGN_MIN RGN_AND
|
358 |
|
|
#define RGN_MAX RGN_COPY
|
359 |
|
|
|
360 |
|
|
/* GetRegionData/ExtCreateRegion */
|
361 |
|
|
#define RDH_RECTANGLES 1
|
362 |
|
|
typedef struct _RGNDATAHEADER {
|
363 |
|
|
DWORD dwSize;
|
364 |
|
|
DWORD iType;
|
365 |
|
|
DWORD nCount;
|
366 |
|
|
DWORD nRgnSize;
|
367 |
|
|
RECT rcBound;
|
368 |
|
|
} RGNDATAHEADER, *PRGNDATAHEADER;
|
369 |
|
|
|
370 |
|
|
typedef struct _RGNDATA {
|
371 |
|
|
RGNDATAHEADER rdh;
|
372 |
|
|
char Buffer[1];
|
373 |
|
|
} RGNDATA, *PRGNDATA, *NPRGNDATA, *LPRGNDATA;
|
374 |
|
|
|
375 |
|
|
/* Region entry points*/
|
376 |
|
|
INT WINAPI OffsetRgn(HRGN hrgn, INT x, INT y );
|
377 |
|
|
INT WINAPI GetRgnBox(HRGN hrgn, LPRECT rect );
|
378 |
|
|
HRGN WINAPI CreateRectRgn(INT left, INT top, INT right, INT bottom);
|
379 |
|
|
HRGN WINAPI CreateRectRgnIndirect(const RECT* rect );
|
380 |
|
|
VOID WINAPI SetRectRgn(HRGN hrgn, INT left, INT top, INT right, INT bottom );
|
381 |
|
|
HRGN WINAPI CreateRoundRectRgn(INT left, INT top, INT right, INT bottom,
|
382 |
|
|
INT ellipse_width, INT ellipse_height );
|
383 |
|
|
HRGN WINAPI CreateEllipticRgn(INT left, INT top, INT right, INT bottom );
|
384 |
|
|
HRGN WINAPI CreateEllipticRgnIndirect(const RECT *rect );
|
385 |
|
|
DWORD WINAPI GetRegionData(HRGN hrgn, DWORD count, LPRGNDATA rgndata);
|
386 |
|
|
BOOL WINAPI PtInRegion(HRGN hrgn, INT x, INT y );
|
387 |
|
|
BOOL WINAPI RectInRegion(HRGN hrgn, const RECT *rect );
|
388 |
|
|
BOOL WINAPI EqualRgn(HRGN hrgn1, HRGN hrgn2 );
|
389 |
|
|
INT WINAPI CombineRgn(HRGN hDest, HRGN hSrc1, HRGN hSrc2, INT mode);
|
390 |
|
|
|
391 |
|
|
/* Rect entry points*/
|
392 |
|
|
BOOL WINAPI IntersectRect(LPRECT dest, const RECT *src1, const RECT *src2 );
|
393 |
|
|
BOOL WINAPI UnionRect(LPRECT dest, const RECT *src1, const RECT *src2 );
|
394 |
|
|
BOOL WINAPI EqualRect(const RECT* rect1, const RECT* rect2 );
|
395 |
|
|
BOOL WINAPI SubtractRect(LPRECT dest, const RECT *src1, const RECT *src2 );
|
396 |
|
|
|