Commit 6a768e28 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserGetUpdatedClipboardFormats implementation from user32.

parent e2ede91c
...@@ -902,35 +902,6 @@ UINT WINAPI EnumClipboardFormats( UINT format ) ...@@ -902,35 +902,6 @@ UINT WINAPI EnumClipboardFormats( UINT format )
/************************************************************************** /**************************************************************************
* GetUpdatedClipboardFormats (USER32.@)
*/
BOOL WINAPI GetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
BOOL ret;
if (!out_size)
{
SetLastError( ERROR_NOACCESS );
return FALSE;
}
USER_Driver->pUpdateClipboard();
SERVER_START_REQ( get_clipboard_formats )
{
if (formats) wine_server_set_reply( req, formats, size * sizeof(*formats) );
ret = !wine_server_call_err( req );
*out_size = reply->count;
}
SERVER_END_REQ;
TRACE( "%p %u returning %u formats, ret %u\n", formats, size, *out_size, ret );
if (!ret && !formats && *out_size) SetLastError( ERROR_NOACCESS );
return ret;
}
/**************************************************************************
* GetClipboardData (USER32.@) * GetClipboardData (USER32.@)
*/ */
HANDLE WINAPI GetClipboardData( UINT format ) HANDLE WINAPI GetClipboardData( UINT format )
......
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
@ stdcall GetTouchInputInfo(long long ptr long) @ stdcall GetTouchInputInfo(long long ptr long)
@ stdcall GetUpdateRect(long ptr long) @ stdcall GetUpdateRect(long ptr long)
@ stdcall GetUpdateRgn(long long long) @ stdcall GetUpdateRgn(long long long)
@ stdcall GetUpdatedClipboardFormats(ptr long ptr) @ stdcall GetUpdatedClipboardFormats(ptr long ptr) NtUserGetUpdatedClipboardFormats
@ stdcall GetUserObjectInformationA (long long ptr long ptr) @ stdcall GetUserObjectInformationA (long long ptr long ptr)
@ stdcall GetUserObjectInformationW (long long ptr long ptr) NtUserGetObjectInformation @ stdcall GetUserObjectInformationW (long long ptr long ptr) NtUserGetObjectInformation
@ stdcall GetUserObjectSecurity (long ptr ptr long ptr) @ stdcall GetUserObjectSecurity (long ptr ptr long ptr)
......
...@@ -117,6 +117,34 @@ BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) ...@@ -117,6 +117,34 @@ BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
} }
/************************************************************************** /**************************************************************************
* NtUserGetUpdatedClipboardFormats (win32u.@)
*/
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
BOOL ret;
if (!out_size)
{
SetLastError( ERROR_NOACCESS );
return FALSE;
}
user_driver->pUpdateClipboard();
SERVER_START_REQ( get_clipboard_formats )
{
if (formats) wine_server_set_reply( req, formats, size * sizeof(*formats) );
ret = !wine_server_call_err( req );
*out_size = reply->count;
}
SERVER_END_REQ;
TRACE( "%p %u returning %u formats, ret %u\n", formats, size, *out_size, ret );
if (!ret && !formats && *out_size) SetLastError( ERROR_NOACCESS );
return ret;
}
/**************************************************************************
* NtUserGetClipboardFormatName (win32u.@) * NtUserGetClipboardFormatName (win32u.@)
*/ */
INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen ) INT WINAPI NtUserGetClipboardFormatName( UINT format, WCHAR *buffer, INT maxlen )
......
...@@ -1168,6 +1168,7 @@ static struct unix_funcs unix_funcs = ...@@ -1168,6 +1168,7 @@ static struct unix_funcs unix_funcs =
NtGdiUpdateColors, NtGdiUpdateColors,
NtGdiWidenPath, NtGdiWidenPath,
NtUserCountClipboardFormats, NtUserCountClipboardFormats,
NtUserGetUpdatedClipboardFormats,
NtUserIsClipboardFormatAvailable, NtUserIsClipboardFormatAvailable,
GDIRealizePalette, GDIRealizePalette,
......
...@@ -1004,7 +1004,7 @@ ...@@ -1004,7 +1004,7 @@
@ stub NtUserGetUniformSpaceMapping @ stub NtUserGetUniformSpaceMapping
@ stub NtUserGetUpdateRect @ stub NtUserGetUpdateRect
@ stub NtUserGetUpdateRgn @ stub NtUserGetUpdateRgn
@ stub NtUserGetUpdatedClipboardFormats @ stdcall NtUserGetUpdatedClipboardFormats(ptr long ptr)
@ stub NtUserGetWOWClass @ stub NtUserGetWOWClass
@ stub NtUserGetWindowBand @ stub NtUserGetWindowBand
@ stub NtUserGetWindowCompositionAttribute @ stub NtUserGetWindowCompositionAttribute
......
...@@ -195,6 +195,7 @@ struct unix_funcs ...@@ -195,6 +195,7 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
INT (WINAPI *pNtUserCountClipboardFormats)(void); INT (WINAPI *pNtUserCountClipboardFormats)(void);
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
/* Wine-specific functions */ /* Wine-specific functions */
......
...@@ -601,6 +601,11 @@ INT WINAPI NtUserCountClipboardFormats(void) ...@@ -601,6 +601,11 @@ INT WINAPI NtUserCountClipboardFormats(void)
return unix_funcs->pNtUserCountClipboardFormats(); return unix_funcs->pNtUserCountClipboardFormats();
} }
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size );
}
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
{ {
return unix_funcs->pNtUserIsClipboardFormatAvailable( format ); return unix_funcs->pNtUserIsClipboardFormatAvailable( format );
......
...@@ -40,6 +40,7 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, ...@@ -40,6 +40,7 @@ BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
HWINSTA WINAPI NtUserGetProcessWindowStation(void); HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str ); HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ); HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ); BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access ); HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len ); BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment