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