win32u: Move NtUserAddClipboardFormatListener and NtUserRemoveClipboardFormatListener implementations 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-12 12:54:45 +01:00 committed by Alexandre Julliard
parent 39b9f1318e
commit daf5664b0a
8 changed files with 56 additions and 37 deletions

View File

@ -996,36 +996,3 @@ INT WINAPI GetPriorityClipboardFormat(UINT *list, INT nCount)
return -1; return -1;
} }
/**************************************************************************
* AddClipboardFormatListener (USER32.@)
*/
BOOL WINAPI AddClipboardFormatListener(HWND hwnd)
{
BOOL ret;
SERVER_START_REQ( add_clipboard_listener )
{
req->window = wine_server_user_handle( hwnd );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/**************************************************************************
* RemoveClipboardFormatListener (USER32.@)
*/
BOOL WINAPI RemoveClipboardFormatListener(HWND hwnd)
{
BOOL ret;
SERVER_START_REQ( remove_clipboard_listener )
{
req->window = wine_server_user_handle( hwnd );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View File

@ -1,5 +1,5 @@
@ stdcall ActivateKeyboardLayout(long long) @ stdcall ActivateKeyboardLayout(long long)
@ stdcall AddClipboardFormatListener(long) @ stdcall AddClipboardFormatListener(long) NtUserAddClipboardFormatListener
@ stdcall AdjustWindowRect(ptr long long) @ stdcall AdjustWindowRect(ptr long long)
@ stdcall AdjustWindowRectEx(ptr long long long) @ stdcall AdjustWindowRectEx(ptr long long long)
@ stdcall AdjustWindowRectExForDpi(ptr long long long long) @ stdcall AdjustWindowRectExForDpi(ptr long long long long)
@ -617,7 +617,7 @@
@ stdcall RegisterWindowMessageW(wstr) @ stdcall RegisterWindowMessageW(wstr)
@ stdcall ReleaseCapture() @ stdcall ReleaseCapture()
@ stdcall ReleaseDC(long long) @ stdcall ReleaseDC(long long)
@ stdcall RemoveClipboardFormatListener(long) @ stdcall RemoveClipboardFormatListener(long) NtUserRemoveClipboardFormatListener
@ stdcall RemoveMenu(long long long) @ stdcall RemoveMenu(long long long)
@ stdcall RemovePropA(long str) @ stdcall RemovePropA(long str)
@ stdcall RemovePropW(long wstr) @ stdcall RemovePropW(long wstr)

View File

@ -219,3 +219,35 @@ DWORD WINAPI NtUserGetClipboardSequenceNumber(void)
TRACE( "returning %u\n", seqno ); TRACE( "returning %u\n", seqno );
return seqno; return seqno;
} }
/**************************************************************************
* NtUserAddClipboardFormatListener (win32u.@)
*/
BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd )
{
BOOL ret;
SERVER_START_REQ( add_clipboard_listener )
{
req->window = wine_server_user_handle( hwnd );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}
/**************************************************************************
* NtUserRemoveClipboardFormatListener (win32u.@)
*/
BOOL WINAPI NtUserRemoveClipboardFormatListener( HWND hwnd )
{
BOOL ret;
SERVER_START_REQ( remove_clipboard_listener )
{
req->window = wine_server_user_handle( hwnd );
ret = !wine_server_call_err( req );
}
SERVER_END_REQ;
return ret;
}

View File

@ -101,6 +101,7 @@ static void * const syscalls[] =
NtGdiSetVirtualResolution, NtGdiSetVirtualResolution,
NtGdiSwapBuffers, NtGdiSwapBuffers,
NtGdiTransformPoints, NtGdiTransformPoints,
NtUserAddClipboardFormatListener,
NtUserCloseDesktop, NtUserCloseDesktop,
NtUserCloseWindowStation, NtUserCloseWindowStation,
NtUserCreateDesktopEx, NtUserCreateDesktopEx,
@ -117,6 +118,7 @@ static void * const syscalls[] =
NtUserOpenDesktop, NtUserOpenDesktop,
NtUserOpenInputDesktop, NtUserOpenInputDesktop,
NtUserOpenWindowStation, NtUserOpenWindowStation,
NtUserRemoveClipboardFormatListener,
NtUserRemoveProp, NtUserRemoveProp,
NtUserSetObjectInformation, NtUserSetObjectInformation,
NtUserSetProcessWindowStation, NtUserSetProcessWindowStation,

View File

@ -750,7 +750,7 @@
@ stub NtUserAcquireIAMKey @ stub NtUserAcquireIAMKey
@ stub NtUserAcquireInteractiveControlBackgroundAccess @ stub NtUserAcquireInteractiveControlBackgroundAccess
@ stub NtUserActivateKeyboardLayout @ stub NtUserActivateKeyboardLayout
@ stub NtUserAddClipboardFormatListener @ stdcall -syscall NtUserAddClipboardFormatListener(long)
@ stub NtUserAddVisualIdentifier @ stub NtUserAddVisualIdentifier
@ stub NtUserAlterWindowStyle @ stub NtUserAlterWindowStyle
@ stub NtUserAssociateInputContext @ stub NtUserAssociateInputContext
@ -1145,7 +1145,7 @@
@ stub NtUserRemoteRedrawRectangle @ stub NtUserRemoteRedrawRectangle
@ stub NtUserRemoteRedrawScreen @ stub NtUserRemoteRedrawScreen
@ stub NtUserRemoteStopScreenUpdates @ stub NtUserRemoteStopScreenUpdates
@ stub NtUserRemoveClipboardFormatListener @ stdcall -syscall NtUserRemoveClipboardFormatListener(long)
@ stub NtUserRemoveInjectionDevice @ stub NtUserRemoveInjectionDevice
@ stub NtUserRemoveMenu @ stub NtUserRemoveMenu
@ stdcall -syscall NtUserRemoveProp(long wstr) @ stdcall -syscall NtUserRemoveProp(long wstr)

View File

@ -88,6 +88,7 @@
SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserCloseDesktop ) \ SYSCALL_ENTRY( NtUserCloseDesktop ) \
SYSCALL_ENTRY( NtUserCloseWindowStation ) \ SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
@ -104,6 +105,7 @@
SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserOpenWindowStation ) \ SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserRemoveProp ) \ SYSCALL_ENTRY( NtUserRemoveProp ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \ SYSCALL_ENTRY( NtUserSetObjectInformation ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \

View File

@ -214,3 +214,17 @@ NTSTATUS WINAPI wow64_NtUserGetClipboardViewer( UINT *args )
{ {
return HandleToUlong( NtUserGetClipboardViewer() ); return HandleToUlong( NtUserGetClipboardViewer() );
} }
NTSTATUS WINAPI wow64_NtUserAddClipboardFormatListener( UINT *args )
{
HWND hwnd = get_handle( &args );
return NtUserAddClipboardFormatListener( hwnd );
}
NTSTATUS WINAPI wow64_NtUserRemoveClipboardFormatListener( UINT *args )
{
HWND hwnd = get_handle( &args );
return NtUserRemoveClipboardFormatListener( hwnd );
}

View File

@ -23,6 +23,7 @@
#include <wingdi.h> #include <wingdi.h>
#include <winternl.h> #include <winternl.h>
BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
BOOL WINAPI NtUserCloseDesktop( HDESK handle ); BOOL WINAPI NtUserCloseDesktop( HDESK handle );
BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle ); BOOL WINAPI NtUserCloseWindowStation( HWINSTA handle );
INT WINAPI NtUserCountClipboardFormats(void); INT WINAPI NtUserCountClipboardFormats(void);
@ -47,6 +48,7 @@ HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK acc
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len ); BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access ); HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, 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 ); HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle ); BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle ); BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );