Commit feef8957 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Stub implementations for GetICMProfileW, SetICMProfile{A,W},

UpdateICMRegKey{A,W}. Forward UpdateICMRegKey to UpdateICMRegKeyA.
parent 273137cc
...@@ -226,8 +226,8 @@ ...@@ -226,8 +226,8 @@
@ stdcall GetGlyphOutlineW(long long long ptr long ptr ptr) @ stdcall GetGlyphOutlineW(long long long ptr long ptr ptr)
@ stub GetGlyphOutlineWow @ stub GetGlyphOutlineWow
@ stdcall GetGraphicsMode(long) @ stdcall GetGraphicsMode(long)
@ stdcall GetICMProfileA(long ptr ptr) @ stdcall GetICMProfileA(long ptr str)
@ stub GetICMProfileW @ stdcall GetICMProfileW(long ptr wstr)
@ stub GetKerningPairs @ stub GetKerningPairs
@ stdcall GetKerningPairsA(long long ptr) @ stdcall GetKerningPairsA(long long ptr)
@ stdcall GetKerningPairsW(long long ptr) @ stdcall GetKerningPairsW(long long ptr)
...@@ -363,8 +363,8 @@ ...@@ -363,8 +363,8 @@
@ stub SetFontEnumeration @ stub SetFontEnumeration
@ stdcall SetGraphicsMode(long long) @ stdcall SetGraphicsMode(long long)
@ stdcall SetICMMode(long long) @ stdcall SetICMMode(long long)
@ stdcall SetICMProfileA (long ptr) @ stdcall SetICMProfileA(long str)
@ stub SetICMProfileW @ stdcall SetICMProfileW(long wstr)
@ stdcall SetLayout(long long) @ stdcall SetLayout(long long)
@ stub SetMagicColors @ stub SetMagicColors
@ stdcall SetMapMode(long long) @ stdcall SetMapMode(long long)
...@@ -408,9 +408,9 @@ ...@@ -408,9 +408,9 @@
@ stub UnloadNetworkFonts @ stub UnloadNetworkFonts
@ stdcall UnrealizeObject(long) @ stdcall UnrealizeObject(long)
@ stdcall UpdateColors(long) @ stdcall UpdateColors(long)
@ stub UpdateICMRegKey @ stdcall UpdateICMRegKey(long str str long) UpdateICMRegKeyA
@ stub UpdateICMRegKeyA @ stdcall UpdateICMRegKeyA(long str str long)
@ stub UpdateICMRegKeyW @ stdcall UpdateICMRegKeyW(long wstr wstr long)
@ stdcall WidenPath(long) @ stdcall WidenPath(long)
@ stub gdiPlaySpoolStream @ stub gdiPlaySpoolStream
@ extern pfnRealizePalette @ extern pfnRealizePalette
......
...@@ -927,34 +927,60 @@ VOID WINAPI SetMagicColors16(HDC16 hDC, COLORREF color, UINT16 index) ...@@ -927,34 +927,60 @@ VOID WINAPI SetMagicColors16(HDC16 hDC, COLORREF color, UINT16 index)
* How does Windows assign these? Some registry key? * How does Windows assign these? Some registry key?
*/ */
#define WINEICM "winefake.icm" /* easy-to-identify fake filename */
/*********************************************************************/ /*********************************************************************/
BOOL WINAPI GetICMProfileA(HDC hDC, LPDWORD lpcbName, LPSTR lpszFilename) BOOL WINAPI GetICMProfileA(HDC hDC, LPDWORD lpcbName, LPSTR lpszFilename)
{ {
DWORD callerLen; DWORD callerLen;
static const char icm[] = "winefake.icm";
FIXME("(%p, %p, %p): partial stub\n", hDC, lpcbName, lpszFilename); FIXME("(%p, %p, %p): partial stub\n", hDC, lpcbName, lpszFilename);
callerLen = *lpcbName; callerLen = *lpcbName;
/* all 3 behaviors require the required buffer size to be set */ /* all 3 behaviors require the required buffer size to be set */
*lpcbName = strlen(WINEICM); *lpcbName = sizeof(icm);
/* behavior 1: if lpszFilename is NULL, return size of string and no error */ /* behavior 1: if lpszFilename is NULL, return size of string and no error */
if ((DWORD)lpszFilename == (DWORD)0x00000000) if (!lpszFilename) return TRUE;
return TRUE;
/* behavior 2: if buffer size too small, return size of string and error */ /* behavior 2: if buffer size too small, return size of string and error */
if (callerLen < strlen(WINEICM)) if (callerLen < sizeof(icm))
{ {
SetLastError(ERROR_INSUFFICIENT_BUFFER); SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE; return FALSE;
} }
/* behavior 3: if buffer size OK and pointer not NULL, copy and return size */ /* behavior 3: if buffer size OK and pointer not NULL, copy and return size */
strcpy(lpszFilename, WINEICM); memcpy(lpszFilename, icm, sizeof(icm));
return TRUE;
}
BOOL WINAPI GetICMProfileW(HDC hDC, LPDWORD lpcbName, LPWSTR lpszFilename)
{
DWORD callerLen;
static const WCHAR icm[] = { 'w','i','n','e','f','a','k','e','.','i','c','m', 0 };
FIXME("(%p, %p, %p): partial stub\n", hDC, lpcbName, lpszFilename);
callerLen = *lpcbName;
/* all 3 behaviors require the required buffer size to be set */
*lpcbName = sizeof(icm) / sizeof(WCHAR);
/* behavior 1: if lpszFilename is NULL, return size of string and no error */
if (!lpszFilename) return TRUE;
/* behavior 2: if buffer size too small, return size of string and error */
if (callerLen < sizeof(icm)/sizeof(WCHAR))
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return FALSE;
}
/* behavior 3: if buffer size OK and pointer not NULL, copy and return size */
memcpy(lpszFilename, icm, sizeof(icm));
return TRUE; return TRUE;
} }
...@@ -967,3 +993,35 @@ BOOL WINAPI SetICMProfileA(HDC hDC, LPSTR lpszFilename) ...@@ -967,3 +993,35 @@ BOOL WINAPI SetICMProfileA(HDC hDC, LPSTR lpszFilename)
FIXME("hDC %p filename '%s': stub!\n", hDC, debugstr_a(lpszFilename)); FIXME("hDC %p filename '%s': stub!\n", hDC, debugstr_a(lpszFilename));
return TRUE; /* success */ return TRUE; /* success */
} }
/**********************************************************************
* SetICMProfileA [GDI32.@]
*
*/
BOOL WINAPI SetICMProfileW(HDC hDC, LPWSTR lpszFilename)
{
FIXME("hDC %p filename '%s': stub!\n", hDC, debugstr_w(lpszFilename));
return TRUE; /* success */
}
/**********************************************************************
* UpdateICMRegKeyA [GDI32.@]
*
*/
BOOL WINAPI UpdateICMRegKeyA(DWORD dwReserved, LPSTR lpszCMID, LPSTR lpszFileName, UINT nCommand)
{
FIXME("(0x%08lx, %s, %s, 0x%08x): stub!\n", dwReserved, debugstr_a(lpszCMID),
debugstr_a(lpszFileName), nCommand);
return TRUE; /* success */
}
/**********************************************************************
* UpdateICMRegKeyW [GDI32.@]
*
*/
BOOL WINAPI UpdateICMRegKeyW(DWORD dwReserved, LPWSTR lpszCMID, LPWSTR lpszFileName, UINT nCommand)
{
FIXME("(0x%08lx, %s, %s, 0x%08x): stub!\n", dwReserved, debugstr_w(lpszCMID),
debugstr_w(lpszFileName), nCommand);
return TRUE; /* success */
}
...@@ -3390,9 +3390,12 @@ DWORD WINAPI GetGlyphIndicesW(HDC,LPCWSTR,INT,LPWORD,DWORD); ...@@ -3390,9 +3390,12 @@ DWORD WINAPI GetGlyphIndicesW(HDC,LPCWSTR,INT,LPWORD,DWORD);
DWORD WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*); DWORD WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
DWORD WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*); DWORD WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,LPVOID,const MAT2*);
#define GetGlyphOutline WINELIB_NAME_AW(GetGlyphOutline) #define GetGlyphOutline WINELIB_NAME_AW(GetGlyphOutline)
INT WINAPI GetGraphicsMode(HDC); INT WINAPI GetGraphicsMode(HDC);
DWORD WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR); BOOL WINAPI GetICMProfileA(HDC,LPDWORD,LPSTR);
DWORD WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR); BOOL WINAPI GetICMProfileW(HDC,LPDWORD,LPWSTR);
#define GetICMProfile WINELIB_NAME_AW(GetICMProfile)
DWORD WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
DWORD WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
#define GetKerningPairs WINELIB_NAME_AW(GetKerningPairs) #define GetKerningPairs WINELIB_NAME_AW(GetKerningPairs)
DWORD WINAPI GetLayout(HDC); DWORD WINAPI GetLayout(HDC);
BOOL WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD); BOOL WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
...@@ -3534,6 +3537,9 @@ INT WINAPI SetDIBitsToDevice(HDC,INT,INT,DWORD,DWORD,INT, ...@@ -3534,6 +3537,9 @@ INT WINAPI SetDIBitsToDevice(HDC,INT,INT,DWORD,DWORD,INT,
HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE *); HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE *);
INT WINAPI SetGraphicsMode(HDC,INT); INT WINAPI SetGraphicsMode(HDC,INT);
INT WINAPI SetICMMode(HDC,INT); INT WINAPI SetICMMode(HDC,INT);
BOOL WINAPI SetICMProfileA(HDC,LPSTR);
BOOL WINAPI SetICMProfileW(HDC,LPWSTR);
#define SetICMProfile WINELIB_NAME_AW(SetICMProfile)
DWORD WINAPI SetLayout(HDC,DWORD); DWORD WINAPI SetLayout(HDC,DWORD);
INT WINAPI SetMapMode(HDC,INT); INT WINAPI SetMapMode(HDC,INT);
DWORD WINAPI SetMapperFlags(HDC,DWORD); DWORD WINAPI SetMapperFlags(HDC,DWORD);
...@@ -3579,6 +3585,9 @@ BOOL WINAPI TranslateCharsetInfo(LPDWORD,LPCHARSETINFO,DWORD); ...@@ -3579,6 +3585,9 @@ BOOL WINAPI TranslateCharsetInfo(LPDWORD,LPCHARSETINFO,DWORD);
BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT); BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
BOOL WINAPI UnrealizeObject(HGDIOBJ); BOOL WINAPI UnrealizeObject(HGDIOBJ);
BOOL WINAPI UpdateColors(HDC); BOOL WINAPI UpdateColors(HDC);
BOOL WINAPI UpdateICMRegKeyA(DWORD,LPSTR,LPSTR,UINT);
BOOL WINAPI UpdateICMRegKeyW(DWORD,LPWSTR,LPWSTR,UINT);
#define UpdateICMRegKey WINELIB_NAME_AW(UpdateICMRegKey)
BOOL WINAPI WidenPath(HDC); BOOL WINAPI WidenPath(HDC);
BOOL WINAPI PolyTextOutA(HDC,PPOLYTEXTA,INT); BOOL WINAPI PolyTextOutA(HDC,PPOLYTEXTA,INT);
BOOL WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT); BOOL WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment