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?…
==============================================================================
--- 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@4
 GetFontResourceInfoW@16
 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
 ClearBrushAttributes@8
@@ -391,45 +429,6 @@
 GetBitmapAttributes@4
 GetBrushAttributes@4
 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
 GetStretchBltMode@4=NtGdiGetStretchBltMode@4
 GetStringBitmapA@20
@@ -528,15 +527,15 @@
 SelectClipPath@8
 SelectClipRgn@8
 SelectFontLocal@8
-SelectObject@8=NtGdiSelectObject@8
+SelectObject@8
 SelectPalette@12
 SetAbortProc@8
 SetArcDirection@8
 SetBitmapAttributes@8
 SetBitmapBits@12=NtGdiSetBitmapBits@12
 SetBitmapDimensionEx@16=NtGdiSetBitmapDimension@16
-SetBkColor@8=NtGdiSetBkColor@8
-SetBkMode@8=NtGdiSetBkMode@8
+SetBkColor@8
+SetBkMode@8
 SetBoundsRect@12
 SetBrushAttributes@8
 SetBrushOrgEx@16=NtGdiSetBrushOrg@16
Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.rbui…
==============================================================================
--- 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…
==============================================================================
--- 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…
==============================================================================
--- 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/bi…
==============================================================================
--- 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/pa…
==============================================================================
--- 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/pa…
==============================================================================
--- 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
  */