23#include "wine/unicode.h"
42 while (
i > 0 &&
path[
i - 1] !=
'\\' &&
path[
i - 1] !=
'/')
i--;
61 (
char)(
tag >> 24), (
char)(
tag >> 16), (
char)(
tag >> 8), (
char)(
tag) );
107 static const WCHAR fmtW[] = {
'%',
'c',
'%',
'c',
'%',
'c',
'%',
'c',0};
108 static const WCHAR icmW[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
109 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
110 'W',
'i',
'n',
'd',
'o',
'w',
's',
' ',
'N',
'T',
'\\',
111 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
116 HKEY icm_key, class_key;
156 static const BYTE dummy_value[12];
290 static const WCHAR colorsubdir[] =
291 {
'\\',
's',
'p',
'o',
'o',
'l',
'\\',
'd',
'r',
'i',
'v',
'e',
'r',
's',
'\\',
'c',
'o',
'l',
'o',
'r',0};
341 TRACE(
"( %p, 0x%08x, %d, %p, %p, %p )\n",
handle,
type,
offset,
size,
buffer,
ref );
385 cmsInt32Number num_tags;
397 num_tags = cmsGetTagCount(
profile->cmsprofile );
398 if (num_tags < 0 || index > num_tags ||
index < 1)
403 if ((sig = cmsGetTagSignature(
profile->cmsprofile,
index - 1 )))
526 cmsInt32Number num_tags;
537 if ((num_tags = cmsGetTagCount(
profile->cmsprofile )) >= 0)
617 static const WCHAR rgbprofilefile[] =
618 {
'\\',
's',
'r',
'g',
'b',
' ',
'c',
'o',
'l',
'o',
'r',
' ',
619 's',
'p',
'a',
'c',
'e',
' ',
'p',
'r',
'o',
'f',
'i',
'l',
'e',
'.',
'i',
'c',
'm',0 };
649 lstrcatW( rgbprofile, rgbprofilefile );
671 static const WCHAR slash[] = {
'\\',0};
681 WARN(
"Can't retrieve color directory\n" );
686 WARN(
"Filename too long\n" );
700 WARN(
"Can't open color profile\n" );
706 WARN(
"Can't retrieve color profile header\n" );
728 FIXME(
"ET_RESOLUTION: 0x%08x, 0x%08x\n",
782 TRACE(
"ET_ATTRIBUTES: 0x%08x, 0x%08x\n",
809 char spec[] =
"\\*.icm";
827 WARN(
"can't retrieve color directory\n" );
838 if (!profiles)
goto exit;
888 profiles,
sizeof(
char *) * (
count + 1) );
961 static const WCHAR spec[] = {
'\\',
'*',
'i',
'c',
'm',0};
978 WARN(
"Can't retrieve color directory\n" );
989 if (!profiles)
goto exit;
1021 if (!tmp)
goto exit;
1022 else profiles = tmp;
1115 static const WCHAR slash[] = {
'\\', 0 };
1164 *present = (cmsIsTag(
profile->cmsprofile,
type ) != 0);
1341 if (!
in->pProfileData)
return FALSE;
1346 out->dwType =
in->dwType;
1399 cmsHPROFILE cmsprofile =
NULL;
1415 if (!(cmsprofile = cmsOpenProfileFromMem(
data,
profile->cbDataSize )))
1459 ERR(
"Unable to retrieve size of color profile\n" );
1465 ERR(
"Unable to allocate memory for color profile\n" );
1471 ERR(
"Unable to read color profile\n" );
1477 if (!(cmsprofile = cmsOpenProfileFromMem(
data,
size )))
1486 ERR(
"Invalid profile type %u\n",
profile->dwType );
1499 profile.cmsprofile = cmsprofile;
1501 if ((hprof = create_profile( &
profile )))
return hprof;
1503 cmsCloseProfile( cmsprofile );
1561 PROFILE cdmW, campW = {0}, gmmpW = {0};
1564 TRACE(
"%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp,
access,
sharing, creation,
flags );
1585 TRACE(
"%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp,
access,
sharing, creation,
flags );
1586 FIXME(
"no support for WCS profiles\n" );
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
#define ERROR_INSUFFICIENT_BUFFER
static const WCHAR deviceW[]
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
const char * wine_dbg_sprintf(const char *format,...)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
HANDLE WINAPI FindFirstFileA(IN LPCSTR lpFileName, OUT LPWIN32_FIND_DATAA lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindNextFileA(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAA lpFindFileData)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static BOOL set_profile_device_key(PCWSTR file, const BYTE *value, DWORD size)
BOOL WINAPI GetStandardColorSpaceProfileA(PCSTR machine, DWORD id, PSTR profile, PDWORD size)
HPROFILE WINAPI OpenColorProfileW(PPROFILE profile, DWORD access, DWORD sharing, DWORD creation)
BOOL WINAPI EnumColorProfilesA(PCSTR machine, PENUMTYPEA record, PBYTE buffer, PDWORD size, PDWORD number)
BOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR machine, PCSTR profile, PCSTR device)
HPROFILE WINAPI WcsOpenColorProfileA(PROFILE *cdm, PROFILE *camp, PROFILE *gmmp, DWORD access, DWORD sharing, DWORD creation, DWORD flags)
BOOL WINAPI GetColorProfileElementTag(HPROFILE handle, DWORD index, PTAGTYPE type)
HPROFILE WINAPI WcsOpenColorProfileW(PROFILE *cdm, PROFILE *camp, PROFILE *gmmp, DWORD access, DWORD sharing, DWORD creation, DWORD flags)
BOOL WINAPI UninstallColorProfileW(PCWSTR machine, PCWSTR profile, BOOL delete)
BOOL WINAPI WcsGetUsePerUserProfiles(const WCHAR *name, DWORD class, BOOL *use_per_user_profile)
BOOL WINAPI GetColorProfileFromHandle(HPROFILE handle, PBYTE buffer, PDWORD size)
BOOL WINAPI InstallColorProfileA(PCSTR machine, PCSTR profile)
BOOL WINAPI GetColorDirectoryA(PCSTR machine, PSTR buffer, PDWORD size)
static LPWSTR strdupW(LPCSTR str)
BOOL WINAPI IsColorProfileTagPresent(HPROFILE handle, TAGTYPE type, PBOOL present)
BOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR machine, PCSTR profile, PCSTR device)
static BOOL match_profile(PENUMTYPEW rec, PPROFILEHEADER hdr)
BOOL WINAPI SetColorProfileHeader(HPROFILE handle, PPROFILEHEADER header)
BOOL WINAPI UninstallColorProfileA(PCSTR machine, PCSTR profile, BOOL delete)
static BOOL header_from_file(LPCWSTR file, PPROFILEHEADER header)
BOOL WINAPI CloseColorProfile(HPROFILE profile)
BOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR machine, PCWSTR profile, PCWSTR device)
BOOL WINAPI GetColorProfileHeader(HPROFILE handle, PPROFILEHEADER header)
BOOL WINAPI IsColorProfileValid(HPROFILE handle, PBOOL valid)
BOOL WINAPI GetColorProfileElement(HPROFILE handle, TAGTYPE type, DWORD offset, PDWORD size, PVOID buffer, PBOOL ref)
BOOL WINAPI EnumColorProfilesW(PCWSTR machine, PENUMTYPEW record, PBYTE buffer, PDWORD size, PDWORD number)
BOOL WINAPI SetColorProfileElement(HPROFILE handle, TAGTYPE type, DWORD offset, PDWORD size, PVOID buffer)
static void basename(LPCWSTR path, LPWSTR name)
static BOOL profile_AtoW(const PROFILE *in, PROFILE *out)
HPROFILE WINAPI OpenColorProfileA(PPROFILE profile, DWORD access, DWORD sharing, DWORD creation)
const char * dbgstr_tag(DWORD tag)
BOOL WINAPI GetColorDirectoryW(PCWSTR machine, PWSTR buffer, PDWORD size)
BOOL WINAPI InstallColorProfileW(PCWSTR machine, PCWSTR profile)
BOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR machine, DWORD id, PWSTR profile, PDWORD size)
BOOL WINAPI WcsEnumColorProfilesSize(WCS_PROFILE_MANAGEMENT_SCOPE scope, ENUMTYPEW *record, DWORD *size)
BOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR machine, PCWSTR profile, PCWSTR device)
BOOL WINAPI GetCountColorProfileElements(HPROFILE handle, PDWORD count)
static const WCHAR sizeW[]
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
static const WCHAR fileW[]
char ** glob(const char *v)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLint GLboolean GLint GLenum access
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define ET_CONNECTIONSPACE
#define ET_DATACOLORSPACE
#define ENUM_TYPE_VERSION
WCS_PROFILE_MANAGEMENT_SCOPE
#define PROFILE_MEMBUFFER
#define ET_RENDERINGINTENT
#define PROFILE_READWRITE
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
static unsigned int number
static const char machine[]
static ULONG POBJECT_ATTRIBUTES PIO_STATUS_BLOCK ULONG sharing
#define PathAddBackslashW
static const WCHAR classW[]
DWORD WINAPI GetLastError(void)
#define INVALID_FILE_SIZE
#define ERROR_INVALID_PROFILE
#define LCS_WINDOWS_COLOR_SPACE
#define HKEY_LOCAL_MACHINE