Commit 357d8654 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserChangeClipboardChain implementation from user32.

parent c38e287b
...@@ -703,33 +703,6 @@ BOOL WINAPI EmptyClipboard(void) ...@@ -703,33 +703,6 @@ BOOL WINAPI EmptyClipboard(void)
/************************************************************************** /**************************************************************************
* ChangeClipboardChain (USER32.@)
*/
BOOL WINAPI ChangeClipboardChain( HWND hwnd, HWND next )
{
NTSTATUS status;
HWND viewer;
if (!hwnd) return FALSE;
SERVER_START_REQ( set_clipboard_viewer )
{
req->viewer = wine_server_user_handle( next );
req->previous = wine_server_user_handle( hwnd );
status = wine_server_call( req );
viewer = wine_server_ptr_handle( reply->old_viewer );
}
SERVER_END_REQ;
if (status == STATUS_PENDING)
return !SendMessageW( viewer, WM_CHANGECBCHAIN, (WPARAM)hwnd, (LPARAM)next );
if (status) SetLastError( RtlNtStatusToDosError( status ));
return !status;
}
/**************************************************************************
* SetClipboardData (USER32.@) * SetClipboardData (USER32.@)
*/ */
HANDLE WINAPI SetClipboardData( UINT format, HANDLE data ) HANDLE WINAPI SetClipboardData( UINT format, HANDLE data )
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
@ stdcall CallWindowProcW(ptr long long long long) @ stdcall CallWindowProcW(ptr long long long long)
@ stdcall CascadeChildWindows(long long) @ stdcall CascadeChildWindows(long long)
@ stdcall CascadeWindows(long long ptr long ptr) @ stdcall CascadeWindows(long long ptr long ptr)
@ stdcall ChangeClipboardChain(long long) @ stdcall ChangeClipboardChain(long long) NtUserChangeClipboardChain
@ stdcall ChangeDisplaySettingsA(ptr long) @ stdcall ChangeDisplaySettingsA(ptr long)
@ stdcall ChangeDisplaySettingsExA(str ptr long long ptr) @ stdcall ChangeDisplaySettingsExA(str ptr long long ptr)
@ stdcall ChangeDisplaySettingsExW(wstr ptr long long ptr) @ stdcall ChangeDisplaySettingsExW(wstr ptr long long ptr)
......
...@@ -275,6 +275,32 @@ HWND WINAPI NtUserGetClipboardViewer(void) ...@@ -275,6 +275,32 @@ HWND WINAPI NtUserGetClipboardViewer(void)
} }
/************************************************************************** /**************************************************************************
* NtUserChangeClipboardChain (win32u.@)
*/
BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next )
{
NTSTATUS status;
HWND viewer;
if (!hwnd) return FALSE;
SERVER_START_REQ( set_clipboard_viewer )
{
req->viewer = wine_server_user_handle( next );
req->previous = wine_server_user_handle( hwnd );
status = wine_server_call( req );
viewer = wine_server_ptr_handle( reply->old_viewer );
}
SERVER_END_REQ;
if (status == STATUS_PENDING)
return !send_message( viewer, WM_CHANGECBCHAIN, (WPARAM)hwnd, (LPARAM)next );
if (status) SetLastError( RtlNtStatusToDosError( status ));
return !status;
}
/**************************************************************************
* NtUserGetOpenClipboardWindow (win32u.@) * NtUserGetOpenClipboardWindow (win32u.@)
*/ */
HWND WINAPI NtUserGetOpenClipboardWindow(void) HWND WINAPI NtUserGetOpenClipboardWindow(void)
......
...@@ -1139,6 +1139,7 @@ static struct unix_funcs unix_funcs = ...@@ -1139,6 +1139,7 @@ static struct unix_funcs unix_funcs =
NtUserCallNoParam, NtUserCallNoParam,
NtUserCallOneParam, NtUserCallOneParam,
NtUserCallTwoParam, NtUserCallTwoParam,
NtUserChangeClipboardChain,
NtUserChangeDisplaySettings, NtUserChangeDisplaySettings,
NtUserClipCursor, NtUserClipCursor,
NtUserCloseClipboard, NtUserCloseClipboard,
......
...@@ -782,7 +782,7 @@ ...@@ -782,7 +782,7 @@
@ stdcall NtUserCallOneParam(long long) @ stdcall NtUserCallOneParam(long long)
@ stdcall NtUserCallTwoParam(long long long) @ stdcall NtUserCallTwoParam(long long long)
@ stub NtUserCanBrokerForceForeground @ stub NtUserCanBrokerForceForeground
@ stub NtUserChangeClipboardChain @ stdcall NtUserChangeClipboardChain(long long)
@ stdcall NtUserChangeDisplaySettings(ptr ptr long long ptr) @ stdcall NtUserChangeDisplaySettings(ptr ptr long long ptr)
@ stub NtUserChangeWindowMessageFilterEx @ stub NtUserChangeWindowMessageFilterEx
@ stub NtUserCheckAccessForIntegrityLevel @ stub NtUserCheckAccessForIntegrityLevel
......
...@@ -191,6 +191,7 @@ struct unix_funcs ...@@ -191,6 +191,7 @@ struct unix_funcs
ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code ); ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code );
ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code ); ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code );
ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
BOOL (WINAPI *pNtUserChangeClipboardChain)( HWND hwnd, HWND next );
LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam ); DWORD flags, void *lparam );
BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect ); BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect );
......
...@@ -755,6 +755,12 @@ BOOL WINAPI NtUserCloseClipboard(void) ...@@ -755,6 +755,12 @@ BOOL WINAPI NtUserCloseClipboard(void)
return unix_funcs->pNtUserCloseClipboard(); return unix_funcs->pNtUserCloseClipboard();
} }
BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next )
{
if (!unix_funcs) return DISP_CHANGE_FAILED;
return unix_funcs->pNtUserChangeClipboardChain( hwnd, next );
}
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam ) DWORD flags, void *lparam )
{ {
......
...@@ -417,6 +417,7 @@ LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARA ...@@ -417,6 +417,7 @@ LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARA
ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ); ULONG_PTR WINAPI NtUserCallNoParam( ULONG code );
ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ); ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code );
ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next );
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
DWORD flags, void *lparam ); DWORD flags, void *lparam );
DWORD WINAPI NtUserCheckMenuItem( HMENU handle, UINT id, UINT flags ); DWORD WINAPI NtUserCheckMenuItem( HMENU handle, UINT id, UINT flags );
......
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