Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1233834e
Commit
1233834e
authored
Nov 19, 2004
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement IsProfileValid.
Document all functions.
parent
e75f4920
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
13 deletions
+95
-13
mscms.spec
dlls/mscms/mscms.spec
+1
-1
profile.c
dlls/mscms/profile.c
+93
-10
icm.h
include/icm.h
+1
-2
No files found.
dlls/mscms/mscms.spec
View file @
1233834e
...
...
@@ -40,7 +40,7 @@
@ stub InternalGetPS2PreviewCRD
@ stub InternalSetDeviceConfig
@ stub IsColorProfileTagPresent
@ st
ub IsColorProfileValid
@ st
dcall IsColorProfileValid(ptr long)
@ stdcall OpenColorProfileA(ptr long long long)
@ stdcall OpenColorProfileW(ptr long long long)
@ stub RegisterCMMA
...
...
dlls/mscms/profile.c
View file @
1233834e
...
...
@@ -46,6 +46,11 @@ static void MSCMS_basename( LPCWSTR path, LPWSTR name )
WINE_DEFAULT_DEBUG_CHANNEL
(
mscms
);
/******************************************************************************
* GetColorDirectoryA [MSCMS.@]
*
* See GetColorDirectoryW.
*/
BOOL
WINAPI
GetColorDirectoryA
(
PCSTR
machine
,
PSTR
buffer
,
PDWORD
size
)
{
INT
len
;
...
...
@@ -75,6 +80,18 @@ BOOL WINAPI GetColorDirectoryA( PCSTR machine, PSTR buffer, PDWORD size )
return
ret
;
}
/******************************************************************************
* GetColorDirectoryW [MSCMS.@]
*
* Get the directory where color profiles are stored.
*
* PARAMS
* machine [I] Name of the machine for which to get the color directory.
* Must be NULL, which indicates the local machine.
* buffer [I] Buffer to recieve the path name in.
* size [I/O] Size of the buffer in bytes. On return the variable holds
* the number of bytes actually needed.
*/
BOOL
WINAPI
GetColorDirectoryW
(
PCWSTR
machine
,
PWSTR
buffer
,
PDWORD
size
)
{
/* FIXME: Get this directory from the registry? */
...
...
@@ -100,6 +117,11 @@ BOOL WINAPI GetColorDirectoryW( PCWSTR machine, PWSTR buffer, PDWORD size )
return
FALSE
;
}
/******************************************************************************
* InstallColorProfileA [MSCMS.@]
*
* See InstallColorProfileW.
*/
BOOL
WINAPI
InstallColorProfileA
(
PCSTR
machine
,
PCSTR
profile
)
{
UINT
len
;
...
...
@@ -123,6 +145,20 @@ BOOL WINAPI InstallColorProfileA( PCSTR machine, PCSTR profile )
return
ret
;
}
/******************************************************************************
* InstallColorProfileW [MSCMS.@]
*
* Install a color profile.
*
* PARAMS
* machine [I] Name of the machine to install the profile on. Must be NULL,
* which indicates the local machine.
* profile [I] Full path name of the profile to install.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
InstallColorProfileW
(
PCWSTR
machine
,
PCWSTR
profile
)
{
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
...
...
@@ -146,13 +182,39 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
return
CopyFileW
(
profile
,
dest
,
TRUE
);
}
/******************************************************************************
* IsColorProfileValid [MSCMS.@]
*
* Determine if a given color profile is valid.
*
* PARAMS
* profile [I] Color profile handle.
* valid [O] Pointer to a BOOL variable. Set to TRUE if profile is valid,
* FALSE otherwise.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
IsColorProfileValid
(
HPROFILE
profile
,
PBOOL
valid
)
{
FIXME
(
"( %p, %p ) stub
\n
"
,
profile
,
valid
);
return
*
valid
=
TRUE
;
}
/******************************************************************************
* UninstallColorProfileA [MSCMS.@]
*
* See UninstallColorProfileW.
*/
BOOL
WINAPI
UninstallColorProfileA
(
PCSTR
machine
,
PCSTR
profile
,
BOOL
delete
)
{
UINT
len
;
LPWSTR
profileW
;
BOOL
ret
=
FALSE
;
TRACE
(
"( %s
)
\n
"
,
debugstr_a
(
profile
)
);
TRACE
(
"( %s
, %x )
\n
"
,
debugstr_a
(
profile
),
delete
);
if
(
machine
||
!
profile
)
return
FALSE
;
...
...
@@ -170,8 +232,25 @@ BOOL WINAPI UninstallColorProfileA( PCSTR machine, PCSTR profile, BOOL delete )
return
ret
;
}
/******************************************************************************
* UninstallColorProfileW [MSCMS.@]
*
* Uninstall a color profile.
*
* PARAMS
* machine [I] Name of the machine to uninstall the profile on. Must be NULL,
* which indicates the local machine.
* profile [I] Full path name of the profile to uninstall.
* delete [I] Bool that specifies whether the profile file should be deleted.
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL
WINAPI
UninstallColorProfileW
(
PCWSTR
machine
,
PCWSTR
profile
,
BOOL
delete
)
{
TRACE
(
"( %s, %x )
\n
"
,
debugstr_w
(
profile
),
delete
);
if
(
machine
||
!
profile
)
return
FALSE
;
if
(
delete
)
...
...
@@ -180,6 +259,11 @@ BOOL WINAPI UninstallColorProfileW( PCWSTR machine, PCWSTR profile, BOOL delete
return
TRUE
;
}
/******************************************************************************
* OpenColorProfileA [MSCMS.@]
*
* See OpenColorProfileW.
*/
HPROFILE
WINAPI
OpenColorProfileA
(
PPROFILE
profile
,
DWORD
access
,
DWORD
sharing
,
DWORD
creation
)
{
HPROFILE
handle
=
NULL
;
...
...
@@ -220,22 +304,21 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing
* Open a color profile.
*
* PARAMS
* profile [I] Pointer to a color profile structure
* access [I] Desired access
* sharing [I] Sharing mode
* creation [I] Creation mode
* profile [I] Pointer to a color profile structure
.
* access [I] Desired access
.
* sharing [I] Sharing mode
.
* creation [I] Creation mode
.
*
* RETURNS
* Success: Handle to the opened profile
* Success: Handle to the opened profile
.
* Failure: NULL
*
* NOTES
* Values for access: PROFILE_READ or PROFILE_READWRITE
* Values for sharing: 0 (no sharing), FILE_SHARE_READ and/or FILE_SHARE_WRITE
* Values for access: PROFILE_READ or PROFILE_READWRITE
.
* Values for sharing: 0 (no sharing), FILE_SHARE_READ and/or FILE_SHARE_WRITE
.
* Values for creation: one of CREATE_NEW, CREATE_ALWAYS, OPEN_EXISTING,
* OPEN_ALWAYS, TRUNCATE_EXISTING.
*/
HPROFILE
WINAPI
OpenColorProfileW
(
PPROFILE
profile
,
DWORD
access
,
DWORD
sharing
,
DWORD
creation
)
{
#ifdef HAVE_LCMS_H
...
...
@@ -287,7 +370,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
* Close a color profile.
*
* PARAMS
* profile
[I] Handle to the profile
* profile
[I] Handle to the profile.
*
* RETURNS
* Success: TRUE
...
...
include/icm.h
View file @
1233834e
...
...
@@ -154,7 +154,6 @@ typedef struct _tagCOLORMATCHSETUPW
LPARAM
lParamApplyCallback
;
}
COLORMATCHSETUPW
,
*
PCOLORMATCHSETUPW
,
*
LPCOLORMATCHSETUPW
;
BOOL
WINAPI
CloseColorProfile
(
HPROFILE
);
BOOL
WINAPI
GetColorDirectoryA
(
PCSTR
,
PSTR
,
PDWORD
);
BOOL
WINAPI
GetColorDirectoryW
(
PCWSTR
,
PWSTR
,
PDWORD
);
...
...
@@ -162,6 +161,7 @@ BOOL WINAPI GetColorDirectoryW(PCWSTR,PWSTR,PDWORD);
BOOL
WINAPI
InstallColorProfileA
(
PCSTR
,
PCSTR
);
BOOL
WINAPI
InstallColorProfileW
(
PCWSTR
,
PCWSTR
);
#define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
BOOL
WINAPI
IsColorProfileValid
(
HPROFILE
,
PBOOL
);
HPROFILE
WINAPI
OpenColorProfileA
(
PPROFILE
,
DWORD
,
DWORD
,
DWORD
);
HPROFILE
WINAPI
OpenColorProfileW
(
PPROFILE
,
DWORD
,
DWORD
,
DWORD
);
#define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
...
...
@@ -172,7 +172,6 @@ BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
BOOL
WINAPI
UninstallColorProfileW
(
PCWSTR
,
PCWSTR
,
BOOL
);
#define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
#define PROFILE_FILENAME 1
#define PROFILE_MEMBUFFER 2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment