Added Win16 implementation for GetRegionData().

This commit is contained in:
Andreas Mohr 1998-11-22 16:54:26 +00:00 committed by Alexandre Julliard
parent 29bbe12285
commit 1e360ebbf9
6 changed files with 20 additions and 9 deletions

View File

@ -391,14 +391,14 @@ WORD PRTDRV_Output(LPPDEVICE lpDestDev,
DWORD size; DWORD size;
RGNDATA *clip; RGNDATA *clip;
size = GetRegionData( hClipRgn, 0, NULL ); size = GetRegionData32( hClipRgn, 0, NULL );
clip = HeapAlloc( SystemHeap, 0, size ); clip = HeapAlloc( SystemHeap, 0, size );
if(!clip) if(!clip)
{ {
WARN(win16drv, "Can't alloc clip array in PRTDRV_Output\n"); WARN(win16drv, "Can't alloc clip array in PRTDRV_Output\n");
return FALSE; return FALSE;
} }
GetRegionData( hClipRgn, size, clip ); GetRegionData32( hClipRgn, size, clip );
if( clip->rdh.nCount == 0 ) if( clip->rdh.nCount == 0 )
{ {
wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT], wRet = Callbacks->CallDrvOutputProc(pLPD->fn[FUNC_OUTPUT],

View File

@ -376,7 +376,7 @@ file gdi.exe
604 pascal16 SetSolidBrush(word long) SetSolidBrush16 604 pascal16 SetSolidBrush(word long) SetSolidBrush16
605 pascal16 SysDeleteObject(word) DeleteObject16 # ??? 605 pascal16 SysDeleteObject(word) DeleteObject16 # ???
606 pascal16 SetMagicColors(word long word) SetMagicColors16 606 pascal16 SetMagicColors(word long word) SetMagicColors16
607 stub GetRegionData 607 pascal GetRegionData(word long ptr) GetRegionData16
608 stub ExtCreateRegion 608 stub ExtCreateRegion
609 stub GDIFreeResources 609 stub GDIFreeResources
610 stub GDISignalProc32 610 stub GDISignalProc32

View File

@ -6872,7 +6872,6 @@ DWORD WINAPI GetObjectType(HANDLE32);
UINT32 WINAPI GetOEMCP(void); UINT32 WINAPI GetOEMCP(void);
DWORD WINAPI GetPriorityClass(HANDLE32); DWORD WINAPI GetPriorityClass(HANDLE32);
HANDLE32 WINAPI GetProcessHeap(void); HANDLE32 WINAPI GetProcessHeap(void);
DWORD WINAPI GetRegionData(HRGN32,DWORD,LPRGNDATA);
DWORD WINAPI GetShortPathName32A(LPCSTR,LPSTR,DWORD); DWORD WINAPI GetShortPathName32A(LPCSTR,LPSTR,DWORD);
DWORD WINAPI GetShortPathName32W(LPCWSTR,LPWSTR,DWORD); DWORD WINAPI GetShortPathName32W(LPCWSTR,LPWSTR,DWORD);
#define GetShortPathName WINELIB_NAME_AW(GetShortPathName) #define GetShortPathName WINELIB_NAME_AW(GetShortPathName)
@ -8238,6 +8237,9 @@ DWORD WINAPI GetQueueStatus32(UINT32);
BOOL16 WINAPI GetRasterizerCaps16(LPRASTERIZER_STATUS,UINT16); BOOL16 WINAPI GetRasterizerCaps16(LPRASTERIZER_STATUS,UINT16);
BOOL32 WINAPI GetRasterizerCaps32(LPRASTERIZER_STATUS,UINT32); BOOL32 WINAPI GetRasterizerCaps32(LPRASTERIZER_STATUS,UINT32);
#define GetRasterizerCaps WINELIB_NAME(GetRasterizerCaps) #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); INT16 WINAPI GetRelAbs16(HDC16);
INT32 WINAPI GetRelAbs32(HDC32); INT32 WINAPI GetRelAbs32(HDC32);
#define GetRelAbs WINELIB_NAME(GetRelAbs) #define GetRelAbs WINELIB_NAME(GetRelAbs)

View File

@ -1684,12 +1684,12 @@ INT16 MF_CreateRegion(DC *dc, HRGN32 hrgn)
WORD *Param, *StartBand; WORD *Param, *StartBand;
BOOL32 ret; BOOL32 ret;
len = GetRegionData( hrgn, 0, NULL ); len = GetRegionData32( hrgn, 0, NULL );
if( !(rgndata = HeapAlloc( SystemHeap, 0, len )) ) { if( !(rgndata = HeapAlloc( SystemHeap, 0, len )) ) {
WARN(metafile, "MF_CreateRegion: can't alloc rgndata buffer\n"); WARN(metafile, "MF_CreateRegion: can't alloc rgndata buffer\n");
return -1; return -1;
} }
GetRegionData( hrgn, len, rgndata ); GetRegionData32( hrgn, len, rgndata );
/* Overestimate of length: /* Overestimate of length:
* Assume every rect is a separate band -> 6 WORDs per rect * Assume every rect is a separate band -> 6 WORDs per rect

View File

@ -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; DWORD size;
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ); RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC );
@ -556,6 +556,15 @@ DWORD WINAPI GetRegionData(HRGN32 hrgn, DWORD count, LPRGNDATA rgndata)
return 1; 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) * ExtCreateRegion (GDI32.94)
* *

View File

@ -219,7 +219,7 @@ init MAIN_GdiInit
214 stdcall GetROP2(long) GetROP232 214 stdcall GetROP2(long) GetROP232
215 stdcall GetRandomRgn(long long long) GetRandomRgn 215 stdcall GetRandomRgn(long long long) GetRandomRgn
216 stdcall GetRasterizerCaps(ptr long) GetRasterizerCaps32 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 218 stdcall GetRelAbs(long) GetRelAbs32
219 stdcall GetRgnBox(long ptr) GetRgnBox32 219 stdcall GetRgnBox(long ptr) GetRgnBox32
220 stdcall GetStockObject(long) GetStockObject32 220 stdcall GetStockObject(long) GetStockObject32