[ros-diffs] [greatlrd] 28721: 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
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Fri Aug 31 22:26:02 CEST 2007
Author: greatlrd
Date: Sat Sep 1 00:26:02 2007
New Revision: 28721
URL: http://svn.reactos.org/svn/reactos?rev=28721&view=rev
Log:
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
Added:
trunk/reactos/dll/win32/gdi32/misc/hacks.c (with props)
Modified:
trunk/reactos/dll/win32/gdi32/gdi32.def
trunk/reactos/dll/win32/gdi32/gdi32.rbuild
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/objects/bitmap.c
trunk/reactos/dll/win32/gdi32/objects/palette.c
trunk/reactos/dll/win32/gdi32/objects/path.c
Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Sat Sep 1 00:26:02 2007
@@ -326,8 +326,46 @@
GetFontLanguageInfo at 4
GetFontResourceInfoW at 16
GetFontUnicodeRanges at 8=NtGdiGetFontUnicodeRanges at 8
-
-
+GetGlyphIndicesA at 20
+GetGlyphIndicesW at 20=NtGdiGetGlyphIndicesW at 20
+GetGlyphOutline at 28=GetGlyphOutlineA at 28
+GetGlyphOutlineA at 28
+GetGlyphOutlineW at 28
+GetGlyphOutlineWow at 28
+GetGraphicsMode at 4
+GetHFONT at 4
+GetICMProfileA at 12
+GetICMProfileW at 12
+GetKerningPairs at 12=GetKerningPairsA at 12
+GetKerningPairsA at 12
+GetKerningPairsW at 12
+GetLayout at 4
+GetLogColorSpaceA at 12
+GetLogColorSpaceW at 12
+GetMapMode at 4
+GetMetaFileA at 4
+GetMetaFileBitsEx at 12
+GetMetaFileW at 4
+GetMetaRgn at 8
+GetMiterLimit at 8=NtGdiGetMiterLimit at 8
+GetNearestColor at 8=NtGdiGetNearestColor at 8
+GetNearestPaletteIndex at 8=NtGdiGetNearestPaletteIndex at 8
+GetObjectA at 12
+GetObjectType at 4
+GetObjectW at 12
+GetOutlineTextMetricsA at 12
+GetOutlineTextMetricsW at 12
+GetPaletteEntries at 16
+GetPath at 16
+GetPixel at 12
+GetPixelFormat at 4
+GetPolyFillMode at 4
+GetROP2 at 4
+GetRandomRgn at 12=NtGdiGetRandomRgn at 12
+GetRasterizerCaps at 8=NtGdiGetRasterizerCaps at 8
+GetRegionData at 12
+GetRelAbs at 8
+GetRgnBox at 8
ClearBitmapAttributes at 8
ClearBrushAttributes at 8
@@ -391,45 +429,6 @@
GetBitmapAttributes at 4
GetBrushAttributes at 4
GetGlyphIndicesA at 20
-GetGlyphIndicesW at 20
-GetGlyphOutline=GetGlyphOutlineA at 28
-GetGlyphOutlineA at 28
-GetGlyphOutlineW at 28
-GetGlyphOutlineWow at 28
-GetGraphicsMode at 4=NtGdiGetGraphicsMode at 4
-GetHFONT at 4
-GetICMProfileA at 12
-GetICMProfileW at 12
-GetKerningPairs=GetKerningPairsA at 12
-GetKerningPairsA at 12
-GetKerningPairsW at 12
-GetLayout at 4
-GetLogColorSpaceA at 12
-GetLogColorSpaceW at 12
-GetMapMode at 4=NtGdiGetMapMode at 4
-GetMetaFileA at 4
-GetMetaFileBitsEx at 12
-GetMetaFileW at 4
-GetMetaRgn at 8
-GetMiterLimit at 8
-GetNearestColor at 8=NtGdiGetNearestColor at 8
-GetNearestPaletteIndex at 8=NtGdiGetNearestPaletteIndex at 8
-GetObjectA at 12
-GetObjectType at 4
-GetObjectW at 12
-GetOutlineTextMetricsA at 12
-GetOutlineTextMetricsW at 12
-GetPaletteEntries at 16
-GetPath at 16
-GetPixel at 12=NtGdiGetPixel at 12
-GetPixelFormat at 4
-GetPolyFillMode at 4=NtGdiGetPolyFillMode at 4
-GetROP2 at 4=NtGdiGetROP2 at 4
-GetRandomRgn at 12=NtGdiGetRandomRgn at 12
-GetRasterizerCaps at 8
-GetRegionData at 12
-GetRelAbs at 8
-GetRgnBox at 8=NtGdiGetRgnBox at 8
GetStockObject at 4
GetStretchBltMode at 4=NtGdiGetStretchBltMode at 4
GetStringBitmapA at 20
@@ -528,15 +527,15 @@
SelectClipPath at 8
SelectClipRgn at 8
SelectFontLocal at 8
-SelectObject at 8=NtGdiSelectObject at 8
+SelectObject at 8
SelectPalette at 12
SetAbortProc at 8
SetArcDirection at 8
SetBitmapAttributes at 8
SetBitmapBits at 12=NtGdiSetBitmapBits at 12
SetBitmapDimensionEx at 16=NtGdiSetBitmapDimension at 16
-SetBkColor at 8=NtGdiSetBkColor at 8
-SetBkMode at 8=NtGdiSetBkMode at 8
+SetBkColor at 8
+SetBkMode at 8
SetBoundsRect at 12
SetBrushAttributes at 8
SetBrushOrgEx at 16=NtGdiSetBrushOrg at 16
Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.rbuild?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.rbuild (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.rbuild Sat Sep 1 00:26:02 2007
@@ -20,6 +20,7 @@
<directory name="misc">
<file>heap.c</file>
<file>gdientry.c</file>
+ <file>hacks.c</file>
<file>historic.c</file>
<file>misc.c</file>
<file>stubs.c</file>
Added: trunk/reactos/dll/win32/gdi32/misc/hacks.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/hacks.c?rev=28721&view=auto
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/hacks.c (added)
+++ trunk/reactos/dll/win32/gdi32/misc/hacks.c Sat Sep 1 00:26:02 2007
@@ -1,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);
+}
+
+
+
Propchange: trunk/reactos/dll/win32/gdi32/misc/hacks.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.c?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Sat Sep 1 00:26:02 2007
@@ -142,22 +142,6 @@
return 0;
}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetRasterizerCaps(
- LPRASTERIZER_STATUS a0,
- UINT a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/*
* @unimplemented
*/
@@ -167,7 +151,6 @@
{
return NtGdiGetSystemPaletteUse(hDc);
}
-
/*
* @unimplemented
@@ -182,7 +165,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
/*
* @unimplemented
@@ -199,7 +181,6 @@
return FALSE;
}
-
/*
* @unimplemented
*/
@@ -215,7 +196,6 @@
return FALSE;
}
-
/*
* @unimplemented
*/
@@ -229,7 +209,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
/*
* @unimplemented
@@ -263,7 +242,6 @@
return 0;
}
-
/*
* @unimplemented
*/
@@ -279,7 +257,6 @@
return 0;
}
-
/*
* @unimplemented
*/
@@ -294,7 +271,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
/*
* @unimplemented
@@ -311,7 +287,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
-
/*
* @unimplemented
@@ -363,10 +338,6 @@
return FALSE;
}
-
-
-
-
/*
* @unimplemented
*/
@@ -380,7 +351,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
-
/*
* @unimplemented
@@ -400,7 +370,6 @@
return FALSE;
}
-
/*
* @unimplemented
*/
@@ -434,7 +403,6 @@
return 0;
}
-
/*
* @unimplemented
*/
@@ -450,7 +418,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
/*
* @unimplemented
@@ -603,10 +570,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
-
-
-
-
/*
* @unimplemented
@@ -2795,3 +2758,34 @@
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);
+}
+
+
+
Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bitmap.c?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/bitmap.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c Sat Sep 1 00:26:02 2007
@@ -151,38 +151,6 @@
-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
Modified: trunk/reactos/dll/win32/gdi32/objects/palette.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/palette.c?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/palette.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/palette.c Sat Sep 1 00:26:02 2007
@@ -20,6 +20,9 @@
return NtGdiCreatePaletteInternal((LPLOGPALETTE)plpal, plpal->palNumEntries);
}
+/*
+ * @implemented
+ */
UINT
WINAPI
GetPaletteEntries(HPALETTE hpal,
Modified: trunk/reactos/dll/win32/gdi32/objects/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/path.c?rev=28721&r1=28720&r2=28721&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/path.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/path.c Sat Sep 1 00:26:02 2007
@@ -178,20 +178,6 @@
return NtGdiWidenPath ( hdc );
}
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-GetMiterLimit(
- HDC hdc,
- PFLOAT a1
- )
-{
- return NtGdiGetMiterLimit ( hdc, (PDWORD)a1 );
-}
-
/*
* @implemented
*/
More information about the Ros-diffs
mailing list