Jacek Caban : win32u: Move EnumClipboardFormats implementation from user32.
Alexandre Julliard
julliard at winehq.org
Fri Apr 22 14:46:05 CDT 2022
Module: wine
Branch: master
Commit: ea9fb81c0998222bf72d982494433c8a2d7149aa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea9fb81c0998222bf72d982494433c8a2d7149aa
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Apr 22 14:46:17 2022 +0200
win32u: Move EnumClipboardFormats implementation from user32.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/clipboard.c | 16 +---------------
dlls/win32u/clipboard.c | 20 ++++++++++++++++++++
dlls/win32u/sysparams.c | 3 +++
dlls/win32u/win32u_private.h | 1 +
include/ntuser.h | 6 ++++++
5 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c
index 911014ee628..9a7753520f5 100644
--- a/dlls/user32/clipboard.c
+++ b/dlls/user32/clipboard.c
@@ -764,21 +764,7 @@ done:
*/
UINT WINAPI EnumClipboardFormats( UINT format )
{
- UINT ret = 0;
-
- SERVER_START_REQ( enum_clipboard_formats )
- {
- req->previous = format;
- if (!wine_server_call_err( req ))
- {
- ret = reply->format;
- SetLastError( ERROR_SUCCESS );
- }
- }
- SERVER_END_REQ;
-
- TRACE( "%s -> %s\n", debugstr_format( format ), debugstr_format( ret ));
- return ret;
+ return NtUserEnumClipboardFormats( format );
}
diff --git a/dlls/win32u/clipboard.c b/dlls/win32u/clipboard.c
index 29bf36ee80d..bf1c241d7c8 100644
--- a/dlls/win32u/clipboard.c
+++ b/dlls/win32u/clipboard.c
@@ -334,6 +334,26 @@ DWORD WINAPI NtUserGetClipboardSequenceNumber(void)
return seqno;
}
+/* see EnumClipboardFormats */
+UINT enum_clipboard_formats( UINT format )
+{
+ UINT ret = 0;
+
+ SERVER_START_REQ( enum_clipboard_formats )
+ {
+ req->previous = format;
+ if (!wine_server_call_err( req ))
+ {
+ ret = reply->format;
+ SetLastError( ERROR_SUCCESS );
+ }
+ }
+ SERVER_END_REQ;
+
+ TRACE( "%s -> %s\n", debugstr_format( format ), debugstr_format( ret ));
+ return ret;
+}
+
/**************************************************************************
* NtUserAddClipboardFormatListener (win32u.@)
*/
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 1e8b0fbf489..3b380c017e5 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -4707,6 +4707,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
enable_thunk_lock = arg;
return 0;
+ case NtUserCallOneParam_EnumClipboardFormats:
+ return enum_clipboard_formats( arg );
+
case NtUserCallOneParam_GetClipCursor:
return get_clip_cursor( (RECT *)arg );
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h
index 9d4c7b5021c..4c1b0a7b45b 100644
--- a/dlls/win32u/win32u_private.h
+++ b/dlls/win32u/win32u_private.h
@@ -313,6 +313,7 @@ struct unix_funcs
};
/* clipboard.c */
+extern UINT enum_clipboard_formats( UINT format ) DECLSPEC_HIDDEN;
extern void release_clipboard_owner( HWND hwnd ) DECLSPEC_HIDDEN;
/* cursoricon.c */
diff --git a/include/ntuser.h b/include/ntuser.h
index 836854a12b4..d06b76ab605 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -637,6 +637,7 @@ enum
NtUserCallOneParam_DispatchMessageA,
NtUserCallOneParam_EnableDC,
NtUserCallOneParam_EnableThunkLock,
+ NtUserCallOneParam_EnumClipboardFormats,
NtUserCallOneParam_GetClipCursor,
NtUserCallOneParam_GetCursorPos,
NtUserCallOneParam_GetIconParam,
@@ -688,6 +689,11 @@ static inline void NtUserEnableThunkLock( BOOL enable )
NtUserCallOneParam( enable, NtUserCallOneParam_EnableThunkLock );
}
+static inline UINT NtUserEnumClipboardFormats( UINT format )
+{
+ return NtUserCallOneParam( format, NtUserCallOneParam_EnumClipboardFormats );
+}
+
static inline BOOL NtUserGetClipCursor( RECT *rect )
{
return NtUserCallOneParam( (UINT_PTR)rect, NtUserCallOneParam_GetClipCursor );
More information about the wine-cvs
mailing list