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
76037001
Commit
76037001
authored
Oct 23, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix cursor and icon tests compilation with __WINESRC__ defined.
parent
3e3eb805
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
cursoricon.c
dlls/user32/tests/cursoricon.c
+32
-32
No files found.
dlls/user32/tests/cursoricon.c
View file @
76037001
...
...
@@ -328,7 +328,7 @@ static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARA
return
0
;
}
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
LRESULT
CALLBACK
callback_parent
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -339,12 +339,12 @@ static LRESULT CALLBACK callback_parent(HWND hwnd, UINT msg, WPARAM wParam, LPAR
return
TRUE
;
}
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
do_child
(
void
)
{
WNDCLASS
class
;
WNDCLASS
A
class
;
MSG
msg
;
BOOL
ret
;
...
...
@@ -353,7 +353,7 @@ static void do_child(void)
class
.
lpfnWndProc
=
callback_child
;
class
.
cbClsExtra
=
0
;
class
.
cbWndExtra
=
0
;
class
.
hInstance
=
GetModuleHandle
(
NULL
);
class
.
hInstance
=
GetModuleHandle
A
(
NULL
);
class
.
hIcon
=
NULL
;
class
.
hCursor
=
NULL
;
class
.
hbrBackground
=
NULL
;
...
...
@@ -361,7 +361,7 @@ static void do_child(void)
class
.
lpszClassName
=
"cursor_child"
;
SetLastError
(
0xdeadbeef
);
ret
=
RegisterClass
(
&
class
);
ret
=
RegisterClass
A
(
&
class
);
ok
(
ret
,
"Failed to register window class. Error: %u
\n
"
,
GetLastError
());
/* Create a window. */
...
...
@@ -370,14 +370,14 @@ static void do_child(void)
ok
(
child
!=
0
,
"CreateWindowA failed. Error: %u
\n
"
,
GetLastError
());
/* Let the parent know our HWND. */
PostMessage
(
parent
,
PROC_INIT
,
(
WPARAM
)
child
,
0
);
PostMessage
A
(
parent
,
PROC_INIT
,
(
WPARAM
)
child
,
0
);
/* Receive messages. */
while
((
ret
=
GetMessage
(
&
msg
,
0
,
0
,
0
)))
while
((
ret
=
GetMessage
A
(
&
msg
,
0
,
0
,
0
)))
{
ok
(
ret
!=
-
1
,
"GetMessage failed. Error: %u
\n
"
,
GetLastError
());
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
}
}
...
...
@@ -386,7 +386,7 @@ static void do_parent(void)
char
path_name
[
MAX_PATH
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
WNDCLASS
class
;
WNDCLASS
A
class
;
MSG
msg
;
BOOL
ret
;
...
...
@@ -395,7 +395,7 @@ static void do_parent(void)
class
.
lpfnWndProc
=
callback_parent
;
class
.
cbClsExtra
=
0
;
class
.
cbWndExtra
=
0
;
class
.
hInstance
=
GetModuleHandle
(
NULL
);
class
.
hInstance
=
GetModuleHandle
A
(
NULL
);
class
.
hIcon
=
NULL
;
class
.
hCursor
=
NULL
;
class
.
hbrBackground
=
NULL
;
...
...
@@ -403,7 +403,7 @@ static void do_parent(void)
class
.
lpszClassName
=
"cursor_parent"
;
SetLastError
(
0xdeadbeef
);
ret
=
RegisterClass
(
&
class
);
ret
=
RegisterClass
A
(
&
class
);
ok
(
ret
,
"Failed to register window class. Error: %u
\n
"
,
GetLastError
());
/* Create a window. */
...
...
@@ -422,17 +422,17 @@ static void do_parent(void)
child_process
=
info
.
hProcess
;
/* Wait for child window handle. */
while
((
child
==
0
)
&&
(
ret
=
GetMessage
(
&
msg
,
parent
,
0
,
0
)))
while
((
child
==
0
)
&&
(
ret
=
GetMessage
A
(
&
msg
,
parent
,
0
,
0
)))
{
ok
(
ret
!=
-
1
,
"GetMessage failed. Error: %u
\n
"
,
GetLastError
());
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
}
}
static
void
finish_child_process
(
void
)
{
SendMessage
(
child
,
WM_CLOSE
,
0
,
0
);
SendMessage
A
(
child
,
WM_CLOSE
,
0
,
0
);
winetest_wait_child_process
(
child_process
);
CloseHandle
(
child_process
);
}
...
...
@@ -462,7 +462,7 @@ static void test_child_process(void)
SetCursor
(
cursor
);
/* Destroy the cursor. */
SendMessage
(
child
,
WM_USER
+
1
,
0
,
(
LPARAM
)
cursor
);
SendMessage
A
(
child
,
WM_USER
+
1
,
0
,
(
LPARAM
)
cursor
);
}
static
BOOL
color_match
(
COLORREF
a
,
COLORREF
b
)
...
...
@@ -486,8 +486,8 @@ static void test_CopyImage_Check(HBITMAP bitmap, UINT flags, INT copyWidth, INT
ok
(
copy
!=
NULL
,
"CopyImage() failed
\n
"
);
if
(
copy
!=
NULL
)
{
GetObject
(
bitmap
,
sizeof
(
origBitmap
),
&
origBitmap
);
GetObject
(
copy
,
sizeof
(
copyBitmap
),
&
copyBitmap
);
GetObject
A
(
bitmap
,
sizeof
(
origBitmap
),
&
origBitmap
);
GetObject
A
(
copy
,
sizeof
(
copyBitmap
),
&
copyBitmap
);
orig_is_dib
=
(
origBitmap
.
bmBits
!=
NULL
);
copy_is_dib
=
(
copyBitmap
.
bmBits
!=
NULL
);
...
...
@@ -688,7 +688,7 @@ static void test_initial_cursor(void)
/* Check what handle GetCursor() returns if a cursor is not set yet. */
SetLastError
(
0xdeadbeef
);
cursor2
=
LoadCursor
(
NULL
,
IDC_WAIT
);
cursor2
=
LoadCursor
A
(
NULL
,
(
LPCSTR
)
IDC_WAIT
);
todo_wine
{
ok
(
cursor
==
cursor2
,
"cursor (%p) is not IDC_WAIT (%p).
\n
"
,
cursor
,
cursor2
);
}
...
...
@@ -710,7 +710,7 @@ static void test_icon_info_dbg(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_m
ok_
(
__FILE__
,
line
)(
info
.
yHotspot
==
exp_cy
/
2
,
"info.yHotspot = %u
\n
"
,
info
.
yHotspot
);
ok_
(
__FILE__
,
line
)(
info
.
hbmMask
!=
0
,
"info.hbmMask is NULL
\n
"
);
ret
=
GetObject
(
info
.
hbmMask
,
sizeof
(
bmMask
),
&
bmMask
);
ret
=
GetObject
A
(
info
.
hbmMask
,
sizeof
(
bmMask
),
&
bmMask
);
ok_
(
__FILE__
,
line
)(
ret
==
sizeof
(
bmMask
),
"GetObject(info.hbmMask) failed, ret %u
\n
"
,
ret
);
if
(
exp_bpp
==
1
)
...
...
@@ -725,7 +725,7 @@ static void test_icon_info_dbg(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_m
display_bpp
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
ReleaseDC
(
0
,
hdc
);
ret
=
GetObject
(
info
.
hbmColor
,
sizeof
(
bmColor
),
&
bmColor
);
ret
=
GetObject
A
(
info
.
hbmColor
,
sizeof
(
bmColor
),
&
bmColor
);
ok_
(
__FILE__
,
line
)(
ret
==
sizeof
(
bmColor
),
"GetObject(info.hbmColor) failed, ret %u
\n
"
,
ret
);
ok_
(
__FILE__
,
line
)(
bmColor
.
bmBitsPixel
==
display_bpp
/* XP */
||
...
...
@@ -1043,7 +1043,7 @@ static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm)
DWORD
ret
,
pixel
=
0
;
HDC
hdc
=
GetDC
(
NULL
);
ret
=
GetObject
(
hbm
,
sizeof
(
bm
),
&
bm
);
ret
=
GetObject
A
(
hbm
,
sizeof
(
bm
),
&
bm
);
ok
(
ret
==
sizeof
(
bm
),
"GetObject returned %d
\n
"
,
ret
);
memset
(
&
bmi
,
0
,
sizeof
(
bmi
));
...
...
@@ -1219,7 +1219,7 @@ static void test_LoadImage(void)
DeleteFileA
(
"icon.ico"
);
/* Test a system icon */
handle
=
LoadIcon
(
0
,
IDI_HAND
);
handle
=
LoadIcon
A
(
0
,
(
LPCSTR
)
IDI_HAND
);
ok
(
handle
!=
NULL
,
"LoadImage() failed.
\n
"
);
if
(
pGetIconInfoExA
)
{
...
...
@@ -1976,7 +1976,7 @@ static void check_DrawState_Size(HDC hdc, BOOL maskvalue, UINT32 color, int bpp,
SetPixelV
(
hdc
,
2
,
2
,
background
);
/* Let DrawState calculate the size of the icon (it's 1x1) */
DrawState
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
0
,
0
,
(
DST_ICON
|
flags
));
DrawState
A
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
0
,
0
,
(
DST_ICON
|
flags
));
result
=
GetPixel
(
hdc
,
0
,
0
);
passed
[
0
]
=
color_match
(
result
,
background
);
...
...
@@ -1990,7 +1990,7 @@ static void check_DrawState_Size(HDC hdc, BOOL maskvalue, UINT32 color, int bpp,
* width/height 2x2 if the icon is only 1x1 pixels in size should
* result in drawing it with size 1x1. The size parameters must be
* ignored if a Icon has to be drawn! */
DrawState
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
2
,
2
,
(
DST_ICON
|
flags
));
DrawState
A
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
2
,
2
,
(
DST_ICON
|
flags
));
result
=
GetPixel
(
hdc
,
0
,
0
);
passed
[
1
]
=
color_match
(
result
,
background
);
...
...
@@ -2026,7 +2026,7 @@ static void check_DrawState_Color(HDC hdc, BOOL maskvalue, UINT32 color, int bpp
/* Set color of the pixel that will be checked afterwards */
SetPixelV
(
hdc
,
1
,
1
,
background
);
DrawState
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
0
,
0
,
(
DST_ICON
|
flags
));
DrawState
A
(
hdc
,
hbr
,
NULL
,
(
LPARAM
)
hicon
,
0
,
1
,
1
,
0
,
0
,
(
DST_ICON
|
flags
));
/* Check the color of the pixel is correct */
result
=
GetPixel
(
hdc
,
1
,
1
);
...
...
@@ -2095,7 +2095,7 @@ static DWORD CALLBACK set_cursor_thread( void *arg )
{
HCURSOR
ret
;
PeekMessage
(
0
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* create a msg queue */
PeekMessage
A
(
0
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* create a msg queue */
if
(
parent_id
)
{
BOOL
ret
=
AttachThreadInput
(
GetCurrentThreadId
(),
parent_id
,
TRUE
);
...
...
@@ -2214,7 +2214,7 @@ static DWORD CALLBACK show_cursor_thread( void *arg )
DWORD
count
=
(
DWORD_PTR
)
arg
;
int
ret
;
PeekMessage
(
0
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* create a msg queue */
PeekMessage
A
(
0
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* create a msg queue */
if
(
parent_id
)
{
BOOL
ret
=
AttachThreadInput
(
GetCurrentThreadId
(),
parent_id
,
TRUE
);
...
...
@@ -2242,8 +2242,8 @@ static void test_ShowCursor(void)
ok
(
info
.
flags
&
CURSOR_SHOWING
,
"cursor not shown in info
\n
"
);
}
event_start
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
event_next
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
event_start
=
CreateEvent
W
(
NULL
,
FALSE
,
FALSE
,
NULL
);
event_next
=
CreateEvent
W
(
NULL
,
FALSE
,
FALSE
,
NULL
);
count
=
ShowCursor
(
TRUE
);
ok
(
count
==
1
,
"wrong count %d
\n
"
,
count
);
...
...
@@ -2448,7 +2448,7 @@ static void test_DestroyCursor(void)
DeleteObject
(
cursorInfo
.
hbmColor
);
/* Try testing DestroyCursor() now using LoadCursor() cursors. */
cursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
cursor
=
LoadCursor
A
(
NULL
,
(
LPCSTR
)
IDC_ARROW
);
SetLastError
(
0xdeadbeef
);
ret
=
DestroyCursor
(
cursor
);
...
...
@@ -2463,11 +2463,11 @@ static void test_DestroyCursor(void)
ok
(
error
==
0xdeadbeef
,
"Last error: 0x%08x
\n
"
,
error
);
/* Check if LoadCursor() returns the same handle with the same icon. */
cursor2
=
LoadCursor
(
NULL
,
IDC_ARROW
);
cursor2
=
LoadCursor
A
(
NULL
,
(
LPCSTR
)
IDC_ARROW
);
ok
(
cursor2
==
cursor
,
"cursor == %p, cursor2 == %p
\n
"
,
cursor
,
cursor2
);
/* Check if LoadCursor() returns the same handle with a different icon. */
cursor2
=
LoadCursor
(
NULL
,
IDC_WAIT
);
cursor2
=
LoadCursor
A
(
NULL
,
(
LPCSTR
)
IDC_WAIT
);
ok
(
cursor2
!=
cursor
,
"cursor == %p, cursor2 == %p
\n
"
,
cursor
,
cursor2
);
}
...
...
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