Module: wine Branch: master Commit: 92f2d659f55ae4a2b9171bcfd996bd7d679ecae0 URL: https://source.winehq.org/git/wine.git/?a=commit;h=92f2d659f55ae4a2b9171bcfd...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Nov 12 12:55:06 2021 +0100
win32u: Move NtUserGetPriorityClipboardFormat 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
---
dlls/user32/clipboard.c | 20 -------------------- dlls/user32/user32.spec | 2 +- dlls/win32u/clipboard.c | 19 +++++++++++++++++++ dlls/win32u/gdiobj.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 1 + dlls/win32u/wrappers.c | 5 +++++ include/ntuser.h | 1 + 8 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index de0d5a20dcc..62a17f5d021 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -976,23 +976,3 @@ HANDLE WINAPI GetClipboardData( UINT format ) return 0; } } - - -/************************************************************************** - * GetPriorityClipboardFormat (USER32.@) - */ -INT WINAPI GetPriorityClipboardFormat(UINT *list, INT nCount) -{ - int i; - - TRACE( "%p %u\n", list, nCount ); - - if (NtUserCountClipboardFormats() == 0) - return 0; - - for (i = 0; i < nCount; i++) - if (NtUserIsClipboardFormatAvailable(list[i])) - return list[i]; - - return -1; -} diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index c8f98637792..3825b6a4df2 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -358,7 +358,7 @@ @ stdcall GetPhysicalCursorPos(ptr) @ stdcall GetPointerDevices(ptr ptr) @ stdcall GetPointerType(long ptr) -@ stdcall GetPriorityClipboardFormat(ptr long) +@ stdcall GetPriorityClipboardFormat(ptr long) NtUserGetPriorityClipboardFormat @ stdcall GetProcessDefaultLayout(ptr) @ stdcall GetProcessDpiAwarenessInternal(long ptr) @ stdcall GetProcessWindowStation() NtUserGetProcessWindowStation diff --git a/dlls/win32u/clipboard.c b/dlls/win32u/clipboard.c index 3e555f4c49e..7acab5de631 100644 --- a/dlls/win32u/clipboard.c +++ b/dlls/win32u/clipboard.c @@ -144,6 +144,25 @@ BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *ou return ret; }
+/************************************************************************** + * NtUserGetPriorityClipboardFormat (win32u.@) + */ +INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) +{ + int i; + + TRACE( "%p %u\n", list, count ); + + if (NtUserCountClipboardFormats() == 0) + return 0; + + for (i = 0; i < count; i++) + if (NtUserIsClipboardFormatAvailable( list[i] )) + return list[i]; + + return -1; +} + /************************************************************************** * NtUserGetClipboardFormatName (win32u.@) */ diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index f91f8d57059..a03e1365737 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1168,6 +1168,7 @@ static struct unix_funcs unix_funcs = NtGdiUpdateColors, NtGdiWidenPath, NtUserCountClipboardFormats, + NtUserGetPriorityClipboardFormat, NtUserGetUpdatedClipboardFormats, NtUserIsClipboardFormatAvailable,
diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index e075ccbe23f..256ab822803 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -976,7 +976,7 @@ @ stub NtUserGetPointerProprietaryId @ stub NtUserGetPointerType @ stub NtUserGetPrecisionTouchPadConfiguration -@ stub NtUserGetPriorityClipboardFormat +@ stdcall NtUserGetPriorityClipboardFormat(ptr long) @ stub NtUserGetProcessDpiAwarenessContext @ stub NtUserGetProcessUIContextInformation @ stdcall -syscall NtUserGetProcessWindowStation() diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 00fec65427f..92f7c83576e 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -195,6 +195,7 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); INT (WINAPI *pNtUserCountClipboardFormats)(void); + INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 18949db3e43..dd3186ed2da 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -601,6 +601,11 @@ INT WINAPI NtUserCountClipboardFormats(void) return unix_funcs->pNtUserCountClipboardFormats(); }
+INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) +{ + return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count ); +} + BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ) { return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size ); diff --git a/include/ntuser.h b/include/ntuser.h index 17032bded47..9fcd94128fd 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -39,6 +39,7 @@ HWND WINAPI NtUserGetClipboardViewer(void); BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags ); BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, DWORD len, DWORD *needed ); +INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ); HWINSTA WINAPI NtUserGetProcessWindowStation(void); HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str ); HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );