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"
|
2013-10-29 12:12:21 +01:00
|
|
|
#include "wine/unicode.h"
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2006-09-10 11:09:26 +02:00
|
|
|
#include "user_private.h"
|
2013-10-24 17:40:37 +02:00
|
|
|
#include "controls.h"
|
2005-07-18 17:14:56 +02:00
|
|
|
|
2013-10-29 12:12:21 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(user);
|
2015-11-16 21:31:11 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
2013-10-29 12:12:21 +01: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;
|
2013-10-29 12:12:21 +01:00
|
|
|
static char driver_load_error[80];
|
|
|
|
|
2017-02-09 15:12:58 +01:00
|
|
|
static BOOL CDECL nodrv_CreateWindow( HWND hwnd );
|
|
|
|
|
2013-10-29 12:12:21 +01:00
|
|
|
static HMODULE load_desktop_driver( HWND hwnd )
|
|
|
|
{
|
|
|
|
static const WCHAR display_device_guid_propW[] = {
|
|
|
|
'_','_','w','i','n','e','_','d','i','s','p','l','a','y','_',
|
|
|
|
'd','e','v','i','c','e','_','g','u','i','d',0 };
|
|
|
|
static const WCHAR key_pathW[] = {
|
|
|
|
'S','y','s','t','e','m','\\',
|
|
|
|
'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
|
|
|
|
'C','o','n','t','r','o','l','\\',
|
|
|
|
'V','i','d','e','o','\\','{',0};
|
|
|
|
static const WCHAR displayW[] = {'}','\\','0','0','0','0',0};
|
|
|
|
static const WCHAR driverW[] = {'G','r','a','p','h','i','c','s','D','r','i','v','e','r',0};
|
|
|
|
HMODULE ret = 0;
|
|
|
|
HKEY hkey;
|
|
|
|
DWORD size;
|
|
|
|
WCHAR path[MAX_PATH];
|
2018-08-08 22:20:04 +02:00
|
|
|
WCHAR key[ARRAY_SIZE(key_pathW) + ARRAY_SIZE(displayW) + 40];
|
2013-10-29 12:12:21 +01:00
|
|
|
UINT guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
|
|
|
|
|
2014-01-30 21:49:32 +01:00
|
|
|
USER_CheckNotLock();
|
|
|
|
|
2013-10-29 12:12:21 +01:00
|
|
|
strcpy( driver_load_error, "The explorer process failed to start." ); /* default error */
|
|
|
|
|
2014-01-30 21:49:32 +01:00
|
|
|
if (!guid_atom)
|
|
|
|
{
|
|
|
|
SendMessageW( hwnd, WM_NULL, 0, 0 ); /* wait for the desktop process to be ready */
|
|
|
|
guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
|
|
|
|
}
|
2013-10-29 12:12:21 +01:00
|
|
|
memcpy( key, key_pathW, sizeof(key_pathW) );
|
|
|
|
if (!GlobalGetAtomNameW( guid_atom, key + strlenW(key), 40 )) return 0;
|
|
|
|
strcatW( key, displayW );
|
|
|
|
if (RegOpenKeyW( HKEY_LOCAL_MACHINE, key, &hkey )) return 0;
|
|
|
|
size = sizeof(path);
|
|
|
|
if (!RegQueryValueExW( hkey, driverW, NULL, NULL, (BYTE *)path, &size ))
|
|
|
|
{
|
|
|
|
if (!(ret = LoadLibraryW( path ))) ERR( "failed to load %s\n", debugstr_w(path) );
|
|
|
|
TRACE( "%s %p\n", debugstr_w(path), ret );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
size = sizeof(driver_load_error);
|
|
|
|
RegQueryValueExA( hkey, "DriverError", NULL, NULL, (BYTE *)driver_load_error, &size );
|
|
|
|
}
|
|
|
|
RegCloseKey( hkey );
|
|
|
|
return ret;
|
|
|
|
}
|
2005-07-18 17:14:56 +02:00
|
|
|
|
|
|
|
/* load the graphics driver */
|
|
|
|
static const USER_DRIVER *load_driver(void)
|
|
|
|
{
|
|
|
|
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
|
|
|
|
2013-10-29 12:12:21 +01:00
|
|
|
graphics_driver = load_desktop_driver( GetDesktopWindow() );
|
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);
|
2013-11-20 16:30:33 +01:00
|
|
|
GET_USER_FUNC(GetKeyboardLayoutList);
|
2005-10-31 16:54:55 +01:00
|
|
|
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(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);
|
2016-09-23 07:07:08 +02:00
|
|
|
GET_USER_FUNC(UpdateClipboard);
|
2005-10-31 16:54:55 +01:00
|
|
|
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);
|
2015-10-13 07:51:42 +02:00
|
|
|
GET_USER_FUNC(FlashWindowEx);
|
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);
|
2016-08-25 14:33:45 +02:00
|
|
|
GET_USER_FUNC(ThreadDetach);
|
2005-07-18 17:14:56 +02:00
|
|
|
#undef GET_USER_FUNC
|
2005-10-31 16:54:55 +01:00
|
|
|
}
|
2017-02-09 15:12:58 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
USEROBJECTFLAGS flags;
|
|
|
|
HWINSTA winstation;
|
|
|
|
|
|
|
|
winstation = GetProcessWindowStation();
|
|
|
|
if (!GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL)
|
|
|
|
|| (flags.dwFlags & WSF_VISIBLE))
|
|
|
|
driver->pCreateWindow = nodrv_CreateWindow;
|
|
|
|
}
|
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 );
|
|
|
|
|
2013-10-29 12:39:46 +01:00
|
|
|
__wine_set_display_driver( graphics_driver );
|
2013-10-24 17:40:37 +02:00
|
|
|
register_builtin_classes();
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2018-10-02 16:27:41 +02:00
|
|
|
#define NULLDRV_DEFAULT_HMONITOR ((HMONITOR)(UINT_PTR)(0x10000 + 1))
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2013-11-20 16:30:33 +01:00
|
|
|
static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
|
|
|
{
|
|
|
|
HKEY hKeyKeyboard;
|
|
|
|
DWORD rc;
|
|
|
|
INT count = 0;
|
|
|
|
ULONG_PTR baselayout;
|
|
|
|
LANGID langid;
|
|
|
|
static const WCHAR szKeyboardReg[] = {'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','K','e','y','b','o','a','r','d',' ','L','a','y','o','u','t','s',0};
|
|
|
|
|
|
|
|
baselayout = GetUserDefaultLCID();
|
|
|
|
langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout));
|
|
|
|
if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
|
2015-11-28 22:54:52 +01:00
|
|
|
baselayout = MAKELONG( baselayout, 0xe001 ); /* IME */
|
2013-11-20 16:30:33 +01:00
|
|
|
else
|
|
|
|
baselayout |= baselayout << 16;
|
|
|
|
|
|
|
|
/* Enumerate the Registry */
|
|
|
|
rc = RegOpenKeyW(HKEY_LOCAL_MACHINE,szKeyboardReg,&hKeyKeyboard);
|
|
|
|
if (rc == ERROR_SUCCESS)
|
|
|
|
{
|
|
|
|
do {
|
|
|
|
WCHAR szKeyName[9];
|
|
|
|
HKL layout;
|
|
|
|
rc = RegEnumKeyW(hKeyKeyboard, count, szKeyName, 9);
|
|
|
|
if (rc == ERROR_SUCCESS)
|
|
|
|
{
|
|
|
|
layout = (HKL)(ULONG_PTR)strtoulW(szKeyName,NULL,16);
|
|
|
|
if (baselayout != 0 && layout == (HKL)baselayout)
|
|
|
|
baselayout = 0; /* found in the registry do not add again */
|
|
|
|
if (size && layouts)
|
|
|
|
{
|
|
|
|
if (count >= size ) break;
|
|
|
|
layouts[count] = layout;
|
|
|
|
}
|
|
|
|
count ++;
|
|
|
|
}
|
|
|
|
} while (rc == ERROR_SUCCESS);
|
|
|
|
RegCloseKey(hKeyKeyboard);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* make sure our base layout is on the list */
|
|
|
|
if (baselayout != 0)
|
|
|
|
{
|
|
|
|
if (size && layouts)
|
|
|
|
{
|
|
|
|
if (count < size)
|
|
|
|
{
|
|
|
|
layouts[count] = (HKL)baselayout;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
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-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;
|
|
|
|
}
|
|
|
|
|
2016-09-23 07:07:08 +02:00
|
|
|
static void CDECL nulldrv_UpdateClipboard(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2018-10-02 16:27:41 +02:00
|
|
|
RECT r = {0, 0, 640, 480};
|
|
|
|
|
|
|
|
TRACE("(%p, %p, %p, 0x%lx)\n", hdc, rect, proc, lp);
|
|
|
|
|
|
|
|
proc(NULLDRV_DEFAULT_HMONITOR, hdc, &r, lp);
|
|
|
|
return TRUE;
|
2006-10-23 13:51:30 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2018-10-02 16:27:41 +02:00
|
|
|
RECT r = {0, 0, 640, 480};
|
|
|
|
static const WCHAR device[] = {'W','i','n','D','i','s','c',0};
|
|
|
|
|
|
|
|
TRACE("(%p, %p)\n", handle, info);
|
|
|
|
|
|
|
|
if (handle != NULLDRV_DEFAULT_HMONITOR)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_MONITOR_HANDLE);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
info->rcMonitor = r;
|
|
|
|
info->rcWork = r;
|
|
|
|
info->dwFlags = MONITORINFOF_PRIMARY;
|
|
|
|
if (info->cbSize >= sizeof(MONITORINFOEXW))
|
|
|
|
lstrcpyW( ((MONITORINFOEXW *)info)->szDevice, device );
|
|
|
|
return TRUE;
|
2006-10-23 13:51:30 +02:00
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-02-09 15:12:58 +01:00
|
|
|
static BOOL CDECL nodrv_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
|
|
|
|
2015-11-16 21:31:11 +01:00
|
|
|
ERR_(winediag)( "Application tried to create a window, but no driver could be loaded.\n" );
|
|
|
|
if (driver_load_error[0]) ERR_(winediag)( "%s\n", driver_load_error );
|
2005-10-31 16:54:55 +01:00
|
|
|
return FALSE;
|
2005-07-18 17:14:56 +02:00
|
|
|
}
|
|
|
|
|
2017-02-09 15:12:58 +01:00
|
|
|
static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2008-12-16 15:32:08 +01:00
|
|
|
static void CDECL nulldrv_DestroyWindow( HWND hwnd )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-10-13 07:51:42 +02:00
|
|
|
static void CDECL nulldrv_FlashWindowEx( FLASHWINFO *info )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-05-01 12:31:14 +02:00
|
|
|
static void CDECL nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-08-25 14:33:45 +02:00
|
|
|
static void CDECL nulldrv_ThreadDetach( void )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
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,
|
2013-11-20 16:30:33 +01:00
|
|
|
nulldrv_GetKeyboardLayoutList,
|
2005-07-18 17:14:56 +02:00
|
|
|
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_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 */
|
2016-09-23 07:07:08 +02:00
|
|
|
nulldrv_UpdateClipboard,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* 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,
|
2015-10-13 07:51:42 +02:00
|
|
|
nulldrv_FlashWindowEx,
|
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 */
|
2016-08-25 14:33:45 +02:00
|
|
|
nulldrv_SystemParametersInfo,
|
|
|
|
/* thread management */
|
|
|
|
nulldrv_ThreadDetach
|
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
|
|
|
}
|
|
|
|
|
2013-11-20 16:30:33 +01:00
|
|
|
static UINT CDECL loaderdrv_GetKeyboardLayoutList( INT size, HKL *layouts )
|
|
|
|
{
|
|
|
|
return load_driver()->pGetKeyboardLayoutList( size, layouts );
|
|
|
|
}
|
|
|
|
|
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-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 );
|
|
|
|
}
|
|
|
|
|
2016-09-23 07:07:08 +02:00
|
|
|
static void CDECL loaderdrv_UpdateClipboard(void)
|
|
|
|
{
|
|
|
|
load_driver()->pUpdateClipboard();
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2015-10-13 07:51:42 +02:00
|
|
|
static void CDECL loaderdrv_FlashWindowEx( FLASHWINFO *info )
|
|
|
|
{
|
|
|
|
load_driver()->pFlashWindowEx( info );
|
|
|
|
}
|
|
|
|
|
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 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 );
|
|
|
|
}
|
|
|
|
|
2014-05-01 12:31:14 +02:00
|
|
|
static void CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
|
2005-07-18 17:14:56 +02:00
|
|
|
{
|
2014-05-01 12:31:14 +02:00
|
|
|
load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
|
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-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,
|
2013-11-20 16:30:33 +01:00
|
|
|
loaderdrv_GetKeyboardLayoutList,
|
2005-07-18 17:14:56 +02:00
|
|
|
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 */
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_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 */
|
2016-09-23 07:07:08 +02:00
|
|
|
loaderdrv_UpdateClipboard,
|
2005-07-18 17:14:56 +02:00
|
|
|
/* 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,
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_DestroyWindow,
|
2015-10-13 07:51:42 +02:00
|
|
|
loaderdrv_FlashWindowEx,
|
2008-02-25 15:59:19 +01:00
|
|
|
loaderdrv_GetDC,
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_MsgWaitForMultipleObjectsEx,
|
|
|
|
nulldrv_ReleaseDC,
|
|
|
|
nulldrv_ScrollDC,
|
|
|
|
nulldrv_SetCapture,
|
|
|
|
nulldrv_SetFocus,
|
2008-09-12 15:43:27 +02:00
|
|
|
loaderdrv_SetLayeredWindowAttributes,
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_SetParent,
|
2005-07-18 17:14:56 +02:00
|
|
|
loaderdrv_SetWindowRgn,
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_SetWindowIcon,
|
|
|
|
nulldrv_SetWindowStyle,
|
|
|
|
nulldrv_SetWindowText,
|
|
|
|
nulldrv_ShowWindow,
|
|
|
|
nulldrv_SysCommand,
|
2012-09-27 18:13:01 +02:00
|
|
|
loaderdrv_UpdateLayeredWindow,
|
2013-10-23 16:13:17 +02:00
|
|
|
nulldrv_WindowMessage,
|
|
|
|
nulldrv_WindowPosChanging,
|
|
|
|
nulldrv_WindowPosChanged,
|
2012-11-15 17:38:21 +01:00
|
|
|
/* system parameters */
|
2016-08-25 14:33:45 +02:00
|
|
|
nulldrv_SystemParametersInfo,
|
|
|
|
/* thread management */
|
|
|
|
nulldrv_ThreadDetach
|
2005-07-18 17:14:56 +02:00
|
|
|
};
|