| 1 | /* $Id: dc.h,v 1.11 2000-01-31 22:30:51 sandervl Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * public dc functions
|
|---|
| 4 | *
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1999 Daniela Engert (dani@ngrt.de)
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 10 | *
|
|---|
| 11 | */
|
|---|
| 12 | #ifndef __DC_H__
|
|---|
| 13 | #define __DC_H__
|
|---|
| 14 |
|
|---|
| 15 | extern BOOL isYup (struct _DCData *pHps);
|
|---|
| 16 | extern HDC sendEraseBkgnd (Win32BaseWindow *wnd);
|
|---|
| 17 | extern void releaseOwnDC (HDC hps);
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | #ifdef INCLUDED_BY_DC
|
|---|
| 21 | /*********************/
|
|---|
| 22 | typedef struct
|
|---|
| 23 | {
|
|---|
| 24 | HDC hdc;
|
|---|
| 25 | BOOL fErase;
|
|---|
| 26 | RECT rcPaint;
|
|---|
| 27 | BOOL fRestore;
|
|---|
| 28 | BOOL IncUpdate;
|
|---|
| 29 | BYTE rgbReserved[32];
|
|---|
| 30 | } PAINTSTRUCT_W, *PPAINTSTRUCT_W, *LPPAINTSTRUCT_W;
|
|---|
| 31 |
|
|---|
| 32 | #define PS_SOLID_W 0x00000000
|
|---|
| 33 | #define PS_DASH_W 0x00000001
|
|---|
| 34 | #define PS_DOT_W 0x00000002
|
|---|
| 35 | #define PS_DASHDOT_W 0x00000003
|
|---|
| 36 | #define PS_DASHDOTDOT_W 0x00000004
|
|---|
| 37 | #define PS_NULL_W 0x00000005
|
|---|
| 38 | #define PS_INSIDEFRAME_W 0x00000006
|
|---|
| 39 | #define PS_USERSTYLE_W 0x00000007
|
|---|
| 40 | #define PS_ALTERNATE_W 0x00000008
|
|---|
| 41 | #define PS_STYLE_MASK_W 0x0000000f
|
|---|
| 42 |
|
|---|
| 43 | typedef struct
|
|---|
| 44 | {
|
|---|
| 45 | UINT lopnStyle;
|
|---|
| 46 | POINT lopnWidth;
|
|---|
| 47 | ULONG lopnColor;
|
|---|
| 48 | } LOGPEN_W, *LPLOGPEN_W;
|
|---|
| 49 |
|
|---|
| 50 | typedef struct tagEXTLOGPEN
|
|---|
| 51 | {
|
|---|
| 52 | DWORD elpPenStyle;
|
|---|
| 53 | DWORD elpWidth;
|
|---|
| 54 | DWORD elpBrushStyle;
|
|---|
| 55 | DWORD elpColor;
|
|---|
| 56 | DWORD elpNumEntries;
|
|---|
| 57 | DWORD elpStyleEntry[1];
|
|---|
| 58 | } EXTLOGPEN_W, *PEXTLOGPEN_W, *NPEXTLOGPEN_W, *LPEXTLOGPEN_W;
|
|---|
| 59 |
|
|---|
| 60 | typedef struct
|
|---|
| 61 | {
|
|---|
| 62 | UINT lbStyle;
|
|---|
| 63 | ULONG lbColor;
|
|---|
| 64 | INT lbHatch;
|
|---|
| 65 | } LOGBRUSH_W, *LPLOGBRUSH_W;
|
|---|
| 66 |
|
|---|
| 67 | typedef struct _penobject
|
|---|
| 68 | {
|
|---|
| 69 | ULONG filler[9];
|
|---|
| 70 | union {
|
|---|
| 71 | struct {
|
|---|
| 72 | PEXTLOGPEN_W pExtLogPen;
|
|---|
| 73 | LOGBRUSH_W logbrush;
|
|---|
| 74 | LOGPEN_W logpen;
|
|---|
| 75 | } ExtPen;
|
|---|
| 76 | struct {
|
|---|
| 77 | LOGPEN_W logpen;
|
|---|
| 78 | } Pen;
|
|---|
| 79 | };
|
|---|
| 80 | } tPenObject, *pPenObject;
|
|---|
| 81 |
|
|---|
| 82 | /* DC Graphics Mode */
|
|---|
| 83 | #define GM_COMPATIBLE_W 1
|
|---|
| 84 | #define GM_ADVANCED_W 2
|
|---|
| 85 |
|
|---|
| 86 | #define DCX_WINDOW_W 0x00000001L
|
|---|
| 87 | #define DCX_CACHE_W 0x00000002L
|
|---|
| 88 | #define DCX_NORESETATTRS_W 0x00000004L
|
|---|
| 89 | #define DCX_CLIPCHILDREN_W 0x00000008L
|
|---|
| 90 | #define DCX_CLIPSIBLINGS_W 0x00000010L
|
|---|
| 91 | #define DCX_PARENTCLIP_W 0x00000020L
|
|---|
| 92 | #define DCX_EXCLUDERGN_W 0x00000040L
|
|---|
| 93 | #define DCX_INTERSECTRGN_W 0x00000080L
|
|---|
| 94 | #define DCX_EXCLUDEUPDATE_W 0x00000100L
|
|---|
| 95 | #define DCX_INTERSECTUPDATE_W 0x00000200L
|
|---|
| 96 | #define DCX_LOCKWINDOWUPDATE_W 0x00000400L
|
|---|
| 97 | #define DCX_USESTYLE_W 0x00010000L
|
|---|
| 98 | #define DCX_VALIDATE_W 0x00200000L
|
|---|
| 99 |
|
|---|
| 100 | #define RDW_INVALIDATE_W 0x0001
|
|---|
| 101 | #define RDW_INTERNALPAINT_W 0x0002
|
|---|
| 102 | #define RDW_ERASE_W 0x0004
|
|---|
| 103 | #define RDW_VALIDATE_W 0x0008
|
|---|
| 104 | #define RDW_NOINTERNALPAINT_W 0x0010
|
|---|
| 105 | #define RDW_NOERASE_W 0x0020
|
|---|
| 106 | #define RDW_NOCHILDREN_W 0x0040
|
|---|
| 107 | #define RDW_ALLCHILDREN_W 0x0080
|
|---|
| 108 | #define RDW_UPDATENOW_W 0x0100
|
|---|
| 109 | #define RDW_ERASENOW_W 0x0200
|
|---|
| 110 | #define RDW_FRAME_W 0x0400
|
|---|
| 111 | #define RDW_NOFRAME_W 0x0800
|
|---|
| 112 |
|
|---|
| 113 | typedef struct _RGNDATAHEADER_W {
|
|---|
| 114 | DWORD dwSize;
|
|---|
| 115 | DWORD iType;
|
|---|
| 116 | DWORD nCount;
|
|---|
| 117 | DWORD nRgnSize;
|
|---|
| 118 | RECT rcBound;
|
|---|
| 119 | } RGNDATAHEADER_W, *LPRGNDATAHEADER_W;
|
|---|
| 120 |
|
|---|
| 121 | typedef struct _RGNDATA_W {
|
|---|
| 122 | RGNDATAHEADER_W rdh;
|
|---|
| 123 | char Buffer[1];
|
|---|
| 124 | } RGNDATA_W , *PRGNDATA_W , *LPRGNDATA_W ;
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 | /* Xform FLAGS */
|
|---|
| 128 | #define MWT_IDENTITY_W 1
|
|---|
| 129 | #define MWT_LEFTMULTIPLY_W 2
|
|---|
| 130 | #define MWT_RIGHTMULTIPLY_W 3
|
|---|
| 131 |
|
|---|
| 132 | /* Mapping Modes */
|
|---|
| 133 | #define MM_TEXT_W 1
|
|---|
| 134 | #define MM_LOMETRIC_W 2
|
|---|
| 135 | #define MM_HIMETRIC_W 3
|
|---|
| 136 | #define MM_LOENGLISH_W 4
|
|---|
| 137 | #define MM_HIENGLISH_W 5
|
|---|
| 138 | #define MM_TWIPS_W 6
|
|---|
| 139 | #define MM_ISOTROPIC_W 7
|
|---|
| 140 | #define MM_ANISOTROPIC_W 8
|
|---|
| 141 |
|
|---|
| 142 | #define RGN_OR_W 2
|
|---|
| 143 |
|
|---|
| 144 | /* Window scrolling */
|
|---|
| 145 | #define SW_SCROLLCHILDREN_W 0x0001
|
|---|
| 146 | #define SW_INVALIDATE_W 0x0002
|
|---|
| 147 | #define SW_ERASE_W 0x0004
|
|---|
| 148 | #define SW_SMOOTHSCROLL_W 0x0010
|
|---|
| 149 |
|
|---|
| 150 | /*********************/
|
|---|
| 151 |
|
|---|
| 152 | #ifndef OPEN32API
|
|---|
| 153 | #define OPEN32API _System
|
|---|
| 154 | #endif
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 | BOOL APIENTRY _GpiEnableYInversion (HPS hps, LONG lHeight);
|
|---|
| 158 |
|
|---|
| 159 | inline BOOL APIENTRY GpiEnableYInversion (HPS hps, LONG lHeight)
|
|---|
| 160 | {
|
|---|
| 161 | BOOL yyrc;
|
|---|
| 162 | USHORT sel = RestoreOS2FS();
|
|---|
| 163 |
|
|---|
| 164 | yyrc = _GpiEnableYInversion(hps, lHeight);
|
|---|
| 165 | SetFS(sel);
|
|---|
| 166 |
|
|---|
| 167 | return yyrc;
|
|---|
| 168 | }
|
|---|
| 169 |
|
|---|
| 170 | //LONG APIENTRY GpiQueryYInversion (HPS hps);
|
|---|
| 171 |
|
|---|
| 172 | PVOID APIENTRY _GpiAllocateDCData (HPS GpiH, ULONG size);
|
|---|
| 173 |
|
|---|
| 174 | inline PVOID APIENTRY GpiAllocateDCData (HPS GpiH, ULONG size)
|
|---|
| 175 | {
|
|---|
| 176 | PVOID yyrc;
|
|---|
| 177 | USHORT sel = RestoreOS2FS();
|
|---|
| 178 |
|
|---|
| 179 | yyrc = _GpiAllocateDCData(GpiH, size);
|
|---|
| 180 | SetFS(sel);
|
|---|
| 181 |
|
|---|
| 182 | return yyrc;
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 | PVOID APIENTRY _GpiQueryDCData (HPS hps);
|
|---|
| 186 |
|
|---|
| 187 | inline PVOID APIENTRY GpiQueryDCData (HPS hps)
|
|---|
| 188 | {
|
|---|
| 189 | PVOID yyrc;
|
|---|
| 190 | USHORT sel = RestoreOS2FS();
|
|---|
| 191 |
|
|---|
| 192 | yyrc = _GpiQueryDCData(hps);
|
|---|
| 193 | SetFS(sel);
|
|---|
| 194 |
|
|---|
| 195 | return yyrc;
|
|---|
| 196 | }
|
|---|
| 197 |
|
|---|
| 198 | HDC OPEN32API _HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a);
|
|---|
| 199 |
|
|---|
| 200 | inline HDC OPEN32API HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a)
|
|---|
| 201 | {
|
|---|
| 202 | HDC yyrc;
|
|---|
| 203 | USHORT sel = RestoreOS2FS();
|
|---|
| 204 |
|
|---|
| 205 | yyrc = _HPSToHDC(hwnd, hps, hdc, a);
|
|---|
| 206 | SetFS(sel);
|
|---|
| 207 |
|
|---|
| 208 | return yyrc;
|
|---|
| 209 | }
|
|---|
| 210 |
|
|---|
| 211 | void OPEN32API _DeleteHDC (HDC hdc);
|
|---|
| 212 |
|
|---|
| 213 | inline void OPEN32API DeleteHDC (HDC hdc)
|
|---|
| 214 | {
|
|---|
| 215 | USHORT sel = RestoreOS2FS();
|
|---|
| 216 |
|
|---|
| 217 | _DeleteHDC(hdc);
|
|---|
| 218 | SetFS(sel);
|
|---|
| 219 | }
|
|---|
| 220 |
|
|---|
| 221 | BOOL OPEN32API _O32_EndPaint (HWND hwnd, const PAINTSTRUCT_W *lpps);
|
|---|
| 222 |
|
|---|
| 223 | inline BOOL O32_EndPaint(HWND a, CONST PAINTSTRUCT_W *b)
|
|---|
| 224 | {
|
|---|
| 225 | BOOL yyrc;
|
|---|
| 226 | USHORT sel = RestoreOS2FS();
|
|---|
| 227 |
|
|---|
| 228 | yyrc = _O32_EndPaint(a, b);
|
|---|
| 229 | SetFS(sel);
|
|---|
| 230 |
|
|---|
| 231 | return yyrc;
|
|---|
| 232 | }
|
|---|
| 233 |
|
|---|
| 234 | int OPEN32API _O32_GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase);
|
|---|
| 235 |
|
|---|
| 236 | inline int O32_GetUpdateRgn(HWND a, HRGN b, BOOL c)
|
|---|
| 237 | {
|
|---|
| 238 | int yyrc;
|
|---|
| 239 | USHORT sel = RestoreOS2FS();
|
|---|
| 240 |
|
|---|
| 241 | yyrc = _O32_GetUpdateRgn(a, b, c);
|
|---|
| 242 | SetFS(sel);
|
|---|
| 243 |
|
|---|
| 244 | return yyrc;
|
|---|
| 245 | }
|
|---|
| 246 |
|
|---|
| 247 | ULONG OPEN32API _O32_GetRegionData (HRGN hrgn, ULONG count, PRGNDATA_W pData);
|
|---|
| 248 |
|
|---|
| 249 | inline DWORD O32_GetRegionData(HRGN a, DWORD b, PRGNDATA_W c)
|
|---|
| 250 | {
|
|---|
| 251 | DWORD yyrc;
|
|---|
| 252 | USHORT sel = RestoreOS2FS();
|
|---|
| 253 |
|
|---|
| 254 | yyrc = _O32_GetRegionData(a, b, c);
|
|---|
| 255 | SetFS(sel);
|
|---|
| 256 |
|
|---|
| 257 | return yyrc;
|
|---|
| 258 | }
|
|---|
| 259 |
|
|---|
| 260 | BOOL OPEN32API _O32_DeleteObject (LHANDLE hgdiobj);
|
|---|
| 261 |
|
|---|
| 262 | inline BOOL O32_DeleteObject(HANDLE a)
|
|---|
| 263 | {
|
|---|
| 264 | BOOL yyrc;
|
|---|
| 265 | USHORT sel = RestoreOS2FS();
|
|---|
| 266 |
|
|---|
| 267 | yyrc = _O32_DeleteObject(a);
|
|---|
| 268 | SetFS(sel);
|
|---|
| 269 |
|
|---|
| 270 | return yyrc;
|
|---|
| 271 | }
|
|---|
| 272 |
|
|---|
| 273 | int OPEN32API _O32_ReleaseDC (HWND hwnd, HDC hdc);
|
|---|
| 274 |
|
|---|
| 275 | inline int O32_ReleaseDC(HWND a, HDC b)
|
|---|
| 276 | {
|
|---|
| 277 | int yyrc;
|
|---|
| 278 | USHORT sel = RestoreOS2FS();
|
|---|
| 279 |
|
|---|
| 280 | yyrc = _O32_ReleaseDC(a, b);
|
|---|
| 281 | SetFS(sel);
|
|---|
| 282 |
|
|---|
| 283 | return yyrc;
|
|---|
| 284 | }
|
|---|
| 285 |
|
|---|
| 286 | VOID OPEN32API _O32_SetLastError( DWORD );
|
|---|
| 287 |
|
|---|
| 288 | inline VOID O32_SetLastError(DWORD a)
|
|---|
| 289 | {
|
|---|
| 290 | USHORT sel = RestoreOS2FS();
|
|---|
| 291 |
|
|---|
| 292 | _O32_SetLastError(a);
|
|---|
| 293 | SetFS(sel);
|
|---|
| 294 | }
|
|---|
| 295 |
|
|---|
| 296 | BOOL OPEN32API _O32_SetRectRgn (HRGN dest, int left, int top, int right, int bottom);
|
|---|
| 297 |
|
|---|
| 298 | inline BOOL O32_SetRectRgn(HRGN a, int b, int c, int d, int e)
|
|---|
| 299 | {
|
|---|
| 300 | BOOL yyrc;
|
|---|
| 301 | USHORT sel = RestoreOS2FS();
|
|---|
| 302 |
|
|---|
| 303 | yyrc = _O32_SetRectRgn(a, b, c, d, e);
|
|---|
| 304 | SetFS(sel);
|
|---|
| 305 |
|
|---|
| 306 | return yyrc;
|
|---|
| 307 | }
|
|---|
| 308 |
|
|---|
| 309 | int OPEN32API _O32_CombineRgn (HRGN dest, HRGN src1, HRGN src2, int mode);
|
|---|
| 310 |
|
|---|
| 311 | inline int O32_CombineRgn(HRGN a, HRGN b, HRGN c, int d)
|
|---|
| 312 | {
|
|---|
| 313 | int yyrc;
|
|---|
| 314 | USHORT sel = RestoreOS2FS();
|
|---|
| 315 |
|
|---|
| 316 | yyrc = _O32_CombineRgn(a, b, c, d);
|
|---|
| 317 | SetFS(sel);
|
|---|
| 318 |
|
|---|
| 319 | return yyrc;
|
|---|
| 320 | }
|
|---|
| 321 |
|
|---|
| 322 | HRGN OPEN32API _O32_CreateRectRgn (int left, int top, int right, int bottom);
|
|---|
| 323 |
|
|---|
| 324 | inline HRGN O32_CreateRectRgn(int a, int b, int c, int d)
|
|---|
| 325 | {
|
|---|
| 326 | HRGN yyrc;
|
|---|
| 327 | USHORT sel = RestoreOS2FS();
|
|---|
| 328 |
|
|---|
| 329 | yyrc = _O32_CreateRectRgn(a, b, c, d);
|
|---|
| 330 | SetFS(sel);
|
|---|
| 331 |
|
|---|
| 332 | return yyrc;
|
|---|
| 333 | }
|
|---|
| 334 |
|
|---|
| 335 | BOOL OPEN32API _O32_ExcludeUpdateRgn( HDC, HWND );
|
|---|
| 336 |
|
|---|
| 337 | inline BOOL O32_ExcludeUpdateRgn(HDC a, HWND b)
|
|---|
| 338 | {
|
|---|
| 339 | BOOL yyrc;
|
|---|
| 340 | USHORT sel = RestoreOS2FS();
|
|---|
| 341 |
|
|---|
| 342 | yyrc = _O32_ExcludeUpdateRgn(a, b);
|
|---|
| 343 | SetFS(sel);
|
|---|
| 344 |
|
|---|
| 345 | return yyrc;
|
|---|
| 346 | }
|
|---|
| 347 |
|
|---|
| 348 | BOOL OPEN32API _O32_CreateCaret (HWND hwnd, HBITMAP hbm, int width, int height);
|
|---|
| 349 |
|
|---|
| 350 | inline BOOL O32_CreateCaret(HWND a, HBITMAP b, int c, int d)
|
|---|
| 351 | {
|
|---|
| 352 | BOOL yyrc;
|
|---|
| 353 | USHORT sel = RestoreOS2FS();
|
|---|
| 354 |
|
|---|
| 355 | yyrc = _O32_CreateCaret(a, b, c, d);
|
|---|
| 356 | SetFS(sel);
|
|---|
| 357 |
|
|---|
| 358 | return yyrc;
|
|---|
| 359 | }
|
|---|
| 360 |
|
|---|
| 361 | BOOL OPEN32API _O32_SelectClipRgn(HDC hdc,HRGN hrgn);
|
|---|
| 362 |
|
|---|
| 363 | inline BOOL O32_SelectClipRgn(HDC hdc,HRGN hrgn)
|
|---|
| 364 | {
|
|---|
| 365 | BOOL yyrc;
|
|---|
| 366 | USHORT sel = RestoreOS2FS();
|
|---|
| 367 |
|
|---|
| 368 | yyrc = _O32_SelectClipRgn(hdc,hrgn);
|
|---|
| 369 | SetFS(sel);
|
|---|
| 370 |
|
|---|
| 371 | return yyrc;
|
|---|
| 372 | }
|
|---|
| 373 |
|
|---|
| 374 | BOOL APIENTRY __DestroyCaret (void);
|
|---|
| 375 |
|
|---|
| 376 | inline BOOL APIENTRY _DestroyCaret (void)
|
|---|
| 377 | {
|
|---|
| 378 | BOOL yyrc;
|
|---|
| 379 | USHORT sel = RestoreOS2FS();
|
|---|
| 380 |
|
|---|
| 381 | yyrc = __DestroyCaret();
|
|---|
| 382 | SetFS(sel);
|
|---|
| 383 |
|
|---|
| 384 | return yyrc;
|
|---|
| 385 | }
|
|---|
| 386 |
|
|---|
| 387 | UINT APIENTRY __GetCaretBlinkTime (void);
|
|---|
| 388 |
|
|---|
| 389 | inline UINT APIENTRY _GetCaretBlinkTime (void)
|
|---|
| 390 | {
|
|---|
| 391 | UINT yyrc;
|
|---|
| 392 | USHORT sel = RestoreOS2FS();
|
|---|
| 393 |
|
|---|
| 394 | yyrc = __GetCaretBlinkTime();
|
|---|
| 395 | SetFS(sel);
|
|---|
| 396 |
|
|---|
| 397 | return yyrc;
|
|---|
| 398 | }
|
|---|
| 399 |
|
|---|
| 400 | BOOL APIENTRY __HideCaret (HWND hwnd);
|
|---|
| 401 |
|
|---|
| 402 | inline BOOL APIENTRY _HideCaret (HWND hwnd)
|
|---|
| 403 | {
|
|---|
| 404 | BOOL yyrc;
|
|---|
| 405 | USHORT sel = RestoreOS2FS();
|
|---|
| 406 |
|
|---|
| 407 | yyrc = __HideCaret(hwnd);
|
|---|
| 408 | SetFS(sel);
|
|---|
| 409 |
|
|---|
| 410 | return yyrc;
|
|---|
| 411 | }
|
|---|
| 412 |
|
|---|
| 413 | BOOL APIENTRY __SetCaretBlinkTime (UINT mSecs);
|
|---|
| 414 |
|
|---|
| 415 | inline BOOL APIENTRY _SetCaretBlinkTime (UINT mSecs)
|
|---|
| 416 | {
|
|---|
| 417 | BOOL yyrc;
|
|---|
| 418 | USHORT sel = RestoreOS2FS();
|
|---|
| 419 |
|
|---|
| 420 | yyrc = __SetCaretBlinkTime(mSecs);
|
|---|
| 421 | SetFS(sel);
|
|---|
| 422 |
|
|---|
| 423 | return yyrc;
|
|---|
| 424 | }
|
|---|
| 425 |
|
|---|
| 426 | BOOL APIENTRY __ShowCaret (HWND hwnd);
|
|---|
| 427 |
|
|---|
| 428 | inline BOOL APIENTRY _ShowCaret (HWND hwnd)
|
|---|
| 429 | {
|
|---|
| 430 | BOOL yyrc;
|
|---|
| 431 | USHORT sel = RestoreOS2FS();
|
|---|
| 432 |
|
|---|
| 433 | yyrc = __ShowCaret(hwnd);
|
|---|
| 434 | SetFS(sel);
|
|---|
| 435 |
|
|---|
| 436 | return yyrc;
|
|---|
| 437 | }
|
|---|
| 438 |
|
|---|
| 439 |
|
|---|
| 440 | // from pmddi.h:
|
|---|
| 441 | /* CopyClipRegion */
|
|---|
| 442 |
|
|---|
| 443 | #define COPYCRGN_ALLINTERSECT 0L
|
|---|
| 444 | #define COPYCRGN_VISRGN 1L
|
|---|
| 445 | #define COPYCRGN_CLIPRGN 2L
|
|---|
| 446 |
|
|---|
| 447 | /* SetupDC */
|
|---|
| 448 |
|
|---|
| 449 | #define SETUPDC_VISRGN 0x00000001L
|
|---|
| 450 | #define SETUPDC_ORIGIN 0x00000002L
|
|---|
| 451 | #define SETUPDC_ACCUMBOUNDSON 0x00000004L
|
|---|
| 452 | #define SETUPDC_ACCUMBOUNDSOFF 0x00000008L
|
|---|
| 453 | #define SETUPDC_RECALCCLIP 0x00000010L
|
|---|
| 454 | #define SETUPDC_SETOWNER 0x00000020L
|
|---|
| 455 | #define SETUPDC_CLEANDC 0x00000040L
|
|---|
| 456 |
|
|---|
| 457 | ULONG APIENTRY Gre32Entry4(ULONG,ULONG,ULONG,ULONG);
|
|---|
| 458 |
|
|---|
| 459 | inline ULONG APIENTRY _Gre32Entry4 (ULONG a, ULONG b, ULONG c, ULONG d)
|
|---|
| 460 | {
|
|---|
| 461 | ULONG yyrc;
|
|---|
| 462 | USHORT sel = RestoreOS2FS();
|
|---|
| 463 |
|
|---|
| 464 | yyrc = Gre32Entry4(a,b,c,d);
|
|---|
| 465 | SetFS(sel);
|
|---|
| 466 |
|
|---|
| 467 | return yyrc;
|
|---|
| 468 | }
|
|---|
| 469 |
|
|---|
| 470 | ULONG APIENTRY Gre32Entry5(ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 471 |
|
|---|
| 472 | inline ULONG APIENTRY _Gre32Entry5 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e)
|
|---|
| 473 | {
|
|---|
| 474 | ULONG yyrc;
|
|---|
| 475 | USHORT sel = RestoreOS2FS();
|
|---|
| 476 |
|
|---|
| 477 | yyrc = Gre32Entry5(a,b,c,d,e);
|
|---|
| 478 | SetFS(sel);
|
|---|
| 479 |
|
|---|
| 480 | return yyrc;
|
|---|
| 481 | }
|
|---|
| 482 |
|
|---|
| 483 |
|
|---|
| 484 | ULONG APIENTRY Gre32Entry6(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 485 |
|
|---|
| 486 | inline ULONG APIENTRY _Gre32Entry6 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f)
|
|---|
| 487 | {
|
|---|
| 488 | ULONG yyrc;
|
|---|
| 489 | USHORT sel = RestoreOS2FS();
|
|---|
| 490 |
|
|---|
| 491 | yyrc = Gre32Entry6(a,b,c,d,e,f);
|
|---|
| 492 | SetFS(sel);
|
|---|
| 493 |
|
|---|
| 494 | return yyrc;
|
|---|
| 495 | }
|
|---|
| 496 |
|
|---|
| 497 | ULONG APIENTRY Gre32Entry7(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 498 |
|
|---|
| 499 | inline ULONG APIENTRY _Gre32Entry7 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f, ULONG g)
|
|---|
| 500 | {
|
|---|
| 501 | ULONG yyrc;
|
|---|
| 502 | USHORT sel = RestoreOS2FS();
|
|---|
| 503 |
|
|---|
| 504 | yyrc = Gre32Entry7(a,b,c,d,e,f,g);
|
|---|
| 505 | SetFS(sel);
|
|---|
| 506 |
|
|---|
| 507 | return yyrc;
|
|---|
| 508 | }
|
|---|
| 509 |
|
|---|
| 510 | ULONG APIENTRY Gre32Entry8(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 511 |
|
|---|
| 512 | inline ULONG APIENTRY _Gre32Entry8 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f, ULONG g, ULONG h)
|
|---|
| 513 | {
|
|---|
| 514 | ULONG yyrc;
|
|---|
| 515 | USHORT sel = RestoreOS2FS();
|
|---|
| 516 |
|
|---|
| 517 | yyrc = Gre32Entry8(a,b,c,d,e,f,g,h);
|
|---|
| 518 | SetFS(sel);
|
|---|
| 519 |
|
|---|
| 520 | return yyrc;
|
|---|
| 521 | }
|
|---|
| 522 |
|
|---|
| 523 |
|
|---|
| 524 | #define GreSetupDC(a,b,c,d,e,f) (BOOL) _Gre32Entry8((ULONG)(HDC)(a),(ULONG)(HRGN)(b),(ULONG)(LONG)(c),(ULONG)(LONG)(d),(ULONG)(PRECTL)(e),(ULONG)(ULONG)(f),0L,0x00004081L)
|
|---|
| 525 | #define GreCreateRectRegion(a,b,c) (HRGN) _Gre32Entry5((ULONG)(HDC)(a),(ULONG)(PRECTL)(b),(ULONG)(LONG)(c),0L,0x00004062L)
|
|---|
| 526 | #define GreGetPageUnits(a,b) (LONG) _Gre32Entry4((ULONG)(HDC)(a),(ULONG)(PULONG)(b),0L,0x00004083L)
|
|---|
| 527 | #define GreCopyClipRegion(a,b,c,d) (INT) _Gre32Entry6((ULONG)(HDC)(a),(ULONG)(HRGN)(b),(ULONG)(PRECTL)(c),(ULONG)(ULONG)(d),0L,0x00004080L)
|
|---|
| 528 | #define GreCombineRegion(a,b,c,d,e) (INT) _Gre32Entry7((ULONG)(HDC)(a),(ULONG)(HRGN)(b),(ULONG)(HRGN)(c),(ULONG)(HRGN)(d),(ULONG)(ULONG)(e),0L,0x00004065L)
|
|---|
| 529 | #define GreDestroyRegion(a,b) (BOOL) _Gre32Entry4((ULONG)(HDC)(a),(ULONG)(HRGN)(b),0L,0x00004063L)
|
|---|
| 530 |
|
|---|
| 531 | #endif //INCLUDED_BY_DC
|
|---|
| 532 |
|
|---|
| 533 | #endif //__DC_H__
|
|---|
| 534 |
|
|---|