forget commit Implement of GdiGetLocalBrush, GdiGetLocalDC, GdiGetLocalFont
[reactos.git] / reactos / dll / win32 / gdi32 / misc / stubs.c
index c520439..cfd221c 100644 (file)
 
 #define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
 
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+TranslateCharsetInfo(DWORD * lpSrc,
+                     LPCHARSETINFO lpCs,
+                     DWORD dwFlags)
+{
+    /* FIXME share memory */
+    return NtGdiTranslateCharsetInfo(lpSrc, lpCs, dwFlags );
+}
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+StretchDIBits(HDC hdc,
+              int XDest,
+              int YDest,
+              int nDestWidth,
+              int nDestHeight,
+              int XSrc,
+              int YSrc,
+              int nSrcWidth,
+              int nSrcHeight,
+              CONST VOID *lpBits,
+              CONST BITMAPINFO *lpBitsInfo,
+              UINT iUsage,
+              DWORD dwRop)
+
+{
+    /* FIXME share memory */
+    return NtGdiStretchDIBits(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc, YSrc, 
+                              nSrcWidth, nSrcHeight, lpBits, lpBitsInfo, iUsage, dwRop);
+}
+
 /*
  * @unimplemented
  */
@@ -872,11 +911,16 @@ ScaleWindowExtEx(
  */
 BOOL
 STDCALL
-UnrealizeObject(
-       HGDIOBJ a0
-       )
+UnrealizeObject(HGDIOBJ  hgdiobj)
 {
-       return NtGdiUnrealizeObject(a0);
+    BOOL retValue = TRUE;
+
+    if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
+    {
+        retValue = NtGdiUnrealizeObject(hgdiobj);
+    }
+
+    return retValue;
 }
 
 
@@ -1458,9 +1502,9 @@ HENHMETAFILE
 STDCALL
 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1470,9 +1514,9 @@ BOOL
 STDCALL
 GdiDrawStream(HDC dc, ULONG l, VOID *v)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1482,45 +1526,9 @@ DWORD
 STDCALL
 GdiGetCodePage(HDC hdc)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HBRUSH 
-STDCALL
-GdiGetLocalBrush(HBRUSH hbr)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HDC 
-STDCALL
-GdiGetLocalDC(HDC hdc)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HFONT 
-STDCALL
-GdiGetLocalFont(HFONT hfont)
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1530,9 +1538,9 @@ BOOL
 STDCALL
 GdiIsMetaFileDC(HDC hdc)
 {
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
+    UNIMPLEMENTED;
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
 }
 
 /*
@@ -1832,15 +1840,13 @@ SetLayoutWidth(HDC hdc,LONG wox,DWORD dwLayout)
 
 
 /*
- * @unimplemented
+ * @implemented
  */
 int 
 STDCALL
 StartFormPage(HDC hdc)
 {
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    return StartPage(hdc);
 }
 
 /*
@@ -2240,9 +2246,6 @@ CreateBitmap(INT  Width,
     return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
 }
 
-
-
-
 /*
  * @unimplemented
  */
@@ -2254,106 +2257,6 @@ EngGetDriverName(HDEV hdev)
     return 0;
 }
 
-/*
- * @unimplemented
- * wrong info it is not Obsolete GDI Function as http://www.osronline.com/DDKx/graphics/gdioview_20tj.htm say
- */
-BOOL STDCALL
-EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo)
-{
-#if 0
-    BOOL retValue = FALSE;
-    DHPDEV Dhpdev;
-
-    if ((!hdev) && (!pEMFInfo))
-    {
-        if ((Dhpdev = NtGdiGetDhpdev(hdev)))
-        {
-            /* FIXME check if it support or if it is pEMFInfo we got */
-            /* FIXME copy the data from Dhpdev to pEMFInfo           */
-        }
-    }
-    return retValue;
-#else
-    return FALSE;
-#endif
-}
-
-
-/*
- * @unimplemented
- */
-INT STDCALL 
-EngWideCharToMultiByte( UINT CodePage,
-                        LPWSTR WideCharString,
-                        INT BytesInWideCharString,
-                        LPSTR MultiByteString,
-                        INT BytesInMultiByteString)
-{
-  return WideCharToMultiByte(
-                         CodePage,
-                         0,
-                         WideCharString,
-                        (BytesInWideCharString/sizeof(WCHAR)), /* Bytes to (in WCHARs) */
-                         MultiByteString,
-                         BytesInMultiByteString,
-                         NULL,
-                         NULL);
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL
-XFORMOBJ_bApplyXform(XFORMOBJ *pxo,
-                     ULONG iMode,
-                     ULONG cPoints,
-                     PVOID pvIn,
-                     PVOID pvOut)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONG STDCALL
-XFORMOBJ_iGetXform(XFORMOBJ *pxo,
-                   XFORML *pxform)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONG
-STDCALL
-XLATEOBJ_cGetPalette(XLATEOBJ *XlateObj,
-                     ULONG PalOutType,
-                     ULONG cPal,
-                     ULONG *OutPal)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE STDCALL
-XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo)
-{
-    UNIMPLEMENTED;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
 /*
  * @unimplemented
  */