mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:42:59 +00:00
Add hacks.c contain api using only ros home made syscall
follow api have been move in there so far : GetPolyFillMode, GetGraphicsMode, GetROP2, SetDIBitsToDevice, SetBkMode, SetBkColor, SelectObject, GetMapMode make follow in user mode : GetRgnBox, GetPixel redirect GetMiterLimit to win32k.sys svn path=/trunk/; revision=28721
This commit is contained in:
parent
282872d201
commit
196d2756e2
7 changed files with 222 additions and 127 deletions
|
@ -326,8 +326,46 @@ GetFontData@20
|
||||||
GetFontLanguageInfo@4
|
GetFontLanguageInfo@4
|
||||||
GetFontResourceInfoW@16
|
GetFontResourceInfoW@16
|
||||||
GetFontUnicodeRanges@8=NtGdiGetFontUnicodeRanges@8
|
GetFontUnicodeRanges@8=NtGdiGetFontUnicodeRanges@8
|
||||||
|
GetGlyphIndicesA@20
|
||||||
|
GetGlyphIndicesW@20=NtGdiGetGlyphIndicesW@20
|
||||||
|
GetGlyphOutline@28=GetGlyphOutlineA@28
|
||||||
|
GetGlyphOutlineA@28
|
||||||
|
GetGlyphOutlineW@28
|
||||||
|
GetGlyphOutlineWow@28
|
||||||
|
GetGraphicsMode@4
|
||||||
|
GetHFONT@4
|
||||||
|
GetICMProfileA@12
|
||||||
|
GetICMProfileW@12
|
||||||
|
GetKerningPairs@12=GetKerningPairsA@12
|
||||||
|
GetKerningPairsA@12
|
||||||
|
GetKerningPairsW@12
|
||||||
|
GetLayout@4
|
||||||
|
GetLogColorSpaceA@12
|
||||||
|
GetLogColorSpaceW@12
|
||||||
|
GetMapMode@4
|
||||||
|
GetMetaFileA@4
|
||||||
|
GetMetaFileBitsEx@12
|
||||||
|
GetMetaFileW@4
|
||||||
|
GetMetaRgn@8
|
||||||
|
GetMiterLimit@8=NtGdiGetMiterLimit@8
|
||||||
|
GetNearestColor@8=NtGdiGetNearestColor@8
|
||||||
|
GetNearestPaletteIndex@8=NtGdiGetNearestPaletteIndex@8
|
||||||
|
GetObjectA@12
|
||||||
|
GetObjectType@4
|
||||||
|
GetObjectW@12
|
||||||
|
GetOutlineTextMetricsA@12
|
||||||
|
GetOutlineTextMetricsW@12
|
||||||
|
GetPaletteEntries@16
|
||||||
|
GetPath@16
|
||||||
|
GetPixel@12
|
||||||
|
GetPixelFormat@4
|
||||||
|
GetPolyFillMode@4
|
||||||
|
GetROP2@4
|
||||||
|
GetRandomRgn@12=NtGdiGetRandomRgn@12
|
||||||
|
GetRasterizerCaps@8=NtGdiGetRasterizerCaps@8
|
||||||
|
GetRegionData@12
|
||||||
|
GetRelAbs@8
|
||||||
|
GetRgnBox@8
|
||||||
|
|
||||||
ClearBitmapAttributes@8
|
ClearBitmapAttributes@8
|
||||||
ClearBrushAttributes@8
|
ClearBrushAttributes@8
|
||||||
|
@ -391,45 +429,6 @@ GdiDrawStream@12
|
||||||
GetBitmapAttributes@4
|
GetBitmapAttributes@4
|
||||||
GetBrushAttributes@4
|
GetBrushAttributes@4
|
||||||
GetGlyphIndicesA@20
|
GetGlyphIndicesA@20
|
||||||
GetGlyphIndicesW@20
|
|
||||||
GetGlyphOutline=GetGlyphOutlineA@28
|
|
||||||
GetGlyphOutlineA@28
|
|
||||||
GetGlyphOutlineW@28
|
|
||||||
GetGlyphOutlineWow@28
|
|
||||||
GetGraphicsMode@4=NtGdiGetGraphicsMode@4
|
|
||||||
GetHFONT@4
|
|
||||||
GetICMProfileA@12
|
|
||||||
GetICMProfileW@12
|
|
||||||
GetKerningPairs=GetKerningPairsA@12
|
|
||||||
GetKerningPairsA@12
|
|
||||||
GetKerningPairsW@12
|
|
||||||
GetLayout@4
|
|
||||||
GetLogColorSpaceA@12
|
|
||||||
GetLogColorSpaceW@12
|
|
||||||
GetMapMode@4=NtGdiGetMapMode@4
|
|
||||||
GetMetaFileA@4
|
|
||||||
GetMetaFileBitsEx@12
|
|
||||||
GetMetaFileW@4
|
|
||||||
GetMetaRgn@8
|
|
||||||
GetMiterLimit@8
|
|
||||||
GetNearestColor@8=NtGdiGetNearestColor@8
|
|
||||||
GetNearestPaletteIndex@8=NtGdiGetNearestPaletteIndex@8
|
|
||||||
GetObjectA@12
|
|
||||||
GetObjectType@4
|
|
||||||
GetObjectW@12
|
|
||||||
GetOutlineTextMetricsA@12
|
|
||||||
GetOutlineTextMetricsW@12
|
|
||||||
GetPaletteEntries@16
|
|
||||||
GetPath@16
|
|
||||||
GetPixel@12=NtGdiGetPixel@12
|
|
||||||
GetPixelFormat@4
|
|
||||||
GetPolyFillMode@4=NtGdiGetPolyFillMode@4
|
|
||||||
GetROP2@4=NtGdiGetROP2@4
|
|
||||||
GetRandomRgn@12=NtGdiGetRandomRgn@12
|
|
||||||
GetRasterizerCaps@8
|
|
||||||
GetRegionData@12
|
|
||||||
GetRelAbs@8
|
|
||||||
GetRgnBox@8=NtGdiGetRgnBox@8
|
|
||||||
GetStockObject@4
|
GetStockObject@4
|
||||||
GetStretchBltMode@4=NtGdiGetStretchBltMode@4
|
GetStretchBltMode@4=NtGdiGetStretchBltMode@4
|
||||||
GetStringBitmapA@20
|
GetStringBitmapA@20
|
||||||
|
@ -528,15 +527,15 @@ SelectBrushLocal@8
|
||||||
SelectClipPath@8
|
SelectClipPath@8
|
||||||
SelectClipRgn@8
|
SelectClipRgn@8
|
||||||
SelectFontLocal@8
|
SelectFontLocal@8
|
||||||
SelectObject@8=NtGdiSelectObject@8
|
SelectObject@8
|
||||||
SelectPalette@12
|
SelectPalette@12
|
||||||
SetAbortProc@8
|
SetAbortProc@8
|
||||||
SetArcDirection@8
|
SetArcDirection@8
|
||||||
SetBitmapAttributes@8
|
SetBitmapAttributes@8
|
||||||
SetBitmapBits@12=NtGdiSetBitmapBits@12
|
SetBitmapBits@12=NtGdiSetBitmapBits@12
|
||||||
SetBitmapDimensionEx@16=NtGdiSetBitmapDimension@16
|
SetBitmapDimensionEx@16=NtGdiSetBitmapDimension@16
|
||||||
SetBkColor@8=NtGdiSetBkColor@8
|
SetBkColor@8
|
||||||
SetBkMode@8=NtGdiSetBkMode@8
|
SetBkMode@8
|
||||||
SetBoundsRect@12
|
SetBoundsRect@12
|
||||||
SetBrushAttributes@8
|
SetBrushAttributes@8
|
||||||
SetBrushOrgEx@16=NtGdiSetBrushOrg@16
|
SetBrushOrgEx@16=NtGdiSetBrushOrg@16
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<directory name="misc">
|
<directory name="misc">
|
||||||
<file>heap.c</file>
|
<file>heap.c</file>
|
||||||
<file>gdientry.c</file>
|
<file>gdientry.c</file>
|
||||||
|
<file>hacks.c</file>
|
||||||
<file>historic.c</file>
|
<file>historic.c</file>
|
||||||
<file>misc.c</file>
|
<file>misc.c</file>
|
||||||
<file>stubs.c</file>
|
<file>stubs.c</file>
|
||||||
|
|
144
reactos/dll/win32/gdi32/misc/hacks.c
Normal file
144
reactos/dll/win32/gdi32/misc/hacks.c
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
#include "precomp.h"
|
||||||
|
|
||||||
|
/* $Id: stubs.c 28709 2007-08-31 15:09:51Z greatlrd $
|
||||||
|
*
|
||||||
|
* reactos/lib/gdi32/misc/hacks.c
|
||||||
|
*
|
||||||
|
* GDI32.DLL hacks
|
||||||
|
*
|
||||||
|
* Api that are hacked but we can not do correct implemtions yetm but using own syscall
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
STDCALL
|
||||||
|
GetPolyFillMode(HDC hdc)
|
||||||
|
{
|
||||||
|
/* FIXME do not use reactos own syscall for this,
|
||||||
|
* this hack need be remove
|
||||||
|
*/
|
||||||
|
return NtGdiGetPolyFillMode(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
STDCALL
|
||||||
|
GetGraphicsMode(HDC hdc)
|
||||||
|
{
|
||||||
|
/* FIXME do not use reactos own syscall for this,
|
||||||
|
* this hack need be remove
|
||||||
|
*/
|
||||||
|
return NtGdiGetGraphicsMode(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
STDCALL
|
||||||
|
GetROP2(HDC hdc)
|
||||||
|
{
|
||||||
|
/* FIXME do not use reactos own syscall for this,
|
||||||
|
* this hack need be remove
|
||||||
|
*/
|
||||||
|
return NtGdiGetROP2(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
INT
|
||||||
|
STDCALL
|
||||||
|
SetDIBitsToDevice(
|
||||||
|
HDC hDC,
|
||||||
|
int XDest,
|
||||||
|
int YDest,
|
||||||
|
DWORD Width,
|
||||||
|
DWORD Height,
|
||||||
|
int XSrc,
|
||||||
|
int YSrc,
|
||||||
|
UINT StartScan,
|
||||||
|
UINT ScanLines,
|
||||||
|
CONST VOID *Bits,
|
||||||
|
CONST BITMAPINFO *lpbmi,
|
||||||
|
UINT ColorUse)
|
||||||
|
{
|
||||||
|
return NtGdiSetDIBitsToDeviceInternal(hDC,
|
||||||
|
XDest,
|
||||||
|
YDest,
|
||||||
|
Width,
|
||||||
|
Height,
|
||||||
|
XSrc,
|
||||||
|
YSrc,
|
||||||
|
StartScan,
|
||||||
|
ScanLines,
|
||||||
|
(LPBYTE)Bits,
|
||||||
|
(LPBITMAPINFO)lpbmi,
|
||||||
|
ColorUse,
|
||||||
|
lpbmi->bmiHeader.biSizeImage,
|
||||||
|
lpbmi->bmiHeader.biSize,
|
||||||
|
FALSE,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
STDCALL
|
||||||
|
SetBkMode(HDC hdc,
|
||||||
|
int iBkMode)
|
||||||
|
{
|
||||||
|
return NtGdiSetBkMode(hdc,iBkMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
COLORREF
|
||||||
|
STDCALL
|
||||||
|
SetBkColor(HDC hdc,
|
||||||
|
COLORREF crColor)
|
||||||
|
{
|
||||||
|
return NtGdiSetBkColor(hdc,crColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
HGDIOBJ
|
||||||
|
STDCALL
|
||||||
|
SelectObject(HDC hdc,
|
||||||
|
HGDIOBJ hgdiobj)
|
||||||
|
{
|
||||||
|
return NtGdiSelectObject(hdc,hgdiobj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
STDCALL
|
||||||
|
GetMapMode(HDC hdc)
|
||||||
|
{
|
||||||
|
return NtGdiGetMapMode(hdc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -142,22 +142,6 @@ GetMetaFileBitsEx(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
GetRasterizerCaps(
|
|
||||||
LPRASTERIZER_STATUS a0,
|
|
||||||
UINT a1
|
|
||||||
)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -168,7 +152,6 @@ GetSystemPaletteUse(HDC hDc)
|
||||||
return NtGdiGetSystemPaletteUse(hDc);
|
return NtGdiGetSystemPaletteUse(hDc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -183,7 +166,6 @@ GetFontLanguageInfo(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -199,7 +181,6 @@ PlayMetaFile(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -215,7 +196,6 @@ ResizePalette(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -230,7 +210,6 @@ SetMetaRgn(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -263,7 +242,6 @@ SetMapperFlags(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -279,7 +257,6 @@ SetMetaFileBitsEx(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -295,7 +272,6 @@ SetSystemPaletteUse(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -312,7 +288,6 @@ SetTextJustification(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -363,10 +338,6 @@ EnumMetaFile(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -381,7 +352,6 @@ DeleteEnhMetaFile(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -400,7 +370,6 @@ EnumEnhMetaFile(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -434,7 +403,6 @@ GetEnhMetaFileHeader(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -451,7 +419,6 @@ GetEnhMetaFilePaletteEntries(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -604,10 +571,6 @@ SetColorAdjustment(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -2795,3 +2758,34 @@ GetRegionData(HRGN hrgn,
|
||||||
return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
|
return NtGdiGetRegionData(hrgn,nCount,lpRgnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
INT
|
||||||
|
STDCALL
|
||||||
|
GetRgnBox(HRGN hrgn,
|
||||||
|
LPRECT prcOut)
|
||||||
|
{
|
||||||
|
/* FIXME some stuff need be done in user mode */
|
||||||
|
return NtGdiGetRgnBox(hrgn, prcOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
GetPixel(HDC hdc,
|
||||||
|
INT x,
|
||||||
|
INT y)
|
||||||
|
{
|
||||||
|
/* FIXME some part need todo in user mode */
|
||||||
|
return NtGdiGetPixel(hdc, x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -151,38 +151,6 @@ CreateCompatibleBitmap(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT WINAPI
|
|
||||||
SetDIBitsToDevice(
|
|
||||||
HDC hDC,
|
|
||||||
int XDest,
|
|
||||||
int YDest,
|
|
||||||
DWORD Width,
|
|
||||||
DWORD Height,
|
|
||||||
int XSrc,
|
|
||||||
int YSrc,
|
|
||||||
UINT StartScan,
|
|
||||||
UINT ScanLines,
|
|
||||||
CONST VOID *Bits,
|
|
||||||
CONST BITMAPINFO *lpbmi,
|
|
||||||
UINT ColorUse)
|
|
||||||
{
|
|
||||||
return NtGdiSetDIBitsToDeviceInternal(hDC,
|
|
||||||
XDest,
|
|
||||||
YDest,
|
|
||||||
Width,
|
|
||||||
Height,
|
|
||||||
XSrc,
|
|
||||||
YSrc,
|
|
||||||
StartScan,
|
|
||||||
ScanLines,
|
|
||||||
(LPBYTE)Bits,
|
|
||||||
(LPBITMAPINFO)lpbmi,
|
|
||||||
ColorUse,
|
|
||||||
lpbmi->bmiHeader.biSizeImage,
|
|
||||||
lpbmi->bmiHeader.biSize,
|
|
||||||
FALSE,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
INT
|
INT
|
||||||
|
|
|
@ -20,6 +20,9 @@ CreatePalette(CONST LOGPALETTE * plpal)
|
||||||
return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEntries);
|
return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
UINT
|
UINT
|
||||||
WINAPI
|
WINAPI
|
||||||
GetPaletteEntries(HPALETTE hpal,
|
GetPaletteEntries(HPALETTE hpal,
|
||||||
|
|
|
@ -178,20 +178,6 @@ WidenPath(
|
||||||
return NtGdiWidenPath ( hdc );
|
return NtGdiWidenPath ( hdc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
GetMiterLimit(
|
|
||||||
HDC hdc,
|
|
||||||
PFLOAT a1
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return NtGdiGetMiterLimit ( hdc, (PDWORD)a1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue