win32u: Move NtUserAttachThreadInput 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 2021-11-16 12:32:55 +01:00 committed by Alexandre Julliard
parent 4b678c1e9a
commit 94e0629396
9 changed files with 71 additions and 24 deletions

View file

@ -593,28 +593,6 @@ BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
}
/**********************************************************************
* AttachThreadInput (USER32.@)
*
* Attaches the input processing mechanism of one thread to that of
* another thread.
*/
BOOL WINAPI AttachThreadInput( DWORD from, DWORD to, BOOL attach )
{
BOOL ret;
SERVER_START_REQ( attach_thread_input )
{
req->tid_from = from;
req->tid_to = to;
req->attach = attach;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/**********************************************************************
* GetKeyState (USER32.@)
*

View file

@ -12,7 +12,7 @@
@ stdcall AppendMenuW(long long long ptr)
@ stdcall AreDpiAwarenessContextsEqual(long long)
@ stdcall ArrangeIconicWindows(long)
@ stdcall AttachThreadInput(long long long)
@ stdcall AttachThreadInput(long long long) NtUserAttachThreadInput
@ stdcall BeginDeferWindowPos(long)
@ stdcall BeginPaint(long ptr)
@ stdcall BlockInput(long)

View file

@ -26,6 +26,7 @@ C_SRCS = \
font.c \
freetype.c \
gdiobj.c \
input.c \
main.c \
mapping.c \
opentype.c \

49
dlls/win32u/input.c Normal file
View file

@ -0,0 +1,49 @@
/*
* USER Input processing
*
* Copyright 1993 Bob Amstadt
* Copyright 1996 Albrecht Kleine
* Copyright 1997 David Faure
* Copyright 1998 Morten Welinder
* Copyright 1998 Ulrich Weigand
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "win32u_private.h"
#include "wine/server.h"
/**********************************************************************
* NtUserAttachThreadInput (win32u.@)
*/
BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach )
{
BOOL ret;
SERVER_START_REQ( attach_thread_input )
{
req->tid_from = from;
req->tid_to = to;
req->attach = attach;
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View file

@ -102,6 +102,7 @@ static void * const syscalls[] =
NtGdiSwapBuffers,
NtGdiTransformPoints,
NtUserAddClipboardFormatListener,
NtUserAttachThreadInput,
NtUserCloseDesktop,
NtUserCloseWindowStation,
NtUserCreateDesktopEx,

View file

@ -754,7 +754,7 @@
@ stub NtUserAddVisualIdentifier
@ stub NtUserAlterWindowStyle
@ stub NtUserAssociateInputContext
@ stub NtUserAttachThreadInput
@ stdcall -syscall NtUserAttachThreadInput(long long long)
@ stub NtUserAutoPromoteMouseInPointer
@ stub NtUserAutoRotateScreen
@ stub NtUserBeginLayoutUpdate

View file

@ -89,6 +89,7 @@
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserAttachThreadInput ) \
SYSCALL_ENTRY( NtUserCloseDesktop ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \

View file

@ -228,3 +228,12 @@ NTSTATUS WINAPI wow64_NtUserRemoveClipboardFormatListener( UINT *args )
return NtUserRemoveClipboardFormatListener( hwnd );
}
NTSTATUS WINAPI wow64_NtUserAttachThreadInput( UINT *args )
{
DWORD from = get_ulong( &args );
DWORD to = get_ulong( &args );
BOOL attach = get_ulong( &args );
return NtUserAttachThreadInput( from, to, attach );
}

View file

@ -24,6 +24,7 @@
#include <winternl.h>
BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
INT WINAPI NtUserCountClipboardFormats(void);
@ -36,6 +37,10 @@ INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT max
HWND WINAPI NtUserGetClipboardOwner(void);
DWORD WINAPI NtUserGetClipboardSequenceNumber(void);
HWND WINAPI NtUserGetClipboardViewer(void);
INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );
SHORT WINAPI NtUserGetKeyState( INT vkey );
HKL WINAPI NtUserGetKeyboardLayout( DWORD thread_id );
BOOL WINAPI NtUserGetKeyboardState( BYTE *state );
BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD len, DWORD *needed );
@ -45,14 +50,17 @@ HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd );
HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
BOOL WINAPI NtUserSetThreadDesktop( HDESK handle );
WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
#endif /* _NTUSER_ */