Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3ae7035a
Commit
3ae7035a
authored
Nov 23, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Add a debug helper to print color values.
parent
7eb1e942
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
9 deletions
+18
-9
brush.c
dlls/win32u/brush.c
+2
-2
graphics.c
dlls/win32u/dibdrv/graphics.c
+3
-3
palette.c
dlls/win32u/palette.c
+2
-2
pen.c
dlls/win32u/pen.c
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+9
-0
window.c
dlls/win32u/window.c
+1
-1
No files found.
dlls/win32u/brush.c
View file @
3ae7035a
...
@@ -222,7 +222,7 @@ HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen
...
@@ -222,7 +222,7 @@ HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen
{
{
LOGBRUSH
logbrush
;
LOGBRUSH
logbrush
;
TRACE
(
"%d %
06x
\n
"
,
style
,
color
);
TRACE
(
"%d %
s
\n
"
,
style
,
debugstr_color
(
color
)
);
logbrush
.
lbStyle
=
BS_HATCHED
;
logbrush
.
lbStyle
=
BS_HATCHED
;
logbrush
.
lbColor
=
color
;
logbrush
.
lbColor
=
color
;
...
@@ -282,7 +282,7 @@ HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color, HBRUSH brush )
...
@@ -282,7 +282,7 @@ HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color, HBRUSH brush )
{
{
LOGBRUSH
logbrush
;
LOGBRUSH
logbrush
;
TRACE
(
"%
06x
\n
"
,
color
);
TRACE
(
"%
s
\n
"
,
debugstr_color
(
color
)
);
logbrush
.
lbStyle
=
BS_SOLID
;
logbrush
.
lbStyle
=
BS_SOLID
;
logbrush
.
lbColor
=
color
;
logbrush
.
lbColor
=
color
;
...
...
dlls/win32u/dibdrv/graphics.c
View file @
3ae7035a
...
@@ -1056,7 +1056,7 @@ BOOL CDECL dibdrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT
...
@@ -1056,7 +1056,7 @@ BOOL CDECL dibdrv_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT
RECT
row
;
RECT
row
;
HRGN
rgn
;
HRGN
rgn
;
TRACE
(
"(%p, %d, %d, %
08x, %d)
\n
"
,
pdev
,
x
,
y
,
color
,
type
);
TRACE
(
"(%p, %d, %d, %
s, %d)
\n
"
,
pdev
,
x
,
y
,
debugstr_color
(
color
)
,
type
);
if
(
x
<
0
||
x
>=
pdev
->
dib
.
rect
.
right
-
pdev
->
dib
.
rect
.
left
||
if
(
x
<
0
||
x
>=
pdev
->
dib
.
rect
.
right
-
pdev
->
dib
.
rect
.
left
||
y
<
0
||
y
>=
pdev
->
dib
.
rect
.
bottom
-
pdev
->
dib
.
rect
.
top
)
return
FALSE
;
y
<
0
||
y
>=
pdev
->
dib
.
rect
.
bottom
-
pdev
->
dib
.
rect
.
top
)
return
FALSE
;
...
@@ -1097,7 +1097,7 @@ COLORREF CDECL dibdrv_GetNearestColor( PHYSDEV dev, COLORREF color )
...
@@ -1097,7 +1097,7 @@ COLORREF CDECL dibdrv_GetNearestColor( PHYSDEV dev, COLORREF color )
DC
*
dc
=
get_physdev_dc
(
dev
);
DC
*
dc
=
get_physdev_dc
(
dev
);
DWORD
pixel
;
DWORD
pixel
;
TRACE
(
"(%p, %
08x)
\n
"
,
dev
,
color
);
TRACE
(
"(%p, %
s)
\n
"
,
dev
,
debugstr_color
(
color
)
);
pixel
=
get_pixel_color
(
dc
,
&
pdev
->
dib
,
color
,
FALSE
);
pixel
=
get_pixel_color
(
dc
,
&
pdev
->
dib
,
color
,
FALSE
);
return
pdev
->
dib
.
funcs
->
pixel_to_colorref
(
&
pdev
->
dib
,
pixel
);
return
pdev
->
dib
.
funcs
->
pixel_to_colorref
(
&
pdev
->
dib
,
pixel
);
...
@@ -1575,7 +1575,7 @@ COLORREF CDECL dibdrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
...
@@ -1575,7 +1575,7 @@ COLORREF CDECL dibdrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
POINT
pt
;
POINT
pt
;
DWORD
pixel
;
DWORD
pixel
;
TRACE
(
"(%p, %d, %d, %
08x)
\n
"
,
dev
,
x
,
y
,
color
);
TRACE
(
"(%p, %d, %d, %
s)
\n
"
,
dev
,
x
,
y
,
debugstr_color
(
color
)
);
pt
.
x
=
x
;
pt
.
x
=
x
;
pt
.
y
=
y
;
pt
.
y
=
y
;
...
...
dlls/win32u/palette.c
View file @
3ae7035a
...
@@ -384,7 +384,7 @@ UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color )
...
@@ -384,7 +384,7 @@ UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color )
}
}
GDI_ReleaseObj
(
hpalette
);
GDI_ReleaseObj
(
hpalette
);
}
}
TRACE
(
"(%p,%
06x): returning %d
\n
"
,
hpalette
,
color
,
index
);
TRACE
(
"(%p,%
s): returning %d
\n
"
,
hpalette
,
debugstr_color
(
color
)
,
index
);
return
index
;
return
index
;
}
}
...
@@ -413,7 +413,7 @@ COLORREF CDECL nulldrv_GetNearestColor( PHYSDEV dev, COLORREF color )
...
@@ -413,7 +413,7 @@ COLORREF CDECL nulldrv_GetNearestColor( PHYSDEV dev, COLORREF color )
if
(
!
get_palette_entries
(
hpal
,
index
,
1
,
&
entry
))
if
(
!
get_palette_entries
(
hpal
,
index
,
1
,
&
entry
))
{
{
WARN
(
"
RGB(%x) : idx %d is out of bounds, assuming NULL
\n
"
,
color
,
index
);
WARN
(
"
%s: idx %d is out of bounds, assuming NULL
\n
"
,
debugstr_color
(
color
)
,
index
);
if
(
!
get_palette_entries
(
hpal
,
0
,
1
,
&
entry
))
return
CLR_INVALID
;
if
(
!
get_palette_entries
(
hpal
,
0
,
1
,
&
entry
))
return
CLR_INVALID
;
}
}
color
=
RGB
(
entry
.
peRed
,
entry
.
peGreen
,
entry
.
peBlue
);
color
=
RGB
(
entry
.
peRed
,
entry
.
peGreen
,
entry
.
peBlue
);
...
...
dlls/win32u/pen.c
View file @
3ae7035a
...
@@ -59,7 +59,7 @@ HPEN create_pen( INT style, INT width, COLORREF color )
...
@@ -59,7 +59,7 @@ HPEN create_pen( INT style, INT width, COLORREF color )
PENOBJ
*
penPtr
;
PENOBJ
*
penPtr
;
HPEN
hpen
;
HPEN
hpen
;
TRACE
(
"%d %d %
06x
\n
"
,
style
,
width
,
color
);
TRACE
(
"%d %d %
s
\n
"
,
style
,
width
,
debugstr_color
(
color
)
);
switch
(
style
)
switch
(
style
)
{
{
...
...
dlls/win32u/win32u_private.h
View file @
3ae7035a
...
@@ -506,4 +506,13 @@ static inline const char *debugstr_us( const UNICODE_STRING *us )
...
@@ -506,4 +506,13 @@ static inline const char *debugstr_us( const UNICODE_STRING *us )
return
debugstr_wn
(
us
->
Buffer
,
us
->
Length
/
sizeof
(
WCHAR
)
);
return
debugstr_wn
(
us
->
Buffer
,
us
->
Length
/
sizeof
(
WCHAR
)
);
}
}
static
inline
const
char
*
debugstr_color
(
COLORREF
color
)
{
if
(
color
&
(
1
<<
24
))
/* PALETTEINDEX */
return
wine_dbg_sprintf
(
"PALETTEINDEX(%u)"
,
LOWORD
(
color
)
);
if
(
color
>>
16
==
0x10ff
)
/* DIBINDEX */
return
wine_dbg_sprintf
(
"DIBINDEX(%u)"
,
LOWORD
(
color
)
);
return
wine_dbg_sprintf
(
"RGB(%02x,%02x,%02x)"
,
GetRValue
(
color
),
GetGValue
(
color
),
GetBValue
(
color
)
);
}
#endif
/* __WINE_WIN32U_PRIVATE */
#endif
/* __WINE_WIN32U_PRIVATE */
dlls/win32u/window.c
View file @
3ae7035a
...
@@ -2066,7 +2066,7 @@ BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph
...
@@ -2066,7 +2066,7 @@ BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alph
{
{
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p,%
08x,%d,%x)
\n
"
,
hwnd
,
key
,
alpha
,
flags
);
TRACE
(
"(%p,%
s,%d,%x)
\n
"
,
hwnd
,
debugstr_color
(
key
)
,
alpha
,
flags
);
SERVER_START_REQ
(
set_window_layered_info
)
SERVER_START_REQ
(
set_window_layered_info
)
{
{
...
...
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