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