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
57b7a993
Commit
57b7a993
authored
Apr 29, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implement SetCoalescableTimer and add basic tests.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f5b8eb49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
message.c
dlls/user32/message.c
+11
-2
msg.c
dlls/user32/tests/msg.c
+16
-0
user32.spec
dlls/user32/user32.spec
+1
-0
winuser.h
include/winuser.h
+7
-0
No files found.
dlls/user32/message.c
View file @
57b7a993
...
...
@@ -4443,9 +4443,9 @@ BOOL WINAPI MessageBeep( UINT i )
/***********************************************************************
*
Set
Timer (USER32.@)
*
SetCoalescable
Timer (USER32.@)
*/
UINT_PTR
WINAPI
Set
Timer
(
HWND
hwnd
,
UINT_PTR
id
,
UINT
timeout
,
TIMERPROC
proc
)
UINT_PTR
WINAPI
Set
CoalescableTimer
(
HWND
hwnd
,
UINT_PTR
id
,
UINT
timeout
,
TIMERPROC
proc
,
ULONG
tolerance
)
{
UINT_PTR
ret
;
WNDPROC
winproc
=
0
;
...
...
@@ -4475,6 +4475,15 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
}
/******************************************************************
* SetTimer (USER32.@)
*/
UINT_PTR
WINAPI
SetTimer
(
HWND
hwnd
,
UINT_PTR
id
,
UINT
timeout
,
TIMERPROC
proc
)
{
return
SetCoalescableTimer
(
hwnd
,
id
,
timeout
,
proc
,
TIMERV_DEFAULT_COALESCING
);
}
/***********************************************************************
* SetSystemTimer (USER32.@)
*/
...
...
dlls/user32/tests/msg.c
View file @
57b7a993
...
...
@@ -1743,6 +1743,7 @@ static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD);
static
BOOL
(
WINAPI
*
pUpdateLayeredWindow
)(
HWND
,
HDC
,
POINT
*
,
SIZE
*
,
HDC
,
POINT
*
,
COLORREF
,
BLENDFUNCTION
*
,
DWORD
);
static
UINT_PTR
(
WINAPI
*
pSetSystemTimer
)(
HWND
,
UINT_PTR
,
UINT
,
TIMERPROC
);
static
UINT_PTR
(
WINAPI
*
pKillSystemTimer
)(
HWND
,
UINT_PTR
);
static
UINT_PTR
(
WINAPI
*
pSetCoalescableTimer
)(
HWND
,
UINT_PTR
,
UINT
,
TIMERPROC
,
ULONG
);
/* kernel32 functions */
static
BOOL
(
WINAPI
*
pGetCPInfoExA
)(
UINT
,
DWORD
,
LPCPINFOEXA
);
...
...
@@ -1769,6 +1770,7 @@ static void init_procs(void)
GET_PROC
(
user32
,
UpdateLayeredWindow
)
GET_PROC
(
user32
,
SetSystemTimer
)
GET_PROC
(
user32
,
KillSystemTimer
)
GET_PROC
(
user32
,
SetCoalescableTimer
)
GET_PROC
(
kernel32
,
GetCPInfoExA
)
...
...
@@ -8995,6 +8997,20 @@ static void test_timers_no_wnd(void)
KillTimer
(
NULL
,
id
);
/* Note: SetSystemTimer doesn't support a NULL window, see test_timers */
if
(
pSetCoalescableTimer
)
{
count
=
0
;
id
=
pSetCoalescableTimer
(
NULL
,
0
,
0
,
callback_count
,
0
);
ok
(
id
!=
0
,
"SetCoalescableTimer failed with %u.
\n
"
,
GetLastError
());
start
=
GetTickCount
();
while
(
GetTickCount
()
-
start
<
100
&&
GetMessageA
(
&
msg
,
NULL
,
0
,
0
))
DispatchMessageA
(
&
msg
);
ok
(
count
>
1
,
"expected count > 1, got %d.
\n
"
,
count
);
KillTimer
(
NULL
,
id
);
}
else
win_skip
(
"SetCoalescableTimer not available.
\n
"
);
/* Check what happens when we're running out of timers */
for
(
i
=
0
;
i
<
sizeof
(
ids
)
/
sizeof
(
ids
[
0
]);
i
++
)
{
...
...
dlls/user32/user32.spec
View file @
57b7a993
...
...
@@ -624,6 +624,7 @@
@ stdcall SetClassWord(long long long)
@ stdcall SetClipboardData(long long)
@ stdcall SetClipboardViewer(long)
@ stdcall SetCoalescableTimer(long long long ptr long)
# @ stub SetConsoleReserveKeys
@ stdcall SetCursor(long)
@ stub SetCursorContents
...
...
include/winuser.h
View file @
57b7a993
...
...
@@ -2560,6 +2560,12 @@ typedef struct tagMINIMIZEDMETRICS {
#define USER_TIMER_MINIMUM 0x0000000A
#define USER_TIMER_MAXIMUM 0x7FFFFFFF
/* SetCoalescableTimer() tolerances */
#define TIMERV_DEFAULT_COALESCING 0
#define TIMERV_NO_COALESCING 0xFFFFFFFF
#define TIMERV_COALESCING_MIN 1
#define TIMERV_COALESCING_MAX 0x7FFFFFF5
/* AnimateWindow() flags */
#define AW_SLIDE 0x00040000
#define AW_ACTIVATE 0x00020000
...
...
@@ -3943,6 +3949,7 @@ WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND,INT,LONG_PTR);
WINUSERAPI
WORD
WINAPI
SetClassWord
(
HWND
,
INT
,
WORD
);
WINUSERAPI
HANDLE
WINAPI
SetClipboardData
(
UINT
,
HANDLE
);
WINUSERAPI
HWND
WINAPI
SetClipboardViewer
(
HWND
);
WINUSERAPI
UINT_PTR
WINAPI
SetCoalescableTimer
(
HWND
,
UINT_PTR
,
UINT
,
TIMERPROC
,
ULONG
);
WINUSERAPI
HCURSOR
WINAPI
SetCursor
(
HCURSOR
);
WINUSERAPI
BOOL
WINAPI
SetCursorPos
(
INT
,
INT
);
WINUSERAPI
VOID
WINAPI
SetDebugErrorLevel
(
DWORD
);
...
...
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