Stub implementations for all documented functions.

This commit is contained in:
Hans Leidekker 2004-12-20 17:04:11 +00:00 committed by Alexandre Julliard
parent 74f458fcdf
commit c1cd989450
6 changed files with 459 additions and 33 deletions

View File

@ -9,7 +9,8 @@ C_SRCS = \
handle.c \
icc.c \
mscms_main.c \
profile.c
profile.c \
stub.c
RC_SRCS = version.rc

View File

@ -1,23 +1,23 @@
@ stub AssociateColorProfileWithDeviceA
@ stub AssociateColorProfileWithDeviceW
@ stub CheckBitmapBits
@ stub CheckColors
@ stdcall AssociateColorProfileWithDeviceA(ptr ptr ptr)
@ stdcall AssociateColorProfileWithDeviceW(ptr ptr ptr)
@ stdcall CheckBitmapBits(ptr ptr long long long ptr ptr ptr)
@ stdcall CheckColors(ptr ptr long long ptr)
@ stdcall CloseColorProfile(ptr)
@ stub ConvertColorNameToIndex
@ stub ConvertIndexToColorName
@ stub CreateColorTransformA
@ stub CreateColorTransformW
@ stub CreateDeviceLinkProfile
@ stub CreateMultiProfileTransform
@ stub CreateProfileFromLogColorSpaceA
@ stub CreateProfileFromLogColorSpaceW
@ stub DeleteColorTransform
@ stub DisassociateColorProfileFromDeviceA
@ stub DisassociateColorProfileFromDeviceW
@ stub EnumColorProfilesA
@ stub EnumColorProfilesW
@ stdcall ConvertColorNameToIndex(ptr ptr ptr long)
@ stdcall ConvertIndexToColorName(ptr ptr ptr long)
@ stdcall CreateColorTransformA(ptr ptr ptr long)
@ stdcall CreateColorTransformW(ptr ptr ptr long)
@ stdcall CreateDeviceLinkProfile(ptr long ptr long long ptr long)
@ stdcall CreateMultiProfileTransform(ptr long ptr long long long)
@ stdcall CreateProfileFromLogColorSpaceA(ptr ptr)
@ stdcall CreateProfileFromLogColorSpaceW(ptr ptr)
@ stdcall DeleteColorTransform(ptr)
@ stdcall DisassociateColorProfileFromDeviceA(ptr ptr ptr)
@ stdcall DisassociateColorProfileFromDeviceW(ptr ptr ptr)
@ stdcall EnumColorProfilesA(ptr ptr ptr ptr ptr)
@ stdcall EnumColorProfilesW(ptr ptr ptr ptr ptr)
@ stub GenerateCopyFilePaths
@ stub GetCMMInfo
@ stdcall GetCMMInfo(ptr long)
@ stdcall GetColorDirectoryA(ptr ptr long)
@ stdcall GetColorDirectoryW(ptr ptr long)
@ stdcall GetColorProfileElement(ptr long long ptr ptr ptr)
@ -25,10 +25,10 @@
@ stdcall GetColorProfileFromHandle(ptr ptr ptr)
@ stdcall GetColorProfileHeader(ptr ptr)
@ stdcall GetCountColorProfileElements(ptr long)
@ stub GetNamedProfileInfo
@ stub GetPS2ColorRenderingDictionary
@ stub GetPS2ColorRenderingIntent
@ stub GetPS2ColorSpaceArray
@ stdcall GetNamedProfileInfo(ptr ptr)
@ stdcall GetPS2ColorRenderingDictionary(ptr long ptr ptr ptr)
@ stdcall GetPS2ColorRenderingIntent(ptr long ptr ptr)
@ stdcall GetPS2ColorSpaceArray(ptr long long ptr ptr ptr)
@ stdcall GetStandardColorSpaceProfileA(ptr long ptr ptr)
@ stdcall GetStandardColorSpaceProfileW(ptr long ptr ptr)
@ stdcall InstallColorProfileA(ptr ptr)
@ -43,19 +43,19 @@
@ stdcall IsColorProfileValid(ptr long)
@ stdcall OpenColorProfileA(ptr long long long)
@ stdcall OpenColorProfileW(ptr long long long)
@ stub RegisterCMMA
@ stub RegisterCMMW
@ stub SelectCMM
@ stdcall RegisterCMMA(ptr long ptr)
@ stdcall RegisterCMMW(ptr long ptr)
@ stdcall SelectCMM(long)
@ stdcall SetColorProfileElement(ptr long long ptr ptr)
@ stub SetColorProfileElementReference
@ stub SetColorProfileElementSize
@ stdcall SetColorProfileElementReference(ptr long long)
@ stdcall SetColorProfileElementSize(ptr long long)
@ stdcall SetColorProfileHeader(ptr ptr)
@ stdcall SetStandardColorSpaceProfileA(ptr long ptr)
@ stdcall SetStandardColorSpaceProfileW(ptr long ptr)
@ stub SpoolerCopyFileEvent
@ stub TranslateBitmapBits
@ stub TranslateColors
@ stdcall TranslateBitmapBits(ptr ptr long long long long ptr long long ptr long)
@ stdcall TranslateColors(ptr ptr long long ptr long)
@ stdcall UninstallColorProfileA(ptr ptr long)
@ stdcall UninstallColorProfileW(ptr ptr long)
@ stub UnregisterCMMA
@ stub UnregisterCMMW
@ stdcall UnregisterCMMA(ptr long)
@ stdcall UnregisterCMMW(ptr long)

View File

@ -269,6 +269,8 @@ BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD si
/* No endian conversion needed */
memcpy( buffer, iccprofile, header.phSize );
*size = header.phSize;
ret = TRUE;
#endif /* HAVE_LCMS_H */

270
dlls/mscms/stub.c Normal file
View File

@ -0,0 +1,270 @@
/*
* MSCMS - Color Management System for Wine
*
* Copyright 2004 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "icm.h"
WINE_DEFAULT_DEBUG_CHANNEL(mscms);
BOOL WINAPI AssociateColorProfileWithDeviceA( PCSTR machine, PCSTR profile, PCSTR device )
{
FIXME( "( %p, %p, %p ) stub\n", machine, profile, device );
return TRUE;
}
BOOL WINAPI AssociateColorProfileWithDeviceW( PCWSTR machine, PCWSTR profile, PCWSTR device )
{
FIXME( "( %p, %p, %p ) stub\n", machine, profile, device );
return TRUE;
}
BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT format, DWORD width,
DWORD height, DWORD stride, PBYTE result, PBMCALLBACKFN callback,
LPARAM data )
{
FIXME( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, %p, 0x%08lx ) stub\n",
transform, srcbits, format, width, height, stride, result, callback, data );
return FALSE;
}
BOOL WINAPI CheckColors( HTRANSFORM transform, PCOLOR colors, DWORD number, COLORTYPE type,
PBYTE result )
{
FIXME( "( %p, %p, 0x%08lx, 0x%08x, %p ) stub\n", transform, colors, number, type, result );
return FALSE;
}
BOOL WINAPI ConvertColorNameToIndex( HPROFILE profile, PCOLOR_NAME name, PDWORD index, DWORD count )
{
FIXME( "( %p, %p, %p, 0x%08lx ) stub\n", profile, name, index, count );
return FALSE;
}
BOOL WINAPI ConvertIndexToColorName( HPROFILE profile, PDWORD index, PCOLOR_NAME name, DWORD count )
{
FIXME( "( %p, %p, %p, 0x%08lx ) stub\n", profile, index, name, count );
return FALSE;
}
HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest, HPROFILE target,
DWORD flags )
{
FIXME( "( %p, %p, %p, 0x%08lx ) stub\n", space, dest, target, flags );
return NULL;
}
HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, HPROFILE target,
DWORD flags )
{
FIXME( "( %p, %p, %p, 0x%08lx ) stub\n", space, dest, target, flags );
return NULL;
}
BOOL WINAPI CreateDeviceLinkProfile( PHPROFILE profiles, DWORD nprofiles, PDWORD intents,
DWORD nintents, DWORD flags, PBYTE *data, DWORD index )
{
FIXME( "( %p, 0x%08lx, %p, 0x%08lx, 0x%08lx, %p, 0x%08lx ) stub\n",
profiles, nprofiles, intents, nintents, flags, data, index );
return FALSE;
}
HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofiles, PDWORD intents,
DWORD nintents, DWORD flags, DWORD index )
{
FIXME( "( %p, 0x%08lx, %p, 0x%08lx, 0x%08lx, 0x%08lx ) stub\n",
profiles, nprofiles, intents, nintents, flags, index );
return NULL;
}
BOOL WINAPI CreateProfileFromLogColorSpaceA( LPLOGCOLORSPACEA space, PBYTE *buffer )
{
FIXME( "( %p, %p ) stub\n", space, buffer );
return FALSE;
}
BOOL WINAPI CreateProfileFromLogColorSpaceW( LPLOGCOLORSPACEW space, PBYTE *buffer )
{
FIXME( "( %p, %p ) stub\n", space, buffer );
return FALSE;
}
BOOL WINAPI DeleteColorTransform( HTRANSFORM transform )
{
FIXME( "( %p ) stub\n", transform );
return TRUE;
}
BOOL WINAPI DisassociateColorProfileFromDeviceA( PCSTR machine, PCSTR profile, PCSTR device )
{
FIXME( "( %p, %p, %p ) stub\n", machine, profile, device );
return TRUE;
}
BOOL WINAPI DisassociateColorProfileFromDeviceW( PCWSTR machine, PCWSTR profile, PCWSTR device )
{
FIXME( "( %p, %p, %p ) stub\n", machine, profile, device );
return TRUE;
}
BOOL WINAPI EnumColorProfilesA( PCSTR machine, PENUMTYPEA record, PBYTE buffer, PDWORD size,
PDWORD number )
{
FIXME( "( %p, %p, %p, %p, %p ) stub\n", machine, record, buffer, size, number );
return FALSE;
}
BOOL WINAPI EnumColorProfilesW( PCWSTR machine, PENUMTYPEW record, PBYTE buffer, PDWORD size,
PDWORD number )
{
FIXME( "( %p, %p, %p, %p, %p ) stub\n", machine, record, buffer, size, number );
return FALSE;
}
DWORD WINAPI GetCMMInfo( HTRANSFORM transform, DWORD info )
{
FIXME( "( %p, 0x%08lx ) stub\n", transform, info );
return 0;
}
BOOL WINAPI GetNamedProfileInfo( HPROFILE profile, PNAMED_PROFILE_INFO info )
{
FIXME( "( %p, %p ) stub\n", profile, info );
return FALSE;
}
BOOL WINAPI GetPS2ColorRenderingDictionary( HPROFILE profile, DWORD intent, PBYTE buffer,
PDWORD size, PBOOL binary )
{
FIXME( "( %p, 0x%08lx, %p, %p, %p ) stub\n", profile, intent, buffer, size, binary );
return FALSE;
}
BOOL WINAPI GetPS2ColorRenderingIntent( HPROFILE profile, DWORD intent, PBYTE buffer, PDWORD size )
{
FIXME( "( %p, 0x%08lx, %p, %p ) stub\n", profile, intent, buffer, size );
return FALSE;
}
BOOL WINAPI GetPS2ColorSpaceArray( HPROFILE profile, DWORD intent, DWORD type, PBYTE buffer,
PDWORD size, PBOOL binary )
{
FIXME( "( %p, 0x%08lx, 0x%08lx, %p, %p, %p ) stub\n", profile, intent, type, buffer, size, binary );
return FALSE;
}
BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll )
{
FIXME( "( %p, 0x%08lx, %p ) stub\n", machine, id, dll );
return TRUE;
}
BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll )
{
FIXME( "( %p, 0x%08lx, %p ) stub\n", machine, id, dll );
return TRUE;
}
BOOL WINAPI SelectCMM( DWORD id )
{
FIXME( "( 0x%08lx ) stub\n", id );
return TRUE;
}
BOOL WINAPI SetColorProfileElementReference( HPROFILE profile, TAGTYPE type, TAGTYPE ref )
{
FIXME( "( %p, 0x%08lx, 0x%08lx ) stub\n", profile, type, ref );
return TRUE;
}
BOOL WINAPI SetColorProfileElementSize( HPROFILE profile, TAGTYPE type, DWORD size )
{
FIXME( "( %p, 0x%08lx, 0x%08lx ) stub\n", profile, type, size );
return FALSE;
}
BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT input,
DWORD width, DWORD height, DWORD inputstride, PVOID destbits,
BMFORMAT output, DWORD outputstride, PBMCALLBACKFN callback,
ULONG data )
{
FIXME( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, 0x%08x, 0x%08lx, %p, 0x%08lx ) stub\n",
transform, srcbits, input, width, height, inputstride, destbits, output, outputstride,
callback, data );
return FALSE;
}
BOOL WINAPI TranslateColors( HTRANSFORM transform, PCOLOR inputcolors, DWORD number,
COLORTYPE input, PCOLOR outputcolors, COLORTYPE output )
{
FIXME( "( %p, %p, 0x%08lx, 0x%08x, %p, 0x%08x ) stub\n", transform, inputcolors,
number, input, outputcolors, output );
return FALSE;
}
BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id )
{
FIXME( "( %p, 0x%08lx ) stub\n", machine, id );
return TRUE;
}
BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id )
{
FIXME( "( %p, 0x%08lx ) stub\n", machine, id );
return TRUE;
}

View File

@ -33,7 +33,7 @@ static const char machine[] = "dummy";
static const WCHAR machineW[] = { 'd','u','m','m','y',0 };
/* To do any real functionality testing with this suite you need a copy of
* the freely distributable standard RGB color space profile. It's comes
* the freely distributable standard RGB color space profile. It comes
* standard with Windows, but on Wine you probably need to install it yourself
* in one of the locations mentioned below. Here's a link to the profile in
* a self extracting zip file:

View File

@ -29,6 +29,112 @@ typedef HANDLE HTRANSFORM;
typedef DWORD TAGTYPE, *PTAGTYPE, *LPTAGTYPE;
typedef char COLOR_NAME[32];
typedef COLOR_NAME *PCOLOR_NAME, *LPCOLOR_NAME;
typedef struct tagNAMED_PROFILE_INFO
{
DWORD dwFlags;
DWORD dwCount;
DWORD dwCountDevCoordinates;
COLOR_NAME szPrefix;
COLOR_NAME szSuffix;
} NAMED_PROFILE_INFO, *PNAMED_PROFILE_INFO, *LPNAMED_PROFILE_INFO;
#define MAX_COLOR_CHANNELS 8
struct GRAYCOLOR
{
WORD gray;
};
struct RGBCOLOR
{
WORD red;
WORD green;
WORD blue;
};
struct CMYKCOLOR
{
WORD cyan;
WORD magenta;
WORD yellow;
WORD black;
};
struct XYZCOLOR
{
WORD X;
WORD Y;
WORD Z;
};
struct YxyCOLOR
{
WORD Y;
WORD x;
WORD y;
};
struct LabCOLOR
{
WORD L;
WORD a;
WORD b;
};
struct GENERIC3CHANNEL
{
WORD ch1;
WORD ch2;
WORD ch3;
};
struct NAMEDCOLOR
{
DWORD dwIndex;
};
struct HiFiCOLOR
{
BYTE channel[MAX_COLOR_CHANNELS];
};
typedef union tagCOLOR
{
struct GRAYCOLOR gray;
struct RGBCOLOR rgb;
struct CMYKCOLOR cmyk;
struct XYZCOLOR XYZ;
struct YxyCOLOR Yxy;
struct LabCOLOR Lab;
struct GENERIC3CHANNEL gen3ch;
struct NAMEDCOLOR named;
struct HiFiCOLOR hifi;
struct
{
DWORD reserved1;
VOID *reserved2;
} DUMMYSTRUCTNAME;
} COLOR, *PCOLOR, *LPCOLOR;
typedef enum
{
COLOR_GRAY = 1,
COLOR_RGB,
COLOR_XYZ,
COLOR_Yxy,
COLOR_Lab,
COLOR_3_CHANNEL,
COLOR_CMYK,
COLOR_5_CHANNEL,
COLOR_6_CHANNEL,
COLOR_7_CHANNEL,
COLOR_8_CHANNEL,
COLOR_NAMED,
} COLORTYPE, *PCOLORTYPE, *LPCOLORTYPE;
typedef enum
{
BM_x555RGB = 0x00,
@ -101,6 +207,53 @@ typedef struct tagPROFILE
DWORD cbDataSize;
} PROFILE, *PPROFILE, *LPPROFILE;
typedef struct tagENUMTYPEA
{
DWORD dwSize;
DWORD dwVersion;
DWORD dwFields;
PCSTR pDeviceName;
DWORD dwMediaType;
DWORD dwDitheringMode;
DWORD dwResolution[2];
DWORD dwCMMType;
DWORD dwClass;
DWORD dwDataColorSpace;
DWORD dwConnectionSpace;
DWORD dwSignature;
DWORD dwPlatform;
DWORD dwProfileFlags;
DWORD dwManufacturer;
DWORD dwModel;
DWORD dwAttributes[2];
DWORD dwRenderingIntent;
DWORD dwCreator;
DWORD dwDeviceClass;
} ENUMTYPEA, *PENUMTYPEA, *LPENUMTYPEA;
typedef struct tagENUMTYPEW
{
DWORD dwSize;
DWORD dwVersion;
DWORD dwFields;
PCWSTR pDeviceName;
DWORD dwMediaType;
DWORD dwDitheringMode;
DWORD dwResolution[2];
DWORD dwCMMType;
DWORD dwClass;
DWORD dwDataColorSpace;
DWORD dwConnectionSpace;
DWORD dwSignature;
DWORD dwPlatform;
DWORD dwProfileFlags;
DWORD dwManufacturer;
DWORD dwModel;
DWORD dwAttributes[2];
DWORD dwRenderingIntent;
DWORD dwCreator;
DWORD dwDeviceClass;
} ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW;
struct _tagCOLORMATCHSETUPA;
struct _tagCOLORMATCHSETUPW;