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
81e9b43f
Commit
81e9b43f
authored
Mar 05, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move GetICMProfile to the driver.
parent
459b92a0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
40 deletions
+71
-40
driver.c
dlls/gdi32/driver.c
+1
-0
init.c
dlls/gdi32/enhmfdrv/init.c
+1
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
icm.c
dlls/gdi32/icm.c
+9
-40
init.c
dlls/gdi32/mfdrv/init.c
+1
-0
graphics.c
dlls/winex11.drv/graphics.c
+57
-0
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-0
No files found.
dlls/gdi32/driver.c
View file @
81e9b43f
...
...
@@ -116,6 +116,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
GetDIBits
);
GET_FUNC
(
GetDeviceCaps
);
GET_FUNC
(
GetDeviceGammaRamp
);
GET_FUNC
(
GetICMProfile
);
GET_FUNC
(
GetNearestColor
);
GET_FUNC
(
GetPixel
);
GET_FUNC
(
GetPixelFormat
);
...
...
dlls/gdi32/enhmfdrv/init.c
View file @
81e9b43f
...
...
@@ -75,6 +75,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL
,
/* pGetDIBits */
EMFDRV_GetDeviceCaps
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetPixel */
NULL
,
/* pGetPixelFormat */
...
...
dlls/gdi32/gdi_private.h
View file @
81e9b43f
...
...
@@ -140,6 +140,7 @@ typedef struct tagDC_FUNCS
INT
(
*
pGetDIBits
)(
PHYSDEV
,
HBITMAP
,
UINT
,
UINT
,
LPVOID
,
BITMAPINFO
*
,
UINT
);
INT
(
*
pGetDeviceCaps
)(
PHYSDEV
,
INT
);
BOOL
(
*
pGetDeviceGammaRamp
)(
PHYSDEV
,
LPVOID
);
BOOL
(
*
pGetICMProfile
)(
PHYSDEV
,
LPDWORD
,
LPWSTR
);
COLORREF
(
*
pGetNearestColor
)(
PHYSDEV
,
COLORREF
);
COLORREF
(
*
pGetPixel
)(
PHYSDEV
,
INT
,
INT
);
INT
(
*
pGetPixelFormat
)(
PHYSDEV
);
...
...
dlls/gdi32/icm.c
View file @
81e9b43f
...
...
@@ -30,6 +30,8 @@
#include "winnls.h"
#include "winreg.h"
#include "gdi_private.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -97,51 +99,18 @@ BOOL WINAPI GetICMProfileA(HDC hdc, LPDWORD size, LPSTR filename)
*/
BOOL
WINAPI
GetICMProfileW
(
HDC
hdc
,
LPDWORD
size
,
LPWSTR
filename
)
{
HKEY
hkey
;
DWORD
required
;
WCHAR
profile
[
MAX_PATH
],
fullname
[
MAX_PATH
];
static
const
WCHAR
path
[]
=
{
'\\'
,
's'
,
'p'
,
'o'
,
'o'
,
'l'
,
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
'\\'
,
0
};
static
const
WCHAR
srgb
[]
=
{
's'
,
'R'
,
'G'
,
'B'
,
' '
,
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
' '
,
'S'
,
'p'
,
'a'
,
'c'
,
'e'
,
' '
,
'P'
,
'r'
,
'o'
,
'f'
,
'i'
,
'l'
,
'e'
,
'.'
,
'i'
,
'c'
,
'm'
,
0
};
static
const
WCHAR
mntr
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'C'
,
'M'
,
'\\'
,
'm'
,
'n'
,
't'
,
'r'
,
0
};
BOOL
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
TRACE
(
"%p, %p, %p
\n
"
,
hdc
,
size
,
filename
);
if
(
!
hdc
||
!
size
)
return
FALSE
;
strcpyW
(
profile
,
srgb
);
if
(
!
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
mntr
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
))
{
DWORD
size
=
sizeof
(
profile
)
/
sizeof
(
WCHAR
);
/* FIXME handle multiple values */
RegEnumValueW
(
hkey
,
0
,
profile
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
);
RegCloseKey
(
hkey
);
}
GetSystemDirectoryW
(
fullname
,
MAX_PATH
);
strcatW
(
fullname
,
path
);
strcatW
(
fullname
,
profile
);
required
=
strlenW
(
fullname
)
+
1
;
if
(
*
size
<
required
)
{
*
size
=
required
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
if
(
filename
)
if
(
dc
)
{
strcpyW
(
filename
,
fullname
);
if
(
GetFileAttributesW
(
filename
)
==
INVALID_FILE_ATTRIBUTES
)
WARN
(
"color profile not found
\n
"
);
if
(
dc
->
funcs
->
pGetICMProfile
)
ret
=
dc
->
funcs
->
pGetICMProfile
(
dc
->
physDev
,
size
,
filename
);
release_dc_ptr
(
dc
);
}
*
size
=
required
;
return
TRUE
;
return
ret
;
}
/**********************************************************************
...
...
dlls/gdi32/mfdrv/init.c
View file @
81e9b43f
...
...
@@ -75,6 +75,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL
,
/* pGetDIBits */
MFDRV_GetDeviceCaps
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetNearestColor */
NULL
,
/* pGetPixel */
NULL
,
/* pGetPixelFormat */
...
...
dlls/winex11.drv/graphics.c
View file @
81e9b43f
...
...
@@ -25,6 +25,7 @@
#include "config.h"
#include <stdarg.h>
#include <math.h>
#ifdef HAVE_FLOAT_H
# include <float.h>
...
...
@@ -35,9 +36,14 @@
#endif
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "x11drv.h"
#include "x11font.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
graphics
);
...
...
@@ -1374,3 +1380,54 @@ DWORD X11DRV_SetDCOrg( X11DRV_PDEVICE *physDev, INT x, INT y )
physDev
->
dc_rect
.
top
=
y
-
physDev
->
drawable_rect
.
top
;
return
ret
;
}
/***********************************************************************
* GetICMProfile (X11DRV.@)
*/
BOOL
X11DRV_GetICMProfile
(
X11DRV_PDEVICE
*
physDev
,
LPDWORD
size
,
LPWSTR
filename
)
{
static
const
WCHAR
path
[]
=
{
'\\'
,
's'
,
'p'
,
'o'
,
'o'
,
'l'
,
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
'c'
,
'o'
,
'l'
,
'o'
,
'r'
,
'\\'
,
0
};
static
const
WCHAR
srgb
[]
=
{
's'
,
'R'
,
'G'
,
'B'
,
' '
,
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
' '
,
'S'
,
'p'
,
'a'
,
'c'
,
'e'
,
' '
,
'P'
,
'r'
,
'o'
,
'f'
,
'i'
,
'l'
,
'e'
,
'.'
,
'i'
,
'c'
,
'm'
,
0
};
static
const
WCHAR
mntr
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'C'
,
'M'
,
'\\'
,
'm'
,
'n'
,
't'
,
'r'
,
0
};
HKEY
hkey
;
DWORD
required
;
WCHAR
profile
[
MAX_PATH
],
fullname
[
MAX_PATH
];
if
(
!
size
)
return
FALSE
;
strcpyW
(
profile
,
srgb
);
if
(
!
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
mntr
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
))
{
DWORD
len
=
sizeof
(
profile
)
/
sizeof
(
WCHAR
);
/* FIXME handle multiple values */
RegEnumValueW
(
hkey
,
0
,
profile
,
&
len
,
NULL
,
NULL
,
NULL
,
NULL
);
RegCloseKey
(
hkey
);
}
GetSystemDirectoryW
(
fullname
,
MAX_PATH
);
strcatW
(
fullname
,
path
);
strcatW
(
fullname
,
profile
);
required
=
strlenW
(
fullname
)
+
1
;
if
(
*
size
<
required
)
{
*
size
=
required
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
if
(
filename
)
{
strcpyW
(
filename
,
fullname
);
if
(
GetFileAttributesW
(
filename
)
==
INVALID_FILE_ATTRIBUTES
)
WARN
(
"color profile not found
\n
"
);
}
*
size
=
required
;
return
TRUE
;
}
dlls/winex11.drv/winex11.drv.spec
View file @
81e9b43f
...
...
@@ -22,6 +22,7 @@
@ cdecl GetDIBits(ptr long long long ptr ptr long) X11DRV_GetDIBits
@ cdecl GetDeviceCaps(ptr long) X11DRV_GetDeviceCaps
@ cdecl GetDeviceGammaRamp(ptr ptr) X11DRV_GetDeviceGammaRamp
@ cdecl GetICMProfile(ptr ptr ptr) X11DRV_GetICMProfile
@ cdecl GetNearestColor(ptr long) X11DRV_GetNearestColor
@ cdecl GetPixel(ptr long long) X11DRV_GetPixel
@ cdecl GetPixelFormat(ptr) X11DRV_GetPixelFormat
...
...
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