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

win32u: Move NtUserGetLayeredWindowAttributes implementation from user32.

parent d5f7ab4c
......@@ -325,7 +325,7 @@
@ stdcall GetKeyboardType(long)
@ stdcall GetLastActivePopup(long)
@ stdcall GetLastInputInfo(ptr)
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr)
@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes
@ stdcall GetListBoxInfo(long)
@ stdcall GetMenu(long)
@ stdcall GetMenuBarInfo(long long long ptr)
......
......@@ -4065,29 +4065,6 @@ BOOL WINAPI SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
/*****************************************************************************
* GetLayeredWindowAttributes (USER32.@)
*/
BOOL WINAPI GetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags )
{
BOOL ret;
SERVER_START_REQ( get_window_layered_info )
{
req->handle = wine_server_user_handle( hwnd );
if ((ret = !wine_server_call_err( req )))
{
if (key) *key = reply->color_key;
if (alpha) *alpha = reply->alpha;
if (flags) *flags = reply->flags;
}
}
SERVER_END_REQ;
return ret;
}
/*****************************************************************************
* UpdateLayeredWindowIndirect (USER32.@)
*/
BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info )
......@@ -4100,7 +4077,7 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF
info->cbSize != sizeof(*info) ||
info->dwFlags & ~(ULW_COLORKEY | ULW_ALPHA | ULW_OPAQUE | ULW_EX_NORESIZE) ||
!(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) ||
GetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))
NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
......
......@@ -2199,7 +2199,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
/* create or update window surface for top-level windows if the driver doesn't implement WindowPosChanging */
if (!ret && new_surface && !IsRectEmpty( &visible_rect ) &&
(!(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) ||
GetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )))
NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )))
{
window_surface_release( new_surface );
if ((new_surface = win->surface)) window_surface_add_ref( new_surface );
......
......@@ -37,6 +37,7 @@ C_SRCS = \
syscall.c \
vertical.c \
vulkan.c \
window.c \
winstation.c \
wrappers.c
......
......@@ -24,10 +24,6 @@
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ntgdi.h"
#include "win32u_private.h"
/* extra stock object: default 1x1 bitmap for memory DCs */
......
......@@ -105,6 +105,7 @@ static void * const syscalls[] =
NtUserCloseWindowStation,
NtUserCreateDesktopEx,
NtUserCreateWindowStation,
NtUserGetLayeredWindowAttributes,
NtUserGetObjectInformation,
NtUserGetProcessWindowStation,
NtUserGetThreadDesktop,
......
......@@ -950,7 +950,7 @@
@ stub NtUserGetKeyboardLayoutList
@ stub NtUserGetKeyboardLayoutName
@ stub NtUserGetKeyboardState
@ stub NtUserGetLayeredWindowAttributes
@ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr)
@ stub NtUserGetListBoxInfo
@ stub NtUserGetMenuBarInfo
@ stub NtUserGetMenuIndex
......
......@@ -21,9 +21,14 @@
#ifndef __WINE_WIN32U_PRIVATE
#define __WINE_WIN32U_PRIVATE
#include "winuser.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ntgdi.h"
#include "ntuser.h"
#include "wine/gdi_driver.h"
#include "wine/unixlib.h"
#include "wine/debug.h"
struct user_callbacks
{
......
/*
* Window related functions
*
* Copyright 1993, 1994 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "win32u_private.h"
#include "wine/server.h"
/*****************************************************************************
* NtUserGetLayeredWindowAttributes (win32u.@)
*/
BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags )
{
BOOL ret;
SERVER_START_REQ( get_window_layered_info )
{
req->handle = wine_server_user_handle( hwnd );
if ((ret = !wine_server_call_err( req )))
{
if (key) *key = reply->color_key;
if (alpha) *alpha = reply->alpha;
if (flags) *flags = reply->flags;
}
}
SERVER_END_REQ;
return ret;
}
......@@ -92,6 +92,7 @@
SYSCALL_ENTRY( NtUserCloseWindowStation ) \
SYSCALL_ENTRY( NtUserCreateDesktopEx ) \
SYSCALL_ENTRY( NtUserCreateWindowStation ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
......
......@@ -155,3 +155,13 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args )
return NtUserSetObjectInformation( handle, index, info, len );
}
NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args )
{
HWND hwnd = get_handle( &args );
COLORREF *key = get_ptr( &args );
BYTE *alpha = get_ptr( &args );
DWORD *flags = get_ptr( &args );
return NtUserGetLayeredWindowAttributes( hwnd, key, alpha, flags );
}
......@@ -30,6 +30,7 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *d
ULONG heap_size );
HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3,
ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 );
BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags );
BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info,
DWORD len, DWORD *needed );
HWINSTA WINAPI NtUserGetProcessWindowStation(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