wined3d: Correctly destroy the adapter on format initialization failure in no3d mode.
[wine/zf.git] / dlls / user32 / driver.c
blob6d916c7d65dad307ead968c353f3428538c124e5
1 /*
2 * USER driver support
4 * Copyright 2000, 2005 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
22 #include <stdio.h>
23 #include "windef.h"
24 #include "winbase.h"
25 #include "wingdi.h"
26 #include "winuser.h"
27 #include "wine/debug.h"
28 #include "wine/gdi_driver.h"
29 #include "wine/unicode.h"
31 #include "user_private.h"
32 #include "controls.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(user);
35 WINE_DECLARE_DEBUG_CHANNEL(winediag);
37 static USER_DRIVER null_driver, lazy_load_driver;
39 const USER_DRIVER *USER_Driver = &lazy_load_driver;
40 static char driver_load_error[80];
42 static BOOL CDECL nodrv_CreateWindow( HWND hwnd );
44 static BOOL load_desktop_driver( HWND hwnd, HMODULE *module )
46 static const WCHAR display_device_guid_propW[] = {
47 '_','_','w','i','n','e','_','d','i','s','p','l','a','y','_',
48 'd','e','v','i','c','e','_','g','u','i','d',0 };
49 static const WCHAR key_pathW[] = {
50 'S','y','s','t','e','m','\\',
51 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
52 'C','o','n','t','r','o','l','\\',
53 'V','i','d','e','o','\\','{',0};
54 static const WCHAR displayW[] = {'}','\\','0','0','0','0',0};
55 static const WCHAR driverW[] = {'G','r','a','p','h','i','c','s','D','r','i','v','e','r',0};
56 static const WCHAR nullW[] = {'n','u','l','l',0};
57 BOOL ret = FALSE;
58 HKEY hkey;
59 DWORD size;
60 WCHAR path[MAX_PATH];
61 WCHAR key[ARRAY_SIZE(key_pathW) + ARRAY_SIZE(displayW) + 40];
62 UINT guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
64 USER_CheckNotLock();
66 strcpy( driver_load_error, "The explorer process failed to start." ); /* default error */
68 if (!guid_atom)
70 SendMessageW( hwnd, WM_NULL, 0, 0 ); /* wait for the desktop process to be ready */
71 guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
73 memcpy( key, key_pathW, sizeof(key_pathW) );
74 if (!GlobalGetAtomNameW( guid_atom, key + strlenW(key), 40 )) return 0;
75 strcatW( key, displayW );
76 if (RegOpenKeyW( HKEY_LOCAL_MACHINE, key, &hkey )) return 0;
77 size = sizeof(path);
78 if (!RegQueryValueExW( hkey, driverW, NULL, NULL, (BYTE *)path, &size ))
80 if ((ret = !strcmpW( path, nullW ))) *module = NULL;
81 else ret = (*module = LoadLibraryW( path )) != NULL;
82 if (!ret) ERR( "failed to load %s\n", debugstr_w(path) );
83 TRACE( "%s %p\n", debugstr_w(path), *module );
85 else
87 size = sizeof(driver_load_error);
88 *module = NULL;
89 RegQueryValueExA( hkey, "DriverError", NULL, NULL, (BYTE *)driver_load_error, &size );
91 RegCloseKey( hkey );
92 return ret;
95 /* load the graphics driver */
96 static const USER_DRIVER *load_driver(void)
98 void *ptr;
99 HMODULE graphics_driver;
100 USER_DRIVER *driver, *prev;
102 driver = HeapAlloc( GetProcessHeap(), 0, sizeof(*driver) );
103 *driver = null_driver;
105 if (!load_desktop_driver( GetDesktopWindow(), &graphics_driver ))
107 USEROBJECTFLAGS flags;
108 HWINSTA winstation;
110 winstation = GetProcessWindowStation();
111 if (!GetUserObjectInformationA(winstation, UOI_FLAGS, &flags, sizeof(flags), NULL)
112 || (flags.dwFlags & WSF_VISIBLE))
113 driver->pCreateWindow = nodrv_CreateWindow;
115 else if (graphics_driver)
117 #define GET_USER_FUNC(name) \
118 do { if ((ptr = GetProcAddress( graphics_driver, #name ))) driver->p##name = ptr; } while(0)
120 GET_USER_FUNC(ActivateKeyboardLayout);
121 GET_USER_FUNC(Beep);
122 GET_USER_FUNC(GetKeyNameText);
123 GET_USER_FUNC(GetKeyboardLayout);
124 GET_USER_FUNC(GetKeyboardLayoutList);
125 GET_USER_FUNC(GetKeyboardLayoutName);
126 GET_USER_FUNC(LoadKeyboardLayout);
127 GET_USER_FUNC(MapVirtualKeyEx);
128 GET_USER_FUNC(RegisterHotKey);
129 GET_USER_FUNC(ToUnicodeEx);
130 GET_USER_FUNC(UnloadKeyboardLayout);
131 GET_USER_FUNC(UnregisterHotKey);
132 GET_USER_FUNC(VkKeyScanEx);
133 GET_USER_FUNC(DestroyCursorIcon);
134 GET_USER_FUNC(SetCursor);
135 GET_USER_FUNC(GetCursorPos);
136 GET_USER_FUNC(SetCursorPos);
137 GET_USER_FUNC(ClipCursor);
138 GET_USER_FUNC(UpdateClipboard);
139 GET_USER_FUNC(ChangeDisplaySettingsEx);
140 GET_USER_FUNC(EnumDisplayMonitors);
141 GET_USER_FUNC(EnumDisplaySettingsEx);
142 GET_USER_FUNC(GetMonitorInfo);
143 GET_USER_FUNC(CreateDesktopWindow);
144 GET_USER_FUNC(CreateWindow);
145 GET_USER_FUNC(DestroyWindow);
146 GET_USER_FUNC(FlashWindowEx);
147 GET_USER_FUNC(GetDC);
148 GET_USER_FUNC(MsgWaitForMultipleObjectsEx);
149 GET_USER_FUNC(ReleaseDC);
150 GET_USER_FUNC(ScrollDC);
151 GET_USER_FUNC(SetCapture);
152 GET_USER_FUNC(SetFocus);
153 GET_USER_FUNC(SetLayeredWindowAttributes);
154 GET_USER_FUNC(SetParent);
155 GET_USER_FUNC(SetWindowRgn);
156 GET_USER_FUNC(SetWindowIcon);
157 GET_USER_FUNC(SetWindowStyle);
158 GET_USER_FUNC(SetWindowText);
159 GET_USER_FUNC(ShowWindow);
160 GET_USER_FUNC(SysCommand);
161 GET_USER_FUNC(UpdateLayeredWindow);
162 GET_USER_FUNC(WindowMessage);
163 GET_USER_FUNC(WindowPosChanging);
164 GET_USER_FUNC(WindowPosChanged);
165 GET_USER_FUNC(SystemParametersInfo);
166 GET_USER_FUNC(ThreadDetach);
167 #undef GET_USER_FUNC
170 prev = InterlockedCompareExchangePointer( (void **)&USER_Driver, driver, &lazy_load_driver );
171 if (prev != &lazy_load_driver)
173 /* another thread beat us to it */
174 HeapFree( GetProcessHeap(), 0, driver );
175 driver = prev;
177 else LdrAddRefDll( 0, graphics_driver );
179 __wine_set_display_driver( graphics_driver );
180 register_builtin_classes();
182 return driver;
185 /* unload the graphics driver on process exit */
186 void USER_unload_driver(void)
188 USER_DRIVER *prev;
189 /* make sure we don't try to call the driver after it has been detached */
190 prev = InterlockedExchangePointer( (void **)&USER_Driver, &null_driver );
191 if (prev != &lazy_load_driver && prev != &null_driver)
192 HeapFree( GetProcessHeap(), 0, prev );
196 /**********************************************************************
197 * Null user driver
199 * These are fallbacks for entry points that are not implemented in the real driver.
202 static HKL CDECL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags )
204 return 0;
207 static void CDECL nulldrv_Beep(void)
211 static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts )
213 HKEY hKeyKeyboard;
214 DWORD rc;
215 INT count = 0;
216 ULONG_PTR baselayout;
217 LANGID langid;
218 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};
220 baselayout = GetUserDefaultLCID();
221 langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout));
222 if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
223 baselayout = MAKELONG( baselayout, 0xe001 ); /* IME */
224 else
225 baselayout |= baselayout << 16;
227 /* Enumerate the Registry */
228 rc = RegOpenKeyW(HKEY_LOCAL_MACHINE,szKeyboardReg,&hKeyKeyboard);
229 if (rc == ERROR_SUCCESS)
231 do {
232 WCHAR szKeyName[9];
233 HKL layout;
234 rc = RegEnumKeyW(hKeyKeyboard, count, szKeyName, 9);
235 if (rc == ERROR_SUCCESS)
237 layout = (HKL)(ULONG_PTR)strtoulW(szKeyName,NULL,16);
238 if (baselayout != 0 && layout == (HKL)baselayout)
239 baselayout = 0; /* found in the registry do not add again */
240 if (size && layouts)
242 if (count >= size ) break;
243 layouts[count] = layout;
245 count ++;
247 } while (rc == ERROR_SUCCESS);
248 RegCloseKey(hKeyKeyboard);
251 /* make sure our base layout is on the list */
252 if (baselayout != 0)
254 if (size && layouts)
256 if (count < size)
258 layouts[count] = (HKL)baselayout;
259 count++;
262 else
263 count++;
266 return count;
269 static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
271 return 0;
274 static HKL CDECL nulldrv_GetKeyboardLayout( DWORD thread_id )
276 return 0;
279 static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name )
281 return FALSE;
284 static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
286 return 0;
289 static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
291 return 0;
294 static BOOL CDECL nulldrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
296 return TRUE;
299 static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
300 int size, UINT flags, HKL layout )
302 return 0;
305 static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout )
307 return 0;
310 static void CDECL nulldrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
314 static SHORT CDECL nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
316 return -1;
319 static void CDECL nulldrv_DestroyCursorIcon( HCURSOR cursor )
323 static void CDECL nulldrv_SetCursor( HCURSOR cursor )
327 static BOOL CDECL nulldrv_GetCursorPos( LPPOINT pt )
329 return FALSE;
332 static BOOL CDECL nulldrv_SetCursorPos( INT x, INT y )
334 return FALSE;
337 static BOOL CDECL nulldrv_ClipCursor( LPCRECT clip )
339 return FALSE;
342 static void CDECL nulldrv_UpdateClipboard(void)
346 static LONG CDECL nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
347 DWORD flags, LPVOID lparam )
349 return DISP_CHANGE_FAILED;
352 static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
354 return FALSE;
357 static BOOL CDECL nulldrv_CreateDesktopWindow( HWND hwnd )
359 return TRUE;
362 static BOOL CDECL nodrv_CreateWindow( HWND hwnd )
364 static int warned;
365 HWND parent = GetAncestor( hwnd, GA_PARENT );
367 /* HWND_MESSAGE windows don't need a graphics driver */
368 if (!parent || parent == get_user_thread_info()->msg_window) return TRUE;
369 if (warned++) return FALSE;
371 ERR_(winediag)( "Application tried to create a window, but no driver could be loaded.\n" );
372 if (driver_load_error[0]) ERR_(winediag)( "%s\n", driver_load_error );
373 return FALSE;
376 static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
378 return TRUE;
381 static void CDECL nulldrv_DestroyWindow( HWND hwnd )
385 static void CDECL nulldrv_FlashWindowEx( FLASHWINFO *info )
389 static void CDECL nulldrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
390 const RECT *top_rect, DWORD flags )
394 static DWORD CDECL nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
395 DWORD mask, DWORD flags )
397 return WaitForMultipleObjectsEx( count, handles, flags & MWMO_WAITALL,
398 timeout, flags & MWMO_ALERTABLE );
401 static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc )
405 static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update )
407 RECT rect;
409 GetClipBox( hdc, &rect );
410 return BitBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
411 hdc, rect.left - dx, rect.top - dy, SRCCOPY );
414 static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags )
418 static void CDECL nulldrv_SetFocus( HWND hwnd )
422 static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
426 static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
430 static void CDECL nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
434 static void CDECL nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
438 static void CDECL nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
442 static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
446 static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
448 return swp;
451 static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
453 return -1;
456 static BOOL CDECL nulldrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
457 const RECT *window_rect )
459 return TRUE;
462 static LRESULT CDECL nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
464 return 0;
467 static void CDECL nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
468 const RECT *window_rect, const RECT *client_rect,
469 RECT *visible_rect, struct window_surface **surface )
473 static void CDECL nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
474 const RECT *window_rect, const RECT *client_rect,
475 const RECT *visible_rect, const RECT *valid_rects,
476 struct window_surface *surface )
480 static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, UINT flags )
482 return FALSE;
485 static void CDECL nulldrv_ThreadDetach( void )
489 static USER_DRIVER null_driver =
491 /* keyboard functions */
492 nulldrv_ActivateKeyboardLayout,
493 nulldrv_Beep,
494 nulldrv_GetKeyNameText,
495 nulldrv_GetKeyboardLayout,
496 nulldrv_GetKeyboardLayoutList,
497 nulldrv_GetKeyboardLayoutName,
498 nulldrv_LoadKeyboardLayout,
499 nulldrv_MapVirtualKeyEx,
500 nulldrv_RegisterHotKey,
501 nulldrv_ToUnicodeEx,
502 nulldrv_UnloadKeyboardLayout,
503 nulldrv_UnregisterHotKey,
504 nulldrv_VkKeyScanEx,
505 /* cursor/icon functions */
506 nulldrv_DestroyCursorIcon,
507 nulldrv_SetCursor,
508 nulldrv_GetCursorPos,
509 nulldrv_SetCursorPos,
510 nulldrv_ClipCursor,
511 /* clipboard functions */
512 nulldrv_UpdateClipboard,
513 /* display modes */
514 nulldrv_ChangeDisplaySettingsEx,
515 nulldrv_EnumDisplayMonitors,
516 nulldrv_EnumDisplaySettingsEx,
517 nulldrv_GetMonitorInfo,
518 /* windowing functions */
519 nulldrv_CreateDesktopWindow,
520 nulldrv_CreateWindow,
521 nulldrv_DestroyWindow,
522 nulldrv_FlashWindowEx,
523 nulldrv_GetDC,
524 nulldrv_MsgWaitForMultipleObjectsEx,
525 nulldrv_ReleaseDC,
526 nulldrv_ScrollDC,
527 nulldrv_SetCapture,
528 nulldrv_SetFocus,
529 nulldrv_SetLayeredWindowAttributes,
530 nulldrv_SetParent,
531 nulldrv_SetWindowRgn,
532 nulldrv_SetWindowIcon,
533 nulldrv_SetWindowStyle,
534 nulldrv_SetWindowText,
535 nulldrv_ShowWindow,
536 nulldrv_SysCommand,
537 nulldrv_UpdateLayeredWindow,
538 nulldrv_WindowMessage,
539 nulldrv_WindowPosChanging,
540 nulldrv_WindowPosChanged,
541 /* system parameters */
542 nulldrv_SystemParametersInfo,
543 /* thread management */
544 nulldrv_ThreadDetach
548 /**********************************************************************
549 * Lazy loading user driver
551 * Initial driver used before another driver is loaded.
552 * Each entry point simply loads the real driver and chains to it.
555 static HKL CDECL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
557 return load_driver()->pActivateKeyboardLayout( layout, flags );
560 static void CDECL loaderdrv_Beep(void)
562 load_driver()->pBeep();
565 static INT CDECL loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
567 return load_driver()->pGetKeyNameText( lparam, buffer, size );
570 static HKL CDECL loaderdrv_GetKeyboardLayout( DWORD thread_id )
572 return load_driver()->pGetKeyboardLayout( thread_id );
575 static UINT CDECL loaderdrv_GetKeyboardLayoutList( INT size, HKL *layouts )
577 return load_driver()->pGetKeyboardLayoutList( size, layouts );
580 static BOOL CDECL loaderdrv_GetKeyboardLayoutName( LPWSTR name )
582 return load_driver()->pGetKeyboardLayoutName( name );
585 static HKL CDECL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
587 return load_driver()->pLoadKeyboardLayout( name, flags );
590 static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
592 return load_driver()->pMapVirtualKeyEx( code, type, layout );
595 static BOOL CDECL loaderdrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
597 return load_driver()->pRegisterHotKey( hwnd, modifiers, vk );
600 static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
601 int size, UINT flags, HKL layout )
603 return load_driver()->pToUnicodeEx( virt, scan, state, str, size, flags, layout );
606 static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout )
608 return load_driver()->pUnloadKeyboardLayout( layout );
611 static void CDECL loaderdrv_UnregisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
613 load_driver()->pUnregisterHotKey( hwnd, modifiers, vk );
616 static SHORT CDECL loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
618 return load_driver()->pVkKeyScanEx( ch, layout );
621 static void CDECL loaderdrv_SetCursor( HCURSOR cursor )
623 load_driver()->pSetCursor( cursor );
626 static BOOL CDECL loaderdrv_GetCursorPos( LPPOINT pt )
628 return load_driver()->pGetCursorPos( pt );
631 static BOOL CDECL loaderdrv_SetCursorPos( INT x, INT y )
633 return load_driver()->pSetCursorPos( x, y );
636 static BOOL CDECL loaderdrv_ClipCursor( LPCRECT clip )
638 return load_driver()->pClipCursor( clip );
641 static void CDECL loaderdrv_UpdateClipboard(void)
643 load_driver()->pUpdateClipboard();
646 static LONG CDECL loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
647 DWORD flags, LPVOID lparam )
649 return load_driver()->pChangeDisplaySettingsEx( name, mode, hwnd, flags, lparam );
652 static BOOL CDECL loaderdrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
654 return load_driver()->pEnumDisplayMonitors( hdc, rect, proc, lp );
657 static BOOL CDECL loaderdrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
659 return load_driver()->pEnumDisplaySettingsEx( name, num, mode, flags );
662 static BOOL CDECL loaderdrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
664 return load_driver()->pGetMonitorInfo( handle, info );
667 static BOOL CDECL loaderdrv_CreateDesktopWindow( HWND hwnd )
669 return load_driver()->pCreateDesktopWindow( hwnd );
672 static BOOL CDECL loaderdrv_CreateWindow( HWND hwnd )
674 return load_driver()->pCreateWindow( hwnd );
677 static void CDECL loaderdrv_FlashWindowEx( FLASHWINFO *info )
679 load_driver()->pFlashWindowEx( info );
682 static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
683 const RECT *top_rect, DWORD flags )
685 load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags );
688 static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
690 load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
693 static void CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
695 load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
698 static BOOL CDECL loaderdrv_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
699 const RECT *window_rect )
701 return load_driver()->pUpdateLayeredWindow( hwnd, info, window_rect );
704 static USER_DRIVER lazy_load_driver =
706 /* keyboard functions */
707 loaderdrv_ActivateKeyboardLayout,
708 loaderdrv_Beep,
709 loaderdrv_GetKeyNameText,
710 loaderdrv_GetKeyboardLayout,
711 loaderdrv_GetKeyboardLayoutList,
712 loaderdrv_GetKeyboardLayoutName,
713 loaderdrv_LoadKeyboardLayout,
714 loaderdrv_MapVirtualKeyEx,
715 loaderdrv_RegisterHotKey,
716 loaderdrv_ToUnicodeEx,
717 loaderdrv_UnloadKeyboardLayout,
718 loaderdrv_UnregisterHotKey,
719 loaderdrv_VkKeyScanEx,
720 /* cursor/icon functions */
721 nulldrv_DestroyCursorIcon,
722 loaderdrv_SetCursor,
723 loaderdrv_GetCursorPos,
724 loaderdrv_SetCursorPos,
725 loaderdrv_ClipCursor,
726 /* clipboard functions */
727 loaderdrv_UpdateClipboard,
728 /* display modes */
729 loaderdrv_ChangeDisplaySettingsEx,
730 loaderdrv_EnumDisplayMonitors,
731 loaderdrv_EnumDisplaySettingsEx,
732 loaderdrv_GetMonitorInfo,
733 /* windowing functions */
734 loaderdrv_CreateDesktopWindow,
735 loaderdrv_CreateWindow,
736 nulldrv_DestroyWindow,
737 loaderdrv_FlashWindowEx,
738 loaderdrv_GetDC,
739 nulldrv_MsgWaitForMultipleObjectsEx,
740 nulldrv_ReleaseDC,
741 nulldrv_ScrollDC,
742 nulldrv_SetCapture,
743 nulldrv_SetFocus,
744 loaderdrv_SetLayeredWindowAttributes,
745 nulldrv_SetParent,
746 loaderdrv_SetWindowRgn,
747 nulldrv_SetWindowIcon,
748 nulldrv_SetWindowStyle,
749 nulldrv_SetWindowText,
750 nulldrv_ShowWindow,
751 nulldrv_SysCommand,
752 loaderdrv_UpdateLayeredWindow,
753 nulldrv_WindowMessage,
754 nulldrv_WindowPosChanging,
755 nulldrv_WindowPosChanged,
756 /* system parameters */
757 nulldrv_SystemParametersInfo,
758 /* thread management */
759 nulldrv_ThreadDetach