wine/dlls/win32u/message.c

68 lines
2.3 KiB
C
Raw Normal View History

/*
* Window messaging support
*
* Copyright 2001 Alexandre Julliard
* Copyright 2008 Maarten Lankhorst
*
* 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"
/**********************************************************************
* NtUserGetGUIThreadInfo (win32u.@)
*/
BOOL WINAPI NtUserGetGUIThreadInfo( DWORD id, GUITHREADINFO *info )
{
BOOL ret;
if (info->cbSize != sizeof(*info))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
SERVER_START_REQ( get_thread_input )
{
req->tid = id;
if ((ret = !wine_server_call_err( req )))
{
info->flags = 0;
info->hwndActive = wine_server_ptr_handle( reply->active );
info->hwndFocus = wine_server_ptr_handle( reply->focus );
info->hwndCapture = wine_server_ptr_handle( reply->capture );
info->hwndMenuOwner = wine_server_ptr_handle( reply->menu_owner );
info->hwndMoveSize = wine_server_ptr_handle( reply->move_size );
info->hwndCaret = wine_server_ptr_handle( reply->caret );
info->rcCaret.left = reply->rect.left;
info->rcCaret.top = reply->rect.top;
info->rcCaret.right = reply->rect.right;
info->rcCaret.bottom = reply->rect.bottom;
if (reply->menu_owner) info->flags |= GUI_INMENUMODE;
if (reply->move_size) info->flags |= GUI_INMOVESIZE;
if (reply->caret) info->flags |= GUI_CARETBLINKING;
}
}
SERVER_END_REQ;
return ret;
}