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
0c33f1dd
Commit
0c33f1dd
authored
Mar 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add null driver entry points for the color management functions.
parent
806d0c4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
48 deletions
+39
-48
dc.c
dlls/gdi32/dc.c
+4
-4
driver.c
dlls/gdi32/driver.c
+24
-4
icm.c
dlls/gdi32/icm.c
+11
-40
No files found.
dlls/gdi32/dc.c
View file @
0c33f1dd
...
...
@@ -1509,8 +1509,8 @@ BOOL WINAPI GetDeviceGammaRamp(HDC hDC, LPVOID ptr)
if
(
dc
)
{
if
(
dc
->
funcs
->
pGetDeviceGammaRamp
)
ret
=
dc
->
funcs
->
pGetDeviceGammaRamp
(
dc
->
physDev
,
ptr
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetDeviceGammaRamp
);
ret
=
physdev
->
funcs
->
pGetDeviceGammaRamp
(
physdev
,
ptr
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
@@ -1526,8 +1526,8 @@ BOOL WINAPI SetDeviceGammaRamp(HDC hDC, LPVOID ptr)
if
(
dc
)
{
if
(
dc
->
funcs
->
pSetDeviceGammaRamp
)
ret
=
dc
->
funcs
->
pSetDeviceGammaRamp
(
dc
->
physDev
,
ptr
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSetDeviceGammaRamp
);
ret
=
physdev
->
funcs
->
pSetDeviceGammaRamp
(
physdev
,
ptr
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
dlls/gdi32/driver.c
View file @
0c33f1dd
...
...
@@ -366,6 +366,11 @@ static INT CDECL nulldrv_EndPage( PHYSDEV dev )
return
0
;
}
static
INT
CDECL
nulldrv_EnumICMProfiles
(
PHYSDEV
dev
,
ICMENUMPROCW
func
,
LPARAM
lparam
)
{
return
-
1
;
}
static
INT
CDECL
nulldrv_ExtDeviceMode
(
LPSTR
buffer
,
HWND
hwnd
,
DEVMODEA
*
output
,
LPSTR
device
,
LPSTR
port
,
DEVMODEA
*
input
,
LPSTR
profile
,
DWORD
mode
)
{
...
...
@@ -388,6 +393,16 @@ static BOOL CDECL nulldrv_GdiComment( PHYSDEV dev, UINT size, const BYTE *data )
return
FALSE
;
}
static
BOOL
CDECL
nulldrv_GetDeviceGammaRamp
(
PHYSDEV
dev
,
void
*
ramp
)
{
return
FALSE
;
}
static
BOOL
CDECL
nulldrv_GetICMProfile
(
PHYSDEV
dev
,
LPDWORD
size
,
LPWSTR
filename
)
{
return
FALSE
;
}
static
COLORREF
CDECL
nulldrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
{
return
0
;
...
...
@@ -511,6 +526,11 @@ static DWORD CDECL nulldrv_SetLayout( PHYSDEV dev, DWORD layout )
return
layout
;
}
static
BOOL
CDECL
nulldrv_SetDeviceGammaRamp
(
PHYSDEV
dev
,
void
*
ramp
)
{
return
FALSE
;
}
static
DWORD
CDECL
nulldrv_SetMapperFlags
(
PHYSDEV
dev
,
DWORD
flags
)
{
return
flags
;
...
...
@@ -667,7 +687,7 @@ const DC_FUNCTIONS null_driver =
nulldrv_EndDoc
,
/* pEndDoc */
nulldrv_EndPage
,
/* pEndPage */
NULL
,
/* pEndPath */
NULL
,
/* pEnumICMProfiles */
nulldrv_EnumICMProfiles
,
/* pEnumICMProfiles */
NULL
,
/* pEnumDeviceFonts */
nulldrv_ExcludeClipRect
,
/* pExcludeClipRect */
nulldrv_ExtDeviceMode
,
/* pExtDeviceMode */
...
...
@@ -684,8 +704,8 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pGetCharWidth */
NULL
,
/* pGetDIBits */
NULL
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetICMProfile */
nulldrv_GetDeviceGammaRamp
,
/* pGetDeviceGammaRamp */
nulldrv_GetICMProfile
,
/* pGetICMProfile */
NULL
,
/* pGetNearestColor */
nulldrv_GetPixel
,
/* pGetPixel */
nulldrv_GetPixelFormat
,
/* pGetPixelFormat */
...
...
@@ -736,7 +756,7 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pSetDIBits */
NULL
,
/* pSetDIBitsToDevice */
nulldrv_SetDeviceClipping
,
/* pSetDeviceClipping */
NULL
,
/* pSetDeviceGammaRamp */
nulldrv_SetDeviceGammaRamp
,
/* pSetDeviceGammaRamp */
nulldrv_SetLayout
,
/* pSetLayout */
nulldrv_SetMapMode
,
/* pSetMapMode */
nulldrv_SetMapperFlags
,
/* pSetMapperFlags */
...
...
dlls/gdi32/icm.c
View file @
0c33f1dd
...
...
@@ -40,30 +40,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(icm);
struct
enum_profiles
{
BOOL
unicode
;
union
{
ICMENUMPROCA
funcA
;
ICMENUMPROCW
funcW
;
}
callback
;
ICMENUMPROCA
funcA
;
LPARAM
data
;
};
INT
CALLBACK
enum_profiles_callback
(
LPWSTR
filename
,
LPARAM
lparam
)
static
INT
CALLBACK
enum_profiles_callbackA
(
LPWSTR
filename
,
LPARAM
lparam
)
{
int
len
,
ret
=
-
1
;
struct
enum_profiles
*
ep
=
(
struct
enum_profiles
*
)
lparam
;
char
*
filenameA
;
if
(
ep
->
unicode
)
return
ep
->
callback
.
funcW
(
filename
,
ep
->
data
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
filenameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
filenameA
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameA
,
len
,
NULL
,
NULL
);
ret
=
ep
->
callback
.
funcA
(
filenameA
,
ep
->
data
);
ret
=
ep
->
funcA
(
filenameA
,
ep
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameA
);
}
return
ret
;
...
...
@@ -74,26 +66,12 @@ INT CALLBACK enum_profiles_callback( LPWSTR filename, LPARAM lparam )
*/
INT
WINAPI
EnumICMProfilesA
(
HDC
hdc
,
ICMENUMPROCA
func
,
LPARAM
lparam
)
{
DC
*
dc
;
INT
ret
=
-
1
;
TRACE
(
"%p, %p, 0x%08lx
\n
"
,
hdc
,
func
,
lparam
);
struct
enum_profiles
ep
;
if
(
!
func
)
return
-
1
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
{
if
(
dc
->
funcs
->
pEnumICMProfiles
)
{
struct
enum_profiles
ep
;
ep
.
unicode
=
FALSE
;
ep
.
callback
.
funcA
=
func
;
ep
.
data
=
lparam
;
ret
=
dc
->
funcs
->
pEnumICMProfiles
(
dc
->
physDev
,
enum_profiles_callback
,
(
LPARAM
)
&
ep
);
}
release_dc_ptr
(
dc
);
}
return
ret
;
ep
.
funcA
=
func
;
ep
.
data
=
lparam
;
return
EnumICMProfilesW
(
hdc
,
enum_profiles_callbackA
,
(
LPARAM
)
&
ep
);
}
/***********************************************************************
...
...
@@ -109,15 +87,8 @@ INT WINAPI EnumICMProfilesW(HDC hdc, ICMENUMPROCW func, LPARAM lparam)
if
(
!
func
)
return
-
1
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
{
if
(
dc
->
funcs
->
pEnumICMProfiles
)
{
struct
enum_profiles
ep
;
ep
.
unicode
=
TRUE
;
ep
.
callback
.
funcW
=
func
;
ep
.
data
=
lparam
;
ret
=
dc
->
funcs
->
pEnumICMProfiles
(
dc
->
physDev
,
enum_profiles_callback
,
(
LPARAM
)
&
ep
);
}
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pEnumICMProfiles
);
ret
=
physdev
->
funcs
->
pEnumICMProfiles
(
physdev
,
func
,
lparam
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
@@ -173,8 +144,8 @@ BOOL WINAPI GetICMProfileW(HDC hdc, LPDWORD size, LPWSTR filename)
if
(
dc
)
{
if
(
dc
->
funcs
->
pGetICMProfile
)
ret
=
dc
->
funcs
->
pGetICMProfile
(
dc
->
physDev
,
size
,
filename
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetICMProfile
);
ret
=
physdev
->
funcs
->
pGetICMProfile
(
physdev
,
size
,
filename
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
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