better stub for EnumFonts (fixed license agreement in ClamWin installer)
[reactos.git] / reactos / lib / gdi32 / misc / stubsw.c
index be9db44..4260ee0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: stubsw.c,v 1.25 2004/03/23 00:18:54 gvg Exp $
+/* $Id$
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -8,82 +8,10 @@
  * remove its stub from this file.
  *
  */
-#ifndef UNICODE
-#define UNICODE
-#endif//UNICODE
-#include <windows.h>
-#include <win32k/kapi.h>
 
-/*
- * @implemented
- */
-int
-STDCALL
-AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved )
-{
-  UNICODE_STRING Filename;
-
-  /* FIXME handle fl parameter */
-  RtlInitUnicodeString(&Filename, lpszFilename);
-  return NtGdiAddFontResource ( &Filename, fl );
-}
-
-/*
- * @implemented
- */
-int
-STDCALL
-AddFontResourceW ( LPCWSTR lpszFilename )
-{
-       return AddFontResourceExW ( lpszFilename, 0, 0 );
-}
-
-
-/*
- * @implemented
- */
-HDC
-STDCALL
-CreateICW(
-       LPCWSTR                 lpszDriver,
-       LPCWSTR                 lpszDevice,
-       LPCWSTR                 lpszOutput,
-       CONST DEVMODEW *        lpdvmInit
-       )
-{
-  UNICODE_STRING Driver, Device, Output;
-  
-  if(lpszDriver)
-    RtlInitUnicodeString(&Driver, lpszDriver);
-  if(lpszDevice)
-    RtlInitUnicodeString(&Device, lpszDevice);
-  if(lpszOutput)
-    RtlInitUnicodeString(&Output, lpszOutput);
-  return NtGdiCreateIC ((lpszDriver ? &Driver : NULL),
-                     (lpszDevice ? &Device : NULL),
-                     (lpszOutput ? &Output : NULL),
-                     (CONST PDEVMODEW)lpdvmInit );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-CreateScalableFontResourceW(
-       DWORD           fdwHidden,
-       LPCWSTR         lpszFontRes,
-       LPCWSTR         lpszFontFile,
-       LPCWSTR         lpszCurrentPath
-       )
-{
-  return NtGdiCreateScalableFontResource ( fdwHidden,
-                                         lpszFontRes,
-                                         lpszFontFile,
-                                         lpszCurrentPath );
-}
+#include "precomp.h"
 
+#define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
 
 /*
  * @unimplemented
@@ -106,132 +34,12 @@ DeviceCapabilitiesExW(
                                  pOutput,
                                  pDevMode );
 #else
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 #endif
 }
 
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-EnumFontsW(
-       HDC  hDC,
-       LPCWSTR lpFaceName,
-       FONTENUMPROCW  FontFunc,
-       LPARAM  lParam
-       )
-{
-#if 0
-  return NtGdiEnumFonts ( hDC, lpFaceName, FontFunc, lParam );
-#else
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  return 0;
-#endif
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-GetCharWidthW (
-       HDC     hdc,
-       UINT    iFirstChar,
-       UINT    iLastChar,
-       LPINT   lpBuffer
-       )
-{
-  return NtGdiGetCharWidth ( hdc, iFirstChar, iLastChar, lpBuffer );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-GetCharWidth32W(
-       HDC     hdc,
-       UINT    iFirstChar,
-       UINT    iLastChar,
-       LPINT   lpBuffer
-       )
-{
-  return NtGdiGetCharWidth32 ( hdc, iFirstChar, iLastChar, lpBuffer );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-APIENTRY
-GetCharWidthFloatW(
-       HDC     hdc,
-       UINT    iFirstChar,
-       UINT    iLastChar,
-       PFLOAT  pxBuffer
-       )
-{
-  return NtGdiGetCharWidthFloat ( hdc, iFirstChar, iLastChar, pxBuffer );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-APIENTRY
-GetCharABCWidthsW(
-       HDC     hdc,
-       UINT    uFirstChar,
-       UINT    uLastChar,
-       LPABC   lpabc
-       )
-{
-  return NtGdiGetCharABCWidths ( hdc, uFirstChar, uLastChar, lpabc );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-APIENTRY
-GetCharABCWidthsFloatW(
-       HDC             hdc,
-       UINT            iFirstChar,
-       UINT            iLastChar,
-       LPABCFLOAT      lpABCF
-       )
-{
-  return NtGdiGetCharABCWidthsFloat ( hdc, iFirstChar, iLastChar, lpABCF );
-}
-
-
-/*
- * @implemented
- */
-DWORD
-STDCALL
-GetGlyphOutlineW(
-       HDC             hdc,
-       UINT            uChar,
-       UINT            uFormat,
-       LPGLYPHMETRICS  lpgm,
-       DWORD           cbBuffer,
-       LPVOID          lpvBuffer,
-       CONST MAT2      *lpmat2
-       )
-{
-  return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2 );
-}
-
-
 /*
  * @unimplemented
  */
@@ -243,106 +51,12 @@ GetOutlineTextMetricsW(
        LPOUTLINETEXTMETRICW    lpOTM
        )
 {
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
 
 
-/*
- * @implemented
- */
-BOOL
-APIENTRY
-GetTextExtentExPointW(
-       HDC             hdc,
-       LPCWSTR         lpszStr,
-       int             cchString,
-       int             nMaxExtent,
-       LPINT           lpnFit,
-       LPINT           alpDx,
-       LPSIZE          lpSize
-       )
-{
-  return NtGdiGetTextExtentExPoint (
-    hdc, lpszStr, cchString, nMaxExtent, lpnFit, alpDx, lpSize );
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetCharacterPlacementW(
-       HDC             hDc,
-       LPCWSTR         a1,
-       int             a2,
-       int             a3,
-       LPGCP_RESULTSW  a4,
-       DWORD           a5
-       )
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-
-/*
- * @implemented
- */
-HDC
-STDCALL
-ResetDCW(
-       HDC             hdc,
-       CONST DEVMODEW  *lpInitData
-       )
-{
-  return NtGdiResetDC ( hdc, lpInitData );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-RemoveFontResourceW(
-       LPCWSTR lpFileName
-       )
-{
-  return NtGdiRemoveFontResource ( lpFileName );
-}
-
-
-/*
- * @implemented
- */
-int 
-STDCALL 
-StartDocW(
-       HDC             hdc,
-       CONST DOCINFOW  *a1
-       )
-{
-       return NtGdiStartDoc ( hdc, (CONST PDOCINFOW)a1 );
-}
-
-
-/*
- * @unimplemented
- */
-int   
-STDCALL 
-GetObjectW(
-       HGDIOBJ         a0, 
-       int             a1, 
-       LPVOID          a2
-       )
-{
-       return NtGdiGetObject ( a0, a1, a2 );
-}
-
-
 /*
  * @unimplemented
  */
@@ -354,27 +68,12 @@ PolyTextOutW(
        int                     a2
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
 
 
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetTextFaceW(
-       HDC     a0,
-       int     a1,
-       LPWSTR  a2
-       )
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-
 /*
  * @unimplemented
  */
@@ -386,6 +85,7 @@ GetKerningPairsW(
        LPKERNINGPAIR   a2
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return 0;
 }
@@ -402,6 +102,7 @@ GetLogColorSpaceW(
        DWORD                   a2
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -415,6 +116,7 @@ CreateColorSpaceW(
        LPLOGCOLORSPACEW        a0
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return 0;
 }
@@ -431,6 +133,7 @@ GetICMProfileW(
        LPWSTR          a2
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -446,6 +149,7 @@ SetICMProfileW(
        LPWSTR  a1
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -471,6 +175,7 @@ EnumICMProfilesW(
    * and call the user's callback function until we run out of strings or
    * the user returns FALSE
    */
+  UNIMPLEMENTED;
   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
   return 0;
 }
@@ -488,6 +193,7 @@ wglUseFontBitmapsW(
        DWORD           a3
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -509,6 +215,7 @@ wglUseFontOutlinesW(
        LPGLYPHMETRICSFLOAT     a7
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -526,6 +233,7 @@ UpdateICMRegKeyW(
        UINT    a3
        )
 {
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return FALSE;
 }
@@ -549,6 +257,149 @@ GetFontResourceInfoW(
        DWORD   a3
        )
 {
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+EudcLoadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath,INT iPriority,INT iFontLinkType)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+EudcUnloadLinkW(LPCWSTR pBaseFaceName,LPCWSTR pEudcFontPath)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+GdiAddFontResourceW(LPCWSTR filename,FLONG f,DESIGNVECTOR *pdv)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+GdiConsoleTextOut(HDC hdc, POLYTEXTW *lpto,UINT nStrings, RECTL *prclBounds)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD
+STDCALL
+GetEUDCTimeStampExW(LPCWSTR str)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+RemoveFontResourceExW(
+       LPCWSTR lpFileName,
+       DWORD fl,
+       PVOID pdv
+)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+bInitSystemAndFontsDirectoriesW(LPWSTR *SystemDir,LPWSTR *FontsDir)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+STDCALL
+bMakePathNameW(LPWSTR lpBuffer,LPCWSTR lpFileName,LPWSTR *lpFilePart,DWORD unknown)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+HFONT
+STDCALL
+CreateFontIndirectExW(const ENUMLOGFONTEXDVW *elfexd)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD
+STDCALL
+GetGlyphIndicesW(
+       HDC hdc,
+       LPCWSTR lpstr,
+       int c,
+       LPWORD pgi,
+       DWORD fl
+)
+{
+       UNIMPLEMENTED;
+       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+       return 0;
+}
+
+/*
+ * @unimplemented
+ */
+UINT
+STDCALL
+GetStringBitmapW(HDC hdc,LPWSTR pwsz,BOOL unknown,UINT cj,BYTE *lpSB)
+{
+       UNIMPLEMENTED;
        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
        return 0;
 }