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