Commit eba0a510 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move clipboard data management from user32.

parent cad4aded
...@@ -3134,7 +3134,7 @@ static void EDIT_WM_Copy(EDITSTATE *es) ...@@ -3134,7 +3134,7 @@ static void EDIT_WM_Copy(EDITSTATE *es)
TRACE("%s\n", debugstr_w(dst)); TRACE("%s\n", debugstr_w(dst));
GlobalUnlock(hdst); GlobalUnlock(hdst);
OpenClipboard(es->hwndSelf); OpenClipboard(es->hwndSelf);
EmptyClipboard(); NtUserEmptyClipboard();
SetClipboardData(CF_UNICODETEXT, hdst); SetClipboardData(CF_UNICODETEXT, hdst);
NtUserCloseClipboard(); NtUserCloseClipboard();
} }
......
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
@ stdcall DrawTextExW(long wstr long ptr long ptr) @ stdcall DrawTextExW(long wstr long ptr long ptr)
@ stdcall DrawTextW(long wstr long ptr long) @ stdcall DrawTextW(long wstr long ptr long)
@ stdcall EditWndProc(long long long long) EditWndProcA @ stdcall EditWndProc(long long long long) EditWndProcA
@ stdcall EmptyClipboard() @ stdcall EmptyClipboard() NtUserEmptyClipboard
@ stdcall EnableMenuItem(long long long) NtUserEnableMenuItem @ stdcall EnableMenuItem(long long long) NtUserEnableMenuItem
@ stdcall EnableMouseInPointer(long) @ stdcall EnableMouseInPointer(long)
@ stdcall EnableNonClientDpiScaling(long) @ stdcall EnableNonClientDpiScaling(long)
......
...@@ -184,6 +184,20 @@ static const struct user_callbacks user_funcs = ...@@ -184,6 +184,20 @@ static const struct user_callbacks user_funcs =
unregister_imm, unregister_imm,
}; };
static NTSTATUS WINAPI User32FreeCachedClipboardData( const struct free_cached_data_params *params,
ULONG size )
{
free_cached_data( params->format, params->handle );
return 0;
}
static NTSTATUS WINAPI User32RenderSsynthesizedFormat( const struct render_synthesized_format_params *params,
ULONG size )
{
render_synthesized_format( params->format, params->from );
return 0;
}
static BOOL WINAPI User32LoadDriver( const WCHAR *path, ULONG size ) static BOOL WINAPI User32LoadDriver( const WCHAR *path, ULONG size )
{ {
return LoadLibraryW( path ) != NULL; return LoadLibraryW( path ) != NULL;
...@@ -196,7 +210,9 @@ static const void *kernel_callback_table[NtUserCallCount] = ...@@ -196,7 +210,9 @@ static const void *kernel_callback_table[NtUserCallCount] =
User32CallWinEventHook, User32CallWinEventHook,
User32CallWindowProc, User32CallWindowProc,
User32CallWindowsHook, User32CallWindowsHook,
User32FreeCachedClipboardData,
User32LoadDriver, User32LoadDriver,
User32RenderSsynthesizedFormat,
}; };
......
...@@ -82,6 +82,8 @@ extern BOOL process_rawinput_message( MSG *msg, UINT hw_id, ...@@ -82,6 +82,8 @@ extern BOOL process_rawinput_message( MSG *msg, UINT hw_id,
const struct hardware_msg_data *msg_data ) DECLSPEC_HIDDEN; const struct hardware_msg_data *msg_data ) DECLSPEC_HIDDEN;
extern BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam, extern BOOL unpack_dde_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
void **buffer, size_t size ) DECLSPEC_HIDDEN; void **buffer, size_t size ) DECLSPEC_HIDDEN;
extern void free_cached_data( UINT format, HANDLE handle ) DECLSPEC_HIDDEN;
extern HANDLE render_synthesized_format( UINT format, UINT from ) DECLSPEC_HIDDEN;
extern void CLIPBOARD_ReleaseOwner( HWND hwnd ) DECLSPEC_HIDDEN; extern void CLIPBOARD_ReleaseOwner( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN;
......
...@@ -4671,10 +4671,6 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) ...@@ -4671,10 +4671,6 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
thread_detach(); thread_detach();
return 0; return 0;
case NtUserUpdateClipboard:
user_driver->pUpdateClipboard();
return 0;
default: default:
FIXME( "invalid code %u\n", code ); FIXME( "invalid code %u\n", code );
return 0; return 0;
......
...@@ -32,7 +32,9 @@ enum ...@@ -32,7 +32,9 @@ enum
NtUserCallWinEventHook, NtUserCallWinEventHook,
NtUserCallWinProc, NtUserCallWinProc,
NtUserCallWindowsHook, NtUserCallWindowsHook,
NtUserFreeCachedClipboardData,
NtUserLoadDriver, NtUserLoadDriver,
NtUserRenderSynthesizedFormat,
/* win16 hooks */ /* win16 hooks */
NtUserCallFreeIcon, NtUserCallFreeIcon,
NtUserThunkLock, NtUserThunkLock,
...@@ -140,6 +142,20 @@ struct win_hook_params ...@@ -140,6 +142,20 @@ struct win_hook_params
WCHAR module[MAX_PATH]; WCHAR module[MAX_PATH];
}; };
/* NtUserFreeCachedClipboardData params */
struct free_cached_data_params
{
UINT format;
HANDLE handle;
};
/* NtUserRenderSynthesizedFormat params */
struct render_synthesized_format_params
{
UINT format;
UINT from;
};
/* process DPI awareness contexts */ /* process DPI awareness contexts */
#define NTUSER_DPI_UNAWARE 0x00006010 #define NTUSER_DPI_UNAWARE 0x00006010
#define NTUSER_DPI_SYSTEM_AWARE 0x00006011 #define NTUSER_DPI_SYSTEM_AWARE 0x00006011
...@@ -237,11 +253,19 @@ struct client_menu_name ...@@ -237,11 +253,19 @@ struct client_menu_name
/* NtUserGetClipboardData params, not compatible with Windows */ /* NtUserGetClipboardData params, not compatible with Windows */
struct get_clipboard_params struct get_clipboard_params
{ {
void *data;
size_t size;
size_t data_size;
UINT seqno;
}; };
/* NtUserSetClipboardData params, not compatible with Windows */ /* NtUserSetClipboardData params, not compatible with Windows */
struct set_clipboard_params struct set_clipboard_params
{ {
void *data;
size_t size;
BOOL cache_only;
UINT seqno;
}; };
/* internal messages codes */ /* internal messages codes */
...@@ -624,7 +648,6 @@ enum ...@@ -624,7 +648,6 @@ enum
/* temporary exports */ /* temporary exports */
NtUserExitingThread, NtUserExitingThread,
NtUserThreadDetach, NtUserThreadDetach,
NtUserUpdateClipboard,
}; };
static inline HWND NtUserGetDesktopWindow(void) static inline HWND NtUserGetDesktopWindow(void)
......
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