mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 11:27:06 +00:00
- Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com): Removed NtGdiStretchDIBits and NtGdiAddFontResource. Replaced with correct API.
svn path=/trunk/; revision=32391
This commit is contained in:
parent
8776390d01
commit
d04bc15143
7 changed files with 39 additions and 113 deletions
|
@ -42,8 +42,8 @@ StretchDIBits(HDC hdc,
|
|||
|
||||
{
|
||||
/* FIXME share memory */
|
||||
return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
|
||||
nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
|
||||
return NtGdiStretchDIBitsInternal(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc,
|
||||
nSrcWidth, nSrcHeight, (LPBYTE)lpBits, (LPBITMAPINFO)lpBitsInfo, (DWORD)iUsage, dwRop, 0, 0, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -215,19 +215,14 @@ EudcUnloadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath)
|
|||
*/
|
||||
int
|
||||
STDCALL
|
||||
GdiAddFontResourceW(LPCWSTR lpszFilename,FLONG fl,DESIGNVECTOR *pdv)
|
||||
GdiAddFontResourceW(
|
||||
LPCWSTR lpszFilename,
|
||||
FLONG fl,
|
||||
DESIGNVECTOR *pdv)
|
||||
{
|
||||
UNICODE_STRING Filename;
|
||||
//UNIMPLEMENTED;
|
||||
//SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
//return 0;
|
||||
|
||||
/* FIXME handle fl parameter */
|
||||
RtlInitUnicodeString(&Filename, lpszFilename);
|
||||
return NtGdiAddFontResource ( &Filename, fl );
|
||||
return NtGdiAddFontResourceW((PWSTR)lpszFilename, 0, 0, fl, 0, pdv);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
|
@ -59,14 +59,6 @@ NtGdiGetFontFamilyInfo(
|
|||
DWORD Size
|
||||
);
|
||||
|
||||
|
||||
/* Use NtGdiAddFontResourceW */
|
||||
int
|
||||
STDCALL
|
||||
NtGdiAddFontResource(PUNICODE_STRING Filename,
|
||||
DWORD fl);
|
||||
|
||||
|
||||
/* Use NtGdiCreateDIBitmapInternal */
|
||||
HBITMAP
|
||||
STDCALL
|
||||
|
@ -170,25 +162,6 @@ NtGdiSetWindowOrgEx (
|
|||
LPPOINT Point
|
||||
);
|
||||
|
||||
/* Use NtGdiStretchDIBitsInternal. */
|
||||
INT
|
||||
STDCALL
|
||||
NtGdiStretchDIBits (
|
||||
HDC hDC,
|
||||
INT XDest,
|
||||
INT YDest,
|
||||
INT DestWidth,
|
||||
INT DestHeight,
|
||||
INT XSrc,
|
||||
INT YSrc,
|
||||
INT SrcWidth,
|
||||
INT SrcHeight,
|
||||
CONST VOID * Bits,
|
||||
CONST BITMAPINFO * BitsInfo,
|
||||
UINT Usage,
|
||||
DWORD ROP
|
||||
);
|
||||
|
||||
|
||||
#endif /* WIN32K_NTGDI_BAD_INCLUDED */
|
||||
|
||||
|
|
|
@ -722,19 +722,25 @@ cleanup:
|
|||
return Result;
|
||||
}
|
||||
|
||||
INT STDCALL NtGdiStretchDIBits(HDC hDC,
|
||||
INT XDest,
|
||||
INT YDest,
|
||||
INT DestWidth,
|
||||
INT DestHeight,
|
||||
INT XSrc,
|
||||
INT YSrc,
|
||||
INT SrcWidth,
|
||||
INT SrcHeight,
|
||||
CONST VOID *Bits,
|
||||
CONST BITMAPINFO *BitsInfo,
|
||||
UINT Usage,
|
||||
DWORD ROP)
|
||||
INT
|
||||
APIENTRY
|
||||
NtGdiStretchDIBitsInternal(
|
||||
HDC hDC,
|
||||
INT XDest,
|
||||
INT YDest,
|
||||
INT DestWidth,
|
||||
INT DestHeight,
|
||||
INT XSrc,
|
||||
INT YSrc,
|
||||
INT SrcWidth,
|
||||
INT SrcHeight,
|
||||
LPBYTE Bits,
|
||||
LPBITMAPINFO BitsInfo,
|
||||
DWORD Usage,
|
||||
DWORD ROP,
|
||||
UINT cjMaxInfo,
|
||||
UINT cjMaxBits,
|
||||
HANDLE hcmXform)
|
||||
{
|
||||
HBITMAP hBitmap, hOldBitmap;
|
||||
HDC hdcMem;
|
||||
|
@ -771,7 +777,7 @@ INT STDCALL NtGdiStretchDIBits(HDC hDC,
|
|||
}
|
||||
|
||||
NtGdiSetDIBits(hdcMem, hBitmap, 0, BitsInfo->bmiHeader.biHeight, Bits,
|
||||
BitsInfo, Usage);
|
||||
BitsInfo, (UINT)Usage);
|
||||
|
||||
/* Origin for DIBitmap may be bottom left (positive biHeight) or top
|
||||
left (negative biHeight) */
|
||||
|
|
|
@ -436,22 +436,23 @@ IntGetFontRenderMode(LOGFONTW *logfont)
|
|||
return FT_RENDER_MODE_NORMAL;
|
||||
}
|
||||
|
||||
int
|
||||
STDCALL
|
||||
NtGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
|
||||
INT
|
||||
APIENTRY
|
||||
NtGdiAddFontResourceW(
|
||||
IN WCHAR *pwszFiles,
|
||||
IN ULONG cwc,
|
||||
IN ULONG cFiles,
|
||||
IN FLONG fl,
|
||||
IN DWORD dwPidTid,
|
||||
IN OPTIONAL DESIGNVECTOR *pdv)
|
||||
{
|
||||
UNICODE_STRING SafeFileName;
|
||||
PWSTR src;
|
||||
NTSTATUS Status;
|
||||
int Ret;
|
||||
|
||||
/* Copy the UNICODE_STRING structure */
|
||||
Status = MmCopyFromCaller(&SafeFileName, Filename, sizeof(UNICODE_STRING));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return 0;
|
||||
}
|
||||
/* FIXME - Protect with SEH? */
|
||||
RtlInitUnicodeString(&SafeFileName, pwszFiles);
|
||||
|
||||
/* Reserve for prepending '\??\' */
|
||||
SafeFileName.Length += 4 * sizeof(WCHAR);
|
||||
|
@ -476,7 +477,7 @@ NtGdiAddFontResource(PUNICODE_STRING Filename, DWORD fl)
|
|||
return 0;
|
||||
}
|
||||
|
||||
Ret = IntGdiAddFontResource(&SafeFileName, fl);
|
||||
Ret = IntGdiAddFontResource(&SafeFileName, (DWORD)fl);
|
||||
|
||||
ExFreePool(SafeFileName.Buffer);
|
||||
return Ret;
|
||||
|
|
|
@ -1558,26 +1558,6 @@ NtGdiFONTOBJ_cGetGlyphs(IN FONTOBJ *FontObj,
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
INT
|
||||
APIENTRY
|
||||
NtGdiAddFontResourceW(
|
||||
IN WCHAR *pwszFiles,
|
||||
IN ULONG cwc,
|
||||
IN ULONG cFiles,
|
||||
IN FLONG f,
|
||||
IN DWORD dwPidTid,
|
||||
IN OPTIONAL DESIGNVECTOR *pdv)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
@ -2981,33 +2961,6 @@ NtGdiSetMagicColors(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
INT
|
||||
APIENTRY
|
||||
NtGdiStretchDIBitsInternal(
|
||||
IN HDC hdc,
|
||||
IN INT xDst,
|
||||
IN INT yDst,
|
||||
IN INT cxDst,
|
||||
IN INT cyDst,
|
||||
IN INT xSrc,
|
||||
IN INT ySrc,
|
||||
IN INT cxSrc,
|
||||
IN INT cySrc,
|
||||
IN OPTIONAL LPBYTE pjInit,
|
||||
IN LPBITMAPINFO pbmi,
|
||||
IN DWORD dwUsage,
|
||||
IN DWORD dwRop4,
|
||||
IN UINT cjMaxInfo,
|
||||
IN UINT cjMaxBits,
|
||||
IN HANDLE hcmXform)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -679,7 +679,6 @@ NtGdiSetViewportExtEx 4
|
|||
NtGdiSetViewportOrgEx 4
|
||||
NtGdiSetWindowExtEx 4
|
||||
NtGdiSetWindowOrgEx 4
|
||||
NtGdiStretchDIBits 13
|
||||
NtUserAcquireOrReleaseInputOwnership 1
|
||||
NtUserBuildMenuItemList 4
|
||||
NtUserCreateCursorIconHandle 2
|
||||
|
@ -719,7 +718,6 @@ NtUserSendMessageCallback 6
|
|||
NtUserSendMessageTimeout 8
|
||||
NtUserSendNotifyMessage 4
|
||||
NtUserSetScrollBarInfo 3
|
||||
NtGdiAddFontResource 2
|
||||
NtGdiCreateDIBitmap 6
|
||||
NtGdiGetAspectRatioFilterEx 2
|
||||
NtGdiGetFontFamilyInfo 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue