win32u: Move NtUserSetLayeredWindowAttributes 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>
This commit is contained in:
parent
b5ddd14448
commit
7e62ec6143
|
@ -108,10 +108,6 @@ static void CDECL nulldrv_SetFocus( HWND hwnd )
|
|||
{
|
||||
}
|
||||
|
||||
static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
}
|
||||
|
||||
static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
|
||||
{
|
||||
}
|
||||
|
@ -187,11 +183,6 @@ static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT
|
|||
load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags );
|
||||
}
|
||||
|
||||
static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
||||
}
|
||||
|
||||
static BOOL CDECL loaderdrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
||||
const RECT *window_rect )
|
||||
{
|
||||
|
@ -234,7 +225,7 @@ static struct user_driver_funcs lazy_load_driver =
|
|||
NULL,
|
||||
nulldrv_SetCapture,
|
||||
nulldrv_SetFocus,
|
||||
loaderdrv_SetLayeredWindowAttributes,
|
||||
NULL,
|
||||
nulldrv_SetParent,
|
||||
NULL,
|
||||
nulldrv_SetWindowIcon,
|
||||
|
@ -281,7 +272,6 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v
|
|||
SET_USER_FUNC(ReleaseDC);
|
||||
SET_USER_FUNC(SetCapture);
|
||||
SET_USER_FUNC(SetFocus);
|
||||
SET_USER_FUNC(SetLayeredWindowAttributes);
|
||||
SET_USER_FUNC(SetParent);
|
||||
SET_USER_FUNC(SetWindowIcon);
|
||||
SET_USER_FUNC(SetWindowStyle);
|
||||
|
|
|
@ -675,7 +675,7 @@
|
|||
@ stdcall SetInternalWindowPos(long long ptr ptr)
|
||||
@ stdcall SetKeyboardState(ptr) NtUserSetKeyboardState
|
||||
@ stdcall SetLastErrorEx(long long)
|
||||
@ stdcall SetLayeredWindowAttributes(ptr long long long)
|
||||
@ stdcall SetLayeredWindowAttributes(ptr long long long) NtUserSetLayeredWindowAttributes
|
||||
@ stdcall SetLogonNotifyWindow(long long)
|
||||
@ stdcall SetMenu(long long)
|
||||
@ stdcall SetMenuContextHelpId(long long)
|
||||
|
|
|
@ -3251,35 +3251,6 @@ BOOL CDECL __wine_set_pixel_format( HWND hwnd, int format )
|
|||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* SetLayeredWindowAttributes (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
TRACE("(%p,%08x,%d,%x)\n", hwnd, key, alpha, flags);
|
||||
|
||||
SERVER_START_REQ( set_window_layered_info )
|
||||
{
|
||||
req->handle = wine_server_user_handle( hwnd );
|
||||
req->color_key = key;
|
||||
req->alpha = alpha;
|
||||
req->flags = flags;
|
||||
ret = !wine_server_call_err( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
if (ret)
|
||||
{
|
||||
USER_Driver->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
||||
update_window_state( hwnd );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* UpdateLayeredWindowIndirect (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -1137,6 +1137,11 @@ static void CDECL loaderdrv_FlashWindowEx( FLASHWINFO *info )
|
|||
load_driver()->pFlashWindowEx( info );
|
||||
}
|
||||
|
||||
static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
||||
}
|
||||
|
||||
static void CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
|
||||
{
|
||||
load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
|
||||
|
@ -1174,6 +1179,7 @@ static const struct user_driver_funcs lazy_load_driver =
|
|||
/* windowing functions */
|
||||
.pCreateDesktopWindow = loaderdrv_CreateDesktopWindow,
|
||||
.pFlashWindowEx = loaderdrv_FlashWindowEx,
|
||||
.pSetLayeredWindowAttributes = loaderdrv_SetLayeredWindowAttributes,
|
||||
.pSetWindowRgn = loaderdrv_SetWindowRgn,
|
||||
.pMsgWaitForMultipleObjectsEx = nulldrv_MsgWaitForMultipleObjectsEx,
|
||||
.pScrollDC = nulldrv_ScrollDC,
|
||||
|
|
|
@ -1188,6 +1188,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtUserSetCursor,
|
||||
NtUserSetCursorIconData,
|
||||
NtUserSetCursorPos,
|
||||
NtUserSetLayeredWindowAttributes,
|
||||
NtUserSetSysColors,
|
||||
NtUserSetWindowPos,
|
||||
NtUserSetWindowRgn,
|
||||
|
|
|
@ -1203,7 +1203,7 @@
|
|||
@ stub NtUserSetInteractiveCtrlRotationAngle
|
||||
@ stub NtUserSetInternalWindowPos
|
||||
@ stdcall -syscall NtUserSetKeyboardState(ptr)
|
||||
@ stub NtUserSetLayeredWindowAttributes
|
||||
@ stdcall NtUserSetLayeredWindowAttributes(ptr long long long)
|
||||
@ stub NtUserSetMagnificationDesktopMagnifierOffsetsDWMUpdated
|
||||
@ stub NtUserSetManipulationInputTarget
|
||||
@ stub NtUserSetMenu
|
||||
|
|
|
@ -234,6 +234,7 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module,
|
||||
UNICODE_STRING *res_name, struct cursoricon_desc *desc );
|
||||
BOOL (WINAPI *pNtUserSetCursorPos)( INT x, INT y );
|
||||
BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
|
||||
BOOL (WINAPI *pNtUserSetSysColors)( INT count, const INT *colors, const COLORREF *values );
|
||||
BOOL (WINAPI *pNtUserSetWindowPos)( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags );
|
||||
int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw );
|
||||
|
|
|
@ -1309,6 +1309,34 @@ BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *al
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* NtUserSetLayeredWindowAttributes (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
TRACE( "(%p,%08x,%d,%x)\n", hwnd, key, alpha, flags );
|
||||
|
||||
SERVER_START_REQ( set_window_layered_info )
|
||||
{
|
||||
req->handle = wine_server_user_handle( hwnd );
|
||||
req->color_key = key;
|
||||
req->alpha = alpha;
|
||||
req->flags = flags;
|
||||
ret = !wine_server_call_err( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
if (ret)
|
||||
{
|
||||
user_driver->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
||||
update_window_state( hwnd );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* list_children_from_point
|
||||
*
|
||||
|
|
|
@ -940,6 +940,12 @@ BOOL WINAPI NtUserSetCursorPos( INT x, INT y )
|
|||
return unix_funcs->pNtUserSetCursorPos( x, y );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
||||
{
|
||||
if (!unix_funcs) return FALSE;
|
||||
return unix_funcs->pNtUserSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values )
|
||||
{
|
||||
if (!unix_funcs) return FALSE;
|
||||
|
|
|
@ -367,6 +367,7 @@ BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module,
|
|||
struct cursoricon_desc *desc );
|
||||
BOOL WINAPI NtUserSetCursorPos( INT x, INT y );
|
||||
BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
|
||||
BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
|
||||
BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
|
||||
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
|
||||
BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
|
||||
|
|
Loading…
Reference in New Issue