win32u: Move NtUserKillTimer implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2022-03-16 15:36:30 +01:00 committed by Alexandre Julliard
parent ce9a782a4f
commit e520e29ca4
9 changed files with 32 additions and 22 deletions

View File

@ -3633,7 +3633,7 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y)
static LRESULT EDIT_WM_LButtonUp(EDITSTATE *es)
{
if (es->bCaptureState) {
KillTimer(es->hwndSelf, 0);
NtUserKillTimer(es->hwndSelf, 0);
if (GetCapture() == es->hwndSelf) ReleaseCapture();
}
es->bCaptureState = FALSE;

View File

@ -4417,25 +4417,6 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
}
/***********************************************************************
* KillTimer (USER32.@)
*/
BOOL WINAPI KillTimer( HWND hwnd, UINT_PTR id )
{
BOOL ret;
SERVER_START_REQ( kill_win_timer )
{
req->win = wine_server_user_handle( hwnd );
req->msg = WM_TIMER;
req->id = id;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* KillSystemTimer (USER32.@)
*/

View File

@ -484,7 +484,7 @@
@ stdcall IsWindowVisible(long)
@ stdcall IsZoomed(long)
@ stdcall KillSystemTimer(long long)
@ stdcall KillTimer(long long)
@ stdcall KillTimer(long long) NtUserKillTimer
@ stdcall LoadAcceleratorsA(long str)
@ stdcall LoadAcceleratorsW(long wstr)
@ stdcall LoadBitmapA(long str)

View File

@ -192,6 +192,24 @@ UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIME
return ret;
}
/***********************************************************************
* NtUserKillTimer (win32u.@)
*/
BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id )
{
BOOL ret;
SERVER_START_REQ( kill_win_timer )
{
req->win = wine_server_user_handle( hwnd );
req->msg = WM_TIMER;
req->id = id;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/* see SendMessageW */
LRESULT send_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{

View File

@ -142,6 +142,7 @@ static void * const syscalls[] =
NtUserGetWindowRgnEx,
NtUserInitializeClientPfnArrays,
NtUserInternalGetWindowText,
NtUserKillTimer,
NtUserNotifyWinEvent,
NtUserOpenDesktop,
NtUserOpenInputDesktop,

View File

@ -1059,7 +1059,7 @@
@ stub NtUserIsTouchWindow
@ stub NtUserIsWindowBroadcastingDpiToChildren
@ stub NtUserIsWindowGDIScaledDpiMessageEnabled
@ stub NtUserKillTimer
@ stdcall -syscall NtUserKillTimer(long long)
@ stub NtUserLayoutCompleted
@ stub NtUserLinkDpiCursor
@ stub NtUserLoadKeyboardLayoutEx

View File

@ -127,6 +127,7 @@
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \
SYSCALL_ENTRY( NtUserInternalGetWindowText ) \
SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserNotifyWinEvent ) \
SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \

View File

@ -554,6 +554,14 @@ NTSTATUS WINAPI wow64_NtUserSetTimer( UINT *args )
return NtUserSetTimer( hwnd, id, timeout, proc, tolerance );
}
NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args )
{
HWND hwnd = get_handle( &args );
UINT_PTR id = get_ulong( &args );
return NtUserKillTimer( hwnd, id );
}
NTSTATUS WINAPI wow64_NtUserCopyAcceleratorTable( UINT *args )
{
HACCEL src = get_handle( &args );

View File

@ -365,6 +365,7 @@ NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs
const void *client_workers, HINSTANCE user_module );
INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count );
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
BOOL WINAPI NtUserKillTimer( HWND hwnd, UINT_PTR id );
UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
BOOL WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
ULONG_PTR result_info, DWORD type, BOOL ansi );