From 1e360ebbf9df723ea04bd187d8640083f9164c62 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sun, 22 Nov 1998 16:54:26 +0000 Subject: [PATCH] Added Win16 implementation for GetRegionData(). --- graphics/win16drv/prtdrv.c | 4 ++-- if1632/gdi.spec | 2 +- include/windows.h | 4 +++- objects/metafile.c | 4 ++-- objects/region.c | 13 +++++++++++-- relay32/gdi32.spec | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/graphics/win16drv/prtdrv.c b/graphics/win16drv/prtdrv.c index 0fdf1a63d37..bfff6a030f1 100644 --- a/graphics/win16drv/prtdrv.c +++ b/graphics/win16drv/prtdrv.c @@ -391,14 +391,14 @@ WORD PRTDRV_Output(LPPDEVICE lpDestDev, DWORD size; RGNDATA *clip; - size = GetRegionData( hClipRgn, 0, NULL ); + size = GetRegionData32( hClipRgn, 0, NULL ); clip = HeapAlloc( SystemHeap, 0, size ); if(!clip) { WARN(win16drv, "Can't alloc clip array in PRTDRV_Output\n"); return FALSE; } - GetRegionData( hClipRgn, size, clip ); + GetRegionData32( hClipRgn, size, clip ); if( clip->rdh.nCount == 0 ) { wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT], diff --git a/if1632/gdi.spec b/if1632/gdi.spec index 769b334f2c2..2501310bfeb 100644 --- a/if1632/gdi.spec +++ b/if1632/gdi.spec @@ -376,7 +376,7 @@ file gdi.exe 604 pascal16 SetSolidBrush(word long) SetSolidBrush16 605 pascal16 SysDeleteObject(word) DeleteObject16 # ??? 606 pascal16 SetMagicColors(word long word) SetMagicColors16 -607 stub GetRegionData +607 pascal GetRegionData(word long ptr) GetRegionData16 608 stub ExtCreateRegion 609 stub GDIFreeResources 610 stub GDISignalProc32 diff --git a/include/windows.h b/include/windows.h index 4b1048dd709..3f4c58c6df6 100644 --- a/include/windows.h +++ b/include/windows.h @@ -6872,7 +6872,6 @@ DWORD WINAPI GetObjectType(HANDLE32); UINT32 WINAPI GetOEMCP(void); DWORD WINAPI GetPriorityClass(HANDLE32); HANDLE32 WINAPI GetProcessHeap(void); -DWORD WINAPI GetRegionData(HRGN32,DWORD,LPRGNDATA); DWORD WINAPI GetShortPathName32A(LPCSTR,LPSTR,DWORD); DWORD WINAPI GetShortPathName32W(LPCWSTR,LPWSTR,DWORD); #define GetShortPathName WINELIB_NAME_AW(GetShortPathName) @@ -8238,6 +8237,9 @@ DWORD WINAPI GetQueueStatus32(UINT32); BOOL16 WINAPI GetRasterizerCaps16(LPRASTERIZER_STATUS,UINT16); BOOL32 WINAPI GetRasterizerCaps32(LPRASTERIZER_STATUS,UINT32); #define GetRasterizerCaps WINELIB_NAME(GetRasterizerCaps) +DWORD WINAPI GetRegionData16(HRGN16,DWORD,LPRGNDATA); +DWORD WINAPI GetRegionData32(HRGN32,DWORD,LPRGNDATA); +#define GetRegionData WINELIB_NAME(GetRegionData) INT16 WINAPI GetRelAbs16(HDC16); INT32 WINAPI GetRelAbs32(HDC32); #define GetRelAbs WINELIB_NAME(GetRelAbs) diff --git a/objects/metafile.c b/objects/metafile.c index 03086600d52..0bdbe9ce78b 100644 --- a/objects/metafile.c +++ b/objects/metafile.c @@ -1684,12 +1684,12 @@ INT16 MF_CreateRegion(DC *dc, HRGN32 hrgn) WORD *Param, *StartBand; BOOL32 ret; - len = GetRegionData( hrgn, 0, NULL ); + len = GetRegionData32( hrgn, 0, NULL ); if( !(rgndata = HeapAlloc( SystemHeap, 0, len )) ) { WARN(metafile, "MF_CreateRegion: can't alloc rgndata buffer\n"); return -1; } - GetRegionData( hrgn, len, rgndata ); + GetRegionData32( hrgn, len, rgndata ); /* Overestimate of length: * Assume every rect is a separate band -> 6 WORDs per rect diff --git a/objects/region.c b/objects/region.c index b34b0aa4611..732dbba38f6 100644 --- a/objects/region.c +++ b/objects/region.c @@ -521,10 +521,10 @@ HRGN32 WINAPI CreateEllipticRgnIndirect32( const RECT32 *rect ) } /*********************************************************************** - * GetRegionData (GDI32.217) + * GetRegionData32 (GDI32.217) * */ -DWORD WINAPI GetRegionData(HRGN32 hrgn, DWORD count, LPRGNDATA rgndata) +DWORD WINAPI GetRegionData32(HRGN32 hrgn, DWORD count, LPRGNDATA rgndata) { DWORD size; RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ); @@ -556,6 +556,15 @@ DWORD WINAPI GetRegionData(HRGN32 hrgn, DWORD count, LPRGNDATA rgndata) return 1; } +/*********************************************************************** + * GetRegionData16 (GDI.607) + * FIXME: is LPRGNDATA the same in Win16 and Win32 ? + */ +DWORD WINAPI GetRegionData16(HRGN16 hrgn, DWORD count, LPRGNDATA rgndata) +{ + return GetRegionData32((HRGN32)hrgn, count, rgndata); +} + /*********************************************************************** * ExtCreateRegion (GDI32.94) * diff --git a/relay32/gdi32.spec b/relay32/gdi32.spec index 3084b64e529..5613b127e31 100644 --- a/relay32/gdi32.spec +++ b/relay32/gdi32.spec @@ -219,7 +219,7 @@ init MAIN_GdiInit 214 stdcall GetROP2(long) GetROP232 215 stdcall GetRandomRgn(long long long) GetRandomRgn 216 stdcall GetRasterizerCaps(ptr long) GetRasterizerCaps32 -217 stdcall GetRegionData(long long ptr) GetRegionData +217 stdcall GetRegionData(long long ptr) GetRegionData32 218 stdcall GetRelAbs(long) GetRelAbs32 219 stdcall GetRgnBox(long ptr) GetRgnBox32 220 stdcall GetStockObject(long) GetStockObject32