2005-07-18 17:14:56 +02:00
|
|
|
/*
|
|
|
|
* USER driver support
|
|
|
|
*
|
|
|
|
* Copyright 2000, 2005 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-07-18 17:14:56 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2012-09-27 18:13:01 +02:00
|
|
|
#include "wingdi.h"
|
2005-07-18 17:14:56 +02:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "wine/debug.h"
|
2012-10-22 15:06:59 +02:00
|
|
|
#include "wine/gdi_driver.h"
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2006-09-10 11:09:26 +02:00
|
|
|
#include "user_private.h"
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2008-04-24 11:53:58 +02:00
|
|
|
static USER_DRIVER null_driver, lazy_load_driver;
|
2005-07-18 17:14:56 +02:00
|
|
|
|
|
|
|
const USER_DRIVER *USER_Driver = &lazy_load_driver;
|
2006-04-03 15:46:35 +02:00
|
|
|
static DWORD driver_load_error;
|
2005-07-18 17:14:56 +02:00
|
|
|
|
|
|
|
/* load the graphics driver */
|
|
|
|
static const USER_DRIVER *load_driver(void)
|
|
|
|
{
|
2012-10-22 15:06:59 +02:00
|
|
|
static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
|
|
|
|
HDC hdc;
|
2005-07-18 17:14:56 +02:00
|
|
|
void *ptr;
|
|
|
|
HMODULE graphics_driver;
|
|
|
|
USER_DRIVER *driver, *prev;
|
|
|
|
|
|
|
|
driver = HeapAlloc( GetProcessHeap(), 0, sizeof(*driver) );
|
2008-03-19 22:50:38 +01:00
|
|
|
*driver = null_driver;
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2012-10-22 15:06:59 +02:00
|
|
|
hdc = CreateDCW( displayW, NULL, NULL, NULL );
|
|
|
|
|
|
|
|
graphics_driver = __wine_get_driver_module( hdc );
|
2005-10-31 16:54:55 +01:00
|
|
|
if (graphics_driver)
|
|
|
|
{
|
2005-07-18 17:14:56 +02:00
|
|
|
#define GET_USER_FUNC(name) \
|
|
|
|
do { if ((ptr = GetProcAddress( graphics_driver, #name ))) driver->p##name = ptr; } while(0)
|
|
|
|
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(ActivateKeyboardLayout);
|
|
|
|
GET_USER_FUNC(Beep);
|
|
|
|
GET_USER_FUNC(GetAsyncKeyState);
|
|
|
|
GET_USER_FUNC(GetKeyNameText);
|
|
|
|
GET_USER_FUNC(GetKeyboardLayout);
|
|
|
|
GET_USER_FUNC(GetKeyboardLayoutName);
|
|
|
|
GET_USER_FUNC(LoadKeyboardLayout);
|
|
|
|
GET_USER_FUNC(MapVirtualKeyEx);
|
2011-06-23 19:34:26 +02:00
|
|
|
GET_USER_FUNC(RegisterHotKey);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(ToUnicodeEx);
|
|
|
|
GET_USER_FUNC(UnloadKeyboardLayout);
|
2011-06-23 19:34:26 +02:00
|
|
|
GET_USER_FUNC(UnregisterHotKey);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(VkKeyScanEx);
|
2010-04-20 14:10:46 +02:00
|
|
|
GET_USER_FUNC(CreateCursorIcon);
|
|
|
|
GET_USER_FUNC(DestroyCursorIcon);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(SetCursor);
|
|
|
|
GET_USER_FUNC(GetCursorPos);
|
|
|
|
GET_USER_FUNC(SetCursorPos);
|
2007-01-04 20:24:50 +01:00
|
|
|
GET_USER_FUNC(ClipCursor);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(AcquireClipboard);
|
|
|
|
GET_USER_FUNC(EmptyClipboard);
|
|
|
|
GET_USER_FUNC(SetClipboardData);
|
|
|
|
GET_USER_FUNC(GetClipboardData);
|
|
|
|
GET_USER_FUNC(CountClipboardFormats);
|
|
|
|
GET_USER_FUNC(EnumClipboardFormats);
|
|
|
|
GET_USER_FUNC(IsClipboardFormatAvailable);
|
|
|
|
GET_USER_FUNC(EndClipboardUpdate);
|
|
|
|
GET_USER_FUNC(ChangeDisplaySettingsEx);
|
2006-10-23 13:51:30 +02:00
|
|
|
GET_USER_FUNC(EnumDisplayMonitors);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(EnumDisplaySettingsEx);
|
2006-10-23 13:51:30 +02:00
|
|
|
GET_USER_FUNC(GetMonitorInfo);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(CreateDesktopWindow);
|
|
|
|
GET_USER_FUNC(CreateWindow);
|
|
|
|
GET_USER_FUNC(DestroyWindow);
|
2008-02-25 15:59:19 +01:00
|
|
|
GET_USER_FUNC(GetDC);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
|
|
|
|
GET_USER_FUNC(ReleaseDC);
|
|
|
|
GET_USER_FUNC(ScrollDC);
|
2008-03-12 14:55:28 +01:00
|
|
|
GET_USER_FUNC(SetCapture);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(SetFocus);
|
2008-09-12 15:43:27 +02:00
|
|
|
GET_USER_FUNC(SetLayeredWindowAttributes);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(SetParent);
|
|
|
|
GET_USER_FUNC(SetWindowRgn);
|
|
|
|
GET_USER_FUNC(SetWindowIcon);
|
|
|
|
GET_USER_FUNC(SetWindowStyle);
|
|
|
|
GET_USER_FUNC(SetWindowText);
|
2008-07-30 16:13:28 +02:00
|
|
|
GET_USER_FUNC(ShowWindow);
|
2008-04-10 15:43:24 +02:00
|
|
|
GET_USER_FUNC(SysCommand);
|
2012-09-27 18:13:01 +02:00
|
|
|
GET_USER_FUNC(UpdateLayeredWindow);
|
2005-10-31 16:54:55 +01:00
|
|
|
GET_USER_FUNC(WindowMessage);
|
2008-07-02 15:40:10 +02:00
|
|
|
GET_USER_FUNC(WindowPosChanging);
|
|
|
|
GET_USER_FUNC(WindowPosChanged);
|
2012-11-15 17:38:21 +01:00
|
|
|
GET_USER_FUNC(SystemParametersInfo);
|
2005-07-18 17:14:56 +02:00
|
|
|
#undef GET_USER_FUNC
|
2005-10-31 16:54:55 +01:00
|
|
|
}
|
2012-10-22 15:06:59 +02:00
|
|
|
else driver_load_error = GetLastError();
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2008-04-24 11:53:58 +02:00
|
|
|
prev = InterlockedCompareExchangePointer( (void **)&USER_Driver, driver, &lazy_load_driver );
|
2005-07-18 17:14:56 +02:00
|
|
|
if (prev != &lazy_load_driver)
|
|
|
|
{
|
|
|
|
/* another thread beat us to it */
|
|
|
|
HeapFree( GetProcessHeap(), 0, driver );
|
|
|
|
driver = prev;
|
|
|
|
}
|
2012-10-22 15:06:59 +02:00
|
|
|
else LdrAddRefDll( 0, graphics_driver );
|
|
|
|
|
|
|
|
DeleteDC( hdc );
|
2005-07-18 17:14:56 +02:00
|
|
|
return driver;
|
|
|
|
}
|
|
|
|
|
2005-08-10 11:56:23 +02:00
|
|
|
/* unload the graphics driver on process exit */
|
|
|
|
void USER_unload_driver(void)
|
|
|
|
{
|
2009-01-10 21:56:21 +01:00
|
|
|
USER_DRIVER *prev;
|
2005-08-10 11:56:23 +02:00
|
|
|
/* make sure we don't try to call the driver after it has been detached */
|
2009-01-10 21:56:21 +01:00
|
|
|
prev = InterlockedExchangePointer( (void **)&USER_Driver, &null_driver );
|
|
|
|
if (prev != &lazy_load_driver && prev != &null_driver)
|
|
|
|
HeapFree( GetProcessHeap(), 0, prev );
|
2005-08-10 11:56:23 +02:00
|
|
|
}
|
|
|
|
|
2005-07-18 17:14:56 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Null user driver
|
|
|
|
*
|
|
|
|
* These are fallbacks for entry points that are not implemented in the real driver.
|
|
|
|
*/
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static HKL CDECL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_Beep(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static SHORT CDECL nulldrv_GetAsyncKeyState( INT key )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2011-02-28 21:55:01 +01:00
|
|
|
return -1;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-10 05:41:34 +01:00
|
|
|
static HKL CDECL nulldrv_GetKeyboardLayout( DWORD thread_id )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-06-23 19:34:26 +02:00
|
|
|
static BOOL CDECL nulldrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
|
|
|
|
int size, UINT flags, HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-06-23 19:34:26 +02:00
|
|
|
static void CDECL nulldrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static SHORT CDECL nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2010-05-21 13:30:15 +02:00
|
|
|
static void CDECL nulldrv_CreateCursorIcon( HCURSOR cursor )
|
2010-04-20 14:10:46 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void CDECL nulldrv_DestroyCursorIcon( HCURSOR cursor )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-04-20 21:14:31 +02:00
|
|
|
static void CDECL nulldrv_SetCursor( HCURSOR cursor )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_GetCursorPos( LPPOINT pt )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_SetCursorPos( INT x, INT y )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_ClipCursor( LPCRECT clip )
|
2007-01-04 20:24:50 +01:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL nulldrv_AcquireClipboard( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2006-06-05 17:55:14 +02:00
|
|
|
return 0;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_CountClipboardFormats(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_EmptyClipboard( BOOL keepunowned )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_EndClipboardUpdate(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL nulldrv_EnumClipboardFormats( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-12-22 21:18:40 +01:00
|
|
|
static HANDLE CDECL nulldrv_GetClipboardData( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2009-12-22 21:18:40 +01:00
|
|
|
return 0;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_IsClipboardFormatAvailable( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2009-12-22 21:18:40 +01:00
|
|
|
static BOOL CDECL nulldrv_SetClipboardData( UINT format, HANDLE handle, BOOL owner )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LONG CDECL nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
|
2005-07-18 17:14:56 +02:00
|
|
|
DWORD flags, LPVOID lparam )
|
|
|
|
{
|
|
|
|
return DISP_CHANGE_FAILED;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
|
2006-10-23 13:51:30 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
|
2006-10-23 13:51:30 +02:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_CreateDesktopWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2005-10-31 16:54:55 +01:00
|
|
|
static int warned;
|
2013-04-02 12:46:39 +02:00
|
|
|
HWND parent = GetAncestor( hwnd, GA_PARENT );
|
2009-10-23 12:23:51 +02:00
|
|
|
|
|
|
|
/* HWND_MESSAGE windows don't need a graphics driver */
|
2013-04-02 12:46:39 +02:00
|
|
|
if (!parent || parent == get_user_thread_info()->msg_window) return TRUE;
|
2009-10-23 12:23:51 +02:00
|
|
|
if (warned++) return FALSE;
|
2006-04-03 15:46:35 +02:00
|
|
|
|
|
|
|
MESSAGE( "Application tried to create a window, but no driver could be loaded.\n");
|
|
|
|
switch (driver_load_error)
|
|
|
|
{
|
|
|
|
case ERROR_MOD_NOT_FOUND:
|
2012-10-22 15:06:59 +02:00
|
|
|
MESSAGE( "The graphics driver is missing. Check your build!\n" );
|
2006-04-03 15:46:35 +02:00
|
|
|
break;
|
|
|
|
case ERROR_DLL_INIT_FAILED:
|
|
|
|
MESSAGE( "Make sure that your X server is running and that $DISPLAY is set correctly.\n" );
|
|
|
|
break;
|
|
|
|
default:
|
2006-09-30 00:25:15 +02:00
|
|
|
MESSAGE( "Unknown error (%d).\n", driver_load_error );
|
2006-04-03 15:46:35 +02:00
|
|
|
}
|
2005-10-31 16:54:55 +01:00
|
|
|
|
|
|
|
return FALSE;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_DestroyWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
|
|
|
|
const RECT *top_rect, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static DWORD CDECL nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
|
|
|
|
DWORD mask, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return WaitForMultipleObjectsEx( count, handles, flags & MWMO_WAITALL,
|
|
|
|
timeout, flags & MWMO_ALERTABLE );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-04-19 12:27:59 +02:00
|
|
|
static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2013-04-19 12:27:59 +02:00
|
|
|
RECT rect;
|
|
|
|
|
|
|
|
GetClipBox( hdc, &rect );
|
|
|
|
return BitBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
|
|
|
hdc, rect.left - dx, rect.top - dy, SRCCOPY );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags )
|
2008-03-12 14:55:28 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetFocus( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
2008-09-12 15:43:27 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static int CDECL nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
|
2008-07-30 16:13:28 +02:00
|
|
|
{
|
|
|
|
return swp;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-04-10 15:43:24 +02:00
|
|
|
return -1;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2012-09-27 18:13:01 +02:00
|
|
|
static BOOL CDECL nulldrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
|
|
|
const RECT *window_rect )
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LRESULT CDECL nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|
|
|
const RECT *window_rect, const RECT *client_rect,
|
2012-09-06 12:32:52 +02:00
|
|
|
RECT *visible_rect, struct window_surface **surface )
|
2008-07-02 15:40:10 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|
|
|
const RECT *window_rect, const RECT *client_rect,
|
2012-09-06 12:32:52 +02:00
|
|
|
const RECT *visible_rect, const RECT *valid_rects,
|
|
|
|
struct window_surface *surface )
|
2008-07-02 15:40:10 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-11-15 17:38:21 +01:00
|
|
|
static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, UINT flags )
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-04-24 11:53:58 +02:00
|
|
|
static USER_DRIVER null_driver =
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
/* keyboard functions */
|
|
|
|
nulldrv_ActivateKeyboardLayout,
|
|
|
|
nulldrv_Beep,
|
|
|
|
nulldrv_GetAsyncKeyState,
|
|
|
|
nulldrv_GetKeyNameText,
|
|
|
|
nulldrv_GetKeyboardLayout,
|
|
|
|
nulldrv_GetKeyboardLayoutName,
|
|
|
|
nulldrv_LoadKeyboardLayout,
|
|
|
|
nulldrv_MapVirtualKeyEx,
|
2011-06-23 19:34:26 +02:00
|
|
|
nulldrv_RegisterHotKey,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_ToUnicodeEx,
|
|
|
|
nulldrv_UnloadKeyboardLayout,
|
2011-06-23 19:34:26 +02:00
|
|
|
nulldrv_UnregisterHotKey,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_VkKeyScanEx,
|
2010-04-20 14:10:46 +02:00
|
|
|
/* cursor/icon functions */
|
|
|
|
nulldrv_CreateCursorIcon,
|
|
|
|
nulldrv_DestroyCursorIcon,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_SetCursor,
|
|
|
|
nulldrv_GetCursorPos,
|
|
|
|
nulldrv_SetCursorPos,
|
2007-01-04 20:24:50 +01:00
|
|
|
nulldrv_ClipCursor,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* clipboard functions */
|
|
|
|
nulldrv_AcquireClipboard,
|
|
|
|
nulldrv_CountClipboardFormats,
|
|
|
|
nulldrv_EmptyClipboard,
|
|
|
|
nulldrv_EndClipboardUpdate,
|
|
|
|
nulldrv_EnumClipboardFormats,
|
|
|
|
nulldrv_GetClipboardData,
|
|
|
|
nulldrv_IsClipboardFormatAvailable,
|
|
|
|
nulldrv_SetClipboardData,
|
|
|
|
/* display modes */
|
|
|
|
nulldrv_ChangeDisplaySettingsEx,
|
2006-10-23 13:51:30 +02:00
|
|
|
nulldrv_EnumDisplayMonitors,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_EnumDisplaySettingsEx,
|
2006-10-23 13:51:30 +02:00
|
|
|
nulldrv_GetMonitorInfo,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* windowing functions */
|
|
|
|
nulldrv_CreateDesktopWindow,
|
|
|
|
nulldrv_CreateWindow,
|
|
|
|
nulldrv_DestroyWindow,
|
2008-02-25 15:59:19 +01:00
|
|
|
nulldrv_GetDC,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_MsgWaitForMultipleObjectsEx,
|
|
|
|
nulldrv_ReleaseDC,
|
|
|
|
nulldrv_ScrollDC,
|
2008-03-12 14:55:28 +01:00
|
|
|
nulldrv_SetCapture,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_SetFocus,
|
2008-09-12 15:43:27 +02:00
|
|
|
nulldrv_SetLayeredWindowAttributes,
|
2005-07-18 17:14:56 +02:00
|
|
|
nulldrv_SetParent,
|
|
|
|
nulldrv_SetWindowRgn,
|
|
|
|
nulldrv_SetWindowIcon,
|
|
|
|
nulldrv_SetWindowStyle,
|
|
|
|
nulldrv_SetWindowText,
|
2008-07-30 16:13:28 +02:00
|
|
|
nulldrv_ShowWindow,
|
2008-04-10 15:43:24 +02:00
|
|
|
nulldrv_SysCommand,
|
2012-09-27 18:13:01 +02:00
|
|
|
nulldrv_UpdateLayeredWindow,
|
2008-07-02 15:40:10 +02:00
|
|
|
nulldrv_WindowMessage,
|
|
|
|
nulldrv_WindowPosChanging,
|
2012-11-15 17:38:21 +01:00
|
|
|
nulldrv_WindowPosChanged,
|
|
|
|
/* system parameters */
|
|
|
|
nulldrv_SystemParametersInfo
|
2005-07-18 17:14:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Lazy loading user driver
|
|
|
|
*
|
|
|
|
* Initial driver used before another driver is loaded.
|
|
|
|
* Each entry point simply loads the real driver and chains to it.
|
|
|
|
*/
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static HKL CDECL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pActivateKeyboardLayout( layout, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_Beep(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pBeep();
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static SHORT CDECL loaderdrv_GetAsyncKeyState( INT key )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pGetAsyncKeyState( key );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pGetKeyNameText( lparam, buffer, size );
|
|
|
|
}
|
|
|
|
|
2011-02-10 05:41:34 +01:00
|
|
|
static HKL CDECL loaderdrv_GetKeyboardLayout( DWORD thread_id )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2011-02-10 05:41:34 +01:00
|
|
|
return load_driver()->pGetKeyboardLayout( thread_id );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_GetKeyboardLayoutName( LPWSTR name )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pGetKeyboardLayoutName( name );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static HKL CDECL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pLoadKeyboardLayout( name, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pMapVirtualKeyEx( code, type, layout );
|
|
|
|
}
|
|
|
|
|
2011-06-23 19:34:26 +02:00
|
|
|
static BOOL CDECL loaderdrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
|
|
|
{
|
|
|
|
return load_driver()->pRegisterHotKey( hwnd, modifiers, vk );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
|
2005-07-18 17:14:56 +02:00
|
|
|
int size, UINT flags, HKL layout )
|
|
|
|
{
|
|
|
|
return load_driver()->pToUnicodeEx( virt, scan, state, str, size, flags, layout );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pUnloadKeyboardLayout( layout );
|
|
|
|
}
|
|
|
|
|
2011-06-23 19:34:26 +02:00
|
|
|
static void CDECL loaderdrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
|
|
|
{
|
|
|
|
load_driver()->pUnregisterHotKey( hwnd, modifiers, vk );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static SHORT CDECL loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pVkKeyScanEx( ch, layout );
|
|
|
|
}
|
|
|
|
|
2010-05-21 13:30:15 +02:00
|
|
|
static void CDECL loaderdrv_CreateCursorIcon( HCURSOR cursor )
|
2010-04-20 14:10:46 +02:00
|
|
|
{
|
2010-05-21 13:30:15 +02:00
|
|
|
load_driver()->pCreateCursorIcon( cursor );
|
2010-04-20 14:10:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void CDECL loaderdrv_DestroyCursorIcon( HCURSOR cursor )
|
|
|
|
{
|
|
|
|
load_driver()->pDestroyCursorIcon( cursor );
|
|
|
|
}
|
|
|
|
|
2010-04-20 21:14:31 +02:00
|
|
|
static void CDECL loaderdrv_SetCursor( HCURSOR cursor )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2010-04-20 21:14:31 +02:00
|
|
|
load_driver()->pSetCursor( cursor );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_GetCursorPos( LPPOINT pt )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pGetCursorPos( pt );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_SetCursorPos( INT x, INT y )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pSetCursorPos( x, y );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_ClipCursor( LPCRECT clip )
|
2007-01-04 20:24:50 +01:00
|
|
|
{
|
|
|
|
return load_driver()->pClipCursor( clip );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static INT CDECL loaderdrv_AcquireClipboard( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2006-06-05 17:55:14 +02:00
|
|
|
return load_driver()->pAcquireClipboard( hwnd );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_CountClipboardFormats(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pCountClipboardFormats();
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_EmptyClipboard( BOOL keepunowned )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pEmptyClipboard( keepunowned );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_EndClipboardUpdate(void)
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pEndClipboardUpdate();
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL loaderdrv_EnumClipboardFormats( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pEnumClipboardFormats( format );
|
|
|
|
}
|
|
|
|
|
2009-12-22 21:18:40 +01:00
|
|
|
static HANDLE CDECL loaderdrv_GetClipboardData( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2009-12-22 21:18:40 +01:00
|
|
|
return load_driver()->pGetClipboardData( format );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_IsClipboardFormatAvailable( UINT format )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pIsClipboardFormatAvailable( format );
|
|
|
|
}
|
|
|
|
|
2009-12-22 21:18:40 +01:00
|
|
|
static BOOL CDECL loaderdrv_SetClipboardData( UINT format, HANDLE handle, BOOL owner )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2009-12-22 21:18:40 +01:00
|
|
|
return load_driver()->pSetClipboardData( format, handle, owner );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LONG CDECL loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
|
|
|
|
DWORD flags, LPVOID lparam )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pChangeDisplaySettingsEx( name, mode, hwnd, flags, lparam );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
|
2006-10-23 13:51:30 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pEnumDisplayMonitors( hdc, rect, proc, lp );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pEnumDisplaySettingsEx( name, num, mode, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
|
2006-10-23 13:51:30 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pGetMonitorInfo( handle, info );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_CreateDesktopWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pCreateDesktopWindow( hwnd );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static BOOL CDECL loaderdrv_CreateWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-01-24 11:23:09 +01:00
|
|
|
return load_driver()->pCreateWindow( hwnd );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_DestroyWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pDestroyWindow( hwnd );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
|
|
|
|
const RECT *top_rect, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-02-25 15:59:19 +01:00
|
|
|
load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static DWORD CDECL loaderdrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
|
|
|
|
DWORD mask, DWORD flags )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_ReleaseDC( HWND hwnd, HDC hdc )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-02-25 15:59:19 +01:00
|
|
|
load_driver()->pReleaseDC( hwnd, hdc );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2013-04-19 12:27:59 +02:00
|
|
|
static BOOL CDECL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2013-04-19 12:27:59 +02:00
|
|
|
return load_driver()->pScrollDC( hdc, dx, dy, update );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetCapture( HWND hwnd, UINT flags )
|
2008-03-12 14:55:28 +01:00
|
|
|
{
|
|
|
|
load_driver()->pSetCapture( hwnd, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetFocus( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pSetFocus( hwnd );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
|
2008-09-12 15:43:27 +02:00
|
|
|
{
|
|
|
|
load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2006-12-10 23:21:28 +01:00
|
|
|
load_driver()->pSetParent( hwnd, parent, old_parent );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static int CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pSetWindowIcon( hwnd, type, icon );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-09-12 14:55:07 +02:00
|
|
|
load_driver()->pSetWindowStyle( hwnd, offset, style );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
load_driver()->pSetWindowText( hwnd, text );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static UINT CDECL loaderdrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
|
2008-07-30 16:13:28 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pShowWindow( hwnd, cmd, rect, swp );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LRESULT CDECL loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2008-04-10 15:43:24 +02:00
|
|
|
return load_driver()->pSysCommand( hwnd, wparam, lparam );
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2012-09-27 18:13:01 +02:00
|
|
|
static BOOL CDECL loaderdrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
|
|
|
const RECT *window_rect )
|
|
|
|
{
|
|
|
|
return load_driver()->pUpdateLayeredWindow( hwnd, info, window_rect );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static LRESULT CDECL loaderdrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
return load_driver()->pWindowMessage( hwnd, msg, wparam, lparam );
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|
|
|
const RECT *window_rect, const RECT *client_rect,
|
2012-09-06 12:32:52 +02:00
|
|
|
RECT *visible_rect, struct window_surface **surface )
|
2008-07-02 15:40:10 +02:00
|
|
|
{
|
|
|
|
load_driver()->pWindowPosChanging( hwnd, insert_after, swp_flags,
|
2012-09-06 12:32:52 +02:00
|
|
|
window_rect, client_rect, visible_rect, surface );
|
2008-07-02 15:40:10 +02:00
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL loaderdrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|
|
|
const RECT *window_rect, const RECT *client_rect,
|
2012-09-06 12:32:52 +02:00
|
|
|
const RECT *visible_rect, const RECT *valid_rects,
|
|
|
|
struct window_surface *surface )
|
2008-07-02 15:40:10 +02:00
|
|
|
{
|
|
|
|
load_driver()->pWindowPosChanged( hwnd, insert_after, swp_flags, window_rect,
|
2012-09-06 12:32:52 +02:00
|
|
|
client_rect, visible_rect, valid_rects, surface );
|
2008-07-02 15:40:10 +02:00
|
|
|
}
|
|
|
|
|
2012-11-15 17:38:21 +01:00
|
|
|
static BOOL CDECL loaderdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, UINT flags )
|
|
|
|
{
|
|
|
|
return FALSE; /* don't trigger a driver load */
|
|
|
|
}
|
|
|
|
|
2008-04-24 11:53:58 +02:00
|
|
|
static USER_DRIVER lazy_load_driver =
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
/* keyboard functions */
|
|
|
|
loaderdrv_ActivateKeyboardLayout,
|
|
|
|
loaderdrv_Beep,
|
|
|
|
loaderdrv_GetAsyncKeyState,
|
|
|
|
loaderdrv_GetKeyNameText,
|
|
|
|
loaderdrv_GetKeyboardLayout,
|
|
|
|
loaderdrv_GetKeyboardLayoutName,
|
|
|
|
loaderdrv_LoadKeyboardLayout,
|
|
|
|
loaderdrv_MapVirtualKeyEx,
|
2011-06-23 19:34:26 +02:00
|
|
|
loaderdrv_RegisterHotKey,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_ToUnicodeEx,
|
|
|
|
loaderdrv_UnloadKeyboardLayout,
|
2011-06-23 19:34:26 +02:00
|
|
|
loaderdrv_UnregisterHotKey,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_VkKeyScanEx,
|
2010-04-20 14:10:46 +02:00
|
|
|
/* cursor/icon functions */
|
|
|
|
loaderdrv_CreateCursorIcon,
|
|
|
|
loaderdrv_DestroyCursorIcon,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_SetCursor,
|
|
|
|
loaderdrv_GetCursorPos,
|
|
|
|
loaderdrv_SetCursorPos,
|
2007-01-04 20:24:50 +01:00
|
|
|
loaderdrv_ClipCursor,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* clipboard functions */
|
|
|
|
loaderdrv_AcquireClipboard,
|
|
|
|
loaderdrv_CountClipboardFormats,
|
|
|
|
loaderdrv_EmptyClipboard,
|
|
|
|
loaderdrv_EndClipboardUpdate,
|
|
|
|
loaderdrv_EnumClipboardFormats,
|
|
|
|
loaderdrv_GetClipboardData,
|
|
|
|
loaderdrv_IsClipboardFormatAvailable,
|
|
|
|
loaderdrv_SetClipboardData,
|
|
|
|
/* display modes */
|
|
|
|
loaderdrv_ChangeDisplaySettingsEx,
|
2006-10-23 13:51:30 +02:00
|
|
|
loaderdrv_EnumDisplayMonitors,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_EnumDisplaySettingsEx,
|
2006-10-23 13:51:30 +02:00
|
|
|
loaderdrv_GetMonitorInfo,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* windowing functions */
|
|
|
|
loaderdrv_CreateDesktopWindow,
|
|
|
|
loaderdrv_CreateWindow,
|
|
|
|
loaderdrv_DestroyWindow,
|
2008-02-25 15:59:19 +01:00
|
|
|
loaderdrv_GetDC,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_MsgWaitForMultipleObjectsEx,
|
|
|
|
loaderdrv_ReleaseDC,
|
|
|
|
loaderdrv_ScrollDC,
|
2008-03-12 14:55:28 +01:00
|
|
|
loaderdrv_SetCapture,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_SetFocus,
|
2008-09-12 15:43:27 +02:00
|
|
|
loaderdrv_SetLayeredWindowAttributes,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_SetParent,
|
|
|
|
loaderdrv_SetWindowRgn,
|
|
|
|
loaderdrv_SetWindowIcon,
|
|
|
|
loaderdrv_SetWindowStyle,
|
|
|
|
loaderdrv_SetWindowText,
|
2008-07-30 16:13:28 +02:00
|
|
|
loaderdrv_ShowWindow,
|
2008-04-10 15:43:24 +02:00
|
|
|
loaderdrv_SysCommand,
|
2012-09-27 18:13:01 +02:00
|
|
|
loaderdrv_UpdateLayeredWindow,
|
2008-07-02 15:40:10 +02:00
|
|
|
loaderdrv_WindowMessage,
|
|
|
|
loaderdrv_WindowPosChanging,
|
2012-11-15 17:38:21 +01:00
|
|
|
loaderdrv_WindowPosChanged,
|
|
|
|
/* system parameters */
|
|
|
|
loaderdrv_SystemParametersInfo
|
2005-07-18 17:14:56 +02:00
|
|
|
};
|