From 0904489152bd1c0efa8daa024ef7b30ff13c00a5 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 31 Aug 2007 11:28:45 +0000 Subject: [PATCH] Fix typo in : AddFontResourceExW Redirect : GetColorAdjustment, GetCharWidthInfo to win32k.sys implement : GetEUDCTimeStamp add smaller code in user mode : GetDeviceCaps, GetCurrentPositionEx, GetCurrentObject, GetClipBox, GetCharWidthFloatW, GetCharWidth32W, GetCharABCWidths svn path=/trunk/; revision=28697 --- reactos/dll/win32/gdi32/gdi32.def | 61 ++++++----- reactos/dll/win32/gdi32/misc/stubs.c | 136 +++++++++++++++++++------ reactos/dll/win32/gdi32/objects/font.c | 4 +- 3 files changed, 136 insertions(+), 65 deletions(-) diff --git a/reactos/dll/win32/gdi32/gdi32.def b/reactos/dll/win32/gdi32/gdi32.def index 7ae35335579..a773b0182af 100644 --- a/reactos/dll/win32/gdi32/gdi32.def +++ b/reactos/dll/win32/gdi32/gdi32.def @@ -286,7 +286,36 @@ GetCharABCWidthsA@16 GetCharABCWidthsFloatA@16 GetCharABCWidthsFloatW@16 GetCharABCWidthsI@20 - +GetCharABCWidthsW@16 +GetCharWidth32A@16 +GetCharWidth32W@16 +GetCharWidthA@16 +GetCharWidthFloatA@16 +GetCharWidthFloatW@16 +GetCharWidthI@20 +GetCharWidthInfo@8=NtGdiGetCharWidthInfo@8 +GetCharWidthW@16 +GetCharacterPlacementA@24 +GetCharacterPlacementW@24 +GetClipBox@8 +GetClipRgn@8 +GetColorAdjustment@8=NtGdiGetColorAdjustment@8 +GetColorSpace@4 +GetCurrentObject@8 +GetCurrentPositionEx@8 +GetDCBrushColor@4 +GetDCOrgEx@8 +GetDCPenColor@4 +GetDIBColorTable@16 +GetDIBits@28 +GetDeviceCaps@8 +GetDeviceGammaRamp@8 +GetETM@8 +GetEUDCTimeStamp@0 +GetEUDCTimeStampExW@4 +GetEnhMetaFileA@4 +GetEnhMetaFileBits@12 +GetEnhMetaFileDescriptionA@12 ClearBitmapAttributes@8 @@ -350,41 +379,11 @@ DdEntry56@8=NtGdiDdWaitForVerticalBlank@8 GdiDrawStream@12 GetBitmapAttributes@4 GetBrushAttributes@4 -GetCharABCWidthsW@16=NtGdiGetCharABCWidths@16 -GetCharWidth32A@16 -GetCharWidth32W@16=NtGdiGetCharWidth32@16 -GetCharWidthA@16 -GetCharWidthFloatA@16 -GetCharWidthFloatW@16=NtGdiGetCharWidthFloat@16 -GetCharWidthI@20 -GetCharWidthInfo@8 -GetCharWidthW@16 -GetCharacterPlacementA@24 -GetCharacterPlacementW@24 -GetClipBox@8=NtGdiGetClipBox@8 -GetClipRgn@8 -GetColorAdjustment@8 -GetColorSpace@4 -GetCurrentObject@8=NtGdiGetCurrentObject@8 -GetCurrentPositionEx@8=NtGdiGetCurrentPositionEx@8 -GetDCBrushColor@4 -GetDCOrgEx@8 -GetDCPenColor@4 -GetDIBColorTable@16 -GetDIBits@28 -GetDeviceCaps@8=NtGdiGetDeviceCaps@8 -GetDeviceGammaRamp@8 -GetEnhMetaFileA@4 -GetEnhMetaFileBits@12 -GetEnhMetaFileDescriptionA@12 GetEnhMetaFileDescriptionW@12 GetEnhMetaFileHeader@12 GetEnhMetaFilePaletteEntries@12 GetEnhMetaFilePixelFormat@12 GetEnhMetaFileW@4 -GetETM@8 -GetEUDCTimeStamp@0 -GetEUDCTimeStampExW@4 GetFontAssocStatus@4 GetFontData@20=NtGdiGetFontData@20 GetFontLanguageInfo@4 diff --git a/reactos/dll/win32/gdi32/misc/stubs.c b/reactos/dll/win32/gdi32/misc/stubs.c index 4567052d415..7c61f7c4cb1 100644 --- a/reactos/dll/win32/gdi32/misc/stubs.c +++ b/reactos/dll/win32/gdi32/misc/stubs.c @@ -609,20 +609,7 @@ SetColorAdjustment( } -/* - * @unimplemented - */ -BOOL -STDCALL -GetColorAdjustment( - HDC hdc, - LPCOLORADJUSTMENT a1 - ) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} + /* @@ -1435,7 +1422,7 @@ HFONT STDCALL GdiConvertFont(HFONT hfont) { - return hfont; + return hfont; } /* @@ -1445,7 +1432,7 @@ HPALETTE STDCALL GdiConvertPalette(HPALETTE hpal) { - return hpal; + return hpal; } /* @@ -1455,7 +1442,7 @@ HRGN STDCALL GdiConvertRegion(HRGN hregion) { - return hregion; + return hregion; } /* @@ -1692,15 +1679,13 @@ GetFontUnicodeRanges( } /* - * @unimplemented + * @implemented */ ULONG STDCALL GetEUDCTimeStamp(VOID) { - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + return NtGdiGetEudcTimeStampEx(NULL,0,TRUE); } /* @@ -2002,17 +1987,7 @@ GdiRealizationInfo(HDC hdc, PREALIZATION_INFO pri) return 0; } -/* - * @unimplemented - */ -BOOL -STDCALL -GetCharWidthInfo(HDC hdc,PCHWIDTHINFO pChWidthInfo) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} + /* * @unimplemented @@ -2840,3 +2815,100 @@ GetCharABCWidthsFloatW(HDC hdc,UINT FirstChar,UINT LastChar,LPABCFLOAT abcF) return NtGdiGetCharABCWidthsFloat(hdc, FirstChar, LastChar, abcF); } +/* + * @implemented + * + */ +int +STDCALL +GetDeviceCaps(HDC hdc, + int i) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetDeviceCaps(hdc,i); +} + + +/* + * @implemented + * + */ +BOOL +STDCALL +GetCurrentPositionEx(HDC hdc, + LPPOINT lpPoint) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetCurrentPositionEx(hdc, lpPoint); +} + +/* + * @implemented + * + */ +HGDIOBJ +STDCALL +GetCurrentObject(HDC hdc, + UINT uObjectType) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetCurrentObject(hdc, uObjectType); +} + +/* + * @implemented + * + */ +int +STDCALL +GetClipBox(HDC hdc, + LPRECT lprc) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetClipBox(hdc, lprc); +} + +/* + * @implemented + * + */ +BOOL +STDCALL +GetCharWidthFloatW(HDC hdc, + UINT iFirstChar, + UINT iLastChar, + PFLOAT pxBuffer) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetCharWidthFloat(hdc, iFirstChar, iLastChar, pxBuffer); +} + +/* + * @implemented + * + */ +BOOL +STDCALL +GetCharWidth32W(HDC hdc, + UINT iFirstChar, + UINT iLastChar, + LPINT lpBuffer) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetCharWidth32(hdc, iFirstChar, iLastChar, lpBuffer); +} + +/* + * @implemented + * + */ +BOOL +STDCALL +GetCharABCWidths(HDC hdc, + UINT uFirstChar, + UINT uLastChar, + LPABC lpabc) +{ + /* FIXME some part need be done in user mode */ + return NtGdiGetCharABCWidths(hdc, uFirstChar, uLastChar, lpabc); +} diff --git a/reactos/dll/win32/gdi32/objects/font.c b/reactos/dll/win32/gdi32/objects/font.c index 65dcc2f2173..181f9bab7a3 100644 --- a/reactos/dll/win32/gdi32/objects/font.c +++ b/reactos/dll/win32/gdi32/objects/font.c @@ -1093,7 +1093,7 @@ AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved ) { int retVal = 0; - if (fl & (FR_PRIVATE | FR_NOT_ENUM)) + if (!(fl & (FR_PRIVATE | FR_NOT_ENUM))) { retVal = GdiAddFontResourceW(lpszFilename, fl,0); } @@ -1170,7 +1170,7 @@ int STDCALL AddFontResourceW ( LPCWSTR lpszFilename ) { - return GdiAddFontResourceW ( lpszFilename, 0, 0 ); + return GdiAddFontResourceW ( lpszFilename, 0, 0 ); }