| 1 | /* $Id: dc.h,v 1.8 1999-11-11 13:17:29 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_VALIDATE_W 0x00200000L
|
|---|
| 98 |
|
|---|
| 99 | #define RDW_INVALIDATE_W 0x0001
|
|---|
| 100 | #define RDW_INTERNALPAINT_W 0x0002
|
|---|
| 101 | #define RDW_ERASE_W 0x0004
|
|---|
| 102 | #define RDW_VALIDATE_W 0x0008
|
|---|
| 103 | #define RDW_NOINTERNALPAINT_W 0x0010
|
|---|
| 104 | #define RDW_NOERASE_W 0x0020
|
|---|
| 105 | #define RDW_NOCHILDREN_W 0x0040
|
|---|
| 106 | #define RDW_ALLCHILDREN_W 0x0080
|
|---|
| 107 | #define RDW_UPDATENOW_W 0x0100
|
|---|
| 108 | #define RDW_ERASENOW_W 0x0200
|
|---|
| 109 | #define RDW_FRAME_W 0x0400
|
|---|
| 110 | #define RDW_NOFRAME_W 0x0800
|
|---|
| 111 |
|
|---|
| 112 | typedef struct _RGNDATAHEADER_W {
|
|---|
| 113 | DWORD dwSize;
|
|---|
| 114 | DWORD iType;
|
|---|
| 115 | DWORD nCount;
|
|---|
| 116 | DWORD nRgnSize;
|
|---|
| 117 | RECT rcBound;
|
|---|
| 118 | } RGNDATAHEADER_W, *LPRGNDATAHEADER_W;
|
|---|
| 119 |
|
|---|
| 120 | typedef struct _RGNDATA_W {
|
|---|
| 121 | RGNDATAHEADER_W rdh;
|
|---|
| 122 | char Buffer[1];
|
|---|
| 123 | } RGNDATA_W , *PRGNDATA_W , *LPRGNDATA_W ;
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 | /* Xform FLAGS */
|
|---|
| 127 | #define MWT_IDENTITY_W 1
|
|---|
| 128 | #define MWT_LEFTMULTIPLY_W 2
|
|---|
| 129 | #define MWT_RIGHTMULTIPLY_W 3
|
|---|
| 130 |
|
|---|
| 131 | /* Mapping Modes */
|
|---|
| 132 | #define MM_TEXT_W 1
|
|---|
| 133 | #define MM_LOMETRIC_W 2
|
|---|
| 134 | #define MM_HIMETRIC_W 3
|
|---|
| 135 | #define MM_LOENGLISH_W 4
|
|---|
| 136 | #define MM_HIENGLISH_W 5
|
|---|
| 137 | #define MM_TWIPS_W 6
|
|---|
| 138 | #define MM_ISOTROPIC_W 7
|
|---|
| 139 | #define MM_ANISOTROPIC_W 8
|
|---|
| 140 |
|
|---|
| 141 | #define RGN_OR_W 2
|
|---|
| 142 |
|
|---|
| 143 | /* Window scrolling */
|
|---|
| 144 | #define SW_SCROLLCHILDREN_W 0x0001
|
|---|
| 145 | #define SW_INVALIDATE_W 0x0002
|
|---|
| 146 | #define SW_ERASE_W 0x0004
|
|---|
| 147 | #define SW_SMOOTHSCROLL_W 0x0010
|
|---|
| 148 |
|
|---|
| 149 | /*********************/
|
|---|
| 150 |
|
|---|
| 151 | #ifndef OPEN32API
|
|---|
| 152 | #define OPEN32API _System
|
|---|
| 153 | #endif
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 | BOOL APIENTRY _GpiEnableYInversion (HPS hps, LONG lHeight);
|
|---|
| 157 |
|
|---|
| 158 | inline BOOL APIENTRY GpiEnableYInversion (HPS hps, LONG lHeight)
|
|---|
| 159 | {
|
|---|
| 160 | BOOL yyrc;
|
|---|
| 161 | USHORT sel = RestoreOS2FS();
|
|---|
| 162 |
|
|---|
| 163 | yyrc = _GpiEnableYInversion(hps, lHeight);
|
|---|
| 164 | SetFS(sel);
|
|---|
| 165 |
|
|---|
| 166 | return yyrc;
|
|---|
| 167 | }
|
|---|
| 168 |
|
|---|
| 169 | //LONG APIENTRY GpiQueryYInversion (HPS hps);
|
|---|
| 170 |
|
|---|
| 171 | PVOID APIENTRY _GpiAllocateDCData (HPS GpiH, ULONG size);
|
|---|
| 172 |
|
|---|
| 173 | inline PVOID APIENTRY GpiAllocateDCData (HPS GpiH, ULONG size)
|
|---|
| 174 | {
|
|---|
| 175 | PVOID yyrc;
|
|---|
| 176 | USHORT sel = RestoreOS2FS();
|
|---|
| 177 |
|
|---|
| 178 | yyrc = _GpiAllocateDCData(GpiH, size);
|
|---|
| 179 | SetFS(sel);
|
|---|
| 180 |
|
|---|
| 181 | return yyrc;
|
|---|
| 182 | }
|
|---|
| 183 |
|
|---|
| 184 | PVOID APIENTRY _GpiQueryDCData (HPS hps);
|
|---|
| 185 |
|
|---|
| 186 | inline PVOID APIENTRY GpiQueryDCData (HPS hps)
|
|---|
| 187 | {
|
|---|
| 188 | PVOID yyrc;
|
|---|
| 189 | USHORT sel = RestoreOS2FS();
|
|---|
| 190 |
|
|---|
| 191 | yyrc = _GpiQueryDCData(hps);
|
|---|
| 192 | SetFS(sel);
|
|---|
| 193 |
|
|---|
| 194 | return yyrc;
|
|---|
| 195 | }
|
|---|
| 196 |
|
|---|
| 197 | HDC OPEN32API _HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a);
|
|---|
| 198 |
|
|---|
| 199 | inline HDC OPEN32API HPSToHDC (HWND hwnd, HPS hps, HDC hdc, PVOID a)
|
|---|
| 200 | {
|
|---|
| 201 | HDC yyrc;
|
|---|
| 202 | USHORT sel = RestoreOS2FS();
|
|---|
| 203 |
|
|---|
| 204 | yyrc = _HPSToHDC(hwnd, hps, hdc, a);
|
|---|
| 205 | SetFS(sel);
|
|---|
| 206 |
|
|---|
| 207 | return yyrc;
|
|---|
| 208 | }
|
|---|
| 209 |
|
|---|
| 210 | void OPEN32API _DeleteHDC (HDC hdc);
|
|---|
| 211 |
|
|---|
| 212 | inline void OPEN32API DeleteHDC (HDC hdc)
|
|---|
| 213 | {
|
|---|
| 214 | USHORT sel = RestoreOS2FS();
|
|---|
| 215 |
|
|---|
| 216 | _DeleteHDC(hdc);
|
|---|
| 217 | SetFS(sel);
|
|---|
| 218 | }
|
|---|
| 219 |
|
|---|
| 220 | BOOL OPEN32API _O32_EndPaint (HWND hwnd, const PAINTSTRUCT_W *lpps);
|
|---|
| 221 |
|
|---|
| 222 | inline BOOL O32_EndPaint(HWND a, CONST PAINTSTRUCT_W *b)
|
|---|
| 223 | {
|
|---|
| 224 | BOOL yyrc;
|
|---|
| 225 | USHORT sel = RestoreOS2FS();
|
|---|
| 226 |
|
|---|
| 227 | yyrc = _O32_EndPaint(a, b);
|
|---|
| 228 | SetFS(sel);
|
|---|
| 229 |
|
|---|
| 230 | return yyrc;
|
|---|
| 231 | }
|
|---|
| 232 |
|
|---|
| 233 | int OPEN32API _O32_GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase);
|
|---|
| 234 |
|
|---|
| 235 | inline int O32_GetUpdateRgn(HWND a, HRGN b, BOOL c)
|
|---|
| 236 | {
|
|---|
| 237 | int yyrc;
|
|---|
| 238 | USHORT sel = RestoreOS2FS();
|
|---|
| 239 |
|
|---|
| 240 | yyrc = _O32_GetUpdateRgn(a, b, c);
|
|---|
| 241 | SetFS(sel);
|
|---|
| 242 |
|
|---|
| 243 | return yyrc;
|
|---|
| 244 | }
|
|---|
| 245 |
|
|---|
| 246 | ULONG OPEN32API _O32_GetRegionData (HRGN hrgn, ULONG count, PRGNDATA_W pData);
|
|---|
| 247 |
|
|---|
| 248 | inline DWORD O32_GetRegionData(HRGN a, DWORD b, PRGNDATA_W c)
|
|---|
| 249 | {
|
|---|
| 250 | DWORD yyrc;
|
|---|
| 251 | USHORT sel = RestoreOS2FS();
|
|---|
| 252 |
|
|---|
| 253 | yyrc = _O32_GetRegionData(a, b, c);
|
|---|
| 254 | SetFS(sel);
|
|---|
| 255 |
|
|---|
| 256 | return yyrc;
|
|---|
| 257 | }
|
|---|
| 258 |
|
|---|
| 259 | BOOL OPEN32API _O32_DeleteObject (LHANDLE hgdiobj);
|
|---|
| 260 |
|
|---|
| 261 | inline BOOL O32_DeleteObject(HANDLE a)
|
|---|
| 262 | {
|
|---|
| 263 | BOOL yyrc;
|
|---|
| 264 | USHORT sel = RestoreOS2FS();
|
|---|
| 265 |
|
|---|
| 266 | yyrc = _O32_DeleteObject(a);
|
|---|
| 267 | SetFS(sel);
|
|---|
| 268 |
|
|---|
| 269 | return yyrc;
|
|---|
| 270 | }
|
|---|
| 271 |
|
|---|
| 272 | int OPEN32API _O32_ReleaseDC (HWND hwnd, HDC hdc);
|
|---|
| 273 |
|
|---|
| 274 | inline int O32_ReleaseDC(HWND a, HDC b)
|
|---|
| 275 | {
|
|---|
| 276 | int yyrc;
|
|---|
| 277 | USHORT sel = RestoreOS2FS();
|
|---|
| 278 |
|
|---|
| 279 | yyrc = _O32_ReleaseDC(a, b);
|
|---|
| 280 | SetFS(sel);
|
|---|
| 281 |
|
|---|
| 282 | return yyrc;
|
|---|
| 283 | }
|
|---|
| 284 |
|
|---|
| 285 | VOID OPEN32API _O32_SetLastError( DWORD );
|
|---|
| 286 |
|
|---|
| 287 | inline VOID O32_SetLastError(DWORD a)
|
|---|
| 288 | {
|
|---|
| 289 | USHORT sel = RestoreOS2FS();
|
|---|
| 290 |
|
|---|
| 291 | _O32_SetLastError(a);
|
|---|
| 292 | SetFS(sel);
|
|---|
| 293 | }
|
|---|
| 294 |
|
|---|
| 295 | BOOL OPEN32API _O32_SetRectRgn (HRGN dest, int left, int top, int right, int bottom);
|
|---|
| 296 |
|
|---|
| 297 | inline BOOL O32_SetRectRgn(HRGN a, int b, int c, int d, int e)
|
|---|
| 298 | {
|
|---|
| 299 | BOOL yyrc;
|
|---|
| 300 | USHORT sel = RestoreOS2FS();
|
|---|
| 301 |
|
|---|
| 302 | yyrc = _O32_SetRectRgn(a, b, c, d, e);
|
|---|
| 303 | SetFS(sel);
|
|---|
| 304 |
|
|---|
| 305 | return yyrc;
|
|---|
| 306 | }
|
|---|
| 307 |
|
|---|
| 308 | int OPEN32API _O32_CombineRgn (HRGN dest, HRGN src1, HRGN src2, int mode);
|
|---|
| 309 |
|
|---|
| 310 | inline int O32_CombineRgn(HRGN a, HRGN b, HRGN c, int d)
|
|---|
| 311 | {
|
|---|
| 312 | int yyrc;
|
|---|
| 313 | USHORT sel = RestoreOS2FS();
|
|---|
| 314 |
|
|---|
| 315 | yyrc = _O32_CombineRgn(a, b, c, d);
|
|---|
| 316 | SetFS(sel);
|
|---|
| 317 |
|
|---|
| 318 | return yyrc;
|
|---|
| 319 | }
|
|---|
| 320 |
|
|---|
| 321 | HRGN OPEN32API _O32_CreateRectRgn (int left, int top, int right, int bottom);
|
|---|
| 322 |
|
|---|
| 323 | inline HRGN O32_CreateRectRgn(int a, int b, int c, int d)
|
|---|
| 324 | {
|
|---|
| 325 | HRGN yyrc;
|
|---|
| 326 | USHORT sel = RestoreOS2FS();
|
|---|
| 327 |
|
|---|
| 328 | yyrc = _O32_CreateRectRgn(a, b, c, d);
|
|---|
| 329 | SetFS(sel);
|
|---|
| 330 |
|
|---|
| 331 | return yyrc;
|
|---|
| 332 | }
|
|---|
| 333 |
|
|---|
| 334 | BOOL OPEN32API _O32_ExcludeUpdateRgn( HDC, HWND );
|
|---|
| 335 |
|
|---|
| 336 | inline BOOL O32_ExcludeUpdateRgn(HDC a, HWND b)
|
|---|
| 337 | {
|
|---|
| 338 | BOOL yyrc;
|
|---|
| 339 | USHORT sel = RestoreOS2FS();
|
|---|
| 340 |
|
|---|
| 341 | yyrc = _O32_ExcludeUpdateRgn(a, b);
|
|---|
| 342 | SetFS(sel);
|
|---|
| 343 |
|
|---|
| 344 | return yyrc;
|
|---|
| 345 | }
|
|---|
| 346 |
|
|---|
| 347 | BOOL OPEN32API _O32_CreateCaret (HWND hwnd, HBITMAP hbm, int width, int height);
|
|---|
| 348 |
|
|---|
| 349 | inline BOOL O32_CreateCaret(HWND a, HBITMAP b, int c, int d)
|
|---|
| 350 | {
|
|---|
| 351 | BOOL yyrc;
|
|---|
| 352 | USHORT sel = RestoreOS2FS();
|
|---|
| 353 |
|
|---|
| 354 | yyrc = _O32_CreateCaret(a, b, c, d);
|
|---|
| 355 | SetFS(sel);
|
|---|
| 356 |
|
|---|
| 357 | return yyrc;
|
|---|
| 358 | }
|
|---|
| 359 |
|
|---|
| 360 | BOOL APIENTRY __DestroyCaret (void);
|
|---|
| 361 |
|
|---|
| 362 | inline BOOL APIENTRY _DestroyCaret (void)
|
|---|
| 363 | {
|
|---|
| 364 | BOOL yyrc;
|
|---|
| 365 | USHORT sel = RestoreOS2FS();
|
|---|
| 366 |
|
|---|
| 367 | yyrc = __DestroyCaret();
|
|---|
| 368 | SetFS(sel);
|
|---|
| 369 |
|
|---|
| 370 | return yyrc;
|
|---|
| 371 | }
|
|---|
| 372 |
|
|---|
| 373 | UINT APIENTRY __GetCaretBlinkTime (void);
|
|---|
| 374 |
|
|---|
| 375 | inline UINT APIENTRY _GetCaretBlinkTime (void)
|
|---|
| 376 | {
|
|---|
| 377 | UINT yyrc;
|
|---|
| 378 | USHORT sel = RestoreOS2FS();
|
|---|
| 379 |
|
|---|
| 380 | yyrc = __GetCaretBlinkTime();
|
|---|
| 381 | SetFS(sel);
|
|---|
| 382 |
|
|---|
| 383 | return yyrc;
|
|---|
| 384 | }
|
|---|
| 385 |
|
|---|
| 386 | BOOL APIENTRY __HideCaret (HWND hwnd);
|
|---|
| 387 |
|
|---|
| 388 | inline BOOL APIENTRY _HideCaret (HWND hwnd)
|
|---|
| 389 | {
|
|---|
| 390 | BOOL yyrc;
|
|---|
| 391 | USHORT sel = RestoreOS2FS();
|
|---|
| 392 |
|
|---|
| 393 | yyrc = __HideCaret(hwnd);
|
|---|
| 394 | SetFS(sel);
|
|---|
| 395 |
|
|---|
| 396 | return yyrc;
|
|---|
| 397 | }
|
|---|
| 398 |
|
|---|
| 399 | BOOL APIENTRY __SetCaretBlinkTime (UINT mSecs);
|
|---|
| 400 |
|
|---|
| 401 | inline BOOL APIENTRY _SetCaretBlinkTime (UINT mSecs)
|
|---|
| 402 | {
|
|---|
| 403 | BOOL yyrc;
|
|---|
| 404 | USHORT sel = RestoreOS2FS();
|
|---|
| 405 |
|
|---|
| 406 | yyrc = __SetCaretBlinkTime(mSecs);
|
|---|
| 407 | SetFS(sel);
|
|---|
| 408 |
|
|---|
| 409 | return yyrc;
|
|---|
| 410 | }
|
|---|
| 411 |
|
|---|
| 412 | BOOL APIENTRY __ShowCaret (HWND hwnd);
|
|---|
| 413 |
|
|---|
| 414 | inline BOOL APIENTRY _ShowCaret (HWND hwnd)
|
|---|
| 415 | {
|
|---|
| 416 | BOOL yyrc;
|
|---|
| 417 | USHORT sel = RestoreOS2FS();
|
|---|
| 418 |
|
|---|
| 419 | yyrc = __ShowCaret(hwnd);
|
|---|
| 420 | SetFS(sel);
|
|---|
| 421 |
|
|---|
| 422 | return yyrc;
|
|---|
| 423 | }
|
|---|
| 424 |
|
|---|
| 425 |
|
|---|
| 426 | // from pmddi.h:
|
|---|
| 427 | /* CopyClipRegion */
|
|---|
| 428 |
|
|---|
| 429 | #define COPYCRGN_ALLINTERSECT 0L
|
|---|
| 430 | #define COPYCRGN_VISRGN 1L
|
|---|
| 431 | #define COPYCRGN_CLIPRGN 2L
|
|---|
| 432 |
|
|---|
| 433 | /* SetupDC */
|
|---|
| 434 |
|
|---|
| 435 | #define SETUPDC_VISRGN 0x00000001L
|
|---|
| 436 | #define SETUPDC_ORIGIN 0x00000002L
|
|---|
| 437 | #define SETUPDC_ACCUMBOUNDSON 0x00000004L
|
|---|
| 438 | #define SETUPDC_ACCUMBOUNDSOFF 0x00000008L
|
|---|
| 439 | #define SETUPDC_RECALCCLIP 0x00000010L
|
|---|
| 440 | #define SETUPDC_SETOWNER 0x00000020L
|
|---|
| 441 | #define SETUPDC_CLEANDC 0x00000040L
|
|---|
| 442 |
|
|---|
| 443 | ULONG APIENTRY Gre32Entry4(ULONG,ULONG,ULONG,ULONG);
|
|---|
| 444 |
|
|---|
| 445 | inline ULONG APIENTRY _Gre32Entry4 (ULONG a, ULONG b, ULONG c, ULONG d)
|
|---|
| 446 | {
|
|---|
| 447 | ULONG yyrc;
|
|---|
| 448 | USHORT sel = RestoreOS2FS();
|
|---|
| 449 |
|
|---|
| 450 | yyrc = Gre32Entry4(a,b,c,d);
|
|---|
| 451 | SetFS(sel);
|
|---|
| 452 |
|
|---|
| 453 | return yyrc;
|
|---|
| 454 | }
|
|---|
| 455 |
|
|---|
| 456 | ULONG APIENTRY Gre32Entry5(ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 457 |
|
|---|
| 458 | inline ULONG APIENTRY _Gre32Entry5 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e)
|
|---|
| 459 | {
|
|---|
| 460 | ULONG yyrc;
|
|---|
| 461 | USHORT sel = RestoreOS2FS();
|
|---|
| 462 |
|
|---|
| 463 | yyrc = Gre32Entry5(a,b,c,d,e);
|
|---|
| 464 | SetFS(sel);
|
|---|
| 465 |
|
|---|
| 466 | return yyrc;
|
|---|
| 467 | }
|
|---|
| 468 |
|
|---|
| 469 |
|
|---|
| 470 | ULONG APIENTRY Gre32Entry6(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 471 |
|
|---|
| 472 | inline ULONG APIENTRY _Gre32Entry6 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f)
|
|---|
| 473 | {
|
|---|
| 474 | ULONG yyrc;
|
|---|
| 475 | USHORT sel = RestoreOS2FS();
|
|---|
| 476 |
|
|---|
| 477 | yyrc = Gre32Entry6(a,b,c,d,e,f);
|
|---|
| 478 | SetFS(sel);
|
|---|
| 479 |
|
|---|
| 480 | return yyrc;
|
|---|
| 481 | }
|
|---|
| 482 |
|
|---|
| 483 | ULONG APIENTRY Gre32Entry7(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 484 |
|
|---|
| 485 | inline ULONG APIENTRY _Gre32Entry7 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f, ULONG g)
|
|---|
| 486 | {
|
|---|
| 487 | ULONG yyrc;
|
|---|
| 488 | USHORT sel = RestoreOS2FS();
|
|---|
| 489 |
|
|---|
| 490 | yyrc = Gre32Entry7(a,b,c,d,e,f,g);
|
|---|
| 491 | SetFS(sel);
|
|---|
| 492 |
|
|---|
| 493 | return yyrc;
|
|---|
| 494 | }
|
|---|
| 495 |
|
|---|
| 496 | ULONG APIENTRY Gre32Entry8(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);
|
|---|
| 497 |
|
|---|
| 498 | inline ULONG APIENTRY _Gre32Entry8 (ULONG a, ULONG b, ULONG c, ULONG d, ULONG e, ULONG f, ULONG g, ULONG h)
|
|---|
| 499 | {
|
|---|
| 500 | ULONG yyrc;
|
|---|
| 501 | USHORT sel = RestoreOS2FS();
|
|---|
| 502 |
|
|---|
| 503 | yyrc = Gre32Entry8(a,b,c,d,e,f,g,h);
|
|---|
| 504 | SetFS(sel);
|
|---|
| 505 |
|
|---|
| 506 | return yyrc;
|
|---|
| 507 | }
|
|---|
| 508 |
|
|---|
| 509 |
|
|---|
| 510 | #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)
|
|---|
| 511 | #define GreCreateRectRegion(a,b,c) (HRGN) _Gre32Entry5((ULONG)(HDC)(a),(ULONG)(PRECTL)(b),(ULONG)(LONG)(c),0L,0x00004062L)
|
|---|
| 512 | #define GreGetPageUnits(a,b) (LONG) _Gre32Entry4((ULONG)(HDC)(a),(ULONG)(PULONG)(b),0L,0x00004083L)
|
|---|
| 513 | #define GreCopyClipRegion(a,b,c,d) (INT) _Gre32Entry6((ULONG)(HDC)(a),(ULONG)(HRGN)(b),(ULONG)(PRECTL)(c),(ULONG)(ULONG)(d),0L,0x00004080L)
|
|---|
| 514 | #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)
|
|---|
| 515 | #define GreDestroyRegion(a,b) (BOOL) _Gre32Entry4((ULONG)(HDC)(a),(ULONG)(HRGN)(b),0L,0x00004063L)
|
|---|
| 516 |
|
|---|
| 517 | #endif //INCLUDED_BY_DC
|
|---|
| 518 |
|
|---|
| 519 | #endif //__DC_H__
|
|---|
| 520 |
|
|---|